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