* ltconfig.in: new config.guess returns *-*-cygwin now instead of

*-*-cygwin32.  sed -e 's%(cygwin|mingw)32%1%g' ltconfig.in
* ltmain.in:   sed -e 's%(cygwin|mingw)32%1%g' ltmain.in

* ltconfig.in (hardcode_libdir_flag_spec, allow_undefined_flag,
archive_cmds, archive_sym_cmds, old_archive_from_new_cmds):
removed duplication of config by assuming that `test $with_gcc =
yes' implies gnu ld, otherwise MSVC++ (which I haven't tested
since I inheritted the code from Ian Lance Taylor btw!) is implied.
This commit is contained in:
Alexandre Oliva 1999-02-03 11:34:52 +00:00 committed by Gary V. Vaughan
parent b579b04417
commit 3fe7947205
3 changed files with 56 additions and 87 deletions

View File

@ -3,6 +3,18 @@
* ltdl.c (lt_dlopenext): tmp would be trashed if shlib_ext was
longer than 3 characters
1999-02-02 Gary V. Vaughan <gvaughan@oranda.demon.co.uk>
* ltconfig.in: new config.guess returns *-*-cygwin now instead of
*-*-cygwin32. sed -e 's%\(cygwin\|mingw\)32%\1%g' ltconfig.in
* ltmain.in: sed -e 's%\(cygwin\|mingw\)32%\1%g' ltmain.in
* ltconfig.in (hardcode_libdir_flag_spec, allow_undefined_flag,
archive_cmds, archive_sym_cmds, old_archive_from_new_cmds):
removed duplication of config by assuming that `test $with_gcc =
yes' implies gnu ld, otherwise MSVC++ (which I haven't tested
since I inheritted the code from Ian Lance Taylor btw!) is implied.
1999-01-28 Gary V. Vaughan <gvaughan@oranda.demon.co.uk>
* ltmain.in: Reverted this change of Alexandre's from the

View File

@ -464,7 +464,7 @@ if test -n "$RANLIB"; then
old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
fi
# Set sane defaults for `DLLTOOL' and `AS', used on cygwin32.
# Set sane defaults for `DLLTOOL' and `AS', used on cygwin.
test -z "$DLLTOOL" && DLLTOOL=dlltool
test -z "$AS" && AS=as
@ -603,7 +603,7 @@ if test "$with_gcc" = yes; then
# we not sure about C++ programs.
link_static_flag="$link_static_flag ${wl}-lC"
;;
cygwin32* | mingw32* | os2*)
cygwin* | mingw* | os2*)
# We can build DLLs from non-PIC.
;;
amigaos*)
@ -637,7 +637,7 @@ else
# PIC (with -KPIC) is the default.
;;
cygwin32* | mingw32* | os2*)
cygwin* | mingw* | os2*)
# We can build DLLs from non-PIC.
;;
@ -1017,6 +1017,15 @@ aix3* | aix4*)
# On AIX, the GNU linker works like the native linker.
with_gnu_ld=no
;;
cygwin* | mingw*)
# FIXME: the MSVC++ port hasn't been tested in a loooong time
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++.
if test "$with_gcc" != yes; then
with_gnu_ld=no
fi
;;
esac
ld_shlibs=yes
@ -1048,15 +1057,13 @@ if test "$with_gnu_ld" = yes; then
fi
;;
cygwin32* | mingw32*)
if test "$with_gcc" = yes; then
# hardcode_libdir_flag_spec is actually meaningless, as there is
# no search path for DLLs.
hardcode_libdir_flag_spec='-L$libdir'
allow_undefined_flag=unsupported
# Very, very bogus.
cygwin* | mingw*)
# hardcode_libdir_flag_spec is actually meaningless, as there is
# no search path for DLLs.
hardcode_libdir_flag_spec='-L$libdir'
allow_undefined_flag=unsupported
archive_cmds='rm -f $objdir/$soname-ltdll.c~
archive_cmds='rm -f $objdir/$soname-ltdll.c~
sed -e "/^# \/\* ltdll.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $objdir/$soname-ltdll.c~
(cd $objdir && $CC -c $soname-ltdll.c)~
echo EXPORTS > $objdir/$soname-def~
@ -1067,7 +1074,7 @@ if test "$with_gnu_ld" = yes; then
$DLLTOOL --as=$AS --dllname $soname --exclude-symbol=_cygwin_dll_entry@12 --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~
$CC $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts'
archive_sym_cmds='rm -f $objdir/$soname-ltdll.c~
archive_sym_cmds='rm -f $objdir/$soname-ltdll.c~
sed -e "/^# \/\* ltdll.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $objdir/$soname-ltdll.c~
(cd $objdir && $CC -c $soname-ltdll.c)~
echo EXPORTS > $objdir/$soname-def~
@ -1079,24 +1086,6 @@ if test "$with_gnu_ld" = yes; then
$CC $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts'
old_archive_from_new_cmds='$DLLTOOL --as=$AS --dllname $soname --def $objdir/$soname-def --output-lib $objdir/$libname.a'
else
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++.
with_gnu_ld=no
# hardcode_libdir_flag_spec is actually meaningless, as there is
# no search path for DLLs.
hardcode_libdir_flag_spec=' '
allow_undefined_flag=unsupported
# Tell ltmain to make .lib files, not .a files.
libext=lib
# FIXME: Setting linknames here is a bad hack.
archive_cmds='$CC -o $lib $libobjs $linkopts `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
# The linker will automatically build a .lib file if we build a DLL.
old_archive_from_new_cmds='true'
# FIXME: Should let the user specify the lib program.
old_archive_cmds='lib /OUT:$oldlib$oldobjs'
fix_srcfile_path='`cygpath -w $srcfile`'
fi
;;
*)
@ -1166,54 +1155,22 @@ else
hardcode_minus_L=yes
;;
cygwin32* | mingw32*)
if test "$with_gcc" = yes; then
# hardcode_libdir_flag_spec is actually meaningless, as there is
# no search path for DLLs.
hardcode_libdir_flag_spec='-L$libdir'
allow_undefined_flag=unsupported
# Very, very bogus.
archive_cmds='rm -f $objdir/$soname-ltdll.c~
sed -e "/^# \/\* ltdll.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $objdir/$soname-ltdll.c~
(cd $objdir && $CC -c $soname-ltdll.c)~
echo EXPORTS > $objdir/$soname-def~
$DLLTOOL --export-all --output-def $objdir/$soname-def $objdir/$soname-ltdll.$objext $libobjs~
$CC -Wl,--base-file,$objdir/$soname-base -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts~
$DLLTOOL --as=$AS --dllname $soname --exclude-symbol=_cygwin_dll_entry@12 --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~
$CC -Wl,--base-file,$objdir/$soname-base $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts~
$DLLTOOL --as=$AS --dllname $soname --exclude-symbol=_cygwin_dll_entry@12 --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~
$CC $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts'
archive_sym_cmds='rm -f $objdir/$soname-ltdll.c~
sed -e "/^# \/\* ltdll.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $objdir/$soname-ltdll.c~
(cd $objdir && $CC -c $soname-ltdll.c)~
echo EXPORTS > $objdir/$soname-def~
cat "$export_symbols" >> $objdir/$soname-def~
$CC -Wl,--base-file,$objdir/$soname-base -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts~
$DLLTOOL --as=$AS --dllname $soname --exclude-symbol=_cygwin_dll_entry@12 --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~
$CC -Wl,--base-file,$objdir/$soname-base $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts~
$DLLTOOL --as=$AS --dllname $soname --exclude-symbol=_cygwin_dll_entry@12 --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~
$CC $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts'
old_archive_from_new_cmds='$DLLTOOL --as=$AS --dllname $soname --def $objdir/$soname-def --output-lib $objdir/$libname.a'
else
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++.
# hardcode_libdir_flag_spec is actually meaningless, as there is
# no search path for DLLs.
hardcode_libdir_flag_spec=' '
allow_undefined_flag=unsupported
# Tell ltmain to make .lib files, not .a files.
libext=lib
# FIXME: Setting linknames here is a bad hack.
archive_cmds='$CC -o $lib $libobjs $linkopts `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
# The linker will automatically build a .lib file if we build a DLL.
old_archive_from_new_cmds='true'
# FIXME: Should let the user specify the lib program.
old_archive_cmds='lib /OUT:$oldlib$oldobjs'
fix_srcfile_path='`cygpath -w $srcfile`'
fi
cygwin* | mingw*)
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++.
# hardcode_libdir_flag_spec is actually meaningless, as there is
# no search path for DLLs.
hardcode_libdir_flag_spec=' '
allow_undefined_flag=unsupported
# Tell ltmain to make .lib files, not .a files.
libext=lib
# FIXME: Setting linknames here is a bad hack.
archive_cmds='$CC -o $lib $libobjs $linkopts `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
# The linker will automatically build a .lib file if we build a DLL.
old_archive_from_new_cmds='true'
# FIXME: Should let the user specify the lib program.
old_archive_cmds='lib /OUT:$oldlib$oldobjs'
fix_srcfile_path='`cygpath -w $srcfile`'
;;
freebsd1*)
@ -1426,7 +1383,7 @@ case "$host_os" in
aix*)
symcode='[BCDT]'
;;
cygwin32* | mingw32*)
cygwin* | mingw*)
symcode='[ABCDGISTW]'
;;
irix*)
@ -1652,7 +1609,7 @@ bsdi4*)
sys_lib_search_path="/shlib /usr/lib /usr/local/lib"
;;
cygwin32* | mingw32*)
cygwin* | mingw*)
version_type=windows
if test "$with_gcc" = yes; then
library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.a'
@ -2045,10 +2002,10 @@ LN_S=$LN_S
# A BSD-compatible nm program.
NM=$NM
# Used on cygwin32: DLL creation program.
# Used on cygwin: DLL creation program.
DLLTOOL="$DLLTOOL"
# Used on cygwin32: assembler.
# Used on cygwin: assembler.
AS="$AS"
# The name of the directory that contains temporary libtool files.

View File

@ -608,7 +608,7 @@ compiler."
C_compiler="$CC" # save it, to compile generated C sources
CC="$nonopt"
case "$host" in
*-*-cygwin32* | *-*-mingw32* | *-*-os2*)
*-*-cygwin* | *-*-mingw* | *-*-os2*)
# It is impossible to link a dll without this setting, and
# we shouldn't force the makefile maintainer to figure out
# which system we are compiling for in order to pass an extra
@ -844,7 +844,7 @@ compiler."
deplibs="$deplibs $arg"
lib_search_path="$lib_search_path `expr $arg : '-L\(.*\)'`"
case "$host" in
*-*-cygwin32* | *-*-mingw32* | *-*-os2*)
*-*-cygwin* | *-*-mingw* | *-*-os2*)
dllsearchdir="`expr $arg : '-L\(.*\)'`"
dllsearchdir=`cd "$dllsearchdir" && pwd || echo "$dllsearchdir"`
if test -n "$dllsearchpath"; then
@ -1163,7 +1163,7 @@ compiler."
compile_command="$compile_command $dir/$linklib"
deplibs="$deplibs $dir/$linklib"
case "$host" in
*-*-cygwin32* | *-*-mingw32* | *-*-os2*)
*-*-cygwin* | *-*-mingw* | *-*-os2*)
dllsearchdir=`cd "$dir" && pwd || echo "$dir"`
if test -n "$dllsearchpath"; then
dllsearchpath="$dllsearchpath:$dllsearchdir"
@ -1563,7 +1563,7 @@ compiler."
dependency_libs="$deplibs"
case "$host" in
*-*-cygwin32* | *-*-mingw32* | *-*-os2*)
*-*-cygwin* | *-*-mingw* | *-*-os2*)
# these systems don't actually have a c library (as such)!
;;
*)
@ -2441,7 +2441,7 @@ else
# Run the actual program with our arguments.
"
case $host in
*-*-cygwin32* | *-*-mingw32 | *-*-os2*)
*-*-cygwin* | *-*-mingw | *-*-os2*)
# win32 systems need to use the prog path for dll
# lookup to work
$echo >> $output "\