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