diff options
-rw-r--r-- | configure.ac | 3 | ||||
-rw-r--r-- | x11perfcomp.in | 11 |
2 files changed, 12 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index 0e5c297..1b62a88 100644 --- a/configure.ac +++ b/configure.ac @@ -44,6 +44,9 @@ AC_TYPE_SIGNAL # Define the installation directory for the x11 performance compare scripts AC_SUBST([x11perfcompdir], [$libdir/X11/x11perfcomp]) +# Checks for programs run by the scripts we install +AC_PATH_PROG(MKTEMP, mktemp) + # Checks for pkg-config packages PKG_CHECK_MODULES(X11PERF, x11 xmuu) diff --git a/x11perfcomp.in b/x11perfcomp.in index a541ddc..6956cf2 100644 --- a/x11perfcomp.in +++ b/x11perfcomp.in @@ -23,10 +23,17 @@ PATH="@x11perfcompdir@:/bin:/usr/bin:$PATH" export PATH +MKTEMP="@MKTEMP@" + set -e -tmp=${TMPDIR-/tmp}/rates.$$ +if [ "x$MKTEMP" != "x" ] && [ -x "$MKTEMP" ] ; then + tmp=`$MKTEMP -p /tmp -d rates.XXXXXX` + if [ "x$tmp" = "x" ]; then exit 1 ; fi +else + tmp=${TMPDIR-/tmp}/rates.$$ + mkdir $tmp || exit 1 +fi trap "rm -rf $tmp" 0 1 2 15 -mkdir $tmp || exit 1 mkdir $tmp/rates ratio= allfiles= |