From 4094b9622fb851c9932107d4384bfb3e8da25ebb Mon Sep 17 00:00:00 2001 From: "Gary V. Vaughan" Date: Wed, 3 Feb 1999 11:11:03 +0000 Subject: [PATCH] * 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. --- ChangeLog | 12 +++++ ltconfig.in | 123 +++++++++++++++++----------------------------------- ltmain.in | 10 ++--- 3 files changed, 57 insertions(+), 88 deletions(-) diff --git a/ChangeLog b/ChangeLog index 95dc9b436..c1ea6783d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +1999-02-02 Gary V. Vaughan + + * 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-26 Gary V. Vaughan * configure.in: It seems Alexandre accidentally removed the diff --git a/ltconfig.in b/ltconfig.in index 4d00f4981..0e566f545 100755 --- a/ltconfig.in +++ b/ltconfig.in @@ -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. ;; @@ -1016,6 +1016,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 @@ -1047,15 +1056,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~ @@ -1066,7 +1073,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' - 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~ @@ -1077,25 +1084,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' - 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 `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 + old_archive_from_new_cmds='$DLLTOOL --as=$AS --dllname $soname --def $objdir/$soname-def --output-lib $objdir/$libname.a' ;; *) @@ -1165,54 +1154,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~ - $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~ - $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' - - 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~ - $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~ - $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' - - 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 `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 `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*) @@ -1425,7 +1382,7 @@ case "$host_os" in aix*) symcode='[BCDT]' ;; -cygwin32* | mingw32*) +cygwin* | mingw*) symcode='[ABCDGISTW]' ;; irix*) @@ -1651,7 +1608,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' @@ -2041,10 +1998,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. diff --git a/ltmain.in b/ltmain.in index 8f3534d4f..0ec5361c5 100644 --- a/ltmain.in +++ b/ltmain.in @@ -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 @@ -847,7 +847,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 @@ -1395,7 +1395,7 @@ compiler." fi case "$host" in - *-*-cygwin32* | *-*-mingw32* | *-*-os2*) + *-*-cygwin* | *-*-mingw* | *-*-os2*) # these systems don't actually have a c library (as such)! ;; *) @@ -2073,7 +2073,7 @@ EOF if test "$hardcode_direct" = no; then compile_command="$compile_command $dir/$linklib" case "$host" in - *-*-cygwin32* | *-*-mingw32* | *-*-os2*) + *-*-cygwin* | *-*-mingw* | *-*-os2*) compile_dependencylibs="$compile_dependencylibs -L$dir -l$name" dllsearchdir=`cd "$dir" && pwd || echo "$dir"` if test -n "$dllsearchpath"; then @@ -2737,7 +2737,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 "\ -- 2.47.2