What are various options / arguments for "./configure" in Linux

LinuxConfigure

Linux Problem Overview


I have seen that while installing new software in Linux, I always have to use first configure it.

But sometimes we need to pass various options like I did today to install lxml:

./configure --with-python=/opt/python27/bin/python 
--prefix=/usr/local 
--with-libxml-prefix=/usr/local 
--with-libxml-include-prefix=/usr/local/include 
--with-libxml-libs-prefix=/usr/local/lib

Now I want to know that how will the person know that what type of paramaters like --with-python can be used?
I mean:

  1. Are those parameters same across all software packages or they vary software to software?

  2. I even tried to read documentation as well, but no one mentions those parameters.

Linux Solutions


Solution 1 - Linux

./configure --help

That will show you all options for that particular configure script.

Solution 2 - Linux

Some are the same across all configure scripts produced by Autoconf (which is most of them, but not all); for instance --prefix is basically universal. Others are peculiar to the particular configure script.

Solution 3 - Linux

./configure --help is always helpful. But I would say more about that in some packages not only is there a configure script in the top source directory but also the possible subdirectories. So, for knowing all possible parameters which can pass to the configure script in the top source directory you should also have a look at the configure script in each possible subdirectory.

For example, in the top source directory of binutils-2.34 tarball there are --with-sysroot and --with-lib-path parameters with configure script. If you type ./configure --help under the top source directory, there are no document items for both of them because they are documented in the configure script under the subdirectory ld/. So you should type ./ld/configure --help.

Solution 4 - Linux

I know about configure --help but the information provided is "light". The following GNU resources contain useful additional information:

Installation directory variables

Release process

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionMirageView Question on Stackoverflow
Solution 1 - LinuxCarlos CampderrósView Answer on Stackoverflow
Solution 2 - LinuxRichard KettlewellView Answer on Stackoverflow
Solution 3 - LinuxLi-GuangdaView Answer on Stackoverflow
Solution 4 - LinuxPanchoView Answer on Stackoverflow