Commit | Line | Data |
---|---|---|
6e502e37 | 1 | dnl Autoconf script for GNU Emacs |
9ec10b2f DM |
2 | dnl To rebuild the `configure' script from this, execute the command |
3 | dnl autoconf | |
4 | dnl in the directory containing this script. | |
6e502e37 | 5 | dnl |
612f72a6 | 6 | dnl Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002 |
ad4ac636 | 7 | dnl Free Software Foundation, Inc. |
552dfe31 | 8 | dnl |
6e502e37 | 9 | dnl This file is part of GNU Emacs. |
552dfe31 | 10 | dnl |
6e502e37 RS |
11 | dnl GNU Emacs is free software; you can redistribute it and/or modify |
12 | dnl it under the terms of the GNU General Public License as published by | |
13 | dnl the Free Software Foundation; either version 2, or (at your option) | |
14 | dnl any later version. | |
552dfe31 | 15 | dnl |
6e502e37 RS |
16 | dnl GNU Emacs is distributed in the hope that it will be useful, |
17 | dnl but WITHOUT ANY WARRANTY; without even the implied warranty of | |
18 | dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
19 | dnl GNU General Public License for more details. | |
20 | dnl | |
21 | dnl You should have received a copy of the GNU General Public License | |
1fb87c77 KH |
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, | |
24 | dnl Boston, MA 02111-1307, USA. | |
6e502e37 | 25 | |
5e384f3d | 26 | AC_PREREQ(2.53)dnl |
9ec10b2f | 27 | AC_INIT(src/lisp.h) |
5f8c8f00 | 28 | AC_CONFIG_HEADER(src/config.h:src/config.in) |
9ec10b2f | 29 | |
a4663fed PJ |
30 | dnl Support for --program-prefix, --program-suffix and |
31 | dnl --program-transform-name options | |
32 | AC_ARG_PROGRAM | |
33 | ||
9ec10b2f | 34 | lispdir='${datadir}/emacs/${version}/lisp' |
4be21f66 | 35 | locallisppath='${datadir}/emacs/${version}/site-lisp:'\ |
684f4cb3 | 36 | '${datadir}/emacs/site-lisp:${datadir}/emacs/${version}/leim' |
9ec10b2f DM |
37 | lisppath='${locallisppath}:${lispdir}' |
38 | etcdir='${datadir}/emacs/${version}/etc' | |
60c3568d | 39 | archlibdir='${libexecdir}/emacs/${version}/${configuration}' |
9ec10b2f DM |
40 | docdir='${datadir}/emacs/${version}/etc' |
41 | ||
39a7c455 | 42 | AC_ARG_WITH(gcc, |
6fa064b6 | 43 | [ --without-gcc don't use GCC to compile Emacs if GCC is found]) |
4f734bde | 44 | AC_ARG_WITH(pop, |
6fa064b6 DL |
45 | [ --without-pop don't support POP mail retrieval with movemail], |
46 | [if test "$withval" = yes; then | |
47 | AC_DEFINE(MAIL_USE_POP) | |
48 | else : | |
3d9fec71 DL |
49 | fi], |
50 | AC_DEFINE(MAIL_USE_POP)) | |
5e384f3d | 51 | AH_TEMPLATE(MAIL_USE_POP, [Define to support POP mail retrieval.])dnl |
a21616bd KR |
52 | AC_ARG_WITH(kerberos, |
53 | [ --with-kerberos support Kerberos-authenticated POP], | |
54 | [AC_DEFINE(KERBEROS)]) | |
5e384f3d DL |
55 | AH_TEMPLATE(KERBEROS, |
56 | [Define to support Kerberos-authenticated POP mail retrieval.])dnl | |
a21616bd | 57 | AC_ARG_WITH(kerberos5, |
4d6e16b3 | 58 | [ --with-kerberos5 support Kerberos version 5 authenticated POP], |
a21616bd KR |
59 | [if test "${with_kerberos5+set}" = set; then |
60 | if test "${with_kerberos+set}" != set; then | |
61 | with_kerberos=yes | |
62 | AC_DEFINE(KERBEROS) | |
63 | fi | |
64 | fi | |
5e384f3d | 65 | AC_DEFINE(KERBEROS5, 1, [Define to use Kerberos 5 instead of Kerberos 4.])]) |
4f734bde DM |
66 | AC_ARG_WITH(hesiod, |
67 | [ --with-hesiod support Hesiod to get the POP server host], | |
5e384f3d DL |
68 | [AC_DEFINE(HESIOD, 1, [Define to support using a Hesiod database to find the POP server.])]) |
69 | ||
4f734bde DM |
70 | dnl This should be the last --with option, because --with-x is |
71 | dnl added later on when we find the path of X, and it's best to | |
72 | dnl keep them together visually. | |
9ec10b2f | 73 | AC_ARG_WITH(x-toolkit, |
f7894e88 | 74 | [ --with-x-toolkit=KIT use an X toolkit (KIT = yes/lucid/athena/motif/no)], |
9ec10b2f DM |
75 | [ case "${withval}" in |
76 | y | ye | yes ) val=athena ;; | |
77 | n | no ) val=no ;; | |
78 | l | lu | luc | luci | lucid ) val=lucid ;; | |
84c5c823 | 79 | a | at | ath | athe | athen | athena ) val=athena ;; |
3cd69289 | 80 | m | mo | mot | moti | motif ) val=motif ;; |
2e71ec17 | 81 | dnl These don't currently work. |
2e71ec17 DM |
82 | dnl o | op | ope | open | open- | open-l | open-lo \ |
83 | dnl | open-loo | open-look ) val=open-look ;; | |
9ec10b2f | 84 | * ) |
2e71ec17 DM |
85 | dnl AC_MSG_ERROR([the \`--with-x-toolkit' option is supposed to have a value |
86 | dnl which is \`yes', \`no', \`lucid', \`athena', \`motif' or \`open-look'.]) | |
90b777c5 RS |
87 | AC_MSG_ERROR([\`--with-x-toolkit=$withval' is invalid\; |
88 | this option's value should be \`yes', \`no', \`lucid', \`athena', or \`motif'. | |
9ec10b2f DM |
89 | Currently, \`yes', \`athena' and \`lucid' are synonyms.]) |
90 | ;; | |
91 | esac | |
92 | with_x_toolkit=$val | |
93 | ]) | |
b412189c GM |
94 | AC_ARG_WITH(xpm, |
95 | [ --with-xpm use -lXpm for displaying XPM images]) | |
96 | AC_ARG_WITH(jpeg, | |
97 | [ --with-jpeg use -ljpeg for displaying JPEG images]) | |
98 | AC_ARG_WITH(tiff, | |
495ccc04 | 99 | [ --with-tiff use -ltiff for displaying TIFF images]) |
b412189c GM |
100 | AC_ARG_WITH(gif, |
101 | [ --with-gif use -lungif for displaying GIF images]) | |
102 | AC_ARG_WITH(png, | |
103 | [ --with-png use -lpng for displaying PNG images]) | |
20c1822e | 104 | AC_ARG_WITH(toolkit-scroll-bars, |
4d6e16b3 | 105 | [ --without-toolkit-scroll-bars |
1c7a4f72 | 106 | don't use Motif or Xaw3d scroll bars]) |
c6f7dae8 | 107 | AC_ARG_WITH(xim, |
1c7a4f72 | 108 | [ --without-xim don't use X11 XIM]) |
9ec10b2f DM |
109 | |
110 | #### Make srcdir absolute, if it isn't already. It's important to | |
36969de6 | 111 | #### avoid running the path through pwd unnecessarily, since pwd can |
069df4bf DM |
112 | #### give you automounter prefixes, which can go away. We do all this |
113 | #### so Emacs can find its files when run uninstalled. | |
36969de6 GM |
114 | ## Make sure CDPATH doesn't affect cd (in case PWD is relative). |
115 | unset CDPATH | |
9ec10b2f DM |
116 | case "${srcdir}" in |
117 | /* ) ;; | |
118 | . ) | |
119 | ## We may be able to use the $PWD environment variable to make this | |
120 | ## absolute. But sometimes PWD is inaccurate. | |
b83e4a77 RS |
121 | ## Note: we used to use ${PWD} at the end instead of `pwd`, |
122 | ## but that tested only for a well-formed and valid PWD, | |
123 | ## it did not object when PWD was well-formed and valid but just wrong. | |
124 | if test ".${PWD}" != "." && test ".`(cd ${PWD} ; sh -c pwd)`" = ".`pwd`" ; | |
9ec10b2f DM |
125 | then |
126 | srcdir="$PWD" | |
127 | else | |
128 | srcdir="`(cd ${srcdir}; pwd)`" | |
129 | fi | |
130 | ;; | |
131 | * ) srcdir="`(cd ${srcdir}; pwd)`" ;; | |
132 | esac | |
133 | ||
134 | #### Check if the source directory already has a configured system in it. | |
135 | if test `pwd` != `(cd ${srcdir} && pwd)` \ | |
136 | && test -f "${srcdir}/src/config.h" ; then | |
137 | AC_MSG_WARN([The directory tree \`${srcdir}' is being used | |
138 | as a build directory right now; it has been configured in its own | |
139 | right. To configure in another directory as well, you MUST | |
140 | use GNU make. If you do not have GNU make, then you must | |
141 | now do \`make distclean' in ${srcdir}, | |
142 | and then run $0 again.]) | |
143 | ||
2d73167a | 144 | changequote(, )dnl |
9ec10b2f | 145 | extrasub='/^VPATH[ ]*=/c\ |
2d73167a | 146 | changequote([, ])dnl |
9ec10b2f DM |
147 | vpath %.c $(srcdir)\ |
148 | vpath %.h $(srcdir)\ | |
149 | vpath %.y $(srcdir)\ | |
150 | vpath %.l $(srcdir)\ | |
151 | vpath %.s $(srcdir)\ | |
5ac83f86 RS |
152 | vpath %.in $(srcdir)\ |
153 | vpath %.texi $(srcdir)' | |
9ec10b2f DM |
154 | fi |
155 | ||
156 | #### Given the configuration name, set machfile and opsysfile to the | |
157 | #### names of the m/*.h and s/*.h files we should use. | |
158 | ||
159 | ### Canonicalize the configuration name. | |
160 | ||
161 | AC_CANONICAL_HOST | |
162 | canonical=$host | |
fcb04b6e | 163 | configuration=${host_alias-$host} |
9ec10b2f DM |
164 | |
165 | changequote(, )dnl | |
166 | ||
167 | ### If you add support for a new configuration, add code to this | |
168 | ### switch statement to recognize your configuration name and select | |
169 | ### the appropriate operating system and machine description files. | |
170 | ||
171 | ### You would hope that you could choose an m/*.h file pretty much | |
172 | ### based on the machine portion of the configuration name, and an s- | |
173 | ### file based on the operating system portion. However, it turns out | |
174 | ### that each m/*.h file is pretty manufacturer-specific - for | |
175 | ### example, apollo.h, hp9000s300.h, mega68k, news.h, and tad68k are | |
176 | ### all 68000 machines; mips.h, pmax.h, and news-risc are all MIPS | |
177 | ### machines. So we basically have to have a special case for each | |
178 | ### configuration name. | |
179 | ### | |
180 | ### As far as handling version numbers on operating systems is | |
181 | ### concerned, make sure things will fail in a fixable way. If | |
182 | ### /etc/MACHINES doesn't say anything about version numbers, be | |
183 | ### prepared to handle anything reasonably. If version numbers | |
184 | ### matter, be sure /etc/MACHINES says something about it. | |
185 | ### | |
186 | ### Eric Raymond says we should accept strings like "sysvr4" to mean | |
187 | ### "System V Release 4"; he writes, "The old convention encouraged | |
188 | ### confusion between `system' and `release' levels'." | |
189 | ||
190 | machine='' opsys='' unported=no | |
191 | case "${canonical}" in | |
192 | ||
ba45dae0 GM |
193 | ## FreeBSD ports |
194 | *-*-freebsd* ) | |
195 | opsys=freebsd | |
196 | case "${canonical}" in | |
197 | alpha*-*-freebsd*) machine=alpha ;; | |
198 | i[3456]86-*-freebsd*) machine=intel386 ;; | |
199 | esac | |
200 | ;; | |
201 | ||
9ec10b2f DM |
202 | ## NetBSD ports |
203 | *-*-netbsd* ) | |
204 | opsys=netbsd | |
205 | case "${canonical}" in | |
98bbf2a1 | 206 | alpha*-*-netbsd*) machine=alpha ;; |
5ac83f86 | 207 | i[3456]86-*-netbsd*) machine=intel386 ;; |
9ec10b2f DM |
208 | m68k-*-netbsd*) |
209 | # This is somewhat bogus. | |
210 | machine=hp9000s300 ;; | |
ca568b47 | 211 | powerpc-apple-netbsd*) machine=macppc ;; |
9ec10b2f | 212 | mips-*-netbsd*) machine=pmax ;; |
69d5a2fa | 213 | mipsel-*-netbsd*) machine=pmax ;; |
9ec10b2f | 214 | ns32k-*-netbsd*) machine=ns32000 ;; |
b52425f4 | 215 | powerpc-*-netbsd*) machine=macppc ;; |
1ecefa7a | 216 | sparc*-*-netbsd*) machine=sparc ;; |
b336ddd3 | 217 | vax-*-netbsd*) machine=vax ;; |
69d5a2fa | 218 | arm-*-netbsd*) machine=arm ;; |
9ec10b2f DM |
219 | esac |
220 | ;; | |
221 | ||
e3ac1b7f RS |
222 | ## OpenBSD ports |
223 | *-*-openbsd* ) | |
224 | opsys=openbsd | |
225 | case "${canonical}" in | |
98bbf2a1 | 226 | alpha*-*-openbsd*) machine=alpha ;; |
e3ac1b7f | 227 | i386-*-openbsd*) machine=intel386 ;; |
6239880d RS |
228 | m68k-*-openbsd*) machine=hp9000s300 ;; |
229 | mipsel-*-openbsd*) machine=pmax ;; | |
e3ac1b7f RS |
230 | ns32k-*-openbsd*) machine=ns32000 ;; |
231 | sparc-*-openbsd*) machine=sparc ;; | |
ca568b47 | 232 | vax-*-openbsd*) machine=vax ;; |
e3ac1b7f RS |
233 | esac |
234 | ;; | |
235 | ||
3cd69289 DM |
236 | ## Acorn RISCiX: |
237 | arm-acorn-riscix1.1* ) | |
238 | machine=acorn opsys=riscix1-1 | |
239 | ;; | |
240 | arm-acorn-riscix1.2* | arm-acorn-riscix ) | |
aac2257c RS |
241 | ## This name is riscix12 instead of riscix1.2 |
242 | ## to avoid a file name conflict on MSDOS. | |
243 | machine=acorn opsys=riscix12 | |
3cd69289 DM |
244 | ;; |
245 | ||
2c4f7ce7 RS |
246 | ## BSDI ports |
247 | *-*-bsdi* ) | |
248 | opsys=bsdi | |
249 | case "${canonical}" in | |
250 | i[345]86-*-bsdi*) machine=intel386 ;; | |
251 | sparc-*-bsdi*) machine=sparc ;; | |
393032d2 | 252 | powerpc-*-bsdi*) machine=macppc ;; |
2c4f7ce7 RS |
253 | esac |
254 | case "${canonical}" in | |
255 | *-*-bsd386* | *-*-bsdi1* ) opsys=bsd386 ;; | |
256 | *-*-bsdi2.0* ) opsys=bsdos2 ;; | |
257 | *-*-bsdi2* ) opsys=bsdos2-1 ;; | |
258 | *-*-bsdi3* ) opsys=bsdos3 ;; | |
1d06fc82 | 259 | *-*-bsdi[45]* ) opsys=bsdos4 ;; |
2c4f7ce7 RS |
260 | esac |
261 | ;; | |
262 | ||
9ec10b2f DM |
263 | ## Alliant machines |
264 | ## Strictly speaking, we need the version of the alliant operating | |
265 | ## system to choose the right machine file, but currently the | |
266 | ## configuration name doesn't tell us enough to choose the right | |
267 | ## one; we need to give alliants their own operating system name to | |
268 | ## do this right. When someone cares, they can help us. | |
269 | fx80-alliant-* ) | |
270 | machine=alliant4 opsys=bsd4-2 | |
271 | ;; | |
272 | i860-alliant-* ) | |
273 | machine=alliant-2800 opsys=bsd4-3 | |
274 | ;; | |
275 | ||
30457b4f | 276 | ## Alpha (DEC) machines. |
98bbf2a1 | 277 | alpha*-dec-osf* ) |
3cd69289 | 278 | machine=alpha opsys=osf1 |
f528522b | 279 | # This is needed to find X11R6.1 libraries for certain tests. |
1bc5a004 RS |
280 | NON_GCC_LINK_TEST_OPTIONS=-Wl,-rpath,/usr/X11R6/lib |
281 | GCC_LINK_TEST_OPTIONS=-Wl,-rpath,/usr/X11R6/lib | |
557dcfd7 DL |
282 | # NON_GNU_CPP is necessary on 5.0 to avoid mangling src/Makefile |
283 | # due to non-traditional preprocessing with the current compiler | |
284 | # defaults. OSF 4 can also have that compiler version, and there | |
285 | # seems always to have been a usable /usr/bin/cpp. | |
286 | NON_GNU_CPP=/usr/bin/cpp | |
71c72a72 | 287 | case "${canonical}" in |
d5c898bb | 288 | alpha*-dec-osf[5-9]*) |
f8340326 | 289 | opsys=osf5-0 ;; |
e57196a0 | 290 | esac |
3cd69289 DM |
291 | ;; |
292 | ||
98bbf2a1 | 293 | alpha*-*-linux-gnu* ) |
5ac83f86 | 294 | machine=alpha opsys=gnu-linux |
4e90a7d5 RS |
295 | ;; |
296 | ||
d506e713 GM |
297 | arm*-*-linux-gnu* ) |
298 | machine=arm opsys=gnu-linux | |
299 | ;; | |
300 | ||
301 | ppc-*-linux | \ | |
302 | powerpc-*-linux* ) | |
393032d2 | 303 | machine=macppc opsys=gnu-linux |
d506e713 GM |
304 | ;; |
305 | ||
9ec10b2f DM |
306 | ## Altos 3068 |
307 | m68*-altos-sysv* ) | |
308 | machine=altos opsys=usg5-2 | |
309 | ;; | |
c7f493fd | 310 | |
9ec10b2f DM |
311 | ## Amdahl UTS |
312 | 580-amdahl-sysv* ) | |
313 | machine=amdahl opsys=usg5-2-2 | |
314 | ;; | |
315 | ||
acd04c87 RS |
316 | ## Apollo, Domain/OS |
317 | m68*-apollo-* ) | |
318 | machine=apollo opsys=bsd4-3 | |
9ec10b2f DM |
319 | ;; |
320 | ||
321 | ## AT&T 3b2, 3b5, 3b15, 3b20 | |
322 | we32k-att-sysv* ) | |
323 | machine=att3b opsys=usg5-2-2 | |
324 | ;; | |
325 | ||
326 | ## AT&T 3b1 - The Mighty Unix PC! | |
327 | m68*-att-sysv* ) | |
328 | machine=7300 opsys=usg5-2-2 | |
329 | ;; | |
330 | ||
331 | ## Bull dpx20 | |
332 | rs6000-bull-bosx* ) | |
333 | machine=ibmrs6000 opsys=aix3-2 | |
334 | ;; | |
335 | ||
336 | ## Bull dpx2 | |
337 | m68*-bull-sysv3* ) | |
338 | machine=dpx2 opsys=usg5-3 | |
339 | ;; | |
340 | ||
341 | ## Bull sps7 | |
342 | m68*-bull-sysv2* ) | |
343 | machine=sps7 opsys=usg5-2 | |
344 | ;; | |
345 | ||
346 | ## CCI 5/32, 6/32 -- see "Tahoe". | |
347 | ||
348 | ## Celerity | |
349 | ## I don't know what configuration name to use for this; config.sub | |
350 | ## doesn't seem to know anything about it. Hey, Celerity users, get | |
351 | ## in touch with us! | |
352 | celerity-celerity-bsd* ) | |
353 | machine=celerity opsys=bsd4-2 | |
354 | ;; | |
355 | ||
356 | ## Clipper | |
357 | ## What operating systems does this chip run that Emacs has been | |
358 | ## tested on? | |
359 | clipper-* ) | |
360 | machine=clipper | |
361 | ## We'll use the catch-all code at the bottom to guess the | |
362 | ## operating system. | |
363 | ;; | |
364 | ||
b83e4a77 RS |
365 | ## Compaq Nonstop |
366 | mips-compaq-nonstopux* ) | |
367 | machine=nonstopux opsys=nonstopux | |
368 | ;; | |
369 | ||
9ec10b2f DM |
370 | ## Convex |
371 | *-convex-bsd* | *-convex-convexos* ) | |
372 | machine=convex opsys=bsd4-3 | |
908ff139 | 373 | ## Prevents spurious white space in makefiles - d.m.cooke@larc.nasa.gov |
9ec10b2f DM |
374 | NON_GNU_CPP="cc -E -P" |
375 | ;; | |
376 | ||
377 | ## Cubix QBx/386 | |
5ac83f86 | 378 | i[3456]86-cubix-sysv* ) |
9ec10b2f DM |
379 | machine=intel386 opsys=usg5-3 |
380 | ;; | |
381 | ||
382 | ## Cydra 5 | |
383 | cydra*-cydrome-sysv* ) | |
384 | machine=cydra5 opsys=usg5-3 | |
385 | ;; | |
386 | ||
387 | ## Data General AViiON Machines | |
651fc2d2 RS |
388 | ## DG changed naming conventions with the release of 5.4.4.10, they |
389 | ## dropped the initial 5.4 but left the intervening R. Because of the | |
390 | ## R this shouldn't conflict with older versions of the OS (which I | |
f4afda69 KH |
391 | ## think were named like dgux4.*). In addition, DG new AViiONs series |
392 | ## uses either Motorola M88k or Intel Pentium CPUs. | |
9ae70ffe | 393 | m88k-dg-dguxR4.* | m88k-dg-dgux4* ) |
651fc2d2 RS |
394 | machine=aviion opsys=dgux4 |
395 | ;; | |
9ec10b2f | 396 | m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* ) |
aac2257c RS |
397 | ## This name is dgux5-4-3 instead of dgux5-4r3 |
398 | ## to avoid a file name conflict on MSDOS. | |
399 | machine=aviion opsys=dgux5-4-3 | |
9ec10b2f DM |
400 | ;; |
401 | m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* ) | |
402 | machine=aviion opsys=dgux5-4r2 | |
403 | ;; | |
404 | m88k-dg-dgux* ) | |
405 | machine=aviion opsys=dgux | |
406 | ;; | |
407 | ||
4e746fa8 KH |
408 | ## Data General AViiON Intel (x86) Machines |
409 | ## Exists from 5.4.3 (current i586-dg-dguxR4.11) | |
410 | ## Ehud Karni, 1998-may-30, ehud@unix.simonwiesel.co.il | |
9ae70ffe | 411 | i[345]86-dg-dguxR4* ) |
4e746fa8 KH |
412 | machine=aviion-intel opsys=dgux4 |
413 | ;; | |
414 | ||
9ec10b2f DM |
415 | ## DECstations |
416 | mips-dec-ultrix[0-3].* | mips-dec-ultrix4.0* | mips-dec-bsd4.2* ) | |
417 | machine=pmax opsys=bsd4-2 | |
418 | ;; | |
3bbe016c | 419 | mips-dec-ultrix4.[12]* | mips-dec-bsd* ) |
9ec10b2f DM |
420 | machine=pmax opsys=bsd4-3 |
421 | ;; | |
3bbe016c KH |
422 | mips-dec-ultrix* ) |
423 | machine=pmax opsys=ultrix4-3 | |
424 | ;; | |
9ec10b2f DM |
425 | mips-dec-osf* ) |
426 | machine=pmax opsys=osf1 | |
427 | ;; | |
b95c8e7e RS |
428 | mips-dec-mach_bsd4.3* ) |
429 | machine=pmax opsys=mach-bsd4-3 | |
430 | ;; | |
9ec10b2f DM |
431 | |
432 | ## Motorola Delta machines | |
433 | m68k-motorola-sysv* | m68000-motorola-sysv* ) | |
434 | machine=delta opsys=usg5-3 | |
435 | if test -z "`type gnucc | grep 'not found'`" | |
018427ee RS |
436 | then |
437 | if test -s /etc/167config | |
438 | then CC="gnucc -m68040" | |
439 | else CC="gnucc -m68881" | |
c7f493fd | 440 | fi |
9ec10b2f DM |
441 | else |
442 | if test -z "`type gcc | grep 'not found'`" | |
443 | then CC=gcc | |
444 | else CC=cc | |
445 | fi | |
446 | fi | |
447 | ;; | |
448 | m88k-motorola-sysv4* ) | |
63c1d3f2 RS |
449 | # jbotte@bnr.ca says that UNIX_System_V <hostName> 4.0 R40V4.3 m88k mc88110 |
450 | # needs POSIX_SIGNALS and therefore needs usg5-4-2. | |
451 | # I hope there are not other 4.0 versions for this machine | |
452 | # which really need usg5-4 instead. | |
453 | machine=delta88k opsys=usg5-4-2 | |
9ec10b2f DM |
454 | ;; |
455 | m88k-motorola-sysv* | m88k-motorola-m88kbcs* ) | |
456 | machine=delta88k opsys=usg5-3 | |
457 | ;; | |
458 | ||
459 | ## Dual machines | |
460 | m68*-dual-sysv* ) | |
461 | machine=dual opsys=usg5-2 | |
462 | ;; | |
463 | m68*-dual-uniplus* ) | |
464 | machine=dual opsys=unipl5-2 | |
465 | ;; | |
466 | ||
467 | ## Elxsi 6400 | |
468 | elxsi-elxsi-sysv* ) | |
469 | machine=elxsi opsys=usg5-2 | |
470 | ;; | |
471 | ||
472 | ## Encore machines | |
473 | ns16k-encore-bsd* ) | |
474 | machine=ns16000 opsys=umax | |
475 | ;; | |
476 | ||
2ce723a5 DL |
477 | ## The GEC 63 - apparently, this port isn't really finished yet. |
478 | # I'm sure we finished off the last of the machines, though. -- fx | |
9ec10b2f DM |
479 | |
480 | ## Gould Power Node and NP1 | |
481 | pn-gould-bsd4.2* ) | |
482 | machine=gould opsys=bsd4-2 | |
483 | ;; | |
484 | pn-gould-bsd4.3* ) | |
485 | machine=gould opsys=bsd4-3 | |
486 | ;; | |
487 | np1-gould-bsd* ) | |
488 | machine=gould-np1 opsys=bsd4-3 | |
489 | ;; | |
490 | ||
491 | ## Harris Night Hawk machines running CX/UX (a 5000 looks just like a 4000 | |
492 | ## as far as Emacs is concerned). | |
493 | m88k-harris-cxux* ) | |
494 | # Build needs to be different on 7.0 and later releases | |
495 | case "`uname -r`" in | |
496 | [56].[0-9] ) machine=nh4000 opsys=cxux ;; | |
497 | [7].[0-9] ) machine=nh4000 opsys=cxux7 ;; | |
498 | esac | |
3d68df05 | 499 | NON_GNU_CPP="/lib/cpp" |
9ec10b2f DM |
500 | ;; |
501 | ## Harris ecx or gcx running CX/UX (Series 1200, Series 3000) | |
502 | m68k-harris-cxux* ) | |
503 | machine=nh3000 opsys=cxux | |
504 | ;; | |
3d68df05 KH |
505 | ## Harris power pc NightHawk running Power UNIX (Series 6000) |
506 | powerpc-harris-powerunix ) | |
507 | machine=nh6000 opsys=powerunix | |
508 | NON_GNU_CPP="cc -Xo -E -P" | |
509 | ;; | |
0e5f305e RS |
510 | ## SR2001/SR2201 running HI-UX/MPP |
511 | hppa1.1-hitachi-hiuxmpp* ) | |
512 | machine=sr2k opsys=hiuxmpp | |
513 | ;; | |
2d0bcbcc EZ |
514 | hppa1.1-hitachi-hiuxwe2* ) |
515 | machine=sr2k opsys=hiuxwe2 | |
516 | ;; | |
9ec10b2f DM |
517 | ## Honeywell XPS100 |
518 | xps*-honeywell-sysv* ) | |
519 | machine=xps100 opsys=usg5-2 | |
520 | ;; | |
521 | ||
522 | ## HP 9000 series 200 or 300 | |
523 | m68*-hp-bsd* ) | |
524 | machine=hp9000s300 opsys=bsd4-3 | |
525 | ;; | |
42c3a7f7 | 526 | ## HP/UX 7, 8, 9, and 10 are supported on these machines. |
9ec10b2f DM |
527 | m68*-hp-hpux* ) |
528 | case "`uname -r`" in | |
529 | ## Someone's system reports A.B8.05 for this. | |
530 | ## I wonder what other possibilities there are. | |
531 | *.B8.* ) machine=hp9000s300 opsys=hpux8 ;; | |
532 | *.08.* ) machine=hp9000s300 opsys=hpux8 ;; | |
533 | *.09.* ) machine=hp9000s300 opsys=hpux9 ;; | |
88a806e9 | 534 | *.1[0-9].* ) machine=hp9000s300 opsys=hpux9shr ;; |
9ec10b2f DM |
535 | *) machine=hp9000s300 opsys=hpux ;; |
536 | esac | |
537 | ;; | |
538 | ||
539 | ## HP 9000 series 700 and 800, running HP/UX | |
540 | hppa*-hp-hpux7* ) | |
541 | machine=hp800 opsys=hpux | |
542 | ;; | |
543 | hppa*-hp-hpux8* ) | |
544 | machine=hp800 opsys=hpux8 | |
545 | ;; | |
546 | hppa*-hp-hpux9shr* ) | |
547 | machine=hp800 opsys=hpux9shr | |
548 | ;; | |
549 | hppa*-hp-hpux9* ) | |
550 | machine=hp800 opsys=hpux9 | |
551 | ;; | |
4f4d6b17 | 552 | hppa*-hp-hpux10* ) |
12760c02 | 553 | machine=hp800 opsys=hpux10 |
42c3a7f7 | 554 | ;; |
4f4d6b17 EZ |
555 | hppa*-hp-hpux1[1-9]* ) |
556 | machine=hp800 opsys=hpux11 | |
557 | ;; | |
9ec10b2f | 558 | |
6fa6525f RS |
559 | hppa*-*-linux-gnu* ) |
560 | machine=hp800 opsys=gnu-linux | |
561 | ;; | |
562 | ||
9ec10b2f DM |
563 | ## HP 9000 series 700 and 800, running HP/UX |
564 | hppa*-hp-hpux* ) | |
565 | ## Cross-compilation? Nah! | |
566 | case "`uname -r`" in | |
567 | ## Someone's system reports A.B8.05 for this. | |
568 | ## I wonder what other possibilities there are. | |
569 | *.B8.* ) machine=hp800 opsys=hpux8 ;; | |
570 | *.08.* ) machine=hp800 opsys=hpux8 ;; | |
571 | *.09.* ) machine=hp800 opsys=hpux9 ;; | |
842f8692 | 572 | *) machine=hp800 opsys=hpux10 ;; |
9ec10b2f DM |
573 | esac |
574 | ;; | |
da945421 | 575 | hppa*-*-nextstep* ) |
4be21f66 KH |
576 | machine=hp800 opsys=nextstep |
577 | ;; | |
9ec10b2f DM |
578 | |
579 | ## Orion machines | |
580 | orion-orion-bsd* ) | |
581 | machine=orion opsys=bsd4-2 | |
582 | ;; | |
583 | clipper-orion-bsd* ) | |
584 | machine=orion105 opsys=bsd4-2 | |
585 | ;; | |
586 | ||
587 | ## IBM machines | |
5ac83f86 | 588 | i[3456]86-ibm-aix1.1* ) |
9ec10b2f DM |
589 | machine=ibmps2-aix opsys=usg5-2-2 |
590 | ;; | |
5ac83f86 | 591 | i[3456]86-ibm-aix1.[23]* | i[3456]86-ibm-aix* ) |
9ec10b2f DM |
592 | machine=ibmps2-aix opsys=usg5-3 |
593 | ;; | |
594 | i370-ibm-aix*) | |
595 | machine=ibm370aix opsys=usg5-3 | |
596 | ;; | |
f4c2acb3 EZ |
597 | s390-*-linux-gnu) |
598 | machine=ibms390 opsys=gnu-linux | |
599 | ;; | |
046545ec | 600 | rs6000-ibm-aix3.1* | powerpc-ibm-aix3.1* ) |
9ec10b2f DM |
601 | machine=ibmrs6000 opsys=aix3-1 |
602 | ;; | |
046545ec | 603 | rs6000-ibm-aix3.2.5 | powerpc-ibm-aix3.2.5 ) |
9ec10b2f DM |
604 | machine=ibmrs6000 opsys=aix3-2-5 |
605 | ;; | |
b63df577 RS |
606 | rs6000-ibm-aix4.1* | powerpc-ibm-aix4.1* ) |
607 | machine=ibmrs6000 opsys=aix4-1 | |
608 | ;; | |
a8958813 RS |
609 | rs6000-ibm-aix4.2* | powerpc-ibm-aix4.2* ) |
610 | machine=ibmrs6000 opsys=aix4-2 | |
611 | ;; | |
612 | rs6000-ibm-aix4.0* | powerpc-ibm-aix4.0* ) | |
b63df577 RS |
613 | machine=ibmrs6000 opsys=aix4 |
614 | ;; | |
a8958813 RS |
615 | rs6000-ibm-aix4* | powerpc-ibm-aix4* ) |
616 | machine=ibmrs6000 opsys=aix4-1 | |
617 | ;; | |
046545ec | 618 | rs6000-ibm-aix* | powerpc-ibm-aix* ) |
9ec10b2f DM |
619 | machine=ibmrs6000 opsys=aix3-2 |
620 | ;; | |
621 | romp-ibm-bsd4.3* ) | |
622 | machine=ibmrt opsys=bsd4-3 | |
c7f493fd | 623 | ;; |
9ec10b2f DM |
624 | romp-ibm-bsd4.2* ) |
625 | machine=ibmrt opsys=bsd4-2 | |
626 | ;; | |
627 | romp-ibm-aos4.3* ) | |
628 | machine=ibmrt opsys=bsd4-3 | |
c7f493fd | 629 | ;; |
9ec10b2f DM |
630 | romp-ibm-aos4.2* ) |
631 | machine=ibmrt opsys=bsd4-2 | |
632 | ;; | |
633 | romp-ibm-aos* ) | |
634 | machine=ibmrt opsys=bsd4-3 | |
635 | ;; | |
636 | romp-ibm-bsd* ) | |
637 | machine=ibmrt opsys=bsd4-3 | |
638 | ;; | |
639 | romp-ibm-aix* ) | |
640 | machine=ibmrt-aix opsys=usg5-2-2 | |
641 | ;; | |
642 | ||
643 | ## Integrated Solutions `Optimum V' | |
644 | m68*-isi-bsd4.2* ) | |
645 | machine=isi-ov opsys=bsd4-2 | |
646 | ;; | |
647 | m68*-isi-bsd4.3* ) | |
648 | machine=isi-ov opsys=bsd4-3 | |
649 | ;; | |
650 | ||
651 | ## Intel 386 machines where we do care about the manufacturer | |
5ac83f86 | 652 | i[3456]86-intsys-sysv* ) |
9ec10b2f DM |
653 | machine=is386 opsys=usg5-2-2 |
654 | ;; | |
655 | ||
656 | ## Prime EXL | |
5ac83f86 | 657 | i[3456]86-prime-sysv* ) |
9ec10b2f DM |
658 | machine=i386 opsys=usg5-3 |
659 | ;; | |
660 | ||
3cd69289 | 661 | ## Sequent Symmetry running Dynix |
5ac83f86 | 662 | i[3456]86-sequent-bsd* ) |
9ec10b2f DM |
663 | machine=symmetry opsys=bsd4-3 |
664 | ;; | |
665 | ||
86d6f6ee RS |
666 | ## Sequent Symmetry running ptx 4, which is a modified SVR4. |
667 | i[3456]86-sequent-ptx4* | i[3456]86-sequent-sysv4* ) | |
668 | machine=sequent-ptx opsys=ptx4 | |
0dcdc912 | 669 | NON_GNU_CPP=/lib/cpp |
86d6f6ee RS |
670 | ;; |
671 | ||
3cd69289 DM |
672 | ## Sequent Symmetry running DYNIX/ptx |
673 | ## Use the old cpp rather than the newer ANSI one. | |
5ac83f86 | 674 | i[3456]86-sequent-ptx* ) |
3cd69289 DM |
675 | machine=sequent-ptx opsys=ptx |
676 | NON_GNU_CPP="/lib/cpp" | |
677 | ;; | |
678 | ||
cd837fee KH |
679 | ## ncr machine running svr4.3. |
680 | i[3456]86-ncr-sysv4.3 ) | |
681 | machine=ncr386 opsys=usg5-4-3 | |
682 | ;; | |
683 | ||
9ec10b2f DM |
684 | ## Unspecified sysv on an ncr machine defaults to svr4.2. |
685 | ## (Plain usg5-4 doesn't turn on POSIX signals, which we need.) | |
5ac83f86 | 686 | i[3456]86-ncr-sysv* ) |
b0f36760 | 687 | machine=ncr386 opsys=usg5-4-2 |
9ec10b2f DM |
688 | ;; |
689 | ||
cbce363f RS |
690 | ## Intel Paragon OSF/1 |
691 | i860-intel-osf1* ) | |
692 | machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp | |
693 | ;; | |
694 | ||
9ec10b2f DM |
695 | ## Intel 860 |
696 | i860-*-sysv4* ) | |
697 | machine=i860 opsys=usg5-4 | |
698 | NON_GNU_CC="/bin/cc" # Ie, not the one in /usr/ucb/cc. | |
699 | NON_GNU_CPP="/usr/ccs/lib/cpp" # cc -E tokenizes macro expansion. | |
700 | ;; | |
701 | ||
3ad6e32b GM |
702 | ## Macintosh PowerPC |
703 | powerpc*-*-linux-gnu* ) | |
704 | machine=macppc opsys=gnu-linux | |
705 | ;; | |
706 | ||
9ec10b2f DM |
707 | ## Masscomp machines |
708 | m68*-masscomp-rtu* ) | |
709 | machine=masscomp opsys=rtu | |
710 | ;; | |
711 | ||
712 | ## Megatest machines | |
713 | m68*-megatest-bsd* ) | |
714 | machine=mega68 opsys=bsd4-2 | |
715 | ;; | |
716 | ||
717 | ## Workstations sold by MIPS | |
718 | ## This is not necessarily all workstations using the MIPS processor - | |
719 | ## Irises are produced by SGI, and DECstations by DEC. | |
720 | ||
721 | ## etc/MACHINES lists mips.h and mips4.h as possible machine files, | |
722 | ## and usg5-2-2 and bsd4-3 as possible OS files. The only guidance | |
723 | ## it gives for choosing between the alternatives seems to be "Use | |
724 | ## -machine=mips4 for RISCOS version 4; use -opsystem=bsd4-3 with | |
725 | ## the BSD world." I'll assume that these are instructions for | |
726 | ## handling two odd situations, and that every other situation | |
727 | ## should use mips.h and usg5-2-2, they being listed first. | |
728 | mips-mips-usg* ) | |
729 | machine=mips4 | |
730 | ## Fall through to the general code at the bottom to decide on the OS. | |
731 | ;; | |
732 | mips-mips-riscos4* ) | |
733 | machine=mips4 opsys=bsd4-3 | |
734 | NON_GNU_CC="cc -systype bsd43" | |
735 | NON_GNU_CPP="cc -systype bsd43 -E" | |
736 | ;; | |
b95c8e7e RS |
737 | mips-mips-riscos5* ) |
738 | machine=mips4 opsys=riscos5 | |
739 | NON_GNU_CC="cc -systype bsd43" | |
740 | NON_GNU_CPP="cc -systype bsd43 -E" | |
741 | ;; | |
9ec10b2f DM |
742 | mips-mips-bsd* ) |
743 | machine=mips opsys=bsd4-3 | |
744 | ;; | |
745 | mips-mips-* ) | |
746 | machine=mips opsys=usg5-2-2 | |
747 | ;; | |
748 | ||
749 | ## NeXT | |
5ab52d42 RS |
750 | m68*-next-* | m68k-*-nextstep* ) |
751 | machine=m68k opsys=nextstep | |
9ec10b2f DM |
752 | ;; |
753 | ||
754 | ## The complete machine from National Semiconductor | |
755 | ns32k-ns-genix* ) | |
756 | machine=ns32000 opsys=usg5-2 | |
757 | ;; | |
758 | ||
759 | ## NCR machines | |
760 | m68*-ncr-sysv2* | m68*-ncr-sysvr2* ) | |
761 | machine=tower32 opsys=usg5-2-2 | |
762 | ;; | |
763 | m68*-ncr-sysv3* | m68*-ncr-sysvr3* ) | |
764 | machine=tower32v3 opsys=usg5-3 | |
765 | ;; | |
766 | ||
b4ea3111 KH |
767 | ## NEC EWS4800 |
768 | mips-nec-sysv4*) | |
769 | machine=ews4800 opsys=ux4800 | |
770 | ;; | |
771 | ||
9ec10b2f DM |
772 | ## Nixdorf Targon 31 |
773 | m68*-nixdorf-sysv* ) | |
774 | machine=targon31 opsys=usg5-2-2 | |
775 | ;; | |
776 | ||
777 | ## Nu (TI or LMI) | |
778 | m68*-nu-sysv* ) | |
779 | machine=nu opsys=usg5-2 | |
780 | ;; | |
781 | ||
782 | ## Plexus | |
783 | m68*-plexus-sysv* ) | |
784 | machine=plexus opsys=usg5-2 | |
785 | ;; | |
786 | ||
42326ef0 RS |
787 | ## PowerPC reference platform |
788 | powerpcle-*-solaris2* ) | |
789 | machine=prep | |
790 | opsys=sol2-5 | |
791 | ;; | |
792 | ||
9ec10b2f DM |
793 | ## Pyramid machines |
794 | ## I don't really have any idea what sort of processor the Pyramid has, | |
795 | ## so I'm assuming it is its own architecture. | |
796 | pyramid-pyramid-bsd* ) | |
797 | machine=pyramid opsys=bsd4-2 | |
798 | ;; | |
799 | ||
800 | ## Sequent Balance | |
801 | ns32k-sequent-bsd4.2* ) | |
802 | machine=sequent opsys=bsd4-2 | |
803 | ;; | |
804 | ns32k-sequent-bsd4.3* ) | |
805 | machine=sequent opsys=bsd4-3 | |
806 | ;; | |
807 | ||
808 | ## Siemens Nixdorf | |
7cba3845 | 809 | mips-siemens-sysv* | mips-sni-sysv*) |
9ec10b2f DM |
810 | machine=mips-siemens opsys=usg5-4 |
811 | NON_GNU_CC=/usr/ccs/bin/cc | |
812 | NON_GNU_CPP=/usr/ccs/lib/cpp | |
813 | ;; | |
814 | ||
815 | ## Silicon Graphics machines | |
816 | ## Iris 2500 and Iris 2500 Turbo (aka the Iris 3030) | |
817 | m68*-sgi-iris3.5* ) | |
818 | machine=irist opsys=iris3-5 | |
819 | ;; | |
820 | m68*-sgi-iris3.6* | m68*-sgi-iris*) | |
821 | machine=irist opsys=iris3-6 | |
822 | ;; | |
823 | ## Iris 4D | |
824 | mips-sgi-irix3* ) | |
825 | machine=iris4d opsys=irix3-3 | |
826 | ;; | |
4ab83697 RS |
827 | mips-sgi-irix4* ) |
828 | machine=iris4d opsys=irix4-0 | |
829 | ;; | |
a187fb80 KH |
830 | mips-sgi-irix6.5 ) |
831 | machine=iris4d opsys=irix6-5 | |
91193697 DL |
832 | # Without defining _LANGUAGE_C, things get masked out in the headers |
833 | # so that, for instance, grepping for `free' in stdlib.h fails and | |
834 | # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m). | |
835 | NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C" | |
63c59d1e | 836 | NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C" |
a187fb80 | 837 | ;; |
546fa279 | 838 | mips-sgi-irix6* ) |
309daad2 | 839 | machine=iris4d opsys=irix6-0 |
d9b5c990 | 840 | # It's not clear whether -D_LANGUAGE_C is necessary as it is for 6.5, |
91193697 DL |
841 | # but presumably it does no harm. |
842 | NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C" | |
63c59d1e | 843 | # -32 probably isn't necessary in later v.6s -- anyone know which? |
309daad2 | 844 | NON_GCC_TEST_OPTIONS=-32 |
546fa279 | 845 | ;; |
4ab83697 | 846 | mips-sgi-irix5.[01]* ) |
9ec10b2f DM |
847 | machine=iris4d opsys=irix5-0 |
848 | ;; | |
4ab83697 RS |
849 | mips-sgi-irix5* | mips-sgi-irix* ) |
850 | machine=iris4d opsys=irix5-2 | |
9ec10b2f DM |
851 | ;; |
852 | ||
853 | ## SONY machines | |
854 | m68*-sony-bsd4.2* ) | |
855 | machine=news opsys=bsd4-2 | |
856 | ;; | |
857 | m68*-sony-bsd4.3* ) | |
858 | machine=news opsys=bsd4-3 | |
859 | ;; | |
3d102c59 | 860 | m68*-sony-newsos3* | m68*-sony-news3*) |
9ec10b2f DM |
861 | machine=news opsys=bsd4-3 |
862 | ;; | |
3d102c59 | 863 | mips-sony-bsd* | mips-sony-newsos4* | mips-sony-news4*) |
9ec10b2f DM |
864 | machine=news-risc opsys=bsd4-3 |
865 | ;; | |
423ef6e8 | 866 | mips-sony-newsos6* ) |
b48e4aeb | 867 | machine=news-r6 opsys=newsos6 |
423ef6e8 | 868 | ;; |
3d102c59 | 869 | mips-sony-news* ) |
9ec10b2f DM |
870 | machine=news-risc opsys=newsos5 |
871 | ;; | |
872 | ||
873 | ## Stride | |
874 | m68*-stride-sysv* ) | |
875 | machine=stride opsys=usg5-2 | |
876 | ;; | |
877 | ||
878 | ## Suns | |
b5b193a7 | 879 | sparc-*-linux-gnu* | sparc64-*-linux-gnu* ) |
5ac83f86 | 880 | machine=sparc opsys=gnu-linux |
28d9bc0e KH |
881 | ;; |
882 | ||
f4027958 | 883 | *-auspex-sunos* | *-sun-sunos* | *-sun-bsd* | *-sun-solaris* \ |
5ac83f86 | 884 | | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* | powerpc*-*-solaris2* \ |
c42b1767 | 885 | | rs6000-*-solaris2*) |
9ec10b2f DM |
886 | case "${canonical}" in |
887 | m68*-sunos1* ) machine=sun1 ;; | |
888 | m68*-sunos2* ) machine=sun2 ;; | |
889 | m68* ) machine=sun3 ;; | |
5ac83f86 RS |
890 | i[3456]86-sun-sunos[34]* ) machine=sun386 ;; |
891 | i[3456]86-*-* ) machine=intel386 ;; | |
42326ef0 | 892 | powerpcle* ) machine=powerpcle ;; |
f7894e88 | 893 | powerpc* | rs6000* ) machine=ibmrs6000 ;; |
9ec10b2f DM |
894 | sparc* ) machine=sparc ;; |
895 | * ) unported=yes ;; | |
896 | esac | |
897 | case "${canonical}" in | |
898 | ## The Sun386 didn't get past 4.0. | |
5ac83f86 | 899 | i[3456]86-*-sunos4 ) opsys=sunos4-0 ;; |
9ec10b2f | 900 | *-sunos4.0* ) opsys=sunos4-0 ;; |
0ff0179d | 901 | *-sunos4.1.[3-9]*noshare ) |
aac2257c RS |
902 | ## This name is sunos413 instead of sunos4-1-3 |
903 | ## to avoid a file name conflict on MSDOS. | |
904 | opsys=sunos413 | |
3d68df05 KH |
905 | NON_GNU_CPP=/usr/lib/cpp |
906 | NON_GCC_TEST_OPTIONS=-Bstatic | |
907 | GCC_TEST_OPTIONS=-static | |
908 | ;; | |
3e23af40 RS |
909 | *-sunos4.1.[3-9]* | *-sunos4shr*) |
910 | opsys=sunos4shr | |
911 | NON_GNU_CPP=/usr/lib/cpp | |
912 | ;; | |
3d68df05 KH |
913 | *-sunos4* | *-sunos ) |
914 | opsys=sunos4-1 | |
9ec10b2f DM |
915 | NON_GCC_TEST_OPTIONS=-Bstatic |
916 | GCC_TEST_OPTIONS=-static | |
917 | ;; | |
918 | *-sunos5.3* | *-solaris2.3* ) | |
919 | opsys=sol2-3 | |
920 | NON_GNU_CPP=/usr/ccs/lib/cpp | |
921 | ;; | |
922 | *-sunos5.4* | *-solaris2.4* ) | |
923 | opsys=sol2-4 | |
924 | NON_GNU_CPP=/usr/ccs/lib/cpp | |
30457b4f | 925 | RANLIB="ar -ts" |
9ec10b2f | 926 | ;; |
2e567bad KH |
927 | *-sunos5.5* | *-solaris2.5* ) |
928 | opsys=sol2-5 | |
929 | NON_GNU_CPP=/usr/ccs/lib/cpp | |
30457b4f | 930 | RANLIB="ar -ts" |
2e567bad | 931 | ;; |
9ec10b2f | 932 | *-sunos5* | *-solaris* ) |
348e3a08 | 933 | opsys=sol2-5 |
9ec10b2f DM |
934 | NON_GNU_CPP=/usr/ccs/lib/cpp |
935 | ;; | |
936 | * ) opsys=bsd4-2 ;; | |
937 | esac | |
6e502e37 RS |
938 | ## Watch out for a compiler that we know will not work. |
939 | case "${canonical}" in | |
940 | *-solaris* | *-sunos5* ) | |
941 | if [ "x$CC" = x/usr/ucb/cc ]; then | |
942 | ## /usr/ucb/cc doesn't work; | |
943 | ## we should find some other compiler that does work. | |
944 | unset CC | |
945 | fi | |
946 | ;; | |
947 | *) ;; | |
948 | esac | |
9ec10b2f | 949 | ;; |
5ab52d42 | 950 | sparc-*-nextstep* ) |
19e45036 | 951 | machine=sparc opsys=nextstep |
5ab52d42 | 952 | ;; |
9ec10b2f DM |
953 | |
954 | ## Tadpole 68k | |
955 | m68*-tadpole-sysv* ) | |
956 | machine=tad68k opsys=usg5-3 | |
957 | ;; | |
958 | ||
959 | ## Tahoe machines | |
960 | tahoe-tahoe-bsd4.2* ) | |
961 | machine=tahoe opsys=bsd4-2 | |
962 | ;; | |
963 | tahoe-tahoe-bsd4.3* ) | |
964 | machine=tahoe opsys=bsd4-3 | |
965 | ;; | |
966 | ||
967 | ## Tandem Integrity S2 | |
968 | mips-tandem-sysv* ) | |
969 | machine=tandem-s2 opsys=usg5-3 | |
970 | ;; | |
971 | ||
972 | ## Tektronix XD88 | |
973 | m88k-tektronix-sysv3* ) | |
974 | machine=tekxd88 opsys=usg5-3 | |
975 | ;; | |
976 | ||
977 | ## Tektronix 16000 box (6130?) | |
978 | ns16k-tektronix-bsd* ) | |
979 | machine=ns16000 opsys=bsd4-2 | |
980 | ;; | |
981 | ## Tektronix 4300 | |
982 | ## src/m/tek4300.h hints that this is a m68k machine. | |
983 | m68*-tektronix-bsd* ) | |
984 | machine=tek4300 opsys=bsd4-3 | |
985 | ;; | |
986 | ||
987 | ## Titan P2 or P3 | |
988 | ## We seem to have lost the machine-description file titan.h! | |
989 | titan-titan-sysv* ) | |
990 | machine=titan opsys=usg5-3 | |
991 | ;; | |
c7f493fd | 992 | |
9ec10b2f DM |
993 | ## Ustation E30 (SS5E) |
994 | m68*-unisys-uniplus* ) | |
995 | machine=ustation opsystem=unipl5-2 | |
996 | ;; | |
997 | ||
998 | ## Vaxen. | |
999 | vax-dec-* ) | |
1000 | machine=vax | |
1001 | case "${canonical}" in | |
1002 | *-bsd4.1* ) opsys=bsd4-1 ;; | |
1003 | *-bsd4.2* | *-ultrix[0-3].* | *-ultrix4.0* ) opsys=bsd4-2 ;; | |
1004 | *-bsd4.3* | *-ultrix* ) opsys=bsd4-3 ;; | |
9ec10b2f DM |
1005 | *-sysv[01]* | *-sysvr[01]* ) opsys=usg5-0 ;; |
1006 | *-sysv2* | *-sysvr2* ) opsys=usg5-2 ;; | |
1007 | *-vms* ) opsys=vms ;; | |
1008 | * ) unported=yes | |
1009 | esac | |
1010 | ;; | |
1011 | ||
1012 | ## Whitechapel MG1 | |
1013 | ns16k-whitechapel-* ) | |
1014 | machine=mg1 | |
1015 | ## We don't know what sort of OS runs on these; we'll let the | |
1016 | ## operating system guessing code below try. | |
1017 | ;; | |
1018 | ||
1019 | ## Wicat | |
1020 | m68*-wicat-sysv* ) | |
1021 | machine=wicat opsys=usg5-2 | |
1022 | ;; | |
1023 | ||
2d23c8cc GM |
1024 | ## IA-64 |
1025 | ia64*-*-linux* ) | |
1026 | machine=ia64 opsys=gnu-linux | |
1027 | ;; | |
1028 | ||
9ec10b2f | 1029 | ## Intel 386 machines where we don't care about the manufacturer |
5ac83f86 | 1030 | i[3456]86-*-* ) |
9ec10b2f DM |
1031 | machine=intel386 |
1032 | case "${canonical}" in | |
9f25f6fb | 1033 | *-lynxos* ) opsys=lynxos ;; |
9ec10b2f DM |
1034 | *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;; |
1035 | *-isc2.2* ) opsys=isc2-2 ;; | |
1036 | *-isc4.0* ) opsys=isc4-0 ;; | |
135c9ca6 RS |
1037 | *-isc4.* ) opsys=isc4-1 |
1038 | GCC_TEST_OPTIONS=-posix | |
1039 | NON_GCC_TEST_OPTIONS=-Xp | |
1040 | ;; | |
9ec10b2f DM |
1041 | *-isc* ) opsys=isc3-0 ;; |
1042 | *-esix5* ) opsys=esix5r4; NON_GNU_CPP=/usr/lib/cpp ;; | |
1043 | *-esix* ) opsys=esix ;; | |
1044 | *-xenix* ) opsys=xenix ;; | |
5ac83f86 | 1045 | *-linux-gnu* ) opsys=gnu-linux ;; |
9ec10b2f | 1046 | *-sco3.2v4* ) opsys=sco4 ; NON_GNU_CPP=/lib/cpp ;; |
5ac83f86 RS |
1047 | *-sco3.2v5* ) opsys=sco5 |
1048 | NON_GNU_CPP=/lib/cpp | |
1049 | # Prevent -belf from being passed to $CPP. | |
1050 | # /lib/cpp does not accept it. | |
1e60bcf8 | 1051 | OVERRIDE_CPPFLAGS=" " |
5ac83f86 | 1052 | ;; |
0e6d70d5 | 1053 | *-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;; |
9ec10b2f | 1054 | *-386bsd* ) opsys=386bsd ;; |
5ab52d42 | 1055 | *-nextstep* ) opsys=nextstep ;; |
9ec10b2f DM |
1056 | ## Otherwise, we'll fall through to the generic opsys code at the bottom. |
1057 | esac | |
1058 | ;; | |
1059 | ||
287f502c | 1060 | ## m68k Linux-based GNU system |
5ac83f86 RS |
1061 | m68k-*-linux-gnu* ) |
1062 | machine=m68k opsys=gnu-linux | |
e1fd57e3 RS |
1063 | ;; |
1064 | ||
287f502c RS |
1065 | ## Mips Linux-based GNU system |
1066 | mips-*-linux-gnu* ) | |
1067 | machine=mips opsys=gnu-linux | |
1068 | ;; | |
1069 | ||
eded5b68 RS |
1070 | ## UXP/DS |
1071 | sparc-fujitsu-sysv4* ) | |
1072 | machine=sparc opsys=uxpds | |
1073 | NON_GNU_CPP=/usr/ccs/lib/cpp | |
1074 | RANLIB="ar -ts" | |
1075 | ;; | |
1076 | ||
5dbb45f2 KH |
1077 | ## UXP/V |
1078 | f301-fujitsu-uxpv4.1) | |
1079 | machine=f301 opsys=uxpv | |
1080 | ;; | |
1081 | ||
9ec10b2f DM |
1082 | * ) |
1083 | unported=yes | |
1084 | ;; | |
1085 | esac | |
1086 | ||
1087 | ### If the code above didn't choose an operating system, just choose | |
1088 | ### an operating system based on the configuration name. You really | |
1089 | ### only want to use this when you have no idea what the right | |
1090 | ### operating system is; if you know what operating systems a machine | |
1091 | ### runs, it's cleaner to make it explicit in the case statement | |
1092 | ### above. | |
1093 | if test x"${opsys}" = x; then | |
1094 | case "${canonical}" in | |
1095 | *-gnu* ) opsys=gnu ;; | |
1096 | *-bsd4.[01] ) opsys=bsd4-1 ;; | |
1097 | *-bsd4.2 ) opsys=bsd4-2 ;; | |
1098 | *-bsd4.3 ) opsys=bsd4-3 ;; | |
1099 | *-sysv0 | *-sysvr0 ) opsys=usg5-0 ;; | |
1100 | *-sysv2 | *-sysvr2 ) opsys=usg5-2 ;; | |
1101 | *-sysv2.2 | *-sysvr2.2 ) opsys=usg5-2-2 ;; | |
5ab52d42 | 1102 | *-sysv3* | *-sysvr3* ) opsys=usg5-3 ;; |
66a96cff | 1103 | *-sysv4.2uw* ) opsys=unixware ;; |
5ab52d42 | 1104 | *-sysv4.1* | *-sysvr4.1* ) |
9ec10b2f DM |
1105 | NON_GNU_CPP=/usr/lib/cpp |
1106 | opsys=usg5-4 ;; | |
5ab52d42 | 1107 | *-sysv4.[2-9]* | *-sysvr4.[2-9]* ) |
b63df577 | 1108 | if [ x$NON_GNU_CPP = x ]; then |
16831d8c RS |
1109 | if [ -f /usr/ccs/lib/cpp ]; then |
1110 | NON_GNU_CPP=/usr/ccs/lib/cpp | |
1111 | else | |
1112 | NON_GNU_CPP=/lib/cpp | |
1113 | fi | |
b63df577 RS |
1114 | fi |
1115 | opsys=usg5-4-2 ;; | |
5ab52d42 | 1116 | *-sysv4* | *-sysvr4* ) opsys=usg5-4 ;; |
9ec10b2f DM |
1117 | * ) |
1118 | unported=yes | |
1119 | ;; | |
1120 | esac | |
1121 | fi | |
1122 | ||
1123 | changequote([, ])dnl | |
1124 | ||
1125 | if test $unported = yes; then | |
1126 | AC_MSG_ERROR([Emacs hasn't been ported to \`${canonical}' systems. | |
1127 | Check \`etc/MACHINES' for recognized configuration names.]) | |
1128 | fi | |
1129 | ||
1130 | machfile="m/${machine}.h" | |
1131 | opsysfile="s/${opsys}.h" | |
1132 | ||
1133 | ||
1134 | #### Choose a compiler. | |
1135 | test -n "$CC" && cc_specified=yes | |
1136 | ||
5ab52d42 RS |
1137 | # Save the value of CFLAGS that the user specified. |
1138 | SPECIFIED_CFLAGS="$CFLAGS" | |
1139 | ||
9ec10b2f DM |
1140 | case ${with_gcc} in |
1141 | "yes" ) CC="gcc" GCC=yes ;; | |
6e0dc84a | 1142 | "no" ) : ${CC=cc} ;; |
e9b2a022 | 1143 | * ) |
9ec10b2f | 1144 | esac |
e9b2a022 | 1145 | AC_PROG_CC |
9ec10b2f DM |
1146 | |
1147 | # On Suns, sometimes $CPP names a directory. | |
1148 | if test -n "$CPP" && test -d "$CPP"; then | |
1149 | CPP= | |
1150 | fi | |
1151 | ||
1152 | #### Some systems specify a CPP to use unless we are using GCC. | |
1153 | #### Now that we know whether we are using GCC, we can decide whether | |
1154 | #### to use that one. | |
1155 | if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x | |
1156 | then | |
1157 | CPP="$NON_GNU_CPP" | |
1158 | fi | |
1159 | ||
1160 | #### Some systems specify a CC to use unless we are using GCC. | |
1161 | #### Now that we know whether we are using GCC, we can decide whether | |
1162 | #### to use that one. | |
1163 | if test "x$NON_GNU_CC" != x && test x$GCC != xyes && | |
1164 | test x$cc_specified != xyes | |
1165 | then | |
1166 | CC="$NON_GNU_CC" | |
1167 | fi | |
1168 | ||
1169 | if test x$GCC = xyes && test "x$GCC_TEST_OPTIONS" != x | |
1170 | then | |
1171 | CC="$CC $GCC_TEST_OPTIONS" | |
c7f493fd | 1172 | fi |
9ec10b2f DM |
1173 | |
1174 | if test x$GCC = x && test "x$NON_GCC_TEST_OPTIONS" != x | |
1175 | then | |
1176 | CC="$CC $NON_GCC_TEST_OPTIONS" | |
c7f493fd | 1177 | fi |
9ec10b2f | 1178 | |
1bc5a004 RS |
1179 | if test x$GCC = xyes && test "x$GCC_LINK_TEST_OPTIONS" != x |
1180 | then | |
1181 | ac_link="$ac_link $GCC_LINK_TEST_OPTIONS" | |
1182 | fi | |
1183 | ||
1184 | if test x$GCC = x && test "x$NON_GCC_LINK_TEST_OPTIONS" != x | |
1185 | then | |
1186 | ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS" | |
1187 | fi | |
1188 | ||
9ec10b2f DM |
1189 | #### Some other nice autoconf tests. If you add a test here which |
1190 | #### should make an entry in src/config.h, don't forget to add an | |
1191 | #### #undef clause to src/config.h.in for autoconf to modify. | |
1192 | ||
1193 | dnl checks for programs | |
6e0dc84a | 1194 | AC_PROG_LN_S |
9ec10b2f DM |
1195 | AC_PROG_CPP |
1196 | AC_PROG_INSTALL | |
3f5b097c DL |
1197 | if test "x$RANLIB" = x; then |
1198 | AC_PROG_RANLIB | |
1199 | fi | |
9ec10b2f | 1200 | |
3cd69289 DM |
1201 | dnl checks for Unix variants |
1202 | AC_AIX | |
1203 | ||
4428e268 DL |
1204 | #### Extract some information from the operating system and machine files. |
1205 | ||
1206 | AC_CHECKING([the machine- and system-dependent files to find out | |
1207 | - which libraries the lib-src programs will want, and | |
1208 | - whether the GNU malloc routines are usable]) | |
1209 | ||
1210 | ### First figure out CFLAGS (which we use for running the compiler here) | |
1211 | ### and REAL_CFLAGS (which we use for real compilation). | |
1212 | ### The two are the same except on a few systems, where they are made | |
1213 | ### different to work around various lossages. For example, | |
1214 | ### GCC 2.5 on GNU/Linux needs them to be different because it treats -g | |
1215 | ### as implying static linking. | |
1216 | ||
1217 | ### If the CFLAGS env var is specified, we use that value | |
1218 | ### instead of the default. | |
1219 | ||
1220 | ### It's not important that this name contain the PID; you can't run | |
1221 | ### two configures in the same directory and have anything work | |
1222 | ### anyway. | |
1223 | tempcname="conftest.c" | |
1224 | ||
1225 | echo ' | |
1226 | #include "'${srcdir}'/src/'${opsysfile}'" | |
1227 | #include "'${srcdir}'/src/'${machfile}'" | |
1228 | #ifndef LIBS_MACHINE | |
1229 | #define LIBS_MACHINE | |
1230 | #endif | |
1231 | #ifndef LIBS_SYSTEM | |
1232 | #define LIBS_SYSTEM | |
1233 | #endif | |
1234 | #ifndef C_SWITCH_SYSTEM | |
1235 | #define C_SWITCH_SYSTEM | |
1236 | #endif | |
1237 | #ifndef C_SWITCH_MACHINE | |
1238 | #define C_SWITCH_MACHINE | |
1239 | #endif | |
1240 | configure___ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM | |
1241 | configure___ c_switch_system=C_SWITCH_SYSTEM | |
1242 | configure___ c_switch_machine=C_SWITCH_MACHINE | |
1243 | ||
1244 | #ifndef LIB_X11_LIB | |
1245 | #define LIB_X11_LIB -lX11 | |
1246 | #endif | |
1247 | ||
1248 | #ifndef LIBX11_MACHINE | |
1249 | #define LIBX11_MACHINE | |
1250 | #endif | |
1251 | ||
1252 | #ifndef LIBX11_SYSTEM | |
1253 | #define LIBX11_SYSTEM | |
1254 | #endif | |
1255 | configure___ LIBX=LIB_X11_LIB LIBX11_MACHINE LIBX11_SYSTEM | |
1256 | ||
1257 | #ifdef UNEXEC | |
1258 | configure___ unexec=UNEXEC | |
1259 | #else | |
1260 | configure___ unexec=unexec.o | |
1261 | #endif | |
1262 | ||
1263 | #ifdef SYSTEM_MALLOC | |
1264 | configure___ system_malloc=yes | |
1265 | #else | |
1266 | configure___ system_malloc=no | |
1267 | #endif | |
1268 | ||
e32fac2a GM |
1269 | #ifdef USE_MMAP_FOR_BUFFERS |
1270 | configure___ use_mmap_for_buffers=yes | |
b1b4ce06 | 1271 | #else |
e32fac2a | 1272 | configure___ use_mmap_for_buffers=no |
b1b4ce06 GM |
1273 | #endif |
1274 | ||
4428e268 DL |
1275 | #ifndef C_DEBUG_SWITCH |
1276 | #define C_DEBUG_SWITCH -g | |
1277 | #endif | |
1278 | ||
1279 | #ifndef C_OPTIMIZE_SWITCH | |
1280 | #ifdef __GNUC__ | |
1281 | #define C_OPTIMIZE_SWITCH -O2 | |
1282 | #else | |
1283 | #define C_OPTIMIZE_SWITCH -O | |
1284 | #endif | |
1285 | #endif | |
1286 | ||
1287 | #ifndef LD_SWITCH_MACHINE | |
1288 | #define LD_SWITCH_MACHINE | |
1289 | #endif | |
1290 | ||
1291 | #ifndef LD_SWITCH_SYSTEM | |
1292 | #define LD_SWITCH_SYSTEM | |
1293 | #endif | |
1294 | ||
1295 | #ifndef LD_SWITCH_X_SITE_AUX | |
1296 | #define LD_SWITCH_X_SITE_AUX | |
1297 | #endif | |
1298 | ||
1299 | configure___ ld_switch_system=LD_SWITCH_SYSTEM | |
1300 | configure___ ld_switch_machine=LD_SWITCH_MACHINE | |
1301 | ||
1302 | #ifdef THIS_IS_CONFIGURE | |
1303 | ||
1304 | /* Get the CFLAGS for tests in configure. */ | |
1305 | #ifdef __GNUC__ | |
1306 | configure___ CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}' | |
1307 | #else | |
1308 | configure___ CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}' | |
1309 | #endif | |
1310 | ||
1311 | #else /* not THIS_IS_CONFIGURE */ | |
1312 | ||
1313 | /* Get the CFLAGS for real compilation. */ | |
1314 | #ifdef __GNUC__ | |
1315 | configure___ REAL_CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}' | |
1316 | #else | |
1317 | configure___ REAL_CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}' | |
1318 | #endif | |
1319 | ||
1320 | #endif /* not THIS_IS_CONFIGURE */ | |
1321 | ' > ${tempcname} | |
1322 | ||
1323 | # The value of CPP is a quoted variable reference, so we need to do this | |
1324 | # to get its actual value... | |
1325 | CPP=`eval "echo $CPP"` | |
1326 | changequote(, )dnl | |
1327 | eval `${CPP} -Isrc ${tempcname} \ | |
1328 | | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'` | |
1329 | if test "x$SPECIFIED_CFLAGS" = x; then | |
1330 | eval `${CPP} -Isrc -DTHIS_IS_CONFIGURE ${tempcname} \ | |
1331 | | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'` | |
1332 | else | |
1333 | REAL_CFLAGS="$CFLAGS" | |
1334 | fi | |
1335 | changequote([, ])dnl | |
1336 | rm ${tempcname} | |
1337 | ||
1338 | ac_link="$ac_link $ld_switch_machine $ld_switch_system" | |
1339 | ||
1340 | ### Make sure subsequent tests use flags consistent with the build flags. | |
1341 | ||
1342 | if test x"${OVERRIDE_CPPFLAGS}" != x; then | |
1343 | CPPFLAGS="${OVERRIDE_CPPFLAGS}" | |
1344 | else | |
1345 | CPPFLAGS="$c_switch_system $c_switch_machine $CPPFLAGS" | |
1346 | fi | |
1347 | ||
48989ead DL |
1348 | dnl Do this early because it can frob feature test macros for Unix-98 &c. |
1349 | AC_SYS_LARGEFILE | |
1350 | ||
b412189c | 1351 | # Sound support for GNU/Linux and the free BSDs. |
b192d653 KR |
1352 | AC_CHECK_HEADERS(machine/soundcard.h sys/soundcard.h soundcard.h) |
1353 | # Emulation library used on NetBSD. | |
1354 | AC_CHECK_LIB(ossaudio, _oss_ioctl, LIBSOUND=-lossaudio, LIBSOUND=) | |
1355 | AC_SUBST(LIBSOUND) | |
b412189c | 1356 | |
9ec10b2f | 1357 | dnl checks for header files |
1113b624 PE |
1358 | AC_CHECK_HEADERS(sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \ |
1359 | linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \ | |
5e384f3d DL |
1360 | termcap.h stdio_ext.h fcntl.h term.h strings.h coff.h pty.h sys/mman.h \ |
1361 | sys/param.h) | |
6e0dc84a DM |
1362 | AC_HEADER_STDC |
1363 | AC_HEADER_TIME | |
1364 | AC_DECL_SYS_SIGLIST | |
2ce723a5 | 1365 | AC_HEADER_SYS_WAIT |
9ec10b2f | 1366 | |
3cd69289 | 1367 | dnl Some systems have utime.h but don't declare the struct anyplace. |
fd0a060b | 1368 | AC_CACHE_CHECK(for struct utimbuf, emacs_cv_struct_utimbuf, |
3cd69289 DM |
1369 | AC_TRY_COMPILE([#ifdef TIME_WITH_SYS_TIME |
1370 | #include <sys/time.h> | |
1371 | #include <time.h> | |
1372 | #else | |
1373 | #ifdef HAVE_SYS_TIME_H | |
1374 | #include <sys/time.h> | |
1375 | #else | |
1376 | #include <time.h> | |
1377 | #endif | |
1378 | #endif | |
1379 | #ifdef HAVE_UTIME_H | |
1380 | #include <utime.h> | |
1381 | #endif], [static struct utimbuf x; x.actime = x.modtime;], | |
fd0a060b AS |
1382 | emacs_cv_struct_utimbuf=yes, emacs_cv_struct_utimbuf=no)) |
1383 | if test $emacs_cv_struct_utimbuf = yes; then | |
5e384f3d | 1384 | AC_DEFINE(HAVE_STRUCT_UTIMBUF, 1, [Define to 1 if `struct utimbuf' is declared by <utime.h>.]) |
fd0a060b | 1385 | fi |
3cd69289 | 1386 | |
9ec10b2f | 1387 | dnl checks for typedefs |
6e0dc84a | 1388 | AC_TYPE_SIGNAL |
9ec10b2f | 1389 | |
25abcaf1 GM |
1390 | dnl Check for speed_t typedef. |
1391 | AC_CACHE_CHECK(for speed_t, emacs_cv_speed_t, | |
5e384f3d DL |
1392 | [AC_TRY_COMPILE([#include <termios.h>], [speed_t x = 1;], |
1393 | emacs_cv_speed_t=yes, emacs_cv_speed_t=no)]) | |
25abcaf1 | 1394 | if test $emacs_cv_speed_t = yes; then |
5e384f3d DL |
1395 | AC_DEFINE(HAVE_SPEED_T, 1, |
1396 | [Define to 1 if `speed_t' is declared by <termios.h>.]) | |
25abcaf1 GM |
1397 | fi |
1398 | ||
fd0a060b | 1399 | AC_CACHE_CHECK(for struct timeval, emacs_cv_struct_timeval, |
3cd69289 DM |
1400 | AC_TRY_COMPILE([#ifdef TIME_WITH_SYS_TIME |
1401 | #include <sys/time.h> | |
1402 | #include <time.h> | |
1403 | #else | |
1404 | #ifdef HAVE_SYS_TIME_H | |
1405 | #include <sys/time.h> | |
1406 | #else | |
1407 | #include <time.h> | |
1408 | #endif | |
1409 | #endif], [static struct timeval x; x.tv_sec = x.tv_usec;], | |
fd0a060b AS |
1410 | emacs_cv_struct_timeval=yes, emacs_cv_struct_timeval=no)) |
1411 | HAVE_TIMEVAL=$emacs_cv_struct_timeval | |
1412 | if test $emacs_cv_struct_timeval = yes; then | |
5e384f3d | 1413 | AC_DEFINE(HAVE_TIMEVAL, 1, [Define to 1 if `struct timeval' is declared by <sys/time.h>.]) |
fd0a060b | 1414 | fi |
3cd69289 | 1415 | |
63c59d1e DL |
1416 | AC_CACHE_CHECK(for struct exception, emacs_cv_struct_exception, |
1417 | AC_TRY_COMPILE([#include <math.h>], | |
1418 | [static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1;], | |
1419 | emacs_cv_struct_exception=yes, emacs_cv_struct_exception=no)) | |
1420 | HAVE_EXCEPTION=$emacs_cv_struct_exception | |
1421 | if test $emacs_cv_struct_exception != yes; then | |
5e384f3d | 1422 | AC_DEFINE(NO_MATHERR, 1, [Define to 1 if you don't have struct exception in math.h.]) |
63c59d1e DL |
1423 | fi |
1424 | ||
9ec10b2f DM |
1425 | dnl checks for structure members |
1426 | AC_STRUCT_TM | |
6e0dc84a | 1427 | AC_STRUCT_TIMEZONE |
5e384f3d DL |
1428 | AC_CHECK_MEMBER(struct tm.tm_gmtoff, |
1429 | [AC_DEFINE(HAVE_TM_GMTOFF, 1, | |
1430 | [Define to 1 if `tm_gmtoff' is member of `struct tm'.])],, | |
1431 | [#include <time.h>]) | |
9ec10b2f DM |
1432 | |
1433 | dnl checks for compiler characteristics | |
3f5b097c DL |
1434 | |
1435 | dnl Testing __STDC__ to determine prototype support isn't good enough. | |
1436 | dnl DEC C, for instance, doesn't define it with default options, and | |
1437 | dnl is used on 64-bit systems (OSF Alphas). Similarly for volatile | |
1438 | dnl and void *. | |
1439 | AC_C_PROTOTYPES | |
1440 | AC_C_VOLATILE | |
6e0dc84a | 1441 | AC_C_CONST |
3f5b097c DL |
1442 | dnl This isn't useful because we can't turn on use of `inline' unless |
1443 | dnl the compiler groks `extern inline'. | |
1444 | dnl AC_C_INLINE | |
1445 | AC_CACHE_CHECK([for void * support], emacs_cv_void_star, | |
1446 | [AC_TRY_COMPILE(, [void * foo;], | |
1447 | emacs_cv_void_star=yes, emacs_cv_void_star=no)]) | |
1448 | if test $emacs_cv_void_star = yes; then | |
1449 | AC_DEFINE(POINTER_TYPE, void) | |
1450 | else | |
1451 | AC_DEFINE(POINTER_TYPE, char) | |
1452 | fi | |
5e384f3d DL |
1453 | AH_TEMPLATE(POINTER_TYPE, |
1454 | [Define as `void' if your compiler accepts `void *'; otherwise | |
1455 | define as `char'.])dnl | |
9ec10b2f DM |
1456 | |
1457 | dnl check for Make feature | |
6e0dc84a | 1458 | AC_PROG_MAKE_SET |
9ec10b2f DM |
1459 | |
1460 | dnl checks for operating system services | |
6e0dc84a | 1461 | AC_SYS_LONG_FILE_NAMES |
9ec10b2f DM |
1462 | |
1463 | #### Choose a window system. | |
9ec10b2f | 1464 | |
6e0dc84a | 1465 | AC_PATH_X |
530ce502 DM |
1466 | if test "$no_x" = yes; then |
1467 | window_system=none | |
1468 | else | |
1469 | window_system=x11 | |
1470 | fi | |
9ec10b2f | 1471 | |
ea199426 | 1472 | if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then |
00ac3ffc KH |
1473 | LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"` |
1474 | LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"` | |
66d736a9 RS |
1475 | x_default_search_path="" |
1476 | for x_library in `echo ${x_libraries} | sed -e "s/:/ /g"`; do | |
c8d4d4cc KH |
1477 | x_search_path="\ |
1478 | ${x_library}/X11/%L/%T/%N%C%S:\ | |
1479 | ${x_library}/X11/%l/%T/%N%C%S:\ | |
1480 | ${x_library}/X11/%T/%N%C%S:\ | |
1481 | ${x_library}/X11/%L/%T/%N%S:\ | |
1482 | ${x_library}/X11/%l/%T/%N%S:\ | |
1483 | ${x_library}/X11/%T/%N%S" | |
66d736a9 RS |
1484 | if test x"${x_default_search_path}" = x; then |
1485 | x_default_search_path=${x_search_path} | |
1486 | else | |
1487 | x_default_search_path="${x_search_path}:${x_default_search_path}" | |
1488 | fi | |
1489 | done | |
ea199426 DM |
1490 | fi |
1491 | if test "${x_includes}" != NONE && test -n "${x_includes}"; then | |
cc6476f6 | 1492 | C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"` |
ea199426 | 1493 | fi |
9ec10b2f | 1494 | |
8dbeb353 DM |
1495 | if test x"${x_includes}" = x; then |
1496 | bitmapdir=/usr/include/X11/bitmaps | |
3cd69289 | 1497 | else |
908ff139 | 1498 | # accumulate include directories that have X11 bitmap subdirectories |
cc6476f6 KH |
1499 | bmd_acc="dummyval" |
1500 | for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do | |
1501 | if test -d "${bmd}/X11/bitmaps"; then | |
1502 | bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps" | |
4f6f5dab GM |
1503 | fi |
1504 | if test -d "${bmd}/bitmaps"; then | |
cc6476f6 KH |
1505 | bmd_acc="${bmd_acc}:${bmd}/bitmaps" |
1506 | fi | |
1507 | done | |
1508 | if test ${bmd_acc} != "dummyval"; then | |
1509 | bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"` | |
1510 | fi | |
3cd69289 DM |
1511 | fi |
1512 | ||
9ec10b2f DM |
1513 | case "${window_system}" in |
1514 | x11 ) | |
1515 | HAVE_X_WINDOWS=yes | |
1516 | HAVE_X11=yes | |
1517 | case "${with_x_toolkit}" in | |
c7f493fd RM |
1518 | athena | lucid ) USE_X_TOOLKIT=LUCID ;; |
1519 | motif ) USE_X_TOOLKIT=MOTIF ;; | |
1520 | dnl open-look ) USE_X_TOOLKIT=OPEN_LOOK ;; | |
4be21f66 KH |
1521 | no ) USE_X_TOOLKIT=none ;; |
1522 | dnl If user did not say whether to use a toolkit, | |
1523 | dnl make this decision later: use the toolkit if we have X11R5 or newer. | |
1524 | * ) USE_X_TOOLKIT=maybe ;; | |
9ec10b2f DM |
1525 | esac |
1526 | ;; | |
9ec10b2f DM |
1527 | none ) |
1528 | HAVE_X_WINDOWS=no | |
1529 | HAVE_X11=no | |
1530 | USE_X_TOOLKIT=none | |
1531 | ;; | |
1532 | esac | |
9ec10b2f DM |
1533 | |
1534 | ### If we're using X11, we should use the X menu package. | |
08741ba9 | 1535 | HAVE_MENUS=no |
9ec10b2f | 1536 | case ${HAVE_X11} in |
08741ba9 | 1537 | yes ) HAVE_MENUS=yes ;; |
9ec10b2f | 1538 | esac |
b412189c | 1539 | |
b95c8e7e RS |
1540 | if test "${opsys}" = "hpux9"; then |
1541 | case "${x_libraries}" in | |
1542 | *X11R4* ) | |
1543 | opsysfile="s/hpux9-x11r4.h" | |
1544 | ;; | |
1545 | esac | |
1546 | fi | |
1547 | ||
1548 | if test "${opsys}" = "hpux9shr"; then | |
1549 | case "${x_libraries}" in | |
1550 | *X11R4* ) | |
1551 | opsysfile="s/hpux9shxr4.h" | |
1552 | ;; | |
1553 | esac | |
1554 | fi | |
1555 | ||
9ec10b2f DM |
1556 | ### Compute the unexec source name from the object name. |
1557 | UNEXEC_SRC="`echo ${unexec} | sed 's/\.o/.c/'`" | |
1558 | ||
1559 | # Do the opsystem or machine files prohibit the use of the GNU malloc? | |
1560 | # Assume not, until told otherwise. | |
1561 | GNU_MALLOC=yes | |
b05a95cb RS |
1562 | doug_lea_malloc=yes |
1563 | AC_CHECK_FUNC(malloc_get_state, ,doug_lea_malloc=no) | |
1564 | AC_CHECK_FUNC(malloc_set_state, ,doug_lea_malloc=no) | |
fd0a060b AS |
1565 | AC_CACHE_CHECK(whether __after_morecore_hook exists, |
1566 | emacs_cv_var___after_morecore_hook, | |
e9b2a022 | 1567 | [AC_TRY_LINK([extern void (* __after_morecore_hook)();],[__after_morecore_hook = 0], |
fd0a060b | 1568 | emacs_cv_var___after_morecore_hook=yes, |
e9b2a022 | 1569 | emacs_cv_var___after_morecore_hook=no)]) |
fd0a060b AS |
1570 | if test $emacs_cv_var___after_morecore_hook = no; then |
1571 | doug_lea_malloc=no | |
1572 | fi | |
8cd88038 | 1573 | if test "${system_malloc}" = "yes"; then |
9ec10b2f DM |
1574 | GNU_MALLOC=no |
1575 | GNU_MALLOC_reason=" | |
b05a95cb | 1576 | (The GNU allocators don't work with this system configuration.)" |
9ec10b2f | 1577 | fi |
8cd88038 RS |
1578 | if test "$doug_lea_malloc" = "yes" ; then |
1579 | if test "$GNU_MALLOC" = yes ; then | |
1580 | GNU_MALLOC_reason=" | |
0855015c | 1581 | (Using Doug Lea's new malloc from the GNU C Library.)" |
8cd88038 | 1582 | fi |
5e384f3d DL |
1583 | AC_DEFINE(DOUG_LEA_MALLOC, 1, |
1584 | [Define to 1 if you are using the GNU C Library.]) | |
8cd88038 | 1585 | fi |
9ec10b2f DM |
1586 | |
1587 | if test x"${REL_ALLOC}" = x; then | |
1588 | REL_ALLOC=${GNU_MALLOC} | |
1589 | fi | |
1590 | ||
e32fac2a | 1591 | dnl For now, need to use an explicit `#define USE_MMAP_FOR_BUFFERS 1' |
69c40632 | 1592 | dnl the system configuration file (s/*.h) to turn the use of mmap |
53c94d4d | 1593 | dnl in the relocating allocator on. |
b1b4ce06 GM |
1594 | |
1595 | AC_FUNC_MMAP | |
e32fac2a GM |
1596 | if test $use_mmap_for_buffers = yes; then |
1597 | REL_ALLOC=no | |
b1b4ce06 GM |
1598 | fi |
1599 | ||
52c76122 | 1600 | LIBS="$libsrc_libs $LIBS" |
9ec10b2f DM |
1601 | |
1602 | dnl If found, this defines HAVE_LIBDNET, which m/pmax.h checks, | |
1603 | dnl and also adds -ldnet to LIBS, which Autoconf uses for checks. | |
1604 | AC_CHECK_LIB(dnet, dnet_ntoa) | |
1605 | dnl This causes -lresolv to get used in subsequent tests, | |
1606 | dnl which causes failures on some systems such as HPUX 9. | |
1607 | dnl AC_CHECK_LIB(resolv, gethostbyname) | |
1608 | ||
1609 | dnl FIXME replace main with a function we actually want from this library. | |
1610 | AC_CHECK_LIB(Xbsd, main, LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd") | |
1611 | ||
027dae63 | 1612 | AC_CHECK_LIB(pthreads, cma_open) |
1d94ee28 | 1613 | |
5d4245a6 | 1614 | AC_MSG_CHECKING(for XFree86 in /usr/X386) |
9ec10b2f | 1615 | if test -d /usr/X386/include; then |
9ec10b2f | 1616 | HAVE_XFREE386=yes |
6e0dc84a | 1617 | : ${C_SWITCH_X_SITE="-I/usr/X386/include"} |
9ec10b2f | 1618 | else |
6e0dc84a | 1619 | HAVE_XFREE386=no |
9ec10b2f | 1620 | fi |
6e0dc84a | 1621 | AC_MSG_RESULT($HAVE_XFREE386) |
9ec10b2f | 1622 | |
509fccc3 RS |
1623 | # Change CFLAGS temporarily so that C_SWITCH_X_SITE gets used |
1624 | # for the tests that follow. We set it back to REAL_CFLAGS later on. | |
9ec10b2f | 1625 | |
5a9bf171 KR |
1626 | REAL_CPPFLAGS="$CPPFLAGS" |
1627 | ||
9ec10b2f DM |
1628 | if test "${HAVE_X11}" = "yes"; then |
1629 | DEFS="$C_SWITCH_X_SITE $DEFS" | |
96c20358 RS |
1630 | LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE" |
1631 | LIBS="$LIBX $LIBS" | |
9ec10b2f | 1632 | CFLAGS="$C_SWITCH_X_SITE $CFLAGS" |
5a9bf171 | 1633 | CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS" |
509fccc3 | 1634 | |
617a496c RS |
1635 | # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests. |
1636 | # This is handled by LD_SWITCH_X_SITE_AUX during the real build, | |
1637 | # but it's more convenient here to set LD_RUN_PATH | |
1638 | # since this also works on hosts that don't understand LD_SWITCH_X_SITE_AUX. | |
1639 | if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then | |
1640 | LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH | |
1641 | export LD_RUN_PATH | |
1642 | fi | |
1643 | ||
5ac83f86 | 1644 | if test "${opsys}" = "gnu-linux"; then |
3bbe016c | 1645 | AC_MSG_CHECKING(whether X on GNU/Linux needs -b to link) |
509fccc3 RS |
1646 | AC_TRY_LINK([], |
1647 | [XOpenDisplay ("foo");], | |
3bbe016c KH |
1648 | [xlinux_first_failure=no], |
1649 | [xlinux_first_failure=yes]) | |
1650 | if test "${xlinux_first_failure}" = "yes"; then | |
509fccc3 RS |
1651 | OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE" |
1652 | OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE" | |
1653 | OLD_CPPFLAGS="$CPPFLAGS" | |
1654 | OLD_LIBS="$LIBS" | |
1655 | LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout" | |
1656 | C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout" | |
1657 | CPPFLAGS="$CPPFLAGS -b i486-linuxaout" | |
1658 | LIBS="$LIBS -b i486-linuxaout" | |
1659 | AC_TRY_LINK([], | |
1660 | [XOpenDisplay ("foo");], | |
3bbe016c KH |
1661 | [xlinux_second_failure=no], |
1662 | [xlinux_second_failure=yes]) | |
1663 | if test "${xlinux_second_failure}" = "yes"; then | |
509fccc3 RS |
1664 | # If we get the same failure with -b, there is no use adding -b. |
1665 | # So take it out. This plays safe. | |
1666 | LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE" | |
1667 | C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE" | |
1668 | CPPFLAGS="$OLD_CPPFLAGS" | |
1669 | LIBS="$OLD_LIBS" | |
1670 | AC_MSG_RESULT(no) | |
1671 | else | |
1672 | AC_MSG_RESULT(yes) | |
1673 | fi | |
1674 | else | |
1675 | AC_MSG_RESULT(no) | |
1676 | fi | |
1677 | fi | |
1678 | ||
9ca4be21 GM |
1679 | # Reportedly, some broken Solaris systems have XKBlib.h but are missing |
1680 | # header files included from there. | |
1681 | AC_MSG_CHECKING(for Xkb) | |
1682 | AC_TRY_LINK([#include <X11/Xlib.h> | |
1683 | #include <X11/XKBlib.h>], | |
1684 | [XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);], | |
1685 | emacs_xkb=yes, emacs_xkb=no) | |
ad4ac636 | 1686 | AC_MSG_RESULT($emacs_xkb) |
9ca4be21 | 1687 | if test $emacs_xkb = yes; then |
5e384f3d | 1688 | AC_DEFINE(HAVE_XKBGETKEYBOARD, 1, [Define to 1 if you have the XkbGetKeyboard function.]) |
9ca4be21 GM |
1689 | fi |
1690 | ||
6e0dc84a | 1691 | AC_CHECK_FUNCS(XrmSetDatabase XScreenResourceString \ |
9ca4be21 | 1692 | XScreenNumberOfScreen XSetWMProtocols) |
9ec10b2f DM |
1693 | fi |
1694 | ||
08741ba9 | 1695 | if test "${window_system}" = "x11"; then |
4be21f66 | 1696 | AC_MSG_CHECKING(X11 version 6) |
fd0a060b | 1697 | AC_CACHE_VAL(emacs_cv_x11_version_6, |
e9b2a022 | 1698 | [AC_TRY_LINK([#include <X11/Xlib.h>], |
08741ba9 RS |
1699 | [#if XlibSpecificationRelease < 6 |
1700 | fail; | |
1701 | #endif | |
e9b2a022 | 1702 | ], emacs_cv_x11_version_6=yes, emacs_cv_x11_version_6=no)]) |
fd0a060b AS |
1703 | if test $emacs_cv_x11_version_6 = yes; then |
1704 | AC_MSG_RESULT(6 or newer) | |
5e384f3d DL |
1705 | AC_DEFINE(HAVE_X11R6, 1, |
1706 | [Define to 1 if you have the X11R6 or newer version of Xlib.]) | |
fd0a060b AS |
1707 | else |
1708 | AC_MSG_RESULT(before 6) | |
1709 | fi | |
08741ba9 RS |
1710 | fi |
1711 | ||
f7894e88 | 1712 | if test "${window_system}" = "x11"; then |
4be21f66 | 1713 | AC_MSG_CHECKING(X11 version 5) |
fd0a060b | 1714 | AC_CACHE_VAL(emacs_cv_x11_version_5, |
e9b2a022 | 1715 | [AC_TRY_LINK([#include <X11/Xlib.h>], |
4be21f66 KH |
1716 | [#if XlibSpecificationRelease < 5 |
1717 | fail; | |
1718 | #endif | |
e9b2a022 | 1719 | ], emacs_cv_x11_version_5=yes, emacs_cv_x11_version_5=no)]) |
fd0a060b AS |
1720 | if test $emacs_cv_x11_version_5 = yes; then |
1721 | AC_MSG_RESULT(5 or newer) | |
f7894e88 | 1722 | HAVE_X11R5=yes |
5e384f3d DL |
1723 | AC_DEFINE(HAVE_X11R5, 1, |
1724 | [Define to 1 if you have the X11R5 or newer version of Xlib.]) | |
fd0a060b | 1725 | else |
f7894e88 | 1726 | HAVE_X11R5=no |
fd0a060b AS |
1727 | AC_MSG_RESULT(before 5) |
1728 | fi | |
f7894e88 RS |
1729 | fi |
1730 | ||
bce97856 RS |
1731 | dnl Do not put whitespace before the #include statements below. |
1732 | dnl Older compilers (eg sunos4 cc) choke on it. | |
f7894e88 RS |
1733 | if test x"${USE_X_TOOLKIT}" = xmaybe; then |
1734 | if test x"${HAVE_X11R5}" = xyes; then | |
1735 | AC_MSG_CHECKING(X11 version 5 with Xaw) | |
fd0a060b | 1736 | AC_CACHE_VAL(emacs_cv_x11_version_5_with_xaw, |
e9b2a022 | 1737 | [AC_TRY_LINK([ |
bce97856 RS |
1738 | #include <X11/Intrinsic.h> |
1739 | #include <X11/Xaw/Simple.h>], | |
f7894e88 | 1740 | [], |
fd0a060b | 1741 | emacs_cv_x11_version_5_with_xaw=yes, |
e9b2a022 | 1742 | emacs_cv_x11_version_5_with_xaw=no)]) |
fd0a060b AS |
1743 | if test $emacs_cv_x11_version_5_with_xaw = yes; then |
1744 | AC_MSG_RESULT([5 or newer, with Xaw; use toolkit by default]) | |
1745 | USE_X_TOOLKIT=LUCID | |
1746 | else | |
1747 | AC_MSG_RESULT(before 5 or no Xaw; do not use toolkit by default) | |
1748 | USE_X_TOOLKIT=none | |
1749 | fi | |
f7894e88 RS |
1750 | else |
1751 | USE_X_TOOLKIT=none | |
1752 | fi | |
4be21f66 KH |
1753 | fi |
1754 | ||
1755 | X_TOOLKIT_TYPE=$USE_X_TOOLKIT | |
1756 | ||
9ec10b2f DM |
1757 | if test "${USE_X_TOOLKIT}" != "none"; then |
1758 | AC_MSG_CHECKING(X11 toolkit version) | |
fd0a060b | 1759 | AC_CACHE_VAL(emacs_cv_x11_toolkit_version_6, |
e9b2a022 | 1760 | [AC_TRY_LINK([#include <X11/Intrinsic.h>], |
9ec10b2f DM |
1761 | [#if XtSpecificationRelease < 6 |
1762 | fail; | |
1763 | #endif | |
e9b2a022 | 1764 | ], emacs_cv_x11_toolkit_version_6=yes, emacs_cv_x11_toolkit_version_6=no)]) |
fd0a060b AS |
1765 | HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6 |
1766 | if test $emacs_cv_x11_toolkit_version_6 = yes; then | |
1767 | AC_MSG_RESULT(6 or newer) | |
5e384f3d DL |
1768 | AC_DEFINE(HAVE_X11XTR6, 1, |
1769 | [Define to 1 if you have the X11R6 or newer version of Xt.]) | |
fd0a060b AS |
1770 | else |
1771 | AC_MSG_RESULT(before 6) | |
1772 | fi | |
6aad10e4 RS |
1773 | |
1774 | dnl If using toolkit, check whether libXmu.a exists. | |
1775 | dnl tranle@intellicorp.com says libXmu.a can need XtMalloc in libXt.a to link. | |
1776 | OLDLIBS="$LIBS" | |
fcc303f4 RS |
1777 | if test x$HAVE_X11XTR6 = xyes; then |
1778 | LIBS="-lXt -lSM -lICE $LIBS" | |
1779 | else | |
1780 | LIBS="-lXt $LIBS" | |
1781 | fi | |
6aad10e4 | 1782 | AC_CHECK_LIB(Xmu, XmuConvertStandardSelection) |
ad4ac636 GM |
1783 | test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS" |
1784 | fi | |
1785 | ||
1786 | # On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D. | |
1787 | if test "${HAVE_X11}" = "yes"; then | |
1788 | if test "${USE_X_TOOLKIT}" != "none"; then | |
1789 | AC_CHECK_LIB(Xext, XShapeQueryExtension) | |
1790 | fi | |
9ec10b2f DM |
1791 | fi |
1792 | ||
66d736a9 | 1793 | if test "${USE_X_TOOLKIT}" = "MOTIF"; then |
fd0a060b | 1794 | AC_CACHE_CHECK(for Motif version 2.1, emacs_cv_motif_version_2_1, |
e9b2a022 | 1795 | [AC_TRY_COMPILE([#include <Xm/Xm.h>], |
66d736a9 RS |
1796 | [#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1) |
1797 | int x = 5; | |
1798 | #else | |
1799 | Motif version prior to 2.1. | |
1800 | #endif], | |
e9b2a022 | 1801 | emacs_cv_motif_version_2_1=yes, emacs_cv_motif_version_2_1=no)]) |
fd0a060b AS |
1802 | HAVE_MOTIF_2_1=$emacs_cv_motif_version_2_1 |
1803 | if test $emacs_cv_motif_version_2_1 = yes; then | |
d96a4de3 | 1804 | HAVE_LIBXP=no |
5e384f3d DL |
1805 | AC_DEFINE(HAVE_MOTIF_2_1, 1, |
1806 | [Define to 1 if you have Motif 2.1 or newer.]) | |
ad4ac636 | 1807 | AC_CHECK_LIB(Xp, XpCreateContext, HAVE_LIBXP=yes) |
72d9b5b3 | 1808 | if test ${HAVE_LIBXP} = yes; then |
5e384f3d DL |
1809 | AC_DEFINE(HAVE_LIBXP, 1, |
1810 | [Define to 1 if you have the Xp library (-lXp).]) | |
72d9b5b3 | 1811 | fi |
fd0a060b | 1812 | fi |
66d736a9 RS |
1813 | fi |
1814 | ||
620fdfdf RS |
1815 | ### Is -lXaw3d available? |
1816 | HAVE_XAW3D=no | |
1817 | if test "${HAVE_X11}" = "yes"; then | |
1818 | if test "${USE_X_TOOLKIT}" != "none"; then | |
620fdfdf | 1819 | AC_CHECK_HEADER(X11/Xaw3d/Scrollbar.h, |
ad4ac636 | 1820 | AC_CHECK_LIB(Xaw3d, XawScrollbarSetThumb, HAVE_XAW3D=yes)) |
620fdfdf | 1821 | if test "${HAVE_XAW3D}" = "yes"; then |
5e384f3d DL |
1822 | AC_DEFINE(HAVE_XAW3D, 1, |
1823 | [Define to 1 if you have the Xaw3d library (-lXaw3d).]) | |
620fdfdf RS |
1824 | fi |
1825 | fi | |
1826 | fi | |
1827 | ||
0be97a72 GM |
1828 | dnl Use toolkit scroll bars if configured for X toolkit and either |
1829 | dnl using Motif or Xaw3d is available, and unless | |
1830 | dnl --with-toolkit-scroll-bars=no was specified. | |
1831 | ||
5e384f3d DL |
1832 | AH_TEMPLATE(USE_TOOLKIT_SCROLL_BARS, |
1833 | [Define to 1 if we should use toolkit scroll bars.])dnl | |
0be97a72 GM |
1834 | USE_TOOLKIT_SCROLL_BARS=no |
1835 | if test "${with_toolkit_scroll_bars}" != "no"; then | |
1836 | if test "${USE_X_TOOLKIT}" != "none"; then | |
1837 | if test "${USE_X_TOOLKIT}" = "MOTIF"; then | |
1838 | AC_DEFINE(USE_TOOLKIT_SCROLL_BARS) | |
1839 | HAVE_XAW3D=no | |
1840 | USE_TOOLKIT_SCROLL_BARS=yes | |
1841 | elif test "${HAVE_XAW3D}" = "yes"; then | |
1842 | AC_DEFINE(USE_TOOLKIT_SCROLL_BARS) | |
1843 | USE_TOOLKIT_SCROLL_BARS=yes | |
1844 | fi | |
1845 | fi | |
1846 | fi | |
1847 | ||
c6f7dae8 GM |
1848 | dnl Don't use X11 input methods if user specifies he doesn't want it |
1849 | dnl with `--with-xim=no'. | |
1850 | ||
1851 | if test "${with_xim}" != "no"; then | |
5e384f3d DL |
1852 | AC_DEFINE(USE_XIM, 1, |
1853 | [Define to 1 if we should use XIM, if it is available.]) | |
c6f7dae8 GM |
1854 | fi |
1855 | ||
620fdfdf RS |
1856 | ### Use -lXpm if available, unless `--with-xpm=no'. |
1857 | HAVE_XPM=no | |
1858 | if test "${HAVE_X11}" = "yes"; then | |
1859 | if test "${with_xpm}" != "no"; then | |
620fdfdf | 1860 | AC_CHECK_HEADER(X11/xpm.h, |
7960d0bd GM |
1861 | AC_CHECK_LIB(Xpm, XpmReadFileToPixmap, HAVE_XPM=yes, , -lX11)) |
1862 | if test "${HAVE_XPM}" = "yes"; then | |
29c1b68e GM |
1863 | AC_MSG_CHECKING(for XpmReturnAllocPixels preprocessor define) |
1864 | AC_EGREP_CPP(no_return_alloc_pixels, | |
1865 | [#include "X11/xpm.h" | |
7960d0bd GM |
1866 | #ifndef XpmReturnAllocPixels |
1867 | no_return_alloc_pixels | |
1868 | #endif | |
29c1b68e GM |
1869 | ], HAVE_XPM=no, HAVE_XPM=yes) |
1870 | ||
1871 | if test "${HAVE_XPM}" = "yes"; then | |
1872 | AC_MSG_RESULT(yes) | |
1873 | else | |
1874 | AC_MSG_RESULT(no) | |
1875 | fi | |
1890c0c4 | 1876 | fi |
620fdfdf RS |
1877 | fi |
1878 | ||
1879 | if test "${HAVE_XPM}" = "yes"; then | |
5e384f3d | 1880 | AC_DEFINE(HAVE_XPM, 1, [Define to 1 if you have the Xpm libary (-lXpm).]) |
620fdfdf RS |
1881 | fi |
1882 | fi | |
1883 | ||
1884 | ### Use -ljpeg if available, unless `--with-jpeg=no'. | |
1885 | HAVE_JPEG=no | |
1886 | if test "${HAVE_X11}" = "yes"; then | |
1887 | if test "${with_jpeg}" != "no"; then | |
3cc9d384 DL |
1888 | dnl Checking for jpeglib.h can lose becsue of a redefinition of |
1889 | dnl HAVE_STDLIB_H. | |
1890 | AC_CHECK_HEADER(jerror.h, | |
ad4ac636 | 1891 | AC_CHECK_LIB(jpeg, jpeg_destroy_compress, HAVE_JPEG=yes)) |
620fdfdf RS |
1892 | fi |
1893 | ||
5e384f3d | 1894 | AH_TEMPLATE(HAVE_JPEG, [Define to 1 if you have the jpeg library (-ljpeg).])dnl |
620fdfdf RS |
1895 | if test "${HAVE_JPEG}" = "yes"; then |
1896 | AC_DEFINE(HAVE_JPEG) | |
5e384f3d DL |
1897 | AC_EGREP_CPP( |
1898 | changequote({, })dnl avoid leadingspace on the next line | |
1899 | {version= *(6[2-9]|[7-9][0-9])}, | |
1900 | changequote([, ])dnl | |
1901 | [#include <jpeglib.h> | |
1902 | version=JPEG_LIB_VERSION | |
1903 | ], | |
1904 | AC_DEFINE(HAVE_JPEG), | |
1905 | [AC_MSG_WARN([libjpeg found, but not version 6b or later]) | |
1906 | HAVE_JPEG=no]) | |
620fdfdf RS |
1907 | fi |
1908 | fi | |
1909 | ||
1910 | ### Use -lpng if available, unless `--with-png=no'. | |
1911 | HAVE_PNG=no | |
1912 | if test "${HAVE_X11}" = "yes"; then | |
1913 | if test "${with_png}" != "no"; then | |
620fdfdf | 1914 | AC_CHECK_HEADER(png.h, |
ad4ac636 | 1915 | AC_CHECK_LIB(png, png_get_channels, HAVE_PNG=yes, , -lz -lm)) |
620fdfdf RS |
1916 | fi |
1917 | ||
1918 | if test "${HAVE_PNG}" = "yes"; then | |
5e384f3d | 1919 | AC_DEFINE(HAVE_PNG, 1, [Define to 1 if you have the png library (-lpng).]) |
620fdfdf RS |
1920 | fi |
1921 | fi | |
1922 | ||
1923 | ### Use -ltiff if available, unless `--with-tiff=no'. | |
1924 | HAVE_TIFF=no | |
1925 | if test "${HAVE_X11}" = "yes"; then | |
1926 | if test "${with_tiff}" != "no"; then | |
620fdfdf | 1927 | AC_CHECK_HEADER(tiffio.h, |
ad4ac636 | 1928 | tifflibs="-lz -lm" |
3b3cc4a4 KR |
1929 | # At least one tiff package requires the jpeg library. |
1930 | if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi | |
1931 | AC_CHECK_LIB(tiff, TIFFGetVersion, HAVE_TIFF=yes, , $tifflibs)) | |
620fdfdf RS |
1932 | fi |
1933 | ||
1934 | if test "${HAVE_TIFF}" = "yes"; then | |
5e384f3d | 1935 | AC_DEFINE(HAVE_TIFF, 1, [Define to 1 if you have the tiff library (-ltiff).]) |
620fdfdf RS |
1936 | fi |
1937 | fi | |
1938 | ||
1939 | ### Use -lgif if available, unless `--with-gif=no'. | |
1940 | HAVE_GIF=no | |
1941 | if test "${HAVE_X11}" = "yes"; then | |
1942 | if test "${with_gif}" != "no"; then | |
620fdfdf | 1943 | AC_CHECK_HEADER(gif_lib.h, |
612f72a6 DL |
1944 | # EGifPutExtensionLast only exists from version libungif-4.1.0b1. |
1945 | # Earlier versions can crash Emacs. | |
1946 | AC_CHECK_LIB(ungif, EGifPutExtensionLast, HAVE_GIF=yes)) | |
620fdfdf RS |
1947 | fi |
1948 | ||
1949 | if test "${HAVE_GIF}" = "yes"; then | |
5e384f3d | 1950 | AC_DEFINE(HAVE_GIF, 1, [Define to 1 if you have the ungif library (-lungif).]) |
620fdfdf RS |
1951 | fi |
1952 | fi | |
1953 | ||
9ec10b2f | 1954 | # If netdb.h doesn't declare h_errno, we must declare it by hand. |
fd0a060b AS |
1955 | AC_CACHE_CHECK(whether netdb declares h_errno, |
1956 | emacs_cv_netdb_declares_h_errno, | |
e9b2a022 | 1957 | [AC_TRY_LINK([#include <netdb.h>], |
01345308 | 1958 | [return h_errno;], |
e9b2a022 | 1959 | emacs_cv_netdb_declares_h_errno=yes, emacs_cv_netdb_declares_h_errno=no)]) |
fd0a060b | 1960 | if test $emacs_cv_netdb_declares_h_errno = yes; then |
5e384f3d | 1961 | AC_DEFINE(HAVE_H_ERRNO, 1, [Define to 1 if netdb.h declares h_errno.]) |
fd0a060b | 1962 | fi |
9ec10b2f | 1963 | |
6e0dc84a | 1964 | AC_FUNC_ALLOCA |
9ec10b2f | 1965 | |
f6e8adea | 1966 | # fmod, logb, and frexp are found in -lm on most systems. |
e468fb38 | 1967 | # On HPUX 9.01, -lm does not contain logb, so check for sqrt. |
e6fd9047 | 1968 | AC_CHECK_LIB(m, sqrt) |
e6fd9047 | 1969 | |
4e4db900 | 1970 | # Check for mail-locking functions in a "mail" library |
5ad9ac92 DL |
1971 | AC_CHECK_LIB(mail, maillock) |
1972 | dnl Debian, at least: | |
1973 | dnl AC_CHECK_LIB(lockfile, maillock, [AC_DEFINE(HAVE_LIBMAIL)]) | |
1974 | AC_CHECK_LIB(lockfile, maillock) | |
1975 | # If we have the shared liblockfile, assume we must use it for mail | |
1976 | # locking (e.g. Debian). If we couldn't link against liblockfile | |
1977 | # (no liblockfile.a installed), ensure that we don't need to. | |
1978 | if test "$ac_cv_lib_lockfile_maillock" = no; then | |
1979 | dnl This works for files generally, not just executables. | |
1980 | dnl Should we look elsewhere for it? Maybe examine /etc/ld.so.conf? | |
1981 | AC_CHECK_PROG(liblockfile, liblockfile.so, yes, no, | |
1982 | /usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH) | |
1983 | if test $ac_cv_prog_liblockfile = yes; then | |
1984 | AC_MSG_ERROR([Shared liblockfile found but can't link against it. | |
1985 | This probably means that movemail could lose mail. | |
1986 | There may be a \`development' package to install containing liblockfile.]) | |
5e384f3d | 1987 | else AC_DEFINE(LIBMAIL, -llockfile, [Define to -llockfile if it is usable.]) |
5ad9ac92 DL |
1988 | fi |
1989 | else : | |
1990 | fi | |
1991 | AC_CHECK_FUNCS(touchlock) | |
1992 | AC_CHECK_HEADERS(maillock.h) | |
4e4db900 | 1993 | |
8a2c2328 | 1994 | AC_CHECK_FUNCS(gethostname getdomainname dup2 \ |
1effc2cb | 1995 | rename closedir mkdir rmdir sysinfo \ |
fd4bc671 | 1996 | random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime res_init setsid \ |
85ea1a28 | 1997 | strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \ |
290c1191 | 1998 | utimes setrlimit setpgid getcwd getwd shutdown strftime getaddrinfo \ |
ec406751 | 1999 | __fpending mblen mbrlen mbsinit strsignal setitimer ualarm index rindex \ |
5e384f3d | 2000 | gai_strerror mkstemp mremap memmove) |
38c44a91 DL |
2001 | |
2002 | AC_FUNC_MKTIME | |
2003 | if test "$ac_cv_func_working_mktime" = no; then | |
5e384f3d | 2004 | AC_DEFINE(BROKEN_MKTIME, 1, [Define to 1 if the mktime function is broken.]) |
38c44a91 DL |
2005 | fi |
2006 | ||
1ca2077a DL |
2007 | AC_FUNC_GETLOADAVG |
2008 | ||
64a04a42 | 2009 | AC_FUNC_FSEEKO |
63c59d1e | 2010 | |
64a04a42 | 2011 | # UNIX98 PTYs. |
40ccc4c7 GM |
2012 | AC_CHECK_FUNCS(grantpt) |
2013 | ||
2014 | # PTY-related GNU extensions. | |
2015 | AC_CHECK_FUNCS(getpt) | |
2016 | ||
16831d8c RS |
2017 | # Check this now, so that we will NOT find the above functions in ncurses. |
2018 | # That is because we have not set up to link ncurses in lib-src. | |
2019 | # It's better to believe a function is not available | |
2020 | # than to expect to find it in ncurses. | |
2021 | AC_CHECK_LIB(ncurses, tparm) | |
0c565a0a | 2022 | |
84e70f78 KR |
2023 | # Do we need the Hesiod library to provide the support routines? |
2024 | if test "$with_hesiod" = yes ; then | |
2025 | # Don't set $LIBS here -- see comments above. | |
2026 | resolv=no | |
2027 | AC_CHECK_FUNC(res_send, , [AC_CHECK_FUNC(__res_send, , | |
2028 | [AC_CHECK_LIB(resolv, res_send, resolv=yes, | |
2029 | [AC_CHECK_LIB(resolv, __res_send, resolv=yes)])])]) | |
2030 | if test "$resolv" = yes ; then | |
2031 | RESOLVLIB=-lresolv | |
5e384f3d DL |
2032 | AC_DEFINE(HAVE_LIBRESOLV, 1, |
2033 | [Define to 1 if you have the resolv library (-lresolv).]) | |
84e70f78 KR |
2034 | else |
2035 | RESOLVLIB= | |
2036 | fi | |
2037 | AC_CHECK_FUNC(hes_getmailhost, , [AC_CHECK_LIB(hesiod, hes_getmailhost, | |
5e384f3d DL |
2038 | AC_DEFINE(HAVE_LIBHESIOD, 1, |
2039 | [Define to 1 if you have the hesiod library (-lhesiod).]), | |
2040 | :, $RESOLVLIB)]) | |
84e70f78 KR |
2041 | fi |
2042 | ||
a21616bd KR |
2043 | # These tell us which Kerberos-related libraries to use. |
2044 | if test "${with_kerberos+set}" = set; then | |
2045 | AC_CHECK_LIB(com_err, com_err) | |
2046 | AC_CHECK_LIB(k5crypto, mit_des_cbc_encrypt) | |
2047 | AC_CHECK_LIB(crypto, mit_des_cbc_encrypt) | |
2048 | AC_CHECK_LIB(krb5, krb5_init_context) | |
2049 | if test "${with_kerberos5+set}" != set; then | |
2050 | AC_CHECK_LIB(des425, des_cbc_encrypt,, | |
2051 | AC_CHECK_LIB(des, des_cbc_encrypt)) | |
2052 | AC_CHECK_LIB(krb4, krb_get_cred,, | |
2053 | AC_CHECK_LIB(krb, krb_get_cred)) | |
2054 | fi | |
2055 | ||
2056 | if test "${with_kerberos5+set}" = set; then | |
2057 | AC_CHECK_HEADERS(krb5.h) | |
2058 | else | |
2059 | AC_CHECK_HEADERS(des.h,, | |
5a129faf PE |
2060 | [AC_CHECK_HEADERS(kerberosIV/des.h,, |
2061 | [AC_CHECK_HEADERS(kerberos/des.h)])]) | |
a21616bd | 2062 | AC_CHECK_HEADERS(krb.h,, |
5a129faf PE |
2063 | [AC_CHECK_HEADERS(kerberosIV/krb.h,, |
2064 | [AC_CHECK_HEADERS(kerberos/krb.h)])]) | |
a21616bd KR |
2065 | fi |
2066 | AC_CHECK_HEADERS(com_err.h) | |
2067 | fi | |
2068 | ||
c4510052 PE |
2069 | # Solaris requires -lintl if you want strerror (which calls dgettext) |
2070 | # to return localized messages. | |
2071 | AC_CHECK_LIB(intl, dgettext) | |
2072 | ||
0c565a0a RS |
2073 | AC_MSG_CHECKING(whether localtime caches TZ) |
2074 | AC_CACHE_VAL(emacs_cv_localtime_cache, | |
fcc303f4 | 2075 | [if test x$ac_cv_func_tzset = xyes; then |
0c565a0a | 2076 | AC_TRY_RUN([#include <time.h> |
22cc077c RS |
2077 | extern char **environ; |
2078 | unset_TZ () | |
2079 | { | |
2080 | char **from, **to; | |
2081 | for (to = from = environ; (*to = *from); from++) | |
2082 | if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '=')) | |
2083 | to++; | |
2084 | } | |
98ab445d RS |
2085 | char TZ_GMT0[] = "TZ=GMT0"; |
2086 | char TZ_PST8[] = "TZ=PST8"; | |
0c565a0a RS |
2087 | main() |
2088 | { | |
2089 | time_t now = time ((time_t *) 0); | |
22cc077c | 2090 | int hour_GMT0, hour_unset; |
98ab445d | 2091 | if (putenv (TZ_GMT0) != 0) |
0c565a0a | 2092 | exit (1); |
22cc077c RS |
2093 | hour_GMT0 = localtime (&now)->tm_hour; |
2094 | unset_TZ (); | |
2095 | hour_unset = localtime (&now)->tm_hour; | |
98ab445d | 2096 | if (putenv (TZ_PST8) != 0) |
0c565a0a | 2097 | exit (1); |
22cc077c RS |
2098 | if (localtime (&now)->tm_hour == hour_GMT0) |
2099 | exit (1); | |
2100 | unset_TZ (); | |
2101 | if (localtime (&now)->tm_hour != hour_unset) | |
2102 | exit (1); | |
2103 | exit (0); | |
0c565a0a RS |
2104 | }], emacs_cv_localtime_cache=no, emacs_cv_localtime_cache=yes, |
2105 | [# If we have tzset, assume the worst when cross-compiling. | |
2106 | emacs_cv_localtime_cache=yes]) | |
2107 | else | |
2108 | # If we lack tzset, report that localtime does not cache TZ, | |
2109 | # since we can't invalidate the cache if we don't have tzset. | |
2110 | emacs_cv_localtime_cache=no | |
2111 | fi])dnl | |
2112 | AC_MSG_RESULT($emacs_cv_localtime_cache) | |
2113 | if test $emacs_cv_localtime_cache = yes; then | |
5e384f3d DL |
2114 | AC_DEFINE(LOCALTIME_CACHE, 1, |
2115 | [Define to 1 if localtime caches TZ.]) | |
0c565a0a | 2116 | fi |
9ec10b2f | 2117 | |
3d68df05 | 2118 | if test "x$HAVE_TIMEVAL" = xyes; then |
8a2c2328 | 2119 | AC_CHECK_FUNCS(gettimeofday) |
5e384f3d DL |
2120 | if test $ac_cv_func_gettimeofday = yes; then |
2121 | AC_CACHE_CHECK(whether gettimeofday can accept two arguments, | |
2122 | emacs_cv_gettimeofday_two_arguments, | |
2123 | [AC_TRY_COMPILE([ | |
5ab52d42 RS |
2124 | #ifdef TIME_WITH_SYS_TIME |
2125 | #include <sys/time.h> | |
2126 | #include <time.h> | |
2127 | #else | |
2128 | #ifdef HAVE_SYS_TIME_H | |
2129 | #include <sys/time.h> | |
2130 | #else | |
2131 | #include <time.h> | |
2132 | #endif | |
290c1191 | 2133 | #endif], |
5e384f3d DL |
2134 | [struct timeval time; |
2135 | gettimeofday (&time, 0);], | |
2136 | emacs_cv_gettimeofday_two_arguments=yes, | |
2137 | emacs_cv_gettimeofday_two_arguments=no)]) | |
2138 | if test $emacs_cv_gettimeofday_two_arguments = no; then | |
2139 | AC_DEFINE(GETTIMEOFDAY_ONE_ARGUMENT, 1, | |
2140 | [Define to 1 if gettimeofday accepts only one argument.]) | |
2141 | fi | |
fd0a060b | 2142 | fi |
5ab52d42 RS |
2143 | fi |
2144 | ||
8a2c2328 DL |
2145 | dnl Note that AC_STRUCT_TIMEZONE doesn't do what you might expect. |
2146 | if test "$ac_cv_func_gettimeofday" = yes; then | |
2147 | AC_CACHE_CHECK([for struct timezone], emacs_cv_struct_timezone, | |
2148 | [AC_TRY_COMPILE([#include <sys/time.h>], | |
2149 | [struct timezone tz;], | |
2150 | dnl It may be that we can't call gettimeofday with a non-null pointer, | |
2151 | dnl even though we have struct timezone (e.g. HPUX). In that case | |
2152 | dnl we'll lie about struct timezone. | |
2153 | [AC_TRY_RUN([ | |
2154 | #ifdef TIME_WITH_SYS_TIME | |
2155 | #include <sys/time.h> | |
2156 | #include <time.h> | |
2157 | #else | |
2158 | #ifdef HAVE_SYS_TIME_H | |
2159 | #include <sys/time.h> | |
2160 | #else | |
2161 | #include <time.h> | |
2162 | #endif | |
2163 | #endif | |
2164 | main () { | |
2165 | struct timeval time; | |
2166 | struct timezone dummy; | |
2167 | exit (gettimeofday (&time, &dummy)); | |
2168 | }], | |
2169 | emacs_cv_struct_timezone=yes, | |
2170 | emacs_cv_struct_timezone=no, emacs_cv_struct_timezone=yes)], | |
2171 | emacs_cv_struct_timezone=no)]) | |
2172 | fi | |
2173 | ||
9ec10b2f | 2174 | ok_so_far=yes |
6e0dc84a | 2175 | AC_CHECK_FUNC(socket, , ok_so_far=no) |
9ec10b2f | 2176 | if test $ok_so_far = yes; then |
6e0dc84a | 2177 | AC_CHECK_HEADER(netinet/in.h, , ok_so_far=no) |
9ec10b2f DM |
2178 | fi |
2179 | if test $ok_so_far = yes; then | |
6e0dc84a | 2180 | AC_CHECK_HEADER(arpa/inet.h, , ok_so_far=no) |
9ec10b2f DM |
2181 | fi |
2182 | if test $ok_so_far = yes; then | |
5e384f3d DL |
2183 | AC_DEFINE(HAVE_INET_SOCKETS, 1, |
2184 | [Define to 1 if you have inet sockets.]) | |
9ec10b2f DM |
2185 | fi |
2186 | ||
7bbbba31 | 2187 | if test -f /usr/lpp/X11/bin/smt.exp; then |
5e384f3d DL |
2188 | AC_DEFINE(HAVE_AIX_SMT_EXP, 1, |
2189 | [Define to 1 if the file /usr/lpp/X11/bin/smt.exp exists.]) | |
7bbbba31 DM |
2190 | fi |
2191 | ||
27b07953 GM |
2192 | AC_MSG_CHECKING(whether system supports dynamic ptys) |
2193 | if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then | |
2194 | AC_MSG_RESULT(yes) | |
5e384f3d | 2195 | AC_DEFINE(HAVE_DEV_PTMX, 1, [Define to 1 if dynamic ptys are supported.]) |
27b07953 GM |
2196 | else |
2197 | AC_MSG_RESULT(no) | |
2198 | fi | |
2199 | ||
5a129faf | 2200 | AC_FUNC_FORK |
612f72a6 DL |
2201 | dnl Adapted from Haible's version. |
2202 | AC_CACHE_CHECK([for nl_langinfo and CODESET], emacs_cv_langinfo_codeset, | |
2203 | [AC_TRY_LINK([#include <langinfo.h>], | |
2204 | [char* cs = nl_langinfo(CODESET);], | |
2205 | emacs_cv_langinfo_codeset=yes, | |
2206 | emacs_cv_langinfo_codeset=no) | |
2207 | ]) | |
2208 | if test $emacs_cv_langinfo_codeset = yes; then | |
2209 | AC_DEFINE(HAVE_LANGINFO_CODESET, 1, | |
2210 | [Define if you have <langinfo.h> and nl_langinfo(CODESET).]) | |
2211 | fi | |
79e12078 | 2212 | |
612f72a6 | 2213 | AC_CHECK_TYPES(size_t) |
8170f46b | 2214 | |
9ec10b2f DM |
2215 | # Set up the CFLAGS for real compilation, so we can substitute it. |
2216 | CFLAGS="$REAL_CFLAGS" | |
5a9bf171 | 2217 | CPPFLAGS="$REAL_CPPFLAGS" |
9ec10b2f DM |
2218 | |
2219 | changequote(, )dnl | |
2220 | #### Find out which version of Emacs this is. | |
2221 | version=`grep 'defconst[ ]*emacs-version' ${srcdir}/lisp/version.el \ | |
2222 | | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'` | |
2223 | changequote([, ])dnl | |
2224 | if test x"${version}" = x; then | |
2225 | AC_MSG_ERROR(can't find current emacs version in \`${srcdir}/lisp/version.el'.) | |
2226 | fi | |
2227 | ||
9ec10b2f DM |
2228 | ### Specify what sort of things we'll be editing into Makefile and config.h. |
2229 | ### Use configuration here uncanonicalized to avoid exceeding size limits. | |
2230 | AC_SUBST(version) | |
2231 | AC_SUBST(configuration) | |
3cd69289 | 2232 | AC_SUBST(canonical) |
9ec10b2f DM |
2233 | AC_SUBST(srcdir) |
2234 | AC_SUBST(prefix) | |
2235 | AC_SUBST(exec_prefix) | |
2236 | AC_SUBST(bindir) | |
2237 | AC_SUBST(datadir) | |
3cd69289 DM |
2238 | AC_SUBST(sharedstatedir) |
2239 | AC_SUBST(libexecdir) | |
9ec10b2f DM |
2240 | AC_SUBST(mandir) |
2241 | AC_SUBST(infodir) | |
2242 | AC_SUBST(lispdir) | |
2243 | AC_SUBST(locallisppath) | |
2244 | AC_SUBST(lisppath) | |
66d736a9 | 2245 | AC_SUBST(x_default_search_path) |
9ec10b2f | 2246 | AC_SUBST(etcdir) |
9ec10b2f DM |
2247 | AC_SUBST(archlibdir) |
2248 | AC_SUBST(docdir) | |
3cd69289 | 2249 | AC_SUBST(bitmapdir) |
9ec10b2f DM |
2250 | AC_SUBST(c_switch_system) |
2251 | AC_SUBST(c_switch_machine) | |
2252 | AC_SUBST(LD_SWITCH_X_SITE) | |
2253 | AC_SUBST(LD_SWITCH_X_SITE_AUX) | |
2254 | AC_SUBST(C_SWITCH_X_SITE) | |
2255 | AC_SUBST(CFLAGS) | |
2256 | AC_SUBST(X_TOOLKIT_TYPE) | |
2257 | AC_SUBST(machfile) | |
2258 | AC_SUBST(opsysfile) | |
1ca2077a | 2259 | AC_SUBST(GETLOADAVG_LIBS) |
9ec10b2f | 2260 | |
5e384f3d DL |
2261 | AC_DEFINE_UNQUOTED(EMACS_CONFIGURATION, "${canonical}", |
2262 | [Define to the canonical Emacs configuration name.]) | |
2263 | AC_DEFINE_UNQUOTED(EMACS_CONFIG_OPTIONS, "${ac_configure_args}", | |
2264 | [Define to the options passed to configure.]) | |
2265 | AC_DEFINE_UNQUOTED(config_machfile, "${machfile}", | |
2266 | [Define to the used machine dependent file.]) | |
2267 | AC_DEFINE_UNQUOTED(config_opsysfile, "${opsysfile}", | |
2268 | [Define to the used os dependent file.]) | |
2269 | AC_DEFINE_UNQUOTED(LD_SWITCH_X_SITE, ${LD_SWITCH_X_SITE}, | |
2270 | [Define LD_SWITCH_X_SITE to contain any special flags your loader | |
2271 | may need to deal with X Windows. For instance, if you've defined | |
2272 | HAVE_X_WINDOWS above and your X libraries aren't in a place that | |
2273 | your loader can find on its own, you might want to add "-L/..." or | |
2274 | something similar.]) | |
2275 | AC_DEFINE_UNQUOTED(LD_SWITCH_X_SITE_AUX, ${LD_SWITCH_X_SITE_AUX}, | |
2276 | [Define LD_SWITCH_X_SITE_AUX with an -R option | |
2277 | in case it's needed (for Solaris, for example).]) | |
2278 | AC_DEFINE_UNQUOTED(C_SWITCH_X_SITE, ${C_SWITCH_X_SITE}, | |
2279 | [Define C_SWITCH_X_SITE to contain any special flags your compiler | |
2280 | may need to deal with X Windows. For instance, if you've defined | |
2281 | HAVE_X_WINDOWS above and your X include files aren't in a place | |
2282 | that your compiler can find on its own, you might want to add | |
2283 | "-I/..." or something similar.]) | |
2284 | AC_DEFINE_UNQUOTED(UNEXEC_SRC, ${UNEXEC_SRC}, | |
2285 | [Define to the unexec source file name.]) | |
9ec10b2f DM |
2286 | |
2287 | if test "${HAVE_X_WINDOWS}" = "yes" ; then | |
5e384f3d DL |
2288 | AC_DEFINE(HAVE_X_WINDOWS, 1, |
2289 | [Define to 1 if you want to use the X window system.]) | |
9ec10b2f DM |
2290 | fi |
2291 | if test "${USE_X_TOOLKIT}" != "none" ; then | |
5e384f3d | 2292 | AC_DEFINE(USE_X_TOOLKIT, 1, [Define to 1 if using an X toolkit.]) |
9ec10b2f DM |
2293 | fi |
2294 | if test "${HAVE_X11}" = "yes" ; then | |
5e384f3d DL |
2295 | AC_DEFINE(HAVE_X11, 1, |
2296 | [Define to 1 if you want to use version 11 of X windows. | |
2297 | Otherwise, Emacs expects to use version 10.]) | |
9ec10b2f DM |
2298 | fi |
2299 | if test "${HAVE_XFREE386}" = "yes" ; then | |
5e384f3d | 2300 | AC_DEFINE(HAVE_XFREE386, 1, [Define to 1 if you're using XFree386.]) |
9ec10b2f | 2301 | fi |
08741ba9 | 2302 | if test "${HAVE_MENUS}" = "yes" ; then |
5e384f3d DL |
2303 | AC_DEFINE(HAVE_MENUS, 1, |
2304 | [Define to 1 if you have mouse menus. | |
2305 | (This is automatic if you use X, but the option to specify it remains.) | |
2306 | It is also defined with other window systems that support xmenu.c.]) | |
9ec10b2f DM |
2307 | fi |
2308 | if test "${GNU_MALLOC}" = "yes" ; then | |
5e384f3d DL |
2309 | AC_DEFINE(GNU_MALLOC, 1, |
2310 | [Define to 1 if you want to use the GNU memory allocator.]) | |
9ec10b2f DM |
2311 | fi |
2312 | if test "${REL_ALLOC}" = "yes" ; then | |
5e384f3d DL |
2313 | AC_DEFINE(REL_ALLOC, 1, |
2314 | [Define REL_ALLOC if you want to use the relocating allocator for | |
2315 | buffer space.]) | |
9ec10b2f | 2316 | fi |
9ec10b2f | 2317 | |
f0f2756d | 2318 | AC_CHECK_HEADERS(nlist.h, [AC_DEFINE(NLIST_STRUCT, 1, |
5e384f3d DL |
2319 | [Define to 1 if you have <nlist.h>.])]) |
2320 | ||
0642c253 DL |
2321 | AH_TOP([/* GNU Emacs site configuration template file. |
2322 | Copyright (C) 1988, 93, 94, 99, 2000, 2002 Free Software Foundation, Inc. | |
5e384f3d DL |
2323 | |
2324 | This file is part of GNU Emacs. | |
2325 | ||
2326 | GNU Emacs is free software; you can redistribute it and/or modify | |
2327 | it under the terms of the GNU General Public License as published by | |
2328 | the Free Software Foundation; either version 2, or (at your option) | |
2329 | any later version. | |
2330 | ||
2331 | GNU Emacs is distributed in the hope that it will be useful, | |
2332 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
2333 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
2334 | GNU General Public License for more details. | |
2335 | ||
2336 | You should have received a copy of the GNU General Public License | |
2337 | along with GNU Emacs; see the file COPYING. If not, write to the | |
2338 | Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
2339 | Boston, MA 02111-1307, USA. */ | |
2340 | ||
2341 | ||
2342 | /* No code in Emacs #includes config.h twice, but some of the code | |
2343 | intended to work with other packages as well (like gmalloc.c) | |
2344 | think they can include it as many times as they like. */ | |
2345 | #ifndef EMACS_CONFIG_H | |
2346 | #define EMACS_CONFIG_H | |
2347 | ])dnl | |
2348 | ||
2349 | AH_BOTTOM([ | |
2350 | /* If we're using any sort of window system, define some consequences. */ | |
2351 | #ifdef HAVE_X_WINDOWS | |
2352 | #define HAVE_WINDOW_SYSTEM | |
2353 | #define MULTI_KBOARD | |
2354 | #define HAVE_MOUSE | |
2355 | #endif | |
2356 | ||
2357 | /* If we're using the Carbon API on Mac OS X, define a few more | |
2358 | variables as well. */ | |
2359 | #ifdef HAVE_CARBON | |
2360 | #define HAVE_WINDOW_SYSTEM | |
2361 | #define HAVE_MOUSE | |
2362 | #define HAVE_MENUS | |
2363 | #endif | |
2364 | ||
2365 | /* Define USER_FULL_NAME to return a string | |
2366 | that is the user's full name. | |
2367 | It can assume that the variable `pw' | |
2368 | points to the password file entry for this user. | |
2369 | ||
2370 | At some sites, the pw_gecos field contains | |
2371 | the user's full name. If neither this nor any other | |
2372 | field contains the right thing, use pw_name, | |
2373 | giving the user's login name, since that is better than nothing. */ | |
2374 | #define USER_FULL_NAME pw->pw_gecos | |
2375 | ||
2376 | /* Define AMPERSAND_FULL_NAME if you use the convention | |
2377 | that & in the full name stands for the login id. */ | |
2378 | /* Turned on June 1996 supposing nobody will mind it. */ | |
2379 | #define AMPERSAND_FULL_NAME | |
2380 | ||
2381 | /* Define HAVE_SOUND if we have sound support. We know it works | |
2382 | and compiles only on the specified platforms. For others, | |
2383 | it probably doesn't make sense to try. */ | |
2384 | ||
2385 | #if defined __FreeBSD__ || defined __NetBSD__ || defined __linux__ | |
2386 | #ifdef HAVE_MACHINE_SOUNDCARD_H | |
2387 | #define HAVE_SOUND 1 | |
2388 | #endif | |
2389 | #ifdef HAVE_SYS_SOUNDCARD_H | |
2390 | #define HAVE_SOUND 1 | |
2391 | #endif | |
2392 | #ifdef HAVE_SOUNDCARD_H | |
2393 | #define HAVE_SOUND 1 | |
2394 | #endif | |
2395 | #endif /* __FreeBSD__ || __NetBSD__ || __linux__ */ | |
2396 | ||
2397 | /* If using GNU, then support inline function declarations. */ | |
2398 | /* Don't try to switch on inline handling as detected by AC_C_INLINE | |
2399 | generally, because even if non-gcc compilers accept `inline', they | |
2400 | may reject `extern inline'. */ | |
2401 | #ifdef __GNUC__ | |
2402 | #define INLINE __inline__ | |
2403 | #else | |
2404 | #define INLINE | |
2405 | #endif | |
2406 | ||
2407 | /* Include the os and machine dependent files. */ | |
2408 | #include config_opsysfile | |
2409 | #include config_machfile | |
2410 | ||
2411 | /* Load in the conversion definitions if this system | |
2412 | needs them and the source file being compiled has not | |
2413 | said to inhibit this. There should be no need for you | |
2414 | to alter these lines. */ | |
2415 | ||
2416 | #ifdef SHORTNAMES | |
2417 | #ifndef NO_SHORTNAMES | |
2418 | #include "../shortnames/remap.h" | |
2419 | #endif /* not NO_SHORTNAMES */ | |
2420 | #endif /* SHORTNAMES */ | |
2421 | ||
2422 | /* If no remapping takes place, static variables cannot be dumped as | |
2423 | pure, so don't worry about the `static' keyword. */ | |
2424 | #ifdef NO_REMAP | |
2425 | #undef static | |
2426 | #endif | |
2427 | ||
2428 | /* Define `subprocesses' should be defined if you want to | |
2429 | have code for asynchronous subprocesses | |
2430 | (as used in M-x compile and M-x shell). | |
2431 | These do not work for some USG systems yet; | |
2432 | for the ones where they work, the s/SYSTEM.h file defines this flag. */ | |
2433 | ||
2434 | #ifndef VMS | |
2435 | #ifndef USG | |
2436 | /* #define subprocesses */ | |
2437 | #endif | |
2438 | #endif | |
2439 | ||
2440 | /* SIGTYPE is the macro we actually use. */ | |
2441 | #ifndef SIGTYPE | |
2442 | #define SIGTYPE RETSIGTYPE | |
2443 | #endif | |
2444 | ||
2445 | #ifdef emacs /* Don't do this for lib-src. */ | |
2446 | /* Tell regex.c to use a type compatible with Emacs. */ | |
2447 | #define RE_TRANSLATE_TYPE Lisp_Object | |
2448 | #define RE_TRANSLATE(TBL, C) CHAR_TABLE_TRANSLATE (TBL, C) | |
2449 | #define RE_TRANSLATE_P(TBL) (XFASTINT (TBL) != 0) | |
2450 | #endif | |
2451 | ||
2452 | /* Avoid link-time collision with system mktime if we will use our own. */ | |
2453 | #if ! HAVE_MKTIME || BROKEN_MKTIME | |
2454 | #define mktime emacs_mktime | |
2455 | #endif | |
2456 | ||
2457 | /* The rest of the code currently tests the CPP symbol BSTRING. | |
2458 | Override any claims made by the system-description files. | |
2459 | Note that on some SCO version it is possible to have bcopy and not bcmp. */ | |
2460 | #undef BSTRING | |
2461 | #if defined (HAVE_BCOPY) && defined (HAVE_BCMP) | |
2462 | #define BSTRING | |
2463 | #endif | |
2464 | ||
2465 | /* Some of the files of Emacs which are intended for use with other | |
2466 | programs assume that if you have a config.h file, you must declare | |
2467 | the type of getenv. | |
2468 | ||
2469 | This declaration shouldn't appear when alloca.s or Makefile.in | |
2470 | includes config.h. */ | |
2471 | #ifndef NOT_C_CODE | |
2472 | extern char *getenv (); | |
2473 | #endif | |
2474 | ||
2475 | #endif /* EMACS_CONFIG_H */ | |
2476 | ||
2477 | /* These default definitions are good for almost all machines. | |
2478 | The exceptions override them in m/MACHINE.h. */ | |
2479 | ||
2480 | #ifndef BITS_PER_CHAR | |
2481 | #define BITS_PER_CHAR 8 | |
2482 | #endif | |
2483 | ||
2484 | #ifndef BITS_PER_SHORT | |
2485 | #define BITS_PER_SHORT 16 | |
2486 | #endif | |
2487 | ||
2488 | /* Note that lisp.h uses this in a preprocessor conditional, so it | |
2489 | would not work to use sizeof. That being so, we do all of them | |
2490 | without sizeof, for uniformity's sake. */ | |
2491 | #ifndef BITS_PER_INT | |
2492 | #define BITS_PER_INT 32 | |
2493 | #endif | |
2494 | ||
2495 | #ifndef BITS_PER_LONG | |
2496 | #ifdef _LP64 | |
2497 | #define BITS_PER_LONG 64 | |
2498 | #else | |
2499 | #define BITS_PER_LONG 32 | |
2500 | #endif | |
2501 | #endif | |
2502 | ||
2503 | /* Define if the compiler supports function prototypes. It may do so | |
2504 | but not define __STDC__ (e.g. DEC C by default) or may define it as | |
2505 | zero. */ | |
2506 | #undef PROTOTYPES | |
2507 | /* For mktime.c: */ | |
2508 | #ifndef __P | |
2509 | # if defined PROTOTYPES | |
2510 | # define __P(args) args | |
2511 | # else | |
2512 | # define __P(args) () | |
2513 | # endif /* GCC. */ | |
2514 | #endif /* __P */ | |
2515 | ||
2516 | ||
2517 | /* Don't include "string.h" or <stdlib.h> in non-C code. */ | |
2518 | #ifndef NOT_C_CODE | |
2519 | #ifdef HAVE_STRING_H | |
2520 | #include "string.h" | |
2521 | #endif | |
2522 | #ifdef HAVE_STRINGS_H | |
2523 | #include "strings.h" /* May be needed for bcopy & al. */ | |
2524 | #endif | |
2525 | #ifdef HAVE_STDLIB_H | |
2526 | #include <stdlib.h> | |
2527 | #endif | |
2528 | #endif | |
2529 | ||
2530 | /* Define HAVE_X_I18N if we have usable i18n support. */ | |
2531 | ||
2532 | #ifdef HAVE_X11R6 | |
2533 | #define HAVE_X_I18N | |
2534 | #elif defined HAVE_X11R5 && !defined X11R5_INHIBIT_I18N | |
2535 | #define HAVE_X_I18N | |
2536 | #endif | |
2537 | ||
2538 | /* Define HAVE_X11R6_XIM if we have usable X11R6-style XIM support. */ | |
2539 | ||
2540 | #if defined HAVE_X11R6 && !defined INHIBIT_X11R6_XIM | |
2541 | #define HAVE_X11R6_XIM | |
2542 | #endif | |
2543 | ||
2544 | /* Should we enable expensive run-time checking of data types? */ | |
2545 | #undef ENABLE_CHECKING | |
2546 | ||
2547 | #if defined __GNUC__ && (__GNUC__ > 2 \ | |
2548 | || (__GNUC__ == 2 && __GNUC_MINOR__ >= 5)) | |
2549 | #define NO_RETURN __attribute__ ((__noreturn__)) | |
2550 | #else | |
2551 | #define NO_RETURN /* nothing */ | |
2552 | #endif | |
0642c253 DL |
2553 | |
2554 | /* | |
2555 | Local Variables: | |
2556 | mode: c | |
2557 | End: | |
2558 | */ | |
5e384f3d | 2559 | ])dnl |
f0f2756d | 2560 | |
9ec10b2f DM |
2561 | #### Report on what we decided to do. |
2562 | echo " | |
9ec10b2f DM |
2563 | Configured for \`${canonical}'. |
2564 | ||
2565 | Where should the build process find the source code? ${srcdir} | |
2566 | What operating system and machine description files should Emacs use? | |
2567 | \`${opsysfile}' and \`${machfile}' | |
2568 | What compiler should emacs be built with? ${CC} ${CFLAGS} | |
2569 | Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason} | |
b1b4ce06 | 2570 | Should Emacs use a relocating allocator for buffers? ${REL_ALLOC} |
e32fac2a | 2571 | Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers |
9ec10b2f | 2572 | What window system should Emacs use? ${window_system} |
509fccc3 RS |
2573 | What toolkit should Emacs use? ${USE_X_TOOLKIT}" |
2574 | ||
2575 | if test -n "${x_includes}"; then | |
2576 | echo " Where do we find X Windows header files? ${x_includes}" | |
2577 | else | |
2578 | echo " Where do we find X Windows header files? Standard dirs" | |
2579 | fi | |
2580 | if test -n "${x_libraries}"; then | |
2581 | echo " Where do we find X Windows libraries? ${x_libraries}" | |
2582 | else | |
2583 | echo " Where do we find X Windows libraries? Standard dirs" | |
2584 | fi | |
9ec10b2f | 2585 | |
b412189c GM |
2586 | echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}" |
2587 | echo " Does Emacs use -lXpm? ${HAVE_XPM}" | |
2588 | echo " Does Emacs use -ljpeg? ${HAVE_JPEG}" | |
495ccc04 | 2589 | echo " Does Emacs use -ltiff? ${HAVE_TIFF}" |
b412189c GM |
2590 | echo " Does Emacs use -lungif? ${HAVE_GIF}" |
2591 | echo " Does Emacs use -lpng? ${HAVE_PNG}" | |
20c1822e | 2592 | echo " Does Emacs use X toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}" |
509fccc3 | 2593 | echo |
9ec10b2f DM |
2594 | |
2595 | # Remove any trailing slashes in these variables. | |
2596 | changequote(, )dnl | |
2597 | test "${prefix}" != NONE && | |
2598 | prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'` | |
2599 | test "${exec_prefix}" != NONE && | |
2600 | exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'` | |
2601 | changequote([, ])dnl | |
2602 | ||
3aa40e0e GM |
2603 | ## Check if the C preprocessor will convert `..' to `. .'. If so, set |
2604 | ## CPP_NEED_TRADITIONAL to `yes' so that the code to generate Makefile | |
2605 | ## from Makefile.c can correctly provide the arg `-traditional' to the | |
2606 | ## C preprocessor. | |
2607 | ||
2608 | AC_EGREP_CPP(yes..yes, | |
2609 | [yes..yes], | |
2610 | CPP_NEED_TRADITIONAL=no, | |
2611 | CPP_NEED_TRADITIONAL=yes) | |
2612 | ||
5f8c8f00 | 2613 | AC_OUTPUT(Makefile lib-src/Makefile.c:lib-src/Makefile.in oldXMenu/Makefile \ |
66a96cff | 2614 | man/Makefile lwlib/Makefile src/Makefile.c:src/Makefile.in \ |
56a0a075 | 2615 | lisp/Makefile lispref/Makefile lispintro/Makefile leim/Makefile, [ |
7bbbba31 | 2616 | |
b63df577 | 2617 | ### Make the necessary directories, if they don't exist. |
e0a3686b | 2618 | for dir in etc lisp ; do |
b3947967 | 2619 | test -d ${dir} || mkdir ${dir} |
9ec10b2f DM |
2620 | done |
2621 | ||
5f8c8f00 RS |
2622 | # Build src/Makefile from ${srcdir}/src/Makefile.c |
2623 | # and lib-src/Makefile from ${srcdir}/lib-src/Makefile.c | |
2624 | # This must be done after src/config.h is built, since we rely on that file. | |
9ec10b2f | 2625 | |
2d73167a | 2626 | changequote(, )dnl The horror, the horror. |
9ec10b2f DM |
2627 | # Now get this: Some word that is part of the ${srcdir} directory name |
2628 | # or the ${configuration} value might, just might, happen to be an | |
2629 | # identifier like `sun4' or `i386' or something, and be predefined by | |
2630 | # the C preprocessor to some helpful value like 1, or maybe the empty | |
2631 | # string. Needless to say consequent macro substitutions are less | |
2632 | # than conducive to the makefile finding the correct directory. | |
2633 | undefs="`echo $top_srcdir $configuration $canonical | | |
2634 | sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/ *$//' \ | |
2635 | -e 's/ */ -U/g' -e 's/-U[0-9][^ ]*//g' \ | |
2636 | `" | |
2d73167a | 2637 | changequote([, ])dnl |
9ec10b2f | 2638 | |
6a4bb05d | 2639 | echo creating src/epaths.h |
f8f7ab54 | 2640 | ${MAKE-make} epaths-force |
ab85d355 | 2641 | |
c776f30b GM |
2642 | # As of 2000-11-19, newest development versions of GNU cpp preprocess |
2643 | # `..' to `. .' unless invoked with -traditional | |
2644 | ||
3aa40e0e | 2645 | if test "x$GCC" = xyes && test "x$CPP_NEED_TRADITIONAL" = xyes; then |
c776f30b GM |
2646 | CPPFLAGS="$CPPFLAGS -traditional" |
2647 | fi | |
2648 | ||
9ec10b2f DM |
2649 | echo creating lib-src/Makefile |
2650 | ( cd lib-src | |
2651 | rm -f junk.c junk1.c junk2.c | |
2652 | sed -e '/start of cpp stuff/q' \ | |
5f8c8f00 | 2653 | < Makefile.c > junk1.c |
9ec10b2f | 2654 | sed -e '1,/start of cpp stuff/d'\ |
3b74127d | 2655 | -e 's,/\*\*/#\(.*\)$,/* \1 */,' \ |
5f8c8f00 | 2656 | < Makefile.c > junk.c |
e9b2a022 | 2657 | $CPP $undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \ |
9ec10b2f DM |
2658 | sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c |
2659 | cat junk1.c junk2.c > Makefile.new | |
2660 | rm -f junk.c junk1.c junk2.c | |
2661 | chmod 444 Makefile.new | |
2662 | mv -f Makefile.new Makefile | |
2663 | ) | |
2664 | ||
2665 | echo creating src/Makefile | |
2666 | ( cd src | |
2667 | rm -f junk.c junk1.c junk2.c | |
2668 | sed -e '/start of cpp stuff/q' \ | |
5f8c8f00 | 2669 | < Makefile.c > junk1.c |
9ec10b2f | 2670 | sed -e '1,/start of cpp stuff/d'\ |
3b74127d | 2671 | -e 's,/\*\*/#\(.*\)$,/* \1 */,' \ |
5f8c8f00 | 2672 | < Makefile.c > junk.c |
e9b2a022 | 2673 | $CPP $undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \ |
9ec10b2f DM |
2674 | sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c |
2675 | cat junk1.c junk2.c > Makefile.new | |
2676 | rm -f junk.c junk1.c junk2.c | |
2677 | chmod 444 Makefile.new | |
2678 | mv -f Makefile.new Makefile | |
2679 | ) | |
8b66759a | 2680 | |
e9b2a022 | 2681 | if test ! -f src/.gdbinit && test -f $srcdir/src/.gdbinit; then |
8b66759a | 2682 | echo creating src/.gdbinit |
e9b2a022 | 2683 | echo source $srcdir/src/.gdbinit > src/.gdbinit |
8b66759a DM |
2684 | fi |
2685 | ||
66a96cff RS |
2686 | # This is how we know whether to re-run configure in certain cases. |
2687 | touch src/config.stamp | |
2688 | ||
3aa40e0e | 2689 | ], [GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPP_NEED_TRADITIONAL="$CPP_NEED_TRADITIONAL" CPPFLAGS="$CPPFLAGS"]) |
464c7d2d | 2690 |