libtool-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] GNU Libtool branch, pr-msvc-support, updated. v2.2.6-83-g8c17887


From: Peter Rosin
Subject: [SCM] GNU Libtool branch, pr-msvc-support, updated. v2.2.6-83-g8c17887
Date: Wed, 14 Jan 2009 08:07:55 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Libtool".

The branch, pr-msvc-support has been updated
       via  8c17887ee34e73a2aeb127b94f5b76f45dc34017 (commit)
       via  2817364bb6efd255550192c46edecfe085cbb288 (commit)
       via  06cfce005204bb8ca212aadab38b38c0202ea04e (commit)
       via  fbc144008bd66848111fb8ef2d7293b33957ea1a (commit)
      from  951d28316f365a0e17ae44dc076877da620f3ce8 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 8c17887ee34e73a2aeb127b94f5b76f45dc34017
Author: Peter Rosin <address@hidden>
Date:   Thu Nov 8 10:20:00 1984 +0200

    patch libtool-ar.patch

commit 2817364bb6efd255550192c46edecfe085cbb288
Author: Peter Rosin <address@hidden>
Date:   Mon Apr 3 04:10:00 1995 +0200

    patch embed-manifest-exeext.patch

commit 06cfce005204bb8ca212aadab38b38c0202ea04e
Author: Peter Rosin <address@hidden>
Date:   Sun Sep 20 02:06:40 1998 +0200

    patch msvc-documentation.patch

commit fbc144008bd66848111fb8ef2d7293b33957ea1a
Author: Peter Rosin <address@hidden>
Date:   Sun May 15 21:30:00 1983 +0200

    patch skip-on-no-reload.patch

-----------------------------------------------------------------------

Summary of changes:
 Makefile.am                      |    4 +-
 doc/libtool.texi                 |  159 +++++++++++++++++++++++++++++++++++++-
 libltdl/config/ltmain.m4sh       |   69 ++++++++++++++++
 libltdl/m4/libtool.m4            |   43 ++++++++--
 tests/archive-in-archive.at      |    5 +-
 tests/duplicate_conv.at          |    4 +
 tests/{ltdl-api.at => exeext.at} |   44 +++++++----
 7 files changed, 299 insertions(+), 29 deletions(-)
 copy tests/{ltdl-api.at => exeext.at} (53%)

diff --git a/Makefile.am b/Makefile.am
index 60619a9..f82f265 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -465,6 +465,7 @@ TESTSUITE_AT        = tests/testsuite.at \
                  tests/search-path.at \
                  tests/indirect_deps.at \
                  tests/archive-in-archive.at \
+                 tests/exeext.at \
                  tests/execute-mode.at \
                  tests/infer-tag.at \
                  tests/localization.at \
@@ -497,7 +498,8 @@ EXTRA_DIST     += $(srcdir)/$(TESTSUITE) $(TESTSUITE_AT) 
$(srcdir)/tests/package
 TESTS_ENVIRONMENT = MAKE="$(MAKE)" CC="$(CC)" CFLAGS="$(CFLAGS)" \
        CPP="$(CPP)" CPPFLAGS="$(CPPFLAGS)" LD="$(LD)" LDFLAGS="$(LDFLAGS)" \
        LIBS="$(LIBS)" LN_S="$(LN_S)" NM="$(NM)" RANLIB="$(RANLIB)" \
-       AR="$(AR)" AR_FLAGS="${AR_FLAGS}" AR_SEP="${AR_SEP}" \
+       AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" \
+       LT_AR="$(LT_AR)" LT_ARFLAGS="$(LT_ARFLAGS)" \
        STRIP="$(STRIP)" INSTALL="$(INSTALL)" \
        OBJEXT="$(OBJEXT)" EXEEXT="$(EXEEXT)" \
        SHELL="$(SHELL)" CONFIG_SHELL="$(SHELL)" \
diff --git a/doc/libtool.texi b/doc/libtool.texi
index d304f28..dede669 100644
--- a/doc/libtool.texi
+++ b/doc/libtool.texi
@@ -129,6 +129,7 @@ Invoking @code{libtool}
 * Finish mode::                 Completing a library installation.
 * Uninstall mode::              Removing installed executables and libraries.
 * Clean mode::                  Removing uninstalled executables and libraries.
+* Archive mode::                Portably handle archives.
 
 Integrating libtool with your package
 
@@ -1262,6 +1263,7 @@ by programs libtool invokes, rather than libtool itself.
 * Finish mode::                 Completing a library installation.
 * Uninstall mode::              Removing installed executables and libraries.
 * Clean mode::                  Removing uninstalled executables and libraries.
+* Archive mode::                Portably handle archives.
 @end menu
 
 @node Compile mode
@@ -1662,6 +1664,64 @@ files (typically @command{/bin/rm}).
 The remaining @var{mode-args} are either flags for the deletion program
 (beginning with a @samp{-}), or the names of files to delete.
 
address@hidden Archive mode
address@hidden Archive mode
address@hidden archive mode
address@hidden mode, archive
+
address@hidden mode lets you handle archives portably on systems where
+the archiver is weird. As an example, the Microsoft LIB.EXE archiver
+expects @command{lib -OUT:example.lib some.obj objects.obj}, which is
+impossible to fit into the variables @var{AR} and @var{AR_FLAGS} (note
+that there is no space between @samp{-OUT:} and @file{example.lib}).
+Also, many expect to be able to extract archives with @command{$AR x}
+and list archive content with @command{$AR t}. Again using Microsoft
+LIB.EXE as an example, archive extraction and listing do not always
+work like that (@command{lib -EXTRACT:example.lib} and
address@hidden -LIST example.lib} respectively, note the absent colon
+in the listing command).
+
+Libtool presents the archiver with a limited but common interface
+
address@hidden consist of an archiver command, an archive to operate
+on and possibly a set of object files.
+
+The possible archiver command are
+
address@hidden @option
address@hidden cru @file{archive-file} @address@hidden
+Creates an archive.
+
address@hidden
+ms$ @kbd{libtool --mode=ar cru example.lib some.obj objects.obj}
+libtool: ar: lib -NOLOGO -OUT:example.lib  some.obj objects.obj
+ms$
address@hidden example
+
address@hidden x @file{archive-file}
+Extracts an archive.
+
address@hidden
+ms$ @kbd{libtool --mode=ar x example.lib}
+libtool: ar: (cd . && lib -NOLOGO -EXTRACT:some.obj "example.lib")
+libtool: ar: (cd . && lib -NOLOGO -EXTRACT:objects.obj "example.lib")
+ms$
address@hidden example
+
address@hidden t @file{archive-file}
+Lists the contents of an archive. The libtool option @option{--quiet} is
+useful here, to avoid the first disgnostic line.
+
address@hidden
+ms$ @kbd{libtool --mode=ar x example.lib}
+libtool: ar: lib -NOLOGO -LIST example.lib
+some.obj
+objects.obj
+ms$
address@hidden example
+
address@hidden table
+
 @node Integrating libtool
 @chapter Integrating libtool with your package
 
@@ -5529,7 +5589,7 @@ in cases where it is necessary.
 @node Archivers
 @subsection Archivers
 
-On all known systems, building a static library can be accomplished by
+On all sane systems, building a static library can be accomplished by
 running @kbd{ar cru address@hidden @var{obj1}.o @var{obj2}.o @dots{}},
 where the @samp{.a} file is the output library, and each @samp{.o} file is an
 object file.
@@ -5539,6 +5599,17 @@ must be used to ``bless'' the created library before 
linking against it,
 with the @kbd{ranlib address@hidden command.  Some systems, like Irix,
 use the @code{ar ts} command, instead.
 
+On some not so sane systems (e.g. Windows with MSYS but w/o MinGW @code{ar}
+and instead the Microsoft archiver LIB.EXE), @code{ar cru} obviously does
+not work. Because of those systems, it is more portable to use
address@hidden --mode=ar cru} instead. If you only want to go through the
+libtool script when it is needed, use @code{$(LT_AR) $(LT_ARFLAGS)} in
+Makefile.in, and configure will do the right thing.
+
+On some systems, it is required that you add more flags, e.g. 64-bit AIX
+which needs @code{ar -X64 cru}. Or everything might just be named
+differently, e.g some prefer @code{CC -ar -o} on Irix.
+
 @node libtool script contents
 @section @code{libtool} script contents
 @cindex implementation of libtool
@@ -5572,6 +5643,23 @@ are used within @code{ltmain.sh} (@pxref{Configuring}):
 The name of the system library archiver.
 @end defvar
 
address@hidden AR_FLAGS
+Flags to create an archive.
address@hidden defvar
+
address@hidden AR_TFLAGS
+Flags to list archive content.
address@hidden defvar
+
address@hidden AR_XFLAGS
+Flags to extract files (or a single file, see @var{ar_extract_one_by_one})
+from an archive.
address@hidden defvar
+
address@hidden AR_SEP
+Separator between @var{AR} flags (e.g. @var{AR_TFLAGS}) and @var{AR} files.
address@hidden defvar
+
 @defvar CC
 The name of the compiler used to configure libtool.  This will always
 contain the compiler for the current language (@pxref{Tags}).
@@ -5637,6 +5725,13 @@ using @var{export_symbols_cmds} before linking an 
archive.
 Set to @samp{yes} or @samp{no}.  Default is @samp{no}.
 @end defvar
 
address@hidden ar_extract_one_by_one
+Extract archive members one by one as listed by @var{AR} using the
+option @var{AR_TFLAGS} in case the archiver does not support
+extracting all archive members with the @var{AR_XFLAGS} option.
+Normally @samp{no}, enable with @samp{yes}.
address@hidden defvar
+
 @defvar archive_cmds
 @defvarx archive_expsym_cmds
 @defvarx old_archive_cmds
@@ -5662,6 +5757,10 @@ these commands, libtool will proceed to link against 
@var{$objdir/$newlib}
 instead of @var{soname}.
 @end defvar
 
address@hidden archiver_list_spec
+How to feed a file listing to the archiver.
address@hidden defvar
+
 @defvar build
 @defvarx build_alias
 @defvarx build_os
@@ -5679,6 +5778,11 @@ Whether libtool should build static libraries on this 
system.  Set to
 @samp{yes} or @samp{no}.
 @end defvar
 
address@hidden compile_tag
+Add tag specific option for the compiler. Normally disabled (i.e.
address@hidden is empty).
address@hidden defvar
+
 @defvar compiler_c_o
 Whether the compiler supports the @option{-c} and @option{-o} options
 simultaneously.  Set to @samp{yes} or @samp{no}.
@@ -5691,6 +5795,26 @@ convenience archives or a set of object file names can 
be passed via
 linker-specific options or linker scripts.
 @end defvar
 
address@hidden dashL_envvar
+When linking, move all paths specified with @option{-L} options to
+this variable, for toolchains where it makes sense to pass the library
+search paths in an environment variable. Normally disabled (i.e.
address@hidden empty).
address@hidden defvar
+
address@hidden dashL_envvar_spec
+When moving library search paths with @var{dashL_envvar}, prepend this
+to each @option{-L} path that is added to @var{dashL_envvar}. Unused
+if @var{dashL_envvar} is empty.
address@hidden defvar
+
address@hidden dashl_xform
address@hidden expression for transforming -l options for the linker. The
+input to the @code{sed} instance is the original argument to the
address@hidden option, the output is fed as an arguments to the linker.
+Normally disabled (i.e. @var{dashl_xform} empty).
address@hidden defvar
+
 @defvar dlopen_support
 Whether @code{dlopen} is supported on the platform.
 Set to @samp{yes} or @samp{no}.
@@ -5750,6 +5874,16 @@ and relinking at install time is triggered.  This also 
means that @var{DESTDIR}
 installation does not work as expected.
 @end defvar
 
address@hidden file_magic_glob
+How to find potential files when @var{deplibs_check_method} is
address@hidden @var{file_magic_glob} is a @code{sed} expression,
+and the @code{sed} instance is fed potential files, that is
+transformed by the @var{file_magic_glob} expression. Useful when the
+shell does not support the shell option @code{nocaseglob}, making
address@hidden inappropriate. Normally disabled (i.e.
address@hidden empty).
address@hidden defvar
+
 @defvar finish_cmds
 Commands to tell the dynamic linker how to find shared libraries in a
 specific directory.
@@ -5925,6 +6059,10 @@ Whether files must be locked to prevent conflicts when 
compiling
 simultaneously.  Set to @samp{yes} or @samp{no}.
 @end defvar
 
address@hidden nm_file_list_spec
+Specify filename containing input files for @var{NM}.
address@hidden defvar
+
 @defvar no_builtin_flag
 Compiler flag to disable builtin functions that conflict with declaring
 external global symbols as @code{char}.
@@ -5958,9 +6096,19 @@ Commands run after installing a shared or static 
library, respectively.
 Commands run after uninstalling a shared or static library, respectively.
 @end defvar
 
address@hidden postlink_cmds
+Commands necessary for finishing linking programs. @var{postlink_cmds}
+are executed immediately after the program is linked. Any occurance of
+the string @code{@@OUTPUT@@} in @var{postlink_cmds} is replaced by the
+name of the created executable (i.e. not the wrapper, if a wrapper is
+generated) prior to execution. Normally disabled (i.e.
address@hidden empty).
address@hidden defvar
+
 @defvar reload_cmds
 @defvarx reload_flag
-Commands to create a reloadable object.
+Commands to create a reloadable object. Set @var{reload_cmds} to
address@hidden on systems that cannot create reloadable objects.
 @end defvar
 
 @defvar runpath_var
@@ -6021,6 +6169,13 @@ The library version numbering type.  One of 
@samp{libtool},
 @samp{osf}, @samp{sunos}, @samp{windows}, or @samp{none}.
 @end defvar
 
address@hidden want_nocaseglob
+Find potential files using the shell option @code{nocaseglob} when
address@hidden is @samp{file_magic}. Normally set to
address@hidden, set to @samp{yes} to enable the @code{nocaseglob} shell
+option when looking for potential files.
address@hidden defvar
+
 @defvar whole_archive_flag_spec
 Compiler flag to generate shared objects from convenience archives.
 @end defvar
diff --git a/libltdl/config/ltmain.m4sh b/libltdl/config/ltmain.m4sh
index ae72f47..36dd3fb 100644
--- a/libltdl/config/ltmain.m4sh
+++ b/libltdl/config/ltmain.m4sh
@@ -51,6 +51,7 @@ m4_divert_push([SCRIPT])# @configure_input@
 #
 # MODE must be one of the following:
 #
+#         ar                 handle archives
 #         clean              remove files from the build directory
 #         compile            compile a source file into a libtool object
 #         execute            automatically set library path, then run a program
@@ -249,6 +250,9 @@ func_enable_tag ()
 
   # Shorthand for --mode=foo, only valid as the first argument
   case $1 in
+  ar|a)
+    shift; set dummy --mode ar ${1+"$@"}; shift
+    ;;
   clean|clea|cle|cl)
     shift; set dummy --mode clean ${1+"$@"}; shift
     ;;
@@ -298,6 +302,7 @@ func_enable_tag ()
       --mode)          test "$#" -eq 0 && func_missing_arg "$opt" && break
                        case $1 in
                          # Valid mode arguments:
+                         ar)           ;;
                          clean)        ;;
                          compile)      ;;
                          execute)      ;;
@@ -1061,6 +1066,22 @@ func_mode_help ()
         func_help
         ;;
 
+      ar)
+        $ECHO \
+"Usage: $progname [OPTION]... --mode=ar COMMAND ARCHIVE [OBJECT...]
+
+Create and extract files from archives.
+
+This mode accepts the following archiver COMMANDs:
+
+  cru               create the ARCHIVE, consisting of the given OBJECTs.
+  x                 extract the ARCHIVE
+  t                 list the ARCHIVE content
+
+Note that this mode is not for creating static libtool libraries, it is
+a compatibility layer for \"weird\" archivers."
+        ;;
+
       clean)
         $ECHO \
 "Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
@@ -8223,6 +8244,54 @@ func_mode_uninstall ()
 { test "$mode" = uninstall || test "$mode" = clean; } &&
     func_mode_uninstall ${1+"$@"}
 
+
+# func_mode_ar arg...
+func_mode_ar ()
+{
+    $opt_debug
+    ar_action="$nonopt"
+    archive=
+    files=
+
+    for arg
+    do
+      if test -z "$archive"; then
+        archive=$arg
+      else
+        files="$files $arg"
+      fi
+    done
+
+    test -z "$archive" && \
+      func_fatal_help "you must specify an archive"
+
+    case "$ar_action" in
+    cru)
+      test -z "$files" && \
+       func_fatal_help "you must specify some objects"
+      func_show_eval "$AR $AR_FLAGS$AR_SEP$archive $files" 'exit $?'
+      ;;
+    x)
+      if test "x$ar_extract_one_by_one" = xyes; then
+       func_extract_an_archive . "$archive"
+       exit $?
+      else
+       func_show_eval "$AR $AR_XFLAGS$AR_SEP$archive" 'exit $?'
+      fi
+      ;;
+    t)
+      func_show_eval "$AR $AR_TFLAGS$AR_SEP$archive" 'exit $?'
+      ;;
+    *)
+      func_fatal_help "bad archive action, either cru, x or t"
+      ;;
+    esac
+
+    exit $EXIT_SUCCESS
+}
+
+test "$mode" = ar && func_mode_ar ${1+"$@"}
+
 test -z "$mode" && {
   help="$generic_help"
   func_fatal_help "you must specify a MODE"
diff --git a/libltdl/m4/libtool.m4 b/libltdl/m4/libtool.m4
index ca2bffe..e886d3d 100644
--- a/libltdl/m4/libtool.m4
+++ b/libltdl/m4/libtool.m4
@@ -1320,6 +1320,18 @@ lib)
   ;;
 esac
 
+if test -n "$AR_SEP" &&
+   test "X$AR_TFLAGS" = Xt &&
+   test "X$AR_XFLAGS" = Xx &&
+   test "$ar_extract_one_by_one" = no
+then
+  LT_AR='$(AR)'
+  LT_ARFLAGS='$(AR_FLAGS)'
+else
+  LT_AR='$(SHELL) $(abs_top_builddir)/libtool --quiet --mode=ar'
+  LT_ARFLAGS=cru
+fi
+
 _LT_DECL([], [ar_extract_one_by_one], [1],
   [Extract archive members one by one])
 _LT_DECL([], [archiver_list_spec], [1],
@@ -1329,10 +1341,10 @@ _LT_DECL([], [AR_FLAGS], [1], [Flags to create an 
archive])
 _LT_DECL([], [AR_TFLAGS], [1], [Flags to list archive content])
 _LT_DECL([], [AR_XFLAGS], [1], [Flags to extract an archive])
 _LT_DECL([], [AR_SEP], [1], [Separator between AR flags and AR files])
+AC_SUBST([LT_AR])
+AC_SUBST([LT_ARFLAGS])
 AC_SUBST([AR])
 AC_SUBST([AR_FLAGS])
-AC_SUBST([AR_TFLAGS])
-AC_SUBST([AR_SEP])
 ])# LT_PROG_AR
 
 
@@ -2962,6 +2974,11 @@ case $reload_flag in
 esac
 reload_cmds='$LD$reload_flag -o $output$reload_objs'
 case $host_os in
+  cygwin* | mingw* | pw32* | cegcc*)
+    if test "$GCC" != yes; then
+      reload_cmds=false
+    fi
+    ;;
   darwin*)
     if test "$GCC" = yes; then
       reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
@@ -4769,9 +4786,14 @@ _LT_EOF
        _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
        _LT_TAGVAR(compile_tag, $1)=-TC
        _LT_TAGVAR(dashl_xform, $1)='s/\(.*\)/\1.lib/'
-       _LT_TAGVAR(postlink_cmds, $1)='if test -e "@address@hidden"; then
-           mt -manifest "@address@hidden" -outputresource:"@address@hidden";
-           $RM "@address@hidden";
+       _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
+         case "$lt_outputfile" in
+           *.[[eE][xX][eE]]) ;;
+           *) lt_outputfile="$lt_outputfile.exe" ;;
+         esac~
+         if test -e "$lt_outputfile.manifest"; then
+           mt -manifest "$lt_outputfile.manifest" 
-outputresource:"$lt_outputfile" || exit 1;
+           $RM "$lt_outputfile.manifest";
          fi'
        ;;
       *)
@@ -5776,9 +5798,14 @@ if test "$_lt_caught_CXX_error" != yes; then
          _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
          _LT_TAGVAR(compile_tag, $1)=-TP
          _LT_TAGVAR(dashl_xform, $1)='s/\(.*\)/\1.lib/'
-         _LT_TAGVAR(postlink_cmds, $1)='if test -e "@address@hidden"; then
-             mt -manifest "@address@hidden" -outputresource:"@address@hidden";
-             $RM "@address@hidden";
+         _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
+           case "$lt_outputfile" in
+             *.[[eE][xX][eE]]) ;;
+             *) lt_outputfile="$lt_outputfile.exe" ;;
+           esac~
+           if test -e "$lt_outputfile.manifest"; then
+             mt -manifest "$lt_outputfile.manifest" 
-outputresource:"$lt_outputfile" || exit 1;
+             $RM "$lt_outputfile.manifest";
            fi'
          ;;
        *)
diff --git a/tests/archive-in-archive.at b/tests/archive-in-archive.at
index dd4a122..551e254 100644
--- a/tests/archive-in-archive.at
+++ b/tests/archive-in-archive.at
@@ -50,8 +50,7 @@ AT_CHECK([$LIBTOOL --mode=link --tag=CC --tag=disable-shared 
$CC $CFLAGS $LDFLAG
 AT_CHECK([$LIBTOOL --mode=install cp libbar.la $thisdir], [], [ignore], 
[ignore])
 eval `$EGREP '^(old_library)=' < libbar.la`
 libbar=$old_library
-eval `$LIBTOOL --config | $EGREP '^(AR_TFLAGS|AR_SEP)='`
-AT_CHECK([$AR $AR_TFLAGS$AR_SEP$libbar | grep $libfoo],[1],[ignore],[ignore])
-archive_contents=`$AR $AR_TFLAGS$AR_SEP$libbar`
+AT_CHECK([$LT_AR t $libbar | grep $libfoo],[1],[ignore],[ignore])
+archive_contents=`$LT_AR t $libbar`
 AT_XFAIL_IF([case "$archive_contents" in *"$libfoo"*) : ;; esac])
 AT_CLEANUP
diff --git a/tests/duplicate_conv.at b/tests/duplicate_conv.at
index 83d5144..77496d0 100644
--- a/tests/duplicate_conv.at
+++ b/tests/duplicate_conv.at
@@ -25,6 +25,8 @@
 AT_SETUP([duplicate convenience archive names])
 AT_KEYWORDS([libtool])
 
+eval `$LIBTOOL --config | sed -n '/^reload_cmds=/,/^$/p'`
+
 # We create two convenience archives with the same name, and _also_
 # containing an object with the same name.  This is necessary to detect
 # the failure with both 1.5.22 and HEAD, since the latter does not (did
@@ -75,6 +77,8 @@ AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o 
main$EXEEXT main.$OBJEXT
 LT_AT_EXEC_CHECK([./main],[0],[ignore],[ignore])
 $LIBTOOL --mode=clean rm -f libcee.la
 
+AT_CHECK([test "x$reload_cmds" = xfalse && exit 77], [1])
+
 # Test whether this works with reloadable objects as well.
 AT_CHECK([$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o cee.$OBJEXT 
c.lo a/liba.la b/liba.la],
         [0], [ignore], [ignore])
diff --git a/tests/ltdl-api.at b/tests/exeext.at
similarity index 53%
copy from tests/ltdl-api.at
copy to tests/exeext.at
index 465a513..30a9e4f 100644
--- a/tests/ltdl-api.at
+++ b/tests/exeext.at
@@ -1,7 +1,7 @@
-# ltdl-api.at -- test libltdl API                -*- Autotest -*-
+# exeext.at -- ensure that exeext handling works  -*- Autotest -*-
 #
 #   Copyright (C) 2008 Free Software Foundation, Inc.
-#   Written by Ralf Wildenhues, 2008.
+#   Written by Peter Rosin, 2008
 #
 #   This file is part of GNU Libtool.
 #
@@ -22,18 +22,32 @@
 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 ####
 
-AT_SETUP([ltdl API])
-AT_KEYWORDS([libltdl])
-
-# Ensure that no symbols from argz are unrenamed.
-eval `$LIBTOOL --config | $EGREP '^(NM|global_symbol_pipe|objext)='`
-argz_o=$abs_top_builddir/libltdl/argz.$objext
-AT_CHECK([test -f "$argz_o" || exit 77])
-AT_CHECK([eval "$NM \"\$argz_o\" | $global_symbol_pipe"],
-        [], [stdout], [ignore])
-# Check for global symbols beginning with "argz_"
-AT_CHECK([grep "^T argz_" stdout], [1])
-# and also for the _ prefixed version "_argz_"
-AT_CHECK([grep "^T _argz_" stdout], [1])
+
+AT_SETUP([both of -o prog and -o prog$EXEEXT work])
+AT_KEYWORDS([libtool])
+
+AT_CHECK([test -n "$EXEEXT" || exit 77])
+
+bin=`pwd`/bin
+binext=`pwd`/binext
+mkdir src $bin srcext $binext
+
+AT_DATA(src/prog.c,
+[[
+int main(void) { return 0; }
+]])
+
+$CC $CPPFLAGS $CFLAGS -c src/prog.c -o src/prog.$OBJEXT
+
+AT_CHECK($LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o src/prog 
src/prog.$OBJEXT,
+        [0], [ignore], [ignore])
+AT_CHECK($LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o srcext/prog$EXEEXT 
src/prog.$OBJEXT,
+        [0], [ignore], [ignore])
+
+$LIBTOOL --mode=install cp src/prog $bin/prog
+$LIBTOOL --mode=install cp srcext/prog$EXEEXT $binext/prog$EXEEXT
+
+LT_AT_EXEC_CHECK([$bin/prog])
+LT_AT_EXEC_CHECK([$binext/prog$EXEEXT])
 
 AT_CLEANUP


hooks/post-receive
--
GNU Libtool




reply via email to

[Prev in Thread] Current Thread [Next in Thread]