]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
require AC_CANONICAL_HOST for path canonicalization
authorGary V. Vaughan <gary@gnu.org>
Fri, 27 Nov 1998 18:42:12 +0000 (18:42 +0000)
committerGary V. Vaughan <gary@gnu.org>
Fri, 27 Nov 1998 18:42:12 +0000 (18:42 +0000)
ChangeLog
libtool.m4
ltconfig.in

index 0ae69fb7f047233e6d1056ac2359a9d339a7a798..3ad70ddc87fda91a506256646287174ea82c6107 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 1998-11-27  Gary V. Vaughan  <garyv@oranda.demon.co.uk>
 
+       * libtool (AM_PROG_LD): Oops... we need to know the host_os for
+       the above changes.  I'm not sure whether mingw32 and os2 support
+       UNC paths, if they did we wouldn't need the check, we could use
+       UNC paths on all three; or if the bug with $LD not being
+       shell-meta escaped was fixed, we could use '\\' separators on all
+       three. AC_REQUIRE'ed AC_CANONICAL_HOST.
+       
        * libtool.m4 (AM_PROG_LD): Cannonicalize the absolute path for the
        ld program;  The order is funny to provide canonicalization to
        paths with '\\' separators as well as '/'.
index 0e058d28fa1a489b76d9c768aecd10514f2b578b..8131e36747e1e3fcb6fe9d753ce8bf698ba2795d 100644 (file)
@@ -182,7 +182,9 @@ AC_DEFUN(AM_PROG_LD,
 [AC_ARG_WITH(gnu-ld,
 [  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
-AC_REQUIRE([AC_PROG_CC])
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
 ac_prog=ld
 if test "$ac_cv_prog_gcc" = yes; then
   # Check if gcc -print-prog-name=ld gives a path.
@@ -193,11 +195,11 @@ if test "$ac_cv_prog_gcc" = yes; then
 changequote(,)dnl
     /* | [A-Za-z]:/*)
       # Canonicalize the path of ld
-      re_direlt='/[^/]*/\.\./'
+      re_direlt='/[^/][^/]*/\.\./'
       sub_uncdrive='s%^\([A-Za-z]\):/%//\1/%'
 changequote([,])dnl
       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
-        ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%g"`
+        ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
       done
       case "$host_os" in
       cygwin*)
@@ -216,12 +218,12 @@ changequote([,])dnl
 changequote(,)dnl
     [A-Za-z]:[\\]*)
       # Canonicalize the path of ld
-      re_direlt='\\[^\\]*\\\.\.\(\\\)'
+      re_direlt='\\[^\\][^\\]*\\\.\.\(\\\)'
       sub_uncdrive='s%^\([A-Za-z]\):\\%//\1/%'
 changequote([,])dnl
       sub_uncdir='s%\\%/%g'
       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
-        ac_prog=`echo $ac_prog| sed "s%$re_direlt%\1%g"`
+        ac_prog=`echo $ac_prog| sed "s%$re_direlt%\1%"`
       done
       case "$host_os" in
       cygwin*)
index 0ad5f3faa7163f0ca4be8bf152055a6a583b09fa..bdb356044ac74569494eff51fbbc654329d434b9 100755 (executable)
@@ -868,11 +868,11 @@ if test -z "$LD"; then
     case "$ac_prog" in
     # Accept absolute paths.
     /* | [A-Za-z]:/*)
-      re_direlt='/[^/]*/\.\./'
+      re_direlt='/[^/][^/]*/\.\./'
       sub_uncdrive='s%^\([A-Za-z]\):/%//\1/%'
       # Canonicalize the path of ld
       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
-        ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%g"`
+        ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
       done
       case "$host_os" in
       cygwin*)
@@ -889,12 +889,12 @@ if test -z "$LD"; then
     ##         '\\' path separators.
     ##
     [A-Za-z]:[\\]*)
-      re_direlt='\\[^\\]*\\\.\.\(\\\)'
+      re_direlt='\\[^\\][^\\]*\\\.\.\(\\\)'
       sub_uncdrive='s%^\([A-Za-z]\):\\%//\1/%'
       sub_uncdir='s%\\%/%g'
       # Canonicalize the path of ld
       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
-        ac_prog=`echo $ac_prog| sed "s%$re_direlt%\1%g"`
+        ac_prog=`echo $ac_prog| sed "s%$re_direlt%\1%"`
       done
       case "$host_os" in
       cygwin*)
@@ -1023,14 +1023,14 @@ __dll_entry (HINSTANCE hinst, DWORD reason, LPVOID reserved)
   _impure_ptr = __imp_reent_data;
 }
 ' > ltdll.c
-      archive_cmds='$CC -c '"`pwd`"'/ltdll.c~ echo EXPORTS > $lib.exp~
+      archive_cmds='$CC -c '"`pwd`"'/ltdll.c~echo EXPORTS > $lib.exp~
       if test -z "$export_symbols"; then $NM$libobjs | $global_symbol_pipe | sed '\''s/.* //'\'' > $lib.exp;
-      else cat "$export_symbols" > $lib.exp; fi~\
-      $LD -s --base-file $soname-base --dll -e ___dll_entry@12 -o $lib libtool.$objext$libobjs$deplibs~\
-      $DLLTOOL --as=$AS --dllname $soname --def $lib.exp --base-file $soname-base --output-exp $soname-exp~\
-      $LD -s --base-file $soname-base $soname-exp --dll -e ___dll_entry@12 -o $lib libtool.$objext$libobjs$deplibs~\
-      $DLLTOOL --as=$AS --dllname $soname --def $lib.exp --base-file $soname-base --output-exp $soname-exp~\
-      $LD $soname-exp --dll -e ___dll_entry@12 -o $lib libtool.$objext$libobjs$deplibs~\
+      else cat "$export_symbols" > $lib.exp; fi~
+      $LD -s --base-file $soname-base --dll -e ___dll_entry@12 -o $lib libtool.$objext$libobjs$deplibs~
+      $DLLTOOL --as=$AS --dllname $soname --def $lib.exp --base-file $soname-base --output-exp $soname-exp~
+      $LD -s --base-file $soname-base $soname-exp --dll -e ___dll_entry@12 -o $lib libtool.$objext$libobjs$deplibs~
+      $DLLTOOL --as=$AS --dllname $soname --def $lib.exp --base-file $soname-base --output-exp $soname-exp~
+      $LD $soname-exp --dll -e ___dll_entry@12 -o $lib libtool.$objext$libobjs$deplibs~
       $rm libtool.$objext $soname-base $soname-exp'
       old_archive_from_new_cmds='$DLLTOOL --as=$AS --dllname $soname --def $lib.exp --output-lib $objdir/$libname.a~$rm $lib.exp'
     else
@@ -1119,12 +1119,12 @@ __dll_entry (HINSTANCE hinst, DWORD reason, LPVOID reserved)
 ' > ltdll.c
       archive_cmds='$CC -c '"`pwd`"'/ltdll.c~ echo EXPORTS > $lib.exp~
       if test -z "$export_symbols"; then $NM$libobjs | $global_symbol_pipe | sed '\''s/.* //'\'' > $lib.exp;
-      else cat "$export_symbols" > $lib.exp; fi~\
-      $LD -s --base-file $soname-base --dll -e ___dll_entry@12 -o $lib libtool.$objext$libobjs$deplibs~\
-      $DLLTOOL --as=$AS --dllname $soname --def $lib.exp --base-file $soname-base --output-exp $soname-exp~\
-      $LD -s --base-file $soname-base $soname-exp --dll -e ___dll_entry@12 -o $lib libtool.$objext$libobjs$deplibs~\
-      $DLLTOOL --as=$AS --dllname $soname --def $lib.exp --base-file $soname-base --output-exp $soname-exp~\
-      $LD $soname-exp --dll -e ___dll_entry@12 -o $lib libtool.$objext$libobjs$deplibs~\
+      else cat "$export_symbols" > $lib.exp; fi~
+      $LD -s --base-file $soname-base --dll -e ___dll_entry@12 -o $lib libtool.$objext$libobjs$deplibs~
+      $DLLTOOL --as=$AS --dllname $soname --def $lib.exp --base-file $soname-base --output-exp $soname-exp~
+      $LD -s --base-file $soname-base $soname-exp --dll -e ___dll_entry@12 -o $lib libtool.$objext$libobjs$deplibs~
+      $DLLTOOL --as=$AS --dllname $soname --def $lib.exp --base-file $soname-base --output-exp $soname-exp~
+      $LD $soname-exp --dll -e ___dll_entry@12 -o $lib libtool.$objext$libobjs$deplibs~
       $rm libtool.$objext $soname-base $soname-exp'
       old_archive_from_new_cmds='$DLLTOOL --as=$AS --dllname $soname --def $lib.exp --output-lib $objdir/$libname.a~$rm $lib.exp'
     else