patch to configure script
Herman ten Brugge
herman@htbrug.net.HCC.nl
Sat Oct 4 03:37:00 GMT 1997
Hello Guys,
I have made a small change to the configure script. I use the gnu m4
macro processor only for autoconf. Using gnu m4 would require a lot of
testing of current software that I don't want to do. The patch below
checks for gm4 gnum4 and m4 executables. This is the same sequence as
autoconf uses in its configuration script.
Herman.
--- configure.org Tue Sep 23 06:55:35 1997
+++ configure Tue Sep 23 07:04:34 1997
@@ -780,6 +780,22 @@
test -n "$DEFAULT_LEX" && break
done
+for prog in gm4 gnum4 m4
+do
+ set dummy $prog; tmp=$2
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
+ for dir in $PATH; do
+ test -z "$dir" && dir=.
+ if test -f $dir/$tmp; then
+ DEFAULT_M4="$prog"
+ break
+ fi
+ done
+ IFS="$save_ifs"
+
+ test -n "$DEFAULT_M4" && break
+done
+
if [ "${build}" != "${host}" ]; then
# If we are doing a Canadian Cross, in which the host and build systems
# are not the same, we set reasonable default values for the tools.
@@ -1221,6 +1237,7 @@
-e "s|^tooldir[ ]*=.*$|tooldir = ${tooldir}|" \
-e "s:^DEFAULT_YACC[ ]*=.*$:DEFAULT_YACC = ${DEFAULT_YACC}:" \
-e "s:^DEFAULT_LEX[ ]*=.*$:DEFAULT_LEX = ${DEFAULT_LEX}:" \
+ -e "s:^DEFAULT_M4[ ]*=.*$:DEFAULT_M4 = ${DEFAULT_M4}:" \
${subdir}/Makefile.tem >> ${Makefile}
# If this is a Canadian Cross, preset the values of many more
--- Makefile.in.org Tue Sep 23 06:56:27 1997
+++ Makefile.in Tue Sep 23 07:04:29 1997
@@ -100,6 +100,7 @@
# These values are substituted by configure.
DEFAULT_YACC = yacc
DEFAULT_LEX = lex
+DEFAULT_M4 = m4
BISON = `if [ -f $$r/bison/bison ] ; then \
echo $$r/bison/bison -L $$s/bison/ ; \
@@ -121,7 +122,7 @@
M4 = `if [ -f $$r/m4/m4 ] ; \
then echo $$r/m4/m4 ; \
- else echo m4 ; fi`
+ else echo ${DEFAULT_M4} ; fi`
MAKEINFO = `if [ -f $$r/texinfo/makeinfo/Makefile ] ; \
then echo $$r/texinfo/makeinfo/makeinfo ; \
--
-------------------------------------------------------------------------
Herman ten Brugge Email: Haj.Ten.Brugge@net.HCC.nl
More information about the Gcc-bugs
mailing list