Determining flags used to compile

Gerald Combs gerald at zing.org
Fri Feb 20 22:04:45 CST 2004


Brad wrote:

> On Fri, 2004-02-20 at 13:19, Leo J Mauler wrote:
> 
> 
>>The original source and makefile (the makefile edited by a configure
>>script) may still be on the original server, and the makefile would have
>>all the original flags still in it.  Check the file dates to make sure
>>that the makefile was modified (relative to the other files in the source
>>directory), either by a programmer or the configure script.
> 
> 
> I thought the Makefile would have that info but when I looked in it it
> did not specify a particular directory even though freeradius is not
> installed in the default directory.  That made me question whether this
> Makefile would work or not.  So if it IS the original Makefile, I can
> just copy it to the new server and skip the ./configure right?

No.  The "configure" scripts that ship with most OS software is usually
generated by GNU Autoconf, based on various hints that the develpers
provide in files like "configure.in".  When you run "configure", it
custom-builds a Makefile specifically for the system on which you're
running.  If the box you're moving to is running a different OS (e.g.
Solaris vs Linux) or a different distribution, or a sufficiently
different version of the same distribution, your Makefile will be
different and prone to fail.

If you want to know the exact configuration flags used in an
Autoconf-driven build, check the "config.status" file.  This is a shell
script generated by "configure" which contains the flags passed to
"configure", along with a bunch of other cached information.  The
command line passed to "configure" will be listed at the top of the
script for easy cutting-and-pasting, or you can copy the script itself
to the new machine and execute it there.

If you're building a package from source, it's usually a good idea to
stash its "config.status" somewhere for later reference.




More information about the Kclug mailing list