Commit a49d42c2 authored by Måns Rullgård's avatar Måns Rullgård

configure: simplify TMPDIR setting

Originally committed as revision 16385 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 91535e5f
...@@ -1278,20 +1278,15 @@ enabled cross_compile || host_cc_default=$cc ...@@ -1278,20 +1278,15 @@ enabled cross_compile || host_cc_default=$cc
set_default host_cc set_default host_cc
# set temporary file name # set temporary file name
if test ! -z "$TMPDIR" ; then : ${TMPDIR:=$TEMPDIR}
TMPDIR1="${TMPDIR}" : ${TMPDIR:=/tmp}
elif test ! -z "$TEMPDIR" ; then
TMPDIR1="${TEMPDIR}"
else
TMPDIR1="/tmp"
fi
TMPC="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.c" TMPC="${TMPDIR}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.c"
TMPE="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}${EXESUF}" TMPE="${TMPDIR}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}${EXESUF}"
TMPH="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.h" TMPH="${TMPDIR}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.h"
TMPO="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.o" TMPO="${TMPDIR}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.o"
TMPS="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.S" TMPS="${TMPDIR}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.S"
TMPSH="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.sh" TMPSH="${TMPDIR}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.sh"
check_cflags -std=c99 check_cflags -std=c99
...@@ -1690,9 +1685,8 @@ EOF ...@@ -1690,9 +1685,8 @@ EOF
chmod +x $TMPSH >> $logfile 2>&1 chmod +x $TMPSH >> $logfile 2>&1
if ! $TMPSH >> $logfile 2>&1; then if ! $TMPSH >> $logfile 2>&1; then
cat <<EOF cat <<EOF
Unable to create and execute files in $TMPDIR1. Set the TMPDIR environment Unable to create and execute files in $TMPDIR. Set the TMPDIR environment
variable to another directory and make sure that $TMPDIR1 is not mounted variable to another directory and make sure that it is not mounted noexec.
noexec.
EOF EOF
die "Sanity test failed." die "Sanity test failed."
fi fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment