diff options
| author | Glenn Morris | 2010-06-29 19:55:15 -0700 |
|---|---|---|
| committer | Glenn Morris | 2010-06-29 19:55:15 -0700 |
| commit | e7586c7a671ea10004afc3d8e48718eed8c7ce26 (patch) | |
| tree | 71698bc349d8e5fbd768020c5f702db6bb5b054b | |
| parent | 6259c2ec7ae4b60f59d5101c8c544d15a90540a3 (diff) | |
| download | emacs-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-- | ChangeLog | 3 | ||||
| -rwxr-xr-x | configure | 137 | ||||
| -rw-r--r-- | configure.in | 63 | ||||
| -rw-r--r-- | src/config.in | 9 |
4 files changed, 76 insertions, 136 deletions
| @@ -1,7 +1,8 @@ | |||
| 1 | 2010-06-30 Glenn Morris <rgm@gnu.org> | 1 | 2010-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 | ||
| @@ -718,7 +718,7 @@ C_SWITCH_SYSTEM | |||
| 718 | UNEXEC_OBJ | 718 | UNEXEC_OBJ |
| 719 | C_SWITCH_MACHINE | 719 | C_SWITCH_MACHINE |
| 720 | LD_SWITCH_SYSTEM | 720 | LD_SWITCH_SYSTEM |
| 721 | cannot_dump | 721 | CANNOT_DUMP |
| 722 | MAKEINFO | 722 | MAKEINFO |
| 723 | GZIP_PROG | 723 | GZIP_PROG |
| 724 | INSTALL_INFO | 724 | INSTALL_INFO |
| @@ -4286,14 +4286,12 @@ then | |||
| 4286 | CC="$NON_GNU_CC" | 4286 | CC="$NON_GNU_CC" |
| 4287 | fi | 4287 | fi |
| 4288 | 4288 | ||
| 4289 | if test x$GCC = xyes && test "x$GCC_TEST_OPTIONS" != x | 4289 | if test x$GCC = xyes; then |
| 4290 | then | 4290 | C_OPTIMIZE_SWITCH=-O2 |
| 4291 | CC="$CC $GCC_TEST_OPTIONS" | 4291 | test "x$GCC_TEST_OPTIONS" != x && CC="$CC $GCC_TEST_OPTIONS" |
| 4292 | fi | 4292 | else |
| 4293 | 4293 | C_OPTIMIZE_SWITCH=-O | |
| 4294 | if 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" |
| 4295 | then | ||
| 4296 | CC="$CC $NON_GCC_TEST_OPTIONS" | ||
| 4297 | fi | 4295 | fi |
| 4298 | 4296 | ||
| 4299 | ac_ext=c | 4297 | ac_ext=c |
| @@ -5428,14 +5426,13 @@ fi | |||
| 5428 | rm -f core conftest.err conftest.$ac_objext \ | 5426 | rm -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. | 5429 | LDFLAGS="${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... | ||
| 5434 | CPP=`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. | ||
| 5453 | tempcname="conftest.c" | ||
| 5454 | |||
| 5455 | echo ' | ||
| 5456 | #include "'${srcdir}'/src/'${opsysfile}'" | ||
| 5457 | #include "'${srcdir}'/src/'${machfile}'" | ||
| 5458 | |||
| 5459 | configure___ LIBX=-lX11 | ||
| 5460 | |||
| 5461 | #ifdef CANNOT_DUMP | ||
| 5462 | configure___ cannot_dump=yes | ||
| 5463 | #else | ||
| 5464 | configure___ cannot_dump=no | ||
| 5465 | #endif | ||
| 5466 | |||
| 5467 | #ifdef SYSTEM_MALLOC | ||
| 5468 | configure___ system_malloc=yes | ||
| 5469 | #else | ||
| 5470 | configure___ system_malloc=no | ||
| 5471 | #endif | ||
| 5472 | |||
| 5473 | #ifdef USE_MMAP_FOR_BUFFERS | ||
| 5474 | configure___ use_mmap_for_buffers=yes | ||
| 5475 | #else | ||
| 5476 | configure___ 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__ | ||
| 5495 | configure___ CFLAGS=-g C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}' | ||
| 5496 | #else | ||
| 5497 | configure___ CFLAGS='${SPECIFIED_CFLAGS}' | ||
| 5498 | #endif | ||
| 5499 | |||
| 5500 | #else /* not THIS_IS_CONFIGURE */ | ||
| 5501 | |||
| 5502 | /* Get the CFLAGS for real compilation. */ | ||
| 5503 | #ifdef __GNUC__ | ||
| 5504 | configure___ REAL_CFLAGS=-g C_OPTIMIZE_SWITCH C_WARNINGS_SWITCH ${PROFILING_CFLAGS} '${SPECIFIED_CFLAGS}' | ||
| 5505 | #else | ||
| 5506 | configure___ REAL_CFLAGS='${SPECIFIED_CFLAGS}' | ||
| 5507 | #endif | ||
| 5508 | |||
| 5509 | #endif /* not THIS_IS_CONFIGURE */ | ||
| 5510 | ' > ${tempcname} | ||
| 5511 | |||
| 5512 | LDFLAGS="${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... | ||
| 5516 | CPP=`eval "echo $CPP"` | ||
| 5517 | eval `${CPP} -Isrc ${tempcname} \ | ||
| 5518 | | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'` | ||
| 5519 | if test "x$SPECIFIED_CFLAGS" = x; then | 5447 | if 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 | ||
| 5522 | else | 5455 | else |
| 5523 | REAL_CFLAGS="$CFLAGS" | 5456 | REAL_CFLAGS="$CFLAGS" |
| 5524 | fi | 5457 | fi |
| 5525 | rm ${tempcname} | ||
| 5526 | 5458 | ||
| 5527 | 5459 | ||
| 5460 | CANNOT_DUMP=no | ||
| 5461 | case "$opsys" in | ||
| 5462 | your-opsys-here) | ||
| 5463 | CANNOT_DUMP=yes | ||
| 5464 | |||
| 5465 | $as_echo "#define CANNOT_DUMP 1" >>confdefs.h | ||
| 5466 | |||
| 5467 | ;; | ||
| 5468 | esac | ||
| 5469 | |||
| 5528 | 5470 | ||
| 5529 | 5471 | ||
| 5530 | UNEXEC_OBJ=unexelf.o | 5472 | UNEXEC_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 |
| 7624 | fi | 7566 | fi |
| 7625 | 7567 | ||
| 7568 | |||
| 7569 | system_malloc=no | ||
| 7570 | case "$opsys" in | ||
| 7571 | ## darwin ld insists on the use of malloc routines in the System framework. | ||
| 7572 | darwin|sol2-10) system_malloc=yes ;; | ||
| 7573 | esac | ||
| 7574 | |||
| 7626 | if test "${system_malloc}" = "yes"; then | 7575 | if 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} |
| 7659 | fi | 7611 | fi |
| 7660 | 7612 | ||
| 7613 | use_mmap_for_buffers=no | ||
| 7614 | case "$opsys" in | ||
| 7615 | freebsd|irix6-5) use_mmap_for_buffers=yes ;; | ||
| 7616 | esac | ||
| 7661 | 7617 | ||
| 7662 | 7618 | ||
| 7663 | 7619 | ||
| @@ -7861,6 +7817,9 @@ fi | |||
| 7861 | rm -f conftest.mmap conftest.txt | 7817 | rm -f conftest.mmap conftest.txt |
| 7862 | 7818 | ||
| 7863 | if test $use_mmap_for_buffers = yes; then | 7819 | if 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 |
| 7865 | fi | 7824 | fi |
| 7866 | 7825 | ||
| @@ -8054,7 +8013,7 @@ REAL_CPPFLAGS="$CPPFLAGS" | |||
| 8054 | if test "${HAVE_X11}" = "yes"; then | 8013 | if 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. | 840 | LDFLAGS="${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... | ||
| 845 | CPP=`eval "echo $CPP"` | ||
| 841 | 846 | ||
| 842 | AC_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 | 858 | dnl 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 | 859 | dnl Note AC_PROG_CC sets CFLAGS to -g -O2 for gcc anyway. |
| 858 | ### anyway. | ||
| 859 | tempcname="conftest.c" | ||
| 860 | |||
| 861 | echo ' | ||
| 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__ | ||
| 869 | configure___ CFLAGS=-g ${C_OPTIMIZE_SWITCH} '${SPECIFIED_CFLAGS}' | ||
| 870 | #else | ||
| 871 | configure___ CFLAGS='${SPECIFIED_CFLAGS}' | ||
| 872 | #endif | ||
| 873 | |||
| 874 | #else /* not THIS_IS_CONFIGURE */ | ||
| 875 | |||
| 876 | /* Get the CFLAGS for real compilation. */ | ||
| 877 | #ifdef __GNUC__ | ||
| 878 | configure___ REAL_CFLAGS=-g ${C_OPTIMIZE_SWITCH} ${C_WARNINGS_SWITCH} ${PROFILING_CFLAGS} '${SPECIFIED_CFLAGS}' | ||
| 879 | #else | ||
| 880 | configure___ REAL_CFLAGS='${SPECIFIED_CFLAGS}' | ||
| 881 | #endif | ||
| 882 | |||
| 883 | #endif /* not THIS_IS_CONFIGURE */ | ||
| 884 | ' > ${tempcname} | ||
| 885 | |||
| 886 | LDFLAGS="${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... | ||
| 890 | CPP=`eval "echo $CPP"` | ||
| 891 | [eval `${CPP} -Isrc ${tempcname} \ | ||
| 892 | | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'` | ||
| 893 | if test "x$SPECIFIED_CFLAGS" = x; then | 860 | if 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 | ||
| 896 | else | 868 | else |
| 897 | REAL_CFLAGS="$CFLAGS" | 869 | REAL_CFLAGS="$CFLAGS" |
| 898 | fi] | 870 | fi |
| 899 | rm ${tempcname} | ||
| 900 | 871 | ||
| 901 | 872 | ||
| 902 | dnl Not used by any currently supported platform. | 873 | dnl 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 | ||