[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r108252: * configure.in: Simplify by
From: |
Paul Eggert |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r108252: * configure.in: Simplify by removing CPP etc. |
Date: |
Wed, 16 May 2012 02:01:55 -0700 |
User-agent: |
Bazaar (2.3.1) |
------------------------------------------------------------
revno: 108252
committer: Paul Eggert <address@hidden>
branch nick: trunk
timestamp: Wed 2012-05-16 02:01:55 -0700
message:
* configure.in: Simplify by removing CPP etc.
(CPP_TEST_OPTIONS, NON_GNU_CPP, cc_specified, SPECIFIED_CFLAGS)
(SPECIFED_CPP, CPP, NON_GNU_CC, AC_PROG_CPP): Remove; not needed.
In particular we no longer need to fiddle with CPP, since we don't
use CPP specially any more.
(gl_EARLY): Invoke this after adjusting CC, so that it uses the
adjusted compiler.
(AC_PROG_INSTALL, AC_PROG_MKDIR_P, AC_PROG_RANLIB): Comment out,
since gl_EARLY and/or Autoconf already does these.
modified:
ChangeLog
configure.in
=== modified file 'ChangeLog'
--- a/ChangeLog 2012-05-16 06:15:52 +0000
+++ b/ChangeLog 2012-05-16 09:01:55 +0000
@@ -1,3 +1,15 @@
+2012-05-16 Paul Eggert <address@hidden>
+
+ * configure.in: Simplify by removing CPP etc.
+ (CPP_TEST_OPTIONS, NON_GNU_CPP, cc_specified, SPECIFIED_CFLAGS)
+ (SPECIFED_CPP, CPP, NON_GNU_CC, AC_PROG_CPP): Remove; not needed.
+ In particular we no longer need to fiddle with CPP, since we don't
+ use CPP specially any more.
+ (gl_EARLY): Invoke this after adjusting CC, so that it uses the
+ adjusted compiler.
+ (AC_PROG_INSTALL, AC_PROG_MKDIR_P, AC_PROG_RANLIB): Comment out,
+ since gl_EARLY and/or Autoconf already does these.
+
2012-05-16 Glenn Morris <address@hidden>
* configure.in: Try to fix building with gcc >= 4.6 on Darwin.
=== modified file 'configure.in'
--- a/configure.in 2012-05-16 06:15:52 +0000
+++ b/configure.in 2012-05-16 09:01:55 +0000
@@ -496,7 +496,6 @@
# FIXME? Is it really our business to decide this for the user?
if test -d /sw/include && test -d /sw/lib; then
GCC_TEST_OPTIONS="-I/sw/include -L/sw/lib"
- CPP_TEST_OPTIONS=${GCC_TEST_OPTIONS}
NON_GCC_TEST_OPTIONS=${GCC_TEST_OPTIONS}
fi
;;
@@ -531,7 +530,6 @@
# Without defining _LANGUAGE_C, things get masked out in the headers
# so that, for instance, grepping for `free' in stdlib.h fails and
# AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
- NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C"
;;
@@ -548,18 +546,15 @@
case "${canonical}" in
*-sunos5.6* | *-solaris2.6* )
opsys=sol2-6
- NON_GNU_CPP=/usr/ccs/lib/cpp
RANLIB="ar -ts"
;;
*-sunos5.[7-9]* | *-solaris2.[7-9]* )
opsys=sol2-6
emacs_check_sunpro_c=yes
- NON_GNU_CPP=/usr/ccs/lib/cpp
;;
*-sunos5* | *-solaris* )
opsys=sol2-10
emacs_check_sunpro_c=yes
- NON_GNU_CPP=/usr/ccs/lib/cpp
;;
esac
## Watch out for a compiler that we know will not work.
@@ -581,9 +576,9 @@
case "${canonical}" in
*-cygwin ) opsys=cygwin ;;
*-darwin* ) opsys=darwin ;;
- *-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
- *-sysv5uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
- *-sysv5OpenUNIX* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
+ *-sysv4.2uw* ) opsys=unixware ;;
+ *-sysv5uw* ) opsys=unixware ;;
+ *-sysv5OpenUNIX* ) opsys=unixware ;;
## Otherwise, we'll fall through to the generic opsys code at the bottom.
esac
;;
@@ -625,111 +620,20 @@
#### Choose a compiler.
-test -n "$CC" && cc_specified=yes
-
-# Save the value of CFLAGS that the user specified.
-SPECIFIED_CFLAGS="$CFLAGS"
-
-# Save specified CPP (if any), before AC_PROG_CPP runs.
-SPECIFIED_CPP="$CPP"
dnl Sets GCC=yes if using gcc.
AC_PROG_CC
AM_PROG_CC_C_O
-# Initialize gnulib right after verifying that the C compiler works.
-# Note: this ends up setting CPP.
-gl_EARLY
-
-dnl Note: looks like gl_EARLY has already done this (via AC_PROG_CPP).
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
- CPP=
-fi
-
-## If not using gcc, and on Solaris, and no CPP specified, see if
-## using a Sun compiler, which needs -Xs to prevent whitespace.
-if test x"$GCC" != xyes && test x"$emacs_check_sunpro_c" = xyes && \
- test x"$CPP" = x; then
- AC_MSG_CHECKING([whether we are using a Sun C compiler])
- AC_CACHE_VAL(emacs_cv_sunpro_c,
- [AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],
-[[#ifndef __SUNPRO_C
-fail;
-#endif
-]])], emacs_cv_sunpro_c=yes, emacs_cv_sunpro_c=no)])
- AC_MSG_RESULT($emacs_cv_sunpro_c)
-
- if test x"$emacs_cv_sunpro_c" = xyes; then
- NON_GNU_CPP="$CC -E -Xs"
- fi
-fi
-
-## If using gcc, and on darwin, see if using Apple's gcc, where old
-## (pre gcc 3.3?) versions need -no-cpp-precomp to workaround some
-## (unrecorded) issue.
-## Frankly, I suspect this option is no longer needed on any system
-## still in use today. It is at best a no-op since Apple's version
-## of gcc 3.3 (?), which corresponds (?) to Xcode 1.5 from 2004.
-## This was for OS X 10.3, and the nextstep port (for example)
-## only supports 10.4 or later (although you could be building a
-## non-ns version on some older OS X I guess).
-if test x"$opsys" = xdarwin && test x"$GCC" = xyes; then
- AC_MSG_CHECKING([whether we are using an Apple version of GCC])
- AC_CACHE_VAL(emacs_cv_apple_gcc,
- [AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],
-[[#ifndef __APPLE_CC__
-fail;
-#endif
-]])], emacs_cv_apple_gcc=yes, emacs_cv_apple_gcc=no)])
- AC_MSG_RESULT($emacs_cv_apple_gcc)
-
- ## This only tests that adding the option does not cause an error.
- ## FIXME It may still cause "unrecognized option"
- ## (in gcc < 4.6 --no-foo does that; newer versions throw an error).
- ## The message appears on stderr, so AC_EGREP_CPP is no use.
- ## It would be better to test if it is actually needed.
- ## For that, someone would have actually had to document what the
- ## issues it worked around were, so we could test for them.
- if test $emacs_cv_apple_gcc = yes; then
- AC_MSG_CHECKING([whether preprocessor accepts -no-cpp-precomp])
- save_CPP="$CPP"
- test x$SPECIFIED_CPP = x && CPP="${CC-cc} -E"
- CPP="$CPP -no-cpp-precomp"
- dnl NB this will run AC_PROG_CPP first if it has not already happened.
- AC_CACHE_VAL(emacs_cv_precomp,
- [AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[]],[[]])], emacs_cv_precomp=yes,
emacs_cv_precomp=no)])
- AC_MSG_RESULT($emacs_cv_precomp)
-
- test $emacs_cv_precomp = no && CPP="$save_CPP"
- fi
-fi
-
-#### Some systems specify a CPP to use unless we are using GCC.
-#### Now that we know whether we are using GCC, we can decide whether
-#### to use that one.
-if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x
-then
- CPP="$NON_GNU_CPP"
-fi
-
-test "x$CPP_TEST_OPTIONS" != x && CPP="$CPP $CPP_TEST_OPTIONS"
-
-#### Some systems specify a CC to use unless we are using GCC.
-#### Now that we know whether we are using GCC, we can decide whether
-#### to use that one.
-if test "x$NON_GNU_CC" != x && test x$GCC != xyes &&
- test x$cc_specified != xyes
-then
- CC="$NON_GNU_CC"
-fi
-
if test x$GCC = xyes; then
test "x$GCC_TEST_OPTIONS" != x && CC="$CC $GCC_TEST_OPTIONS"
else
test "x$NON_GCC_TEST_OPTIONS" != x && CC="$CC $NON_GCC_TEST_OPTIONS"
fi
+# Initialize gnulib right after choosing the compiler.
+gl_EARLY
+
AC_ARG_ENABLE([gcc-warnings],
[AS_HELP_STRING([--enable-gcc-warnings],
[turn on lots of GCC warnings (for developers)])],
@@ -847,19 +751,13 @@
-#### Some other nice autoconf tests.
-
-dnl Note: looks like gl_EARLY has already done this.
-AC_PROG_CPP
-AC_PROG_INSTALL
-
-dnl Note: looks like configure does this very early on anyway.
-AC_PROG_MKDIR_P
-
-dnl Note: looks like gl_EARLY has already done this.
-if test "x$RANLIB" = x; then
- AC_PROG_RANLIB
-fi
+dnl Some other nice autoconf tests.
+dnl These are commented out, since gl_EARLY and/or Autoconf already does them.
+dnl AC_PROG_INSTALL
+dnl AC_PROG_MKDIR_P
+dnl if test "x$RANLIB" = x; then
+dnl AC_PROG_RANLIB
+dnl fi
## Although we're running on an amd64 kernel, we're actually compiling for
## the x86 architecture. The user should probably have provided an
@@ -950,11 +848,6 @@
[AC_MSG_RESULT(no)])
-# The value of CPP is a quoted variable reference, so we need to do this
-# to get its actual value...
-CPP=`eval "echo $CPP"`
-
-
dnl The function dump-emacs will not be defined and temacs will do
dnl (load "loadup") automatically unless told otherwise.
test "x$CANNOT_DUMP" = "x" && CANNOT_DUMP=no
@@ -3982,7 +3875,7 @@
AC_CONFIG_COMMANDS([epaths], [
echo creating src/epaths.h
${MAKE-make} epaths-force
-], [GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPPFLAGS="$CPPFLAGS"])
+], [GCC="$GCC" CPPFLAGS="$CPPFLAGS"])
AC_CONFIG_COMMANDS([gdbinit], [
if test ! -f src/.gdbinit && test -f $srcdir/src/.gdbinit; then
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r108252: * configure.in: Simplify by removing CPP etc.,
Paul Eggert <=