Revision 54460a83

View differences:

configure
257 257
solving the problem.
258 258
EOF
259 259
    fi
260
    rm -f $TMPC $TMPE $TMPH $TMPO $TMPS $TMPSH
261 260
    exit 1
262 261
}
263 262

  
......
1342 1341
: ${TMPDIR:=$TMP}
1343 1342
: ${TMPDIR:=/tmp}
1344 1343

  
1345
TMPC="${TMPDIR}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.c"
1346
TMPE="${TMPDIR}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}${EXESUF}"
1347
TMPH="${TMPDIR}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.h"
1348
TMPO="${TMPDIR}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.o"
1349
TMPS="${TMPDIR}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.S"
1350
TMPSH="${TMPDIR}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.sh"
1344
if ! check_cmd type mktemp; then
1345
    # simple replacement for missing mktemp
1346
    # NOT SAFE FOR GENERAL USE
1347
    mktemp(){
1348
        echo "${2%XXX*}.${HOSTNAME}.${UID}.$$"
1349
    }
1350
fi
1351

  
1352
tmpfile(){
1353
    tmp=$(mktemp -u "${TMPDIR}/ffconf.XXXXXXXX")$2 &&
1354
        (set -C; exec > $tmp) 2>/dev/null ||
1355
        die "Unable to create temoporary file in $TMPDIR."
1356
    append TMPFILES $tmp
1357
    eval $1=$tmp
1358
}
1359

  
1360
trap 'rm -f -- $TMPFILES' EXIT
1361
trap exit HUP INT TERM
1362

  
1363
tmpfile TMPC  .c
1364
tmpfile TMPE  $EXESUF
1365
tmpfile TMPH  .h
1366
tmpfile TMPO  .o
1367
tmpfile TMPS  .S
1368
tmpfile TMPSH .sh
1369

  
1370
unset -f mktemp
1351 1371

  
1352 1372
# make sure we can execute files in $TMPDIR
1353 1373
cat > $TMPSH 2>> $logfile <<EOF
......
1361 1381
EOF
1362 1382
    die "Sanity test failed."
1363 1383
fi
1364
rm $TMPSH
1365 1384

  
1366 1385
if   $cc --version 2>/dev/null | grep -qi gcc; then
1367 1386
    cc_type=gcc
......
2484 2503
    echo "config.h is unchanged" ||
2485 2504
    mv -f $TMPH config.h
2486 2505

  
2487
rm -f $TMPC $TMPE $TMPH $TMPO $TMPS $TMPSH
2488

  
2489 2506
# build tree in object directory if source path is different from current one
2490 2507
if enabled source_path_used; then
2491 2508
    DIRS="\

Also available in: Unified diff