]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* libtool.m4 (AC_DEPLIBS_CHECK_METHOD) [ mingw, pw32 ]:
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Fri, 25 Aug 2006 14:56:56 +0000 (14:56 +0000)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Fri, 25 Aug 2006 14:56:56 +0000 (14:56 +0000)
If `file' is present, use `func_win32_libid' rather than
`objdump -f', to facilitate cross-compilation.
Reported by Pierre Ossman <ossman@cendio.se>.

ChangeLog
libtool.m4

index 375f0e6b4608aa1931477cd6f2794105aef286cc..250f7a8205ed0794231689e9e3e2560fb4b4a1bd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2006-08-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       * libtool.m4 (AC_DEPLIBS_CHECK_METHOD) [ mingw, pw32 ]:
+       If `file' is present, use `func_win32_libid' rather than
+       `objdump -f', to facilitate cross-compilation.
+       Reported by Pierre Ossman <ossman@cendio.se>.
+
 2006-08-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
        * ltmain.in (execute mode): Also search the directory above `$objdir'
index 60f275d4f6ef552aa7bc67945c60b0caddccdc03..1cb61e1774a4a465b69091be89abf48c258cde23 100644 (file)
@@ -2306,9 +2306,15 @@ cygwin*)
 
 mingw* | pw32*)
   # Base MSYS/MinGW do not provide the 'file' command needed by
-  # func_win32_libid shell function, so use a weaker test based on 'objdump'.
-  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
-  lt_cv_file_magic_cmd='$OBJDUMP -f'
+  # func_win32_libid shell function, so use a weaker test based on 'objdump',
+  # unless we find 'file', for example because we are cross-compiling.
+  if ( file / ) >/dev/null 2>&1; then
+    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+    lt_cv_file_magic_cmd='func_win32_libid'
+  else
+    lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+    lt_cv_file_magic_cmd='$OBJDUMP -f'
+  fi
   ;;
 
 darwin* | rhapsody*)