]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* libltdl/m4/libtool.m4 (_LT_CHECK_MAGIC_METHOD) [ mingw,pw32 ]:
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Fri, 25 Aug 2006 14:56:35 +0000 (14:56 +0000)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Fri, 25 Aug 2006 14:56:35 +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
libltdl/m4/libtool.m4

index 3f8814ded75f56c5d1c9c1177780498d675fd78e..b73bb08c0d20f240f74a2b4dd3435d852371199b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2006-08-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       * libltdl/m4/libtool.m4 (_LT_CHECK_MAGIC_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-23  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
        * libltdl/config/ltmain.m4sh (func_mode_link): In GNU ld script,
index 5842f512105e72960ff3c0aa0a78678ba10dcfd1..fb1d2dfe9a1cdb4fdc72a343ab67eb3d6c352499 100644 (file)
@@ -2814,11 +2814,17 @@ cygwin*)
   lt_cv_file_magic_cmd='func_win32_libid'
   ;;
 
-  # Base MSYS/MinGW do not provide the 'file' command needed by
-  # func_win32_libid shell function, so use a weaker test based on 'objdump'.
 mingw* | pw32*)
-  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
-  lt_cv_file_magic_cmd='$OBJDUMP -f'
+  # Base MSYS/MinGW do not provide the 'file' command needed by
+  # 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*)