]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/commitdiff
configure: move basic sanity tests before other tests
authormru <mru@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Wed, 4 Feb 2009 21:28:54 +0000 (21:28 +0000)
committermru <mru@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Wed, 4 Feb 2009 21:28:54 +0000 (21:28 +0000)
git-svn-id: file:///var/local/repositories/ffmpeg/trunk@16995 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

configure

index f64108dada2a9051b994d7bbfe1b5dc0388c23aa..89f9bbc99f2b3d02fbefcc2c4a4e8e0fc31ae9f4 100755 (executable)
--- a/configure
+++ b/configure
@@ -1324,6 +1324,33 @@ TMPO="${TMPDIR}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.o"
 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