On 27-May-98 Tim Teulings wrote:
> So back to my original question. I have the problem that I have to know
> the libraries Imlib configure has found to be usable to generate a
> valid chain of -l and -L options for my compiler. You stated that this
> is not possible in the current version. Will this be possible in the
> future? You just have to leave a simple textfile with that information
> somewhere, possibly even as part or in the place where the Imlib config
> file resides. That would be a enormous help for third party project
> configure scripts and would take away the enormous burden of the user
> to offer such comand line by hand. You need not give a time frame, I just
> want to plan a strategie for my configure script.
>

No, imlib doesn't really need to leave a text file around..  Just duplicate the
checks Imlib performs in your configure.in, and your program will magically link
against the same libs imlib used...

Example, from eMusic's configure.in, only relevant parts included:

AC_PATH_X
AC_PATH_XTRA
LIBS="$LIBS $X_LIBS -lX11 -lXext $X_EXTRA_LIBS"

GRLIBS="-L/usr/X11R6/lib -L/usr/local/lib -L/usr/X11/lib -L/usr/lib/
-L/usr/local/X11R6/lib -L/usr/local/X11/lib -L/usr/openwin/lib -L/lib -lc"
AC_CHECK_LIB(m, sin, GRLIBS="$GRLIBS -lm",                                     
             echo "ERROR:  You NEED to fix your system 'cuz -lm wasn't found"; \
             exit, $GRLIBS)
AC_CHECK_LIB(png, png_get_valid, GRLIBS="$GRLIBS -lpng -lz", ,
             -L/usr/lib -L/lib -L/usr/X11R6/lib -L/usr/X11/lib \
             -L/usr/local/lib -L/usr/local/X11R6/lib -L/usr/local/X11/lib \
             -L/usr/openwin/lib -lc -lm -lz)
AC_CHECK_LIB(jpeg, jpeg_read_scanlines, GRLIBS="$GRLIBS -ljpeg", ,
             -L/usr/lib -L/lib -L/usr/X11R6/lib -L/usr/X11/lib \
             -L/usr/local/lib -L/usr/local/X11R6/lib -L/usr/local/X11/lib \
             -L/usr/openwin/lib -lc -lm)
AC_CHECK_LIB(tiff, TIFFOpen, GRLIBS="$GRLIBS -ltiff", ,
             -L/usr/lib -L/lib -L/usr/X11R6/lib -L/usr/X11/lib \
             -L/usr/local/lib -L/usr/local/X11R6/lib -L/usr/local/X11/lib \
             -L/usr/openwin/lib -lc -lm)
AC_CHECK_LIB(gif, DGifOpenFileName, GRLIBS="$GRLIBS -lgif", ,
             -L/usr/lib -L/lib -L/usr/X11R6/lib -L/usr/X11/lib \
             -L/usr/local/lib -L/usr/local/X11R6/lib -L/usr/local/X11/lib \
             -L/usr/openwin/lib -lc -lm)

AC_CHECK_LIB(Imlib, Imlib_init, GRLIBS="$GRLIBS -lImlib", echo "ERROR: you need
Imlib to use eMusic"; exit, $GRLIBS)
AC_CHECK_LIB(Fnlib, Fnlib_init, GRLIBS="$GRLIBS -lFnlib", echo "ERROR: you need
Fnlib to use eMusic"; exit, $GRLIBS)
AC_CHECK_LIB(esd, esd_play_stream, GRLIBS="$GRLIBS -lesd", echo "ERROR: you
need EsounD to use eMusic"; exit, $GRLIBS)

LIBS="$LIBS $GRLIBS"

The only thing this doesn't check for is zlib.. guess I should make it do
that...  but the above SHOULD work for almost any system..


Isaac Richards
-
To unsubscribe from this list send mail to: [EMAIL PROTECTED]
with the message contents: unsubscribe e-develop

Reply via email to