aboutsummaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorThomas Schwinge <thomas@codesourcery.com>2013-01-25 12:33:19 +0100
committerThomas Schwinge <thomas@codesourcery.com>2013-01-25 12:33:19 +0100
commitbb931195fe780bb63e3d57d0742abad1d2128424 (patch)
tree73a226fc980de52167e537d27d3fd3e5fc261993 /configure.in
parenta0b1cd8869ffe7d0a602d31a3629c8690987be59 (diff)
downloadglibc-bb931195fe780bb63e3d57d0742abad1d2128424.zip
glibc-bb931195fe780bb63e3d57d0742abad1d2128424.tar.gz
glibc-bb931195fe780bb63e3d57d0742abad1d2128424.tar.bz2
configure: Default to CPP="$CC -E" unless overridden.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in17
1 files changed, 17 insertions, 0 deletions
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
+# <http://sourceware.org/ml/libc-alpha/2013-01/msg00721.html>.
+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()