Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 317
Mirage Avatar asked Jun 03 '11 13:06

Mirage


People also ask

What is the configure command in Linux?

configure is normally a (generated) shell script which is packaged in Unix-based applications and is used to detect certain machine settings and set up needed files for make to do its job.

How do you find the configuration parameters?

So just run ./config. status --config , and it will print out all the configure parameters.

What is configure gnu?

The GNU configure and build system is comprised of several different tools. Program developers must build and install all of these tools. People who just want to build programs from distributed sources normally do not need any special tools beyond a Unix shell, a make program, and a C compiler.


4 Answers

./configure --help

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

like image 161
Carlos Campderrós Avatar answered Oct 09 '22 11:10

Carlos Campderrós


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.

like image 23
Richard Kettlewell Avatar answered Oct 09 '22 11:10

Richard Kettlewell


./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 be passed to the configure script in the top source directory you should also have a look at the configure scripts 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.

like image 3
Li-Guangda Avatar answered Oct 09 '22 12:10

Li-Guangda


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

Installation directory variables

Release process

like image 1
Pancho Avatar answered Oct 09 '22 11:10

Pancho