[FFmpeg-cvslog] r16995 - trunk/configure

mru subversion
Wed Feb 4 22:28:54 CET 2009


Author: mru
Date: Wed Feb  4 22:28:54 2009
New Revision: 16995

Log:
configure: move basic sanity tests before other tests

Modified:
   trunk/configure

Modified: trunk/configure
==============================================================================
--- trunk/configure	Wed Feb  4 21:43:17 2009	(r16994)
+++ trunk/configure	Wed Feb  4 22:28:54 2009	(r16995)
@@ -1324,6 +1324,33 @@ TMPO="${TMPDIR}/ffmpeg-conf-${RANDOM}-$$
 TMPS="${TMPDIR}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.S"
 TMPSH="${TMPDIR}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.sh"
 
+# make sure we can execute files in $TMPDIR
+cat > $TMPSH 2>> $logfile <<EOF
+#! /bin/sh
+EOF
+chmod +x $TMPSH >> $logfile 2>&1
+if ! $TMPSH >> $logfile 2>&1; then
+    cat <<EOF
+Unable to create and execute files in $TMPDIR.  Set the TMPDIR environment
+variable to another directory and make sure that it is not mounted noexec.
+EOF
+    die "Sanity test failed."
+fi
+rm $TMPSH
+
+# compiler sanity check
+check_exec <<EOF
+int main(void){ return 0; }
+EOF
+if test "$?" != 0; then
+    echo "$cc is unable to create an executable file."
+    if test -z "$cross_prefix" && ! enabled cross_compile ; then
+        echo "If $cc is a cross-compiler, use the --enable-cross-compile option."
+        echo "Only do this if you know what cross compiling means."
+    fi
+    die "C compiler test failed."
+fi
+
 check_cflags -std=c99
 
 case "$arch" in
@@ -1722,33 +1749,6 @@ if test $cpu != "generic"; then
     esac
 fi
 
-# make sure we can execute files in $TMPDIR
-cat > $TMPSH 2>> $logfile <<EOF
-#! /bin/sh
-EOF
-chmod +x $TMPSH >> $logfile 2>&1
-if ! $TMPSH >> $logfile 2>&1; then
-    cat <<EOF
-Unable to create and execute files in $TMPDIR.  Set the TMPDIR environment
-variable to another directory and make sure that it is not mounted noexec.
-EOF
-    die "Sanity test failed."
-fi
-rm $TMPSH
-
-# compiler sanity check
-check_exec <<EOF
-int main(void){ return 0; }
-EOF
-if test "$?" != 0; then
-    echo "$cc is unable to create an executable file."
-    if test -z "$cross_prefix" && ! enabled cross_compile ; then
-        echo "If $cc is a cross-compiler, use the --enable-cross-compile option."
-        echo "Only do this if you know what cross compiling means."
-    fi
-    die "C compiler test failed."
-fi
-
 check_cc <<EOF || die "Symbol mangling check failed."
 int ff_extern;
 EOF




More information about the ffmpeg-cvslog mailing list