aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMåns Rullgård <mans@mansr.com>2009-02-04 21:28:54 +0000
committerMåns Rullgård <mans@mansr.com>2009-02-04 21:28:54 +0000
commit993f2d0fd776504b8a20bb3714d79b89e19a5ca4 (patch)
treef9080b450aac281dff09a19b3c1e76b333bffd8e
parentf0d5437275dc51da18fca559755f700e73ba1ce2 (diff)
downloadffmpeg-993f2d0fd776504b8a20bb3714d79b89e19a5ca4.tar.gz
configure: move basic sanity tests before other tests
Originally committed as revision 16995 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rwxr-xr-xconfigure54
1 files changed, 27 insertions, 27 deletions
diff --git a/configure b/configure
index f64108dada..89f9bbc99f 100755
--- 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