X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=configure;h=700de7460d30b419106c46ce3eb5e9c8ef267294;hb=e9afa2f4dd9a1340c1538a580720864e90c83e3b;hp=90b8ca42367ad2e27605e7ac7340e86d16e5226d;hpb=b5c950c4f43f4d2398b78ac00b62b890edc337b2;p=ffmpeg diff --git a/configure b/configure index 90b8ca42367..700de7460d3 100755 --- a/configure +++ b/configure @@ -27,7 +27,9 @@ 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-sunmlib use Sun medialib [default=no]" +echo " --enable-pthreads use pthreads [default=no]" echo "" echo "Advanced options (experts only):" echo " --source-path=PATH path of source code [$source_path]" @@ -147,6 +149,7 @@ debug="yes" extralibs="-lm" simpleidct="yes" bigendian="no" +inttypes="yes" emu_fast_int="no" vhook="default" dlfcn="no" @@ -169,6 +172,7 @@ amr_nb="no" amr_wb="no" amr_nb_fixed="no" sunmlib="no" +pthreads="no" # OS specific targetos=`uname -s` @@ -237,7 +241,7 @@ SHFLAGS="-dynamiclib" extralibs="" darwin="yes" strip="strip -x" -LDFLAGS="-d" +LDFLAGS="-Wl,-d" FFSLDFLAGS=-Wl,-bind_at_load ;; MINGW32*) @@ -409,8 +413,12 @@ for opt do ;; --enable-amr_nb-fixed) amr_nb_fixed="yes" ;; + --enable-amr_wb) amr_wb="yes" + ;; --enable-sunmlib) sunmlib="yes" ;; + --enable-pthreads) pthreads="yes" + ;; esac done @@ -424,23 +432,27 @@ if test $mmx = "default"; then fi #Darwin CC versions +needmdynamicnopic="no" if test $targetos = Darwin; then if test -n "`$cc -v 2>&1 | grep xlc`"; then - 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="-no-cpp-precomp -pipe -fomit-frame-pointer" - ;; - *3.1*) - CFLAGS="-no-cpp-precomp -pipe -fomit-frame-pointer -force_cpusubtype_ALL -Wno-sign-compare" + CFLAGS="$CFLAGS -no-cpp-precomp -pipe -fomit-frame-pointer" ;; - *3.3*) - CFLAGS="-no-cpp-precomp -pipe -fomit-frame-pointer -mdynamic-no-pic -force_cpusubtype_ALL -Wno-sign-compare" + *3.*) + CFLAGS="$CFLAGS -no-cpp-precomp -pipe -fomit-frame-pointer -force_cpusubtype_ALL -Wno-sign-compare" + if test "$lshared" = no; then + needmdynamicnopic="yes" + fi ;; *) - CFLAGS="-no-cpp-precomp -pipe -fomit-frame-pointer -mdynamic-no-pic" + CFLAGS="$CFLAGS -no-cpp-precomp -pipe -fomit-frame-pointer" + if test "$lshared" = no; then + needmdynamicnopic="yes" + fi ;; esac fi @@ -626,6 +638,17 @@ fi fi +# --- +# *inttypes.h* test +cat > $TMPC << EOF +#include +int main(int argc, char ** argv){ + return 0; +} +EOF + +$cc -o $TMPE $TMPC 2>/dev/null || inttypes="no" + # --- # *int_fast* test cat > $TMPC << EOF @@ -684,7 +707,7 @@ if (zlibVersion() != ZLIB_VERSION) return 0; } EOF -$cc -o $TMPE $TMPC -lz 2> /dev/null || zlib="no" +$cc $CFLAGS -o $TMPE $TMPC -lz 2> /dev/null || zlib="no" # $TMPE 2> /dev/null > /dev/null || zlib="no" # XXX: more tests needed - runtime test fi @@ -832,7 +855,7 @@ if test "$sdl" = "no" ; then fi if test "$debug" = "yes"; then - CFLAGS="$CFLAGS -g" + CFLAGS="-g $CFLAGS" fi if test "$optimize" = "small"; then @@ -845,7 +868,7 @@ if test "$optimize" = "yes"; then CFLAGS="$CFLAGS -O5" LDFLAGS="$LDFLAGS -O5" else - CFLAGS="$CFLAGS -O3" + CFLAGS="-O3 $CFLAGS" fi fi @@ -863,6 +886,7 @@ echo "C compiler $cc" echo "make $make" echo "CPU $cpu ($tune)" echo "Big Endian $bigendian" +echo "inttypes.h $inttypes" echo "broken inttypes.h $emu_fast_int" if test $cpu = "x86"; then echo "MMX enabled $mmx" @@ -899,6 +923,7 @@ echo "Imlib2 support $imlib2" echo "freetype support $freetype2" fi echo "Sun medialib support" $sunmlib +echo "pthreads support" $pthreads echo "AMR-NB float support" $amr_nb echo "AMR-NB fixed support" $amr_nb_fixed echo "AMR-WB float support" $amr_wb @@ -916,7 +941,16 @@ echo "CC=$cc" >> config.mak echo "AR=$ar" >> config.mak echo "RANLIB=$ranlib" >> config.mak echo "STRIP=$strip" >> config.mak + +# 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 + CFLAGS="$CFLAGS -mdynamic-no-pic" +fi + echo "OPTFLAGS=$CFLAGS" >> config.mak +echo "SHCFLAGS=$SHCFLAGS">>config.mak echo "LDFLAGS=$LDFLAGS" >> config.mak echo "FFSLDFLAGS=$FFSLDFLAGS" >> config.mak echo "SHFLAGS=$SHFLAGS" >> config.mak @@ -956,14 +990,11 @@ if test "$bigendian" = "yes" ; then echo "WORDS_BIGENDIAN=yes" >> config.mak echo "#define WORDS_BIGENDIAN 1" >> $TMPH fi +if test "$inttypes" != "yes" ; then + echo "#define EMULATE_INTTYPES 1" >> $TMPH +fi if test "$emu_fast_int" = "yes" ; then -#note, we dont try to emulate fast64 - echo "typedef signed char int_fast8_t" >> $TMPH - echo "typedef signed int int_fast16_t" >> $TMPH - echo "typedef signed int int_fast32_t" >> $TMPH - echo "typedef unsigned char uint_fast8_t" >> $TMPH - echo "typedef unsigned int uint_fast16_t" >> $TMPH - echo "typedef unsigned int uint_fast32_t" >> $TMPH + echo "#define EMULATE_FAST_INT 1" >> $TMPH fi if test "$mmx" = "yes" ; then echo "TARGET_MMX=yes" >> config.mak @@ -1007,6 +1038,11 @@ if test "$sunmlib" = "yes" ; then echo "#define HAVE_MLIB 1" >> $TMPH extralibs="$extralibs -lmlib" fi +if test "$pthreads" = "yes" ; then + echo "HAVE_PTHREADS=yes" >> config.mak + echo "#define HAVE_PTHREADS 1" >> $TMPH + extralibs="$extralibs -lpthread" +fi if test "$sdl" = "yes" ; then echo "CONFIG_SDL=yes" >> config.mak echo "SDL_LIBS=`sdl-config --libs`" >> config.mak @@ -1129,6 +1165,8 @@ fi if test "$mingw32" = "yes" ; then echo "#define CONFIG_WIN32 1" >> $TMPH echo "CONFIG_WIN32=yes" >> config.mak + echo "HAVE_W32THREADS=yes" >> config.mak + echo "#define HAVE_W32THREADS 1" >> $TMPH echo "#ifndef __MINGW32__" >> $TMPH echo "#define __MINGW32__ 1" >> $TMPH echo "#endif" >> $TMPH @@ -1233,6 +1271,7 @@ else echo "REL-5 V5.1.0 from " echo "http://www.3gpp.org/ftp/Specs/latest/Rel-5/26_series/26104-510.zip" echo "and extracted the source to libavcodec/amr_float" + echo "and if u try this on an alpha, u may need to change Word32 to int in amr/typedef.h" echo fi