From: Ralf Wildenhues Date: Fri, 25 Aug 2006 14:56:56 +0000 (+0000) Subject: * libtool.m4 (AC_DEPLIBS_CHECK_METHOD) [ mingw, pw32 ]: X-Git-Tag: release-1-5-23b~28 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=71923f752e55f4463dd697950b75b76f01b847b0;p=thirdparty%2Flibtool.git * 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 . --- diff --git a/ChangeLog b/ChangeLog index 375f0e6b4..250f7a820 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2006-08-25 Ralf Wildenhues + + * 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 . + 2006-08-07 Ralf Wildenhues * ltmain.in (execute mode): Also search the directory above `$objdir' diff --git a/libtool.m4 b/libtool.m4 index 60f275d4f..1cb61e177 100644 --- a/libtool.m4 +++ b/libtool.m4 @@ -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*)