LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Is it possible to get the ./configure options used to compile some code??? (https://www.linuxquestions.org/questions/linux-newbie-8/is-it-possible-to-get-the-configure-options-used-to-compile-some-code-662167/)

helptonewbie 08-12-2008 02:21 AM

Is it possible to get the ./configure options used to compile some code???
 
Hi All,
I'm wondering as i think i may need to be able to get this info if possible, but how can you find out what ./configure options were used to compile the source code of programs in the first place...i mean all sorts of programs....including apache. PHP is easy because you can get it with php -i or php.info pages....but is it possible to get this info for other packages as well that are compiled from source.

Thanks Regards

Ps- main reason being so if i need to compile in something new to the prog, i could use the same configure options as already used to get everything required compiled in...as well as...the extra options i want to configure into the prog as well.

Mr. C. 08-12-2008 02:25 AM

Short answer is that you can't in general. Some software will maintain those options in a config file installed into the system, as you've noted.

I find it most useful to create and maintain my own ~/etc/configs directory, where I store the config options I use to rebuild software. Then I just:

sh ~/etc/config/prog.config
make test install

helptonewbie 08-12-2008 02:39 AM

oh dear...shame i would think that is a useful little and simple thing for software makers to do..(not that i'm criticizing how good the software is people create at all)

How would someone go about working out these options if at all possible when someone else has installed the software in the first place?

And thanks and noted...i think in future this is certainly something that should happen!! (noteing compilation instructions)

matthewg42 08-12-2008 02:43 AM

Assuming the configure script is one of these autoconf/automake configure scripts, it should have written a file called config.log in the directory where it was run. This usually contains a copy of the command used to invoke it. Of course, this only applies to packages you have built yourself, and where you have not cleaned up the source.

helptonewbie 08-12-2008 03:12 AM

Thanks i think this could be what i needed...

But still if there are any other ways as well please anybody do tell

jschiwal 08-12-2008 04:41 AM

Some programs will give information on how it was built. Look at "gcc -v".

Also check for documentation installed with the package such as in /usr/share/doc/<package>-<version>/ or /usr/share/doc/packages/<package>/.

helptonewbie 08-15-2008 02:24 AM

Thanks...all this is useful stuff...Cheers all


All times are GMT -5. The time now is 06:39 PM.