Hello,
        I found a couple of problems that were causing this.  The first is that
ltmain.sh does not like a space between the -L and the path so:

-L @RPM_PREFIX@/lib -lrpm should be
-L@RPM_PREFIX@/lib -lrpm

I don't have an answer for this right now because the fix involves
saving previous arguments in the loop.

The second is that ltmain does not search the -L directory for the
library.  The patch below fixes this.

Comments are welcome.

        Michael


===========Patch=============
diff -u -p -r1.1.1.1 ltmain.in
--- ltmain.in   2000/03/28 15:43:52     1.1.1.1
+++ ltmain.in   2000/03/28 21:54:19
@@ -1350,7 +1350,7 @@ compiler."
          fi
          test $pass = conv && continue
          name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
-         for searchdir in $lib_search_path; do
+         for searchdir in "$new_lib_search_path $lib_search_path"; do
            # Search the libtool library
            lib="$searchdir/lib${name}.la"
            if test -f "$lib"; then
=============================
Michael Bletzinger wrote:
> 
> Hello Everyone,
> 
> I have an automake target that looks like this:
> 
> noinst_LTLIBRARIES = liblocate_paths.la
> 
> liblocate_paths_la_SOURCES = \
>         locate_paths.c \
>         locate_paths.h
> 
> liblocate_paths_la_LIBADD =  -L @RPM_PREFIX@/lib -lrpm
> 
> Which generates the following libtool command
> 
> /bin/sh ../libtool --mode=link gcc  -g -O2   -o liblocate_paths.la
> locate_paths.lo  -L /opt/gsptools/lib -lrpm
> 
> The problem is that when I peek into liblocate_paths.la I find that
> dependency_libs to be set to
> 
> dependency_libs=' -L/home/mbletzin/work/package_globus/Base/locater
> /usr/lib/librpm.la  -l
> popt -L/usr/local/lib -ldb1 -lz -lbz2'
> 
> Notice that the location of the rpm library has changed.  Consequently
> anybody who links with this library gets the wrong rpm library.
> 
> I was wondering if anyone had any ideas why this is happening?
> 
>         Thanks
>         Michael
> 
> P.S I am using GNU libtool 1.3c (1.687 2000/02/03 12:54:29) on Redhat
> 6.2 beta linux box.

Reply via email to