comparison configure.in @ 109073:6799ec1a7188

Remove some cpp that is internal to configure.in. * configure.in (C_OPTIMIZE_SWITCH, CANNOT_DUMP, SYSTEM_MALLOC): (USE_MMAP_FOR_BUFFERS, C_WARNING_SWITCH): Set with shell, not cpp. (LIBX): Remove, just use -lX11 in the one place this was used. (cannot_dump): Replace with CANNOT_DUMP. * src/Makefile.in (CANNOT_DUMP): Update for configure name change. * src/s/freebsd.h (USE_MMAP_FOR_BUFFERS): * src/s/irix6-5.h (USE_MMAP_FOR_BUFFERS): * src/s/darwin.h (SYSTEM_MALLOC): * src/s/sol2-10.h (SYSTEM_MALLOC): Move to configure. * src/m/alpha.h: Remove old comment. * src/s/aix4-2.h: Update comment. * src/s/template.h: Remove USE_MMAP_FOR_BUFFERS. * msdos/sed1v2.inp (CANNOT_DUMP): Update for configure name change. * admin/CPP-DEFINES: Remove USE_MMAP_FOR_BUFFERS, CANNOT_DUMP. * etc/DEBUG: Update SYSTEM_MALLOC and CANNOT_DUMP references. Some re-filling.
author Glenn Morris <rgm@gnu.org>
date Tue, 29 Jun 2010 19:48:54 -0700
parents b5f73bf59a4f
children c97bf1cfaa8d
comparison
equal deleted inserted replaced
109072:c70ff40ac4ce 109073:6799ec1a7188
708 test x$cc_specified != xyes 708 test x$cc_specified != xyes
709 then 709 then
710 CC="$NON_GNU_CC" 710 CC="$NON_GNU_CC"
711 fi 711 fi
712 712
713 if test x$GCC = xyes && test "x$GCC_TEST_OPTIONS" != x 713 if test x$GCC = xyes; then
714 then 714 C_OPTIMIZE_SWITCH=-O2
715 CC="$CC $GCC_TEST_OPTIONS" 715 test "x$GCC_TEST_OPTIONS" != x && CC="$CC $GCC_TEST_OPTIONS"
716 fi 716 else
717 717 dnl FIXME? unused.
718 if test x$GCC = x && test "x$NON_GCC_TEST_OPTIONS" != x 718 C_OPTIMIZE_SWITCH=-O
719 then 719 test "x$NON_GCC_TEST_OPTIONS" != x && CC="$CC $NON_GCC_TEST_OPTIONS"
720 CC="$CC $NON_GCC_TEST_OPTIONS"
721 fi 720 fi
722 721
723 dnl checks for Unix variants 722 dnl checks for Unix variants
724 AC_USE_SYSTEM_EXTENSIONS 723 AC_USE_SYSTEM_EXTENSIONS
725 724
861 860
862 echo ' 861 echo '
863 #include "'${srcdir}'/src/'${opsysfile}'" 862 #include "'${srcdir}'/src/'${opsysfile}'"
864 #include "'${srcdir}'/src/'${machfile}'" 863 #include "'${srcdir}'/src/'${machfile}'"
865 864
866 configure___ LIBX=-lX11
867
868 #ifdef CANNOT_DUMP
869 configure___ cannot_dump=yes
870 #else
871 configure___ cannot_dump=no
872 #endif
873
874 #ifdef SYSTEM_MALLOC
875 configure___ system_malloc=yes
876 #else
877 configure___ system_malloc=no
878 #endif
879
880 #ifdef USE_MMAP_FOR_BUFFERS
881 configure___ use_mmap_for_buffers=yes
882 #else
883 configure___ use_mmap_for_buffers=no
884 #endif
885
886 #ifndef C_OPTIMIZE_SWITCH
887 #ifdef __GNUC__
888 #define C_OPTIMIZE_SWITCH -O2
889 #else
890 #define C_OPTIMIZE_SWITCH -O
891 #endif
892 #endif
893
894 #ifndef C_WARNINGS_SWITCH
895 #define C_WARNINGS_SWITCH ${C_WARNINGS_SWITCH}
896 #endif
897
898 #ifdef THIS_IS_CONFIGURE 865 #ifdef THIS_IS_CONFIGURE
899 866
900 /* Get the CFLAGS for tests in configure. */ 867 /* Get the CFLAGS for tests in configure. */
901 #ifdef __GNUC__ 868 #ifdef __GNUC__
902 configure___ CFLAGS=-g C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}' 869 configure___ CFLAGS=-g ${C_OPTIMIZE_SWITCH} '${SPECIFIED_CFLAGS}'
903 #else 870 #else
904 configure___ CFLAGS='${SPECIFIED_CFLAGS}' 871 configure___ CFLAGS='${SPECIFIED_CFLAGS}'
905 #endif 872 #endif
906 873
907 #else /* not THIS_IS_CONFIGURE */ 874 #else /* not THIS_IS_CONFIGURE */
908 875
909 /* Get the CFLAGS for real compilation. */ 876 /* Get the CFLAGS for real compilation. */
910 #ifdef __GNUC__ 877 #ifdef __GNUC__
911 configure___ REAL_CFLAGS=-g C_OPTIMIZE_SWITCH C_WARNINGS_SWITCH ${PROFILING_CFLAGS} '${SPECIFIED_CFLAGS}' 878 configure___ REAL_CFLAGS=-g ${C_OPTIMIZE_SWITCH} ${C_WARNINGS_SWITCH} ${PROFILING_CFLAGS} '${SPECIFIED_CFLAGS}'
912 #else 879 #else
913 configure___ REAL_CFLAGS='${SPECIFIED_CFLAGS}' 880 configure___ REAL_CFLAGS='${SPECIFIED_CFLAGS}'
914 #endif 881 #endif
915 882
916 #endif /* not THIS_IS_CONFIGURE */ 883 #endif /* not THIS_IS_CONFIGURE */
930 REAL_CFLAGS="$CFLAGS" 897 REAL_CFLAGS="$CFLAGS"
931 fi] 898 fi]
932 rm ${tempcname} 899 rm ${tempcname}
933 900
934 901
935 AC_SUBST(cannot_dump) 902 dnl Not used by any currently supported platform.
903 dnl The function dump-emacs will not be defined and temacs will do
904 dnl (load "loadup") automatically unless told otherwise.
905 CANNOT_DUMP=no
906 case "$opsys" in
907 your-opsys-here)
908 CANNOT_DUMP=yes
909 AC_DEFINE(CANNOT_DUMP, 1, [Define if Emacs cannot be dumped on your system.])
910 ;;
911 esac
912 AC_SUBST(CANNOT_DUMP)
913
936 914
937 UNEXEC_OBJ=unexelf.o 915 UNEXEC_OBJ=unexelf.o
938 case "$opsys" in 916 case "$opsys" in
939 aix4-2) 917 aix4-2)
940 UNEXEC_OBJ=unexaix.o 918 UNEXEC_OBJ=unexaix.o
1645 emacs_cv_var___after_morecore_hook=no)]) 1623 emacs_cv_var___after_morecore_hook=no)])
1646 if test $emacs_cv_var___after_morecore_hook = no; then 1624 if test $emacs_cv_var___after_morecore_hook = no; then
1647 doug_lea_malloc=no 1625 doug_lea_malloc=no
1648 fi 1626 fi
1649 1627
1628
1629 dnl See comments in aix4-2.h about maybe using system malloc there.
1630 system_malloc=no
1631 case "$opsys" in
1632 ## darwin ld insists on the use of malloc routines in the System framework.
1633 darwin|sol2-10) system_malloc=yes ;;
1634 esac
1635
1650 if test "${system_malloc}" = "yes"; then 1636 if test "${system_malloc}" = "yes"; then
1637 AC_DEFINE(SYSTEM_MALLOC, 1, [Define to use system malloc.])
1651 GNU_MALLOC=no 1638 GNU_MALLOC=no
1652 GNU_MALLOC_reason=" 1639 GNU_MALLOC_reason="
1653 (The GNU allocators don't work with this system configuration.)" 1640 (The GNU allocators don't work with this system configuration.)"
1654 GMALLOC_OBJ= 1641 GMALLOC_OBJ=
1655 VMLIMIT_OBJ= 1642 VMLIMIT_OBJ=
1679 1666
1680 if test x"${REL_ALLOC}" = x; then 1667 if test x"${REL_ALLOC}" = x; then
1681 REL_ALLOC=${GNU_MALLOC} 1668 REL_ALLOC=${GNU_MALLOC}
1682 fi 1669 fi
1683 1670
1684 dnl For now, need to use an explicit `#define USE_MMAP_FOR_BUFFERS 1' 1671 use_mmap_for_buffers=no
1685 dnl the system configuration file (s/*.h) to turn the use of mmap 1672 case "$opsys" in
1686 dnl in the relocating allocator on. 1673 freebsd|irix6-5) use_mmap_for_buffers=yes ;;
1674 esac
1687 1675
1688 AC_FUNC_MMAP 1676 AC_FUNC_MMAP
1689 if test $use_mmap_for_buffers = yes; then 1677 if test $use_mmap_for_buffers = yes; then
1678 AC_DEFINE(USE_MMAP_FOR_BUFFERS, 1, [Define to use mmap to allocate buffer text.])
1690 REL_ALLOC=no 1679 REL_ALLOC=no
1691 fi 1680 fi
1692 1681
1693 LIBS="$LIBS_SYSTEM $LIBS" 1682 LIBS="$LIBS_SYSTEM $LIBS"
1694 1683
1739 REAL_CPPFLAGS="$CPPFLAGS" 1728 REAL_CPPFLAGS="$CPPFLAGS"
1740 1729
1741 if test "${HAVE_X11}" = "yes"; then 1730 if test "${HAVE_X11}" = "yes"; then
1742 DEFS="$C_SWITCH_X_SITE $DEFS" 1731 DEFS="$C_SWITCH_X_SITE $DEFS"
1743 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE" 1732 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
1744 LIBS="$LIBX $LIBS" 1733 LIBS="-lX11 $LIBS"
1745 CFLAGS="$C_SWITCH_X_SITE $CFLAGS" 1734 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
1746 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS" 1735 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
1747 1736
1748 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests. 1737 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
1749 # This is handled by LD_SWITCH_X_SITE_AUX during the real build, 1738 # This is handled by LD_SWITCH_X_SITE_AUX during the real build,