On Mon, 19 Dec 2005, Ralf Wildenhues wrote:
Alternatively, just to try whether this works at all, you could
edit the libtool script directly and change
deplibs_check_method="file_magic ^x86 archive import|^x86 DLL"
and
file_magic_cmd="func_win32_libid"
once for each tag (for C: at the beginning of the script; for C++ etc.
at the very end).
Question to libtool folks: OK to apply this patch?
There are other reasons not to find the 'file' command. For example,
it does not appear to be provided with the MSYS environment. But
objdump is provided with MinGW. That is why I had MinGW using objdump
while Cygwin uses file.
The patch assumes particular output from the 'file' command. Since
there is no standard 'file' command provided with MSYS/MinGW, is this
safe? What if MinGW is used in a cross-development environment (e.g.
some *BSD environment) which uses a different 'file' program than
expected?
Bob
* 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 <[EMAIL PROTECTED]>.
Index: libtool.m4
===================================================================
RCS file: /cvsroot/libtool/libtool/Attic/libtool.m4,v
retrieving revision 1.314.2.145
diff -u -r1.314.2.145 libtool.m4
--- libtool.m4 18 Dec 2005 22:14:06 -0000 1.314.2.145
+++ libtool.m4 19 Dec 2005 12:47:58 -0000
@@ -2295,9 +2295,15 @@
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*)
======================================
Bob Friesenhahn
[EMAIL PROTECTED], http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/