Ethereal-dev: Re: [ethereal-dev] Adding autoconf options

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

Date: Thu, 13 Apr 2000 01:44:25 -0400 (EDT)
On 12 Apr, Guy Harris wrote:
>> My zlib is installed as /pd/libs/lib/libz.a (and /pd/libs/include/ for
>> include-files)
>> 
>> I tried the following:
>> export CC=cc 
>> export CFLAGS="+DAportable -Aa -Ae +O2 -I /pd/libs/include/  -L
>> /pd/libs/lib/"
>> ./configure -prefix=/pd/ethereal0.8.4 --without-gcc
>> --includedir=/pd/libs/include --libdir=/pd/libs/lib
>> 
>> But the check for the zlib-Headers failed, apparently, because the
>> configure-script doesn't use neither the -I-switch from CFLAGS nor the
>> --includedir for the relevant test.
>>
>> I finally had to symlink the header-files from /usr/local/include/ to get
>> this to work. (Finding the lib itself wasn't a problem)
> 
> Unfortunately, the documentation for autoconf-generated scripts isn't as
> good as it should be, but I infer from the documentation for automake
> that "--includedir" and "--libdir" are intended not to specify where the
> package should itself search for header files and libraries,
> respectively, but to specify where the package's *own* include files and
> libraries, respectively, are to be installed (they override the target
> directory specified by --prefix).
> 
> Unfortunately, autoconf does a *really* bad job of letting you search
> for headers and libraries other than The Usual Places, such as
> "/usr/include"/ and /usr/lib" - it doesn't even do a very good job of
> handling "/usr/local/{include,lib}".

Use CPPFLAGS to handle include directories and LDFLAGS to handle
libraries. Works everywhere I've tried.

When checking for a header, autoconf calls the preprocessor which can't
always handle the same options as for the compilier. It does use
CPPFLAGS in addition to CFLAGS during compilation.

-- 
Doug Nazar
Dragon Computer Consultants Inc.
Tel: (416) 708-1578     Fax: (416) 708-8081