aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2010-06-29 19:55:15 -0700
committerGlenn Morris2010-06-29 19:55:15 -0700
commite7586c7a671ea10004afc3d8e48718eed8c7ce26 (patch)
tree71698bc349d8e5fbd768020c5f702db6bb5b054b
parent6259c2ec7ae4b60f59d5101c8c544d15a90540a3 (diff)
downloademacs-e7586c7a671ea10004afc3d8e48718eed8c7ce26.tar.gz
emacs-e7586c7a671ea10004afc3d8e48718eed8c7ce26.zip
Remove last internal use of cpp and src/{m,s}/*.h files in configure.in.
* configure.in (CFLAGS, REAL_CFLAGS): Set with shell, not cpp. * configure, src/config.in: Regenerate.
-rw-r--r--ChangeLog3
-rwxr-xr-xconfigure137
-rw-r--r--configure.in63
-rw-r--r--src/config.in9
4 files changed, 76 insertions, 136 deletions
diff --git a/ChangeLog b/ChangeLog
index 2c3aeec2020..d7f52eb6ed6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,8 @@
12010-06-30 Glenn Morris <rgm@gnu.org> 12010-06-30 Glenn Morris <rgm@gnu.org>
2 2
3 * configure.in (C_OPTIMIZE_SWITCH, CANNOT_DUMP, SYSTEM_MALLOC): 3 * configure.in (C_OPTIMIZE_SWITCH, CANNOT_DUMP, SYSTEM_MALLOC):
4 (USE_MMAP_FOR_BUFFERS, C_WARNING_SWITCH): Set with shell, not cpp. 4 (USE_MMAP_FOR_BUFFERS, C_WARNING_SWITCH, CFLAGS, REAL_CFLAGS):
5 Set with shell, not cpp.
5 (LIBX): Remove, just use -lX11 in the one place this was used. 6 (LIBX): Remove, just use -lX11 in the one place this was used.
6 (cannot_dump): Replace with CANNOT_DUMP. 7 (cannot_dump): Replace with CANNOT_DUMP.
7 8
diff --git a/configure b/configure
index f283e840290..686320b3622 100755
--- a/configure
+++ b/configure
@@ -718,7 +718,7 @@ C_SWITCH_SYSTEM
718UNEXEC_OBJ 718UNEXEC_OBJ
719C_SWITCH_MACHINE 719C_SWITCH_MACHINE
720LD_SWITCH_SYSTEM 720LD_SWITCH_SYSTEM
721cannot_dump 721CANNOT_DUMP
722MAKEINFO 722MAKEINFO
723GZIP_PROG 723GZIP_PROG
724INSTALL_INFO 724INSTALL_INFO
@@ -4286,14 +4286,12 @@ then
4286 CC="$NON_GNU_CC" 4286 CC="$NON_GNU_CC"
4287fi 4287fi
4288 4288
4289if test x$GCC = xyes && test "x$GCC_TEST_OPTIONS" != x 4289if test x$GCC = xyes; then
4290then 4290 C_OPTIMIZE_SWITCH=-O2
4291 CC="$CC $GCC_TEST_OPTIONS" 4291 test "x$GCC_TEST_OPTIONS" != x && CC="$CC $GCC_TEST_OPTIONS"
4292fi 4292else
4293 4293 C_OPTIMIZE_SWITCH=-O
4294if test x$GCC = x && test "x$NON_GCC_TEST_OPTIONS" != x 4294 test "x$NON_GCC_TEST_OPTIONS" != x && CC="$CC $NON_GCC_TEST_OPTIONS"
4295then
4296 CC="$CC $NON_GCC_TEST_OPTIONS"
4297fi 4295fi
4298 4296
4299ac_ext=c 4297ac_ext=c
@@ -5428,14 +5426,13 @@ fi
5428rm -f core conftest.err conftest.$ac_objext \ 5426rm -f core conftest.err conftest.$ac_objext \
5429 conftest$ac_exeext conftest.$ac_ext 5427 conftest$ac_exeext conftest.$ac_ext
5430 5428
5431#### Extract some information from the operating system and machine files. 5429LDFLAGS="${LDFLAGS} ${PROFILING_LDFLAGS}"
5430
5431
5432# The value of CPP is a quoted variable reference, so we need to do this
5433# to get its actual value...
5434CPP=`eval "echo $CPP"`
5432 5435
5433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the machine- and system-dependent files to find out
5434 - which libraries the lib-src programs will want, and
5435 - whether the GNU malloc routines are usable..." >&5
5436$as_echo "$as_me: checking the machine- and system-dependent files to find out
5437 - which libraries the lib-src programs will want, and
5438 - whether the GNU malloc routines are usable..." >&6;}
5439 5436
5440### First figure out CFLAGS (which we use for running the compiler here) 5437### First figure out CFLAGS (which we use for running the compiler here)
5441### and REAL_CFLAGS (which we use for real compilation). 5438### and REAL_CFLAGS (which we use for real compilation).
@@ -5447,84 +5444,29 @@ $as_echo "$as_me: checking the machine- and system-dependent files to find out
5447### If the CFLAGS env var is specified, we use that value 5444### If the CFLAGS env var is specified, we use that value
5448### instead of the default. 5445### instead of the default.
5449 5446
5450### It's not important that this name contain the PID; you can't run
5451### two configures in the same directory and have anything work
5452### anyway.
5453tempcname="conftest.c"
5454
5455echo '
5456#include "'${srcdir}'/src/'${opsysfile}'"
5457#include "'${srcdir}'/src/'${machfile}'"
5458
5459configure___ LIBX=-lX11
5460
5461#ifdef CANNOT_DUMP
5462configure___ cannot_dump=yes
5463#else
5464configure___ cannot_dump=no
5465#endif
5466
5467#ifdef SYSTEM_MALLOC
5468configure___ system_malloc=yes
5469#else
5470configure___ system_malloc=no
5471#endif
5472
5473#ifdef USE_MMAP_FOR_BUFFERS
5474configure___ use_mmap_for_buffers=yes
5475#else
5476configure___ use_mmap_for_buffers=no
5477#endif
5478
5479#ifndef C_OPTIMIZE_SWITCH
5480#ifdef __GNUC__
5481#define C_OPTIMIZE_SWITCH -O2
5482#else
5483#define C_OPTIMIZE_SWITCH -O
5484#endif
5485#endif
5486
5487#ifndef C_WARNINGS_SWITCH
5488#define C_WARNINGS_SWITCH ${C_WARNINGS_SWITCH}
5489#endif
5490
5491#ifdef THIS_IS_CONFIGURE
5492
5493/* Get the CFLAGS for tests in configure. */
5494#ifdef __GNUC__
5495configure___ CFLAGS=-g C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
5496#else
5497configure___ CFLAGS='${SPECIFIED_CFLAGS}'
5498#endif
5499
5500#else /* not THIS_IS_CONFIGURE */
5501
5502/* Get the CFLAGS for real compilation. */
5503#ifdef __GNUC__
5504configure___ REAL_CFLAGS=-g C_OPTIMIZE_SWITCH C_WARNINGS_SWITCH ${PROFILING_CFLAGS} '${SPECIFIED_CFLAGS}'
5505#else
5506configure___ REAL_CFLAGS='${SPECIFIED_CFLAGS}'
5507#endif
5508
5509#endif /* not THIS_IS_CONFIGURE */
5510' > ${tempcname}
5511
5512LDFLAGS="${LDFLAGS} ${PROFILING_LDFLAGS}"
5513
5514# The value of CPP is a quoted variable reference, so we need to do this
5515# to get its actual value...
5516CPP=`eval "echo $CPP"`
5517eval `${CPP} -Isrc ${tempcname} \
5518 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
5519if test "x$SPECIFIED_CFLAGS" = x; then 5447if test "x$SPECIFIED_CFLAGS" = x; then
5520 eval `${CPP} -Isrc -DTHIS_IS_CONFIGURE ${tempcname} \ 5448 if test x$GCC = xyes; then
5521 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'` 5449 CFLAGS="-g $C_OPTIMIZE_SWITCH"
5450 REAL_CFLAGS="$CFLAGS $C_WARNINGS_SWITCH $PROFILING_CFLAGS"
5451 else
5452 CFLAGS=
5453 REAL_CFLAGS=
5454 fi
5522else 5455else
5523 REAL_CFLAGS="$CFLAGS" 5456 REAL_CFLAGS="$CFLAGS"
5524fi 5457fi
5525rm ${tempcname}
5526 5458
5527 5459
5460CANNOT_DUMP=no
5461case "$opsys" in
5462 your-opsys-here)
5463 CANNOT_DUMP=yes
5464
5465$as_echo "#define CANNOT_DUMP 1" >>confdefs.h
5466
5467 ;;
5468esac
5469
5528 5470
5529 5471
5530UNEXEC_OBJ=unexelf.o 5472UNEXEC_OBJ=unexelf.o
@@ -7623,7 +7565,17 @@ if test $emacs_cv_var___after_morecore_hook = no; then
7623 doug_lea_malloc=no 7565 doug_lea_malloc=no
7624fi 7566fi
7625 7567
7568
7569system_malloc=no
7570case "$opsys" in
7571 ## darwin ld insists on the use of malloc routines in the System framework.
7572 darwin|sol2-10) system_malloc=yes ;;
7573esac
7574
7626if test "${system_malloc}" = "yes"; then 7575if test "${system_malloc}" = "yes"; then
7576
7577$as_echo "#define SYSTEM_MALLOC 1" >>confdefs.h
7578
7627 GNU_MALLOC=no 7579 GNU_MALLOC=no
7628 GNU_MALLOC_reason=" 7580 GNU_MALLOC_reason="
7629 (The GNU allocators don't work with this system configuration.)" 7581 (The GNU allocators don't work with this system configuration.)"
@@ -7658,6 +7610,10 @@ if test x"${REL_ALLOC}" = x; then
7658 REL_ALLOC=${GNU_MALLOC} 7610 REL_ALLOC=${GNU_MALLOC}
7659fi 7611fi
7660 7612
7613use_mmap_for_buffers=no
7614case "$opsys" in
7615 freebsd|irix6-5) use_mmap_for_buffers=yes ;;
7616esac
7661 7617
7662 7618
7663 7619
@@ -7861,6 +7817,9 @@ fi
7861rm -f conftest.mmap conftest.txt 7817rm -f conftest.mmap conftest.txt
7862 7818
7863if test $use_mmap_for_buffers = yes; then 7819if test $use_mmap_for_buffers = yes; then
7820
7821$as_echo "#define USE_MMAP_FOR_BUFFERS 1" >>confdefs.h
7822
7864 REL_ALLOC=no 7823 REL_ALLOC=no
7865fi 7824fi
7866 7825
@@ -8054,7 +8013,7 @@ REAL_CPPFLAGS="$CPPFLAGS"
8054if test "${HAVE_X11}" = "yes"; then 8013if test "${HAVE_X11}" = "yes"; then
8055 DEFS="$C_SWITCH_X_SITE $DEFS" 8014 DEFS="$C_SWITCH_X_SITE $DEFS"
8056 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE" 8015 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
8057 LIBS="$LIBX $LIBS" 8016 LIBS="-lX11 $LIBS"
8058 CFLAGS="$C_SWITCH_X_SITE $CFLAGS" 8017 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
8059 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS" 8018 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
8060 8019
diff --git a/configure.in b/configure.in
index 6fcea08bb63..2e5ed9497b7 100644
--- a/configure.in
+++ b/configure.in
@@ -837,11 +837,13 @@ AC_LINK_IFELSE([main(){return 0;}],
837 LDFLAGS=$late_LDFLAGS 837 LDFLAGS=$late_LDFLAGS
838 [AC_MSG_RESULT(no)]) 838 [AC_MSG_RESULT(no)])
839 839
840#### Extract some information from the operating system and machine files. 840LDFLAGS="${LDFLAGS} ${PROFILING_LDFLAGS}"
841
842
843# The value of CPP is a quoted variable reference, so we need to do this
844# to get its actual value...
845CPP=`eval "echo $CPP"`
841 846
842AC_CHECKING([the machine- and system-dependent files to find out
843 - which libraries the lib-src programs will want, and
844 - whether the GNU malloc routines are usable])
845 847
846### First figure out CFLAGS (which we use for running the compiler here) 848### First figure out CFLAGS (which we use for running the compiler here)
847### and REAL_CFLAGS (which we use for real compilation). 849### and REAL_CFLAGS (which we use for real compilation).
@@ -853,50 +855,19 @@ AC_CHECKING([the machine- and system-dependent files to find out
853### If the CFLAGS env var is specified, we use that value 855### If the CFLAGS env var is specified, we use that value
854### instead of the default. 856### instead of the default.
855 857
856### It's not important that this name contain the PID; you can't run 858dnl C_OPTIMIZE_SWITCH unused save for gcc, so why set it for non-gcc?
857### two configures in the same directory and have anything work 859dnl Note AC_PROG_CC sets CFLAGS to -g -O2 for gcc anyway.
858### anyway.
859tempcname="conftest.c"
860
861echo '
862#include "'${srcdir}'/src/'${opsysfile}'"
863#include "'${srcdir}'/src/'${machfile}'"
864
865#ifdef THIS_IS_CONFIGURE
866
867/* Get the CFLAGS for tests in configure. */
868#ifdef __GNUC__
869configure___ CFLAGS=-g ${C_OPTIMIZE_SWITCH} '${SPECIFIED_CFLAGS}'
870#else
871configure___ CFLAGS='${SPECIFIED_CFLAGS}'
872#endif
873
874#else /* not THIS_IS_CONFIGURE */
875
876/* Get the CFLAGS for real compilation. */
877#ifdef __GNUC__
878configure___ REAL_CFLAGS=-g ${C_OPTIMIZE_SWITCH} ${C_WARNINGS_SWITCH} ${PROFILING_CFLAGS} '${SPECIFIED_CFLAGS}'
879#else
880configure___ REAL_CFLAGS='${SPECIFIED_CFLAGS}'
881#endif
882
883#endif /* not THIS_IS_CONFIGURE */
884' > ${tempcname}
885
886LDFLAGS="${LDFLAGS} ${PROFILING_LDFLAGS}"
887
888# The value of CPP is a quoted variable reference, so we need to do this
889# to get its actual value...
890CPP=`eval "echo $CPP"`
891[eval `${CPP} -Isrc ${tempcname} \
892 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
893if test "x$SPECIFIED_CFLAGS" = x; then 860if test "x$SPECIFIED_CFLAGS" = x; then
894 eval `${CPP} -Isrc -DTHIS_IS_CONFIGURE ${tempcname} \ 861 if test x$GCC = xyes; then
895 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'` 862 CFLAGS="-g $C_OPTIMIZE_SWITCH"
863 REAL_CFLAGS="$CFLAGS $C_WARNINGS_SWITCH $PROFILING_CFLAGS"
864 else
865 CFLAGS=
866 REAL_CFLAGS=
867 fi
896else 868else
897 REAL_CFLAGS="$CFLAGS" 869 REAL_CFLAGS="$CFLAGS"
898fi] 870fi
899rm ${tempcname}
900 871
901 872
902dnl Not used by any currently supported platform. 873dnl Not used by any currently supported platform.
diff --git a/src/config.in b/src/config.in
index ef4caf58b8c..098edeafd4a 100644
--- a/src/config.in
+++ b/src/config.in
@@ -30,6 +30,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
30/* Define to 1 if the mktime function is broken. */ 30/* Define to 1 if the mktime function is broken. */
31#undef BROKEN_MKTIME 31#undef BROKEN_MKTIME
32 32
33/* Define if Emacs cannot be dumped on your system. */
34#undef CANNOT_DUMP
35
33/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP 36/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
34 systems. This function is required for `alloca.c' support on those systems. 37 systems. This function is required for `alloca.c' support on those systems.
35 */ 38 */
@@ -899,6 +902,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
899/* Process async input synchronously. */ 902/* Process async input synchronously. */
900#undef SYNC_INPUT 903#undef SYNC_INPUT
901 904
905/* Define to use system malloc. */
906#undef SYSTEM_MALLOC
907
902/* Define to 1 if you use terminfo instead of termcap. */ 908/* Define to 1 if you use terminfo instead of termcap. */
903#undef TERMINFO 909#undef TERMINFO
904 910
@@ -921,6 +927,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
921/* Define to 1 if using the Lucid X toolkit. */ 927/* Define to 1 if using the Lucid X toolkit. */
922#undef USE_LUCID 928#undef USE_LUCID
923 929
930/* Define to use mmap to allocate buffer text. */
931#undef USE_MMAP_FOR_BUFFERS
932
924/* Define to 1 if using the Motif X toolkit. */ 933/* Define to 1 if using the Motif X toolkit. */
925#undef USE_MOTIF 934#undef USE_MOTIF
926 935