]> git.sesse.net Git - ffmpeg/blobdiff - configure
Doxygenizing the comments
[ffmpeg] / configure
index fb40ef7175e58629f023b22494ea44bc4392c1fe..0a315710f76975c69d11f43367c14b24ef70ee72 100755 (executable)
--- a/configure
+++ b/configure
@@ -2,11 +2,14 @@
 #
 # FFmpeg configure script
 #
-# Copyright (c) 2000, 2001, 2002 Fabrice Bellard
-# Copyright (c) 2005-2006 Diego Biurrun
-# Copyright (c) 2005-2006 Mans Rullgard
+# Copyright (c) 2000-2002 Fabrice Bellard
+# Copyright (c) 2005-2008 Diego Biurrun
+# Copyright (c) 2005-2008 Mans Rullgard
 #
 
+# Prevent locale nonsense from breaking basic text processing.
+export LC_ALL=C
+
 # make sure we are running under a compatible shell
 # try to make this part work with most shells
 
@@ -84,8 +87,6 @@ show_help(){
   echo
   echo "External library support:"
   echo "  --enable-mlib            use Sun medialib [default=no]"
-  echo "  --enable-liba52          enable GPLed liba52 support [default=no]"
-  echo "  --enable-liba52bin       open liba52.so.0 at runtime [default=no]"
   echo "  --enable-avisynth        allow reading AVISynth script files [default=no]"
   echo "  --enable-libamr-nb       enable libamr-nb floating point audio codec"
   echo "  --enable-libamr-wb       enable libamr-wb floating point audio codec"
@@ -116,6 +117,7 @@ show_help(){
   echo "  --extra-cflags=ECFLAGS   add ECFLAGS to CFLAGS [$CFLAGS]"
   echo "  --extra-ldflags=ELDFLAGS add ELDFLAGS to LDFLAGS [$LDFLAGS]"
   echo "  --extra-libs=ELIBS       add ELIBS [$ELIBS]"
+  echo "  --extra-version=STRING   version string suffix []"
   echo "  --build-suffix=SUFFIX    suffix for application specific build []"
   echo "  --arch=ARCH              select architecture  [$arch]"
   echo "  --cpu=CPU                selects the minimum cpu required (affects"
@@ -501,8 +503,8 @@ int main(void){ $func(); }
 EOF
 }
 
-check_func2(){
-    log check_func2 "$@"
+check_func_headers(){
+    log check_func_headers "$@"
     headers=$1
     func=$2
     shift 2
@@ -539,7 +541,7 @@ check_lib2(){
     func="$2"
     shift 2
     temp_extralibs "$@"
-    check_func2 "$headers" $func && add_extralibs "$@"
+    check_func_headers "$headers" $func && add_extralibs "$@"
     err=$?
     restore_flags
     return $err
@@ -662,8 +664,6 @@ CONFIG_LIST="
     gray
     hardcoded_tables
     ipv6
-    liba52
-    liba52bin
     libamr_nb
     libamr_wb
     libdc1394
@@ -786,6 +786,7 @@ HAVE_LIST="
     sys_resource_h
     sys_select_h
     sys_soundcard_h
+    sys_videoio_h
     termios_h
     threads
     winsock2_h
@@ -822,6 +823,7 @@ CMDLINE_SET="
     cc
     cpu
     cross_prefix
+    extra_version
     logfile
     source_path
     target_os
@@ -846,8 +848,9 @@ vis_deps="sparc"
 byteswap_h_deps="!armv4l"
 
 # decoders / encoders
-ac3_decoder_deps="gpl !liba52"
+ac3_decoder_deps="gpl"
 dxa_decoder_deps="zlib"
+eac3_decoder_deps="gpl"
 flashsv_decoder_deps="zlib"
 flashsv_encoder_deps="zlib"
 mlp_decoder_deps="mlp_parser"
@@ -858,8 +861,6 @@ zmbv_decoder_deps="zlib"
 zmbv_encoder_deps="zlib"
 
 # external libraries
-liba52_decoder_deps="liba52"
-liba52bin_decoder_extralibs='$ldl'
 libamr_nb_decoder_deps="libamr_nb"
 libamr_nb_encoder_deps="libamr_nb"
 libamr_wb_decoder_deps="libamr_wb"
@@ -903,7 +904,7 @@ rtp_muxer_deps="network rtp_protocol"
 rtsp_demuxer_deps="sdp_demuxer"
 sdp_demuxer_deps="rtp_protocol mpegts_demuxer"
 v4l_demuxer_deps="linux_videodev_h"
-v4l2_demuxer_deps="linux_videodev2_h"
+v4l2_demuxer_deps_any="linux_videodev2_h sys_videoio_h"
 vfwcap_demuxer_deps="capCreateCaptureWindow"
 vfwcap_demuxer_extralibs="-lvfw32"
 x11_grab_device_demuxer_deps="x11grab XShmCreateImage"
@@ -974,7 +975,7 @@ enable stripping
 vhook="default"
 
 # build settings
-add_cflags -D_ISOC99_SOURCE
+add_cflags -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112
 SHFLAGS='-shared -Wl,-soname,$$(@F)'
 VHOOKSHFLAGS='$(SHFLAGS)'
 FFSERVERLDFLAGS=-Wl,-E
@@ -1125,6 +1126,9 @@ TMPO="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.o"
 TMPS="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.S"
 TMPSH="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.sh"
 
+check_cflags -fasm
+check_cflags -std=c99
+
 case "$arch" in
     i386|i486|i586|i686|i86pc|BePC)
         arch="x86_32"
@@ -1259,6 +1263,7 @@ case $target_os in
         SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(FULLNAME).$(LIBMAJOR)$(SLIBSUF)'
         FFSERVERLDFLAGS=-Wl,-bind_at_load
         objformat="macho"
+        enabled x86_64 && objformat="macho64"
         ;;
     mingw32*)
         target_os=mingw32
@@ -1375,7 +1380,7 @@ disabled static && LIBNAME=""
 
 if enabled_any libfaad libfaadbin ; then
     if check_header faad.h; then
-        check_cc << EOF
+        check_cc <<EOF
 #include <faad.h>
 #ifndef FAAD2_VERSION
 ok faad1
@@ -1396,7 +1401,6 @@ if ! enabled gpl; then
         enabled_any $@ && die "$name is under GPL and --enable-gpl is not specified."
     }
     die_gpl_disabled "The Postprocessing code" postproc
-    die_gpl_disabled "liba52"                  liba52
     die_gpl_disabled "libx264"                 libx264
     die_gpl_disabled "libxvidcore"             libxvid
     die_gpl_disabled "FAAD2"                   libfaad2
@@ -1558,6 +1562,7 @@ EOF
     enabled_all x86_64 shared && append YASMFLAGS "-DPIC"
     case "$objformat" in
         elf) enabled debug && append YASMFLAGS "-g dwarf2" ;;
+        macho64)              append YASMFLAGS "-DPIC -DPREFIX" ;;
         *)                    append YASMFLAGS "-DPREFIX"  ;;
     esac
     check_yasm "pabsw xmm0, xmm0" && enable yasm
@@ -1635,14 +1640,16 @@ check_func  getrusage
 check_func  inet_aton $network_extralibs
 check_func  memalign
 check_func  mkstemp
-check_func2 windows.h GetProcessTimes
+check_func_headers windows.h GetProcessTimes
 
 check_header byteswap.h
 check_header conio.h
 check_header dlfcn.h
 check_header malloc.h
+check_header poll.h
 check_header sys/mman.h
 check_header sys/resource.h
+check_header sys/select.h
 check_header termios.h
 
 if ! enabled_any memalign memalign_hack && enabled need_memalign ; then
@@ -1652,13 +1659,6 @@ fi
 enabled  zlib && check_lib  zlib.h      zlibVersion -lz   || disable  zlib
 enabled bzlib && check_lib bzlib.h BZ2_bzlibVersion -lbz2 || disable bzlib
 
-# ffserver uses poll(),
-# if it's not found we can emulate it using select().
-if enabled ffserver; then
-    check_header poll.h
-    check_header sys/select.h
-fi
-
 # check for some common methods of building with pthread support
 # do this before the optional library checks as some of them require pthreads
 if enabled pthreads; then
@@ -1697,7 +1697,6 @@ done
 
 # these are off by default, so fail if requested and not available
 enabled avisynth   && require2 vfw32 "windows.h vfw.h" AVIFileInit -lvfw32
-enabled liba52     && require  liba52 a52dec/a52.h a52_init -la52
 enabled libamr_nb  && require  libamrnb amrnb/interf_dec.h Speech_Decode_Frame_init -lamrnb -lm
 enabled libamr_wb  && require  libamrwb amrwb/dec_if.h D_IF_init -lamrwb -lm
 enabled libdirac   && add_cflags "$(pkg-config --cflags dirac)" \
@@ -1793,7 +1792,7 @@ if enabled network; then
     elif check_header winsock2.h ; then
         network_extralibs="-lws2_32"
         check_type ws2tcpip.h socklen_t
-        check_func2 winsock2.h closesocket
+        check_func_headers winsock2.h closesocket
     fi
 fi
 
@@ -1816,8 +1815,9 @@ EOF
 
 check_header linux/videodev.h
 check_header linux/videodev2.h
+check_header sys/videoio.h
 
-check_func2 "windows.h vfw.h" capCreateCaptureWindow -lvfw32
+check_func_headers "windows.h vfw.h" capCreateCaptureWindow -lvfw32
 
 # check for ioctl_meteor.h, ioctl_bt848.h and alternatives
 { check_header dev/bktr/ioctl_meteor.h &&
@@ -1874,7 +1874,7 @@ check_cflags -fno-math-errno
 check_cflags -fno-signed-zeros
 
 # add some flags for Intel C Compiler
-if $cc --version | grep -q Intel; then
+if $cc --version 2> /dev/null | grep -q Intel; then
   # Just warnings, no remarks
   check_cflags -w1
   # -wd: Disable following warnings
@@ -1894,7 +1894,7 @@ if enabled shared; then
     # LIBOBJFLAGS may have already been set in the OS configuration
     if test -z "$LIBOBJFLAGS" ; then
         case "$arch" in
-            x86_64|ia64|alpha|sparc*|power*|parisc*) LIBOBJFLAGS='$(PIC)' ;;
+            x86_64|ia64|alpha|sparc*|power*|parisc*|mips*) LIBOBJFLAGS='$(PIC)' ;;
         esac
     fi
 fi
@@ -1950,6 +1950,9 @@ echo "ARCH                      $arch ($cpu)"
 if test "$build_suffix" != ""; then
     echo "build suffix              $build_suffix"
 fi
+if test "$extra_version" != ""; then
+    echo "version string suffix     $extra_version"
+fi
 echo "big-endian                ${bigendian-no}"
 if test $arch = "x86_32" -o $arch = "x86_64"; then
     echo "yasm                      ${yasm-no}"
@@ -1999,8 +2002,6 @@ if enabled sdl_too_old; then
 fi
 echo "Sun medialib support      ${mlib-no}"
 echo "AVISynth enabled          ${avisynth-no}"
-echo "liba52 support            ${liba52-no}"
-echo "liba52 dlopened           ${liba52bin-no}"
 echo "libamr-nb support         ${libamr_nb-no}"
 echo "libamr-wb support         ${libamr_wb-no}"
 echo "libdc1394 support         ${libdc1394-no}"
@@ -2080,6 +2081,7 @@ echo "LIBNAME=$LIBNAME" >> config.mak
 echo "SLIBPREF=$SLIBPREF" >> config.mak
 echo "SLIBSUF=$SLIBSUF" >> config.mak
 echo "EXESUF=$EXESUF" >> config.mak
+echo "EXTRA_VERSION=$extra_version" >> config.mak
 echo "DEPEND_CMD=$DEPEND_CMD" >> config.mak
 
 if enabled bigendian; then
@@ -2155,7 +2157,7 @@ echo "BUILD_ROOT=\"$PWD\"" >> config.mak
 # Apparently it's not possible to portably echo a backslash.
 enabled asmalign_pot &&
     printf '#define ASMALIGN(ZEROBITS) ".align " #ZEROBITS "\\n\\t"\n' >> $TMPH ||
-    printf '#define ASMALIGN(ZEROBITS) ".align 1<<" #ZEROBITS "\\n\\t"\n' >> $TMPH
+    printf '#define ASMALIGN(ZEROBITS) ".align 1 << " #ZEROBITS "\\n\\t"\n' >> $TMPH
 
 echo "#define EXTERN_PREFIX \"${extern_prefix}\"" >> $TMPH
 
@@ -2242,7 +2244,7 @@ cat <<EOF > $name/$name-uninstalled.pc
 prefix=
 exec_prefix=
 libdir=\${pcfiledir}
-includedir=\${pcfiledir}/..
+includedir=${source_path}
 
 Name: $name
 Description: $comment