[FFmpeg-cvslog] configure: add support for dlltool when lib.exe is unavailable

Michael Niedermayer git at videolan.org
Wed Aug 1 17:06:25 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Aug  1 17:01:37 2012 +0200| [1894f88546cff0200c1c2507b43f1837cdc007b1] | committer: Michael Niedermayer

configure: add support for dlltool when lib.exe is unavailable

The lib.exe test is untested. Someone who has lib.exe please test and fix it if it doesnt work

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1894f88546cff0200c1c2507b43f1837cdc007b1
---

 configure |   13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index 6203eca..ebd4d1b 100755
--- a/configure
+++ b/configure
@@ -2878,7 +2878,7 @@ case $target_os in
         fi
         LIBTARGET=i386
         if enabled x86_64; then
-            LIBTARGET=x64
+            LIBTARGET="i386:x86-64"
         elif enabled arm; then
             LIBTARGET=arm-wince
         fi
@@ -2887,7 +2887,15 @@ case $target_os in
         SLIBSUF=".dll"
         SLIBNAME_WITH_VERSION='$(SLIBPREF)$(FULLNAME)-$(LIBVERSION)$(SLIBSUF)'
         SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(FULLNAME)-$(LIBMAJOR)$(SLIBSUF)'
-        SLIB_EXTRA_CMD='-lib.exe /machine:$(LIBTARGET) /def:$$(@:$(SLIBSUF)=.def) /out:$(SUBDIR)$(SLIBNAME:$(SLIBSUF)=.lib)'
+        dlltool="${cross_prefix}dlltool"
+        if check_cmd lib.exe; then
+            SLIB_EXTRA_CMD='-lib.exe /machine:$(LIBTARGET) /def:$$(@:$(SLIBSUF)=.def) /out:$(SUBDIR)$(SLIBNAME:$(SLIBSUF)=.lib)'
+            if enabled x86_64; then
+                LIBTARGET=x64
+            fi
+        elif check_cmd $dlltool --version; then
+            SLIB_EXTRA_CMD=-'$(DLLTOOL) -m $(LIBTARGET) -d $$(@:$(SLIBSUF)=.def) -l $(SUBDIR)$(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.lib) -D $(SLIBNAME_WITH_MAJOR)'
+        fi
         SLIB_INSTALL_NAME='$(SLIBNAME_WITH_MAJOR)'
         SLIB_INSTALL_LINKS=
         SLIB_INSTALL_EXTRA_SHLIB='$(SLIBNAME:$(SLIBSUF)=.lib)'
@@ -3891,6 +3899,7 @@ DEPCC=$dep_cc
 DEPCCFLAGS=$DEPCCFLAGS \$(CPPFLAGS)
 DEPAS=$as
 DEPASFLAGS=$DEPASFLAGS \$(CPPFLAGS)
+DLLTOOL=$dlltool
 YASM=$yasmexe
 DEPYASM=$yasmexe
 AR=$ar



More information about the ffmpeg-cvslog mailing list