autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Adding a path for library checking.


From: Michael Maillot
Subject: Re: Adding a path for library checking.
Date: 24 Feb 2003 10:43:16 +0100

OK, here is the beginning of some explanation (I haven't found why it
doesn't work ,yet).

To make it clearer, I'll give the real names (yet longet) of the
library, paths and functions:
- The path of my home made library is
/home/maillot/DEV/EVEA/EFpl/src/.libs
- The library name is libefpl. It contains the following function : 
e_fpl_table_new.
- The library that needs to link against the former library is in
/home/maillot/DEV/EVEA/EDataIO/src (/.libs once built) (yes, it is not a
"program", in fact.)

So, in my /home/maillot/DEV/EVEA/EDataIO/configure.in, I added : 

LDFLAGS="-L/home/maillot/DEV/EVEA/EFpl/src/.libs $LDFLAGS"
AC_SUBST(LDFLAGS)

# and then
AC_CHECK_LIB(efpl, e_fpl_table_new)

And this test fails. As I really need to build my library (the one in
EDataIO), I added the following flag in my
/home/maillot/DEV/EVEA/EDataIO/src/Makefile.am, to force the linking
against the first library : 

libedataio_la_LDFLAGS = ${SOME_FLAGS} -lefpl
                                      ^^^^^^

And when I launch make, I can read this : 

gcc -shared  e-fpl_io.lo e-fpl_parse_l.lo e-fpl_parse_y.lo  -Wl,--rpath
-Wl,/opt/gnome-2.2.rc1/lib -Wl,--rpath
-Wl,/home/maillot/DEV/EVEA/EFpl/src/.libs/.libs -Wl,--rpath
-Wl,/opt/gnome-2.2.rc1/lib -Wl,--rpath -Wl,/usr/local/lib 
-L/usr/X11R6/lib -L/home/maillot/DEV/EVEA/EFpl/src/.libs
-L/opt/gnome-2.2.rc1/lib /opt/gnome-2.2.rc1/lib/libglib-2.0.so
/home/maillot/DEV/EVEA/EFpl/src/.libs/.libs/libefpl.so -lbz2 -lz  
-Wl,-soname -Wl,libedataio.so.0 -o .libs/libedataio.so.0.0.1
gcc: /home/maillot/DEV/EVEA/EFpl/src/.libs/.libs/libefpl.so: No such
file or directory
                                     ^^^^^^^^^^^

Why is there ".libs" two times? I wrote it only once in my
"configure.am". And of course, if I replace this line : 
LDFLAGS="-L/home/maillot/DEV/EVEA/EFpl/src/.libs $LDFLAGS"
by this one:
LDFLAGS="-L/home/maillot/DEV/EVEA/EFpl/src $LDFLAGS"
I can build the second library (yet, the library checking still
fails...)

Michael.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]