From bb931195fe780bb63e3d57d0742abad1d2128424 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Fri, 25 Jan 2013 12:33:19 +0100 Subject: configure: Default to CPP="$CC -E" unless overridden. --- configure.in | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'configure.in') diff --git a/configure.in b/configure.in index 4cfa36d..2c50d09 100644 --- a/configure.in +++ b/configure.in @@ -17,6 +17,23 @@ AC_DEFUN([_AC_INCLUDES_DEFAULT_REQUIREMENTS], [m4_divert_text([DEFAULTS], [ac_includes_default='/* none */'])]) +# We require GCC, and by default use its preprocessor. Override AC_PROG_CPP +# here to work around the Autoconf issue discussed in +# . +AC_DEFUN([AC_PROG_CPP], +[AC_REQUIRE([AC_PROG_CC])dnl +AC_ARG_VAR([CPP], [C preprocessor])dnl +_AC_ARG_VAR_CPPFLAGS()dnl +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + CPP="$CC -E" +fi +AC_SUBST(CPP)dnl +])# AC_PROG_CPP + dnl This is here so we can set $subdirs directly based on configure fragments. AC_CONFIG_SUBDIRS() -- cgit v1.1