From: Gary V. Vaughan Date: Fri, 27 Nov 1998 18:42:12 +0000 (+0000) Subject: require AC_CANONICAL_HOST for path canonicalization X-Git-Tag: autoconf_pre_2-13~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ad3e9289360b5a08a7495e747f191250a2ada062;p=thirdparty%2Flibtool.git require AC_CANONICAL_HOST for path canonicalization --- diff --git a/ChangeLog b/ChangeLog index 0ae69fb7f..3ad70ddc8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 1998-11-27 Gary V. Vaughan + * 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 '/'. diff --git a/libtool.m4 b/libtool.m4 index 0e058d28f..8131e3674 100644 --- a/libtool.m4 +++ b/libtool.m4 @@ -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*) diff --git a/ltconfig.in b/ltconfig.in index 0ad5f3faa..bdb356044 100755 --- a/ltconfig.in +++ b/ltconfig.in @@ -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