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