From: Gary V. Vaughan Date: Sun, 3 Mar 2002 03:19:55 +0000 (+0000) Subject: * NEWS: Updated. X-Git-Tag: release-1-5~132 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1cf9d2964d8f4ab0584984b35e558fd8b883fc42;p=thirdparty%2Flibtool.git * NEWS: Updated. * THANKS: Added Rob Collins and Chuck Wilson for their cygwin work. From Robert Collins : * configure.ac (AC_EXEEXT): Needed for DOSish systems. * libtool.m4 (shlibpath_overrides_runpath) [cygwin]: Set to yes when compiling with gcc. (lt_prog_compiler_pic) [cygwin]: No longer needs the -DDLL_EXPORT hack, so we just say the pic is the default. (AC_LIBTOOL_PROG_LD_SHLIBS) [cygwin]: Extract symbols from a library normally. [cygwin]: Declare C++ compiler characterisics for g++, taking into account the new auto-import support in cygwin ld. * ltmain.in (specialdeplibs) [cygwin]: Be careful about eliminating duplicate -lgcc's from the link line. [cygwin]: Be smarter about .exe suffixes. * demo/configure.ac (AC_EXEEXT, AC_LIBTOOL_WIN32_DLL): Support DOSish systems properly. * depdemo/configure.ac (AC_EXEEXT, AC_LIBTOOL_WIN32_DLL): Ditto. * demo/Makefile.am (deplibs-check): Allow for .exe suffix. Use hell_static instead of hell.static for multi-`.' inhibited OSes. * tests/demo-exec.test: Ditto. * tests/demo-inst.test: Ditto. * demo/foo.h [cygwin]: Sanitize cygwin dll support. * demo/foo.c (_LIBFOO_COMPILATION_): No longer required. * demo/hello.c (_LIBFOO_COMPILATION_): Ditto. * depdemo/Makefile.am (bin_PROGRAMS): Use depdemo_static instead of depdemo.static for multi-`.' inhibited OSes. * tests/depdemo-exec.test: Ditto. * tests/depdemo-inst.test: Ditto. * mdemo/Makefile.am (bin_PROGRAMS): Ditto for mdemo.static. * tests/dryrun.test: Ditto. * tests/mdemo-exec.test: Ditto. * tests/mdemo-inst.test: Ditto. * tests/build-relink.test: Be careful about possible .exe suffixes. * tests/noinst-link.test: Allow for .exe suffix. --- diff --git a/ChangeLog b/ChangeLog index 556b6c424..e417907b1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,44 @@ +2002-02-09 Gary V. Vaughan + + * NEWS: Updated. + * THANKS: Added Rob Collins and Chuck Wilson for their cygwin + work. + + From Robert Collins : + * configure.ac (AC_EXEEXT): Needed for DOSish systems. + * libtool.m4 (shlibpath_overrides_runpath) [cygwin]: Set to yes + when compiling with gcc. + (lt_prog_compiler_pic) [cygwin]: No longer needs the -DDLL_EXPORT + hack, so we just say the pic is the default. + (AC_LIBTOOL_PROG_LD_SHLIBS) [cygwin]: Extract symbols from a + library normally. + [cygwin]: Declare C++ compiler characterisics for g++, taking into + account the new auto-import support in cygwin ld. + * ltmain.in (specialdeplibs) [cygwin]: Be careful about + eliminating duplicate -lgcc's from the link line. + [cygwin]: Be smarter about .exe suffixes. + * demo/configure.ac (AC_EXEEXT, AC_LIBTOOL_WIN32_DLL): Support + DOSish systems properly. + * depdemo/configure.ac (AC_EXEEXT, AC_LIBTOOL_WIN32_DLL): Ditto. + * demo/Makefile.am (deplibs-check): Allow for .exe suffix. Use + hell_static instead of hell.static for multi-`.' inhibited OSes. + * tests/demo-exec.test: Ditto. + * tests/demo-inst.test: Ditto. + * demo/foo.h [cygwin]: Sanitize cygwin dll support. + * demo/foo.c (_LIBFOO_COMPILATION_): No longer required. + * demo/hello.c (_LIBFOO_COMPILATION_): Ditto. + * depdemo/Makefile.am (bin_PROGRAMS): Use depdemo_static instead + of depdemo.static for multi-`.' inhibited OSes. + * tests/depdemo-exec.test: Ditto. + * tests/depdemo-inst.test: Ditto. + * mdemo/Makefile.am (bin_PROGRAMS): Ditto for mdemo.static. + * tests/dryrun.test: Ditto. + * tests/mdemo-exec.test: Ditto. + * tests/mdemo-inst.test: Ditto. + * tests/build-relink.test: Be careful about possible .exe + suffixes. + * tests/noinst-link.test: Allow for .exe suffix. + 2002-02-07 Alexandre Oliva Reverted incorrect patch: diff --git a/NEWS b/NEWS index 38125a6d3..739a4fa9f 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,10 @@ NEWS - list of user-visible changes between releases of GNU Libtool +New in 1.4f: 2002-??-??; CVS version 1.4e, Libtool team: +* Support auto-import patch to binutils on cygwin for much improved dll + support. +* Bug fixes. + New in 1.4d: 2002-01-07; CVS version 1.4c, Libtool team: * Help strings display correctly again. * Better error messages when library linking fails. @@ -148,7 +153,7 @@ New in 1.3: 1999-04-29, Libtool team: New in CVS version 1.2g, Libtool team: * AM_PROG_LIBTOOL is smaller and faster -* AC_LIBTOOL_WIN32_DLL is required in configure.in for libtool to +* AC_LIBTL_L_WIN32_DLL is required in configure.in for libtool to attempt to build dlls on win32 hosts * Shared libraries on AmigaOS up to version 4 are now disabled since they don't meet libtool's requirements for shared libraries @@ -255,7 +260,7 @@ New in 1.2a - 1998-04-19, Gordon Matzigkeit: New in 1.2 - 1998-03-20, Gordon Matzigkeit: * Minor bug fixes to provide a stable public release. -* Libtool no longer causes Solaris printf to barf due to silly +* Libtool no longer cseses Solaris printf to barf due to silly 2110-byte static buffers. New in 1.1 - 1998-03-08, Gordon Matzigkeit: diff --git a/THANKS b/THANKS index cd97d3589..6719164de 100644 --- a/THANKS +++ b/THANKS @@ -15,6 +15,7 @@ Albert Chin-A-Young Andrey Slepuhin Bruno Haible Carl D. Roth +Charles S. Wilson Chris P. Ross DJ Delorie Edouard G. Parmelan @@ -32,10 +33,11 @@ Mark Kettenis Ossama Othman Olly Betts Pavel Roskin +Robert Collins Sebastian Wilhelmi Stephan Kulow Steven M. Schultz Todd Vierling -Tom Tromey +Tom Tmemey Ulrich Drepper Xavier Pianet diff --git a/configure.ac b/configure.ac index 0292f5e7e..607a75085 100644 --- a/configure.ac +++ b/configure.ac @@ -95,6 +95,7 @@ AC_SUBST([DIST_MAKEFILE_LIST]) # Use the specified CC and LD AC_PROG_CC +AC_EXEEXT AM_PROG_LD AC_SUBST(LD) AM_PROG_NM diff --git a/demo/Makefile.am b/demo/Makefile.am index 9c58735d4..08eb0895c 100644 --- a/demo/Makefile.am +++ b/demo/Makefile.am @@ -18,7 +18,7 @@ else BUILD_helldl = endif -bin_PROGRAMS = hell hell.static $(BUILD_helldl) +bin_PROGRAMS = hell hell_static $(BUILD_helldl) # Build hell from main.c and libhello.la hell_SOURCES = main.c @@ -137,4 +137,4 @@ hell0_LDADD = libhell1.la libhell2.la $(LIBM) CLEANFILES += $(EXTRA_LIBRARIES) $(EXTRA_LTLIBRARIES) $(EXTRA_PROGRAMS) -deplibs-check: hell0 +deplibs-check: hell0$(EXEEXT) diff --git a/demo/configure.ac b/demo/configure.ac index d420d409c..89c98a074 100644 --- a/demo/configure.ac +++ b/demo/configure.ac @@ -37,12 +37,14 @@ AM_INIT_AUTOMAKE(AC_PACKAGE_TARNAME, AC_PACKAGE_VERSION) ## ---------------- ## AC_PROG_CC AC_C_CONST +AC_EXEEXT ## ----------------------- ## ## Libtool initialisation. ## ## ----------------------- ## AC_LIBTOOL_DLOPEN +AC_LIBTOOL_WIN32_DLL AM_PROG_LIBTOOL AC_SUBST([LIBTOOL_DEPS]) diff --git a/demo/foo.c b/demo/foo.c index 4b6773997..55fa9d973 100644 --- a/demo/foo.c +++ b/demo/foo.c @@ -18,9 +18,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#define _LIBFOO_COMPILATION_ #include "foo.h" -#undef _LIBFOO_COMPILATION_ #include diff --git a/demo/foo.h b/demo/foo.h index 6d4fee709..d1c084f29 100644 --- a/demo/foo.h +++ b/demo/foo.h @@ -24,11 +24,12 @@ USA. */ /* At some point, cygwin will stop defining __CYGWIN32__, but b19 and * earlier do not define __CYGWIN__. This snippit allows us to check - * for __CYGWIN32__ reliably for both old and (probable) future releases. + * for __CYGWIN__ reliably for both current, old, and (probable) future + * releases. */ -#ifdef __CYGWIN__ -# ifndef __CYGWIN32__ -# define __CYGWIN32__ +#ifdef __CYGWIN32__ +# ifndef __CYGWIN__ +# define __CYGWIN__ # endif #endif @@ -49,7 +50,7 @@ USA. */ that don't understand ANSI C prototypes still work, and ANSI C compilers can issue warnings about type mismatches. */ #undef LTDL_PARAMS -#if defined (__STDC__) || defined (_AIX) || (defined (__mips) && defined (_SYSTYPE_SVR4)) || defined(__CYGWIN32__) || defined(__cplusplus) +#if defined (__STDC__) || defined (_AIX) || (defined (__mips) && defined (_SYSTYPE_SVR4)) || defined(__CYGWIN__) || defined(__cplusplus) # define LT_PARAMS(protos) protos # define lt_ptr_t void* #else @@ -57,24 +58,6 @@ USA. */ # define lt_ptr_t char* #endif -#ifdef __CYGWIN32__ -# ifdef LIBFOO_DLL - /* need some (as yet non-existant) automake magic to tell - * the object whether the libfoo it will be linked with is - * a dll or not, ie whether LIBFOO_DLL is defined or not. - */ -# ifdef _LIBFOO_COMPILATION_ -# define EXTERN __declspec(dllexport) -# else -# define EXTERN extern __declspec(dllimport) -# endif -# else -# define EXTERN extern -# endif -#else -# define EXTERN extern -#endif - /* Silly constants that the functions return. */ #define HELLO_RET 0xe110 #define FOO_RET 0xf00 @@ -84,7 +67,7 @@ USA. */ __BEGIN_DECLS int foo LT_PARAMS((void)); int hello LT_PARAMS((void)); -EXTERN int nothing; +extern int nothing; __END_DECLS #endif /* !_FOO_H_ */ diff --git a/demo/hello.c b/demo/hello.c index ec9a639b9..3858528dc 100644 --- a/demo/hello.c +++ b/demo/hello.c @@ -18,9 +18,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ /* Written by Gordon Matzigkeit */ -#define _LIBFOO_COMPILATION #include "foo.h" -#undef _LIBFOO_COMPILATION #include diff --git a/depdemo/Makefile.am b/depdemo/Makefile.am index 64dd58712..2108b7faf 100644 --- a/depdemo/Makefile.am +++ b/depdemo/Makefile.am @@ -6,7 +6,7 @@ SUBDIRS = l1 l2 l3 l4 EXTRA_DIST = sysdep.h -bin_PROGRAMS = depdemo depdemo.static +bin_PROGRAMS = depdemo depdemo_static depdemo_SOURCES = main.c depdemo_LDADD = $(top_builddir)/l1/libl1.la $(top_builddir)/l2/libl2.la \ diff --git a/depdemo/configure.ac b/depdemo/configure.ac index f49c31355..b9c11e0b3 100644 --- a/depdemo/configure.ac +++ b/depdemo/configure.ac @@ -47,11 +47,12 @@ AM_INIT_AUTOMAKE(AC_PACKAGE_TARNAME, AC_PACKAGE_VERSION) ## compiler checks. ## ## ---------------- ## AC_PROG_CC - +AC_EXEEXT ## ----------------------- ## ## Libtool initialisation. ## ## ----------------------- ## +AC_LIBTOOL_WIN32_DLL AM_PROG_LIBTOOL AC_SUBST([LIBTOOL_DEPS]) diff --git a/depdemo/l3/Makefile.am b/depdemo/l3/Makefile.am index 48d88ba58..873fca7e7 100644 --- a/depdemo/l3/Makefile.am +++ b/depdemo/l3/Makefile.am @@ -6,6 +6,6 @@ INCLUDES = -I$(top_srcdir) extradir = $(libdir)/extra -extra_LTLIBRARIES = libl3.la +lib_LTLIBRARIES = libl3.la libl3_la_SOURCES = l3.c l3.h libl3_la_LIBADD = $(top_builddir)/l1/libl1.la $(top_builddir)/l2/libl2.la diff --git a/depdemo/main.c b/depdemo/main.c index 79a929678..ef2458d3a 100644 --- a/depdemo/main.c +++ b/depdemo/main.c @@ -36,7 +36,11 @@ main (argc,argv) if (argc == 2 && strcmp (argv[1], "-alt") == 0 && var_l1 + var_l2 + var_l4 == 8) return 0; + printf("var_l1(%d) + var_l2(%d) + var_l4(%d) == %d\n",var_l1,var_l2,var_l4, var_l1 + var_l2 + var_l4); if (var_l1 + var_l2 + var_l4 != 20) + { + printf("var_l1(%d) + var_l2(%d) + var_l4(%d) != 20\n",var_l1,var_l2,var_l4); return 1; + } return 0; } diff --git a/libltdl/ltdl.c b/libltdl/ltdl.c index b277fe911..326e690ec 100644 --- a/libltdl/ltdl.c +++ b/libltdl/ltdl.c @@ -911,8 +911,8 @@ lt_estrdup (str) /* --- DLOPEN() INTERFACE LOADER --- */ -/* The Cygwin dlopen implementation prints a spurious error message to - stderr if its call to LoadLibrary() fails for any reason. We can +/* Older Cygwin dlopen implementations print a spurious error message to + stderr if the call to LoadLibrary() fails for any reason. We can mitigate this by not using the Cygwin implementation, and falling back to our own LoadLibrary() wrapper. */ #if HAVE_LIBDL && !defined(__CYGWIN__) diff --git a/libtool.m4 b/libtool.m4 index 497f70889..0da733836 100644 --- a/libtool.m4 +++ b/libtool.m4 @@ -1085,6 +1085,7 @@ cygwin* | mingw* | pw32*) postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' + shlibpath_overrides_runpath=yes ;; yes,mingw*) library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll' @@ -2547,6 +2548,27 @@ case $host_os in ;; esac ;; + + cygwin*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_AC_TAGVAR(always_export_symbols, $1)=yes + + if $LD --help 2>&1 | egrep 'auto-import' > /dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}-retain-symbols-file $wl$export_symbols ${wl}--out-implib,$lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + mingw* | pw32*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + dgux*) case $cc_basename in ec++) @@ -3921,10 +3943,10 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) # like `-m68040'. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; - cygwin* | mingw* | os2*) + mingw* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' @@ -4156,11 +4178,11 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; - cygwin* | mingw* | pw32* | os2*) + mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' @@ -4209,7 +4231,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) fi ;; - cygwin* | mingw* | pw32* | os2*) + mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' @@ -4331,7 +4353,7 @@ ifelse([$1],[CXX],[ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' fi ;; - cygwin* | mingw* | pw32*) + mingw* | pw32*) _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; *) @@ -4435,7 +4457,22 @@ EOF fi ;; - cygwin* | mingw* | pw32*) + cygwin*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_AC_TAGVAR(always_export_symbols, $1)=yes + + if $LD --help 2>&1 | egrep 'auto-import' > /dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}-retain-symbols-file $wl$export_symbols ${wl}--out-implib,$lib' + else + ld_shlibs=no + fi + ;; + + mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, as there is # no search path for DLLs. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' @@ -4451,21 +4488,15 @@ EOF _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib' - # cygwin and mingw dlls have different entry points and sets of symbols - # to exclude. # FIXME: what about values for MSVC? dll_entry=__cygwin_dll_entry@12 - dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~ case $host_os in mingw*) # mingw values dll_entry=_DllMainCRTStartup@12 - dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~ ;; esac - # mingw and cygwin differ, and it's simplest to just exclude the union - # of the two symbol sets. dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12 # recent cygwin and mingw systems supply a stub DllMain which the user diff --git a/ltmain.in b/ltmain.in index 89ee68fe5..4cd78958b 100644 --- a/ltmain.in +++ b/ltmain.in @@ -1635,7 +1635,30 @@ EOF *) linkmode=prog ;; # Anything else should be a program. esac - specialdeplibs= + case $host in + *cygwin*) + # This is a hack, but we run into problems on cygwin. + # libgcc.a depends on libcygwin, but gcc puts -lgcc onto + # the link line twice: once before the "normal" libs + # (-lcygwin -luser32 -lkernel32 -ladvapi32 -lshell32) and + # once AFTER those. However, the "eliminate dup deps" + # proceedure keeps only the LAST duplicate -- thus + # messing up the order, since after dup elimination + # -lgcc comes AFTER -lcygwin. In normal C operation, + # you don't notice the problem, because -lgcc isn't + # really used. However, now that C++ libraries are + # libtool-able, you DO see the problem. So, it must + # be fixed. We could always force "--preserve-dup-deps" + # but that could lead to other problems. So, on cygwin, + # always preserve dups of -lgcc...but only -lgcc. That + # way, the dependency order won't get corrupted. + specialdeplibs="-lgcc" + ;; + *) + specialdeplibs= + ;; + esac + libs= # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) @@ -4052,7 +4075,9 @@ static const void *lt_preloaded_setup() { esac # test for cygwin because mv fails w/o .exe extensions case $host in - *cygwin*) exeext=.exe ;; + *cygwin*) + exeext=.exe + outputname=`echo $outputname|${SED} 's,.exe$,,'` ;; *) exeext= ;; esac $rm $output @@ -4786,6 +4811,19 @@ relink_command=\"$relink_command\"" destfile="$destdir/$destfile" fi + # If the file is missing, and there is a .exe on the end, strip it + # because it is most likely a libtool script we actually want to + # install + stripped_ext="" + case $file in + *.exe) + if test ! -f "$file"; then + file=`echo $file|${SED} 's,.exe$,,'` + stripped_ext=".exe" + fi + ;; + esac + # Do a test to see if this is really a libtool program. case $host in *cygwin*|*mingw*) @@ -4847,7 +4885,7 @@ relink_command=\"$relink_command\"" $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2 continue fi - file=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'` outputname="$tmpdir/$file" # Replace the output file specification. relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` @@ -4865,7 +4903,7 @@ relink_command=\"$relink_command\"" fi else # Install the binary that we compiled earlier. - file=`$echo "X$file" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` + file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` fi fi diff --git a/mdemo/Makefile.am b/mdemo/Makefile.am index e89982ba1..fe8866e3e 100644 --- a/mdemo/Makefile.am +++ b/mdemo/Makefile.am @@ -21,7 +21,7 @@ libsub_la_LDFLAGS = -no-undefined noinst_HEADERS = foo.h -bin_PROGRAMS = mdemo mdemo.static +bin_PROGRAMS = mdemo mdemo_static ## use @LIBLTDL@ because some broken makes do not accept macros in targets ## we can only do this because our LIBLTDL does not contain ${top_builddir} diff --git a/tests/build-relink.test b/tests/build-relink.test index 00427703e..ce4872341 100755 --- a/tests/build-relink.test +++ b/tests/build-relink.test @@ -105,8 +105,8 @@ if test "x$hardcode_action" = xrelink; then fi if test "$shlibpath_overrides_runpath" != yes; then - rm -f $objdir/lt-hell || exit 1 - cp $objdir/hell $objdir/lt-hell || exit 1 + rm -f $objdir/lt-hell$EXEEXT || exit 1 + cp $objdir/hell$EXEEXT $objdir/lt-hell$EXEEXT || exit 1 echo "running ../demo/hell with installed libhello.la" if ./hell; then echo "Worked, as expected" @@ -114,7 +114,7 @@ if test "$shlibpath_overrides_runpath" != yes; then echo "shlibpath_overrides_runpath should be set to yes" status=1 fi - rm -f $objdir/lt-hell + rm -f $objdir/lt-hell$EXEEXT fi exit $status diff --git a/tests/demo-exec.test b/tests/demo-exec.test index 0980d5a6d..6e43ee502 100755 --- a/tests/demo-exec.test +++ b/tests/demo-exec.test @@ -20,9 +20,9 @@ fi echo "Executing uninstalled programs in ../demo" status=0 -if ../demo/hell.static| grep 'Welcome to GNU Hell'; then : +if ../demo/hell_static| grep 'Welcome to GNU Hell'; then : else - echo "$0: cannot execute ../demo/hell.static" 1>&2 + echo "$0: cannot execute ../demo/hell_static" 1>&2 status=1 fi diff --git a/tests/demo-inst.test b/tests/demo-inst.test index da47fc5d1..bd416bc9e 100755 --- a/tests/demo-inst.test +++ b/tests/demo-inst.test @@ -25,9 +25,9 @@ $make install || exit 1 echo "= Executing installed programs" status=0 -if $prefix/bin/hell.static | grep 'Welcome to GNU Hell'; then : +if $prefix/bin/hell_static | grep 'Welcome to GNU Hell'; then : else - echo "$0: cannot execute $prefix/bin/hell.static" 1>&2 + echo "$0: cannot execute $prefix/bin/hell_static" 1>&2 status=1 fi diff --git a/tests/depdemo-exec.test b/tests/depdemo-exec.test index 16bc4c152..dabc06e51 100755 --- a/tests/depdemo-exec.test +++ b/tests/depdemo-exec.test @@ -20,9 +20,9 @@ fi echo "Executing uninstalled programs in ../depdemo" status=0 -if ../depdemo/depdemo.static; then : +if ../depdemo/depdemo_static; then : else - echo "$0: cannot execute ../depdemo/depdemo.static" 1>&2 + echo "$0: cannot execute ../depdemo/depdemo_static" 1>&2 status=1 fi diff --git a/tests/depdemo-inst.test b/tests/depdemo-inst.test index 2c666deea..7a379cfa8 100755 --- a/tests/depdemo-inst.test +++ b/tests/depdemo-inst.test @@ -26,9 +26,9 @@ $make install || exit 1 echo "= Executing installed programs" status=0 -if $prefix/bin/depdemo.static; then : +if $prefix/bin/depdemo_static; then : else - echo "$0: cannot execute $prefix/bin/depdemo.static" 1>&2 + echo "$0: cannot execute $prefix/bin/depdemo_static" 1>&2 status=1 fi diff --git a/tests/dryrun.test b/tests/dryrun.test index c1830fd71..269501020 100755 --- a/tests/dryrun.test +++ b/tests/dryrun.test @@ -66,12 +66,12 @@ $make foo1.la libfoo2.la || exit 1 echo "= Making programs in ../mdemo (dry run)" ls -l . $objdir > $before -force_dry_run=yes $make mdemo$EXEEXT mdemo.static 1>&2 || exit $? +force_dry_run=yes $make mdemo$EXEEXT mdemo_static$EXEEXT 1>&2 || exit $? ls -l . $objdir > $after cmp $before $after > /dev/null || exit 1 # Now really make them echo "= Making programs in ../mdemo" -$make mdemo$EXEEXT mdemo.static || exit 1 +$make mdemo$EXEEXT mdemo_static$EXEEXT || exit 1 echo "= Running $make install in ../mdemo (dry run)" # Libtool does not create these directories @@ -89,7 +89,7 @@ $make install || exit 1 echo "= Running $make uninstall in ../mdemo (dry run)" # Libtool does not uninstall the programs, remove them first -rm -f $prefix/bin/mdemo$EXEEXT $prefix/bin/mdemo.static +rm -f $prefix/bin/mdemo$EXEEXT $prefix/bin/mdemo_static$EXEEXT ls -l . $objdir > $before ls -lR $prefix >> $before force_dry_run=yes $make uninstall 1>&2 || exit $? diff --git a/tests/mdemo-exec.test b/tests/mdemo-exec.test index 25fc7d837..c0969b549 100755 --- a/tests/mdemo-exec.test +++ b/tests/mdemo-exec.test @@ -20,9 +20,9 @@ fi echo "Executing uninstalled programs in ../mdemo" status=0 -if ../mdemo/mdemo.static ../mdemo/foo1.la ../mdemo/libfoo2.la; then : +if ../mdemo/mdemo_static ../mdemo/foo1.la ../mdemo/libfoo2.la; then : else - echo "$0: execution of ../mdemo/mdemo.static failed" 1>&2 + echo "$0: execution of ../mdemo/mdemo_static failed" 1>&2 status=1 fi diff --git a/tests/mdemo-inst.test b/tests/mdemo-inst.test index d0a748ab9..d7f944d89 100755 --- a/tests/mdemo-inst.test +++ b/tests/mdemo-inst.test @@ -26,9 +26,9 @@ $make install || exit 1 echo "= Executing installed programs" status=0 -if $prefix/bin/mdemo.static $prefix/lib/foo1.la $prefix/lib/libfoo2.la; then : +if $prefix/bin/mdemo_static $prefix/lib/foo1.la $prefix/lib/libfoo2.la; then : else - echo "$0: cannot execute $prefix/bin/mdemo.static" 1>&2 + echo "$0: cannot execute $prefix/bin/mdemo_static" 1>&2 status=1 fi diff --git a/tests/noinst-link.test b/tests/noinst-link.test index bf20848f3..edf3c3fb9 100755 --- a/tests/noinst-link.test +++ b/tests/noinst-link.test @@ -22,14 +22,14 @@ fi cd ../demo || exit 77 echo "removing libhello.la and hell from ../demo" -rm -f libhello.la hell +rm -f libhello.la hell$EXEEXT echo "linking hell with a broken ../demo/libhello.la" -if $make hell libhello_la_OBJECTS=hello.lo; then +if $make hell$EXEEXT libhello_la_OBJECTS=hello.lo; then echo "= Succeeded: this means the installed library was used, which is wrong" status=1 fi -rm -f libhello.la hell +rm -f libhello.la hell$EXEEXT exit $status