]> git.sesse.net Git - ffmpeg/blobdiff - configure
Progressive frames disguised as interlaced are supported
[ffmpeg] / configure
index 311049dac405a0725ca824826f735fda6c437be4..a5c24a05b0212f4961a72d7d7058143bf642a6ad 100755 (executable)
--- a/configure
+++ b/configure
@@ -87,12 +87,15 @@ show_help(){
   echo "  --enable-faadbin         build FAAD support with runtime linking [default=no]"
   echo "  --enable-libgsm          enable GSM support via libgsm [default=no]"
   echo "  --enable-mp3lame         enable MP3 encoding via libmp3lame [default=no]"
-  echo "  --enable-libnut          enable NUT support via libnut [default=no]"
-  echo "  --enable-libogg          enable Ogg support via libogg [default=no]"
-  echo "  --enable-libtheora       enable Theora support via libtheora [default=no]"
-  echo "  --enable-vorbis          enable Vorbis support via libvorbis [default=no]"
+  echo "  --enable-libnut          enable NUT (de)muxing via libnut,"
+  echo "                           native demuxer exists [default=no]"
+  echo "  --enable-libogg          enable Ogg muxing via libogg [default=no]"
+  echo "  --enable-libtheora       enable Theora encoding via libtheora [default=no]"
+  echo "  --enable-vorbis          enable Vorbis en/decoding via libvorbis,"
+  echo "                           native implementations exist [default=no]"
   echo "  --enable-x264            enable H.264 encoding via x264 [default=no]"
-  echo "  --enable-xvid            enable Xvid encoding via xvidcore [default=no]"
+  echo "  --enable-xvid            enable Xvid encoding via xvidcore,"
+  echo "                           native MPEG-4/Xvid encoder exists [default=no]"
   echo "  --enable-amr_nb          enable amr_nb float audio codec"
   echo "  --enable-amr_nb-fixed    use fixed point for amr-nb codec"
   echo "  --enable-amr_wb          enable amr_wb float audio codec"
@@ -683,6 +686,7 @@ liba52bin="no"
 libdts="no"
 libfaac="no"
 libfaad="no"
+libfaad2="no"
 libfaadbin="no"
 libgsm="no"
 libmp3lame="no"
@@ -939,10 +943,7 @@ if test x"$1" = x"-h" -o x"$1" = x"--help" ; then
     show_help
 fi
 
-FFMPEG_CONFIGURATION=" "
-for opt do
-  FFMPEG_CONFIGURATION="$FFMPEG_CONFIGURATION""$opt "
-done
+FFMPEG_CONFIGURATION="$@"
 
 ENCODER_LIST=`sed -n 's/^[^#]*ENC.*, *\(.*\)).*/\1_encoder/p' "$source_path/libavcodec/allcodecs.c"`
 DECODER_LIST=`sed -n 's/^[^#]*DEC.*, *\(.*\)).*/\1_decoder/p' "$source_path/libavcodec/allcodecs.c"`
@@ -1227,53 +1228,36 @@ if enabled libvorbis && disabled libogg; then
     die "libogg must be enabled to enable libvorbis."
 fi
 
-if disabled gpl ; then
-    if enabled pp; then
-        die "The Postprocessing code is under GPL and --enable-gpl is not specified."
-    fi
-
-    if enabled_any liba52 liba52bin ; then
-        die "liba52 is under GPL and --enable-gpl is not specified."
-    fi
-
-    if enabled xvid; then
-        die "libxvidcore is under GPL and --enable-gpl is not specified."
-    fi
-
-    if enabled x264; then
-        die "x264 is under GPL and --enable-gpl is not specified."
-    fi
-
-    if enabled libdts; then
-        die "libdts is under GPL and --enable-gpl is not specified."
-    fi
-
-    if enabled_any libfaad libfaadbin ; then
-        if check_header faad.h; then
-            check_cc << EOF
-                #include <faad.h>
-                #ifndef FAAD2_VERSION
-                ok faad1
-                #endif
-                int main( void ) { return 0; }
+if enabled_any libfaad libfaadbin ; then
+    if check_header faad.h; then
+        check_cc << EOF
+#include <faad.h>
+#ifndef FAAD2_VERSION
+ok faad1
+#endif
+int main( void ) { return 0; }
 EOF
-            if test $? = 0 ; then
-                die "FAAD2 is under GPL and --enable-gpl is not specified."
-            fi
-        else
-            libfaad="no"
-            libfaadbin="no"
-            echo "FAAD test failed."
-        fi
+        test $? = 0 && enable libfaad2
+    else
+        die "FAAD test failed."
     fi
+fi
 
-    if enabled x11grab; then
-        die "The X11 grabber is under GPL and --enable-gpl is not specified."
-    fi
 
-    if enabled swscaler; then
-        die "The software scaler is under GPL and --enable-gpl is not specified."
-    fi
+if disabled gpl ; then
+    die_gpl_disabled(){
+        name=$1
+        shift
+        enabled_any $@ && die "$name is under GPL and --enable-gpl is not specified."
+    }
+    die_gpl_disabled "The Postprocessing code" pp
+    die_gpl_disabled "liba52"                  liba52 liba52bin
+    die_gpl_disabled "libxvidcore"             xvid
+    die_gpl_disabled "x264"                    x264
+    die_gpl_disabled "libdts"                  libdts
+    die_gpl_disabled "FAAD2"                   libfaad2
+    die_gpl_disabled "The X11 grabber"         x11grab
+    die_gpl_disabled "The software scaler"     swscaler
 fi
 
 # compute MMX state
@@ -1415,7 +1399,7 @@ int main(){
 EOF
 if test "$?" != 0; then
     echo "$cc is unable to create an executable file."
-    if test -z "$cross_prefix" -a "$cross_compile" = no; then
+    if test -z "$cross_prefix" && disabled cross_compile ; then
         echo "If $cc is a cross-compiler, use the --cross-compile option."
         echo "Only do this if you know what cross compiling means."
     fi
@@ -1535,7 +1519,7 @@ fi
 check_header malloc.h
 check_func memalign
 
-if disabled_all memalign memalign_hack && enabled_all need_memalign ; then
+if disabled_all memalign memalign_hack && enabled need_memalign ; then
     die "Error, no memalign() but SSE enabled, disable it or use --enable-memalign-hack."
 fi
 
@@ -1664,7 +1648,7 @@ if enabled_any vhook liba52bin libfaadbin; then
     add_extralibs $ldl
 fi
 
-if test "$targetos" = "CYGWIN" -a "$lstatic" = "yes" ; then
+if test "$targetos" = "CYGWIN" && enabled lstatic ; then
     vhook="no"
     echo
     echo "At the moment vhooks don't work on Cygwin static builds."
@@ -1684,13 +1668,16 @@ fi
 ##########################################
 # imlib check
 
-temp_extralibs -lImlib2
-check_ld <<EOF && imlib2=yes || imlib2=no
-#include <X11/Xlib.h>
+imlib2=no
+if (imlib2-config --version) >/dev/null 2>&1 ; then
+    temp_cflags `imlib2-config --cflags`
+    temp_extralibs `imlib2-config --libs`
+    check_ld <<EOF && imlib2=yes
 #include <Imlib2.h>
 int main( void ) { return (int) imlib_load_font("foo"); }
 EOF
-restore_flags
+    restore_flags
+fi
 
 ##########################################
 # FreeType check
@@ -1933,7 +1920,7 @@ echo "Creating config.mak and config.h..."
 
 echo "# Automatically generated by configure - do not modify!" > config.mak
 echo "/* Automatically generated by configure - do not modify! */" > $TMPH
-echo "#define FFMPEG_CONFIGURATION "'"'"$FFMPEG_CONFIGURATION"'"' >> $TMPH
+echo "#define FFMPEG_CONFIGURATION \"$FFMPEG_CONFIGURATION\"" >> $TMPH
 
 echo "PREFIX=$PREFIX" >> config.mak
 echo "prefix=\$(DESTDIR)\${PREFIX}" >> config.mak