]> git.sesse.net Git - ffmpeg/blobdiff - configure
make some tables static
[ffmpeg] / configure
index ff12f642afb6ab9b94832537b75d5fe150612e6d..8543db9d4bbe69d085449cee8b5020b355d49539 100755 (executable)
--- a/configure
+++ b/configure
@@ -31,6 +31,7 @@ show_help(){
   echo "  --incdir=DIR             install includes in DIR [PREFIX/include/ffmpeg]"
   echo "  --mandir=DIR             install man page in DIR [PREFIX/man]"
   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-vorbis          enable Vorbis support via libvorbis [default=no]"
   echo "  --enable-faad            enable FAAD support via libfaad [default=no]"
@@ -95,9 +96,11 @@ show_help(){
   echo "  --enable-gprof           enable profiling with gprof [$gprof]"
   echo "  --disable-debug          disable debugging symbols"
   echo "  --disable-opts           disable compiler optimizations"
+  echo "  --enable-extra-warnings  enable more compiler warnings"
   echo "  --disable-mpegaudio-hp   faster (but less accurate)"
   echo "                           MPEG audio decoding [default=no]"
   echo "  --disable-protocols      disable I/O protocols support [default=no]"
+  echo "  --disable-ffmpeg         disable ffmpeg build"
   echo "  --disable-ffserver       disable ffserver build"
   echo "  --disable-ffplay         disable ffplay build"
   echo "  --enable-small           optimize for size instead of speed"
@@ -366,8 +369,8 @@ case "$arch" in
       fi
     fi
   ;;
-  # armv4l is a subset of armv5tel
-  arm|armv4l|armv5tel)
+  # armv4l is a subset of armv[567]*l
+  arm|armv[4567]*l)
     arch="armv4l"
   ;;
   alpha)
@@ -420,6 +423,7 @@ ipv6="yes"
 zlib="yes"
 libgsm="no"
 mp3lame="no"
+libnut="no"
 libogg="no"
 vorbis="no"
 faad="no"
@@ -438,6 +442,7 @@ lstatic="yes"
 lshared="no"
 optimize="yes"
 debug="yes"
+extrawarnings="no"
 dostrip="yes"
 installstrip="-s"
 extralibs="-lm"
@@ -455,6 +460,7 @@ VHOOKSHFLAGS='$(SHFLAGS)'
 netserver="no"
 need_inet_aton="no"
 protocols="yes"
+ffmpeg="yes"
 ffserver="yes"
 ffplay="yes"
 LIBOBJFLAGS=""
@@ -660,13 +666,15 @@ targetos="${targetos}-UNKNOWN"
 esac
 
 # find source path
-source_path="`dirname $0`"
+source_path="`dirname \"$0\"`"
 source_path_used="yes"
 if test -z "$source_path" -o "$source_path" = "." ; then
-    source_path=`pwd`
+    source_path="`pwd`"
     source_path_used="no"
 else
     source_path="`cd \"$source_path\"; pwd`"
+    echo "$source_path" | grep -q '[[:blank:]]' &&
+      die "Out of tree builds are impossible with whitespace in source path."
 fi
 
 if test x"$1" = x"-h" -o x"$1" = x"--help" ; then
@@ -678,11 +686,11 @@ for opt do
   FFMPEG_CONFIGURATION="$FFMPEG_CONFIGURATION""$opt "
 done
 
-ENCODER_LIST=`grep 'register_avcodec(&[a-z0-9_]*_encoder)' $source_path/libavcodec/allcodecs.c  | sed 's/.*&\(.*\)).*/\1/'`
-DECODER_LIST=`grep 'register_avcodec(&[a-z0-9_]*_decoder)' $source_path/libavcodec/allcodecs.c  | sed 's/.*&\(.*\)).*/\1/'`
-PARSER_LIST=`grep 'av_register_codec_parser(&[a-z]' $source_path/libavcodec/allcodecs.c  | sed 's/.*&\(.*\)).*/\1/'`
-MUXER_LIST=`grep 'av_register_output_format(&[a-z]' $source_path/libavformat/allformats.c  | sed 's/.*&\(.*\)).*/\1/'`
-DEMUXER_LIST=`grep 'av_register_input_format(&[a-z]' $source_path/libavformat/allformats.c  | sed 's/.*&\(.*\)).*/\1/'`
+ENCODER_LIST=`grep 'register_avcodec(&[a-z0-9_]*_encoder)' "$source_path/libavcodec/allcodecs.c"  | sed 's/.*&\(.*\)).*/\1/'`
+DECODER_LIST=`grep 'register_avcodec(&[a-z0-9_]*_decoder)' "$source_path/libavcodec/allcodecs.c"  | sed 's/.*&\(.*\)).*/\1/'`
+PARSER_LIST=`grep 'av_register_codec_parser(&[a-z]' "$source_path/libavcodec/allcodecs.c"  | sed 's/.*&\(.*\)).*/\1/'`
+MUXER_LIST=`grep 'av_register_output_format(&[a-z]' "$source_path/libavformat/allformats.c"  | sed 's/.*&\(.*\)).*/\1/'`
+DEMUXER_LIST=`grep 'av_register_input_format(&[a-z]' "$source_path/libavformat/allformats.c"  | sed 's/.*&\(.*\)).*/\1/'`
 
 for opt do
   optval="${opt#*=}"
@@ -765,6 +773,8 @@ for opt do
   ;;
   --enable-mp3lame) mp3lame="yes"
   ;;
+  --enable-libnut) libnut="yes"
+  ;;
   --enable-libogg) libogg="yes"
     pkg_requires="$pkg_requires ogg >= 1.1"
   ;;
@@ -806,10 +816,14 @@ for opt do
   ;;
   --disable-opts) optimize="no"
   ;;
+  --enable-extra-warnings) extrawarnings="yes"
+  ;;
   --disable-mpegaudio-hp) mpegaudio_hp="no"
   ;;
   --disable-protocols) protocols="no"; network="no"; ffserver="no"
   ;;
+  --disable-ffmpeg) ffmpeg="no"
+  ;;
   --disable-ffserver) ffserver="no"
   ;;
   --disable-ffplay) ffplay="no"
@@ -1290,6 +1304,8 @@ if test "$_memalign" = "no" -a "$mmx" = "yes" -a \
     die "Error, no memalign() but SSE enabled, disable it or use --enable-memalign-hack."
 fi
 
+check_header byteswap.h && byteswap_h=yes || byteswap_h=no
+
 check_func localtime_r && localtime_r=yes || localtime_r=no
 enabled zlib && check_lib zlib.h zlibVersion -lz || zlib="no"
 
@@ -1309,6 +1325,7 @@ enabled libgsm  && require libgsm gsm.h gsm_create -lgsm
 enabled mp3lame && require LAME lame/lame.h lame_init -lmp3lame -lm
 enabled vorbis  && require libvorbis vorbis/vorbisenc.h vorbis_info_init -lvorbis -lvorbisenc -logg
 enabled libogg  && require libogg ogg/ogg.h ogg_sync_init -logg
+enabled libnut  && require libnut nut.h nut_demuxer_init -lnut
 enabled xvid    && require XviD xvid.h xvid_global -lxvidcore
 enabled x264    && require x264 x264.h x264_encoder_open -lx264
 enabled dc1394  && require libdc1394 libdc1394/dc1394_control.h dc1394_create_handle -ldc1394_control -lraw1394
@@ -1518,7 +1535,7 @@ check_cflags -Wno-switch
 check_cflags -Wdisabled-optimization
 check_cflags -Wpointer-arith
 check_cflags -Wredundant-decls
-check_cflags -Winline
+enabled extrawarnings && check_cflags -Winline
 
 # add some linker flags
 check_ldflags $LDLATEFLAGS
@@ -1587,6 +1604,7 @@ echo "gprof enabled    $gprof"
 echo "zlib enabled     $zlib"
 echo "libgsm enabled   $libgsm"
 echo "mp3lame enabled  $mp3lame"
+echo "libnut enabled   $libnut"
 echo "libogg enabled   $libogg"
 echo "Vorbis enabled   $vorbis"
 echo "FAAD enabled     $faad"
@@ -1815,7 +1833,7 @@ if test "$pthreads" = "yes" ; then
   echo "#define HAVE_THREADS 1" >> $TMPH
 fi
 if test "$sdl" = "yes" ; then
-  echo "CONFIG_SDL=yes" >> config.mak
+  echo "HAVE_SDL=yes" >> config.mak
   echo "SDL_LIBS=`"${SDL_CONFIG}" --libs`" >> config.mak
   echo "SDL_CFLAGS=`"${SDL_CONFIG}" --cflags`" >> config.mak
   if test "$sdl_video_size" = "yes"; then
@@ -1829,8 +1847,8 @@ if test "$have_lrintf" = "yes" ; then
   echo "#define HAVE_LRINTF 1" >> $TMPH
 fi
 if test "$vhook" = "yes" ; then
-  echo "BUILD_VHOOK=yes" >> config.mak
-  echo "#define HAVE_VHOOK 1" >> $TMPH
+  echo "CONFIG_VHOOK=yes" >> config.mak
+  echo "#define CONFIG_VHOOK 1" >> $TMPH
 fi
 
 sws_version=`grep '#define LIBSWSCALE_VERSION ' "$source_path/libswscale/swscale.h" | sed 's/[^0-9\.]//g'`
@@ -1987,6 +2005,11 @@ if test "$mp3lame" = "yes" ; then
   echo "CONFIG_MP3LAME=yes" >> config.mak
 fi
 
+if test "$libnut" = "yes" ; then
+  echo "#define CONFIG_LIBNUT 1" >> $TMPH
+  echo "CONFIG_LIBNUT=yes" >> config.mak
+fi
+
 if test "$libogg" = "yes" ; then
   echo "#define CONFIG_LIBOGG 1" >> $TMPH
   echo "CONFIG_LIBOGG=yes" >> config.mak
@@ -2085,6 +2108,9 @@ if test "$memalignhack" = "yes" ; then
   echo "#define MEMALIGN_HACK 1" >> $TMPH
 fi
 
+if test "$byteswap_h" = "yes"; then
+  echo "#define HAVE_BYTESWAP_H 1" >> $TMPH
+fi
 
 if test "$netserver" = "yes" ; then
   echo "#define CONFIG_BEOS_NETSERVER 1" >> $TMPH
@@ -2104,6 +2130,11 @@ if test "$protocols" = "yes" ; then
   echo "CONFIG_PROTOCOLS=yes" >> config.mak
 fi
 
+if test "$ffmpeg" = "yes" ; then
+  echo "#define CONFIG_FFMPEG 1" >> $TMPH
+  echo "CONFIG_FFMPEG=yes" >> config.mak
+fi
+
 if test "$ffserver" = "yes" ; then
   echo "#define CONFIG_FFSERVER 1" >> $TMPH
   echo "CONFIG_FFSERVER=yes" >> config.mak
@@ -2147,6 +2178,7 @@ if test "$source_path_used" = "yes" ; then
          "
     FILES="\
           Makefile \
+          common.mak \
           libavformat/Makefile \
           libavcodec/Makefile \
           libpostproc/Makefile \
@@ -2164,8 +2196,9 @@ if test "$source_path_used" = "yes" ; then
         ln -sf "$source_path/$f" $f
     done
 fi
-echo "SRC_PATH=$source_path" >> config.mak
-echo "BUILD_ROOT=$PWD" >> config.mak
+echo "SRC_PATH=\"$source_path\"" >> config.mak
+echo "SRC_PATH_BARE=$source_path" >> config.mak
+echo "BUILD_ROOT=\"$PWD\"" >> config.mak
 
 if test "$amr" = "yes" ; then
   echo "#define CONFIG_AMR 1" >> $TMPH