Mercurial > emacs
comparison configure.in @ 88155:d7ddb3e565de
sync with trunk
author | Henrik Enberg <henrik.enberg@telia.com> |
---|---|
date | Mon, 16 Jan 2006 00:03:54 +0000 |
parents | 23a1cea22d13 |
children |
comparison
equal
deleted
inserted
replaced
88154:8ce476d3ba36 | 88155:d7ddb3e565de |
---|---|
1 dnl Autoconf script for GNU Emacs | 1 dnl Autoconf script for GNU Emacs |
2 dnl To rebuild the `configure' script from this, execute the command | 2 dnl To rebuild the `configure' script from this, execute the command |
3 dnl autoconf | 3 dnl autoconf |
4 dnl in the directory containing this script. | 4 dnl in the directory containing this script. |
5 dnl | 5 dnl |
6 dnl Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2003 | 6 dnl Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 |
7 dnl Free Software Foundation, Inc. | 7 dnl Free Software Foundation, Inc. |
8 dnl | 8 dnl |
9 dnl This file is part of GNU Emacs. | 9 dnl This file is part of GNU Emacs. |
10 dnl | 10 dnl |
11 dnl GNU Emacs is free software; you can redistribute it and/or modify | 11 dnl GNU Emacs is free software; you can redistribute it and/or modify |
18 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 18 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
19 dnl GNU General Public License for more details. | 19 dnl GNU General Public License for more details. |
20 dnl | 20 dnl |
21 dnl You should have received a copy of the GNU General Public License | 21 dnl You should have received a copy of the GNU General Public License |
22 dnl along with GNU Emacs; see the file COPYING. If not, write to the | 22 dnl along with GNU Emacs; see the file COPYING. If not, write to the |
23 dnl Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 23 dnl Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
24 dnl Boston, MA 02111-1307, USA. | 24 dnl Boston, MA 02110-1301, USA. |
25 | 25 |
26 AC_PREREQ(2.54)dnl | 26 AC_PREREQ(2.54)dnl |
27 AC_INIT(src/lisp.h) | 27 AC_INIT(src/lisp.h) |
28 AC_CONFIG_HEADER(src/config.h:src/config.in) | 28 AC_CONFIG_HEADER(src/config.h:src/config.in) |
29 | 29 |
123 AC_ARG_ENABLE(carbon-app, | 123 AC_ARG_ENABLE(carbon-app, |
124 [[ --enable-carbon-app[=DIR] [DIR=/Application] | 124 [[ --enable-carbon-app[=DIR] [DIR=/Application] |
125 specify install directory for Emacs.app on Mac OS X]], | 125 specify install directory for Emacs.app on Mac OS X]], |
126 [ carbon_appdir_x=${enableval}]) | 126 [ carbon_appdir_x=${enableval}]) |
127 | 127 |
128 AC_ARG_ENABLE(asserts, | |
129 [ --enable-asserts compile code with asserts enabled], | |
130 USE_XASSERTS=$enableval, | |
131 USE_XASSERTS=no) | |
132 | |
133 AC_ARG_ENABLE(maintainer-mode, | |
134 [ --enable-maintainer-mode enable make rules and dependencies not useful | |
135 (and sometimes confusing) to the casual installer], | |
136 USE_MAINTAINER_MODE=$enableval, | |
137 USE_MAINTAINER_MODE=no) | |
138 if test $USE_MAINTAINER_MODE = yes; then | |
139 MAINT= | |
140 else | |
141 MAINT=# | |
142 fi | |
143 AC_SUBST(MAINT) | |
144 | |
145 AC_ARG_ENABLE(locallisppath, | |
146 [ --enable-locallisppath=PATH | |
147 directories Emacs should search for lisp files | |
148 specific to this site], | |
149 if test "${enableval}" = "no"; then | |
150 locallisppath= | |
151 elif test "${enableval}" != "yes"; then | |
152 locallisppath=${enableval} | |
153 fi) | |
154 | |
128 #### Make srcdir absolute, if it isn't already. It's important to | 155 #### Make srcdir absolute, if it isn't already. It's important to |
129 #### avoid running the path through pwd unnecessarily, since pwd can | 156 #### avoid running the path through pwd unnecessarily, since pwd can |
130 #### give you automounter prefixes, which can go away. We do all this | 157 #### give you automounter prefixes, which can go away. We do all this |
131 #### so Emacs can find its files when run uninstalled. | 158 #### so Emacs can find its files when run uninstalled. |
132 ## Make sure CDPATH doesn't affect cd (in case PWD is relative). | 159 ## Make sure CDPATH doesn't affect cd (in case PWD is relative). |
156 as a build directory right now; it has been configured in its own | 183 as a build directory right now; it has been configured in its own |
157 right. To configure in another directory as well, you MUST | 184 right. To configure in another directory as well, you MUST |
158 use GNU make. If you do not have GNU make, then you must | 185 use GNU make. If you do not have GNU make, then you must |
159 now do `make distclean' in ${srcdir}, | 186 now do `make distclean' in ${srcdir}, |
160 and then run $0 again.]]) | 187 and then run $0 again.]]) |
161 | |
162 [extrasub='/^VPATH[ ]*=/c\ | |
163 vpath %.c $(srcdir)\ | |
164 vpath %.h $(srcdir)\ | |
165 vpath %.y $(srcdir)\ | |
166 vpath %.l $(srcdir)\ | |
167 vpath %.s $(srcdir)\ | |
168 vpath %.in $(srcdir)\ | |
169 vpath %.texi $(srcdir)'] | |
170 fi | 188 fi |
171 | 189 |
172 #### Given the configuration name, set machfile and opsysfile to the | 190 #### Given the configuration name, set machfile and opsysfile to the |
173 #### names of the m/*.h and s/*.h files we should use. | 191 #### names of the m/*.h and s/*.h files we should use. |
174 | 192 |
180 | 198 |
181 dnl This used to use changequote, but, apart from `changequote is evil' | 199 dnl This used to use changequote, but, apart from `changequote is evil' |
182 dnl per the autoconf manual, we can speed up autoconf somewhat by quoting | 200 dnl per the autoconf manual, we can speed up autoconf somewhat by quoting |
183 dnl the great gob of text. Thus it's not processed for possible expansion. | 201 dnl the great gob of text. Thus it's not processed for possible expansion. |
184 dnl Just make sure the brackets remain balanced. | 202 dnl Just make sure the brackets remain balanced. |
203 dnl | |
204 dnl Since Emacs can't find matching pairs of quotes, boundaries are | |
205 dnl indicated by comments. | |
206 dnl quotation begins | |
185 [ | 207 [ |
186 | 208 |
187 ### If you add support for a new configuration, add code to this | 209 ### If you add support for a new configuration, add code to this |
188 ### switch statement to recognize your configuration name and select | 210 ### switch statement to recognize your configuration name and select |
189 ### the appropriate operating system and machine description files. | 211 ### the appropriate operating system and machine description files. |
214 *-*-freebsd* ) | 236 *-*-freebsd* ) |
215 opsys=freebsd | 237 opsys=freebsd |
216 case "${canonical}" in | 238 case "${canonical}" in |
217 alpha*-*-freebsd*) machine=alpha ;; | 239 alpha*-*-freebsd*) machine=alpha ;; |
218 i[3456]86-*-freebsd*) machine=intel386 ;; | 240 i[3456]86-*-freebsd*) machine=intel386 ;; |
241 amd64-*-freebsd*|x86_64-*-freebsd*) machine=amdx86-64 ;; | |
219 esac | 242 esac |
220 ;; | 243 ;; |
221 | 244 |
222 ## NetBSD ports | 245 ## NetBSD ports |
223 *-*-netbsd* ) | 246 *-*-netbsd* ) |
224 opsys=netbsd | 247 opsys=netbsd |
248 if test -f /usr/lib/crti.o; then] | |
249 dnl The close and open brackets here are because this section is quoted -- | |
250 dnl see the `changequote' comment above. | |
251 AC_DEFINE(HAVE_CRTIN, [], [Define to 1 if you have /usr/lib/crti.o.]) | |
252 [ fi | |
253 | |
225 case "${canonical}" in | 254 case "${canonical}" in |
226 alpha*-*-netbsd*) machine=alpha ;; | 255 alpha*-*-netbsd*) machine=alpha ;; |
227 i[3456]86-*-netbsd*) machine=intel386 ;; | 256 i[3456]86-*-netbsd*) machine=intel386 ;; |
228 m68k-*-netbsd*) | 257 m68k-*-netbsd*) |
229 # This is somewhat bogus. | 258 # This is somewhat bogus. |
252 sparc-*-openbsd*) machine=sparc ;; | 281 sparc-*-openbsd*) machine=sparc ;; |
253 vax-*-openbsd*) machine=vax ;; | 282 vax-*-openbsd*) machine=vax ;; |
254 esac | 283 esac |
255 ;; | 284 ;; |
256 | 285 |
286 ## LynxOS ports | |
287 *-*-lynxos* ) | |
288 opsys=lynxos | |
289 case "${canonical}" in | |
290 i[3456]86-*-lynxos*) machine=intel386 ;; | |
291 powerpc-*-lynxos*) machine=powerpc ;; | |
292 esac | |
293 ;; | |
294 | |
257 ## Acorn RISCiX: | 295 ## Acorn RISCiX: |
258 arm-acorn-riscix1.1* ) | 296 arm-acorn-riscix1.1* ) |
259 machine=acorn opsys=riscix1-1 | 297 machine=acorn opsys=riscix1-1 |
260 ;; | 298 ;; |
261 arm-acorn-riscix1.2* | arm-acorn-riscix ) | 299 arm-acorn-riscix1.2* | arm-acorn-riscix ) |
317 | 355 |
318 arm*-*-linux-gnu* ) | 356 arm*-*-linux-gnu* ) |
319 machine=arm opsys=gnu-linux | 357 machine=arm opsys=gnu-linux |
320 ;; | 358 ;; |
321 | 359 |
322 ppc-*-linux | \ | |
323 powerpc-*-linux* ) | |
324 machine=macppc opsys=gnu-linux | |
325 ;; | |
326 | |
327 ## Altos 3068 | 360 ## Altos 3068 |
328 m68*-altos-sysv* ) | 361 m68*-altos-sysv* ) |
329 machine=altos opsys=usg5-2 | 362 machine=altos opsys=usg5-2 |
330 ;; | 363 ;; |
331 | 364 |
568 machine=hp800 opsys=hpux9shr | 601 machine=hp800 opsys=hpux9shr |
569 ;; | 602 ;; |
570 hppa*-hp-hpux9* ) | 603 hppa*-hp-hpux9* ) |
571 machine=hp800 opsys=hpux9 | 604 machine=hp800 opsys=hpux9 |
572 ;; | 605 ;; |
606 hppa*-hp-hpux10.2* ) | |
607 machine=hp800 opsys=hpux10-20 | |
608 ;; | |
573 hppa*-hp-hpux10* ) | 609 hppa*-hp-hpux10* ) |
574 machine=hp800 opsys=hpux10 | 610 machine=hp800 opsys=hpux10 |
575 ;; | 611 ;; |
576 hppa*-hp-hpux1[1-9]* ) | 612 hppa*-hp-hpux1[1-9]* ) |
577 machine=hp800 opsys=hpux11 | 613 machine=hp800 opsys=hpux11 |
613 machine=ibmps2-aix opsys=usg5-3 | 649 machine=ibmps2-aix opsys=usg5-3 |
614 ;; | 650 ;; |
615 i370-ibm-aix*) | 651 i370-ibm-aix*) |
616 machine=ibm370aix opsys=usg5-3 | 652 machine=ibm370aix opsys=usg5-3 |
617 ;; | 653 ;; |
618 s390-*-linux-gnu) | 654 s390-*-linux-gnu* ) |
619 machine=ibms390 opsys=gnu-linux | 655 machine=ibms390 opsys=gnu-linux |
620 ;; | 656 ;; |
621 rs6000-ibm-aix3.1* | powerpc-ibm-aix3.1* ) | 657 rs6000-ibm-aix3.1* | powerpc-ibm-aix3.1* ) |
622 machine=ibmrs6000 opsys=aix3-1 | 658 machine=ibmrs6000 opsys=aix3-1 |
623 ;; | 659 ;; |
628 machine=ibmrs6000 opsys=aix4-1 | 664 machine=ibmrs6000 opsys=aix4-1 |
629 ;; | 665 ;; |
630 rs6000-ibm-aix4.2* | powerpc-ibm-aix4.2* ) | 666 rs6000-ibm-aix4.2* | powerpc-ibm-aix4.2* ) |
631 machine=ibmrs6000 opsys=aix4-2 | 667 machine=ibmrs6000 opsys=aix4-2 |
632 ;; | 668 ;; |
633 rs6000-ibm-aix5.1* | powerpc-ibm-aix5.1* ) | 669 rs6000-ibm-aix5* | powerpc-ibm-aix5* ) |
634 machine=ibmrs6000 opsys=aix4-2 | 670 machine=ibmrs6000 opsys=aix4-2 |
635 ;; | 671 ;; |
636 rs6000-ibm-aix4.0* | powerpc-ibm-aix4.0* ) | 672 rs6000-ibm-aix4.0* | powerpc-ibm-aix4.0* ) |
637 machine=ibmrs6000 opsys=aix4 | 673 machine=ibmrs6000 opsys=aix4 |
638 ;; | 674 ;; |
1052 ## Intel 386 machines where we don't care about the manufacturer | 1088 ## Intel 386 machines where we don't care about the manufacturer |
1053 i[3456]86-*-* ) | 1089 i[3456]86-*-* ) |
1054 machine=intel386 | 1090 machine=intel386 |
1055 case "${canonical}" in | 1091 case "${canonical}" in |
1056 *-cygwin ) opsys=cygwin ;; | 1092 *-cygwin ) opsys=cygwin ;; |
1057 *-lynxos* ) opsys=lynxos ;; | 1093 *-darwin* ) opsys=darwin |
1094 CPP="${CC-cc} -E -no-cpp-precomp" | |
1095 ;; | |
1058 *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;; | 1096 *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;; |
1059 *-isc2.2* ) opsys=isc2-2 ;; | 1097 *-isc2.2* ) opsys=isc2-2 ;; |
1060 *-isc4.0* ) opsys=isc4-0 ;; | 1098 *-isc4.0* ) opsys=isc4-0 ;; |
1061 *-isc4.* ) opsys=isc4-1 | 1099 *-isc4.* ) opsys=isc4-1 |
1062 GCC_TEST_OPTIONS=-posix | 1100 GCC_TEST_OPTIONS=-posix |
1073 # Prevent -belf from being passed to $CPP. | 1111 # Prevent -belf from being passed to $CPP. |
1074 # /lib/cpp does not accept it. | 1112 # /lib/cpp does not accept it. |
1075 OVERRIDE_CPPFLAGS=" " | 1113 OVERRIDE_CPPFLAGS=" " |
1076 ;; | 1114 ;; |
1077 *-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;; | 1115 *-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;; |
1116 *-sysv5uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;; | |
1117 *-sysv5OpenUNIX* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;; | |
1078 *-386bsd* ) opsys=386bsd ;; | 1118 *-386bsd* ) opsys=386bsd ;; |
1079 *-nextstep* ) opsys=nextstep ;; | 1119 *-nextstep* ) opsys=nextstep ;; |
1080 ## Otherwise, we'll fall through to the generic opsys code at the bottom. | 1120 ## Otherwise, we'll fall through to the generic opsys code at the bottom. |
1081 esac | 1121 esac |
1082 ;; | 1122 ;; |
1105 | 1145 |
1106 ## Darwin / Mac OS X | 1146 ## Darwin / Mac OS X |
1107 powerpc-apple-darwin* ) | 1147 powerpc-apple-darwin* ) |
1108 machine=powermac opsys=darwin | 1148 machine=powermac opsys=darwin |
1109 # Define CPP as follows to make autoconf work correctly. | 1149 # Define CPP as follows to make autoconf work correctly. |
1110 CPP="cc -E -traditional-cpp" | 1150 CPP="${CC-cc} -E -no-cpp-precomp" |
1151 # Use fink packages if available. | |
1152 if test -d /sw/include && test -d /sw/lib; then | |
1153 GCC_TEST_OPTIONS="-I/sw/include -L/sw/lib" | |
1154 CPP="${CPP} ${GCC_TEST_OPTIONS}" | |
1155 NON_GCC_TEST_OPTIONS=${GCC_TEST_OPTIONS} | |
1156 fi | |
1111 ;; | 1157 ;; |
1112 | 1158 |
1113 ## AMD x86-64 Linux-based GNU system | 1159 ## AMD x86-64 Linux-based GNU system |
1114 x86_64-*-linux-gnu* ) | 1160 x86_64-*-linux-gnu* ) |
1115 machine=amdx86-64 opsys=gnu-linux | 1161 machine=amdx86-64 opsys=gnu-linux |
1135 *-sysv0 | *-sysvr0 ) opsys=usg5-0 ;; | 1181 *-sysv0 | *-sysvr0 ) opsys=usg5-0 ;; |
1136 *-sysv2 | *-sysvr2 ) opsys=usg5-2 ;; | 1182 *-sysv2 | *-sysvr2 ) opsys=usg5-2 ;; |
1137 *-sysv2.2 | *-sysvr2.2 ) opsys=usg5-2-2 ;; | 1183 *-sysv2.2 | *-sysvr2.2 ) opsys=usg5-2-2 ;; |
1138 *-sysv3* | *-sysvr3* ) opsys=usg5-3 ;; | 1184 *-sysv3* | *-sysvr3* ) opsys=usg5-3 ;; |
1139 *-sysv4.2uw* ) opsys=unixware ;; | 1185 *-sysv4.2uw* ) opsys=unixware ;; |
1186 *-sysv5uw* ) opsys=unixware ;; | |
1187 *-sysv5OpenUNIX* ) opsys=unixware ;; | |
1140 *-sysv4.1* | *-sysvr4.1* ) | 1188 *-sysv4.1* | *-sysvr4.1* ) |
1141 NON_GNU_CPP=/usr/lib/cpp | 1189 NON_GNU_CPP=/usr/lib/cpp |
1142 opsys=usg5-4 ;; | 1190 opsys=usg5-4 ;; |
1143 *-sysv4.[2-9]* | *-sysvr4.[2-9]* ) | 1191 *-sysv4.[2-9]* | *-sysvr4.[2-9]* ) |
1144 if [ x$NON_GNU_CPP = x ]; then | 1192 if [ x$NON_GNU_CPP = x ]; then |
1155 ;; | 1203 ;; |
1156 esac | 1204 esac |
1157 fi | 1205 fi |
1158 | 1206 |
1159 ] | 1207 ] |
1208 dnl quotation ends | |
1160 | 1209 |
1161 if test $unported = yes; then | 1210 if test $unported = yes; then |
1162 AC_MSG_ERROR([Emacs hasn't been ported to `${canonical}' systems. | 1211 AC_MSG_ERROR([Emacs hasn't been ported to `${canonical}' systems. |
1163 Check `etc/MACHINES' for recognized configuration names.]) | 1212 Check `etc/MACHINES' for recognized configuration names.]) |
1164 fi | 1213 fi |
1210 if test x$GCC = x && test "x$NON_GCC_TEST_OPTIONS" != x | 1259 if test x$GCC = x && test "x$NON_GCC_TEST_OPTIONS" != x |
1211 then | 1260 then |
1212 CC="$CC $NON_GCC_TEST_OPTIONS" | 1261 CC="$CC $NON_GCC_TEST_OPTIONS" |
1213 fi | 1262 fi |
1214 | 1263 |
1264 dnl checks for Unix variants | |
1265 AC_AIX | |
1266 AC_GNU_SOURCE | |
1267 | |
1268 ### Use -Wno-pointer-sign if the compiler supports it | |
1269 AC_MSG_CHECKING([whether gcc understands -Wno-pointer-sign]) | |
1270 SAVE_CFLAGS="$CFLAGS" | |
1271 CFLAGS="$CFLAGS -Wno-pointer-sign" | |
1272 AC_TRY_COMPILE([], [], has_option=yes, has_option=no,) | |
1273 if test $has_option = yes; then | |
1274 C_WARNINGS_SWITCH="-Wno-pointer-sign $C_WARNINGS_SWITCH" | |
1275 fi | |
1276 AC_MSG_RESULT($has_option) | |
1277 CFLAGS="$SAVE_CFLAGS" | |
1278 unset has_option | |
1279 unset SAVE_CFLAGS | |
1280 | |
1215 #### Some other nice autoconf tests. | 1281 #### Some other nice autoconf tests. |
1216 | 1282 |
1217 dnl checks for programs | 1283 dnl checks for programs |
1218 AC_PROG_LN_S | 1284 AC_PROG_LN_S |
1219 AC_PROG_CPP | 1285 AC_PROG_CPP |
1222 AC_PROG_RANLIB | 1288 AC_PROG_RANLIB |
1223 fi | 1289 fi |
1224 AC_PATH_PROG(INSTALL_INFO, install-info) | 1290 AC_PATH_PROG(INSTALL_INFO, install-info) |
1225 AC_PATH_PROG(INSTALL_INFO, install-info,, /usr/sbin) | 1291 AC_PATH_PROG(INSTALL_INFO, install-info,, /usr/sbin) |
1226 AC_PATH_PROG(INSTALL_INFO, install-info,:, /sbin) | 1292 AC_PATH_PROG(INSTALL_INFO, install-info,:, /sbin) |
1293 dnl Don't use GZIP, which is used by gzip for additional parameters. | |
1294 AC_PATH_PROG(GZIP_PROG, gzip) | |
1227 | 1295 |
1228 dnl Add our options to ac_link now, after it is set up. | 1296 dnl Add our options to ac_link now, after it is set up. |
1229 | 1297 |
1230 if test x$GCC = xyes && test "x$GCC_LINK_TEST_OPTIONS" != x | 1298 if test x$GCC = xyes && test "x$GCC_LINK_TEST_OPTIONS" != x |
1231 then | 1299 then |
1235 if test x$GCC = x && test "x$NON_GCC_LINK_TEST_OPTIONS" != x | 1303 if test x$GCC = x && test "x$NON_GCC_LINK_TEST_OPTIONS" != x |
1236 then | 1304 then |
1237 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS" | 1305 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS" |
1238 fi | 1306 fi |
1239 | 1307 |
1240 dnl checks for Unix variants | 1308 dnl We need -znocombreloc if we're using a relatively recent GNU ld. |
1241 AC_AIX | 1309 dnl If we can link with the flag, it shouldn't do any harm anyhow. |
1310 dnl (Don't use `-z nocombreloc' as -z takes no arg on Irix.) | |
1311 dnl Treat GCC specially since it just gives a non-fatal `unrecognized option' | |
1312 dnl if not built to support GNU ld. | |
1313 | |
1314 late_LDFLAGS=$LDFLAGS | |
1315 if test "$GCC" = yes; then | |
1316 LDFLAGS="$LDFLAGS -Wl,-znocombreloc" | |
1317 else | |
1318 LDFLAGS="$LDFLAGS -znocombreloc" | |
1319 fi | |
1320 | |
1321 AC_MSG_CHECKING([for -znocombreloc]) | |
1322 AC_LINK_IFELSE([main(){return 0;}], | |
1323 [AC_MSG_RESULT(yes)], | |
1324 LDFLAGS=$late_LDFLAGS | |
1325 [AC_MSG_RESULT(no)]) | |
1242 | 1326 |
1243 #### Extract some information from the operating system and machine files. | 1327 #### Extract some information from the operating system and machine files. |
1244 | 1328 |
1245 AC_CHECKING([the machine- and system-dependent files to find out | 1329 AC_CHECKING([the machine- and system-dependent files to find out |
1246 - which libraries the lib-src programs will want, and | 1330 - which libraries the lib-src programs will want, and |
1321 #else | 1405 #else |
1322 #define C_OPTIMIZE_SWITCH -O | 1406 #define C_OPTIMIZE_SWITCH -O |
1323 #endif | 1407 #endif |
1324 #endif | 1408 #endif |
1325 | 1409 |
1410 #ifndef C_WARNINGS_SWITCH | |
1411 #define C_WARNINGS_SWITCH ${C_WARNINGS_SWITCH} | |
1412 #endif | |
1413 | |
1326 #ifndef LD_SWITCH_MACHINE | 1414 #ifndef LD_SWITCH_MACHINE |
1327 #define LD_SWITCH_MACHINE | 1415 #define LD_SWITCH_MACHINE |
1328 #endif | 1416 #endif |
1329 | 1417 |
1330 #ifndef LD_SWITCH_SYSTEM | 1418 #ifndef LD_SWITCH_SYSTEM |
1349 | 1437 |
1350 #else /* not THIS_IS_CONFIGURE */ | 1438 #else /* not THIS_IS_CONFIGURE */ |
1351 | 1439 |
1352 /* Get the CFLAGS for real compilation. */ | 1440 /* Get the CFLAGS for real compilation. */ |
1353 #ifdef __GNUC__ | 1441 #ifdef __GNUC__ |
1354 configure___ REAL_CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}' | 1442 configure___ REAL_CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH C_WARNINGS_SWITCH '${SPECIFIED_CFLAGS}' |
1355 #else | 1443 #else |
1356 configure___ REAL_CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}' | 1444 configure___ REAL_CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}' |
1357 #endif | 1445 #endif |
1358 | 1446 |
1359 #endif /* not THIS_IS_CONFIGURE */ | 1447 #endif /* not THIS_IS_CONFIGURE */ |
1383 fi | 1471 fi |
1384 | 1472 |
1385 dnl For AC_FUNC_GETLOADAVG, at least: | 1473 dnl For AC_FUNC_GETLOADAVG, at least: |
1386 AC_CONFIG_LIBOBJ_DIR(src) | 1474 AC_CONFIG_LIBOBJ_DIR(src) |
1387 | 1475 |
1388 AC_GNU_SOURCE | |
1389 | |
1390 dnl Do this early because it can frob feature test macros for Unix-98 &c. | 1476 dnl Do this early because it can frob feature test macros for Unix-98 &c. |
1391 AC_SYS_LARGEFILE | 1477 AC_SYS_LARGEFILE |
1392 | 1478 |
1393 if test "${with_sound}" != "no"; then | 1479 if test "${with_sound}" != "no"; then |
1394 # Sound support for GNU/Linux and the free BSDs. | 1480 # Sound support for GNU/Linux and the free BSDs. |
1399 fi | 1485 fi |
1400 | 1486 |
1401 dnl checks for header files | 1487 dnl checks for header files |
1402 AC_CHECK_HEADERS(sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \ | 1488 AC_CHECK_HEADERS(sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \ |
1403 linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \ | 1489 linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \ |
1404 termcap.h stdio_ext.h fcntl.h term.h strings.h coff.h pty.h sys/mman.h \ | 1490 termcap.h stdio_ext.h fcntl.h strings.h coff.h pty.h sys/mman.h \ |
1405 sys/param.h sys/vlimit.h sys/resource.h) | 1491 sys/param.h sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h \ |
1492 sys/utsname.h pwd.h) | |
1493 | |
1494 AC_MSG_CHECKING(if personality LINUX32 can be set) | |
1495 AC_TRY_COMPILE([#include <sys/personality.h>], [personality (PER_LINUX32)], | |
1496 emacs_cv_personality_linux32=yes, | |
1497 emacs_cv_personality_linux32=no) | |
1498 AC_MSG_RESULT($emacs_cv_personality_linux32) | |
1499 | |
1500 if test $emacs_cv_personality_linux32 = yes; then | |
1501 AC_DEFINE(HAVE_PERSONALITY_LINUX32, 1, | |
1502 [Define to 1 if personality LINUX32 can be set.]) | |
1503 fi | |
1504 | |
1406 dnl On Solaris 8 there's a compilation warning for term.h because | 1505 dnl On Solaris 8 there's a compilation warning for term.h because |
1407 dnl it doesn't define `bool'. | 1506 dnl it doesn't define `bool'. |
1408 AC_CHECK_HEADERS(term.h, , , -) | 1507 AC_CHECK_HEADERS(term.h, , , -) |
1409 AC_HEADER_STDC | 1508 AC_HEADER_STDC |
1410 AC_HEADER_TIME | 1509 AC_HEADER_TIME |
1475 HAVE_EXCEPTION=$emacs_cv_struct_exception | 1574 HAVE_EXCEPTION=$emacs_cv_struct_exception |
1476 if test $emacs_cv_struct_exception != yes; then | 1575 if test $emacs_cv_struct_exception != yes; then |
1477 AC_DEFINE(NO_MATHERR, 1, [Define to 1 if you don't have struct exception in math.h.]) | 1576 AC_DEFINE(NO_MATHERR, 1, [Define to 1 if you don't have struct exception in math.h.]) |
1478 fi | 1577 fi |
1479 | 1578 |
1579 AC_CHECK_HEADERS(sys/socket.h) | |
1580 AC_CHECK_HEADERS(net/if.h, , , [AC_INCLUDES_DEFAULT | |
1581 #if HAVE_SYS_SOCKET_H | |
1582 #include <sys/socket.h> | |
1583 #endif]) | |
1584 | |
1480 dnl checks for structure members | 1585 dnl checks for structure members |
1481 AC_STRUCT_TM | 1586 AC_STRUCT_TM |
1482 AC_STRUCT_TIMEZONE | 1587 AC_STRUCT_TIMEZONE |
1483 AC_CHECK_MEMBER(struct tm.tm_gmtoff, | 1588 AC_CHECK_MEMBER(struct tm.tm_gmtoff, |
1484 [AC_DEFINE(HAVE_TM_GMTOFF, 1, | 1589 [AC_DEFINE(HAVE_TM_GMTOFF, 1, |
1485 [Define to 1 if `tm_gmtoff' is member of `struct tm'.])],, | 1590 [Define to 1 if `tm_gmtoff' is member of `struct tm'.])],, |
1486 [#include <time.h>]) | 1591 [#include <time.h>]) |
1592 AC_CHECK_MEMBERS([struct ifreq.ifr_flags, struct ifreq.ifr_hwaddr, | |
1593 struct ifreq.ifr_netmask, struct ifreq.ifr_broadaddr, | |
1594 struct ifreq.ifr_addr], , , | |
1595 [AC_INCLUDES_DEFAULT | |
1596 #if HAVE_SYS_SOCKET_H | |
1597 #include <sys/socket.h> | |
1598 #endif | |
1599 #if HAVE_NET_IF_H | |
1600 #include <net/if.h> | |
1601 #endif]) | |
1487 | 1602 |
1488 dnl checks for compiler characteristics | 1603 dnl checks for compiler characteristics |
1489 | 1604 |
1490 dnl Testing __STDC__ to determine prototype support isn't good enough. | 1605 dnl Testing __STDC__ to determine prototype support isn't good enough. |
1491 dnl DEC C, for instance, doesn't define it with default options, and | 1606 dnl DEC C, for instance, doesn't define it with default options, and |
1506 AC_DEFINE(POINTER_TYPE, char) | 1621 AC_DEFINE(POINTER_TYPE, char) |
1507 fi | 1622 fi |
1508 AH_TEMPLATE(POINTER_TYPE, | 1623 AH_TEMPLATE(POINTER_TYPE, |
1509 [Define as `void' if your compiler accepts `void *'; otherwise | 1624 [Define as `void' if your compiler accepts `void *'; otherwise |
1510 define as `char'.])dnl | 1625 define as `char'.])dnl |
1626 | |
1627 | |
1511 | 1628 |
1512 dnl This could be used for targets which can have both byte sexes. | 1629 dnl This could be used for targets which can have both byte sexes. |
1513 dnl We could presumably replace the hardwired WORDS_BIG_ENDIAN generally. | 1630 dnl We could presumably replace the hardwired WORDS_BIG_ENDIAN generally. |
1514 dnl AC_C_BIGENDIAN | 1631 dnl AC_C_BIGENDIAN |
1515 | 1632 |
1567 if test ${bmd_acc} != "dummyval"; then | 1684 if test ${bmd_acc} != "dummyval"; then |
1568 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"` | 1685 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"` |
1569 fi | 1686 fi |
1570 fi | 1687 fi |
1571 | 1688 |
1689 HAVE_CARBON=no | |
1690 if test "${with_carbon}" != no; then | |
1691 AC_CHECK_HEADER(Carbon/Carbon.h, HAVE_CARBON=yes) | |
1692 fi | |
1693 if test "${window_system}" = x11 && test "${HAVE_CARBON}" = yes; then | |
1694 if test "${with_carbon+set}" != set \ | |
1695 && test "${carbon_appdir_x+set}" != set; then | |
1696 HAVE_CARBON=no | |
1697 fi | |
1698 fi | |
1699 if test "${HAVE_CARBON}" = yes; then | |
1700 window_system=mac | |
1701 fi | |
1702 | |
1572 case "${window_system}" in | 1703 case "${window_system}" in |
1573 x11 ) | 1704 x11 ) |
1574 HAVE_X_WINDOWS=yes | 1705 HAVE_X_WINDOWS=yes |
1575 HAVE_X11=yes | 1706 HAVE_X11=yes |
1576 case "${with_x_toolkit}" in | 1707 case "${with_x_toolkit}" in |
1585 dnl If user did not say whether to use a toolkit, | 1716 dnl If user did not say whether to use a toolkit, |
1586 dnl make this decision later: use the toolkit if we have X11R5 or newer. | 1717 dnl make this decision later: use the toolkit if we have X11R5 or newer. |
1587 * ) USE_X_TOOLKIT=maybe ;; | 1718 * ) USE_X_TOOLKIT=maybe ;; |
1588 esac | 1719 esac |
1589 ;; | 1720 ;; |
1590 none ) | 1721 mac | none ) |
1591 HAVE_X_WINDOWS=no | 1722 HAVE_X_WINDOWS=no |
1592 HAVE_X11=no | 1723 HAVE_X11=no |
1593 USE_X_TOOLKIT=none | 1724 USE_X_TOOLKIT=none |
1594 ;; | 1725 ;; |
1595 esac | 1726 esac |
1680 : ${C_SWITCH_X_SITE="-I/usr/X386/include"} | 1811 : ${C_SWITCH_X_SITE="-I/usr/X386/include"} |
1681 else | 1812 else |
1682 HAVE_XFREE386=no | 1813 HAVE_XFREE386=no |
1683 fi | 1814 fi |
1684 AC_MSG_RESULT($HAVE_XFREE386) | 1815 AC_MSG_RESULT($HAVE_XFREE386) |
1816 | |
1817 dnl Check for need for bigtoc support on IBM AIX | |
1818 | |
1819 case ${host_os} in | |
1820 aix*) | |
1821 AC_CACHE_CHECK([for -bbigtoc option], [gdb_cv_bigtoc], [ | |
1822 case $GCC in | |
1823 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;; | |
1824 *) gdb_cv_bigtoc=-bbigtoc ;; | |
1825 esac | |
1826 | |
1827 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc | |
1828 AC_TRY_LINK([], [int i;], [], [gdb_cv_bigtoc=]) | |
1829 ]) | |
1830 ;; | |
1831 esac | |
1685 | 1832 |
1686 # Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets | 1833 # Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets |
1687 # used for the tests that follow. We set them back to REAL_CFLAGS and | 1834 # used for the tests that follow. We set them back to REAL_CFLAGS and |
1688 # REAL_CPPFLAGS later on. | 1835 # REAL_CPPFLAGS later on. |
1689 | 1836 |
1794 | 1941 |
1795 dnl This function defintion taken from Gnome 2.0 | 1942 dnl This function defintion taken from Gnome 2.0 |
1796 dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not) | 1943 dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not) |
1797 dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page | 1944 dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page |
1798 dnl also defines GSTUFF_PKG_ERRORS on error | 1945 dnl also defines GSTUFF_PKG_ERRORS on error |
1799 AC_DEFUN(PKG_CHECK_MODULES, [ | 1946 AC_DEFUN([PKG_CHECK_MODULES], [ |
1800 succeeded=no | 1947 succeeded=no |
1801 | 1948 |
1802 if test -z "$PKG_CONFIG"; then | 1949 if test -z "$PKG_CONFIG"; then |
1803 AC_PATH_PROG(PKG_CONFIG, pkg-config, no) | 1950 AC_PATH_PROG(PKG_CONFIG, pkg-config, no) |
1804 fi | 1951 fi |
1842 fi | 1989 fi |
1843 | 1990 |
1844 if test $succeeded = yes; then | 1991 if test $succeeded = yes; then |
1845 ifelse([$3], , :, [$3]) | 1992 ifelse([$3], , :, [$3]) |
1846 else | 1993 else |
1847 ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4]) | 1994 ifelse([$4], , [AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.])], [$4]) |
1848 fi | 1995 fi |
1849 ]) | 1996 ]) |
1850 | 1997 |
1851 HAVE_GTK=no | 1998 HAVE_GTK=no |
1852 if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "gtk"; then | 1999 if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "gtk"; then |
1864 dnl Checks for libraries. | 2011 dnl Checks for libraries. |
1865 PKG_CHECK_MODULES(GTK, $GTK_MODULES) | 2012 PKG_CHECK_MODULES(GTK, $GTK_MODULES) |
1866 AC_SUBST(GTK_CFLAGS) | 2013 AC_SUBST(GTK_CFLAGS) |
1867 AC_SUBST(GTK_LIBS) | 2014 AC_SUBST(GTK_LIBS) |
1868 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS" | 2015 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS" |
2016 CFLAGS="$CFLAGS $GTK_CFLAGS" | |
2017 LIBS="$GTK_LIBS $LIBS" | |
1869 HAVE_GTK=yes | 2018 HAVE_GTK=yes |
1870 AC_DEFINE(HAVE_GTK, 1, [Define to 1 if using GTK.]) | 2019 AC_DEFINE(HAVE_GTK, 1, [Define to 1 if using GTK.]) |
1871 USE_X_TOOLKIT=none | 2020 USE_X_TOOLKIT=none |
1872 | 2021 |
1873 dnl GTK scrollbars resembles toolkit scrollbars alot, so to avoid | 2022 dnl GTK scrollbars resemble toolkit scrollbars a lot, so to avoid |
1874 dnl a lot if #ifdef:s, say we have toolkit scrollbars. | 2023 dnl a lot if #ifdef:s, say we have toolkit scrollbars. |
1875 with_toolkit_scroll_bars=yes | 2024 if test "$with_toolkit_scroll_bars" != no; then |
2025 with_toolkit_scroll_bars=yes | |
2026 fi | |
2027 | |
2028 dnl Check if we can use multiple displays with this GTK version. | |
2029 dnl If gdk_display_open exists, assume all others are there also. | |
2030 HAVE_GTK_MULTIDISPLAY=no | |
2031 AC_CHECK_FUNCS(gdk_display_open, HAVE_GTK_MULTIDISPLAY=yes) | |
2032 if test "${HAVE_GTK_MULTIDISPLAY}" = "yes"; then | |
2033 AC_DEFINE(HAVE_GTK_MULTIDISPLAY, 1, | |
2034 [Define to 1 if GTK can handle more than one display.]) | |
2035 fi | |
2036 dnl Check if we have the old file selection dialog. | |
2037 dnl If gdk_display_open exists, assume all others are there also. | |
2038 HAVE_GTK_FILE_SELECTION=no | |
2039 AC_CHECK_FUNCS(gtk_file_selection_new, HAVE_GTK_FILE_SELECTION=yes) | |
2040 | |
2041 dnl Check if we have the new file chooser dialog | |
2042 dnl If gdk_display_open exists, assume all others are there also. | |
2043 HAVE_GTK_FILE_CHOOSER=no | |
2044 AC_CHECK_FUNCS(gtk_file_chooser_dialog_new, HAVE_GTK_FILE_CHOOSER=yes) | |
2045 | |
2046 if test "$HAVE_GTK_FILE_SELECTION" = yes \ | |
2047 && test "$HAVE_GTK_FILE_CHOOSER" = yes; then | |
2048 AC_DEFINE(HAVE_GTK_FILE_BOTH, 1, | |
2049 [Define to 1 if GTK has both file selection and chooser dialog.]) | |
2050 fi | |
2051 | |
2052 dnl Check if pthreads are available. Emacs only needs this when using | |
2053 dnl gtk_file_chooser under Gnome. | |
2054 if test "$HAVE_GTK_FILE_CHOOSER" = yes; then | |
2055 HAVE_GTK_AND_PTHREAD=no | |
2056 AC_CHECK_HEADERS(pthread.h) | |
2057 if test "$ac_cv_header_pthread_h"; then | |
2058 AC_CHECK_LIB(pthread, pthread_self, HAVE_GTK_AND_PTHREAD=yes) | |
2059 fi | |
2060 if test "$HAVE_GTK_AND_PTHREAD" = yes; then | |
2061 GTK_LIBS="$GTK_LIBS -lpthread" | |
2062 AC_DEFINE(HAVE_GTK_AND_PTHREAD, 1, | |
2063 [Define to 1 if you have GTK and pthread (-lpthread).]) | |
2064 fi | |
2065 fi | |
1876 fi | 2066 fi |
1877 | 2067 |
1878 dnl Do not put whitespace before the #include statements below. | 2068 dnl Do not put whitespace before the #include statements below. |
1879 dnl Older compilers (eg sunos4 cc) choke on it. | 2069 dnl Older compilers (eg sunos4 cc) choke on it. |
1880 if test x"${USE_X_TOOLKIT}" = xmaybe; then | 2070 if test x"${USE_X_TOOLKIT}" = xmaybe; then |
1936 AC_CHECK_LIB(Xext, XShapeQueryExtension) | 2126 AC_CHECK_LIB(Xext, XShapeQueryExtension) |
1937 fi | 2127 fi |
1938 fi | 2128 fi |
1939 | 2129 |
1940 if test "${USE_X_TOOLKIT}" = "MOTIF"; then | 2130 if test "${USE_X_TOOLKIT}" = "MOTIF"; then |
1941 AC_CACHE_CHECK(for LessTif where some systems put it, emacs_cv_lesstif, | |
1942 # We put this in CFLAGS temporarily to precede other -I options | |
1943 # that might be in CFLAGS temporarily. | |
1944 # We put this in CPPFLAGS where it precedes the other -I options. | |
1945 OLD_CPPFLAGS=$CPPFLAGS | |
1946 OLD_CFLAGS=$CFLAGS | |
1947 CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS" | |
1948 CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS" | |
1949 [AC_TRY_COMPILE([#include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h>], | |
1950 [int x = 5;], | |
1951 emacs_cv_lesstif=yes, emacs_cv_lesstif=no)]) | |
1952 if test $emacs_cv_lesstif = yes; then | |
1953 # Make sure this -I option remains in CPPFLAGS after it is set | |
1954 # back to REAL_CPPFLAGS. | |
1955 # There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not | |
1956 # have those other -I options anyway. Ultimately, having this | |
1957 # directory ultimately in CPPFLAGS will be enough. | |
1958 REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS" | |
1959 LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS" | |
1960 else | |
1961 CFLAGS=$OLD_CFLAGS | |
1962 CPPFLAGS=$OLD_CPPFLAGS | |
1963 fi | |
1964 AC_CACHE_CHECK(for Motif version 2.1, emacs_cv_motif_version_2_1, | 2131 AC_CACHE_CHECK(for Motif version 2.1, emacs_cv_motif_version_2_1, |
1965 [AC_TRY_COMPILE([#include <Xm/Xm.h>], | 2132 [AC_TRY_COMPILE([#include <Xm/Xm.h>], |
1966 [#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1) | 2133 [#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1) |
1967 int x = 5; | 2134 int x = 5; |
1968 #else | 2135 #else |
1977 AC_CHECK_LIB(Xp, XpCreateContext, HAVE_LIBXP=yes) | 2144 AC_CHECK_LIB(Xp, XpCreateContext, HAVE_LIBXP=yes) |
1978 if test ${HAVE_LIBXP} = yes; then | 2145 if test ${HAVE_LIBXP} = yes; then |
1979 AC_DEFINE(HAVE_LIBXP, 1, | 2146 AC_DEFINE(HAVE_LIBXP, 1, |
1980 [Define to 1 if you have the Xp library (-lXp).]) | 2147 [Define to 1 if you have the Xp library (-lXp).]) |
1981 fi | 2148 fi |
2149 else | |
2150 AC_CACHE_CHECK(for LessTif where some systems put it, emacs_cv_lesstif, | |
2151 # We put this in CFLAGS temporarily to precede other -I options | |
2152 # that might be in CFLAGS temporarily. | |
2153 # We put this in CPPFLAGS where it precedes the other -I options. | |
2154 OLD_CPPFLAGS=$CPPFLAGS | |
2155 OLD_CFLAGS=$CFLAGS | |
2156 CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS" | |
2157 CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS" | |
2158 [AC_TRY_COMPILE([#include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h>], | |
2159 [int x = 5;], | |
2160 emacs_cv_lesstif=yes, emacs_cv_lesstif=no)]) | |
2161 if test $emacs_cv_lesstif = yes; then | |
2162 # Make sure this -I option remains in CPPFLAGS after it is set | |
2163 # back to REAL_CPPFLAGS. | |
2164 # There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not | |
2165 # have those other -I options anyway. Ultimately, having this | |
2166 # directory ultimately in CPPFLAGS will be enough. | |
2167 REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS" | |
2168 LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS" | |
2169 else | |
2170 CFLAGS=$OLD_CFLAGS | |
2171 CPPFLAGS=$OLD_CPPFLAGS | |
2172 fi | |
1982 fi | 2173 fi |
1983 fi | 2174 fi |
1984 | 2175 |
1985 ### Is -lXaw3d available? | 2176 ### Is -lXaw3d available? |
1986 HAVE_XAW3D=no | 2177 HAVE_XAW3D=no |
2015 USE_TOOLKIT_SCROLL_BARS=yes | 2206 USE_TOOLKIT_SCROLL_BARS=yes |
2016 fi | 2207 fi |
2017 elif test "${HAVE_GTK}" = "yes"; then | 2208 elif test "${HAVE_GTK}" = "yes"; then |
2018 AC_DEFINE(USE_TOOLKIT_SCROLL_BARS) | 2209 AC_DEFINE(USE_TOOLKIT_SCROLL_BARS) |
2019 USE_TOOLKIT_SCROLL_BARS=yes | 2210 USE_TOOLKIT_SCROLL_BARS=yes |
2020 fi | 2211 elif test "${HAVE_CARBON}" = "yes"; then |
2021 fi | 2212 AC_DEFINE(USE_TOOLKIT_SCROLL_BARS) |
2022 | 2213 USE_TOOLKIT_SCROLL_BARS=yes |
2023 dnl Don't use X11 input methods if user specifies he doesn't want it | 2214 fi |
2024 dnl with `--with-xim=no'. | 2215 fi |
2216 | |
2217 dnl See if XIM is available. | |
2218 AC_TRY_COMPILE([ | |
2219 #include <X11/Xlib.h> | |
2220 #include <X11/Xresource.h>], | |
2221 [XIMProc callback;], | |
2222 HAVE_XIM=yes | |
2223 AC_DEFINE(HAVE_XIM, 1, [Define to 1 if XIM is available]), | |
2224 HAVE_XIM=no) | |
2225 | |
2226 dnl `--with-xim' now controls only the initial value of use_xim at run time. | |
2025 | 2227 |
2026 if test "${with_xim}" != "no"; then | 2228 if test "${with_xim}" != "no"; then |
2027 AC_DEFINE(USE_XIM, 1, | 2229 AC_DEFINE(USE_XIM, 1, |
2028 [Define to 1 if we should use XIM, if it is available.]) | 2230 [Define to 1 if we should use XIM, if it is available.]) |
2231 fi | |
2232 | |
2233 | |
2234 if test "${HAVE_XIM}" != "no"; then | |
2235 late_CFLAGS=$CFLAGS | |
2236 if test "$GCC" = yes; then | |
2237 CFLAGS="$CFLAGS --pedantic-errors" | |
2238 fi | |
2239 AC_TRY_COMPILE([ | |
2240 #include <X11/Xlib.h> | |
2241 #include <X11/Xresource.h>], | |
2242 [Display *display; | |
2243 XrmDatabase db; | |
2244 char *res_name; | |
2245 char *res_class; | |
2246 XIMProc callback; | |
2247 XPointer *client_data; | |
2248 #ifndef __GNUC__ | |
2249 /* If we're not using GCC, it's probably not XFree86, and this is | |
2250 probably right, but we can't use something like --pedantic-errors. */ | |
2251 extern Bool XRegisterIMInstantiateCallback(Display*, XrmDatabase, char*, | |
2252 char*, XIMProc, XPointer*); | |
2253 #endif | |
2254 (void)XRegisterIMInstantiateCallback(display, db, res_name, res_class, callback, | |
2255 client_data);], | |
2256 [emacs_cv_arg6_star=yes]) | |
2257 AH_TEMPLATE(XRegisterIMInstantiateCallback_arg6, | |
2258 [Define to the type of the 6th arg of XRegisterIMInstantiateCallback, | |
2259 either XPointer or XPointer*.])dnl | |
2260 if test "$emacs_cv_arg6_star" = yes; then | |
2261 AC_DEFINE(XRegisterIMInstantiateCallback_arg6, [XPointer*]) | |
2262 else | |
2263 AC_DEFINE(XRegisterIMInstantiateCallback_arg6, [XPointer]) | |
2264 fi | |
2265 CFLAGS=$late_CFLAGS | |
2029 fi | 2266 fi |
2030 | 2267 |
2031 ### Use -lXpm if available, unless `--with-xpm=no'. | 2268 ### Use -lXpm if available, unless `--with-xpm=no'. |
2032 HAVE_XPM=no | 2269 HAVE_XPM=no |
2033 if test "${HAVE_X11}" = "yes"; then | 2270 if test "${HAVE_X11}" = "yes"; then |
2081 | 2318 |
2082 ### Use -lpng if available, unless `--with-png=no'. | 2319 ### Use -lpng if available, unless `--with-png=no'. |
2083 HAVE_PNG=no | 2320 HAVE_PNG=no |
2084 if test "${HAVE_X11}" = "yes"; then | 2321 if test "${HAVE_X11}" = "yes"; then |
2085 if test "${with_png}" != "no"; then | 2322 if test "${with_png}" != "no"; then |
2086 AC_CHECK_HEADER(png.h, | 2323 # Debian unstable as of July 2003 has multiple libpngs, and puts png.h |
2087 AC_CHECK_LIB(png, png_get_channels, HAVE_PNG=yes, , -lz -lm)) | 2324 # in /usr/include/libpng. |
2325 AC_CHECK_HEADERS(png.h libpng/png.h) | |
2326 if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then | |
2327 AC_CHECK_LIB(png, png_get_channels, HAVE_PNG=yes, , -lz -lm) | |
2328 fi | |
2088 fi | 2329 fi |
2089 | 2330 |
2090 if test "${HAVE_PNG}" = "yes"; then | 2331 if test "${HAVE_PNG}" = "yes"; then |
2091 AC_DEFINE(HAVE_PNG, 1, [Define to 1 if you have the png library (-lpng).]) | 2332 AC_DEFINE(HAVE_PNG, 1, [Define to 1 if you have the png library (-lpng).]) |
2092 fi | 2333 fi |
2121 if test "${HAVE_GIF}" = "yes"; then | 2362 if test "${HAVE_GIF}" = "yes"; then |
2122 AC_DEFINE(HAVE_GIF, 1, [Define to 1 if you have the ungif library (-lungif).]) | 2363 AC_DEFINE(HAVE_GIF, 1, [Define to 1 if you have the ungif library (-lungif).]) |
2123 fi | 2364 fi |
2124 fi | 2365 fi |
2125 | 2366 |
2367 dnl Check for malloc/malloc.h on darwin | |
2368 AC_CHECK_HEADER(malloc/malloc.h, AC_DEFINE(HAVE_MALLOC_MALLOC_H, 1, [Define to 1 if you have the <malloc/malloc.h> header file.])) | |
2369 | |
2126 ### Use Mac OS X Carbon API to implement GUI. | 2370 ### Use Mac OS X Carbon API to implement GUI. |
2127 HAVE_CARBON=no | |
2128 if test "${with_carbon}" != "no"; then | |
2129 AC_CHECK_HEADER(Carbon/Carbon.h, HAVE_CARBON=yes) | |
2130 fi | |
2131 | |
2132 if test "${HAVE_CARBON}" = "yes"; then | 2371 if test "${HAVE_CARBON}" = "yes"; then |
2133 AC_DEFINE(HAVE_CARBON, 1, [Define to 1 if you are using the Carbon API on Mac OS X.]) | 2372 AC_DEFINE(HAVE_CARBON, 1, [Define to 1 if you are using the Carbon API on Mac OS X.]) |
2134 window_system=mac | |
2135 ## Specify the install directory | 2373 ## Specify the install directory |
2136 carbon_appdir= | 2374 carbon_appdir= |
2137 if test "${carbon_appdir_x}" != ""; then | 2375 if test "${carbon_appdir_x}" != ""; then |
2138 case ${carbon_appdir_x} in | 2376 case ${carbon_appdir_x} in |
2139 y | ye | yes) carbon_appdir=/Applications ;; | 2377 y | ye | yes) carbon_appdir=/Applications ;; |
2140 * ) carbon_appdir=${carbon_appdir_x} ;; | 2378 * ) carbon_appdir=${carbon_appdir_x} ;; |
2141 esac | 2379 esac |
2142 fi | 2380 fi |
2143 # We also have mouse menus. | 2381 # We also have mouse menus. |
2144 HAVE_MENUS=yes | 2382 HAVE_MENUS=yes |
2383 | |
2384 tmp_CFLAGS="$CFLAGS" | |
2385 CFLAGS="$CFLAGS -framework Carbon" | |
2386 AC_CHECK_FUNC(CancelMenuTracking, have_cmt=yes, have_cmt=no) | |
2387 if test "$have_cmt" = yes; then | |
2388 AC_DEFINE(HAVE_CANCELMENUTRACKING, 1, | |
2389 [Define to 1 if CancelMenuTracking is available (Mac OSX).]) | |
2390 fi | |
2391 CFLAGS="$tmp_CFLAGS" | |
2145 fi | 2392 fi |
2146 | 2393 |
2147 ### Use session management (-lSM -lICE) if available | 2394 ### Use session management (-lSM -lICE) if available |
2148 HAVE_X_SM=no | 2395 HAVE_X_SM=no |
2149 if test "${HAVE_X11}" = "yes"; then | 2396 if test "${HAVE_X11}" = "yes"; then |
2150 AC_CHECK_HEADER(X11/SM/SMlib.h, | 2397 AC_CHECK_HEADER(X11/SM/SMlib.h, |
2151 AC_CHECK_LIB(SM, SmcOpenConnection, HAVE_X_SM=yes, -lICE)) | 2398 AC_CHECK_LIB(SM, SmcOpenConnection, HAVE_X_SM=yes, , -lICE)) |
2152 | 2399 |
2153 if test "${HAVE_X_SM}" = "yes"; then | 2400 if test "${HAVE_X_SM}" = "yes"; then |
2154 AC_DEFINE(HAVE_X_SM, 1, [Define to 1 if you have the SM library (-lSM).]) | 2401 AC_DEFINE(HAVE_X_SM, 1, [Define to 1 if you have the SM library (-lSM).]) |
2155 case "$LIBS" in | 2402 case "$LIBS" in |
2156 *-lSM*) ;; | 2403 *-lSM*) ;; |
2173 | 2420 |
2174 # fmod, logb, and frexp are found in -lm on most systems. | 2421 # fmod, logb, and frexp are found in -lm on most systems. |
2175 # On HPUX 9.01, -lm does not contain logb, so check for sqrt. | 2422 # On HPUX 9.01, -lm does not contain logb, so check for sqrt. |
2176 AC_CHECK_LIB(m, sqrt) | 2423 AC_CHECK_LIB(m, sqrt) |
2177 | 2424 |
2178 # Check for mail-locking functions in a "mail" library | 2425 # Check for mail-locking functions in a "mail" library. Probably this should |
2426 # have the same check as for liblockfile below. | |
2179 AC_CHECK_LIB(mail, maillock) | 2427 AC_CHECK_LIB(mail, maillock) |
2180 dnl Debian, at least: | 2428 dnl Debian, at least: |
2181 dnl AC_CHECK_LIB(lockfile, maillock, [AC_DEFINE(HAVE_LIBMAIL)]) | |
2182 AC_CHECK_LIB(lockfile, maillock) | 2429 AC_CHECK_LIB(lockfile, maillock) |
2183 # If we have the shared liblockfile, assume we must use it for mail | 2430 # If we have the shared liblockfile, assume we must use it for mail |
2184 # locking (e.g. Debian). If we couldn't link against liblockfile | 2431 # locking (e.g. Debian). If we couldn't link against liblockfile |
2185 # (no liblockfile.a installed), ensure that we don't need to. | 2432 # (no liblockfile.a installed), ensure that we don't need to. |
2186 if test "$ac_cv_lib_lockfile_maillock" = no; then | 2433 if test "$ac_cv_lib_lockfile_maillock" = no; then |
2190 /usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH) | 2437 /usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH) |
2191 if test $ac_cv_prog_liblockfile = yes; then | 2438 if test $ac_cv_prog_liblockfile = yes; then |
2192 AC_MSG_ERROR([Shared liblockfile found but can't link against it. | 2439 AC_MSG_ERROR([Shared liblockfile found but can't link against it. |
2193 This probably means that movemail could lose mail. | 2440 This probably means that movemail could lose mail. |
2194 There may be a `development' package to install containing liblockfile.]) | 2441 There may be a `development' package to install containing liblockfile.]) |
2195 else AC_DEFINE(LIBMAIL, -llockfile, [Define to -llockfile if it is usable.]) | |
2196 fi | |
2197 else : | 2442 else : |
2443 fi | |
2198 fi | 2444 fi |
2199 AC_CHECK_FUNCS(touchlock) | 2445 AC_CHECK_FUNCS(touchlock) |
2200 AC_CHECK_HEADERS(maillock.h) | 2446 AC_CHECK_HEADERS(maillock.h) |
2201 | 2447 |
2202 AC_CHECK_FUNCS(gethostname getdomainname dup2 \ | 2448 AC_CHECK_FUNCS(gethostname getdomainname dup2 \ |
2203 rename closedir mkdir rmdir sysinfo \ | 2449 rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \ |
2204 random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime res_init setsid \ | 2450 random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime res_init setsid \ |
2205 strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \ | 2451 strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \ |
2206 utimes setrlimit setpgid getcwd getwd shutdown strftime getaddrinfo \ | 2452 utimes setrlimit setpgid getcwd getwd shutdown getaddrinfo \ |
2207 __fpending mblen mbrlen mbsinit strsignal setitimer ualarm index rindex \ | 2453 __fpending mblen mbrlen mbsinit strsignal setitimer ualarm index rindex \ |
2208 sendto recvfrom getsockopt setsockopt getsockname getpeername \ | 2454 sendto recvfrom getsockopt setsockopt getsockname getpeername \ |
2209 gai_strerror mkstemp getline getdelim mremap memmove fsync bzero memset) | 2455 gai_strerror mkstemp getline getdelim mremap memmove fsync bzero \ |
2456 memset memcmp difftime memcpy mempcpy mblen mbrlen posix_memalign) | |
2210 | 2457 |
2211 AC_CHECK_HEADERS(sys/un.h) | 2458 AC_CHECK_HEADERS(sys/un.h) |
2212 | 2459 |
2213 AC_FUNC_MKTIME | 2460 AC_FUNC_MKTIME |
2214 if test "$ac_cv_func_working_mktime" = no; then | 2461 if test "$ac_cv_func_working_mktime" = no; then |
2217 | 2464 |
2218 AC_FUNC_GETLOADAVG | 2465 AC_FUNC_GETLOADAVG |
2219 | 2466 |
2220 AC_FUNC_FSEEKO | 2467 AC_FUNC_FSEEKO |
2221 | 2468 |
2469 # Configure getopt. | |
2470 m4_include([m4/getopt.m4]) | |
2471 gl_GETOPT_IFELSE([ | |
2472 gl_GETOPT_SUBSTITUTE_HEADER | |
2473 gl_PREREQ_GETOPT | |
2474 GETOPTOBJS='getopt.o getopt1.o' | |
2475 ]) | |
2476 AC_SUBST(GETOPTOBJS) | |
2477 | |
2222 AC_FUNC_GETPGRP | 2478 AC_FUNC_GETPGRP |
2479 | |
2480 AC_FUNC_STRFTIME | |
2223 | 2481 |
2224 # UNIX98 PTYs. | 2482 # UNIX98 PTYs. |
2225 AC_CHECK_FUNCS(grantpt) | 2483 AC_CHECK_FUNCS(grantpt) |
2226 | 2484 |
2227 # PTY-related GNU extensions. | 2485 # PTY-related GNU extensions. |
2353 [Define to 1 if gettimeofday accepts only one argument.]) | 2611 [Define to 1 if gettimeofday accepts only one argument.]) |
2354 fi | 2612 fi |
2355 fi | 2613 fi |
2356 fi | 2614 fi |
2357 | 2615 |
2616 # This defines (or not) HAVE_TZNAME and HAVE_TM_ZONE. | |
2617 AC_STRUCT_TIMEZONE | |
2618 | |
2358 dnl Note that AC_STRUCT_TIMEZONE doesn't do what you might expect. | 2619 dnl Note that AC_STRUCT_TIMEZONE doesn't do what you might expect. |
2359 if test "$ac_cv_func_gettimeofday" = yes; then | 2620 if test "$ac_cv_func_gettimeofday" = yes; then |
2360 AC_CACHE_CHECK([for struct timezone], emacs_cv_struct_timezone, | 2621 AC_CACHE_CHECK([for struct timezone], emacs_cv_struct_timezone, |
2361 [AC_TRY_COMPILE([#include <sys/time.h>], | 2622 [AC_TRY_COMPILE([#include <sys/time.h>], |
2362 [struct timezone tz;], | 2623 [struct timezone tz;], |
2396 dnl Fixme: Not used. Should this be HAVE_SOCKETS? | 2657 dnl Fixme: Not used. Should this be HAVE_SOCKETS? |
2397 AC_DEFINE(HAVE_INET_SOCKETS, 1, | 2658 AC_DEFINE(HAVE_INET_SOCKETS, 1, |
2398 [Define to 1 if you have inet sockets.]) | 2659 [Define to 1 if you have inet sockets.]) |
2399 fi | 2660 fi |
2400 | 2661 |
2662 AC_CHECK_HEADERS(sys/ioctl.h) | |
2663 | |
2401 if test -f /usr/lpp/X11/bin/smt.exp; then | 2664 if test -f /usr/lpp/X11/bin/smt.exp; then |
2402 AC_DEFINE(HAVE_AIX_SMT_EXP, 1, | 2665 AC_DEFINE(HAVE_AIX_SMT_EXP, 1, |
2403 [Define to 1 if the file /usr/lpp/X11/bin/smt.exp exists.]) | 2666 [Define to 1 if the file /usr/lpp/X11/bin/smt.exp exists.]) |
2404 fi | 2667 fi |
2405 | 2668 |
2424 AC_DEFINE(HAVE_LANGINFO_CODESET, 1, | 2687 AC_DEFINE(HAVE_LANGINFO_CODESET, 1, |
2425 [Define if you have <langinfo.h> and nl_langinfo(CODESET).]) | 2688 [Define if you have <langinfo.h> and nl_langinfo(CODESET).]) |
2426 fi | 2689 fi |
2427 | 2690 |
2428 AC_CHECK_TYPES(size_t) | 2691 AC_CHECK_TYPES(size_t) |
2692 | |
2693 AC_TYPE_MBSTATE_T | |
2429 | 2694 |
2430 dnl Restrict could probably be used effectively other than in regex.c. | 2695 dnl Restrict could probably be used effectively other than in regex.c. |
2431 AC_CACHE_CHECK([for C restrict keyword], emacs_cv_c_restrict, | 2696 AC_CACHE_CHECK([for C restrict keyword], emacs_cv_c_restrict, |
2432 [AC_TRY_COMPILE([void fred (int *restrict x);], [], | 2697 [AC_TRY_COMPILE([void fred (int *restrict x);], [], |
2433 emacs_cv_c_restrict=yes, | 2698 emacs_cv_c_restrict=yes, |
2452 AC_DEFINE(__restrict_arr, __restrict, | 2717 AC_DEFINE(__restrict_arr, __restrict, |
2453 [Define to compiler's equivalent of C99 restrict keyword in array | 2718 [Define to compiler's equivalent of C99 restrict keyword in array |
2454 declarations. Define as empty for no equivalent.]) | 2719 declarations. Define as empty for no equivalent.]) |
2455 fi | 2720 fi |
2456 | 2721 |
2457 AC_CHECK_HEADERS(nlist.h, [AC_DEFINE(NLIST_STRUCT, 1, | |
2458 [Define to 1 if you have <nlist.h>.])]) | |
2459 | |
2460 dnl Fixme: AC_SYS_POSIX_TERMIOS should probably be used, but it's not clear | 2722 dnl Fixme: AC_SYS_POSIX_TERMIOS should probably be used, but it's not clear |
2461 dnl how the tty code is related to POSIX and/or other versions of termios. | 2723 dnl how the tty code is related to POSIX and/or other versions of termios. |
2724 dnl The following looks like a useful start. | |
2725 dnl | |
2726 dnl AC_SYS_POSIX_TERMIOS | |
2727 dnl if test $ac_cv_sys_posix_termios = yes; then | |
2728 dnl AC_DEFINE(HAVE_TERMIOS, 1, [Define to 1 if you have POSIX-style functions | |
2729 dnl and macros for terminal control.]) | |
2730 dnl AC_DEFINE(HAVE_TCATTR, 1, [Define to 1 if you have tcgetattr and tcsetattr.]) | |
2731 dnl fi | |
2462 | 2732 |
2463 dnl Fixme: Use AC_FUNC_MEMCMP since memcmp is used. (Needs libobj replacement.) | 2733 dnl Fixme: Use AC_FUNC_MEMCMP since memcmp is used. (Needs libobj replacement.) |
2464 | 2734 |
2465 # Set up the CFLAGS for real compilation, so we can substitute it. | 2735 # Set up the CFLAGS for real compilation, so we can substitute it. |
2466 CFLAGS="$REAL_CFLAGS" | 2736 CFLAGS="$REAL_CFLAGS" |
2565 [Define REL_ALLOC if you want to use the relocating allocator for | 2835 [Define REL_ALLOC if you want to use the relocating allocator for |
2566 buffer space.]) | 2836 buffer space.]) |
2567 fi | 2837 fi |
2568 | 2838 |
2569 AH_TOP([/* GNU Emacs site configuration template file. | 2839 AH_TOP([/* GNU Emacs site configuration template file. |
2570 Copyright (C) 1988, 93, 94, 99, 2000, 2002 Free Software Foundation, Inc. | 2840 Copyright (C) 1988, 1993, 1994, 1999, 2000, 2002, 2004 |
2841 Free Software Foundation, Inc. | |
2571 | 2842 |
2572 This file is part of GNU Emacs. | 2843 This file is part of GNU Emacs. |
2573 | 2844 |
2574 GNU Emacs is free software; you can redistribute it and/or modify | 2845 GNU Emacs is free software; you can redistribute it and/or modify |
2575 it under the terms of the GNU General Public License as published by | 2846 it under the terms of the GNU General Public License as published by |
2581 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 2852 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2582 GNU General Public License for more details. | 2853 GNU General Public License for more details. |
2583 | 2854 |
2584 You should have received a copy of the GNU General Public License | 2855 You should have received a copy of the GNU General Public License |
2585 along with GNU Emacs; see the file COPYING. If not, write to the | 2856 along with GNU Emacs; see the file COPYING. If not, write to the |
2586 Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 2857 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
2587 Boston, MA 02111-1307, USA. */ | 2858 Boston, MA 02110-1301, USA. */ |
2588 | 2859 |
2589 | 2860 |
2590 /* No code in Emacs #includes config.h twice, but some bits of code | 2861 /* No code in Emacs #includes config.h twice, but some bits of code |
2591 intended to work with other packages as well (like gmalloc.c) | 2862 intended to work with other packages as well (like gmalloc.c) |
2592 think they can include it as many times as they like. */ | 2863 think they can include it as many times as they like. */ |
2623 /* Define AMPERSAND_FULL_NAME if you use the convention | 2894 /* Define AMPERSAND_FULL_NAME if you use the convention |
2624 that & in the full name stands for the login id. */ | 2895 that & in the full name stands for the login id. */ |
2625 /* Turned on June 1996 supposing nobody will mind it. */ | 2896 /* Turned on June 1996 supposing nobody will mind it. */ |
2626 #define AMPERSAND_FULL_NAME | 2897 #define AMPERSAND_FULL_NAME |
2627 | 2898 |
2899 /* We have blockinput.h. */ | |
2900 #define DO_BLOCK_INPUT | |
2901 | |
2628 /* Define HAVE_SOUND if we have sound support. We know it works | 2902 /* Define HAVE_SOUND if we have sound support. We know it works |
2629 and compiles only on the specified platforms. For others, | 2903 and compiles only on the specified platforms. For others, |
2630 it probably doesn't make sense to try. */ | 2904 it probably doesn't make sense to try. */ |
2631 | 2905 |
2632 #if defined __FreeBSD__ || defined __NetBSD__ || defined __linux__ | 2906 #if defined __FreeBSD__ || defined __NetBSD__ || defined __linux__ |
2643 | 2917 |
2644 /* If using GNU, then support inline function declarations. */ | 2918 /* If using GNU, then support inline function declarations. */ |
2645 /* Don't try to switch on inline handling as detected by AC_C_INLINE | 2919 /* Don't try to switch on inline handling as detected by AC_C_INLINE |
2646 generally, because even if non-gcc compilers accept `inline', they | 2920 generally, because even if non-gcc compilers accept `inline', they |
2647 may reject `extern inline'. */ | 2921 may reject `extern inline'. */ |
2648 #ifdef __GNUC__ | 2922 #if defined (__GNUC__) && defined (OPTIMIZE) |
2649 #define INLINE __inline__ | 2923 #define INLINE __inline__ |
2650 #else | 2924 #else |
2651 #define INLINE | 2925 #define INLINE |
2652 #endif | 2926 #endif |
2653 | 2927 |
2691 | 2965 |
2692 #ifdef emacs /* Don't do this for lib-src. */ | 2966 #ifdef emacs /* Don't do this for lib-src. */ |
2693 /* Tell regex.c to use a type compatible with Emacs. */ | 2967 /* Tell regex.c to use a type compatible with Emacs. */ |
2694 #define RE_TRANSLATE_TYPE Lisp_Object | 2968 #define RE_TRANSLATE_TYPE Lisp_Object |
2695 #define RE_TRANSLATE(TBL, C) CHAR_TABLE_TRANSLATE (TBL, C) | 2969 #define RE_TRANSLATE(TBL, C) CHAR_TABLE_TRANSLATE (TBL, C) |
2696 #define RE_TRANSLATE_P(TBL) (XFASTINT (TBL) != 0) | 2970 #ifdef make_number |
2971 /* If make_number is a macro, use it. */ | |
2972 #define RE_TRANSLATE_P(TBL) (!EQ (TBL, make_number (0))) | |
2973 #else | |
2974 /* If make_number is a function, avoid it. */ | |
2975 #define RE_TRANSLATE_P(TBL) (!(INTEGERP (TBL) && XINT (TBL) == 0)) | |
2976 #endif | |
2697 #endif | 2977 #endif |
2698 | 2978 |
2699 /* Avoid link-time collision with system mktime if we will use our own. */ | 2979 /* Avoid link-time collision with system mktime if we will use our own. */ |
2700 #if ! HAVE_MKTIME || BROKEN_MKTIME | 2980 #if ! HAVE_MKTIME || BROKEN_MKTIME |
2701 #define mktime emacs_mktime | 2981 #define mktime emacs_mktime |
2702 #endif | 2982 #endif |
2983 | |
2984 #define my_strftime nstrftime /* for strftime.c */ | |
2703 | 2985 |
2704 /* The rest of the code currently tests the CPP symbol BSTRING. | 2986 /* The rest of the code currently tests the CPP symbol BSTRING. |
2705 Override any claims made by the system-description files. | 2987 Override any claims made by the system-description files. |
2706 Note that on some SCO version it is possible to have bcopy and not bcmp. */ | 2988 Note that on some SCO version it is possible to have bcopy and not bcmp. */ |
2707 #undef BSTRING | 2989 #undef BSTRING |
2880 echo " Does Emacs use -ltiff? ${HAVE_TIFF}" | 3162 echo " Does Emacs use -ltiff? ${HAVE_TIFF}" |
2881 echo " Does Emacs use -lungif? ${HAVE_GIF}" | 3163 echo " Does Emacs use -lungif? ${HAVE_GIF}" |
2882 echo " Does Emacs use -lpng? ${HAVE_PNG}" | 3164 echo " Does Emacs use -lpng? ${HAVE_PNG}" |
2883 echo " Does Emacs use X toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}" | 3165 echo " Does Emacs use X toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}" |
2884 echo | 3166 echo |
3167 | |
3168 if test $USE_XASSERTS = yes; then | |
3169 echo " Compiling with asserts turned on." | |
3170 CPPFLAGS="$CPPFLAGS -DXASSERTS=1" | |
3171 echo | |
3172 fi | |
3173 | |
3174 | |
2885 | 3175 |
2886 # Remove any trailing slashes in these variables. | 3176 # Remove any trailing slashes in these variables. |
2887 [test "${prefix}" != NONE && | 3177 [test "${prefix}" != NONE && |
2888 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'` | 3178 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'` |
2889 test "${exec_prefix}" != NONE && | 3179 test "${exec_prefix}" != NONE && |
2973 # This is how we know whether to re-run configure in certain cases. | 3263 # This is how we know whether to re-run configure in certain cases. |
2974 touch src/config.stamp | 3264 touch src/config.stamp |
2975 | 3265 |
2976 ], [GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPP_NEED_TRADITIONAL="$CPP_NEED_TRADITIONAL" CPPFLAGS="$CPPFLAGS"]) | 3266 ], [GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPP_NEED_TRADITIONAL="$CPP_NEED_TRADITIONAL" CPPFLAGS="$CPPFLAGS"]) |
2977 | 3267 |
3268 m4_if(dnl Do not change this comment | |
3269 arch-tag: 156a4dd5-bddc-4d18-96ac-f37742cf6a5e | |
3270 )dnl |