autoload.el fix for bug#7414.
[bpt/emacs.git] / configure.in
index d61162d..ac42e7c 100644 (file)
@@ -4,7 +4,7 @@ dnl     autoconf
 dnl in the directory containing this script.
 dnl
 dnl  Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2003,
-dnl    2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
+dnl    2004, 2005, 2006, 2007, 2008, 2009, 2010  Free Software Foundation, Inc.
 dnl
 dnl  This file is part of GNU Emacs.
 dnl
@@ -12,17 +12,17 @@ dnl  GNU Emacs is free software: you can redistribute it and/or modify
 dnl  it under the terms of the GNU General Public License as published by
 dnl  the Free Software Foundation, either version 3 of the License, or
 dnl  (at your option) any later version.
-dnl  
+dnl
 dnl  GNU Emacs is distributed in the hope that it will be useful,
 dnl  but WITHOUT ANY WARRANTY; without even the implied warranty of
 dnl  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 dnl  GNU General Public License for more details.
-dnl  
+dnl
 dnl  You should have received a copy of the GNU General Public License
 dnl  along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
 
-AC_PREREQ(2.61)
-AC_INIT(emacs, 23.1.50)
+AC_PREREQ(2.62)
+AC_INIT(emacs, 23.2.90)
 AC_CONFIG_HEADER(src/config.h:src/config.in)
 AC_CONFIG_SRCDIR(src/lisp.h)
 
@@ -144,6 +144,7 @@ OPTION_DEFAULT_OFF([ns],[use nextstep (Cocoa or GNUstep) windowing system])
 
 OPTION_DEFAULT_ON([gpm],[don't use -lgpm for mouse support on a GNU/Linux console])
 OPTION_DEFAULT_ON([dbus],[don't compile with D-Bus support])
+OPTION_DEFAULT_ON([gconf],[don't compile with GConf support])
 
 ## For the times when you want to build Emacs but don't have
 ## a suitable makeinfo, and can live without the manuals.
@@ -168,6 +169,12 @@ if test "X${with_pkg_config_prog}" != X; then
    fi
 fi
 
+CRT_DIR=
+AC_ARG_WITH([crt-dir],dnl
+[AS_HELP_STRING([--with-crt-dir=DIR],[directory containing crtn.o etc.
+This option is only used on x86-64 and s390x GNU/Linux architectures.])])
+CRT_DIR="${with_crt_dir}"
+
 AC_ARG_WITH([gnustep-conf],dnl
 [AS_HELP_STRING([--with-gnustep-conf=PATH],[path to GNUstep.conf; default $GNUSTEP_CONFIG_FILE, or /etc/GNUstep/GNUstep.conf])])
 test "X${with_gnustep_conf}" != X && test "${with_gnustep_conf}" != yes && \
@@ -210,12 +217,12 @@ elif test "${enableval}" != "yes"; then
 fi)
 
 AC_ARG_ENABLE(checking,
-[  --enable-checking[=LIST]
-                         enable expensive run-time checks.  With LIST,
-                         enable only specific categories of checks.
-                         Categories are: all,yes,no.
-                         Flags are: stringbytes, stringoverrun, stringfreelist,
-                         xmallocoverrun, conslist],
+[AS_HELP_STRING([--enable-checking@<:@=LIST@:>@],
+               [enable expensive run-time checks.  With LIST,
+                enable only specific categories of checks.
+                Categories are: all,yes,no.
+                Flags are: stringbytes, stringoverrun, stringfreelist,
+                xmallocoverrun, conslist])],
 [ac_checking_flags="${enableval}"],[])
 IFS="${IFS=    }"; ac_save_IFS="$IFS"; IFS="$IFS,"
 for check in $ac_checking_flags
@@ -273,6 +280,26 @@ if test x$ac_gc_check_cons_list != x ; then
 [Define this to check for errors in cons list.])
 fi
 
+AC_ARG_ENABLE(profiling,
+[AS_HELP_STRING([--enable-profiling],
+               [build emacs with profiling support.
+                This might not work on all platforms])],
+[ac_enable_profiling="${enableval}"],[])
+if test x$ac_enable_profiling != x ; then
+   PROFILING_CFLAGS="-DPROFILING=1 -pg"
+   PROFILING_LDFLAGS="-pg"
+else
+   PROFILING_CFLAGS=
+   PROFILING_LDFLAGS=
+fi
+
+AC_ARG_ENABLE(autodepend,
+[AS_HELP_STRING([--enable-autodepend],
+               [automatically generate dependencies to .h-files.
+                Requires GNU Make and Gcc. Enabled if GNU Make and Gcc is
+                found])],
+[ac_enable_autodepend="${enableval}"],[ac_enable_autodepend=yes])
+
 #### Make srcdir absolute, if it isn't already.  It's important to
 #### avoid running the path through pwd unnecessarily, since pwd can
 #### give you automounter prefixes, which can go away.  We do all this
@@ -393,6 +420,9 @@ dnl see the `changequote' comment above.
     case "${canonical}" in
       alpha*-*-netbsd*)        machine=alpha ;;
       i[3456]86-*-netbsd*) machine=intel386 ;;
+      mips-*-netbsd*)  machine=mips ;;
+      mipsel-*-netbsd*)        machine=mips ;;
+      mipseb-*-netbsd*)        machine=mips ;;
       powerpc-*-netbsd*) machine=macppc ;;
       sparc*-*-netbsd*)        machine=sparc ;;
       vax-*-netbsd*)   machine=vax ;;
@@ -440,6 +470,7 @@ dnl see the `changequote' comment above.
     case "${canonical}" in
       i[3456]86-* )  machine=intel386 ;;
       powerpc-* )    machine=macppc ;;
+      x86_64-* )     machine=amdx86-64 ;;
       * )            unported=yes ;;
     esac
     opsys=darwin
@@ -562,15 +593,6 @@ dnl see the `changequote' comment above.
     esac
   ;;
 
-  ## Vaxen.
-  vax-dec-* )
-    machine=vax
-    case "${canonical}" in
-      *-vms* )                                                 opsys=vms ;;
-      * )                                              unported=yes
-    esac
-  ;;
-
   ## IA-64
   ia64*-*-linux* )
     machine=ia64 opsys=gnu-linux
@@ -741,6 +763,19 @@ CFLAGS="$SAVE_CFLAGS"
 unset has_option
 unset SAVE_CFLAGS
 
+### Use -Wdeclaration-after-statement if the compiler supports it
+AC_MSG_CHECKING([whether gcc understands -Wdeclaration-after-statement])
+SAVE_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -Wdeclaration-after-statement"
+AC_TRY_COMPILE([], [], has_option=yes, has_option=no,)
+if test $has_option = yes; then
+   C_WARNINGS_SWITCH="-Wdeclaration-after-statement $C_WARNINGS_SWITCH"
+fi
+AC_MSG_RESULT($has_option)
+CFLAGS="$SAVE_CFLAGS"
+unset has_option
+unset SAVE_CFLAGS
+
 #### Some other nice autoconf tests.
 
 dnl checks for programs
@@ -770,11 +805,11 @@ fi
 ## pre-built, and not deleted by the normal clean rules.  makeinfo is
 ## therefore in the category of "special tools" not normally required, which
 ## configure does not have to check for (eg autoconf itself).
-## In a CVS checkout on the other hand, the manuals are not included.
-## So makeinfo is a requirement to build from CVS, and configure
+## In a Bazaar checkout on the other hand, the manuals are not included.
+## So makeinfo is a requirement to build from Bazaar, and configure
 ## should test for it as it does for any other build requirement.
 ## We use the presence of $srcdir/info/emacs to distinguish a release,
-## with pre-built manuals, from a CVS checkout.
+## with pre-built manuals, from a Bazaar checkout.
 if test "$MAKEINFO" = "no"; then
   if test "x${with_makeinfo}" = "xno"; then
     MAKEINFO=off
@@ -928,7 +963,7 @@ configure___ CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
 
 /* Get the CFLAGS for real compilation.  */
 #ifdef __GNUC__
-configure___ REAL_CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH C_WARNINGS_SWITCH '${SPECIFIED_CFLAGS}'
+configure___ REAL_CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH C_WARNINGS_SWITCH ${PROFILING_CFLAGS} '${SPECIFIED_CFLAGS}'
 #else
 configure___ REAL_CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
 #endif
@@ -936,6 +971,8 @@ configure___ REAL_CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
 #endif /* not THIS_IS_CONFIGURE */
 ' > ${tempcname}
 
+LDFLAGS="${LDFLAGS} ${PROFILING_LDFLAGS}"
+
 # The value of CPP is a quoted variable reference, so we need to do this
 # to get its actual value...
 CPP=`eval "echo $CPP"`
@@ -965,18 +1002,28 @@ AC_CONFIG_LIBOBJ_DIR(src)
 dnl Do this early because it can frob feature test macros for Unix-98 &c.
 AC_SYS_LARGEFILE
 
-
-### The standard library on x86-64 and s390x GNU/Linux distributions can
-### be located in either /usr/lib64 or /usr/lib.
-### In some rare cases, /usr/lib64 exists but does not contain the
-### relevant files (bug#1287).  Hence test for crtn.o.
+## Note: at present CRT_DIR is only used for amdx86-64 and ibms390x.
+## Other machine types hard-code the location in src/[ms]/*.h.
 case "${canonical}" in
   x86_64-*-linux-gnu* | s390x-*-linux-gnu* )
-    if test -e /usr/lib64/crtn.o; then
-      AC_DEFINE(HAVE_LIB64_DIR, 1,
-        [Define to 1 if the directory /usr/lib64 exists.])
-fi
+   ## On x86-64 and s390x GNU/Linux distributions, the standard library
+   ## can be in a variety of places.  We only try /usr/lib64 and /usr/lib.
+   ## For anything else (eg /usr/lib32), it is up the user to specify
+   ## the location (bug#5655).
+   ## Test for crtn.o, not just the directory, because sometimes the
+   ## directory exists but does not have the relevant files (bug#1287).
+   ## If user specified a crt-dir, use that unconditionally.
+   if test "X$CRT_DIR" = "X"; then
+     CRT_DIR=/usr/lib
+     test -e /usr/lib64/crtn.o && CRT_DIR=/usr/lib64
+   fi
+
+   test -e $CRT_DIR/crtn.o || test -e $CRT_DIR/crt0.o || \
+     AC_MSG_ERROR([crt*.o not found.  Use --with-crt-dir to specify the location.])
+   ;;
 esac
+test "X$CRT_DIR" = "X" && CRT_DIR=/usr/lib
+AC_SUBST(CRT_DIR)
 
 dnl This function defintion taken from Gnome 2.0
 dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)
@@ -1075,7 +1122,7 @@ AC_CHECK_HEADERS(sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \
   linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \
   termcap.h stdio_ext.h fcntl.h strings.h coff.h pty.h sys/mman.h \
   sys/param.h sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h \
-  sys/utsname.h pwd.h)
+  sys/utsname.h pwd.h utmp.h)
 
 AC_MSG_CHECKING(if personality LINUX32 can be set)
 AC_TRY_COMPILE([#include <sys/personality.h>], [personality (PER_LINUX32)],
@@ -1219,6 +1266,32 @@ dnl AC_C_BIGENDIAN
 dnl check for Make feature
 AC_PROG_MAKE_SET
 
+dnl check for GNU Make if we have GCC and autodepend is on.
+if test "$GCC" = yes && test "$ac_enable_autodepend" = yes; then
+   AC_MSG_CHECKING([whether we are using GNU Make])
+   HAVE_GNU_MAKE=no
+   testval=`make --version 2>/dev/null | grep 'GNU Make'`
+   if test "x$testval" != x; then
+      HAVE_GNU_MAKE=yes
+   else
+      ac_enable_autodepend=no
+   fi
+   AC_MSG_RESULT([$HAVE_GNU_MAKE])
+   if test $HAVE_GNU_MAKE = yes; then
+      AC_MSG_CHECKING([whether gcc understands -MMD -MF])
+      SAVE_CFLAGS="$CFLAGS"
+      CFLAGS="$CFLAGS -MMD -MF deps.d"
+      AC_TRY_COMPILE([], [], , ac_enable_autodepend=no)
+      CFLAGS="$SAVE_CFLAGS"
+      test -f deps.d || ac_enable_autodepend=no
+      rm -rf deps.d
+      AC_MSG_RESULT([$ac_enable_autodepend])
+   fi
+   if test $ac_enable_autodepend = yes; then
+      AC_DEFINE(AUTO_DEPEND, 1, [Generate dependencies with gcc.])
+   fi
+fi
+
 dnl checks for operating system services
 AC_SYS_LONG_FILE_NAMES
 
@@ -1236,7 +1309,7 @@ fi
 ## No need to do anything special for these standard directories.
 ## This is an experiment, take it out if it causes problems.
 if test -n "${x_libraries}" && test x"${x_libraries}" != xNONE; then
-   
+
    x_libraries=`echo :${x_libraries}: | sed -e 's|:/usr/lib64:|:|g' -e 's|:/lib64:|:|g' -e 's|^:||' -e 's|:$||'`
 
 fi
@@ -1553,7 +1626,7 @@ fi
 
 ### Use -lrsvg-2 if available, unless `--with-rsvg=no' is specified.
 HAVE_RSVG=no
-if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes"; then
+if test "${HAVE_X11}" = "yes" || test "${NS_IMPL_GNUSTEP}" = "yes"; then
   if test "${with_rsvg}" != "no"; then
     RSVG_REQUIRED=2.11.0
     RSVG_MODULE="librsvg-2.0 >= $RSVG_REQUIRED"
@@ -1690,7 +1763,21 @@ HAVE_DBUS=no
 if test "${with_dbus}" = "yes"; then
    PKG_CHECK_MODULES(DBUS, dbus-1 >= 1.0, HAVE_DBUS=yes, HAVE_DBUS=no)
    if test "$HAVE_DBUS" = yes; then
-      AC_DEFINE(HAVE_DBUS, 1, [Define to 1 if using D-Bus.])
+     LIBS="$LIBS $DBUS_LIBS"
+     AC_DEFINE(HAVE_DBUS, 1, [Define to 1 if using D-Bus.])
+     AC_CHECK_FUNCS([dbus_watch_get_unix_fd])
+   fi
+fi
+
+dnl GConf has been tested under GNU/Linux only.
+dnl The version is really arbitrary, it is about the same age as Gtk+ 2.6.
+HAVE_GCONF=no
+if test "${HAVE_X11}" = "yes" && test "${with_gconf}" = "yes"; then
+   PKG_CHECK_MODULES(GCONF, gconf-2.0 >= 2.13, HAVE_GCONF=yes, HAVE_GCONF=no)
+   if test "$HAVE_GCONF" = yes; then
+      AC_DEFINE(HAVE_GCONF, 1, [Define to 1 if using GConf.])
+      dnl Newer GConf doesn't link with g_objects, so this is not defined.
+      AC_CHECK_FUNCS([g_type_init])
    fi
 fi
 
@@ -1915,12 +2002,17 @@ if test "${HAVE_X11}" = "yes"; then
     if test "x${with_xft}" != "xno"; then
 
       PKG_CHECK_MODULES(XFT, xft >= 0.13.0, , HAVE_XFT=no)
-      if test "$HAVE_XFT" != no; then
+      ## Because xftfont.c uses XRenderQueryExtension, we also
+      ## need to link to -lXrender.
+      HAVE_XRENDER=no
+      AC_CHECK_LIB(Xrender, XRenderQueryExtension, HAVE_XRENDER=yes)
+      if test "$HAVE_XFT" != no && test "$HAVE_XRENDER" != no; then
        OLD_CPPFLAGS="$CPPFLAGS"
        OLD_CFLAGS="$CFLAGS"
        OLD_LIBS="$LIBS"
        CPPFLAGS="$CPPFLAGS $XFT_CFLAGS"
        CFLAGS="$CFLAGS $XFT_CFLAGS"
+       XFT_LIBS="-lXrender $XFT_LIBS"
        LIBS="$XFT_LIBS $LIBS"
        AC_CHECK_HEADER(X11/Xft/Xft.h,
          AC_CHECK_LIB(Xft, XftFontOpen, HAVE_XFT=yes, , $XFT_LIBS))
@@ -1959,7 +2051,7 @@ if test "${HAVE_X11}" = "yes"; then
       AC_DEFINE(HAVE_FREETYPE, 1,
                [Define to 1 if using the freetype and fontconfig libraries.])
       if test "${with_libotf}" != "no"; then
-       PKG_CHECK_MODULES(LIBOTF, libotf, HAVE_LIBOTF=yes, 
+       PKG_CHECK_MODULES(LIBOTF, libotf, HAVE_LIBOTF=yes,
                          HAVE_LIBOTF=no)
        if test "$HAVE_LIBOTF" = "yes"; then
          AC_DEFINE(HAVE_LIBOTF, 1, [Define to 1 if using libotf.])
@@ -2168,6 +2260,7 @@ if test "${HAVE_NS}" = "yes"; then
   fi
   # We also have mouse menus.
   HAVE_MENUS=yes
+  OTHER_FILES=ns-app
 fi
 
 
@@ -2525,12 +2618,23 @@ dnl Fixme: Use AC_FUNC_MEMCMP since memcmp is used.  (Needs libobj replacement.)
 CFLAGS="$REAL_CFLAGS"
 CPPFLAGS="$REAL_CPPFLAGS"
 
+## Hack to detect a buggy GCC version.
+if test "x$GCC" = xyes \
+   && test x"`$CC --version 2> /dev/null | grep 'gcc.* 4.5.0'`" != x \
+   && test x"`echo $CFLAGS | grep '\-O@<:@23@:>@'`" != x \
+   && test x"`echo $CFLAGS | grep '\-fno-optimize-sibling-calls'`" = x; then
+   AC_MSG_ERROR([GCC 4.5.0 has problems compiling Emacs; see etc/PROBLEMS'.])
+fi
+
 #### Find out which version of Emacs this is.
 [version=`grep 'defconst[       ]*emacs-version' ${srcdir}/lisp/version.el \
         | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`]
 if test x"${version}" = x; then
   AC_MSG_ERROR([can't find current emacs version in `${srcdir}/lisp/version.el'.])
 fi
+if test x"${version}" != x"$PACKAGE_VERSION"; then
+  AC_MSG_WARN([version mismatch between `${srcdir}/configure.in' and `${srcdir}/lisp/version.el'.])
+fi
 
 ### Specify what sort of things we'll be editing into Makefile and config.h.
 ### Use configuration here uncanonicalized to avoid exceeding size limits.
@@ -2575,6 +2679,7 @@ AC_SUBST(GNUSTEP_SYSTEM_HEADERS)
 AC_SUBST(GNUSTEP_SYSTEM_LIBRARIES)
 AC_SUBST(GNU_OBJC_CFLAGS)
 AC_SUBST(LIB_SRC_EXTRA_INSTALLABLES)
+AC_SUBST(OTHER_FILES)
 
 AC_DEFINE_UNQUOTED(EMACS_CONFIGURATION,  "${canonical}",
                   [Define to the canonical Emacs configuration name.])
@@ -2638,7 +2743,7 @@ fi
 
 AH_TOP([/* GNU Emacs site configuration template file.
    Copyright (C) 1988, 1993, 1994, 1999, 2000, 2001, 2002, 2004, 2005,
-     2006, 2007, 2008, 2009  Free Software Foundation, Inc.
+     2006, 2007, 2008, 2009, 2010  Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
@@ -2721,7 +2826,6 @@ AH_BOTTOM([
    side does this in s/darwin.h and we cannot
    parallel this exactly since GNUstep is multi-OS. */
 #ifdef HAVE_NS
-#define OTHER_FILES ns-app
 # ifdef NS_IMPL_GNUSTEP
 /* See also .m.o rule in Makefile.in */
 /* FIXME: are all these flags really needed?  Document here why.  */
@@ -2825,15 +2929,19 @@ extern char *getenv ();
 #ifdef HAVE_STDLIB_H
 #include <stdlib.h>
 #endif
-#ifndef __GNUC__
-# ifdef HAVE_ALLOCA_H
-#  include <alloca.h>
-# else /* AIX files deal with #pragma.  */
-#  ifndef alloca /* predefined by HP cc +Olibcalls */
-char *alloca ();
-#  endif
-# endif /* HAVE_ALLOCA_H */
-#endif /* __GNUC__ */
+#ifdef HAVE_ALLOCA_H
+# include <alloca.h>
+#elif defined __GNUC__
+# define alloca __builtin_alloca
+#elif defined _AIX
+# define alloca __alloca
+#else
+# include <stddef.h>
+# ifdef  __cplusplus
+extern "C"
+# endif
+void *alloca (size_t);
+#endif
 #ifndef HAVE_SIZE_T
 typedef unsigned size_t;
 #endif
@@ -2936,6 +3044,7 @@ echo "  Does Emacs use -lpng?                                   ${HAVE_PNG}"
 echo "  Does Emacs use -lrsvg-2?                                ${HAVE_RSVG}"
 echo "  Does Emacs use -lgpm?                                   ${HAVE_GPM}"
 echo "  Does Emacs use -ldbus?                                  ${HAVE_DBUS}"
+echo "  Does Emacs use -lgconf?                                 ${HAVE_GCONF}"
 
 echo "  Does Emacs use -lfreetype?                              ${HAVE_FREETYPE}"
 echo "  Does Emacs use -lm17n-flt?                              ${HAVE_M17N_FLT}"
@@ -2952,16 +3061,6 @@ fi
 
 echo
 
-if test "$USE_X_TOOLKIT" = GTK; then
-  case "$canonical" in
-  *cygwin*)
-    echo "There are known problems with Emacs and Gtk+ on cygwin, so you
-  will probably get a crash on startup.  If this happens, please use another
-  toolkit for Emacs.  See etc/PROBLEMS for more information."
-  ;;
-  esac
-fi
-
 if test "$HAVE_NS" = "yes"; then
    echo
    echo "You must run \"make install\" in order to test the built application.
@@ -2977,11 +3076,6 @@ to run if these resources are not installed."
    echo
 fi
 
-if test "$HAVE_DBUS" = yes && test "${opsys}" != "gnu-linux"; then
-  echo "D-Bus integration has been tested for GNU/Linux only."
-  echo
-fi
-
 
 # Remove any trailing slashes in these variables.
 [test "${prefix}" != NONE &&
@@ -2995,7 +3089,7 @@ test "${exec_prefix}" != NONE &&
 # the C preprocessor to some helpful value like 1, or maybe the empty
 # string.  Needless to say consequent macro substitutions are less
 # than conducive to the makefile finding the correct directory.
-[cpp_undefs="`echo $srcdir $configuration $canonical |
+[cpp_undefs="`echo $srcdir $configuration $canonical unix |
   sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/  *$//' \
   -e 's/  */ -U/g' -e 's/-U[0-9][^ ]*//g'`"]
 
@@ -3041,7 +3135,7 @@ echo creating lib-src/Makefile
   sed -e '1,/start of cpp stuff/d'\
       -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
       < Makefile.c > junk.c
-  $CPP $cpp_undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
+  $CPP -P $cpp_undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
       sed -e 's/^ /    /' -e '/^#/d' -e '/^[   \f]*$/d' > junk2.c
   cat junk1.c junk2.c > Makefile.new
   rm -f junk.c junk1.c junk2.c
@@ -3057,7 +3151,7 @@ echo creating src/Makefile
   sed -e '1,/start of cpp stuff/d'\
       -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
       < Makefile.c > junk.c
-  $CPP $cpp_undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
+  $CPP -P $cpp_undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
       sed -e 's/^ /    /' -e '/^#/d' -e '/^[   \f]*$/d' > junk2.c
   cat junk1.c junk2.c > Makefile.new
   rm -f junk.c junk1.c junk2.c