52 lines
1.5 KiB
Plaintext
52 lines
1.5 KiB
Plaintext
$OpenBSD: patch-autoconf_sh,v 1.1 2001/09/16 15:16:45 espie Exp $
|
|
--- autoconf.sh.orig Tue Jan 5 14:27:53 1999
|
|
+++ autoconf.sh Sun Sep 16 17:09:08 2001
|
|
@@ -45,7 +45,7 @@ case "${M4}" in
|
|
esac
|
|
|
|
: ${TMPDIR=/tmp}
|
|
-tmpout=${TMPDIR}/acout.$$
|
|
+tmpout=`mktemp ${TMPDIR}/acout.XXXXXXXXXX` || exit 1
|
|
localdir=
|
|
show_version=no
|
|
|
|
@@ -95,9 +95,19 @@ case $# in
|
|
*) echo "$usage" >&2; exit 1 ;;
|
|
esac
|
|
|
|
+if fgrep AC_ $infile >/dev/null; then
|
|
+ :
|
|
+else
|
|
+ if fgrep "This is Cygnus Configure" configure >/dev/null; then
|
|
+ echo "Error: not an autoconf $infile" >&2
|
|
+ exit 1
|
|
+ fi
|
|
+fi
|
|
+
|
|
trap 'rm -f $tmpin $tmpout; exit 1' 1 2 15
|
|
|
|
-tmpin=${TMPDIR}/acin.$$ # Always set this, to avoid bogus errors from some rm's.
|
|
+tmpin=`mktemp ${TMPDIR}/acin.XXXXXXXXXX` || { rm -f $tmpout; exit 1; }
|
|
+# Always set this, to avoid bogus errors from some rm's.
|
|
if test z$infile = z-; then
|
|
infile=$tmpin
|
|
cat > $infile
|
|
@@ -112,16 +122,7 @@ else
|
|
use_localdir=
|
|
fi
|
|
|
|
-# Use the frozen version of Autoconf if available.
|
|
-r= f=
|
|
-# Some non-GNU m4's don't reject the --help option, so give them /dev/null.
|
|
-case `$M4 --help < /dev/null 2>&1` in
|
|
-*reload-state*) test -r $AC_MACRODIR/autoconf.m4f && { r=--reload f=f; } ;;
|
|
-*traditional*) ;;
|
|
-*) echo Autoconf requires GNU m4 1.1 or later >&2; rm -f $tmpin; exit 1 ;;
|
|
-esac
|
|
-
|
|
-$M4 -I$AC_MACRODIR $use_localdir $r autoconf.m4$f $infile > $tmpout ||
|
|
+$M4 -g -D__gnu__ -I$AC_MACRODIR $use_localdir autoconf.m4 $infile > $tmpout ||
|
|
{ rm -f $tmpin $tmpout; exit 2; }
|
|
|
|
# You could add your own prefixes to pattern if you wanted to check for
|