Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

autotools

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?

like image 903
grigoryvp Avatar asked Dec 07 '11 07:12

grigoryvp


2 Answers

./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.

like image 191
ptomato Avatar answered Oct 04 '22 17:10

ptomato


AFAIK, if configure.ac uses the AC_ARG_ENABLE and AC_ARG_WITH macros, the options should show up in the help output. I don't know why a package would try to circumvent this, unless it's an old script. A search of the configure.ac or configure.in script for these macros might help.

like image 38
Brett Hale Avatar answered Oct 04 '22 16:10

Brett Hale