What are various options / arguments for "./configure" in Linux
LinuxConfigureLinux 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:
-
Are those parameters same across all software packages or they vary software to software?
-
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: