Search code examples
autotools

How to list features that can be enabled and disabled in ./configure script?


Lots of open source software is distributed in source code with autotools build system. In order to build such software i issue ./configure && make. But for some software i need to build only subset of it - for example, in SRP i'm interested only in library and not in terminal or ftp client. To specify what to build ./configure script accepts --disable-, --enable-, --with-, --without- etc command-line keys that are listed in ./configure --help, "Features and packages" section.

Given third-party open source archive with ./configure script is it any way i can easily get list of all features available to enable-disable? Of course such information is available in source code, for example in makefile.am and makefile.in - but they are huge and hard to read. Maybe easier way exist, something like ./configure --list-features?


Solution

  • ./configure --help will do the trick.

    This shows any --enable-X or --with-X arguments that are defined using the macros AC_ARG_ENABLE or AC_ARG_WITH, as well as a list of environment variables that the configure script will pay attention to, such as CC.

    In some large projects that are organized as a series of sub-projects each with their own configure script, you may need to do ./configure --help=recursive to see all the features/packages for all the sub-projects.