Fix --extra-ldflags when cross-compiling for MinGW.
authorDiego Biurrun <diego@biurrun.de>
Mon, 24 Jul 2006 00:58:20 +0000 (00:58 +0000)
committerDiego Biurrun <diego@biurrun.de>
Mon, 24 Jul 2006 00:58:20 +0000 (00:58 +0000)
Originally committed as revision 5818 to svn://svn.ffmpeg.org/ffmpeg/trunk

configure

index d051f56..ad8b8b0 100755 (executable)
--- a/configure
+++ b/configure
@@ -709,7 +709,7 @@ for opt do
   ;;
   --extra-cflags=*) CFLAGS="$CFLAGS $optval"
   ;;
-  --extra-ldflags=*) FFLDFLAGS="$FFLDFLAGS $optval"
+  --extra-ldflags=*) EXTRALDFLAGS="$optval"
   ;;
   --extra-libs=*) extralibs="$optval"
   ;;
@@ -893,7 +893,6 @@ EOF
     if test "$mingwce" = "yes"; then
         protocols="no"
     fi
-    #FIXME: This ignores --extra-ldflags.
     FFLDFLAGS='-Wl,--output-def,$(@:.dll=.def),--out-implib,lib$(SLIBNAME:$(SLIBSUF)=.dll.a)'
     SLIBPREF=""
     SLIBSUF=".dll"
@@ -902,8 +901,8 @@ EOF
     if test "$force_libdir" != yes; then bindir="$PREFIX"; fi
 fi
 
-# Combine FFLDFLAGS and the LDFLAGS environment variable
-LDFLAGS="$FFLDFLAGS $LDFLAGS"
+# Combine FFLDFLAGS, EXTRALDFLAGS and the LDFLAGS environment variable.
+LDFLAGS="$FFLDFLAGS $EXTRALDFLAGS $LDFLAGS"
 
 test -n "$cross_prefix" && cross_compile=yes
 cc="${cross_prefix}${cc}"