echo " --help print this message"
echo " --prefix=PREFIX install in PREFIX [$prefix]"
echo " --libdir=DIR install libs in DIR [PREFIX/lib]"
-echo " --mandir=DIR man documentation in DIR [PREFIX/man]"
-echo " --enable-mp3lame enable mp3 encoding via libmp3lame [default=no]"
-echo " --enable-libogg enable ogg support via libogg [default=no]"
-echo " --enable-vorbis enable vorbis support via libvorbis [default=no]"
-echo " --enable-theora enable theora support via libtheora [default=no]"
-echo " --enable-faad enable faad support via libfaad [default=no]"
-echo " --enable-faadbin build faad support with runtime linking [default=no]"
-echo " --enable-faac enable faac support via libfaac [default=no]"
-echo " --enable-libgsm enable gsm support via libgsm [default=no]"
-echo " --enable-xvid enable xvid support via xvidcore [default=no]"
+echo " --mandir=DIR install man page in DIR [PREFIX/man]"
+echo " --enable-mp3lame enable MP3 encoding via libmp3lame [default=no]"
+echo " --enable-libogg enable Ogg support via libogg [default=no]"
+echo " --enable-vorbis enable Vorbis support via libvorbis [default=no]"
+echo " --enable-theora enable Theora support via libtheora [default=no]"
+echo " --enable-faad enable FAAD support via libfaad [default=no]"
+echo " --enable-faadbin build FAAD support with runtime linking [default=no]"
+echo " --enable-faac enable FAAC support via libfaac [default=no]"
+echo " --enable-libgsm enable GSM support via libgsm [default=no]"
+echo " --enable-xvid enable XviD support via xvidcore [default=no]"
echo " --enable-x264 enable H.264 encoding via x264 [default=no]"
-echo " --enable-mingw32 enable mingw32 native/cross windows compile"
-echo " --enable-a52 enable GPL'ed A52 support [default=no]"
+echo " --enable-mingw32 enable MinGW native/cross Windows compile"
+echo " --enable-a52 enable GPLed A52 support [default=no]"
echo " --enable-a52bin open liba52.so.0 at runtime [default=no]"
-echo " --enable-dts enable GPL'ed DTS support [default=no]"
-echo " --enable-pp enable GPL'ed post processing support [default=no]"
+echo " --enable-dts enable GPLed DTS support [default=no]"
+echo " --enable-pp enable GPLed postprocessing support [default=no]"
echo " --enable-shared-pp use libpostproc.so [default=no]"
echo " --enable-shared build shared libraries [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"
+echo " --enable-amr_if2 enable amr_wb IF2 audio codec"
echo " --enable-sunmlib use Sun medialib [default=no]"
echo " --enable-pthreads use pthreads [default=no]"
-echo " --enable-dc1394 enable IIDC-1394 grabbing using libdc1394 and libraw1394 [default=no]"
-echo " --enable-gpl allow use of gpl code, the resulting libav* and ffmpeg will be under gpl [default=no]"
+echo " --enable-dc1394 enable IIDC-1394 grabbing using libdc1394"
+echo " and libraw1394 [default=no]"
+echo " --enable-gpl allow use of GPL code, the resulting libav*"
+echo " and ffmpeg will be under GPL [default=no]"
echo ""
echo "Advanced options (experts only):"
-echo " --source-path=PATH path of source code [$source_path]"
-echo " --cross-prefix=PREFIX use PREFIX for compile tools [$cross_prefix]"
+echo " --source-path=PATH path to source code [$source_path]"
+echo " --cross-prefix=PREFIX use PREFIX for compilation tools [$cross_prefix]"
echo " --cc=CC use C compiler CC [$cc]"
echo " --make=MAKE use specified make [$make]"
echo " --extra-cflags=ECFLAGS add ECFLAGS to CFLAGS [$CFLAGS]"
echo " --extra-libs=ELIBS add ELIBS [$ELIBS]"
echo " --build-suffix=SUFFIX suffix for application specific build []"
echo " --cpu=CPU force cpu to CPU [$cpu]"
-echo " --tune=PROCESSOR tune code for a particular CPU (may fails or misperforms on other CPUs)"
-echo " --powerpc-perf-enable enable performance report on PPC (requires enabling PMC)"
-echo " --disable-mmx disable mmx usage"
+echo " --tune=CPU tune code for a particular CPU"
+echo " (may fail or perform badly on other CPUs)"
+echo " --powerpc-perf-enable enable performance report on PPC"
+echo " (requires enabling PMC)"
+echo " --disable-mmx disable MMX usage"
echo " --disable-iwmmxt disable iwmmxt usage"
echo " --disable-altivec disable AltiVec usage"
echo " --disable-audio-oss disable OSS audio support [default=no]"
echo " --disable-debug disable debugging symbols"
echo " --disable-opts disable compiler optimizations"
echo " --disable-mpegaudio-hp faster (but less accurate)"
-echo " mpegaudio decoding [default=no]"
+echo " MPEG audio decoding [default=no]"
echo " --disable-ffserver disable ffserver build"
echo " --disable-ffplay disable ffplay build"
echo " --enable-small optimize for size instead of speed"
echo " --enable-memalign-hack emulate memalign, interferes with memory debuggers"
echo " --disable-strip disable stripping of executables and shared libraries"
-echo " --enable-codec=codec enables codec"
-echo " --disable-codec=codec disables codec"
+echo " --enable-codec=CODEC enables CODEC"
+echo " --disable-codec=CODEC disables CODEC"
echo " --disable-encoders disables all encoders"
echo " --disable-decoders disables all decoders"
+echo " --disable-muxers disables all muxers"
+echo " --disable-demuxers disables all demuxers"
echo ""
-echo "NOTE: The object files are build at the place where configure is launched"
+echo "NOTE: Object files are built at the place where configure is launched."
exit 1
fi
alpha)
cpu="alpha"
;;
- "Power Macintosh"|ppc)
+ "Power Macintosh"|ppc|powerpc)
cpu="powerpc"
;;
- mips)
+ mips|mipsel)
cpu="mips"
;;
sun4u|sparc64)
sh4)
cpu="sh4"
;;
+ parisc|parisc64)
+ cpu="parisc"
+ ;;
+ s390|s390x)
+ cpu="s390"
+ ;;
+ m68k)
+ cpu="m68k"
+ ;;
+ ia64)
+ cpu="ia64"
+ ;;
*)
cpu="unknown"
;;
optimize="yes"
debug="yes"
dostrip="yes"
+installstrip="-s"
extralibs="-lm"
simpleidct="yes"
bigendian="no"
dlfcn="no"
dlopen="no"
mpegaudio_hp="yes"
-SHFLAGS=-shared
+SHFLAGS='-shared -Wl,-soname,$@.$(LIBVERSION)'
netserver="no"
need_inet_aton="no"
ffserver="yes"
pthreads="no"
gpl="no"
memalignhack="no"
+muxers="yes"
+demuxers="yes"
# OS specific
targetos=`uname -s`
;;
esac
SHFLAGS=-nostart
-# disable linux things
+# disable Linux things
audio_oss="no"
v4l="no"
dv1394="no"
-# enable beos things
+# enable BeOS things
audio_beos="yes"
# no need for libm, but the inet stuff
# Check for BONE
make="gmake"
LDFLAGS="$LDFLAGS -export-dynamic"
case `uname -r` in
-2.*) extralibs="-lossaudio"
+2.*) extralibs="$extralibs -lossaudio"
;;
esac
;;
dv1394="no"
extralibs="-lpoll -lgnugetopt -lm"
make="gmake"
+strip="strip -d"
+installstrip=""
;;
Darwin)
cc="cc"
audio_oss="no"
dv1394="no"
ffserver="no"
-SHFLAGS="-dynamiclib"
+SHFLAGS="-dynamiclib -Wl,-single_module"
extralibs=""
darwin="yes"
strip="strip -x"
-LDFLAGS="-Wl,-d,-search_paths_first"
+installstrip=""
+LDFLAGS="-Wl,-dynamic,-search_paths_first"
+SLIBSUF=".dylib"
FFSLDFLAGS=-Wl,-bind_at_load
;;
MINGW32*)
# Note: the rest of the mingw32 config is done afterwards as mingw32
-# can be forced on command line for linux cross compilation
+# can be forced on the command line for Linux cross compilation.
mingw32="yes"
;;
CYGWIN*)
v4l="no"
audio_oss="yes"
dv1394="no"
-ffserver="no"
+vhook="no"
extralibs=""
cygwin="yes"
EXESUF=".exe"
SLIBSUF=".dll"
EXESUF=".exe"
extralibs=""
+pkg_requires=""
v4l="no"
audio_oss="no"
dv1394="no"
*) ;;
esac
-# From mplayer configure. We need TARGET_OS available
+# From MPlayer configure. We need TARGET_OS available
# to the Makefile, so it can distinguish between flavors
-# of AltiVec on PowerPC
+# of AltiVec on PowerPC.
TARGET_OS=`( uname -s ) 2>&1`
case "$TARGET_OS" in
- Linux|FreeBSD|NetBSD|BSD/OS|OpenBSD|SunOS|QNX|Darwin|GNU|BeOS)
+ Linux|FreeBSD|NetBSD|BSD/OS|OpenBSD|SunOS|QNX|Darwin|GNU|BeOS|MorphOS)
;;
IRIX*)
TARGET_OS=IRIX
--disable-audio-oss) audio_oss="no"
;;
--disable-audio-beos) audio_beos="no"
+ extralibs="$extralibs -lbe -lmedia"
;;
--disable-dv1394) dv1394="no"
;;
;;
--enable-a52bin) a52bin="yes"
;;
- --enable-dts) dts="yes" ; extralibs="$extralibs -ldts"
+ --enable-dts) dts="yes"
+ extralibs="$extralibs -ldts"
;;
--enable-pp) pp="yes"
;;
--enable-shared-pp) shared_pp="yes"
;;
--enable-libgsm) libgsm="yes"
+ extralibs="$extralibs -lgsm"
;;
--enable-mp3lame) mp3lame="yes"
+ extralibs="$extralibs -lmp3lame"
;;
--enable-libogg) libogg="yes"
+ extralibs="$extralibs -logg"
+ pkg_requires="$pkg_requires ogg >= 1.1"
;;
--enable-vorbis) vorbis="yes"
+ extralibs="$extralibs -lvorbis -lvorbisenc"
+ pkg_requires="$pkg_requires vorbis vorbisenc"
;;
--enable-theora) theora="yes"
+ extralibs="$extralibs -ltheora"
+ pkg_requires="$pkg_requires theora"
;;
--enable-faad) faad="yes"
+ extralibs="$extralibs -lfaad"
;;
--enable-faadbin) faadbin="yes"
;;
--enable-faac) faac="yes"
+ extralibs="$extralibs -lfaac"
;;
--enable-xvid) xvid="yes"
+ extralibs="$extralibs -lxvidcore"
;;
- --enable-x264) x264="yes"; extralibs="$extralibs -lx264"
+ --enable-x264) x264="yes"
+ extralibs="$extralibs -lx264"
;;
--enable-dc1394) dc1394="yes"
+ extralibs="$extralibs -ldc1394_control -lraw1394"
+ pkg_requires="$pkg_requires libraw1394"
;;
--disable-vhook) vhook="no"
;;
--enable-amr_nb-fixed) amr_nb_fixed="yes"
;;
--enable-amr_wb) amr_wb="yes"
- ;;
+ ;;
--enable-amr_if2) amr_if2="yes"
;;
--enable-sunmlib) sunmlib="yes"
;;
--disable-decoders) CODEC_LIST="`echo $CODEC_LIST | sed 's/[-_a-zA-Z0-9]*decoder//g'`"
;;
+ --disable-muxers) muxers="no"
+ ;;
+ --disable-demuxers) demuxers="no"
+ ;;
+ *)
+ echo "Unknown option \"$opt\"."
+ echo "See $0 --help for available options."
+ exit 1
+ ;;
esac
done
if test "$theora" = "yes" ; then
if test "$libogg" = "no"; then
- echo "libogg must be enabled to enable Theora"
+ echo "libogg must be enabled to enable Theora."
fail="yes"
theora="no"
fi
if test "$vorbis" = "yes" ; then
if test "$libogg" = "no"; then
- echo "libogg must be enabled to enable Vorbis"
+ echo "libogg must be enabled to enable Vorbis."
fail="yes"
vorbis="no"
fi
if test "$gpl" != "yes"; then
if test "$pp" != "no" -o "$shared_pp" != "no"; then
- echo "The Postprocessing code is under GPL and --enable-gpl is not specified"
+ echo "The Postprocessing code is under GPL and --enable-gpl is not specified."
fail="yes"
fi
if test "$a52" != "no" -o "$a52bin" != "no"; then
- echo "liba52 is under GPL and --enable-gpl is not specified"
+ echo "liba52 is under GPL and --enable-gpl is not specified."
fail="yes"
fi
if test "$xvid" != "no"; then
- echo "libxvidcore is under GPL and --enable-gpl is not specified"
+ echo "libxvidcore is under GPL and --enable-gpl is not specified."
fail="yes"
fi
if test "$x264" != "no"; then
- echo "x264 is under GPL and --enable-gpl is not specified"
+ echo "x264 is under GPL and --enable-gpl is not specified."
fail="yes"
fi
if test "$dts" != "no"; then
- echo "libdts is under GPL and --enable-gpl is not specified"
+ echo "libdts is under GPL and --enable-gpl is not specified."
fail="yes"
fi
-
+
if test "$faad" != "no" -o "$faadbin" != "no"; then
cat > $TMPC << EOF
#include <faad.h>
int main( void ) { return 0; }
EOF
-
+
if $cc $CFLAGS -o $TMPE $TMPC 2> /dev/null ; then
cat > $TMPC << EOF
#include <faad.h>
int main( void ) { return 0; }
EOF
if $cc $CFLAGS -o $TMPE $TMPC 2> /dev/null ; then
- echo "faad2 is under GPL and --enable-gpl is not specified"
+ echo "FAAD2 is under GPL and --enable-gpl is not specified."
fail="yes"
fi
else
faad="no"
faadbin="no"
- echo "faad test failed"
+ echo "FAAD test failed."
fi
fi
-
+
if test "$fail" = "yes"; then
exit 1
fi
fi
-# compute mmx state
+# compute MMX state
if test $mmx = "default"; then
if test $cpu = "x86" -o $cpu = "x86_64"; then
mmx="yes"
# check iwmmxt support
if test $iwmmxt = "default" -a $cpu = "armv4l"; then
cat > $TMPC << EOF
- int main(void) {
+ int main(void) {
__asm__ __volatile__ ("wunpckelub wr6, wr4");
}
EOF
needmdynamicnopic="no"
if test $targetos = Darwin; then
if test -n "`$cc -v 2>&1 | grep xlc`"; then
- CFLAGS="$CFLAGS -qpdf2 -qlanglvl=extc99 -qmaxmem=-1 -qarch=auto -qtune=auto"
+ CFLAGS="$CFLAGS -qpdf2 -qlanglvl=extc99 -qmaxmem=-1 -qarch=auto -qtune=auto"
else
- gcc_version="`$cc -v 2>&1 | grep version | cut -d ' ' -f3-`"
- case "$gcc_version" in
- *2.95*)
- CFLAGS="$CFLAGS -no-cpp-precomp -pipe -fomit-frame-pointer"
- ;;
- *[34].*)
- CFLAGS="$CFLAGS -no-cpp-precomp -pipe -fomit-frame-pointer -force_cpusubtype_ALL -Wno-sign-compare"
- if test "$lshared" = no; then
- needmdynamicnopic="yes"
- fi
- ;;
- *)
- CFLAGS="$CFLAGS -no-cpp-precomp -pipe -fomit-frame-pointer"
- if test "$lshared" = no; then
- needmdynamicnopic="yes"
- fi
- ;;
- esac
+ gcc_version="`$cc -v 2>&1 | grep version | cut -d ' ' -f3-`"
+ case "$gcc_version" in
+ *2.95*)
+ CFLAGS="$CFLAGS -no-cpp-precomp -pipe -fomit-frame-pointer"
+ ;;
+ *[34].*)
+ CFLAGS="$CFLAGS -no-cpp-precomp -pipe -fomit-frame-pointer -force_cpusubtype_ALL -Wno-sign-compare"
+ if test "$lshared" = no; then
+ needmdynamicnopic="yes"
+ fi
+ ;;
+ *)
+ CFLAGS="$CFLAGS -no-cpp-precomp -pipe -fomit-frame-pointer"
+ if test "$lshared" = no; then
+ needmdynamicnopic="yes"
+ fi
+ ;;
+ esac
fi
fi
POWERPCMODE="32bits"
if test $tune != "generic"; then
case $tune in
- 601|ppc601|PowerPC601)
- CFLAGS="$CFLAGS -mcpu=601"
- if test $altivec = "yes"; then
- echo "WARNING: tuning for PPC601 but altivec enabled !";
- fi
- TUNECPU=ppc601
- ;;
- 603*|ppc603*|PowerPC603*)
- CFLAGS="$CFLAGS -mcpu=603"
- if test $altivec = "yes"; then
- echo "WARNING: tuning for PPC603 but altivec enabled !";
- fi
- TUNECPU=ppc603
- ;;
- 604*|ppc604*|PowerPC604*)
- CFLAGS="$CFLAGS -mcpu=604"
- if test $altivec = "yes"; then
- echo "WARNING: tuning for PPC604 but altivec enabled !";
- fi
- TUNECPU=ppc604
- ;;
- G3|g3|75*|ppc75*|PowerPC75*)
- CFLAGS="$CFLAGS -mcpu=750 -mtune=750 -mpowerpc-gfxopt"
- if test $altivec = "yes"; then
- echo "WARNING: tuning for PPC75x but altivec enabled !";
- fi
- TUNECPU=ppc750
- ;;
- G4|g4|745*|ppc745*|PowerPC745*)
- CFLAGS="$CFLAGS -mcpu=7450 -mtune=7450 -mpowerpc-gfxopt"
- if test $altivec = "no"; then
- echo "WARNING: tuning for PPC745x but altivec disabled !";
- fi
- TUNECPU=ppc7450
- ;;
- 74*|ppc74*|PowerPC74*)
- CFLAGS="$CFLAGS -mcpu=7400 -mtune=7400 -mpowerpc-gfxopt"
- if test $altivec = "no"; then
- echo "WARNING: tuning for PPC74xx but altivec disabled !";
- fi
- TUNECPU=ppc7400
- ;;
- G5|g5|970|ppc970|PowerPC970|power4*|Power4*)
- CFLAGS="$CFLAGS -mcpu=970 -mtune=970 -mpowerpc-gfxopt -mpowerpc64"
- if test $altivec = "no"; then
- echo "WARNING: tuning for PPC970 but altivec disabled !";
- fi
- TUNECPU=ppc970
+ 601|ppc601|PowerPC601)
+ CFLAGS="$CFLAGS -mcpu=601"
+ if test $altivec = "yes"; then
+ echo "WARNING: Tuning for PPC601 but AltiVec enabled!";
+ fi
+ TUNECPU=ppc601
+ ;;
+ 603*|ppc603*|PowerPC603*)
+ CFLAGS="$CFLAGS -mcpu=603"
+ if test $altivec = "yes"; then
+ echo "WARNING: Tuning for PPC603 but AltiVec enabled!";
+ fi
+ TUNECPU=ppc603
+ ;;
+ 604*|ppc604*|PowerPC604*)
+ CFLAGS="$CFLAGS -mcpu=604"
+ if test $altivec = "yes"; then
+ echo "WARNING: Tuning for PPC604 but AltiVec enabled!";
+ fi
+ TUNECPU=ppc604
+ ;;
+ G3|g3|75*|ppc75*|PowerPC75*)
+ CFLAGS="$CFLAGS -mcpu=750 -mtune=750 -mpowerpc-gfxopt"
+ if test $altivec = "yes"; then
+ echo "WARNING: Tuning for PPC75x but AltiVec enabled!";
+ fi
+ TUNECPU=ppc750
+ ;;
+ G4|g4|745*|ppc745*|PowerPC745*)
+ CFLAGS="$CFLAGS -mcpu=7450 -mtune=7450 -mpowerpc-gfxopt"
+ if test $altivec = "no"; then
+ echo "WARNING: Tuning for PPC745x but AltiVec disabled!";
+ fi
+ TUNECPU=ppc7450
+ ;;
+ 74*|ppc74*|PowerPC74*)
+ CFLAGS="$CFLAGS -mcpu=7400 -mtune=7400 -mpowerpc-gfxopt"
+ if test $altivec = "no"; then
+ echo "WARNING: Tuning for PPC74xx but AltiVec disabled!";
+ fi
+ TUNECPU=ppc7400
+ ;;
+ G5|g5|970|ppc970|PowerPC970|power4*|Power4*)
+ CFLAGS="$CFLAGS -mcpu=970 -mtune=970 -mpowerpc-gfxopt -mpowerpc64"
+ if test $altivec = "no"; then
+ echo "WARNING: Tuning for PPC970 but AltiVec disabled!";
+ fi
+ TUNECPU=ppc970
POWERPCMODE="64bits"
- ;;
- i[3456]86|pentium|pentiumpro|pentium-mmx|pentium[234]|prescott|k6|k6-[23]|athlon|athlon-tbird|athlon-4|athlon-[mx]p|winchip-c6|winchip2|c3|nocona)
- CFLAGS="$CFLAGS -march=$tune"
- ;;
- *)
- echo "WARNING: unknown CPU \"$tune\", ignored"
- ;;
+ ;;
+ i[3456]86|pentium|pentiumpro|pentium-mmx|pentium[234]|prescott|k6|k6-[23]|athlon|athlon-tbird|athlon-4|athlon-[mx]p|winchip-c6|winchip2|c3|nocona|athlon64|k8|opteron|athlon-fx)
+ CFLAGS="$CFLAGS -march=$tune"
+ ;;
+ *)
+ echo "WARNING: Unknown CPU \"$tune\", ignored."
+ ;;
esac
fi
-# AltiVec flags: The FSF version of GCC differs from the Apple version
+# AltiVec flags: The FSF version of GCC differs from the Apple version
if test $cpu = "powerpc"; then
if test $altivec = "yes"; then
if test -n "`$cc -v 2>&1 | grep version | grep Apple`"; then
fi
fi
-# See if we have <altivec.h>
+# check if we have <altivec.h>
cat > $TMPC << EOF
#include <altivec.h>
int main( void ) { return 0; }
_altivec_h="yes"
fi
-# See does our compiler support Motorola AltiVec C API
+# check if our compiler supports Motorola AltiVec C API
if test $altivec = "yes"; then
if test $_altivec_h = "yes"; then
cat > $TMPC << EOF
$cc $CFLAGS -o $TMPE $TMPC 2> /dev/null || altivec="no"
fi
-# Can only do mmi on mips
+# mmi only available on mips
if test $mmi = "default"; then
if test $cpu = "mips"; then
mmi="yes"
fi
fi
-# See does our compiler support mmi
+# check if our compiler supports mmi
if test $mmi = "yes"; then
cat > $TMPC << EOF
int main(void) {
if test -z "$cross_prefix" ; then
# ---
-# big/little endian test
+# big/little-endian test
cat > $TMPC << EOF
#include <inttypes.h>
int main(int argc, char ** argv){
- volatile uint32_t i=0x01234567;
- return (*((uint8_t*)(&i))) == 0x67;
+ volatile uint32_t i=0x01234567;
+ return (*((uint8_t*)(&i))) == 0x67;
}
EOF
else
-# if cross compiling, cannot launch a program, so make a static guess
+# programs cannot be launched if cross compiling, so make a static guess
if test "$cpu" = "powerpc" -o "$cpu" = "mips" ; then
bigendian="yes"
fi
cat > $TMPC << EOF
#include <inttypes.h>
int main(int argc, char ** argv){
- volatile uint_fast64_t i=0x01234567;
- return 0;
+ volatile uint_fast64_t i=0x01234567;
+ return 0;
}
EOF
fi
if test "$_memalign" = "no" -a "$mmx" = "yes" -a "$memalignhack" != "yes"; then
- echo "error, no memalign() but sse enabled, either disable it or use --enable-memalign-hack"
+ echo "Error, no memalign() but SSE enabled, disable it or use --enable-memalign-hack."
exit 1
fi
EOF
have_lrintf="no"
-if $cc $extralibs -o $TMPE $TMPC 2> /dev/null ; then
+if $cc $CFLAGS $LDFLAGS $extralibs -o $TMPE $TMPC 2> /dev/null ; then
have_lrintf="yes"
# allanc@chickenandporn.com: cannot execute cross-compiled
# code on the host. Only execute if not cross-compiling.
# currently only used on i386 for MMX builtins
cat > $TMPC << EOF
#include <xmmintrin.h>
-int main(void) {
+int main(void) {
#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
return 0;
#else
ldl=-ldl
-if $cc -o $TMPE $TMPC -ldl > /dev/null 2>&1 ; then
+if $cc $CFLAGS $LDFLAGS -o $TMPE $TMPC -ldl > /dev/null 2>&1 ; then
dlfcn=yes
dlopen=yes
fi
-if $cc -o $TMPE $TMPC > /dev/null 2>&1 ; then
+if $cc $CFLAGS $LDFLAGS -o $TMPE $TMPC > /dev/null 2>&1 ; then
dlfcn=yes
dlopen=yes
ldl=""
int main( void ) { return (int) dlopen("foo", 0); }
EOF
-if $cc -o $TMPE $TMPC -ldl > /dev/null 2>&1 ; then
+if $cc $CFLAGS $LDFLAGS -o $TMPE $TMPC -ldl > /dev/null 2>&1 ; then
dlopen=yes
fi
-if $cc -o $TMPE $TMPC > /dev/null 2>&1 ; then
+if $cc $CFLAGS $LDFLAGS -o $TMPE $TMPC > /dev/null 2>&1 ; then
dlopen=yes
ldl=""
fi
##########################################
-# imlib probe
+# imlib check
cat > $TMPC << EOF
#include <X11/Xlib.h>
fi
##########################################
-# freetype probe
+# FreeType check
cat > $TMPC << EOF
#include <ft2build.h>
fi
##########################################
-# SDL probe
+# SDL check
cat > $TMPC << EOF
#include <SDL.h>
fi
##########################################
-# texi2html probe
+# texi2html check
texi2html=no
if (texi2html -version) >/dev/null 2>&1; then
if test "$network" = "yes" ; then
##########################################
-# IPv6 probe
+# IPv6 check
cat > $TMPC << EOF
#include <sys/types.h>
case "`$cc -v 2>&1 | grep version`" in
*gcc*)
- CFLAGS="-Wall -Wno-switch $CFLAGS"
- ;;
+ CFLAGS="-Wall -Wno-switch $CFLAGS"
+ ;;
*)
- ;;
+ ;;
esac
if test "$sdl" = "no" ; then
fi
if test "$debug" = "yes"; then
- CFLAGS="-g $CFLAGS"
+ CFLAGS="-g $CFLAGS"
fi
if test "$optimize" = "small"; then
if test "$optimize" = "yes"; then
if test -n "`$cc -v 2>&1 | grep xlc`"; then
- CFLAGS="$CFLAGS -O5"
- LDFLAGS="$LDFLAGS -O5"
+ CFLAGS="$CFLAGS -O5"
+ LDFLAGS="$LDFLAGS -O5"
else
- CFLAGS="-O3 $CFLAGS"
+ CFLAGS="-O3 $CFLAGS"
fi
fi
if test "$lshared" = "yes" ; then
# LIBOBJFLAGS may have already been set in the OS configuration
if test -z "$LIBOBJFLAGS" ; then
- if test "$cpu" = "x86_64" -o "$cpu" = "ia64" ; then
+ if test "$cpu" = "x86_64" -o "$cpu" = "ia64" -o "$cpu" = "alpha" ; then
LIBOBJFLAGS="\$(PIC)"
fi
fi
mandir="${prefix}/man"
fi
-echo "Install prefix $prefix"
-echo "Source path $source_path"
+echo "install prefix $prefix"
+echo "source path $source_path"
echo "C compiler $cc"
echo "make $make"
echo "CPU $cpu ($tune)"
if test "$BUILDSUF" != ""; then
-echo "Build suffix $BUILDSUF"
+echo "build suffix $BUILDSUF"
fi
-echo "Big Endian $bigendian"
+echo "big-endian $bigendian"
echo "inttypes.h $inttypes"
echo "broken inttypes.h $emu_fast_int"
if test $cpu = "x86" -o $cpu = "x86_64"; then
echo "libgsm enabled $libgsm"
echo "mp3lame enabled $mp3lame"
echo "libogg enabled $libogg"
-echo "vorbis enabled $vorbis"
-echo "theora enabled $theora"
-echo "faad enabled $faad"
+echo "Vorbis enabled $vorbis"
+echo "Theora enabled $theora"
+echo "FAAD enabled $faad"
echo "faadbin enabled $faadbin"
-echo "faac enabled $faac"
-echo "xvid enabled $xvid"
+echo "FAAC enabled $faac"
+echo "XviD enabled $xvid"
echo "x264 enabled $x264"
echo "a52 support $a52"
echo "a52 dlopened $a52bin"
-echo "dts support $dts"
+echo "DTS support $dts"
echo "pp support $pp"
echo "debug symbols $debug"
echo "strip symbols $dostrip"
echo "optimize $optimize"
echo "shared pp $shared_pp"
-echo "Video hooking $vhook"
+echo "video hooking $vhook"
echo "SDL support $sdl"
if test $sdl_too_old = "yes"; then
-echo "-> Your SDL version is too old - please upgrade to have FFplay/SDL support"
+echo "-> Your SDL version is too old - please upgrade to have FFplay/SDL support."
fi
if test "$vhook" = "yes" ; then
echo "Imlib2 support $imlib2"
-echo "freetype support $freetype2"
+echo "FreeType support $freetype2"
fi
echo "Sun medialib support" $sunmlib
echo "pthreads support" $pthreads
echo "License: GPL"
fi
-echo "Creating config.mak and config.h"
+echo "Creating config.mak and config.h..."
date >> config.log
echo " $0 $FFMPEG_CONFIGURATION" >> config.log
-echo "# Automatically generated by configure - do not modify" > config.mak
-echo "/* Automatically generated by configure - do not modify */" > $TMPH
+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 "prefix=$prefix" >> config.mak
-echo "libdir=$libdir" >> config.mak
-echo "bindir=$bindir" >> config.mak
-echo "mandir=$mandir" >> config.mak
+echo "prefix=\$(DESTDIR)$prefix" >> config.mak
+echo "libdir=\$(DESTDIR)$libdir" >> config.mak
+echo "bindir=\$(DESTDIR)$bindir" >> config.mak
+echo "mandir=\$(DESTDIR)$mandir" >> config.mak
echo "MAKE=$make" >> config.mak
echo "CC=$cc" >> config.mak
echo "AR=$ar" >> config.mak
echo "RANLIB=$ranlib" >> config.mak
if test "$dostrip" = "yes" ; then
echo "STRIP=$strip" >> config.mak
-echo "INSTALLSTRIP=-s" >> config.mak
+echo "INSTALLSTRIP=$installstrip" >> config.mak
else
echo "STRIP=echo ignoring strip" >> config.mak
echo "INSTALLSTRIP=" >> config.mak
fi
-# SHCFLAGS is a copy of CFLAGS without -mdynamic-no-pic. Used when building
+# SHCFLAGS is a copy of CFLAGS without -mdynamic-no-pic, used when building
# shared modules on OS/X (vhook/Makefile).
SHCFLAGS=$CFLAGS
if test "$needmdynamicnopic" = yes; then
elif test "$cpu" = "sh4" ; then
echo "TARGET_ARCH_SH4=yes" >> config.mak
echo "#define ARCH_SH4 1" >> $TMPH
+elif test "$cpu" = "parisc" ; then
+ echo "TARGET_ARCH_PARISC=yes" >> config.mak
+ echo "#define ARCH_PARISC 1" >> $TMPH
+elif test "$cpu" = "s390" ; then
+ echo "TARGET_ARCH_S390=yes" >> config.mak
+ echo "#define ARCH_S390 1" >> $TMPH
+elif test "$cpu" = "m68k" ; then
+ echo "TARGET_ARCH_M68K=yes" >> config.mak
+ echo "#define ARCH_M68K 1" >> $TMPH
+elif test "$cpu" = "ia64" ; then
+ echo "TARGET_ARCH_IA64=yes" >> config.mak
+ echo "#define ARCH_IA64 1" >> $TMPH
fi
echo "#define TUNECPU $TUNECPU" >> $TMPH
if test "$bigendian" = "yes" ; then
echo "BUILD_VHOOK=yes" >> config.mak
echo "#define HAVE_VHOOK 1" >> $TMPH
fi
+
+lavc_version=`grep '#define LIBAVCODEC_VERSION ' "$source_path/libavcodec/avcodec.h" | sed 's/[^0-9\.]//g'`
+lavf_version=`grep '#define LIBAVFORMAT_VERSION ' "$source_path/libavformat/avformat.h" | sed 's/[^0-9\.]//g'`
+lavu_version=`grep '#define LIBAVUTIL_VERSION ' "$source_path/libavutil/avutil.h" | sed 's/[^0-9\.]//g'`
+
+
+
if test "$lshared" = "yes" ; then
echo "BUILD_SHARED=yes" >> config.mak
echo "PIC=-fPIC -DPIC" >> config.mak
+ echo "SPPMAJOR=${lavc_version/.*/}" >> config.mak
+ echo "SPPVERSION=$lavc_version" >> config.mak
+ echo "LAVCMAJOR=${lavc_version/.*/}" >> config.mak
+ echo "LAVCVERSION=$lavc_version" >> config.mak
+ echo "LAVFMAJOR=${lavf_version/.*/}" >> config.mak
+ echo "LAVFVERSION=$lavf_version" >> config.mak
+ echo "LAVUMAJOR=${lavu_version/.*/}" >> config.mak
+ echo "LAVUVERSION=$lavu_version" >> config.mak
fi
echo "EXTRALIBS=$extralibs" >> config.mak
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.
+# If you do not want to use encoders, disable them.
echo "#define CONFIG_ENCODERS 1" >> $TMPH
echo "CONFIG_ENCODERS=yes" >> config.mak
-# if you do not want to use decoders, disable that.
+# If you do not want to use decoders, disable them.
echo "#define CONFIG_DECODERS 1" >> $TMPH
echo "CONFIG_DECODERS=yes" >> config.mak
+# muxers
+if test "$muxers" = "yes" ; then
+ echo "#define CONFIG_MUXERS 1" >> $TMPH
+ echo "CONFIG_MUXERS=yes" >> config.mak
+fi
+
+# demuxers
+if test "$demuxers" = "yes" ; then
+ echo "#define CONFIG_DEMUXERS 1" >> $TMPH
+ echo "CONFIG_DEMUXERS=yes" >> config.mak
+fi
+
# AC3
if test "$a52" = "yes" ; then
echo "#define CONFIG_AC3 1" >> $TMPH
fi
fi
-# mpeg audio high precision mode
+# MPEG audio high precision mode
if test "$mpegaudio_hp" = "yes" ; then
echo "#define CONFIG_MPEGAUDIO_HP 1" >> $TMPH
fi
# build tree in object directory if source path is different from current one
if test "$source_path_used" = "yes" ; then
- DIRS="doc libavformat libavcodec libavcodec/alpha libavcodec/armv4l \
- libavcodec/i386 libavcodec/sparc libavcodec/mlib \
- libavcodec/ppc libavcodec/liba52 libavcodec/libpostproc tests vhook"
- FILES="Makefile libavformat/Makefile libavcodec/Makefile \
- libavcodec/libpostproc/Makefile tests/Makefile vhook/Makefile \
- doc/Makefile doc/texi2pod.pl"
+ DIRS="\
+ doc \
+ libavformat \
+ libavcodec \
+ libavcodec/alpha \
+ libavcodec/armv4l \
+ libavcodec/i386 \
+ libavcodec/sparc \
+ libavcodec/mlib \
+ libavcodec/ppc \
+ libavcodec/liba52 \
+ libavcodec/libpostproc \
+ libavutil \
+ tests \
+ vhook \
+ "
+ FILES="\
+ Makefile \
+ libavformat/Makefile \
+ libavcodec/Makefile \
+ libavcodec/libpostproc/Makefile \
+ libavutil/Makefile \
+ tests/Makefile \
+ vhook/Makefile \
+ doc/Makefile \
+ doc/texi2pod.pl \
+ "
for dir in $DIRS ; do
mkdir -p $dir
done
diff $TMPH config.h >/dev/null 2>&1
if test $? -ne 0 ; then
- mv -f $TMPH config.h
+ mv -f $TMPH config.h
else
- echo "config.h is unchanged"
+ echo "config.h is unchanged"
fi
rm -f $TMPO $TMPC $TMPE $TMPS $TMPH
-# build pkg-config files libavcodec.pc, libavformat.pc and libpostproc.pc
+# build pkg-config files libav*.pc and libpostproc.pc
+# libavutil.pc
+cat <<EOF >libavutil.pc
+prefix=$prefix
+exec_prefix=\${prefix}
+libdir=\${exec_prefix}/lib
+includedir=\${prefix}/include
+
+Name: libavutil
+Description: FFmpeg utility library
+Version: $lavu_version
+Requires:
+Conflicts:
+Libs: -L\${libdir} -lavutil
+Cflags: -I\${includedir} -I\${includedir}/ffmpeg
+EOF
-lavc_build=`grep '#define LIBAVCODEC_BUILD' "$source_path/libavcodec/avcodec.h" | sed 's/[^0-9]//g'`
-lavf_build=`grep '#define LIBAVFORMAT_BUILD' "$source_path/libavformat/avformat.h" | sed 's/[^0-9]//g'`
+cat <<EOF >libavutil-uninstalled.pc
+prefix=
+exec_prefix=
+libdir=\${pcfiledir}/libavutil
+includedir=\${pcfiledir}/libavutil
-requires=
-test "$libogg" = "yes" && requires="$requires ogg >= 1.1"
-test "$vorbis" = "yes" && requires="$requires vorbis"
-test "$theora" = "yes" && requires="$requires theora"
+Name: libavutil
+Description: FFmpeg utility library
+Version: $lavu_version
+Requires:
+Conflicts:
+Libs: \${libdir}/${LIBPREF}avutil${LIBSUF}
+Cflags: -I\${includedir}
+EOF
# libavcodec.pc
cat <<EOF >libavcodec.pc
Name: libavcodec
Description: FFmpeg codec library
-Version: $version-$lavc_build
-Requires: $requires
+Version: $lavc_version
+Requires: $pkg_requires libavutil = $lavu_version
Conflicts:
Libs: -L\${libdir} -lavcodec $extralibs
Cflags: -I\${includedir} -I\${includedir}/ffmpeg
Name: libavcodec
Description: FFmpeg codec library
-Version: $version-$lavc_build
-Requires: $requires
+Version: $lavc_version
+Requires: $pkg_requires libavutil = $lavu_version
Conflicts:
Libs: \${libdir}/${LIBPREF}avcodec${LIBSUF} $extralibs
Cflags: -I\${includedir}
Name: libavformat
Description: FFmpeg container format library
-Version: $version-$lavf_build
-Requires: $requires libavcodec = $version-$lavc_build
+Version: $lavf_version
+Requires: $pkg_requires libavcodec = $lavc_version
Conflicts:
Libs: -L\${libdir} -lavformat $extralibs
Cflags: -I\${includedir} -I\${includedir}/ffmpeg
Name: libavformat
Description: FFmpeg container format library
-Version: $version-$lavf_build
-Requires: $requires libavcodec = $version-$lavc_build
+Version: $lavf_version
+Requires: $pkg_requires libavcodec = $lavc_version
Conflicts:
Libs: \${libdir}/${LIBPREF}avformat${LIBSUF} $extralibs
Cflags: -I\${includedir}
Name: libpostproc
Description: FFmpeg post processing library
-Version: $version
-Requires:
+Version: $lavc_version
+Requires:
Conflicts:
Libs: -L\${libdir} -lpostproc
Cflags: -I\${includedir} -I\${includedir}/postproc
Name: libpostproc
Description: FFmpeg post processing library
-Version: $version
-Requires:
+Version: $lavc_version
+Requires:
Conflicts:
Libs: \${libdir}/${LIBPREF}postproc${LIBSUF}
Cflags: -I\${includedir}