Skip to content
Snippets Groups Projects
Commit 6e2d3a70 authored by Simon Marlow's avatar Simon Marlow
Browse files

[project @ 1997-10-16 10:54:49 by simonm]

make the RAWCPP test a little more sensible.
parent 075aa392
No related branches found
No related tags found
No related merge requests found
...@@ -260,26 +260,24 @@ AC_SUBST(HaveGcc) ...@@ -260,26 +260,24 @@ AC_SUBST(HaveGcc)
# Substitutes: GNUCPP and RAWCPP (latter is 'GNUCPP -traditional') # Substitutes: GNUCPP and RAWCPP (latter is 'GNUCPP -traditional')
# #
AC_DEFUN(AC_PROG_GNUCPP, AC_DEFUN(AC_PROG_GNUCPP,
[AC_CACHE_CHECK([how to invoke cpp directly], ac_cv_gnu_cpp, [AC_CACHE_CHECK([how to invoke GNU cpp directly], ac_cv_gnu_cpp,
[if echo $CPP | grep gcc >/dev/null 2>&1; then [if test "$HaveGcc" = "YES"; then
echo > conftest.c echo > conftest.c
gcc -v -E conftest.c >/dev/null 2>conftest.out gcc -v -E conftest.c >/dev/null 2>conftest.out
echo '/(\S+(\/|\\\\)cpp)/ && print "[$]1";' > conftest.pl echo '/(\S+(\/|\\\\)cpp)/ && print "[$]1";' > conftest.pl
# GNUCPP: used in jmake.c (GnuCppCmd) and in mkdependC ac_cv_gnu_cpp="`eval $PerlCmd -n conftest.pl conftest.out`"
# (where we could do with the usual pre-#defines) rm -fr conftest*
ac_cv_gnu_cpp="`eval $PerlCmd -n conftest.pl conftest.out`" else
rm -fr conftest* # We need to be able to invoke CPP directly, preferably
else # with input from stdin (mkdependHS and hscpp depend on
# It is likely that this will go terribly wrong.. # this at the moment).
ac_cv_gnu_cpp='cc -E' # Take a guess at what to use, this probably won't work.
fi echo Warning: GNU cpp not found, using $CPP
ac_cv_gnu_cpp = $CPP
fi
]) ])
GNUCPP=$ac_cv_gnu_cpp GNUCPP=$ac_cv_gnu_cpp
if test "$GNUCPP" = "cc -E"; then RAWCPP="$GNUCPP -traditional"
RAWCPP="$GNUCPP"
else
RAWCPP="$GNUCPP -traditional"
fi
AC_SUBST(GNUCPP) AC_SUBST(GNUCPP)
AC_SUBST(RAWCPP) AC_SUBST(RAWCPP)
]) ])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment