From: Thomas Tanner Date: Mon, 24 Jan 2000 20:34:46 +0000 (+0000) Subject: fix severe bugs reported by Elrond X-Git-Tag: release-1-3d~217 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=58931da3194e9eb49131ca05cbf0e4163d83fb62;p=thirdparty%2Flibtool.git fix severe bugs reported by Elrond * ltconfig.in: replace $objdir with $output_objdir * ltmain.in: change to the builddir before relinking programs * ltmain.in, ltconfig.in, libtool.m4, ltdl.m4: remove unnessary spaces from line endings --- diff --git a/ChangeLog b/ChangeLog index a90e197b6..ffae703b2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2000-01-24 Thomas Tanner + + fix severe bugs reported by Elrond + + * ltconfig.in: replace $objdir with $output_objdir + + * ltmain.in: change to the builddir before relinking programs + + * ltmain.in, ltconfig.in, libtool.m4, ltdl.m4: + remove unnessary spaces from line endings + 2000-01-19 Thomas Tanner * ltmain.in: rewrite of the ILD code, merge linking code for diff --git a/libtool.m4 b/libtool.m4 index 5bccb8fe9..c5deabb6e 100644 --- a/libtool.m4 +++ b/libtool.m4 @@ -460,7 +460,7 @@ test -n "$reload_flag" && reload_flag=" $reload_flag" # AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies # -- PORTME fill in with the dynamic library characteristics AC_DEFUN(AC_DEPLIBS_CHECK_METHOD, -[AC_CACHE_CHECK([how to recognise dependant libraries], +[AC_CACHE_CHECK([how to recognise dependant libraries], lt_cv_deplibs_check_method, [lt_cv_file_magic_cmd='$FILE' lt_cv_file_magic_test_file= @@ -480,11 +480,11 @@ case "$host_os" in aix4* | beos*) lt_cv_deplibs_check_method=pass_all ;; - + bsdi4*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_test_file=/shlib/libc.so - ;; + ;; cygwin* | mingw*) lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' @@ -498,11 +498,11 @@ freebsd*) ;; esac ;; - + gnu*) lt_cv_deplibs_check_method=pass_all ;; - + irix5* | irix6*) case "$host_os" in irix5*) @@ -546,7 +546,7 @@ osf3* | osf4* | osf5*) sco3.2v5*) lt_cv_deplibs_check_method=pass_all ;; - + solaris*) lt_cv_deplibs_check_method=pass_all lt_cv_file_magic_test_file=/lib/libc.so diff --git a/ltconfig.in b/ltconfig.in index b81e35177..b94efbff2 100755 --- a/ltconfig.in +++ b/ltconfig.in @@ -678,7 +678,7 @@ else fi if test -z "$ac_cv_prog_cc_pic"; then echo "$ac_t"none 1>&6 -else +else echo "$ac_t""$ac_cv_prog_cc_pic" 1>&6 # Check to make sure the pic_flag actually works. @@ -695,7 +695,7 @@ else if { (eval echo $progname:@LINENO@: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then # Append any warnings to the config.log. cat conftest.err 1>&5 - + case "$host_os" in hpux9* | hpux10* | hpux11*) # On HP-UX, both CC and GCC only warn that PIC is supported... then @@ -900,7 +900,7 @@ if test "$with_gcc" = yes; then else no_builtin_flag=' -fno-builtin' fi - + fi # See if the linker supports building shared libraries. @@ -980,7 +980,7 @@ EOF ;; amigaos*) - archive_cmds='$rm $objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data~$AR cru $lib $libobjs~$RANLIB $lib~(cd $objdir && a2ixlibrary -32)' + archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR cru $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes @@ -1011,14 +1011,14 @@ EOF allow_undefined_flag=unsupported always_export_symbols=yes - extract_expsyms_cmds='test -f $objdir/impgen.c || \ - sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //; p; }" -e d < $0 > $objdir/impgen.c~ - test -f $objdir/impgen.exe || (cd $objdir && \ + extract_expsyms_cmds='test -f $output_objdir/impgen.c || \ + sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //; p; }" -e d < $0 > $output_objdir/impgen.c~ + test -f $output_objdir/impgen.exe || (cd $output_objdir && \ if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \ else $CC -o impgen impgen.c ; fi)~ - $objdir/impgen $dir/$soname > $objdir/$soname-def' + $output_objdir/impgen $dir/$soname > $output_objdir/$soname-def' - old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $objdir/$soname-def --output-lib $objdir/$newlib' + old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib' # cygwin and mingw dlls have different entry points and sets of symbols # to exclude. @@ -1040,9 +1040,9 @@ EOF # recent cygwin and mingw systems supply a stub DllMain which the user # can override, but on older systems we have to supply one (in ltdll.c) if test "x$lt_cv_need_dllmain" = "xyes"; then - ltdll_obj='$objdir/$soname-ltdll.'"$objext " - ltdll_cmds='test -f $objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $objdir/$soname-ltdll.c~ - test -f $objdir/$soname-ltdll.$objext || (cd $objdir && $CC -c $soname-ltdll.c)~' + ltdll_obj='$output_objdir/$soname-ltdll.'"$objext " + ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $output_objdir/$soname-ltdll.c~ + test -f $output_objdir/$soname-ltdll.$objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~' else ltdll_obj= ltdll_cmds= @@ -1053,26 +1053,26 @@ EOF # the compiled dll only exports the symbol export list. # Be careful not to strip the DATA tag left be newer dlltools. export_symbols_cmds="$ltdll_cmds"' - $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $objdir/$soname-def '$ltdll_obj'$libobjs $convenience~ - sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $objdir/$soname-def > $export_symbols' - + $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~ + sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols' + # If DATA tags from a recent dlltool are present, honour them! - archive_expsym_cmds='echo EXPORTS > $objdir/$soname-def~ + archive_expsym_cmds='echo EXPORTS > $output_objdir/$soname-def~ _lt_hint=1; cat $export_symbols | while read symbol; do set dummy \$symbol; case \$# in - 2) echo " \$2 @ \$_lt_hint ; " >> $objdir/$soname-def;; - *) echo " \$2 @ \$_lt_hint \$3 ; " >> $objdir/$soname-def;; + 2) echo " \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;; + *) echo " \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;; esac; _lt_hint=`expr 1 + \$_lt_hint`; done~ '"$ltdll_cmds"' - $CC -Wl,--base-file,$objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $lib '$ltdll_obj'$libobjs $deplibs $compiler_flags~ - $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~ - $CC -Wl,--base-file,$objdir/$soname-base $objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $lib '$ltdll_obj'$libobjs $deplibs $compiler_flags~ - $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~ - $CC $objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $lib '$ltdll_obj'$libobjs $deplibs $compiler_flags' + $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $lib '$ltdll_obj'$libobjs $deplibs $compiler_flags~ + $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~ + $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $lib '$ltdll_obj'$libobjs $deplibs $compiler_flags~ + $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~ + $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $lib '$ltdll_obj'$libobjs $deplibs $compiler_flags' ;; netbsd*) @@ -1103,7 +1103,7 @@ EOF else ld_shlibs=no fi - ;; + ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' @@ -1147,7 +1147,7 @@ else aix3*) allow_undefined_flag=unsupported always_export_symbols=yes - archive_expsym_cmds='$LD -o $objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR cru $lib $objdir/$soname' + archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR cru $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes @@ -1184,8 +1184,8 @@ else hardcode_direct=yes fi allow_undefined_flag=' ${wl}-berok' - archive_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bexpall ${wl}-bnoentry${allow_undefined_flag}' - archive_expsym_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}' + archive_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bexpall ${wl}-bnoentry${allow_undefined_flag}' + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}' case "$host_os" in aix4.[01]|aix4.[01].*) # According to Greg Wooledge, -bexpall is only supported from AIX 4.2 on always_export_symbols=yes ;; @@ -1193,7 +1193,7 @@ else ;; amigaos*) - archive_cmds='$rm $objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data~$AR cru $lib $libobjs~$RANLIB $lib~(cd $objdir && a2ixlibrary -32)' + archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR cru $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # see comment about different semantics on the GNU ld section @@ -1251,7 +1251,7 @@ else hpux9* | hpux10* | hpux11*) case "$host_os" in - hpux9*) archive_cmds='$rm $objdir/$soname~$LD -b +b $install_libdir -o $objdir/$soname $libobjs $deplibs $linker_flags~test $objdir/$soname = $lib || mv $objdir/$soname $lib' ;; + hpux9*) archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;; *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;; esac hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' @@ -1295,8 +1295,8 @@ else hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported - archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $objdir/$libname.def~$echo DATA >> $objdir/$libname.def~$echo " SINGLE NONSHARED" >> $objdir/$libname.def~$echo EXPORTS >> $objdir/$libname.def~emxexp $libobjs >> $objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $objdir/$libname.def' - old_archive_from_new_cmds='emximp -o $objdir/$libname.a $objdir/$libname.def' + archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) @@ -1359,8 +1359,8 @@ else archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no - hardcode_direct=no #Motorola manual says yes, but my tests say they lie - ;; + hardcode_direct=no #Motorola manual says yes, but my tests say they lie + ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' @@ -1549,7 +1549,7 @@ cygwin* | mingw*) freebsd1*) dynamic_linker=no ;; - + freebsd*) objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` version_type=freebsd-$objformat @@ -2239,10 +2239,10 @@ fi fi - + fi - + fi @@ -2348,7 +2348,7 @@ else fnord() { int i=42;} main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW); if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord"); - if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); } + if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); } EOF if { (eval echo $progname:@LINENO@: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null @@ -2421,7 +2421,7 @@ else fnord() { int i=42;} main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW); if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord"); - if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); } + if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); } EOF if { (eval echo $progname:@LINENO@: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null @@ -2875,29 +2875,29 @@ EOF # starting and closing comments # /* impgen.c starts here */ # /* Copyright (C) 1999-2000 Free Software Foundation, Inc. -# +# # This file is part of GNU libtool. -# +# # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. -# +# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # */ -# +# # #include /* for printf() */ # #include /* for open(), lseek(), read() */ # #include /* for O_RDONLY, O_BINARY */ # #include /* for strdup() */ -# +# # /* O_BINARY isn't required (or even defined sometimes) under Unix */ # #ifndef O_BINARY # #define O_BINARY 0 @@ -2913,7 +2913,7 @@ EOF # read (fd, b, 2); # return b[0] + (b[1]<<8); # } -# +# # static unsigned int # pe_get32 (fd, offset) # int fd; @@ -2924,7 +2924,7 @@ EOF # read (fd, b, 4); # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); # } -# +# # static unsigned int # pe_as32 (ptr) # void *ptr; @@ -2932,7 +2932,7 @@ EOF # unsigned char *b = ptr; # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); # } -# +# # int # main (argc, argv) # int argc; @@ -2944,32 +2944,32 @@ EOF # unsigned long name_rvas, nexp; # unsigned char *expdata, *erva; # char *filename, *dll_name; -# +# # filename = argv[1]; -# +# # dll = open(filename, O_RDONLY|O_BINARY); # if (!dll) # return 1; -# +# # dll_name = filename; -# +# # for (i=0; filename[i]; i++) # if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':') # dll_name = filename + i +1; -# +# # pe_header_offset = pe_get32 (dll, 0x3c); # opthdr_ofs = pe_header_offset + 4 + 20; # num_entries = pe_get32 (dll, opthdr_ofs + 92); -# +# # if (num_entries < 1) /* no exports */ # return 1; -# +# # export_rva = pe_get32 (dll, opthdr_ofs + 96); # export_size = pe_get32 (dll, opthdr_ofs + 100); # nsections = pe_get16 (dll, pe_header_offset + 4 +2); # secptr = (pe_header_offset + 4 + 20 + # pe_get16 (dll, pe_header_offset + 4 + 16)); -# +# # expptr = 0; # for (i = 0; i < nsections; i++) # { @@ -2988,22 +2988,22 @@ EOF # break; # } # } -# +# # expdata = (unsigned char*)malloc(export_size); # lseek (dll, expptr, SEEK_SET); # read (dll, expdata, export_size); # erva = expdata - export_rva; -# +# # nexp = pe_as32 (expdata+24); # name_rvas = pe_as32 (expdata+32); -# +# # printf ("EXPORTS\n"); # for (i = 0; i $ac_nlist) && test -s "$ac_nlist"; then # Try sorting and uniquifying the output. @@ -438,7 +438,7 @@ if test x"$ac_cv_sys_symbol_underscore" = xyes; then fnord() { int i=42;} main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW); if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord"); - if(ptr1 && !ptr2) { dlclose(self); exit(0); } } exit(1); } + if(ptr1 && !ptr2) { dlclose(self); exit(0); } } exit(1); } ], libltdl_cv_need_uscore=no, libltdl_cv_need_uscore=yes, libltdl_cv_need_uscore=cross )]) diff --git a/ltmain.in b/ltmain.in index 148a37c65..bead24516 100644 --- a/ltmain.in +++ b/ltmain.in @@ -1094,7 +1094,7 @@ compiler." prev=vinfo continue ;; - + -Wc,*) args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'` arg= @@ -1343,7 +1343,7 @@ compiler." *) # Anything else should be a program. linkmode=prog ;; esac - + save_deplibs="$deplibs" deplibs= newdependency_libs= @@ -1351,10 +1351,10 @@ compiler." new_lib_search_path= need_relink=no # whether we're linking any uninstalled libtool libraries case $linkmode in - lib) + lib) passes="link" ;; - prog) + prog) alldeplibs=no link_against_libtool_libs= passes="scan link" @@ -1416,7 +1416,7 @@ compiler." finalize_command="$finalize_command $deplib" fi ;; - *) + *) $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2 ;; esac @@ -1529,7 +1529,7 @@ compiler." case "$deplib" in -L*) new_lib_search_path="$new_lib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test esac - + if test "$link_all_deplibs" != no || \ test "$fast_install" != no || \ test "$build_libtool_libs" = no || \ @@ -1558,7 +1558,7 @@ compiler." ;; esac laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` - + # Find the relevant object directory and library name. if test "X$installed" = Xyes; then if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then @@ -1615,7 +1615,7 @@ compiler." *) case "$compile_rpath " in *" $absdir "*) ;; - *) compile_rpath="$compile_rpath $absdir" + *) compile_rpath="$compile_rpath $absdir" esac ;; esac @@ -1655,7 +1655,7 @@ compiler." *) case "$compile_rpath " in *" $absdir "*) ;; - *) compile_rpath="$compile_rpath $absdir" + *) compile_rpath="$compile_rpath $absdir" esac ;; esac @@ -1669,7 +1669,7 @@ compiler." ;; esac fi - + if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names @@ -1684,7 +1684,7 @@ compiler." # Make a new name for the extract_expsyms_cmds to use newlib="libimp-`echo $soname | sed 's/^lib//;s/\.dll$//'`.a" - + # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else @@ -1698,7 +1698,7 @@ compiler." done IFS="$save_ifs" fi - + # Create $newlib if test -f "$output_objdir/$newlib"; then :; else $show "generating import library for \`$soname'" @@ -1797,7 +1797,7 @@ compiler." esac fi test "$add_name" = yes && deplibs="$deplibs -l$name" - + else lib_linked=yes @@ -1883,7 +1883,7 @@ compiler." esac fi test "$add_name" = yes && finalize_command="$finalize_command -l$name" - + fi elif test $linkmode = prog; then # Here we assume that one of hardcode_direct or hardcode_minus_L @@ -1955,7 +1955,7 @@ compiler." for deplib in $dependency_libs; do case "$deplib" in -L*) path="$deplib" ;; - *.la) + *.la) if grep "^installed=no" $deplib > /dev/null; then dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$deplib" && dir="." @@ -2242,7 +2242,7 @@ compiler." versuffix= verstring="" fi - + # Check to see if the archive will have undefined symbols. if test "$allow_undefined" = yes; then if test "$allow_undefined_flag" = unsupported; then @@ -2276,7 +2276,7 @@ compiler." deplibs=`echo "$deplibs " | sed -e 's% -L$path % %g'` dependency_libs=`echo "$dependency_libs " | sed -e 's% -L$path % %g'` done - + if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. temp_xrpath= @@ -2417,7 +2417,7 @@ EOF # Follow soft links. if ls -lLd "$potent_lib" 2>/dev/null \ | grep " -> " >/dev/null; then - continue + continue fi # The statement above tries to avoid entering an # endless loop below, in case of cyclic links. @@ -2512,7 +2512,7 @@ EOF library_names= old_library= dlname= - + # Test again, we may have decided not to build it any more if test "$build_libtool_libs" = yes; then if test "$hardcode_into_libs" != no; then @@ -2564,12 +2564,12 @@ EOF test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" fi - shlibpath="$finalize_shlibpath" - test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" + shlibpath="$finalize_shlibpath" + test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi - + # Get the real and link names of the library. eval library_names=\"$library_names_spec\" set dummy $library_names @@ -2772,7 +2772,7 @@ EOF gentop= # reload_cmds runs $LD directly, so let us get rid of # -Wl from whole_archive_flag_spec - wl= + wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then @@ -2899,9 +2899,9 @@ EOF if test "$dlopen" = unknown && test "$dlopen_self" = unknown && test "$dlopen_self_static" = unknown; then $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support." - fi + fi fi - + if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. for libdir in $rpath $xrpath; do @@ -3052,7 +3052,7 @@ extern \"C\" { $run eval 'egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' $run eval '$mv "$nlist"T "$nlist"' fi - + if test -n "$export_symbols_regex"; then $run eval 'egrep -e "$export_symbols_regex" "$nlist" > "$nlist"T' $run eval '$mv "$nlist"T "$nlist"' @@ -3195,7 +3195,7 @@ static const void *lt_preloaded_setup() { $show "$link_command" $run eval "$link_command" status=$? - + # Delete the generated files. if test -n "$dlsyms"; then $show "$rm $output_objdir/${outputname}S.${objext}" @@ -3268,7 +3268,7 @@ static const void *lt_preloaded_setup() { # Fast installation is not supported link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" - + $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2 $echo "$modename: \`$output' will be relinked during installation" 1>&2 else @@ -3288,7 +3288,7 @@ static const void *lt_preloaded_setup() { # Replace the output file specification. link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` - + # Delete the old output files. $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname @@ -3300,6 +3300,7 @@ static const void *lt_preloaded_setup() { # Quote the relink command for shipping. if test -n "$relink_command"; then + relink_command="cd `pwd`; $relink_command" relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` fi @@ -3401,7 +3402,7 @@ else echo >> $output "\ program=lt-'$outputname' progdir=\"\$thisdir/$objdir\" - + if test ! -f \"\$progdir/\$program\" || \\ { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | sed 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then @@ -3418,7 +3419,7 @@ else # relink executable if necessary if test -n \"\$relink_command\"; then - if (cd \"\$thisdir\" && eval \$relink_command); then : + if (eval \$relink_command); then : else $rm \"\$progdir/\$file\" exit 1 @@ -3532,7 +3533,7 @@ fi\ exit $status fi generated="$generated $gentop" - + # Add in members from convenience archives. for xlib in $addlibs; do # Extract the objects. @@ -3606,7 +3607,7 @@ fi\ # Quote the link command for shipping. relink_command="cd `pwd`; $SHELL $0 --mode=relink $libtool_args" relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` - + # Only create the output if not a dry run. if test -z "$run"; then for installed in no yes; do @@ -3619,7 +3620,7 @@ fi\ newdependency_libs= for deplib in $dependency_libs; do case "$deplib" in - *.la) + *.la) name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` if test -z "$libdir"; then @@ -3884,7 +3885,7 @@ relink_command=\"$relink_command\"" continue fi fi - + # See the names of the shared library. set dummy $library_names if test -n "$2"; then @@ -4083,7 +4084,7 @@ relink_command=\"$relink_command\"" $show "$old_striplib $oldlib" $run eval "$old_striplib $oldlib" || exit $? fi - + # Do each command in the postinstall commands. eval cmds=\"$old_postinstall_cmds\" IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'