]> git.sesse.net Git - ffmpeg/blobdiff - configure
Original Commit: r49 | ods15 | 2006-09-23 12:52:21 +0300 (Sat, 23 Sep 2006) | 3 lines
[ffmpeg] / configure
index 9e1b6e375bb532691ed121018f28adc22b7e6471..60e45190bfe5702813236f2d0ac3e27fff1eabb6 100755 (executable)
--- a/configure
+++ b/configure
@@ -78,6 +78,7 @@ show_help(){
   echo "  --powerpc-perf-enable    enable performance report on PPC"
   echo "                           (requires enabling PMC)"
   echo "  --disable-mmx            disable MMX usage"
+  echo "  --disable-armv5te        disable armv5te usage"
   echo "  --disable-iwmmxt         disable iwmmxt usage"
   echo "  --disable-altivec        disable AltiVec usage"
   echo "  --disable-audio-oss      disable OSS audio support [default=no]"
@@ -345,6 +346,7 @@ cpu=`uname -m`
 tune="generic"
 powerpc_perf="no"
 mmx="default"
+armv5te="default"
 iwmmxt="default"
 altivec="default"
 mmi="default"
@@ -362,7 +364,7 @@ case "$cpu" in
     fi
   ;;
   # armv4l is a subset of armv5tel
-  armv4l|armv5tel)
+  arm|armv4l|armv5tel)
     cpu="armv4l"
   ;;
   alpha)
@@ -446,7 +448,7 @@ dlfcn="no"
 dlopen="no"
 mpegaudio_hp="yes"
 SHFLAGS='-shared -Wl,-soname,$@'
-VHOOKSHFLAGS="$SHFLAGS"
+VHOOKSHFLAGS='$(SHFLAGS)'
 netserver="no"
 need_inet_aton="no"
 protocols="yes"
@@ -602,7 +604,8 @@ v4l="no"
 v4l2="no"
 audio_oss="yes"
 dv1394="no"
-vhook="no"
+VHOOKSHFLAGS="-shared -L../libavformat -L../libavcodec -L../libavutil"
+VHOOKLIBS='-lavformat$(BUILDSUF) -lavcodec$(BUILDSUF) -lavutil$(BUILDSUF) $(EXTRALIBS)'
 extralibs=""
 EXESUF=".exe"
 SLIBPREF="cyg"
@@ -719,6 +722,8 @@ for opt do
   ;;
   --disable-mmx) mmx="no"
   ;;
+  --disable-armv5te) armv5te="no"
+  ;;
   --disable-iwmmxt) iwmmxt="no"
   ;;
   --disable-altivec) altivec="no"
@@ -999,16 +1004,6 @@ if test $mmx = "default"; then
     fi
 fi
 
-# check iwmmxt support
-if test $iwmmxt = "default" -a $cpu = "armv4l"; then
-    iwmmxt=no
-    check_cc <<EOF && iwmmxt=yes
-        int main(void) {
-        __asm__ __volatile__ ("wunpckelub wr6, wr4");
-        }
-EOF
-fi
-
 #Darwin CC versions
 needmdynamicnopic="no"
 if test $targetos = Darwin; then
@@ -1115,6 +1110,20 @@ if test $tune != "generic"; then
     esac
 fi
 
+# make sure we can execute files in $TMPDIR
+cat >$TMPE 2>>$logfile <<EOF
+#! /bin/sh
+EOF
+chmod +x $TMPE >>$logfile 2>&1
+if ! $TMPE >>$logfile 2>&1; then
+    cat <<EOF
+Unable to create and execute files in $TMPDIR1.  Set the TMPDIR environment
+variable to another directory.
+EOF
+    die "Sanity test failed."
+fi
+rm $TMPE
+
 # compiler sanity check
 check_exec <<EOF
 int main(){
@@ -1125,6 +1134,7 @@ if test "$?" != 0; then
     echo "$cc is unable to create an executable file."
     if test -z "$cross_prefix" -a "$cross_compile" = no; then
         echo "If $cc is a cross-compiler, use the --cross-compile option."
+        echo "Only do this if you know what cross compiling means."
     fi
     die "C compiler test failed."
 fi
@@ -1161,6 +1171,26 @@ int main(void) {
 EOF
 fi
 
+# check armv5te instructions support
+if test $armv5te = "default" -a $cpu = "armv4l"; then
+    armv5te=no
+    check_cc <<EOF && armv5te=yes
+        int main(void) {
+        __asm__ __volatile__ ("qadd r0, r0, r0");
+        }
+EOF
+fi
+
+# check iwmmxt support
+if test $iwmmxt = "default" -a $cpu = "armv4l"; then
+    iwmmxt=no
+    check_cc <<EOF && iwmmxt=yes
+        int main(void) {
+        __asm__ __volatile__ ("wunpckelub wr6, wr4");
+        }
+EOF
+fi
+
 # mmi only available on mips
 if test $mmi = "default"; then
     if test $cpu = "mips"; then
@@ -1361,6 +1391,14 @@ if test "$vhook" = "yes" -o "$a52bin" = "yes" -o "$faadbin" = "yes"; then
     add_extralibs $ldl
 fi
 
+if test "$targetos" = "CYGWIN" -a "$lstatic" = "yes" ; then
+    vhook="no"
+    echo
+    echo "At the moment vhooks don't work on Cygwin static builds."
+    echo "Patches welcome."
+    echo
+fi
+
 if enabled vhook; then
     check_ldflags -rdynamic
     check_ldflags -export-dynamic
@@ -1526,6 +1564,7 @@ if test $cpu = "x86" -o $cpu = "x86_64"; then
     echo "3DNow! Builtins  $mm3dnow"
 fi
 if test $cpu = "armv4l"; then
+    echo "ARMv5TE enabled  $armv5te"
     echo "IWMMXT enabled   $iwmmxt"
 fi
 if test $cpu = "mips"; then
@@ -1620,6 +1659,7 @@ echo "LDCONFIG=$LDCONFIG" >> config.mak
 echo "FFSERVERLDFLAGS=$FFSERVERLDFLAGS" >> config.mak
 echo "SHFLAGS=$SHFLAGS" >> config.mak
 echo "VHOOKSHFLAGS=$VHOOKSHFLAGS" >> config.mak
+echo "VHOOKLIBS=$VHOOKLIBS" >> config.mak
 echo "LIBOBJFLAGS=$LIBOBJFLAGS" >> config.mak
 echo "BUILD_STATIC=$lstatic" >> config.mak
 echo "BUILDSUF=$BUILDSUF" >> config.mak
@@ -1711,6 +1751,10 @@ if test "$mm3dnow" = "yes" ; then
   echo "TARGET_BUILTIN_3DNOW=yes" >> config.mak
   echo "#define HAVE_MM3DNOW 1" >> $TMPH
 fi
+if test "$armv5te" = "yes" ; then
+  echo "TARGET_ARMV5TE=yes" >> config.mak
+  echo "#define HAVE_ARMV5TE 1" >> $TMPH
+fi
 if test "$iwmmxt" = "yes" ; then
   echo "TARGET_IWMMXT=yes" >> config.mak
   echo "#define HAVE_IWMMXT 1" >> $TMPH