Ethereal-users: [ethereal-users] Adding autoconf options to specify where include files and libr
> 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}".
Autoconf *does* provide a built-in mechanism for handling X11, namely
the "--x-includes" and "--x-libraries" options, but doesn't provide a
general mechanism to let you do that for arbitrary packages.
The autoconfigure stuff for GTK+ adds a "--with-gtk-prefix" option, to
let you specify where GTK+ is installed, and the autoconfigure stuff for
GLib offers a similar "--with-glib-prefix" option.
I'm inclined to add similar options for pcap and zlib, e.g.
"--with-pcap-prefix" and "--with-zlib-prefix", and to turn
"--with-ucdsnmp" into "--with-snmp-prefix" (to work with either UCD or
CMU SNMP), to let you specify where those libraries' header files and
libraries are installed.
Yes, it means you have to specify a lot of stuff if various libraries
are all installed in the same directory, but it's not necessarily the
case that all the third-party libraries Ethereal could use *are*
installed in the same directory; we could provide a single such option,
but it wouldn't handle the case of GTK+ and GLib (although, as long as
the "gtk-config" and "glib-config" programs are in your search path, the
configure script may manage to find where those are hidden).