]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* libtool.m4 (cygwin*): Look for target objdump tool.
authorFrank Ch. Eigler <fche@cygnus.com>
Sun, 25 Apr 1999 18:54:24 +0000 (18:54 +0000)
committerAlexandre Oliva <aoliva@redhat.com>
Sun, 25 Apr 1999 18:54:24 +0000 (18:54 +0000)
* ltconfig.in (cygwin*, file_magic_cmd): Use autoconf-located target
objdump tool.  Track OBJDUMP like DLLTOOL and AS.

* ltconfig.in (cygwin*, deplibs_check_method): Accept
"architecture: i386" as optional suffix, for it is printed on a
separate line sometimes.

* ltmain.in (cygwin*, ltdll.c): Wrap DllMain declaration in extern "C".

* ltmain.in (deplibs_check_method=file_magic): Redirect stderr to
/dev/null, to suppress error messages from target objdump.

ChangeLog
libtool.m4
ltconfig.in
ltmain.in

index aa931869ee22f5ae961d273869aa4e1718bb6471..7bf88117604bc1c9c4949d7ed5b61bbaa6e02e53 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+1999-04-25  Frank Ch. Eigler  <fche@cygnus.com>
+       * libtool.m4 (cygwin*): Look for target objdump tool.
+       * ltconfig.in (cygwin*, file_magic_cmd): Use autoconf-located target
+       objdump tool.  Track OBJDUMP like DLLTOOL and AS.
+       * ltconfig.in (cygwin*, deplibs_check_method): Accept
+       "architecture: i386" as optional suffix, for it is printed on a
+       separate line sometimes.
+       * ltmain.in (cygwin*, ltdll.c): Wrap DllMain declaration in extern "C".
+       * ltmain.in (deplibs_check_method=file_magic): Redirect stderr to
+       /dev/null, to suppress error messages from target objdump.
 1999-04-25  Alexandre Oliva  <oliva@dcc.unicamp.br>
 
        * ltconfig.in (irix*, soname_spec, library_names_spec): Missing
index fda60699c85e26ffb290ea1cfd1a3f6913ce718c..4c7eeb1b6fd6ed89a10faea5b3eed2399d8b76c2 100644 (file)
@@ -112,6 +112,7 @@ case "$host" in
 *-*-cygwin*)
   AC_CHECK_TOOL(DLLTOOL, dlltool, false)
   AC_CHECK_TOOL(AS, as, false)
+  AC_CHECK_TOOL(OBJDUMP, objdump, false)
   ;;
 
 esac
index d444616d8814f1894bf957fbfaa361ef1b565454..46a99198f3df213a84a6a320b5ff0ecee2a3ca1f 100755 (executable)
@@ -213,6 +213,7 @@ old_LIBS="$LIBS"
 old_NM="$NM"
 old_RANLIB="$RANLIB"
 old_DLLTOOL="$DLLTOOL"
+old_OBJDUMP="$OBJDUMP"
 old_AS="$AS"
 
 # Parse the command line options.
@@ -470,6 +471,9 @@ old_postuninstall_cmds=
 # Set a sane default for `AR'.
 test -z "$AR" && AR=ar
 
+# Set a sane default for `OBJDUMP'.
+test -z "$OBJDUMP" && OBJDUMP=objdump
+
 # If RANLIB is not set, then run the test.
 if test "${RANLIB+set}" != "set"; then
   result=no
@@ -494,8 +498,9 @@ if test -n "$RANLIB"; then
   old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
 fi
 
-# Set sane defaults for `DLLTOOL' and `AS', used on cygwin.
+# Set sane defaults for `DLLTOOL', `OBJDUMP', and `AS', used on cygwin.
 test -z "$DLLTOOL" && DLLTOOL=dlltool
+test -z "$OBJDUMP" && OBJDUMP=objdump
 test -z "$AS" && AS=as
 
 # Check to see if we are using GCC.
@@ -1699,8 +1704,8 @@ cygwin* | mingw*)
     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
   fi
   dynamic_linker='Win32 ld.exe'
-  deplibs_check_method='file_magic file format pei*-i386.*architecture: i386'
-  file_magic_cmd='objdump -f'
+  deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+  file_magic_cmd='${OBJDUMP} -f'
   need_lib_prefix=no
   # FIXME: first we should search . and the directory the executable is in
   shlibpath_var=PATH
@@ -2461,7 +2466,7 @@ case "$ltmain" in
   # Now quote all the things that may contain metacharacters.
   for var in ltecho old_CC old_CFLAGS old_CPPFLAGS \
     old_LD old_LDFLAGS old_LIBS \
-    old_NM old_RANLIB old_LN_S old_DLLTOOL old_AS \
+    old_NM old_RANLIB old_LN_S old_DLLTOOL old_OBJDUMP old_AS \
     AR CC LD LN_S NM LTSHELL LTCONFIG_VERSION \
     reload_flag reload_cmds wl \
     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
@@ -2544,7 +2549,7 @@ EOF
   # Double-quote the variables that need it (for aesthetics).
   for var in old_CC old_CFLAGS old_CPPFLAGS \
     old_LD old_LDFLAGS old_LIBS \
-    old_NM old_RANLIB old_LN_S old_DLLTOOL old_AS; do
+    old_NM old_RANLIB old_LN_S old_DLLTOOL old_OBJDUMP old_AS; do
     eval "$var=\\\"\$var\\\""
   done
 
@@ -2566,7 +2571,7 @@ cat <<EOF >> "$cfgfile"
 # CC=$old_CC CFLAGS=$old_CFLAGS CPPFLAGS=$old_CPPFLAGS \\
 # LD=$old_LD LDFLAGS=$old_LDFLAGS LIBS=$old_LIBS \\
 # NM=$old_NM RANLIB=$old_RANLIB LN_S=$old_LN_S \\
-# DLLTOOL=$old_DLLTOOL AS=$old_AS \\
+# DLLTOOL=$old_DLLTOOL OBJDUMP=$old_OBJDUMP AS=$old_AS \\
 #   $0$ltconfig_args
 #
 # Compiler and other test output produced by $progname, useful for
@@ -2612,6 +2617,9 @@ NM=$NM
 # Used on cygwin: DLL creation program.
 DLLTOOL="$DLLTOOL"
 
+# Used on cygwin: object dumper.
+OBJDUMP="$OBJDUMP"
+
 # Used on cygwin: assembler.
 AS="$AS"
 
index a77881f40843001d40c2f9fd2e860393036ed3a7..5a70241e73fea60fbc043a984bb057cef877556b 100644 (file)
--- a/ltmain.in
+++ b/ltmain.in
@@ -635,7 +635,13 @@ compiler."
 # #undef WIN32_LEAN_AND_MEAN
 # #include <stdio.h>
 #
+# #ifdef __cplusplus
+# extern "C" {
+# #endif
 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
+# #ifdef __cplusplus
+# }
+# #endif
 #
 # #include <cygwin/cygwin_dll.h>
 # DECLARE_CYGWIN_DLL( DllMain );
@@ -1917,7 +1923,7 @@ EOF
                        *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
                        esac
                      done
-                     if eval $file_magic_cmd \"\$potlib\" \
+                     if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
                         | sed 10q \
                         | egrep "$file_magic_regex" > /dev/null; then
                        newdeplibs="$newdeplibs $a_deplib"