summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>1998-04-14 10:34:37 +0000
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>1998-04-14 10:34:37 +0000
commitc7879c37b21a21ebff6ee54370ce48b7b16440cd (patch)
tree0037be1184cdce844e566402a2c510b740a6a906 /configure
parent7a183cb0650353217a5c4d9e401776fe76ea4ea5 (diff)
downloadgcc-c7879c37b21a21ebff6ee54370ce48b7b16440cd.tar.gz
* configure: Define DEFAULT_M4 by searching PATH.
* Makfile.in: Use DEFAULT_M4. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@19208 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure20
1 files changed, 20 insertions, 0 deletions
diff --git a/configure b/configure
index ed54cedbde3..8b4e510d0bf 100755
--- a/configure
+++ b/configure
@@ -762,6 +762,25 @@ do
test -n "$DEFAULT_YACC" && break
done
+# Generate a default definition for M4. This is used if the makefile can't
+# locate m4 in objdir.
+
+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
+
# Generate a default definition for LEX. This is used if the makefile can't
# locate flex in objdir.
@@ -1259,6 +1278,7 @@ EOF
-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