diff --git a/ChangeLog b/ChangeLog index d45bd975..2c47f24f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +1999-03-31 Thomas Tanner + + * ltmain.in: always link a library before its dependency libs + * mdemo/Makefile.am: test -export-symbols-regex + 1999-03-30 Thomas Tanner * doc/libtool.texi: fixed a typo diff --git a/ltmain.in b/ltmain.in index cf1028e6..7efeb9ed 100644 --- a/ltmain.in +++ b/ltmain.in @@ -1852,7 +1852,7 @@ compiler." fi # Link against this library - newdependency_libs="$newdependency_libs $dependency_libs $abs_ladir/$laname" + newdependency_libs="$newdependency_libs $abs_ladir/$laname $dependency_libs" done # Make sure lib_search_path contains only unique directories. @@ -2120,7 +2120,7 @@ EOF ;; *) # Add libc to deplibs on all other systems. - deplibs="-lc $deplibs" + deplibs="$deplibs -lc" ;; esac fi @@ -2488,8 +2488,26 @@ EOF exit 1 fi + ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` + test "X$ladir" = "X$lib" && ladir="." + # We need an absolute path. + case "$ladir" in + /* | [A-Za-z]:[/\\]*) ;; + *) + abs_ladir=`cd "$ladir" && pwd` + if test -z "$abs_ladir"; then + $echo "$modename: cannot determine absolute directory name of \`$ladir'" 1>&2 + exit 1 + fi + ladir="$abs_ladir" + ;; + esac + laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` new_lib_search_path="$new_lib_search_path `$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`" + deplibs="$deplibs $lib" + absdeplibs="$absdeplibs $ladir/$laname" + for deplib in $dependency_libs; do case "$deplib" in -L*) @@ -2518,25 +2536,6 @@ EOF esac fi done - - ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` - test "X$ladir" = "X$lib" && ladir="." - # We need an absolute path. - case "$ladir" in - /* | [A-Za-z]:[/\\]*) ;; - *) - abs_ladir=`cd "$ladir" && pwd` - if test -z "$abs_ladir"; then - $echo "$modename: cannot determine absolute directory name of \`$ladir'" 1>&2 - exit 1 - fi - ladir="$abs_ladir" - ;; - esac - laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` - - deplibs="$deplibs $lib" - absdeplibs="$absdeplibs $ladir/$laname" done # Eliminate all dependency_libs that are already contained in deplibs diff --git a/mdemo/Makefile.am b/mdemo/Makefile.am index 56983e48..d37bacdb 100644 --- a/mdemo/Makefile.am +++ b/mdemo/Makefile.am @@ -14,7 +14,7 @@ foo1_la_LDFLAGS = -module -avoid-version libfoo2_la_SOURCES = foo2.c libfoo2_la_LIBADD = $(LIBM) -libfoo2_la_LDFLAGS = -module +libfoo2_la_LDFLAGS = -module -export-symbols-regex "libfoo2.*" noinst_HEADERS = foo.h