summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorGerd Moellmann <gerd@gnu.org>2001-02-23 13:31:40 +0000
committerGerd Moellmann <gerd@gnu.org>2001-02-23 13:31:40 +0000
commit3aa40e0e0256a2ab87d78b34271e0c00ed29e1d9 (patch)
tree8e78269e69542aa5a6c3a3888ab8260b3197a4b6 /configure.in
parentc400241bbe7188bad1aaa6a34cbc7cb1b6881d65 (diff)
downloademacs-3aa40e0e0256a2ab87d78b34271e0c00ed29e1d9.tar.gz
Use AC_EGREP_CPP to check if the C preprocessor
converts `..' to `. .'. If it converts, set CPP_NEED_TRADITIONAL to `yes'. Later in AC_OUTPUT, check this variable.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in14
1 files changed, 12 insertions, 2 deletions
diff --git a/configure.in b/configure.in
index c8e0af02663..460d1b31d06 100644
--- a/configure.in
+++ b/configure.in
@@ -2232,6 +2232,16 @@ test "${exec_prefix}" != NONE &&
exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
changequote([, ])dnl
+## Check if the C preprocessor will convert `..' to `. .'. If so, set
+## CPP_NEED_TRADITIONAL to `yes' so that the code to generate Makefile
+## from Makefile.c can correctly provide the arg `-traditional' to the
+## C preprocessor.
+
+AC_EGREP_CPP(yes..yes,
+ [yes..yes],
+ CPP_NEED_TRADITIONAL=no,
+ CPP_NEED_TRADITIONAL=yes)
+
AC_OUTPUT(Makefile lib-src/Makefile.c:lib-src/Makefile.in oldXMenu/Makefile \
man/Makefile lwlib/Makefile src/Makefile.c:src/Makefile.in \
lisp/Makefile leim/Makefile, [
@@ -2264,7 +2274,7 @@ make epaths-force
# As of 2000-11-19, newest development versions of GNU cpp preprocess
# `..' to `. .' unless invoked with -traditional
-if test "x$GCC" = xyes && test "x$NON_GNU_CPP" = x; then
+if test "x$GCC" = xyes && test "x$CPP_NEED_TRADITIONAL" = xyes; then
CPPFLAGS="$CPPFLAGS -traditional"
fi
@@ -2308,5 +2318,5 @@ fi
# This is how we know whether to re-run configure in certain cases.
touch src/config.stamp
-], [GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPPFLAGS="$CPPFLAGS"])
+], [GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPP_NEED_TRADITIONAL="$CPP_NEED_TRADITIONAL" CPPFLAGS="$CPPFLAGS"])