Commit | Line | Data |
---|---|---|
9ec10b2f DM |
1 | dnl This is an autoconf script. |
2 | dnl To rebuild the `configure' script from this, execute the command | |
3 | dnl autoconf | |
4 | dnl in the directory containing this script. | |
530ce502 | 5 | AC_PREREQ(1.111)dnl |
9ec10b2f DM |
6 | AC_INIT(src/lisp.h) |
7 | AC_CONFIG_HEADER(src/config.h) | |
8 | ||
9 | bindir='${exec_prefix}/bin' | |
10 | datadir='${prefix}/lib' | |
11 | statedir='${prefix}/lib' | |
12 | libdir='${exec_prefix}/lib' | |
13 | mandir='${prefix}/man/man1' | |
14 | infodir='${prefix}/info' | |
15 | lispdir='${datadir}/emacs/${version}/lisp' | |
16 | locallisppath='${datadir}/emacs/site-lisp' | |
17 | lisppath='${locallisppath}:${lispdir}' | |
18 | etcdir='${datadir}/emacs/${version}/etc' | |
19 | lockdir='${statedir}/emacs/lock' | |
20 | archlibdir='${libdir}/emacs/${version}/${configuration}' | |
21 | docdir='${datadir}/emacs/${version}/etc' | |
22 | ||
39a7c455 DM |
23 | AC_ARG_WITH(gcc, |
24 | [ --with-gcc Use GCC to compile Emacs]) | |
9ec10b2f DM |
25 | AC_ARG_WITH(x-toolkit, |
26 | [ --with-x-toolkit=KIT Use an X toolkit (KIT = lucid or athena)], | |
27 | [ case "${withval}" in | |
28 | y | ye | yes ) val=athena ;; | |
29 | n | no ) val=no ;; | |
30 | l | lu | luc | luci | lucid ) val=lucid ;; | |
31 | a | at | ath | athe | athena ) val=athena ;; | |
2e71ec17 DM |
32 | dnl These don't currently work. |
33 | dnl m | mo | mot | moti | motif ) val=motif ;; | |
34 | dnl o | op | ope | open | open- | open-l | open-lo \ | |
35 | dnl | open-loo | open-look ) val=open-look ;; | |
9ec10b2f | 36 | * ) |
2e71ec17 DM |
37 | dnl AC_MSG_ERROR([the \`--with-x-toolkit' option is supposed to have a value |
38 | dnl which is \`yes', \`no', \`lucid', \`athena', \`motif' or \`open-look'.]) | |
9ec10b2f DM |
39 | AC_MSG_ERROR([the \`--with-x-toolkit' option is supposed to have a value |
40 | which is \`yes', \`no', \`lucid', or \`athena'. | |
41 | Currently, \`yes', \`athena' and \`lucid' are synonyms.]) | |
42 | ;; | |
43 | esac | |
44 | with_x_toolkit=$val | |
45 | ]) | |
2e71ec17 DM |
46 | dnl AC_ARG_ENABLE(single-tree, |
47 | dnl [ --enable-single-tree Create a directory tree at DIR which looks like: | |
48 | dnl .../DIR/bin/CONFIGNAME (emacs, etags, etc.) | |
49 | dnl .../DIR/bin/CONFIGNAME/etc (movemail, etc.) | |
50 | dnl .../DIR/common/lisp (emacs' lisp files) | |
51 | dnl .../DIR/common/site-lisp (local lisp files) | |
52 | dnl .../DIR/common/lib (DOC, TUTORIAL, etc.) | |
53 | dnl .../DIR/common/lock (lockfiles)]) | |
9ec10b2f DM |
54 | |
55 | #### Make srcdir absolute, if it isn't already. It's important to | |
56 | #### avoid running the path through pwd unnecessary, since pwd can | |
57 | #### give you automounter prefixes, which can go away. | |
58 | case "${srcdir}" in | |
59 | /* ) ;; | |
60 | . ) | |
61 | ## We may be able to use the $PWD environment variable to make this | |
62 | ## absolute. But sometimes PWD is inaccurate. | |
63 | if test "${PWD}" != "" && test "`(cd ${PWD} ; sh -c pwd)`" = "`pwd`" ; | |
64 | then | |
65 | srcdir="$PWD" | |
66 | else | |
67 | srcdir="`(cd ${srcdir}; pwd)`" | |
68 | fi | |
69 | ;; | |
70 | * ) srcdir="`(cd ${srcdir}; pwd)`" ;; | |
71 | esac | |
72 | ||
73 | #### Check if the source directory already has a configured system in it. | |
74 | if test `pwd` != `(cd ${srcdir} && pwd)` \ | |
75 | && test -f "${srcdir}/src/config.h" ; then | |
76 | AC_MSG_WARN([The directory tree \`${srcdir}' is being used | |
77 | as a build directory right now; it has been configured in its own | |
78 | right. To configure in another directory as well, you MUST | |
79 | use GNU make. If you do not have GNU make, then you must | |
80 | now do \`make distclean' in ${srcdir}, | |
81 | and then run $0 again.]) | |
82 | ||
83 | extrasub='/^VPATH[ ]*=/c\ | |
84 | vpath %.c $(srcdir)\ | |
85 | vpath %.h $(srcdir)\ | |
86 | vpath %.y $(srcdir)\ | |
87 | vpath %.l $(srcdir)\ | |
88 | vpath %.s $(srcdir)\ | |
89 | vpath %.in $(srcdir)' | |
90 | fi | |
91 | ||
92 | #### Given the configuration name, set machfile and opsysfile to the | |
93 | #### names of the m/*.h and s/*.h files we should use. | |
94 | ||
95 | ### Canonicalize the configuration name. | |
96 | ||
97 | AC_CANONICAL_HOST | |
98 | canonical=$host | |
7bbbba31 | 99 | configuration=$host_alias |
9ec10b2f DM |
100 | |
101 | changequote(, )dnl | |
102 | ||
103 | ### If you add support for a new configuration, add code to this | |
104 | ### switch statement to recognize your configuration name and select | |
105 | ### the appropriate operating system and machine description files. | |
106 | ||
107 | ### You would hope that you could choose an m/*.h file pretty much | |
108 | ### based on the machine portion of the configuration name, and an s- | |
109 | ### file based on the operating system portion. However, it turns out | |
110 | ### that each m/*.h file is pretty manufacturer-specific - for | |
111 | ### example, apollo.h, hp9000s300.h, mega68k, news.h, and tad68k are | |
112 | ### all 68000 machines; mips.h, pmax.h, and news-risc are all MIPS | |
113 | ### machines. So we basically have to have a special case for each | |
114 | ### configuration name. | |
115 | ### | |
116 | ### As far as handling version numbers on operating systems is | |
117 | ### concerned, make sure things will fail in a fixable way. If | |
118 | ### /etc/MACHINES doesn't say anything about version numbers, be | |
119 | ### prepared to handle anything reasonably. If version numbers | |
120 | ### matter, be sure /etc/MACHINES says something about it. | |
121 | ### | |
122 | ### Eric Raymond says we should accept strings like "sysvr4" to mean | |
123 | ### "System V Release 4"; he writes, "The old convention encouraged | |
124 | ### confusion between `system' and `release' levels'." | |
125 | ||
126 | machine='' opsys='' unported=no | |
127 | case "${canonical}" in | |
128 | ||
129 | ## NetBSD ports | |
130 | *-*-netbsd* ) | |
131 | opsys=netbsd | |
132 | case "${canonical}" in | |
133 | i[345]86-*-netbsd*) machine=intel386 ;; | |
134 | m68k-*-netbsd*) | |
135 | # This is somewhat bogus. | |
136 | machine=hp9000s300 ;; | |
137 | mips-*-netbsd*) machine=pmax ;; | |
138 | ns32k-*-netbsd*) machine=ns32000 ;; | |
139 | sparc-*-netbsd*) machine=sparc ;; | |
140 | esac | |
141 | ;; | |
142 | ||
143 | ## Alliant machines | |
144 | ## Strictly speaking, we need the version of the alliant operating | |
145 | ## system to choose the right machine file, but currently the | |
146 | ## configuration name doesn't tell us enough to choose the right | |
147 | ## one; we need to give alliants their own operating system name to | |
148 | ## do this right. When someone cares, they can help us. | |
149 | fx80-alliant-* ) | |
150 | machine=alliant4 opsys=bsd4-2 | |
151 | ;; | |
152 | i860-alliant-* ) | |
153 | machine=alliant-2800 opsys=bsd4-3 | |
154 | ;; | |
155 | ||
156 | ## Altos 3068 | |
157 | m68*-altos-sysv* ) | |
158 | machine=altos opsys=usg5-2 | |
159 | ;; | |
160 | ||
161 | ## Amdahl UTS | |
162 | 580-amdahl-sysv* ) | |
163 | machine=amdahl opsys=usg5-2-2 | |
164 | ;; | |
165 | ||
166 | ## Appallings - I mean, Apollos - running Domain | |
167 | m68*-apollo* ) | |
168 | machine=apollo opsys=bsd4-2 | |
169 | ;; | |
170 | ||
171 | ## AT&T 3b2, 3b5, 3b15, 3b20 | |
172 | we32k-att-sysv* ) | |
173 | machine=att3b opsys=usg5-2-2 | |
174 | ;; | |
175 | ||
176 | ## AT&T 3b1 - The Mighty Unix PC! | |
177 | m68*-att-sysv* ) | |
178 | machine=7300 opsys=usg5-2-2 | |
179 | ;; | |
180 | ||
181 | ## Bull dpx20 | |
182 | rs6000-bull-bosx* ) | |
183 | machine=ibmrs6000 opsys=aix3-2 | |
184 | ;; | |
185 | ||
186 | ## Bull dpx2 | |
187 | m68*-bull-sysv3* ) | |
188 | machine=dpx2 opsys=usg5-3 | |
189 | ;; | |
190 | ||
191 | ## Bull sps7 | |
192 | m68*-bull-sysv2* ) | |
193 | machine=sps7 opsys=usg5-2 | |
194 | ;; | |
195 | ||
196 | ## CCI 5/32, 6/32 -- see "Tahoe". | |
197 | ||
198 | ## Celerity | |
199 | ## I don't know what configuration name to use for this; config.sub | |
200 | ## doesn't seem to know anything about it. Hey, Celerity users, get | |
201 | ## in touch with us! | |
202 | celerity-celerity-bsd* ) | |
203 | machine=celerity opsys=bsd4-2 | |
204 | ;; | |
205 | ||
206 | ## Clipper | |
207 | ## What operating systems does this chip run that Emacs has been | |
208 | ## tested on? | |
209 | clipper-* ) | |
210 | machine=clipper | |
211 | ## We'll use the catch-all code at the bottom to guess the | |
212 | ## operating system. | |
213 | ;; | |
214 | ||
215 | ## Convex | |
216 | *-convex-bsd* | *-convex-convexos* ) | |
217 | machine=convex opsys=bsd4-3 | |
218 | ## Prevents suprious white space in makefiles - d.m.cooke@larc.nasa.gov | |
219 | NON_GNU_CPP="cc -E -P" | |
220 | ;; | |
221 | ||
222 | ## Cubix QBx/386 | |
223 | i[345]86-cubix-sysv* ) | |
224 | machine=intel386 opsys=usg5-3 | |
225 | ;; | |
226 | ||
227 | ## Cydra 5 | |
228 | cydra*-cydrome-sysv* ) | |
229 | machine=cydra5 opsys=usg5-3 | |
230 | ;; | |
231 | ||
232 | ## Data General AViiON Machines | |
233 | m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* ) | |
234 | machine=aviion opsys=dgux5-4r3 | |
235 | ;; | |
236 | m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* ) | |
237 | machine=aviion opsys=dgux5-4r2 | |
238 | ;; | |
239 | m88k-dg-dgux* ) | |
240 | machine=aviion opsys=dgux | |
241 | ;; | |
242 | ||
243 | ## DECstations | |
244 | mips-dec-ultrix[0-3].* | mips-dec-ultrix4.0* | mips-dec-bsd4.2* ) | |
245 | machine=pmax opsys=bsd4-2 | |
246 | ;; | |
247 | mips-dec-ultrix* | mips-dec-bsd* ) | |
248 | machine=pmax opsys=bsd4-3 | |
249 | ;; | |
250 | mips-dec-osf* ) | |
251 | machine=pmax opsys=osf1 | |
252 | ;; | |
253 | ||
254 | ## Motorola Delta machines | |
255 | m68k-motorola-sysv* | m68000-motorola-sysv* ) | |
256 | machine=delta opsys=usg5-3 | |
257 | if test -z "`type gnucc | grep 'not found'`" | |
258 | then CC=gnucc | |
259 | else | |
260 | if test -z "`type gcc | grep 'not found'`" | |
261 | then CC=gcc | |
262 | else CC=cc | |
263 | fi | |
264 | fi | |
265 | ;; | |
266 | m88k-motorola-sysv4* ) | |
267 | machine=delta88k opsys=usg5-4 | |
268 | ;; | |
269 | m88k-motorola-sysv* | m88k-motorola-m88kbcs* ) | |
270 | machine=delta88k opsys=usg5-3 | |
271 | ;; | |
272 | ||
273 | ## Dual machines | |
274 | m68*-dual-sysv* ) | |
275 | machine=dual opsys=usg5-2 | |
276 | ;; | |
277 | m68*-dual-uniplus* ) | |
278 | machine=dual opsys=unipl5-2 | |
279 | ;; | |
280 | ||
281 | ## Elxsi 6400 | |
282 | elxsi-elxsi-sysv* ) | |
283 | machine=elxsi opsys=usg5-2 | |
284 | ;; | |
285 | ||
286 | ## Encore machines | |
287 | ns16k-encore-bsd* ) | |
288 | machine=ns16000 opsys=umax | |
289 | ;; | |
290 | ||
291 | ## The GEC 93 - apparently, this port isn't really finished yet. | |
292 | ||
293 | ## Gould Power Node and NP1 | |
294 | pn-gould-bsd4.2* ) | |
295 | machine=gould opsys=bsd4-2 | |
296 | ;; | |
297 | pn-gould-bsd4.3* ) | |
298 | machine=gould opsys=bsd4-3 | |
299 | ;; | |
300 | np1-gould-bsd* ) | |
301 | machine=gould-np1 opsys=bsd4-3 | |
302 | ;; | |
303 | ||
304 | ## Harris Night Hawk machines running CX/UX (a 5000 looks just like a 4000 | |
305 | ## as far as Emacs is concerned). | |
306 | m88k-harris-cxux* ) | |
307 | # Build needs to be different on 7.0 and later releases | |
308 | case "`uname -r`" in | |
309 | [56].[0-9] ) machine=nh4000 opsys=cxux ;; | |
310 | [7].[0-9] ) machine=nh4000 opsys=cxux7 ;; | |
311 | esac | |
312 | ;; | |
313 | ## Harris ecx or gcx running CX/UX (Series 1200, Series 3000) | |
314 | m68k-harris-cxux* ) | |
315 | machine=nh3000 opsys=cxux | |
316 | ;; | |
317 | ||
318 | ## Honeywell XPS100 | |
319 | xps*-honeywell-sysv* ) | |
320 | machine=xps100 opsys=usg5-2 | |
321 | ;; | |
322 | ||
323 | ## HP 9000 series 200 or 300 | |
324 | m68*-hp-bsd* ) | |
325 | machine=hp9000s300 opsys=bsd4-3 | |
326 | ;; | |
327 | ## HP/UX 7, 8 and 9 are supported on these machines. | |
328 | m68*-hp-hpux* ) | |
329 | case "`uname -r`" in | |
330 | ## Someone's system reports A.B8.05 for this. | |
331 | ## I wonder what other possibilities there are. | |
332 | *.B8.* ) machine=hp9000s300 opsys=hpux8 ;; | |
333 | *.08.* ) machine=hp9000s300 opsys=hpux8 ;; | |
334 | *.09.* ) machine=hp9000s300 opsys=hpux9 ;; | |
335 | *) machine=hp9000s300 opsys=hpux ;; | |
336 | esac | |
337 | ;; | |
338 | ||
339 | ## HP 9000 series 700 and 800, running HP/UX | |
340 | hppa*-hp-hpux7* ) | |
341 | machine=hp800 opsys=hpux | |
342 | ;; | |
343 | hppa*-hp-hpux8* ) | |
344 | machine=hp800 opsys=hpux8 | |
345 | ;; | |
346 | hppa*-hp-hpux9shr* ) | |
347 | machine=hp800 opsys=hpux9shr | |
348 | ;; | |
349 | hppa*-hp-hpux9* ) | |
350 | machine=hp800 opsys=hpux9 | |
351 | ;; | |
352 | ||
353 | ## HP 9000 series 700 and 800, running HP/UX | |
354 | hppa*-hp-hpux* ) | |
355 | ## Cross-compilation? Nah! | |
356 | case "`uname -r`" in | |
357 | ## Someone's system reports A.B8.05 for this. | |
358 | ## I wonder what other possibilities there are. | |
359 | *.B8.* ) machine=hp800 opsys=hpux8 ;; | |
360 | *.08.* ) machine=hp800 opsys=hpux8 ;; | |
361 | *.09.* ) machine=hp800 opsys=hpux9 ;; | |
362 | *) machine=hp800 opsys=hpux ;; | |
363 | esac | |
364 | ;; | |
365 | ||
366 | ## Orion machines | |
367 | orion-orion-bsd* ) | |
368 | machine=orion opsys=bsd4-2 | |
369 | ;; | |
370 | clipper-orion-bsd* ) | |
371 | machine=orion105 opsys=bsd4-2 | |
372 | ;; | |
373 | ||
374 | ## IBM machines | |
375 | i[345]86-ibm-aix1.1* ) | |
376 | machine=ibmps2-aix opsys=usg5-2-2 | |
377 | ;; | |
378 | i[345]86-ibm-aix1.[23]* | i[345]86-ibm-aix* ) | |
379 | machine=ibmps2-aix opsys=usg5-3 | |
380 | ;; | |
381 | i370-ibm-aix*) | |
382 | machine=ibm370aix opsys=usg5-3 | |
383 | ;; | |
046545ec | 384 | rs6000-ibm-aix3.1* | powerpc-ibm-aix3.1* ) |
9ec10b2f DM |
385 | machine=ibmrs6000 opsys=aix3-1 |
386 | ;; | |
046545ec | 387 | rs6000-ibm-aix3.2.5 | powerpc-ibm-aix3.2.5 ) |
9ec10b2f DM |
388 | machine=ibmrs6000 opsys=aix3-2-5 |
389 | ;; | |
046545ec | 390 | rs6000-ibm-aix* | powerpc-ibm-aix* ) |
9ec10b2f DM |
391 | machine=ibmrs6000 opsys=aix3-2 |
392 | ;; | |
393 | romp-ibm-bsd4.3* ) | |
394 | machine=ibmrt opsys=bsd4-3 | |
395 | ;; | |
396 | romp-ibm-bsd4.2* ) | |
397 | machine=ibmrt opsys=bsd4-2 | |
398 | ;; | |
399 | romp-ibm-aos4.3* ) | |
400 | machine=ibmrt opsys=bsd4-3 | |
401 | ;; | |
402 | romp-ibm-aos4.2* ) | |
403 | machine=ibmrt opsys=bsd4-2 | |
404 | ;; | |
405 | romp-ibm-aos* ) | |
406 | machine=ibmrt opsys=bsd4-3 | |
407 | ;; | |
408 | romp-ibm-bsd* ) | |
409 | machine=ibmrt opsys=bsd4-3 | |
410 | ;; | |
411 | romp-ibm-aix* ) | |
412 | machine=ibmrt-aix opsys=usg5-2-2 | |
413 | ;; | |
414 | ||
415 | ## Integrated Solutions `Optimum V' | |
416 | m68*-isi-bsd4.2* ) | |
417 | machine=isi-ov opsys=bsd4-2 | |
418 | ;; | |
419 | m68*-isi-bsd4.3* ) | |
420 | machine=isi-ov opsys=bsd4-3 | |
421 | ;; | |
422 | ||
423 | ## Intel 386 machines where we do care about the manufacturer | |
424 | i[345]86-intsys-sysv* ) | |
425 | machine=is386 opsys=usg5-2-2 | |
426 | ;; | |
427 | ||
428 | ## Prime EXL | |
429 | i[345]86-prime-sysv* ) | |
430 | machine=i386 opsys=usg5-3 | |
431 | ;; | |
432 | ||
433 | ## Sequent Symmetry | |
434 | i[345]86-sequent-bsd* ) | |
435 | machine=symmetry opsys=bsd4-3 | |
436 | ;; | |
437 | ||
438 | ## Unspecified sysv on an ncr machine defaults to svr4.2. | |
439 | ## (Plain usg5-4 doesn't turn on POSIX signals, which we need.) | |
440 | i[345]86-ncr-sysv* ) | |
441 | machine=intel386 opsys=usg5-4-2 | |
442 | ;; | |
443 | ||
444 | ## Intel 860 | |
445 | i860-*-sysv4* ) | |
446 | machine=i860 opsys=usg5-4 | |
447 | NON_GNU_CC="/bin/cc" # Ie, not the one in /usr/ucb/cc. | |
448 | NON_GNU_CPP="/usr/ccs/lib/cpp" # cc -E tokenizes macro expansion. | |
449 | ;; | |
450 | ||
451 | ## Masscomp machines | |
452 | m68*-masscomp-rtu* ) | |
453 | machine=masscomp opsys=rtu | |
454 | ;; | |
455 | ||
456 | ## Megatest machines | |
457 | m68*-megatest-bsd* ) | |
458 | machine=mega68 opsys=bsd4-2 | |
459 | ;; | |
460 | ||
461 | ## Workstations sold by MIPS | |
462 | ## This is not necessarily all workstations using the MIPS processor - | |
463 | ## Irises are produced by SGI, and DECstations by DEC. | |
464 | ||
465 | ## etc/MACHINES lists mips.h and mips4.h as possible machine files, | |
466 | ## and usg5-2-2 and bsd4-3 as possible OS files. The only guidance | |
467 | ## it gives for choosing between the alternatives seems to be "Use | |
468 | ## -machine=mips4 for RISCOS version 4; use -opsystem=bsd4-3 with | |
469 | ## the BSD world." I'll assume that these are instructions for | |
470 | ## handling two odd situations, and that every other situation | |
471 | ## should use mips.h and usg5-2-2, they being listed first. | |
472 | mips-mips-usg* ) | |
473 | machine=mips4 | |
474 | ## Fall through to the general code at the bottom to decide on the OS. | |
475 | ;; | |
476 | mips-mips-riscos4* ) | |
477 | machine=mips4 opsys=bsd4-3 | |
478 | NON_GNU_CC="cc -systype bsd43" | |
479 | NON_GNU_CPP="cc -systype bsd43 -E" | |
480 | ;; | |
481 | mips-mips-bsd* ) | |
482 | machine=mips opsys=bsd4-3 | |
483 | ;; | |
484 | mips-mips-* ) | |
485 | machine=mips opsys=usg5-2-2 | |
486 | ;; | |
487 | ||
488 | ## NeXT | |
489 | m68*-next-* | i[345]86-next-* ) | |
490 | machine=next opsys=mach2 | |
491 | ;; | |
492 | ||
493 | ## The complete machine from National Semiconductor | |
494 | ns32k-ns-genix* ) | |
495 | machine=ns32000 opsys=usg5-2 | |
496 | ;; | |
497 | ||
498 | ## NCR machines | |
499 | m68*-ncr-sysv2* | m68*-ncr-sysvr2* ) | |
500 | machine=tower32 opsys=usg5-2-2 | |
501 | ;; | |
502 | m68*-ncr-sysv3* | m68*-ncr-sysvr3* ) | |
503 | machine=tower32v3 opsys=usg5-3 | |
504 | ;; | |
505 | ||
506 | ## Nixdorf Targon 31 | |
507 | m68*-nixdorf-sysv* ) | |
508 | machine=targon31 opsys=usg5-2-2 | |
509 | ;; | |
510 | ||
511 | ## Nu (TI or LMI) | |
512 | m68*-nu-sysv* ) | |
513 | machine=nu opsys=usg5-2 | |
514 | ;; | |
515 | ||
516 | ## Plexus | |
517 | m68*-plexus-sysv* ) | |
518 | machine=plexus opsys=usg5-2 | |
519 | ;; | |
520 | ||
521 | ## Pyramid machines | |
522 | ## I don't really have any idea what sort of processor the Pyramid has, | |
523 | ## so I'm assuming it is its own architecture. | |
524 | pyramid-pyramid-bsd* ) | |
525 | machine=pyramid opsys=bsd4-2 | |
526 | ;; | |
527 | ||
528 | ## Sequent Balance | |
529 | ns32k-sequent-bsd4.2* ) | |
530 | machine=sequent opsys=bsd4-2 | |
531 | ;; | |
532 | ns32k-sequent-bsd4.3* ) | |
533 | machine=sequent opsys=bsd4-3 | |
534 | ;; | |
535 | ||
536 | ## Siemens Nixdorf | |
537 | mips-siemens-sysv* ) | |
538 | machine=mips-siemens opsys=usg5-4 | |
539 | NON_GNU_CC=/usr/ccs/bin/cc | |
540 | NON_GNU_CPP=/usr/ccs/lib/cpp | |
541 | ;; | |
542 | ||
543 | ## Silicon Graphics machines | |
544 | ## Iris 2500 and Iris 2500 Turbo (aka the Iris 3030) | |
545 | m68*-sgi-iris3.5* ) | |
546 | machine=irist opsys=iris3-5 | |
547 | ;; | |
548 | m68*-sgi-iris3.6* | m68*-sgi-iris*) | |
549 | machine=irist opsys=iris3-6 | |
550 | ;; | |
551 | ## Iris 4D | |
552 | mips-sgi-irix3* ) | |
553 | machine=iris4d opsys=irix3-3 | |
554 | ;; | |
555 | mips-sgi-irix5* ) | |
556 | machine=iris4d opsys=irix5-0 | |
557 | ;; | |
558 | mips-sgi-irix4* | mips-sgi-irix* ) | |
559 | machine=iris4d opsys=irix4-0 | |
560 | ;; | |
561 | ||
562 | ## SONY machines | |
563 | m68*-sony-bsd4.2* ) | |
564 | machine=news opsys=bsd4-2 | |
565 | ;; | |
566 | m68*-sony-bsd4.3* ) | |
567 | machine=news opsys=bsd4-3 | |
568 | ;; | |
569 | m68*-sony-newsos3*) | |
570 | machine=news opsys=bsd4-3 | |
571 | ;; | |
572 | mips-sony-bsd* | mips-sony-newsos4* ) | |
573 | machine=news-risc opsys=bsd4-3 | |
574 | ;; | |
575 | mips-sony-newsos* ) | |
576 | machine=news-risc opsys=newsos5 | |
577 | ;; | |
578 | ||
579 | ## Stride | |
580 | m68*-stride-sysv* ) | |
581 | machine=stride opsys=usg5-2 | |
582 | ;; | |
583 | ||
584 | ## Suns | |
585 | *-sun-sunos* | *-sun-bsd* | *-sun-solaris* | i[345]86-*-solaris2* | i[345]86-*-sunos5* ) | |
586 | case "${canonical}" in | |
587 | m68*-sunos1* ) machine=sun1 ;; | |
588 | m68*-sunos2* ) machine=sun2 ;; | |
589 | m68* ) machine=sun3 ;; | |
590 | i[345]86-sun-sunos[34]* ) machine=sun386 ;; | |
591 | i[345]86-*-* ) machine=intel386 ;; | |
592 | sparc* ) machine=sparc ;; | |
593 | * ) unported=yes ;; | |
594 | esac | |
595 | case "${canonical}" in | |
596 | ## The Sun386 didn't get past 4.0. | |
597 | i[345]86-*-sunos4 ) opsys=sunos4-0 ;; | |
598 | *-sunos4.0* ) opsys=sunos4-0 ;; | |
599 | *-sunos4.1.3* ) opsys=sunos4-1-3 | |
600 | NON_GCC_TEST_OPTIONS=-Bstatic | |
601 | GCC_TEST_OPTIONS=-static | |
602 | ;; | |
603 | *-sunos4shr* ) opsys=sunos4shr ;; | |
604 | *-sunos4* | *-sunos ) opsys=sunos4-1 | |
605 | NON_GCC_TEST_OPTIONS=-Bstatic | |
606 | GCC_TEST_OPTIONS=-static | |
607 | ;; | |
608 | *-sunos5.3* | *-solaris2.3* ) | |
609 | opsys=sol2-3 | |
610 | NON_GNU_CPP=/usr/ccs/lib/cpp | |
611 | ;; | |
612 | *-sunos5.4* | *-solaris2.4* ) | |
613 | opsys=sol2-4 | |
614 | NON_GNU_CPP=/usr/ccs/lib/cpp | |
615 | ;; | |
616 | *-sunos5* | *-solaris* ) | |
617 | opsys=sol2 | |
618 | NON_GNU_CPP=/usr/ccs/lib/cpp | |
619 | ;; | |
620 | * ) opsys=bsd4-2 ;; | |
621 | esac | |
622 | ;; | |
623 | ||
624 | ## Tadpole 68k | |
625 | m68*-tadpole-sysv* ) | |
626 | machine=tad68k opsys=usg5-3 | |
627 | ;; | |
628 | ||
629 | ## Tahoe machines | |
630 | tahoe-tahoe-bsd4.2* ) | |
631 | machine=tahoe opsys=bsd4-2 | |
632 | ;; | |
633 | tahoe-tahoe-bsd4.3* ) | |
634 | machine=tahoe opsys=bsd4-3 | |
635 | ;; | |
636 | ||
637 | ## Tandem Integrity S2 | |
638 | mips-tandem-sysv* ) | |
639 | machine=tandem-s2 opsys=usg5-3 | |
640 | ;; | |
641 | ||
642 | ## Tektronix XD88 | |
643 | m88k-tektronix-sysv3* ) | |
644 | machine=tekxd88 opsys=usg5-3 | |
645 | ;; | |
646 | ||
647 | ## Tektronix 16000 box (6130?) | |
648 | ns16k-tektronix-bsd* ) | |
649 | machine=ns16000 opsys=bsd4-2 | |
650 | ;; | |
651 | ## Tektronix 4300 | |
652 | ## src/m/tek4300.h hints that this is a m68k machine. | |
653 | m68*-tektronix-bsd* ) | |
654 | machine=tek4300 opsys=bsd4-3 | |
655 | ;; | |
656 | ||
657 | ## Titan P2 or P3 | |
658 | ## We seem to have lost the machine-description file titan.h! | |
659 | titan-titan-sysv* ) | |
660 | machine=titan opsys=usg5-3 | |
661 | ;; | |
662 | ||
663 | ## Ustation E30 (SS5E) | |
664 | m68*-unisys-uniplus* ) | |
665 | machine=ustation opsystem=unipl5-2 | |
666 | ;; | |
667 | ||
668 | ## Vaxen. | |
669 | vax-dec-* ) | |
670 | machine=vax | |
671 | case "${canonical}" in | |
672 | *-bsd4.1* ) opsys=bsd4-1 ;; | |
673 | *-bsd4.2* | *-ultrix[0-3].* | *-ultrix4.0* ) opsys=bsd4-2 ;; | |
674 | *-bsd4.3* | *-ultrix* ) opsys=bsd4-3 ;; | |
675 | *-bsd386* | *-bsdi* ) opsys=bsd386 ;; | |
676 | *-sysv[01]* | *-sysvr[01]* ) opsys=usg5-0 ;; | |
677 | *-sysv2* | *-sysvr2* ) opsys=usg5-2 ;; | |
678 | *-vms* ) opsys=vms ;; | |
679 | * ) unported=yes | |
680 | esac | |
681 | ;; | |
682 | ||
683 | ## Whitechapel MG1 | |
684 | ns16k-whitechapel-* ) | |
685 | machine=mg1 | |
686 | ## We don't know what sort of OS runs on these; we'll let the | |
687 | ## operating system guessing code below try. | |
688 | ;; | |
689 | ||
690 | ## Wicat | |
691 | m68*-wicat-sysv* ) | |
692 | machine=wicat opsys=usg5-2 | |
693 | ;; | |
694 | ||
695 | ## Intel 386 machines where we don't care about the manufacturer | |
696 | i[345]86-*-* ) | |
697 | machine=intel386 | |
698 | case "${canonical}" in | |
699 | *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;; | |
700 | *-isc2.2* ) opsys=isc2-2 ;; | |
701 | *-isc4.0* ) opsys=isc4-0 ;; | |
702 | *-isc* ) opsys=isc3-0 ;; | |
703 | *-esix5* ) opsys=esix5r4; NON_GNU_CPP=/usr/lib/cpp ;; | |
704 | *-esix* ) opsys=esix ;; | |
705 | *-xenix* ) opsys=xenix ;; | |
706 | *-linux* ) opsys=linux ;; | |
707 | *-sco3.2v4* ) opsys=sco4 ; NON_GNU_CPP=/lib/cpp ;; | |
708 | *-bsd386* | *-bsdi* ) opsys=bsd386 ;; | |
709 | *-386bsd* ) opsys=386bsd ;; | |
710 | *-freebsd* ) opsys=freebsd ;; | |
711 | *-nextstep* ) opsys=mach2 ;; | |
712 | ## Otherwise, we'll fall through to the generic opsys code at the bottom. | |
713 | esac | |
714 | ;; | |
715 | ||
716 | * ) | |
717 | unported=yes | |
718 | ;; | |
719 | esac | |
720 | ||
721 | ### If the code above didn't choose an operating system, just choose | |
722 | ### an operating system based on the configuration name. You really | |
723 | ### only want to use this when you have no idea what the right | |
724 | ### operating system is; if you know what operating systems a machine | |
725 | ### runs, it's cleaner to make it explicit in the case statement | |
726 | ### above. | |
727 | if test x"${opsys}" = x; then | |
728 | case "${canonical}" in | |
729 | *-gnu* ) opsys=gnu ;; | |
730 | *-bsd4.[01] ) opsys=bsd4-1 ;; | |
731 | *-bsd4.2 ) opsys=bsd4-2 ;; | |
732 | *-bsd4.3 ) opsys=bsd4-3 ;; | |
733 | *-sysv0 | *-sysvr0 ) opsys=usg5-0 ;; | |
734 | *-sysv2 | *-sysvr2 ) opsys=usg5-2 ;; | |
735 | *-sysv2.2 | *-sysvr2.2 ) opsys=usg5-2-2 ;; | |
736 | *-sysv3 | *-sysvr3 ) opsys=usg5-3 ;; | |
737 | *-sysv4 | *-sysvr4 ) opsys=usg5-4 ;; | |
738 | *-sysv4.1 | *-sysvr4.1 ) | |
739 | NON_GNU_CPP=/usr/lib/cpp | |
740 | opsys=usg5-4 ;; | |
741 | *-sysv4.2 | *-sysvr4.2 ) opsys=usg5-4-2 ;; | |
742 | * ) | |
743 | unported=yes | |
744 | ;; | |
745 | esac | |
746 | fi | |
747 | ||
748 | changequote([, ])dnl | |
749 | ||
750 | if test $unported = yes; then | |
751 | AC_MSG_ERROR([Emacs hasn't been ported to \`${canonical}' systems. | |
752 | Check \`etc/MACHINES' for recognized configuration names.]) | |
753 | fi | |
754 | ||
755 | machfile="m/${machine}.h" | |
756 | opsysfile="s/${opsys}.h" | |
757 | ||
758 | ||
759 | #### Choose a compiler. | |
760 | test -n "$CC" && cc_specified=yes | |
761 | ||
762 | case ${with_gcc} in | |
763 | "yes" ) CC="gcc" GCC=yes ;; | |
764 | "no" ) test -z "$CC" && CC=cc ;; | |
765 | * ) AC_PROG_CC | |
766 | esac | |
767 | ||
768 | # On Suns, sometimes $CPP names a directory. | |
769 | if test -n "$CPP" && test -d "$CPP"; then | |
770 | CPP= | |
771 | fi | |
772 | ||
773 | #### Some systems specify a CPP to use unless we are using GCC. | |
774 | #### Now that we know whether we are using GCC, we can decide whether | |
775 | #### to use that one. | |
776 | if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x | |
777 | then | |
778 | CPP="$NON_GNU_CPP" | |
779 | fi | |
780 | ||
781 | #### Some systems specify a CC to use unless we are using GCC. | |
782 | #### Now that we know whether we are using GCC, we can decide whether | |
783 | #### to use that one. | |
784 | if test "x$NON_GNU_CC" != x && test x$GCC != xyes && | |
785 | test x$cc_specified != xyes | |
786 | then | |
787 | CC="$NON_GNU_CC" | |
788 | fi | |
789 | ||
790 | if test x$GCC = xyes && test "x$GCC_TEST_OPTIONS" != x | |
791 | then | |
792 | CC="$CC $GCC_TEST_OPTIONS" | |
793 | fi | |
794 | ||
795 | if test x$GCC = x && test "x$NON_GCC_TEST_OPTIONS" != x | |
796 | then | |
797 | CC="$CC $NON_GCC_TEST_OPTIONS" | |
798 | fi | |
799 | ||
800 | #### Some other nice autoconf tests. If you add a test here which | |
801 | #### should make an entry in src/config.h, don't forget to add an | |
802 | #### #undef clause to src/config.h.in for autoconf to modify. | |
803 | ||
804 | dnl checks for programs | |
805 | AC_LN_S | |
806 | AC_PROG_CPP | |
807 | AC_PROG_INSTALL | |
808 | AC_PROG_YACC | |
809 | ||
810 | dnl checks for header files | |
811 | AC_HAVE_HEADERS(sys/timeb.h sys/time.h unistd.h) | |
812 | AC_STDC_HEADERS | |
813 | AC_TIME_WITH_SYS_TIME | |
814 | AC_SYS_SIGLIST_DECLARED | |
815 | ||
816 | dnl checks for typedefs | |
817 | AC_RETSIGTYPE | |
818 | ||
819 | dnl checks for structure members | |
820 | AC_STRUCT_TM | |
821 | AC_TIMEZONE | |
822 | ||
823 | dnl checks for compiler characteristics | |
824 | AC_CONST | |
825 | ||
826 | dnl check for Make feature | |
827 | AC_SET_MAKE | |
828 | ||
829 | dnl checks for operating system services | |
830 | AC_LONG_FILE_NAMES | |
831 | ||
832 | dnl other checks for UNIX variants | |
833 | ||
834 | #### Choose a window system. | |
9ec10b2f | 835 | |
530ce502 DM |
836 | AC_FIND_X |
837 | if test "$no_x" = yes; then | |
838 | window_system=none | |
839 | else | |
840 | window_system=x11 | |
841 | fi | |
9ec10b2f | 842 | |
9ec10b2f DM |
843 | test "${x_libraries}" != NONE && LD_SWITCH_X_SITE="-L${x_libraries}" |
844 | test "${x_libraries}" != NONE && LD_SWITCH_X_SITE_AUX="-R${x_libraries}" | |
845 | test "${x_includes}" != NONE && C_SWITCH_X_SITE="-I${x_includes}" | |
846 | ||
9ec10b2f DM |
847 | case "${window_system}" in |
848 | x11 ) | |
849 | HAVE_X_WINDOWS=yes | |
850 | HAVE_X11=yes | |
851 | case "${with_x_toolkit}" in | |
852 | athena | lucid ) USE_X_TOOLKIT=LUCID ;; | |
2e71ec17 DM |
853 | dnl motif ) USE_X_TOOLKIT=MOTIF ;; |
854 | dnl open-look ) USE_X_TOOLKIT=OPEN_LOOK ;; | |
9ec10b2f DM |
855 | * ) USE_X_TOOLKIT=none ;; |
856 | esac | |
857 | ;; | |
9ec10b2f DM |
858 | none ) |
859 | HAVE_X_WINDOWS=no | |
860 | HAVE_X11=no | |
861 | USE_X_TOOLKIT=none | |
862 | ;; | |
863 | esac | |
864 | X_TOOLKIT_TYPE=$USE_X_TOOLKIT | |
865 | ||
866 | ### If we're using X11, we should use the X menu package. | |
867 | HAVE_X_MENU=no | |
868 | case ${HAVE_X11} in | |
869 | yes ) HAVE_X_MENU=yes ;; | |
870 | esac | |
871 | ||
872 | #### Extract some information from the operating system and machine files. | |
873 | ||
874 | AC_CHECKING([the machine- and system-dependent files to find out | |
875 | - which libraries the lib-src programs will want, and | |
876 | - whether the GNU malloc routines are usable]) | |
877 | ||
878 | ### First figure out CFLAGS (which we use for running the compiler here) | |
879 | ### and REAL_CFLAGS (which we use for real compilation). | |
880 | ### The two are the same except on a few systems, where they are made | |
881 | ### different to work around various lossages. For example, | |
882 | ### GCC 2.5 on Linux needs them to be different because it treats -g | |
883 | ### as implying static linking. | |
884 | ||
885 | ### If the CFLAGS env var is specified, we use that value | |
886 | ### instead of the default. | |
887 | ||
888 | ### It's not important that this name contain the PID; you can't run | |
889 | ### two configures in the same directory and have anything work | |
890 | ### anyway. | |
891 | tempcname="conftest.c" | |
892 | ||
893 | echo ' | |
894 | #include "'${srcdir}'/src/'${opsysfile}'" | |
895 | #include "'${srcdir}'/src/'${machfile}'" | |
896 | #ifndef LIBS_MACHINE | |
897 | #define LIBS_MACHINE | |
898 | #endif | |
899 | #ifndef LIBS_SYSTEM | |
900 | #define LIBS_SYSTEM | |
901 | #endif | |
902 | #ifndef C_SWITCH_SYSTEM | |
903 | #define C_SWITCH_SYSTEM | |
904 | #endif | |
905 | #ifndef C_SWITCH_MACHINE | |
906 | #define C_SWITCH_MACHINE | |
907 | #endif | |
908 | configure___ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM | |
909 | configure___ c_switch_system=C_SWITCH_SYSTEM | |
910 | configure___ c_switch_machine=C_SWITCH_MACHINE | |
911 | ||
912 | #ifndef LIB_X11_LIB | |
913 | #define LIB_X11_LIB -lX11 | |
914 | #endif | |
915 | ||
916 | #ifndef LIBX11_MACHINE | |
917 | #define LIBX11_MACHINE | |
918 | #endif | |
919 | ||
920 | #ifndef LIBX11_SYSTEM | |
921 | #define LIBX11_SYSTEM | |
922 | #endif | |
923 | configure___ LIBX=LIB_X11_LIB LIBX11_MACHINE LIBX11_SYSTEM | |
924 | ||
925 | #ifdef UNEXEC | |
926 | configure___ unexec=UNEXEC | |
927 | #else | |
928 | configure___ unexec=unexec.o | |
929 | #endif | |
930 | ||
931 | #ifdef SYSTEM_MALLOC | |
932 | configure___ system_malloc=yes | |
933 | #else | |
934 | configure___ system_malloc=no | |
935 | #endif | |
936 | ||
937 | #ifndef C_DEBUG_SWITCH | |
938 | #define C_DEBUG_SWITCH -g | |
939 | #endif | |
940 | ||
941 | #ifndef C_OPTIMIZE_SWITCH | |
942 | #define C_OPTIMIZE_SWITCH -O | |
943 | #endif | |
944 | ||
945 | #ifdef THIS_IS_CONFIGURE | |
946 | ||
947 | /* Get the CFLAGS for tests in configure. */ | |
948 | #ifdef __GNUC__ | |
949 | configure___ CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${CFLAGS}' | |
950 | #else | |
951 | configure___ CFLAGS=C_DEBUG_SWITCH '${CFLAGS}' | |
952 | #endif | |
953 | ||
954 | #else /* not THIS_IS_CONFIGURE */ | |
955 | ||
956 | /* Get the CFLAGS for real compilation. */ | |
957 | #ifdef __GNUC__ | |
958 | configure___ REAL_CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${CFLAGS}' | |
959 | #else | |
960 | configure___ REAL_CFLAGS=C_DEBUG_SWITCH '${CFLAGS}' | |
961 | #endif | |
962 | ||
963 | #endif /* not THIS_IS_CONFIGURE */ | |
964 | ' > ${tempcname} | |
965 | ||
966 | # The value of CPP is a quoted variable reference, so we need to do this | |
967 | # to get its actual value... | |
968 | CPP=`eval "echo $CPP"` | |
969 | changequote(, )dnl | |
970 | eval `${CPP} -Isrc ${tempcname} \ | |
971 | | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'` | |
972 | if test "x$CFLAGS" = x; then | |
973 | eval `${CPP} -Isrc -DTHIS_IS_CONFIGURE ${tempcname} \ | |
974 | | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'` | |
975 | else | |
976 | REAL_CFLAGS="$CFLAGS" | |
977 | fi | |
978 | changequote([, ])dnl | |
979 | rm ${tempcname} | |
980 | ||
981 | ### Compute the unexec source name from the object name. | |
982 | UNEXEC_SRC="`echo ${unexec} | sed 's/\.o/.c/'`" | |
983 | ||
984 | # Do the opsystem or machine files prohibit the use of the GNU malloc? | |
985 | # Assume not, until told otherwise. | |
986 | GNU_MALLOC=yes | |
987 | if test "${system_malloc}" = "yes"; then | |
988 | GNU_MALLOC=no | |
989 | GNU_MALLOC_reason=" | |
990 | (The GNU allocators don't work with this system configuration.)" | |
991 | fi | |
992 | ||
993 | if test x"${REL_ALLOC}" = x; then | |
994 | REL_ALLOC=${GNU_MALLOC} | |
995 | fi | |
996 | ||
997 | LISP_FLOAT_TYPE=yes | |
998 | ||
999 | ||
1000 | #### Add the libraries to LIBS and check for some functions. | |
1001 | ||
1002 | CPPFLAGS="$c_switch_system $c_switch_machine $CPPFLAGS" | |
1003 | LIBS="$libsrc_libs" | |
1004 | ||
1005 | dnl If found, this defines HAVE_LIBDNET, which m/pmax.h checks, | |
1006 | dnl and also adds -ldnet to LIBS, which Autoconf uses for checks. | |
1007 | AC_CHECK_LIB(dnet, dnet_ntoa) | |
1008 | dnl This causes -lresolv to get used in subsequent tests, | |
1009 | dnl which causes failures on some systems such as HPUX 9. | |
1010 | dnl AC_CHECK_LIB(resolv, gethostbyname) | |
1011 | ||
1012 | dnl FIXME replace main with a function we actually want from this library. | |
1013 | AC_CHECK_LIB(Xbsd, main, LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd") | |
1014 | ||
1015 | AC_MSG_CHECKING(for XFree86) | |
1016 | if test -d /usr/X386/include; then | |
1017 | AC_MSG_RESULT(yes) | |
1018 | HAVE_XFREE386=yes | |
1019 | test -z "${C_SWITCH_X_SITE}" && C_SWITCH_X_SITE="-I/usr/X386/include" | |
1020 | else | |
1021 | AC_MSG_RESULT(no) | |
1022 | fi | |
1023 | ||
1024 | # We change CFLAGS temporarily so that C_SWITCH_X_SITE gets used | |
1025 | # for the tests that follow. | |
1026 | ||
1027 | if test "${HAVE_X11}" = "yes"; then | |
1028 | DEFS="$C_SWITCH_X_SITE $DEFS" | |
1029 | LIBS="$LD_SWITCH_X_SITE $LIBX $LIBS" | |
1030 | CFLAGS="$C_SWITCH_X_SITE $CFLAGS" | |
1031 | AC_HAVE_FUNCS(XrmSetDatabase XScreenResourceString \ | |
1032 | XScreenNumberOfScreen XSetWMProtocols) | |
1033 | fi | |
1034 | ||
1035 | if test "${USE_X_TOOLKIT}" != "none"; then | |
1036 | AC_MSG_CHECKING(X11 toolkit version) | |
1037 | AC_COMPILE_CHECK(, [#include <X11/Intrinsic.h>], | |
1038 | [#if XtSpecificationRelease < 6 | |
1039 | fail; | |
1040 | #endif | |
1041 | ], [AC_MSG_RESULT(6) | |
1042 | AC_DEFINE(HAVE_X11XTR6)], | |
1043 | [AC_MSG_RESULT(not 6)]) | |
1044 | fi | |
1045 | ||
1046 | # If netdb.h doesn't declare h_errno, we must declare it by hand. | |
1047 | AC_MSG_CHECKING(whether netdb declarares h_errno) | |
1048 | AC_COMPILE_CHECK(, [#include <netdb.h>], | |
1049 | [int | |
1050 | foo () | |
1051 | { | |
1052 | return h_errno; | |
1053 | } | |
1054 | ], [AC_MSG_RESULT(yes) | |
1055 | AC_DEFINE(HAVE_H_ERRNO)], | |
1056 | [AC_MSG_RESULT(no)]) | |
1057 | ||
1058 | AC_ALLOCA | |
1059 | ||
1060 | # logb and frexp are found in -lm on most systems. | |
1061 | AC_CHECK_LIB(m, logb) | |
1062 | AC_HAVE_FUNCS(gettimeofday gethostname dup2 rename closedir mkdir rmdir \ | |
046545ec | 1063 | random lrand48 bcopy bcmp logb frexp fmod drem ftime res_init setsid strerror \ |
9ec10b2f DM |
1064 | fpathconf) |
1065 | ||
1066 | ok_so_far=yes | |
1067 | AC_FUNC_CHECK(socket, , ok_so_far=no) | |
1068 | if test $ok_so_far = yes; then | |
1069 | AC_HEADER_CHECK(netinet/in.h, , ok_so_far=no) | |
1070 | fi | |
1071 | if test $ok_so_far = yes; then | |
1072 | AC_HEADER_CHECK(arpa/inet.h, , ok_so_far=no) | |
1073 | fi | |
1074 | if test $ok_so_far = yes; then | |
1075 | AC_DEFINE(HAVE_INET_SOCKETS) | |
1076 | fi | |
1077 | ||
7bbbba31 DM |
1078 | if test -f /usr/lpp/X11/bin/smt.exp; then |
1079 | AC_DEFINE(HAVE_AIX_SMT_EXP) | |
1080 | fi | |
1081 | ||
9ec10b2f DM |
1082 | # Set up the CFLAGS for real compilation, so we can substitute it. |
1083 | CFLAGS="$REAL_CFLAGS" | |
1084 | ||
1085 | changequote(, )dnl | |
1086 | #### Find out which version of Emacs this is. | |
1087 | version=`grep 'defconst[ ]*emacs-version' ${srcdir}/lisp/version.el \ | |
1088 | | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'` | |
1089 | changequote([, ])dnl | |
1090 | if test x"${version}" = x; then | |
1091 | AC_MSG_ERROR(can't find current emacs version in \`${srcdir}/lisp/version.el'.) | |
1092 | fi | |
1093 | ||
9ec10b2f DM |
1094 | ### Specify what sort of things we'll be editing into Makefile and config.h. |
1095 | ### Use configuration here uncanonicalized to avoid exceeding size limits. | |
1096 | AC_SUBST(version) | |
1097 | AC_SUBST(configuration) | |
1098 | AC_SUBST(srcdir) | |
1099 | AC_SUBST(prefix) | |
1100 | AC_SUBST(exec_prefix) | |
1101 | AC_SUBST(bindir) | |
1102 | AC_SUBST(datadir) | |
1103 | AC_SUBST(statedir) | |
1104 | AC_SUBST(libdir) | |
1105 | AC_SUBST(mandir) | |
1106 | AC_SUBST(infodir) | |
1107 | AC_SUBST(lispdir) | |
1108 | AC_SUBST(locallisppath) | |
1109 | AC_SUBST(lisppath) | |
1110 | AC_SUBST(etcdir) | |
1111 | AC_SUBST(lockdir) | |
1112 | AC_SUBST(archlibdir) | |
1113 | AC_SUBST(docdir) | |
1114 | AC_SUBST(c_switch_system) | |
1115 | AC_SUBST(c_switch_machine) | |
1116 | AC_SUBST(LD_SWITCH_X_SITE) | |
1117 | AC_SUBST(LD_SWITCH_X_SITE_AUX) | |
1118 | AC_SUBST(C_SWITCH_X_SITE) | |
1119 | AC_SUBST(CFLAGS) | |
1120 | AC_SUBST(X_TOOLKIT_TYPE) | |
1121 | AC_SUBST(machfile) | |
1122 | AC_SUBST(opsysfile) | |
1123 | ||
1124 | AC_DEFINE_UNQUOTED(EMACS_CONFIGURATION, "${configuration}") | |
1125 | AC_DEFINE_UNQUOTED(config_machfile, "${machfile}") | |
1126 | AC_DEFINE_UNQUOTED(config_opsysfile, "${opsysfile}") | |
1127 | AC_DEFINE_UNQUOTED(LD_SWITCH_X_SITE, ${LD_SWITCH_X_SITE}) | |
1128 | AC_DEFINE_UNQUOTED(LD_SWITCH_X_SITE_AUX, ${LD_SWITCH_X_SITE_AUX}) | |
1129 | AC_DEFINE_UNQUOTED(C_SWITCH_X_SITE, ${C_SWITCH_X_SITE}) | |
1130 | AC_DEFINE_UNQUOTED(UNEXEC_SRC, ${UNEXEC_SRC}) | |
1131 | ||
1132 | if test "${HAVE_X_WINDOWS}" = "yes" ; then | |
1133 | AC_DEFINE(HAVE_X_WINDOWS) | |
1134 | fi | |
1135 | if test "${USE_X_TOOLKIT}" != "none" ; then | |
1136 | AC_DEFINE(USE_X_TOOLKIT) | |
1137 | fi | |
1138 | if test "${HAVE_X11}" = "yes" ; then | |
1139 | AC_DEFINE(HAVE_X11) | |
1140 | fi | |
1141 | if test "${HAVE_XFREE386}" = "yes" ; then | |
1142 | AC_DEFINE(HAVE_XFREE386) | |
1143 | fi | |
1144 | if test "${HAVE_X_MENU}" = "yes" ; then | |
1145 | AC_DEFINE(HAVE_X_MENU) | |
1146 | fi | |
1147 | if test "${GNU_MALLOC}" = "yes" ; then | |
1148 | AC_DEFINE(GNU_MALLOC) | |
1149 | fi | |
1150 | if test "${REL_ALLOC}" = "yes" ; then | |
1151 | AC_DEFINE(REL_ALLOC) | |
1152 | fi | |
1153 | if test "${LISP_FLOAT_TYPE}" = "yes" ; then | |
1154 | AC_DEFINE(LISP_FLOAT_TYPE) | |
1155 | fi | |
1156 | ||
2e71ec17 DM |
1157 | dnl # ====================== Developer's configuration ======================= |
1158 | dnl | |
1159 | dnl # The following assignments make sense if you're running Emacs on a single | |
1160 | dnl # machine, one version at a time, and you want changes to the lisp and etc | |
1161 | dnl # directories in the source tree to show up immediately in your working | |
1162 | dnl # environment. It saves a great deal of disk space by not duplicating the | |
1163 | dnl # lisp and etc directories. | |
1164 | dnl | |
1165 | dnl if test "$enable_single_tree" = "yes"; then | |
1166 | dnl bindir='${exec_prefix}/bin/${configuration}' | |
1167 | dnl datadir='${prefix}/common' | |
1168 | dnl statedir='${prefix}/common' | |
1169 | dnl libdir='${bindir}' | |
1170 | dnl lispdir='${prefix}/common/lisp' | |
1171 | dnl locallisppath='${prefix}/common/site-lisp' | |
1172 | dnl lockdir='${prefix}/common/lock' | |
1173 | dnl archlibdir='${libdir}/etc' | |
1174 | dnl etcdir='${prefix}/common/data' | |
1175 | dnl docdir='${prefix}/common/data' | |
1176 | dnl fi | |
9ec10b2f DM |
1177 | |
1178 | #### Report on what we decided to do. | |
1179 | echo " | |
1180 | ||
1181 | Configured for \`${canonical}'. | |
1182 | ||
1183 | Where should the build process find the source code? ${srcdir} | |
1184 | What operating system and machine description files should Emacs use? | |
1185 | \`${opsysfile}' and \`${machfile}' | |
1186 | What compiler should emacs be built with? ${CC} ${CFLAGS} | |
1187 | Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason} | |
1188 | Should Emacs use the relocating allocator for buffers? ${REL_ALLOC} | |
1189 | What window system should Emacs use? ${window_system} | |
1190 | What toolkit should Emacs use? ${USE_X_TOOLKIT}${x_includes+ | |
1191 | Where do we find X Windows header files? }${x_includes}${x_libraries+ | |
1192 | Where do we find X Windows libraries? }${x_libraries} | |
1193 | ||
1194 | " | |
1195 | ||
1196 | # Remove any trailing slashes in these variables. | |
1197 | changequote(, )dnl | |
1198 | test "${prefix}" != NONE && | |
1199 | prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'` | |
1200 | test "${exec_prefix}" != NONE && | |
1201 | exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'` | |
1202 | changequote([, ])dnl | |
1203 | ||
ea50c238 DM |
1204 | AC_OUTPUT(Makefile lib-src/Makefile.in oldXMenu/Makefile \ |
1205 | lwlib/Makefile src/Makefile.in, [ | |
7bbbba31 | 1206 | |
9ec10b2f DM |
1207 | ### Make the necessary directories, if they don't exist. |
1208 | for dir in ./src ./lib-src ./cpp ./oldXMenu ./lwlib ./etc ; do | |
1209 | if test ! -d ${dir}; then | |
1210 | mkdir ${dir} | |
1211 | fi | |
1212 | done | |
1213 | ||
1214 | # Build src/Makefile from ${srcdir}/src/Makefile.in. This must be done | |
1215 | # after src/config.h is built, since we rely on that file. | |
1216 | ||
1217 | changequote(,)dnl The horror, the horror. | |
1218 | # Now get this: Some word that is part of the ${srcdir} directory name | |
1219 | # or the ${configuration} value might, just might, happen to be an | |
1220 | # identifier like `sun4' or `i386' or something, and be predefined by | |
1221 | # the C preprocessor to some helpful value like 1, or maybe the empty | |
1222 | # string. Needless to say consequent macro substitutions are less | |
1223 | # than conducive to the makefile finding the correct directory. | |
1224 | undefs="`echo $top_srcdir $configuration $canonical | | |
1225 | sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/ *$//' \ | |
1226 | -e 's/ */ -U/g' -e 's/-U[0-9][^ ]*//g' \ | |
1227 | `" | |
1228 | changequote([,])dnl | |
1229 | ||
1230 | echo creating lib-src/Makefile | |
1231 | ( cd lib-src | |
1232 | rm -f junk.c junk1.c junk2.c | |
1233 | sed -e '/start of cpp stuff/q' \ | |
1234 | < Makefile.in > junk1.c | |
1235 | sed -e '1,/start of cpp stuff/d'\ | |
1236 | -e 's@/\*\*/#\(.*\)$@/* \1 */@' \ | |
1237 | < Makefile.in > junk.c | |
1238 | $CPP $undefs -I. -I$top_srcdir/src $CPPFLAGS junk.c | \ | |
1239 | sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c | |
1240 | cat junk1.c junk2.c > Makefile.new | |
1241 | rm -f junk.c junk1.c junk2.c | |
1242 | chmod 444 Makefile.new | |
1243 | mv -f Makefile.new Makefile | |
1244 | ) | |
1245 | ||
1246 | echo creating src/Makefile | |
1247 | ( cd src | |
1248 | rm -f junk.c junk1.c junk2.c | |
1249 | sed -e '/start of cpp stuff/q' \ | |
1250 | < Makefile.in > junk1.c | |
1251 | sed -e '1,/start of cpp stuff/d'\ | |
1252 | -e 's@/\*\*/#\(.*\)$@/* \1 */@' \ | |
1253 | < Makefile.in > junk.c | |
1254 | $CPP $undefs -I. -I$top_srcdir/src $CPPFLAGS junk.c | \ | |
1255 | sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c | |
1256 | cat junk1.c junk2.c > Makefile.new | |
1257 | rm -f junk.c junk1.c junk2.c | |
1258 | chmod 444 Makefile.new | |
1259 | mv -f Makefile.new Makefile | |
1260 | ) | |
ea50c238 | 1261 | ], [CPP="$CPP" CPPFLAGS="$CPPFLAGS"]) |