]> git.sesse.net Git - ffmpeg/blobdiff - configure
--extra-cflags and --extra-ldflags clobbers previous options. This
[ffmpeg] / configure
index 289a327291390d18bf21ce956b99eb141be40bac..b5ddb48f5b6f76f3aed3c9d7d5de271c41375610 100755 (executable)
--- a/configure
+++ b/configure
@@ -265,7 +265,7 @@ SHFLAGS="-dynamiclib"
 extralibs=""
 darwin="yes"
 strip="strip -x"
-LDFLAGS="-Wl,-d"
+LDFLAGS="-Wl,-d,-search_paths_first"
 FFSLDFLAGS=-Wl,-bind_at_load
 ;;
 MINGW32*)
@@ -277,8 +277,10 @@ CYGWIN*)
 v4l="no"
 audio_oss="yes"
 dv1394="no"
+ffserver="no"
 extralibs=""
 cygwin="yes"
+EXESUF=".exe"
 test -f /usr/include/inttypes.h || \
 test -f /usr/local/include/inttypes.h || \
 echo "Missing inttypes.h, please copy cygwin_inttypes.h to" \
@@ -323,7 +325,7 @@ esac
 # of AltiVec on PowerPC
 TARGET_OS=`( uname -s ) 2>&1`
   case "$TARGET_OS" in
-  Linux|FreeBSD|NetBSD|BSD/OS|OpenBSD|SunOS|QNX|Darwin|GNU)
+  Linux|FreeBSD|NetBSD|BSD/OS|OpenBSD|SunOS|QNX|Darwin|GNU|BeOS)
     ;;
   IRIX*)
     TARGET_OS=IRIX
@@ -368,9 +370,9 @@ for opt do
   ;;
   --make=*) make=`echo $opt | cut -d '=' -f 2`
   ;;
-  --extra-cflags=*) CFLAGS="${opt#--extra-cflags=}"
+  --extra-cflags=*) CFLAGS="$CFLAGS ${opt#--extra-cflags=}"
   ;;
-  --extra-ldflags=*) LDFLAGS=${opt#--extra-ldflags=}
+  --extra-ldflags=*) LDFLAGS="$LDFLAGS ${opt#--extra-ldflags=}"
   ;;
   --extra-libs=*) extralibs=${opt#--extra-libs=}
   ;;
@@ -772,6 +774,7 @@ _malloc_h=yes
 _memalign=yes
 # check for memalign - atmos
 cat > $TMPC << EOF
+#include <stdio.h>
 #include <malloc.h>
 int main ( void ) {
 char *string = NULL;
@@ -984,7 +987,7 @@ fi
 
 case "`$cc -v 2>&1 | grep version`" in
     *gcc*)
-       CFLAGS="-Wall $CFLAGS"
+       CFLAGS="-Wall -Wno-switch $CFLAGS"
        ;;
     *)
        ;;
@@ -1215,6 +1218,7 @@ fi
 if test "$pthreads" = "yes" ; then
   echo "HAVE_PTHREADS=yes" >> config.mak
   echo "#define HAVE_PTHREADS 1" >> $TMPH
+  echo "#define HAVE_THREADS 1" >> $TMPH
   if test $targetos != FreeBSD; then
      extralibs="$extralibs -lpthread"
   fi
@@ -1240,7 +1244,7 @@ if test "$lshared" = "yes" ; then
   echo "PIC=-fPIC" >> config.mak
 fi
 echo "EXTRALIBS=$extralibs" >> config.mak
-version=`grep '#define FFMPEG_VERSION ' $source_path/libavcodec/avcodec.h |
+version=`grep '#define FFMPEG_VERSION ' "$source_path/libavcodec/avcodec.h" |
  cut -d '"' -f 2`
 echo "VERSION=$version" >>config.mak
 # if you do not want to use encoders, disable that.
@@ -1366,6 +1370,7 @@ if test "$mingw32" = "yes" ; then
   echo "CONFIG_WIN32=yes" >> config.mak
   echo "HAVE_W32THREADS=yes" >> config.mak
   echo "#define HAVE_W32THREADS 1" >> $TMPH
+  echo "#define HAVE_THREADS 1" >> $TMPH
   echo "#ifndef __MINGW32__" >> $TMPH
   echo "#define __MINGW32__ 1" >> $TMPH
   echo "#endif" >> $TMPH
@@ -1380,6 +1385,12 @@ if test "$TARGET_OS" = "SunOS" ; then
   echo "#define CONFIG_SUNOS 1" >> $TMPH
 fi
 
+if test "$TARGET_OS" = "BeOS" ; then
+  echo "HAVE_BEOSTHREADS=yes" >> config.mak
+  echo "#define HAVE_BEOSTHREADS 1" >> $TMPH
+  echo "#define HAVE_THREADS 1" >> $TMPH
+fi
+
 if test "$darwin" = "yes"; then
   echo "#define CONFIG_DARWIN 1"  >> $TMPH
   echo "CONFIG_DARWIN=yes" >> config.mak
@@ -1449,10 +1460,10 @@ if test "$source_path_used" = "yes" ; then
             mkdir -p $dir
     done
     for f in $FILES ; do
-        ln -sf $source_path/$f $f
+        ln -sf "$source_path/$f" $f
     done
 fi
-echo "SRC_PATH=$source_path" >> config.mak
+echo "SRC_PATH='$source_path'" >> config.mak
 
 if test "$amr_wb" = "yes" ; then
   echo "#define AMR_WB 1" >> $TMPH