old-configure: BSD-compliant use of mktemp

Mktemp on BSDs (at least on OpenBSD) don't have "--tmpdir" option.

Set temporary directory to /tmp by default.  Use of ${TMPDIR:=/tmp} allows
overriding temporary directory via environment if needed.  (And is indeed needed
in OpenBSD ports infrastructure.)

Signed-off-by: wm4 <wm4@nowhere>
This commit is contained in:
Dmitrij D. Czarkoff 2015-03-25 23:58:05 +01:00 committed by wm4
parent e4e27882e7
commit a01b6d99e5
1 changed files with 1 additions and 1 deletions

View File

@ -324,7 +324,7 @@ test -z "$_bindir" && _bindir="$_prefix/bin"
test -z "$_mandir" && _mandir="$_prefix/share/man"
test -z "$_confdir" && _confdir="$_prefix/etc/mpv"
mplayer_tmpdir=$(mktemp -d --tmpdir mpv-configure-XXXX)
mplayer_tmpdir=$(mktemp -d -p ${TMPDIR:=/tmp} mpv-configure-XXXXXX)
test -n "$mplayer_tmpdir" || die "Unable to create tmpdir."
trap 'rm -rf "$mplayer_tmpdir"' EXIT