Mercurial > emacs
comparison configure.in @ 109871:3226ac2da7f7
merge from trunk
author | Joakim <joakim@localhost.localdomain> |
---|---|
date | Tue, 17 Aug 2010 23:19:11 +0200 |
parents | 68616bb3ae25 6a65d5e52497 |
children | fd080c6fcd86 |
comparison
equal
deleted
inserted
replaced
109870:2ea89e2c498f | 109871:3226ac2da7f7 |
---|---|
127 dnl FIXME currently it is not the last. | 127 dnl FIXME currently it is not the last. |
128 dnl This should be the last --with option, because --with-x is | 128 dnl This should be the last --with option, because --with-x is |
129 dnl added later on when we find the path of X, and it's best to | 129 dnl added later on when we find the path of X, and it's best to |
130 dnl keep them together visually. | 130 dnl keep them together visually. |
131 AC_ARG_WITH([x-toolkit],[AS_HELP_STRING([--with-x-toolkit=KIT], | 131 AC_ARG_WITH([x-toolkit],[AS_HELP_STRING([--with-x-toolkit=KIT], |
132 [use an X toolkit (KIT one of: yes or gtk, lucid or athena, motif, no)])], | 132 [use an X toolkit (KIT one of: yes or gtk, gtk3, lucid or athena, motif, no)])], |
133 [ case "${withval}" in | 133 [ case "${withval}" in |
134 y | ye | yes ) val=gtk ;; | 134 y | ye | yes ) val=gtk ;; |
135 n | no ) val=no ;; | 135 n | no ) val=no ;; |
136 l | lu | luc | luci | lucid ) val=lucid ;; | 136 l | lu | luc | luci | lucid ) val=lucid ;; |
137 a | at | ath | athe | athen | athena ) val=athena ;; | 137 a | at | ath | athe | athen | athena ) val=athena ;; |
138 m | mo | mot | moti | motif ) val=motif ;; | 138 m | mo | mot | moti | motif ) val=motif ;; |
139 g | gt | gtk ) val=gtk ;; | 139 g | gt | gtk ) val=gtk ;; |
140 gtk3 ) val=gtk3 ;; | |
140 * ) | 141 * ) |
141 AC_MSG_ERROR([`--with-x-toolkit=$withval' is invalid; | 142 AC_MSG_ERROR([`--with-x-toolkit=$withval' is invalid; |
142 this option's value should be `yes', `no', `lucid', `athena', `motif' or `gtk'. | 143 this option's value should be `yes', `no', `lucid', `athena', `motif', `gtk' or |
143 `yes' and `gtk' are synonyms. `athena' and `lucid' are synonyms.]) | 144 `gtk3'. `yes' and `gtk' are synonyms. `athena' and `lucid' are synonyms.]) |
144 ;; | 145 ;; |
145 esac | 146 esac |
146 with_x_toolkit=$val | 147 with_x_toolkit=$val |
147 ]) | 148 ]) |
148 | 149 |
303 if test x$ac_gc_check_cons_list != x ; then | 304 if test x$ac_gc_check_cons_list != x ; then |
304 AC_DEFINE(GC_CHECK_CONS_LIST, 1, | 305 AC_DEFINE(GC_CHECK_CONS_LIST, 1, |
305 [Define this to check for errors in cons list.]) | 306 [Define this to check for errors in cons list.]) |
306 fi | 307 fi |
307 | 308 |
309 AC_ARG_ENABLE(use-lisp-union-type, | |
310 [AS_HELP_STRING([--enable-use-lisp-union-type], | |
311 [use a union for the Lisp_Object data type. | |
312 This is only useful for development for catching certain types of bugs.])], | |
313 if test "${enableval}" != "no"; then | |
314 AC_DEFINE(USE_LISP_UNION_TYPE, 1, | |
315 [Define this to use a lisp union for the Lisp_Object data type.]) | |
316 fi) | |
317 | |
318 | |
308 AC_ARG_ENABLE(profiling, | 319 AC_ARG_ENABLE(profiling, |
309 [AS_HELP_STRING([--enable-profiling], | 320 [AS_HELP_STRING([--enable-profiling], |
310 [build emacs with profiling support. | 321 [build emacs with profiling support. |
311 This might not work on all platforms])], | 322 This might not work on all platforms])], |
312 [ac_enable_profiling="${enableval}"],[]) | 323 [ac_enable_profiling="${enableval}"],[]) |
315 PROFILING_LDFLAGS="-pg" | 326 PROFILING_LDFLAGS="-pg" |
316 else | 327 else |
317 PROFILING_CFLAGS= | 328 PROFILING_CFLAGS= |
318 PROFILING_LDFLAGS= | 329 PROFILING_LDFLAGS= |
319 fi | 330 fi |
331 AC_SUBST(PROFILING_CFLAGS) | |
332 AC_SUBST(PROFILING_LDFLAGS) | |
320 | 333 |
321 AC_ARG_ENABLE(autodepend, | 334 AC_ARG_ENABLE(autodepend, |
322 [AS_HELP_STRING([--enable-autodepend], | 335 [AS_HELP_STRING([--enable-autodepend], |
323 [automatically generate dependencies to .h-files. | 336 [automatically generate dependencies to .h-files. |
324 Requires GNU Make and Gcc. Enabled if GNU Make and Gcc is | 337 Requires GNU Make and Gcc. Enabled if GNU Make and Gcc is |
708 test x$cc_specified != xyes | 721 test x$cc_specified != xyes |
709 then | 722 then |
710 CC="$NON_GNU_CC" | 723 CC="$NON_GNU_CC" |
711 fi | 724 fi |
712 | 725 |
713 if test x$GCC = xyes && test "x$GCC_TEST_OPTIONS" != x | 726 if test x$GCC = xyes; then |
714 then | 727 test "x$GCC_TEST_OPTIONS" != x && CC="$CC $GCC_TEST_OPTIONS" |
715 CC="$CC $GCC_TEST_OPTIONS" | 728 else |
716 fi | 729 test "x$NON_GCC_TEST_OPTIONS" != x && CC="$CC $NON_GCC_TEST_OPTIONS" |
717 | |
718 if test x$GCC = x && test "x$NON_GCC_TEST_OPTIONS" != x | |
719 then | |
720 CC="$CC $NON_GCC_TEST_OPTIONS" | |
721 fi | 730 fi |
722 | 731 |
723 dnl checks for Unix variants | 732 dnl checks for Unix variants |
724 AC_USE_SYSTEM_EXTENSIONS | 733 AC_USE_SYSTEM_EXTENSIONS |
725 | 734 |
746 fi | 755 fi |
747 AC_MSG_RESULT($has_option) | 756 AC_MSG_RESULT($has_option) |
748 CFLAGS="$SAVE_CFLAGS" | 757 CFLAGS="$SAVE_CFLAGS" |
749 unset has_option | 758 unset has_option |
750 unset SAVE_CFLAGS | 759 unset SAVE_CFLAGS |
760 | |
761 ### Use -Wold-style-definition if the compiler supports it | |
762 # This can be removed when conversion to standard C is finished. | |
763 AC_MSG_CHECKING([whether gcc understands -Wold-style-definition]) | |
764 SAVE_CFLAGS="$CFLAGS" | |
765 CFLAGS="$CFLAGS -Wold-style-definition" | |
766 AC_TRY_COMPILE([], [], has_option=yes, has_option=no,) | |
767 if test $has_option = yes; then | |
768 C_WARNINGS_SWITCH="-Wold-style-definition $C_WARNINGS_SWITCH" | |
769 fi | |
770 AC_MSG_RESULT($has_option) | |
771 CFLAGS="$SAVE_CFLAGS" | |
772 unset has_option | |
773 unset SAVE_CFLAGS | |
774 | |
775 ### Use -Wimplicit-function-declaration if the compiler supports it | |
776 AC_MSG_CHECKING([whether gcc understands -Wimplicit-function-declaration]) | |
777 SAVE_CFLAGS="$CFLAGS" | |
778 CFLAGS="$CFLAGS -Wimplicit-function-declaration" | |
779 AC_TRY_COMPILE([], [], has_option=yes, has_option=no,) | |
780 if test $has_option = yes; then | |
781 C_WARNINGS_SWITCH="-Wimplicit-function-declaration $C_WARNINGS_SWITCH" | |
782 fi | |
783 AC_MSG_RESULT($has_option) | |
784 CFLAGS="$SAVE_CFLAGS" | |
785 unset has_option | |
786 unset SAVE_CFLAGS | |
787 | |
788 AC_SUBST(C_WARNINGS_SWITCH) | |
789 | |
751 | 790 |
752 #### Some other nice autoconf tests. | 791 #### Some other nice autoconf tests. |
753 | 792 |
754 dnl checks for programs | 793 dnl checks for programs |
755 AC_PROG_CPP | 794 AC_PROG_CPP |
836 AC_LINK_IFELSE([main(){return 0;}], | 875 AC_LINK_IFELSE([main(){return 0;}], |
837 [AC_MSG_RESULT(yes)], | 876 [AC_MSG_RESULT(yes)], |
838 LDFLAGS=$late_LDFLAGS | 877 LDFLAGS=$late_LDFLAGS |
839 [AC_MSG_RESULT(no)]) | 878 [AC_MSG_RESULT(no)]) |
840 | 879 |
841 #### Extract some information from the operating system and machine files. | |
842 | |
843 AC_CHECKING([the machine- and system-dependent files to find out | |
844 - which libraries the lib-src programs will want, and | |
845 - whether the GNU malloc routines are usable]) | |
846 | |
847 ### First figure out CFLAGS (which we use for running the compiler here) | |
848 ### and REAL_CFLAGS (which we use for real compilation). | |
849 ### The two are the same except on a few systems, where they are made | |
850 ### different to work around various lossages. For example, | |
851 ### GCC 2.5 on GNU/Linux needs them to be different because it treats -g | |
852 ### as implying static linking. | |
853 | |
854 ### If the CFLAGS env var is specified, we use that value | |
855 ### instead of the default. | |
856 | |
857 ### It's not important that this name contain the PID; you can't run | |
858 ### two configures in the same directory and have anything work | |
859 ### anyway. | |
860 tempcname="conftest.c" | |
861 | |
862 echo ' | |
863 #include "'${srcdir}'/src/'${opsysfile}'" | |
864 #include "'${srcdir}'/src/'${machfile}'" | |
865 | |
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 | |
899 | |
900 /* Get the CFLAGS for tests in configure. */ | |
901 #ifdef __GNUC__ | |
902 configure___ CFLAGS=-g C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}' | |
903 #else | |
904 configure___ CFLAGS='${SPECIFIED_CFLAGS}' | |
905 #endif | |
906 | |
907 #else /* not THIS_IS_CONFIGURE */ | |
908 | |
909 /* Get the CFLAGS for real compilation. */ | |
910 #ifdef __GNUC__ | |
911 configure___ REAL_CFLAGS=-g C_OPTIMIZE_SWITCH C_WARNINGS_SWITCH ${PROFILING_CFLAGS} '${SPECIFIED_CFLAGS}' | |
912 #else | |
913 configure___ REAL_CFLAGS='${SPECIFIED_CFLAGS}' | |
914 #endif | |
915 | |
916 #endif /* not THIS_IS_CONFIGURE */ | |
917 ' > ${tempcname} | |
918 | |
919 LDFLAGS="${LDFLAGS} ${PROFILING_LDFLAGS}" | |
920 | 880 |
921 # The value of CPP is a quoted variable reference, so we need to do this | 881 # The value of CPP is a quoted variable reference, so we need to do this |
922 # to get its actual value... | 882 # to get its actual value... |
923 CPP=`eval "echo $CPP"` | 883 CPP=`eval "echo $CPP"` |
924 [eval `${CPP} -Isrc ${tempcname} \ | 884 |
925 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'` | 885 |
926 if test "x$SPECIFIED_CFLAGS" = x; then | 886 dnl Not used by any currently supported platform. |
927 eval `${CPP} -Isrc -DTHIS_IS_CONFIGURE ${tempcname} \ | 887 dnl The function dump-emacs will not be defined and temacs will do |
928 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'` | 888 dnl (load "loadup") automatically unless told otherwise. |
929 else | 889 CANNOT_DUMP=no |
930 REAL_CFLAGS="$CFLAGS" | 890 case "$opsys" in |
931 fi] | 891 your-opsys-here) |
932 rm ${tempcname} | 892 CANNOT_DUMP=yes |
933 | 893 AC_DEFINE(CANNOT_DUMP, 1, [Define if Emacs cannot be dumped on your system.]) |
934 | 894 ;; |
935 AC_SUBST(cannot_dump) | 895 esac |
896 AC_SUBST(CANNOT_DUMP) | |
897 | |
936 | 898 |
937 UNEXEC_OBJ=unexelf.o | 899 UNEXEC_OBJ=unexelf.o |
938 case "$opsys" in | 900 case "$opsys" in |
901 # MSDOS uses unexcoff.o | |
902 # MSWindows uses unexw32.o | |
939 aix4-2) | 903 aix4-2) |
940 UNEXEC_OBJ=unexaix.o | 904 UNEXEC_OBJ=unexaix.o |
941 ;; | 905 ;; |
942 cygwin) | 906 cygwin) |
943 UNEXEC_OBJ=unexcw.o | 907 UNEXEC_OBJ=unexcw.o |
1115 START_FILES= | 1079 START_FILES= |
1116 | 1080 |
1117 case $opsys in | 1081 case $opsys in |
1118 cygwin ) | 1082 cygwin ) |
1119 LIB_MATH= | 1083 LIB_MATH= |
1120 START_FILES='ecrt0.o' | 1084 START_FILES='pre-crt0.o' |
1121 ;; | 1085 ;; |
1122 darwin ) | 1086 darwin ) |
1123 ## Adding -lm confuses the dynamic linker, so omit it. | 1087 ## Adding -lm confuses the dynamic linker, so omit it. |
1124 LIB_MATH= | 1088 LIB_MATH= |
1125 START_FILES='pre-crt0.o' | 1089 START_FILES='pre-crt0.o' |
1204 ]) | 1168 ]) |
1205 | 1169 |
1206 | 1170 |
1207 if test "${with_sound}" != "no"; then | 1171 if test "${with_sound}" != "no"; then |
1208 # Sound support for GNU/Linux and the free BSDs. | 1172 # Sound support for GNU/Linux and the free BSDs. |
1209 AC_CHECK_HEADERS(machine/soundcard.h sys/soundcard.h soundcard.h) | 1173 AC_CHECK_HEADERS(machine/soundcard.h sys/soundcard.h soundcard.h, |
1174 have_sound_header=yes) | |
1210 # Emulation library used on NetBSD. | 1175 # Emulation library used on NetBSD. |
1211 AC_CHECK_LIB(ossaudio, _oss_ioctl, LIBSOUND=-lossaudio, LIBSOUND=) | 1176 AC_CHECK_LIB(ossaudio, _oss_ioctl, LIBSOUND=-lossaudio, LIBSOUND=) |
1212 AC_SUBST(LIBSOUND) | 1177 AC_SUBST(LIBSOUND) |
1213 | 1178 |
1214 ALSA_REQUIRED=1.0.0 | 1179 ALSA_REQUIRED=1.0.0 |
1237 LDFLAGS="$SAVE_LDFLAGS" | 1202 LDFLAGS="$SAVE_LDFLAGS" |
1238 LIBSOUND="$LIBSOUND $ALSA_LIBS" | 1203 LIBSOUND="$LIBSOUND $ALSA_LIBS" |
1239 CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS" | 1204 CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS" |
1240 AC_DEFINE(HAVE_ALSA, 1, [Define to 1 if ALSA is available.]) | 1205 AC_DEFINE(HAVE_ALSA, 1, [Define to 1 if ALSA is available.]) |
1241 fi | 1206 fi |
1207 | |
1208 dnl Define HAVE_SOUND if we have sound support. We know it works and | |
1209 dnl compiles only on the specified platforms. For others, it | |
1210 dnl probably doesn't make sense to try. | |
1211 if test x$have_sound_header = xyes || test $HAVE_ALSA = yes; then | |
1212 case "$opsys" in | |
1213 dnl defined __FreeBSD__ || defined __NetBSD__ || defined __linux__ | |
1214 gnu-linux|freebsd|netbsd) | |
1215 AC_DEFINE(HAVE_SOUND, 1, [Define to 1 if you have sound support.]) | |
1216 ;; | |
1217 esac | |
1218 fi | |
1219 | |
1242 AC_SUBST(CFLAGS_SOUND) | 1220 AC_SUBST(CFLAGS_SOUND) |
1243 fi | 1221 fi |
1244 | 1222 |
1245 dnl checks for header files | 1223 dnl checks for header files |
1246 AC_CHECK_HEADERS(sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \ | 1224 AC_CHECK_HEADERS(sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \ |
1247 linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \ | 1225 linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \ |
1248 stdio_ext.h fcntl.h strings.h coff.h pty.h sys/mman.h \ | 1226 stdio_ext.h fcntl.h strings.h coff.h pty.h sys/mman.h \ |
1249 sys/param.h sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h \ | 1227 sys/param.h sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h \ |
1250 sys/utsname.h pwd.h utmp.h) | 1228 sys/utsname.h pwd.h utmp.h dirent.h util.h) |
1251 | 1229 |
1252 AC_MSG_CHECKING(if personality LINUX32 can be set) | 1230 AC_MSG_CHECKING(if personality LINUX32 can be set) |
1253 AC_TRY_COMPILE([#include <sys/personality.h>], [personality (PER_LINUX32)], | 1231 AC_TRY_COMPILE([#include <sys/personality.h>], [personality (PER_LINUX32)], |
1254 emacs_cv_personality_linux32=yes, | 1232 emacs_cv_personality_linux32=yes, |
1255 emacs_cv_personality_linux32=no) | 1233 emacs_cv_personality_linux32=no) |
1380 fi | 1358 fi |
1381 AH_TEMPLATE(POINTER_TYPE, | 1359 AH_TEMPLATE(POINTER_TYPE, |
1382 [Define as `void' if your compiler accepts `void *'; otherwise | 1360 [Define as `void' if your compiler accepts `void *'; otherwise |
1383 define as `char'.])dnl | 1361 define as `char'.])dnl |
1384 | 1362 |
1385 | 1363 dnl Check for endianess |
1386 | 1364 AC_C_BIGENDIAN |
1387 dnl This could be used for targets which can have both byte sexes. | |
1388 dnl We could presumably replace the hardwired WORDS_BIG_ENDIAN generally. | |
1389 dnl AC_C_BIGENDIAN | |
1390 | 1365 |
1391 dnl check for Make feature | 1366 dnl check for Make feature |
1392 AC_PROG_MAKE_SET | 1367 AC_PROG_MAKE_SET |
1393 | 1368 |
1394 DEPFLAGS= | 1369 DEPFLAGS= |
1510 NS_IMPL_GNUSTEP=no | 1485 NS_IMPL_GNUSTEP=no |
1511 tmp_CPPFLAGS="$CPPFLAGS" | 1486 tmp_CPPFLAGS="$CPPFLAGS" |
1512 tmp_CFLAGS="$CFLAGS" | 1487 tmp_CFLAGS="$CFLAGS" |
1513 CPPFLAGS="$CPPFLAGS -x objective-c" | 1488 CPPFLAGS="$CPPFLAGS -x objective-c" |
1514 CFLAGS="$CFLAGS -x objective-c" | 1489 CFLAGS="$CFLAGS -x objective-c" |
1515 TEMACS_LDFLAGS2="\${LDFLAGS}" | 1490 TEMACS_LDFLAGS2="\${LDFLAGS} \${PROFILING_LDFLAGS}" |
1516 dnl I don't think it's especially important, but src/Makefile.in | 1491 dnl I don't think it's especially important, but src/Makefile.in |
1517 dnl (now the only user of ns_appdir) used to go to the trouble of adding a | 1492 dnl (now the only user of ns_appdir) used to go to the trouble of adding a |
1518 dnl trailing "/" to it, so now we do it here. | 1493 dnl trailing "/" to it, so now we do it here. |
1519 if test "${with_ns}" != no; then | 1494 if test "${with_ns}" != no; then |
1520 if test "${opsys}" = darwin; then | 1495 if test "${opsys}" = darwin; then |
1539 GNUSTEP_LOCAL_HEADERS="-I${GNUSTEP_LOCAL_HEADERS}" | 1514 GNUSTEP_LOCAL_HEADERS="-I${GNUSTEP_LOCAL_HEADERS}" |
1540 test "x${GNUSTEP_LOCAL_LIBRARIES}" != "x" && \ | 1515 test "x${GNUSTEP_LOCAL_LIBRARIES}" != "x" && \ |
1541 GNUSTEP_LOCAL_LIBRARIES="-L${GNUSTEP_LOCAL_LIBRARIES}" | 1516 GNUSTEP_LOCAL_LIBRARIES="-L${GNUSTEP_LOCAL_LIBRARIES}" |
1542 CPPFLAGS="$CPPFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}" | 1517 CPPFLAGS="$CPPFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}" |
1543 CFLAGS="$CFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}" | 1518 CFLAGS="$CFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}" |
1544 REAL_CFLAGS="$REAL_CFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}" | |
1545 LDFLAGS="$LDFLAGS -L${GNUSTEP_SYSTEM_LIBRARIES} ${GNUSTEP_LOCAL_LIBRARIES}" | 1519 LDFLAGS="$LDFLAGS -L${GNUSTEP_SYSTEM_LIBRARIES} ${GNUSTEP_LOCAL_LIBRARIES}" |
1546 LIB_STANDARD= | 1520 LIB_STANDARD= |
1547 START_FILES= | 1521 START_FILES= |
1548 TEMACS_LDFLAGS2= | 1522 TEMACS_LDFLAGS2= |
1549 fi | 1523 fi |
1593 motif ) USE_X_TOOLKIT=MOTIF ;; | 1567 motif ) USE_X_TOOLKIT=MOTIF ;; |
1594 gtk ) with_gtk=yes | 1568 gtk ) with_gtk=yes |
1595 dnl Dont set this for GTK. A lot of tests below assumes Xt when | 1569 dnl Dont set this for GTK. A lot of tests below assumes Xt when |
1596 dnl USE_X_TOOLKIT is set. | 1570 dnl USE_X_TOOLKIT is set. |
1597 USE_X_TOOLKIT=none ;; | 1571 USE_X_TOOLKIT=none ;; |
1572 gtk3 ) with_gtk3=yes | |
1573 USE_X_TOOLKIT=none ;; | |
1598 no ) USE_X_TOOLKIT=none ;; | 1574 no ) USE_X_TOOLKIT=none ;; |
1599 dnl If user did not say whether to use a toolkit, make this decision later: | 1575 dnl If user did not say whether to use a toolkit, make this decision later: |
1600 dnl use the toolkit if we have gtk, or X11R5 or newer. | 1576 dnl use the toolkit if we have gtk, or X11R5 or newer. |
1601 * ) USE_X_TOOLKIT=maybe ;; | 1577 * ) USE_X_TOOLKIT=maybe ;; |
1602 esac | 1578 esac |
1643 emacs_cv_var___after_morecore_hook=no)]) | 1619 emacs_cv_var___after_morecore_hook=no)]) |
1644 if test $emacs_cv_var___after_morecore_hook = no; then | 1620 if test $emacs_cv_var___after_morecore_hook = no; then |
1645 doug_lea_malloc=no | 1621 doug_lea_malloc=no |
1646 fi | 1622 fi |
1647 | 1623 |
1624 | |
1625 dnl See comments in aix4-2.h about maybe using system malloc there. | |
1626 system_malloc=no | |
1627 case "$opsys" in | |
1628 ## darwin ld insists on the use of malloc routines in the System framework. | |
1629 darwin|sol2-10) system_malloc=yes ;; | |
1630 esac | |
1631 | |
1648 if test "${system_malloc}" = "yes"; then | 1632 if test "${system_malloc}" = "yes"; then |
1633 AC_DEFINE(SYSTEM_MALLOC, 1, [Define to use system malloc.]) | |
1649 GNU_MALLOC=no | 1634 GNU_MALLOC=no |
1650 GNU_MALLOC_reason=" | 1635 GNU_MALLOC_reason=" |
1651 (The GNU allocators don't work with this system configuration.)" | 1636 (The GNU allocators don't work with this system configuration.)" |
1652 GMALLOC_OBJ= | 1637 GMALLOC_OBJ= |
1653 VMLIMIT_OBJ= | 1638 VMLIMIT_OBJ= |
1677 | 1662 |
1678 if test x"${REL_ALLOC}" = x; then | 1663 if test x"${REL_ALLOC}" = x; then |
1679 REL_ALLOC=${GNU_MALLOC} | 1664 REL_ALLOC=${GNU_MALLOC} |
1680 fi | 1665 fi |
1681 | 1666 |
1682 dnl For now, need to use an explicit `#define USE_MMAP_FOR_BUFFERS 1' | 1667 use_mmap_for_buffers=no |
1683 dnl the system configuration file (s/*.h) to turn the use of mmap | 1668 case "$opsys" in |
1684 dnl in the relocating allocator on. | 1669 freebsd|irix6-5) use_mmap_for_buffers=yes ;; |
1670 esac | |
1685 | 1671 |
1686 AC_FUNC_MMAP | 1672 AC_FUNC_MMAP |
1687 if test $use_mmap_for_buffers = yes; then | 1673 if test $use_mmap_for_buffers = yes; then |
1674 AC_DEFINE(USE_MMAP_FOR_BUFFERS, 1, [Define to use mmap to allocate buffer text.]) | |
1688 REL_ALLOC=no | 1675 REL_ALLOC=no |
1689 fi | 1676 fi |
1690 | 1677 |
1691 LIBS="$LIBS_SYSTEM $LIBS" | 1678 LIBS="$LIBS_SYSTEM $LIBS" |
1692 | 1679 |
1732 | 1719 |
1733 # Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets | 1720 # Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets |
1734 # used for the tests that follow. We set them back to REAL_CFLAGS and | 1721 # used for the tests that follow. We set them back to REAL_CFLAGS and |
1735 # REAL_CPPFLAGS later on. | 1722 # REAL_CPPFLAGS later on. |
1736 | 1723 |
1724 REAL_CFLAGS="$CFLAGS" | |
1737 REAL_CPPFLAGS="$CPPFLAGS" | 1725 REAL_CPPFLAGS="$CPPFLAGS" |
1738 | 1726 |
1739 if test "${HAVE_X11}" = "yes"; then | 1727 if test "${HAVE_X11}" = "yes"; then |
1740 DEFS="$C_SWITCH_X_SITE $DEFS" | 1728 DEFS="$C_SWITCH_X_SITE $DEFS" |
1741 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE" | 1729 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE" |
1742 LIBS="$LIBX $LIBS" | 1730 LIBS="-lX11 $LIBS" |
1743 CFLAGS="$C_SWITCH_X_SITE $CFLAGS" | 1731 CFLAGS="$C_SWITCH_X_SITE $CFLAGS" |
1744 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS" | 1732 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS" |
1745 | 1733 |
1746 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests. | 1734 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests. |
1747 # This is handled by LD_SWITCH_X_SITE_AUX during the real build, | 1735 # This is handled by LD_SWITCH_X_SITE_AUX during the real build, |
1813 ], emacs_cv_x11_version_6=yes, emacs_cv_x11_version_6=no)]) | 1801 ], emacs_cv_x11_version_6=yes, emacs_cv_x11_version_6=no)]) |
1814 if test $emacs_cv_x11_version_6 = yes; then | 1802 if test $emacs_cv_x11_version_6 = yes; then |
1815 AC_MSG_RESULT(6 or newer) | 1803 AC_MSG_RESULT(6 or newer) |
1816 AC_DEFINE(HAVE_X11R6, 1, | 1804 AC_DEFINE(HAVE_X11R6, 1, |
1817 [Define to 1 if you have the X11R6 or newer version of Xlib.]) | 1805 [Define to 1 if you have the X11R6 or newer version of Xlib.]) |
1806 AC_DEFINE(HAVE_X_I18N, 1, [Define if you have usable i18n support.]) | |
1807 ## inoue@ainet.or.jp says Solaris has a bug related to X11R6-style | |
1808 ## XIM support. | |
1809 case "$opsys" in | |
1810 sol2-*) : ;; | |
1811 *) AC_DEFINE(HAVE_X11R6_XIM, 1, | |
1812 [Define if you have usable X11R6-style XIM support.]) | |
1813 ;; | |
1814 esac | |
1818 else | 1815 else |
1819 AC_MSG_RESULT(before 6) | 1816 AC_MSG_RESULT(before 6) |
1820 fi | 1817 fi |
1821 fi | 1818 fi |
1822 | 1819 |
1860 | 1857 |
1861 fi | 1858 fi |
1862 | 1859 |
1863 | 1860 |
1864 HAVE_GTK=no | 1861 HAVE_GTK=no |
1862 if test "${with_gtk3}" = "yes"; then | |
1863 GLIB_REQUIRED=2.6 | |
1864 GTK_REQUIRED=2.90 | |
1865 GTK_MODULES="gtk+-3.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED" | |
1866 | |
1867 dnl Checks for libraries. | |
1868 PKG_CHECK_MODULES(GTK, $GTK_MODULES, pkg_check_gtk=yes, pkg_check_gtk=no) | |
1869 if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then | |
1870 AC_MSG_ERROR($GTK_PKG_ERRORS) | |
1871 fi | |
1872 fi | |
1873 | |
1874 if test "$pkg_check_gtk" != "yes"; then | |
1875 HAVE_GTK=no | |
1865 if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "maybe"; then | 1876 if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "maybe"; then |
1866 GLIB_REQUIRED=2.6 | 1877 GLIB_REQUIRED=2.6 |
1867 GTK_REQUIRED=2.6 | 1878 GTK_REQUIRED=2.6 |
1868 GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED" | 1879 GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED" |
1869 | 1880 |
1871 PKG_CHECK_MODULES(GTK, $GTK_MODULES, pkg_check_gtk=yes, pkg_check_gtk=no) | 1882 PKG_CHECK_MODULES(GTK, $GTK_MODULES, pkg_check_gtk=yes, pkg_check_gtk=no) |
1872 if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then | 1883 if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then |
1873 AC_MSG_ERROR($GTK_PKG_ERRORS) | 1884 AC_MSG_ERROR($GTK_PKG_ERRORS) |
1874 fi | 1885 fi |
1875 fi | 1886 fi |
1876 | 1887 fi |
1877 | 1888 |
1878 GTK_OBJ= | 1889 GTK_OBJ= |
1879 if test x"$pkg_check_gtk" = xyes; then | 1890 if test x"$pkg_check_gtk" = xyes; then |
1880 | 1891 |
1881 AC_SUBST(GTK_CFLAGS) | 1892 AC_SUBST(GTK_CFLAGS) |
1916 dnl a lot if #ifdef:s, say we have toolkit scrollbars. | 1927 dnl a lot if #ifdef:s, say we have toolkit scrollbars. |
1917 if test "$with_toolkit_scroll_bars" != no; then | 1928 if test "$with_toolkit_scroll_bars" != no; then |
1918 with_toolkit_scroll_bars=yes | 1929 with_toolkit_scroll_bars=yes |
1919 fi | 1930 fi |
1920 | 1931 |
1921 dnl Check if we can use multiple displays with this GTK version. | |
1922 dnl If gdk_display_open exists, assume all others are there also. | |
1923 HAVE_GTK_MULTIDISPLAY=no | |
1924 AC_CHECK_FUNCS(gdk_display_open, HAVE_GTK_MULTIDISPLAY=yes) | |
1925 if test "${HAVE_GTK_MULTIDISPLAY}" = "yes"; then | |
1926 AC_DEFINE(HAVE_GTK_MULTIDISPLAY, 1, | |
1927 [Define to 1 if GTK can handle more than one display.]) | |
1928 fi | |
1929 | |
1930 dnl Check if we have the old file selection dialog declared and | 1932 dnl Check if we have the old file selection dialog declared and |
1931 dnl in the link library. In 2.x it may be in the library, | 1933 dnl in the link library. In 2.x it may be in the library, |
1932 dnl but not declared if deprecated featured has been selected out. | 1934 dnl but not declared if deprecated featured has been selected out. |
1933 dnl AC_CHECK_DECL checks for a macro, so check for GTK_TYPE_FILE_SELECTION. | 1935 dnl AC_CHECK_DECL checks for a macro, so check for GTK_TYPE_FILE_SELECTION. |
1934 HAVE_GTK_FILE_SELECTION=no | 1936 HAVE_GTK_FILE_SELECTION=no |
1935 AC_CHECK_DECL(GTK_TYPE_FILE_SELECTION, HAVE_GTK_FILE_SELECTION=yes, | 1937 AC_CHECK_DECL(GTK_TYPE_FILE_SELECTION, HAVE_GTK_FILE_SELECTION=yes, |
1936 HAVE_GTK_FILE_SELECTION=no, [AC_INCLUDES_DEFAULT | 1938 HAVE_GTK_FILE_SELECTION=no, [AC_INCLUDES_DEFAULT |
1937 #include <gtk/gtk.h>]) | 1939 #include <gtk/gtk.h>]) |
1938 if test "$HAVE_GTK_FILE_SELECTION" = yes; then | 1940 if test "$HAVE_GTK_FILE_SELECTION" = yes; then |
1939 AC_CHECK_FUNCS(gtk_file_selection_new, HAVE_GTK_FILE_SELECTION=yes, | 1941 AC_CHECK_FUNCS(gtk_file_selection_new) |
1940 HAVE_GTK_FILE_SELECTION=no) | |
1941 fi | |
1942 | |
1943 dnl Check if we have the new file chooser dialog | |
1944 HAVE_GTK_FILE_CHOOSER=no | |
1945 AC_CHECK_DECL(GTK_TYPE_FILE_CHOOSER, HAVE_GTK_FILE_CHOOSER=yes, | |
1946 HAVE_GTK_FILE_CHOOSER=no, [AC_INCLUDES_DEFAULT | |
1947 #include <gtk/gtk.h>]) | |
1948 if test "$HAVE_GTK_FILE_CHOOSER" = yes; then | |
1949 AC_CHECK_FUNCS(gtk_file_chooser_dialog_new, HAVE_GTK_FILE_CHOOSER=yes, | |
1950 HAVE_GTK_FILE_CHOOSER=no) | |
1951 fi | |
1952 | |
1953 if test "$HAVE_GTK_FILE_SELECTION" = yes \ | |
1954 && test "$HAVE_GTK_FILE_CHOOSER" = yes; then | |
1955 AC_DEFINE(HAVE_GTK_FILE_BOTH, 1, | |
1956 [Define to 1 if GTK has both file selection and chooser dialog.]) | |
1957 fi | 1942 fi |
1958 | 1943 |
1959 dnl Check if pthreads are available. Emacs only needs this when using | 1944 dnl Check if pthreads are available. Emacs only needs this when using |
1960 dnl gtk_file_chooser under Gnome. | 1945 dnl gtk_file_chooser under Gnome. |
1961 if test "$HAVE_GTK_FILE_CHOOSER" = yes; then | |
1962 HAVE_GTK_AND_PTHREAD=no | 1946 HAVE_GTK_AND_PTHREAD=no |
1963 AC_CHECK_HEADERS(pthread.h) | 1947 AC_CHECK_HEADERS(pthread.h) |
1964 if test "$ac_cv_header_pthread_h"; then | 1948 if test "$ac_cv_header_pthread_h"; then |
1965 AC_CHECK_LIB(pthread, pthread_self, HAVE_GTK_AND_PTHREAD=yes) | 1949 AC_CHECK_LIB(pthread, pthread_self, HAVE_GTK_AND_PTHREAD=yes) |
1966 fi | 1950 fi |
1970 *) GTK_LIBS="$GTK_LIBS -lpthread" ;; | 1954 *) GTK_LIBS="$GTK_LIBS -lpthread" ;; |
1971 esac | 1955 esac |
1972 AC_DEFINE(HAVE_GTK_AND_PTHREAD, 1, | 1956 AC_DEFINE(HAVE_GTK_AND_PTHREAD, 1, |
1973 [Define to 1 if you have GTK and pthread (-lpthread).]) | 1957 [Define to 1 if you have GTK and pthread (-lpthread).]) |
1974 fi | 1958 fi |
1975 fi | 1959 |
1960 dnl Check for functions introduced in 2.14 and later. | |
1961 AC_CHECK_FUNCS(gtk_widget_get_window gtk_widget_set_has_window \ | |
1962 gtk_dialog_get_action_area gtk_widget_get_sensitive \ | |
1963 gtk_widget_get_mapped gtk_adjustment_get_page_size \ | |
1964 gtk_orientable_set_orientation) | |
1965 | |
1976 fi | 1966 fi |
1977 | 1967 |
1978 dnl D-Bus has been tested under GNU/Linux only. Must be adapted for | 1968 dnl D-Bus has been tested under GNU/Linux only. Must be adapted for |
1979 dnl other platforms. Support for higher D-Bus versions than 1.0 is | 1969 dnl other platforms. Support for higher D-Bus versions than 1.0 is |
1980 dnl also not configured. | 1970 dnl also not configured. |
2649 AC_SUBST(BLESSMAIL_TARGET) | 2639 AC_SUBST(BLESSMAIL_TARGET) |
2650 | 2640 |
2651 | 2641 |
2652 AC_CHECK_FUNCS(gethostname getdomainname dup2 \ | 2642 AC_CHECK_FUNCS(gethostname getdomainname dup2 \ |
2653 rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \ | 2643 rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \ |
2654 random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime setsid \ | 2644 random lrand48 logb frexp fmod rint cbrt ftime setsid \ |
2655 strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \ | 2645 strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \ |
2656 utimes getrlimit setrlimit setpgid getcwd getwd shutdown getaddrinfo \ | 2646 utimes getrlimit setrlimit setpgid getcwd getwd shutdown getaddrinfo \ |
2657 __fpending mblen mbrlen mbsinit strsignal setitimer ualarm index rindex \ | 2647 __fpending mblen mbrlen mbsinit strsignal setitimer ualarm strchr strrchr \ |
2658 sendto recvfrom getsockopt setsockopt getsockname getpeername \ | 2648 sendto recvfrom getsockopt setsockopt getsockname getpeername \ |
2659 gai_strerror mkstemp getline getdelim mremap memmove fsync sync bzero \ | 2649 gai_strerror mkstemp getline getdelim mremap memmove fsync sync \ |
2660 memset memcmp difftime memcpy mempcpy mblen mbrlen posix_memalign \ | 2650 memset memcmp difftime memcpy mempcpy mblen mbrlen posix_memalign \ |
2661 cfmakeraw cfsetspeed isnan copysign) | 2651 cfmakeraw cfsetspeed isnan copysign __executable_start) |
2662 | 2652 |
2663 AC_CHECK_HEADERS(sys/un.h) | 2653 AC_CHECK_HEADERS(sys/un.h) |
2664 | 2654 |
2665 AC_FUNC_MKTIME | 2655 AC_FUNC_MKTIME |
2666 if test "$ac_cv_func_working_mktime" = no; then | 2656 if test "$ac_cv_func_working_mktime" = no; then |
3371 | 3361 |
3372 LINKER= | 3362 LINKER= |
3373 ORDINARY_LINK= | 3363 ORDINARY_LINK= |
3374 case "$opsys" in | 3364 case "$opsys" in |
3375 ## gnu: GNU needs its own crt0. | 3365 ## gnu: GNU needs its own crt0. |
3376 aix4-2|darwin|gnu|usg5-4|irix6-5|sol2*|unixware) ORDINARY_LINK=yes ;; | 3366 aix4-2|cygwin|darwin|gnu|hpux*|irix6-5|sol2*|unixware) ORDINARY_LINK=yes ;; |
3377 | |
3378 cygwin) LINKER="\$(CC)" ;; | |
3379 | 3367 |
3380 ## On post 1.3 releases of NetBSD, gcc -nostdlib also clears the | 3368 ## On post 1.3 releases of NetBSD, gcc -nostdlib also clears the |
3381 ## library search parth, i.e. it won't search /usr/lib for libc and | 3369 ## library search parth, i.e. it won't search /usr/lib for libc and |
3382 ## friends. Using -nostartfiles instead avoids this problem, and | 3370 ## friends. Using -nostartfiles instead avoids this problem, and |
3383 ## will also work on earlier NetBSD releases. | 3371 ## will also work on earlier NetBSD releases. |
3392 esac | 3380 esac |
3393 ;; | 3381 ;; |
3394 esac | 3382 esac |
3395 | 3383 |
3396 | 3384 |
3397 PRE_EDIT_LDFLAGS= | |
3398 POST_EDIT_LDFLAGS= | |
3399 if test "x$ORDINARY_LINK" = "xyes"; then | 3385 if test "x$ORDINARY_LINK" = "xyes"; then |
3400 | 3386 |
3401 LINKER="\$(CC)" | 3387 LINKER="\$(CC)" |
3402 AC_DEFINE(ORDINARY_LINK, 1, [Define if the C compiler is the linker.]) | 3388 AC_DEFINE(ORDINARY_LINK, 1, [Define if the C compiler is the linker.]) |
3403 | 3389 |
3404 ## The system files defining neither ORDINARY_LINK nor LINKER are: | 3390 ## The system files defining neither ORDINARY_LINK nor LINKER are: |
3405 ## (bsd-common), freebsd, gnu-* not on macppc|ibms390x, hpux*. | 3391 ## freebsd, gnu-* not on macppc|ibms390x. |
3406 elif test "x$GCC" = "xyes" && test "x$LINKER" = "x"; then | 3392 elif test "x$GCC" = "xyes" && test "x$LINKER" = "x"; then |
3407 | 3393 |
3408 ## Versions of GCC >= 2.0 put their library, libgcc.a, in obscure | 3394 ## Versions of GCC >= 2.0 put their library, libgcc.a, in obscure |
3409 ## places that are difficult to figure out at make time. Fortunately, | 3395 ## places that are difficult to figure out at make time. Fortunately, |
3410 ## these same versions allow you to pass arbitrary flags on to the | 3396 ## these same versions allow you to pass arbitrary flags on to the |
3412 ## | 3398 ## |
3413 ## Well, it is not quite perfect. The "-nostdlib" keeps GCC from | 3399 ## Well, it is not quite perfect. The "-nostdlib" keeps GCC from |
3414 ## searching for libraries in its internal directories, so we have to | 3400 ## searching for libraries in its internal directories, so we have to |
3415 ## ask GCC explicitly where to find libgcc.a (LIB_GCC below). | 3401 ## ask GCC explicitly where to find libgcc.a (LIB_GCC below). |
3416 LINKER="\$(CC) -nostdlib" | 3402 LINKER="\$(CC) -nostdlib" |
3417 ## GCC passes any argument prefixed with -Xlinker directly to the linker. | 3403 fi |
3418 ## See prefix-args.c for an explanation of why we do not do this with the | |
3419 ## shell''s ``for'' construct. Note that sane people do not have '.' in | |
3420 ## their paths, so we must use ./prefix-args. | |
3421 ## TODO either make prefix-args check ORDINARY_LINK internally, | |
3422 ## or remove it altogether (bug#6184), removing the need for this hack. | |
3423 PRE_EDIT_LDFLAGS='`./prefix-args -Xlinker' | |
3424 POST_EDIT_LDFLAGS='`' | |
3425 fi | |
3426 AC_SUBST(PRE_EDIT_LDFLAGS) | |
3427 AC_SUBST(POST_EDIT_LDFLAGS) | |
3428 | 3404 |
3429 test "x$LINKER" = "x" && LINKER=ld | 3405 test "x$LINKER" = "x" && LINKER=ld |
3430 ## FIXME? What setting of EDIT_LDFLAGS should this have? | 3406 ## FIXME? What setting of EDIT_LDFLAGS should this have? |
3431 test "$NS_IMPL_GNUSTEP" = "yes" && LINKER="\$(CC) -rdynamic" | 3407 test "$NS_IMPL_GNUSTEP" = "yes" && LINKER="\$(CC) -rdynamic" |
3432 | 3408 |
3438 ## Should we only be setting LIB_GCC if LD ~ -nostdlib? | 3414 ## Should we only be setting LIB_GCC if LD ~ -nostdlib? |
3439 LIB_GCC= | 3415 LIB_GCC= |
3440 if test "x$GCC" = "xyes" && test "x$ORDINARY_LINK" != "xyes"; then | 3416 if test "x$GCC" = "xyes" && test "x$ORDINARY_LINK" != "xyes"; then |
3441 | 3417 |
3442 case "$opsys" in | 3418 case "$opsys" in |
3443 ## cygwin: don't link against static libgcc. | 3419 freebsd|netbsd|openbsd) LIB_GCC= ;; |
3444 cygwin|freebsd|netbsd|openbsd) LIB_GCC= ;; | |
3445 | 3420 |
3446 gnu-*) | 3421 gnu-*) |
3447 ## armin76@gentoo.org reported that the lgcc_s flag is necessary to | 3422 ## armin76@gentoo.org reported that the lgcc_s flag is necessary to |
3448 ## build on ARM EABI under GNU/Linux. (Bug#5518) | 3423 ## build on ARM EABI under GNU/Linux. (Bug#5518) |
3449 ## Note that m/arm.h never bothered to undefine LIB_GCC first. | 3424 ## Note that m/arm.h never bothered to undefine LIB_GCC first. |
3515 /* Define AMPERSAND_FULL_NAME if you use the convention | 3490 /* Define AMPERSAND_FULL_NAME if you use the convention |
3516 that & in the full name stands for the login id. */ | 3491 that & in the full name stands for the login id. */ |
3517 /* Turned on June 1996 supposing nobody will mind it. */ | 3492 /* Turned on June 1996 supposing nobody will mind it. */ |
3518 #define AMPERSAND_FULL_NAME | 3493 #define AMPERSAND_FULL_NAME |
3519 | 3494 |
3520 /* Define HAVE_SOUND if we have sound support. We know it works | |
3521 and compiles only on the specified platforms. For others, | |
3522 it probably doesn't make sense to try. */ | |
3523 | |
3524 #if defined __FreeBSD__ || defined __NetBSD__ || defined __linux__ | |
3525 #ifdef HAVE_MACHINE_SOUNDCARD_H | |
3526 #define HAVE_SOUND 1 | |
3527 #endif | |
3528 #ifdef HAVE_SYS_SOUNDCARD_H | |
3529 #define HAVE_SOUND 1 | |
3530 #endif | |
3531 #ifdef HAVE_SOUNDCARD_H | |
3532 #define HAVE_SOUND 1 | |
3533 #endif | |
3534 #ifdef HAVE_ALSA | |
3535 #define HAVE_SOUND 1 | |
3536 #endif | |
3537 #endif /* __FreeBSD__ || __NetBSD__ || __linux__ */ | |
3538 | |
3539 /* If using GNU, then support inline function declarations. */ | 3495 /* If using GNU, then support inline function declarations. */ |
3540 /* Don't try to switch on inline handling as detected by AC_C_INLINE | 3496 /* Don't try to switch on inline handling as detected by AC_C_INLINE |
3541 generally, because even if non-gcc compilers accept `inline', they | 3497 generally, because even if non-gcc compilers accept `inline', they |
3542 may reject `extern inline'. */ | 3498 may reject `extern inline'. */ |
3543 #if defined (__GNUC__) && defined (OPTIMIZE) | 3499 #if defined (__GNUC__) && defined (OPTIMIZE) |
3593 #define mktime emacs_mktime | 3549 #define mktime emacs_mktime |
3594 #endif | 3550 #endif |
3595 | 3551 |
3596 #define my_strftime nstrftime /* for strftime.c */ | 3552 #define my_strftime nstrftime /* for strftime.c */ |
3597 | 3553 |
3598 /* Some of the files of Emacs which are intended for use with other | |
3599 programs assume that if you have a config.h file, you must declare | |
3600 the type of getenv. */ | |
3601 extern char *getenv (); | |
3602 | |
3603 /* These default definitions are good for almost all machines. | 3554 /* These default definitions are good for almost all machines. |
3604 The exceptions override them in m/MACHINE.h. */ | 3555 The exceptions override them in m/MACHINE.h. */ |
3605 | 3556 |
3606 #ifndef BITS_PER_CHAR | 3557 #ifndef BITS_PER_CHAR |
3607 #define BITS_PER_CHAR 8 | 3558 #define BITS_PER_CHAR 8 |
3624 #else | 3575 #else |
3625 #define BITS_PER_LONG 32 | 3576 #define BITS_PER_LONG 32 |
3626 #endif | 3577 #endif |
3627 #endif | 3578 #endif |
3628 | 3579 |
3629 /* Define if the compiler supports function prototypes. It may do so | 3580 /* Define if the compiler supports function prototypes. It may do so but |
3630 but not define __STDC__ (e.g. DEC C by default) or may define it as | 3581 not define __STDC__ (e.g. DEC C by default) or may define it as zero. */ |
3631 zero. */ | |
3632 #undef PROTOTYPES | 3582 #undef PROTOTYPES |
3633 /* For mktime.c: */ | |
3634 #ifndef __P | |
3635 # if defined PROTOTYPES | |
3636 # define __P(args) args | |
3637 # else | |
3638 # define __P(args) () | |
3639 # endif /* GCC. */ | |
3640 #endif /* __P */ | |
3641 | 3583 |
3642 #ifdef HAVE_STRING_H | 3584 #ifdef HAVE_STRING_H |
3643 #include <string.h> | 3585 #include <string.h> |
3644 #endif | |
3645 | |
3646 #ifdef HAVE_STRINGS_H | |
3647 #include <strings.h> /* May be needed for bcopy & al. */ | |
3648 #endif | 3586 #endif |
3649 | 3587 |
3650 #ifdef HAVE_STDLIB_H | 3588 #ifdef HAVE_STDLIB_H |
3651 #include <stdlib.h> | 3589 #include <stdlib.h> |
3652 #endif | 3590 #endif |
3667 | 3605 |
3668 #ifndef HAVE_SIZE_T | 3606 #ifndef HAVE_SIZE_T |
3669 typedef unsigned size_t; | 3607 typedef unsigned size_t; |
3670 #endif | 3608 #endif |
3671 | 3609 |
3672 /* Define HAVE_X_I18N if we have usable i18n support. */ | 3610 #ifndef HAVE_STRCHR |
3673 | 3611 #define strchr(a, b) index (a, b) |
3674 #ifdef HAVE_X11R6 | |
3675 #define HAVE_X_I18N | |
3676 #endif | 3612 #endif |
3677 | 3613 |
3678 /* Define HAVE_X11R6_XIM if we have usable X11R6-style XIM support. */ | 3614 #ifndef HAVE_STRRCHR |
3679 | 3615 #define strrchr(a, b) rindex (a, b) |
3680 #if defined HAVE_X11R6 && !defined INHIBIT_X11R6_XIM | |
3681 #define HAVE_X11R6_XIM | |
3682 #endif | 3616 #endif |
3683 | 3617 |
3684 #if defined __GNUC__ && (__GNUC__ > 2 \ | 3618 #if defined __GNUC__ && (__GNUC__ > 2 \ |
3685 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 5)) | 3619 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 5)) |
3686 #define NO_RETURN __attribute__ ((__noreturn__)) | 3620 #define NO_RETURN __attribute__ ((__noreturn__)) |
3696 # define GC_SETJMP_WORKS 1 | 3630 # define GC_SETJMP_WORKS 1 |
3697 # endif | 3631 # endif |
3698 # ifndef GC_LISP_OBJECT_ALIGNMENT | 3632 # ifndef GC_LISP_OBJECT_ALIGNMENT |
3699 # define GC_LISP_OBJECT_ALIGNMENT (__alignof__ (Lisp_Object)) | 3633 # define GC_LISP_OBJECT_ALIGNMENT (__alignof__ (Lisp_Object)) |
3700 # endif | 3634 # endif |
3701 #endif | |
3702 | |
3703 #ifndef HAVE_BCOPY | |
3704 #define bcopy(a,b,s) memcpy (b,a,s) | |
3705 #endif | |
3706 #ifndef HAVE_BZERO | |
3707 #define bzero(a,s) memset (a,0,s) | |
3708 #endif | |
3709 #ifndef HAVE_BCMP | |
3710 #define BCMP memcmp | |
3711 #endif | 3635 #endif |
3712 | 3636 |
3713 #endif /* EMACS_CONFIG_H */ | 3637 #endif /* EMACS_CONFIG_H */ |
3714 | 3638 |
3715 /* | 3639 /* |