简体   繁体   中英

./Configure for non-boost ASIO

I take a look inside the asio folder there are

  • asio.manifest
  • autogen.sh
  • boost_asio.manifest
  • boostify.pl
  • configure.ac
  • include/
  • INSTALL
  • src/ (there are asio_ssl.cpp and asio.cpp)

I didn't see any configure script where I can execute. How do I build this asio? I read asio is a header only library.

So, what I can make out of those files in the asio folder?

If you got it from a tarball, you should already have a configure script ready to be executed. If you checked from the repository, you probably need to run ./autogen.sh to generate the configure script for you, using configure.ac as input.

The convention is:

  • ./bootstrap : it invokes autoconf to process configure.ac and spit out configure . Often it also invokes automake to process all Makefile.am files and turn them into Makefile.in . Many moons ago, the name autogen.sh was used instead of bootstrap . And configure.in was used instead of configure.ac .

  • ./configure : detects everything on the system and creates config.status , then executes it.

  • ./config.status : processes all *.in files into versions without the .in suffix. That includes Makefile.in -> Makefile . You don't have to run this script by hand.

  • INSTALL : this SHOULD contain build instructions, such as "run ./autogen.sh if you checked out a copy from the repository". Shame on the ASIO developers, they just point the user to look for a non-existing "doc" directory.

You need autoconf (and friends) installed to transform configure.ac into configure . Once that is done, the build system becomes self-contained. That is, you can do a make dist-gzip to pack all the sources (and the configure script), transfer the tar.gz it to another system, and follow from the ./configure step, even if autoconf is not installed there.

So, Here are the steps I've followed just now.

  1. I went to http://think-async.com , which is the website that hosts the non-boost asio.
  2. Their download link led me to sourceforge, and version 1.4.8 of the software.
  3. I then extracted the folder, and looking inside, I see the usual layout.
  4. So the following steps include ./configure , make , and probably sudo make install .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM