Mercurial > emacs
comparison configure @ 109074:c97bf1cfaa8d
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.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Tue, 29 Jun 2010 19:55:15 -0700 |
parents | b5f73bf59a4f |
children | 48064019239b |
comparison
equal
deleted
inserted
replaced
109073:6799ec1a7188 | 109074:c97bf1cfaa8d |
---|---|
716 LIBS_SYSTEM | 716 LIBS_SYSTEM |
717 C_SWITCH_SYSTEM | 717 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 |
725 RANLIB | 725 RANLIB |
726 INSTALL_DATA | 726 INSTALL_DATA |
4284 test x$cc_specified != xyes | 4284 test x$cc_specified != xyes |
4285 then | 4285 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 |
4300 ac_cpp='$CPP $CPPFLAGS' | 4298 ac_cpp='$CPP $CPPFLAGS' |
4301 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | 4299 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' |
5426 $as_echo "no" >&6; } | 5424 $as_echo "no" >&6; } |
5427 fi | 5425 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}" |
5432 | 5430 |
5433 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the machine- and system-dependent files to find out | 5431 |
5434 - which libraries the lib-src programs will want, and | 5432 # The value of CPP is a quoted variable reference, so we need to do this |
5435 - whether the GNU malloc routines are usable..." >&5 | 5433 # to get its actual value... |
5436 $as_echo "$as_me: checking the machine- and system-dependent files to find out | 5434 CPP=`eval "echo $CPP"` |
5437 - which libraries the lib-src programs will want, and | 5435 |
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). |
5442 ### The two are the same except on a few systems, where they are made | 5439 ### The two are the same except on a few systems, where they are made |
5443 ### different to work around various lossages. For example, | 5440 ### different to work around various lossages. For example, |
5445 ### as implying static linking. | 5442 ### as implying static linking. |
5446 | 5443 |
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} | 5458 |
5526 | 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 | |
5527 | 5469 |
5528 | 5470 |
5529 | 5471 |
5530 UNEXEC_OBJ=unexelf.o | 5472 UNEXEC_OBJ=unexelf.o |
5531 case "$opsys" in | 5473 case "$opsys" in |
7621 $as_echo "$emacs_cv_var___after_morecore_hook" >&6; } | 7563 $as_echo "$emacs_cv_var___after_morecore_hook" >&6; } |
7622 if test $emacs_cv_var___after_morecore_hook = no; then | 7564 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.)" |
7630 GMALLOC_OBJ= | 7582 GMALLOC_OBJ= |
7631 VMLIMIT_OBJ= | 7583 VMLIMIT_OBJ= |
7656 | 7608 |
7657 if test x"${REL_ALLOC}" = x; then | 7609 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 |
7664 | 7620 |
7665 for ac_header in $ac_header_list | 7621 for ac_header in $ac_header_list |
7859 | 7815 |
7860 fi | 7816 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 |
7867 LIBS="$LIBS_SYSTEM $LIBS" | 7826 LIBS="$LIBS_SYSTEM $LIBS" |
7868 | 7827 |
8052 REAL_CPPFLAGS="$CPPFLAGS" | 8011 REAL_CPPFLAGS="$CPPFLAGS" |
8053 | 8012 |
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 |
8061 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests. | 8020 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests. |
8062 # This is handled by LD_SWITCH_X_SITE_AUX during the real build, | 8021 # This is handled by LD_SWITCH_X_SITE_AUX during the real build, |