]> git.sesse.net Git - ffmpeg/blobdiff - configure
10000l
[ffmpeg] / configure
index 8409bba518c4d87f825a472da1d38dbf73a5cf54..d70c81f62958166b88484b90523254efb36b804b 100755 (executable)
--- a/configure
+++ b/configure
@@ -147,6 +147,7 @@ debug="yes"
 extralibs="-lm"
 simpleidct="yes"
 bigendian="no"
+emu_fast_int="no"
 vhook="default"
 dlfcn="no"
 dlopen="no"
@@ -423,6 +424,7 @@ 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"
@@ -432,14 +434,17 @@ if test $targetos = Darwin; then
            *2.95*) 
                CFLAGS="-no-cpp-precomp -pipe -fomit-frame-pointer"
                ;;
-           *3.1*)
+           *3.*)
                CFLAGS="-no-cpp-precomp -pipe -fomit-frame-pointer -force_cpusubtype_ALL -Wno-sign-compare"
-               ;;
-           *3.3*)
-               CFLAGS="-no-cpp-precomp -pipe -fomit-frame-pointer -mdynamic-no-pic -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="-no-cpp-precomp -pipe -fomit-frame-pointer"
+               if test "$lshared" = no; then
+                  needmdynamicnopic="yes"
+               fi
                ;;
        esac
     fi
@@ -625,6 +630,18 @@ fi
 
 fi
 
+# ---
+# *int_fast* test
+cat > $TMPC << EOF
+#include <inttypes.h>
+int main(int argc, char ** argv){
+       volatile uint_fast64_t i=0x01234567;
+       return 0;
+}
+EOF
+
+$cc -o $TMPE $TMPC 2>/dev/null || emu_fast_int="yes"
+
 # ---
 # check availability of some header files
 
@@ -850,6 +867,7 @@ echo "C compiler       $cc"
 echo "make             $make"
 echo "CPU              $cpu ($tune)"
 echo "Big Endian       $bigendian"
+echo "broken inttypes.h $emu_fast_int"
 if test $cpu = "x86"; then
 echo "MMX enabled      $mmx"
 echo "Vector Builtins  $builtin_vector"
@@ -902,7 +920,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
@@ -942,6 +969,9 @@ if test "$bigendian" = "yes" ; then
   echo "WORDS_BIGENDIAN=yes" >> config.mak
   echo "#define WORDS_BIGENDIAN 1" >> $TMPH
 fi
+if test "$emu_fast_int" = "yes" ; then
+  echo "#define EMULATE_FAST_INT 1" >> $TMPH
+fi
 if test "$mmx" = "yes" ; then
   echo "TARGET_MMX=yes" >> config.mak
   echo "#define HAVE_MMX 1" >> $TMPH