mirror of
git://git.savannah.gnu.org/libtool.git
synced 2025-02-17 15:10:02 +08:00
require AC_CANONICAL_HOST for path canonicalization
This commit is contained in:
parent
0e672b6be3
commit
ad3e928936
@ -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 '/'.
|
||||
|
12
libtool.m4
vendored
12
libtool.m4
vendored
@ -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*)
|
||||
|
34
ltconfig.in
34
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
|
||||
|
Loading…
Reference in New Issue
Block a user