Hi Peter, On 7 Oct 2012, at 06:53, Peter Rosin <p...@lysator.liu.se> wrote: > How is the below function supposed to work > when $file_magic_cmd is '$OBJDUMP -f' and not 'func_win32_libid'?
I have no idea :( > objdump doesn't output "import" for me, at least not for any > import lib I have given it. Chunk? > > # func_win32_import_lib_p ARG > # True if ARG is an import lib, as indicated by $file_magic_cmd > func_win32_import_lib_p () > { > $debug_cmd > > case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in > *import*) : ;; > *) false ;; > esac > } Does '$OBJDUMP -f' output anything that can be used to distinguish an import library? If so, add that to the *import* leg of the case statement above. If not, then file_magic_cmd should not be set to '$OBJDUMP -f' for at least that particular combination of MSVC/objdump/mingw that you are using: > 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', > # unless we find 'file', for example because we are cross-compiling. > # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. > if ( test "$lt_cv_nm_interface" = "BSD nm" && 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 > # Keep this pattern in sync with the one in func_win32_libid. > lt_cv_deplibs_check_method='file_magic file format > (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' > lt_cv_file_magic_cmd='$OBJDUMP -f' lt_cv_file_magic_cmd='func_win32_libid' ?? > fi > ;; HTH, -- Gary V. Vaughan (gary AT gnu DOT org) _______________________________________________ https://lists.gnu.org/mailman/listinfo/libtool