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 '/'.
[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.
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*)
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*)
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*)
## '\\' 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*)
_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
' > 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