]> code.delx.au - gnu-emacs/blob - configure1.in
(ange-ftp-raw-send-cmd): Allow quitting during accept-process-output.
[gnu-emacs] / configure1.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. You must have autoconf
5 dnl version 1.4 or later.
6 dnl
7 dnl The following text appears in the resulting `configure' script,
8 dnl explaining how to rebuild it.
9 [#!/bin/sh
10 #### Configuration script for GNU Emacs
11 #### Copyright (C) 1992 Free Software Foundation, Inc.
12
13 ### Don't edit this script!
14 ### This script was automatically generated by the `autoconf' program
15 ### from the file `./configure.in'.
16 ### To rebuild it, execute the command
17 ### autoconf
18 ### in the this directory. You must have autoconf version 1.4 or later.
19
20 ### This file is part of GNU Emacs.
21
22 ### GNU Emacs is free software; you can redistribute it and/or modify
23 ### it under the terms of the GNU General Public License as published by
24 ### the Free Software Foundation; either version 1, or (at your option)
25 ### any later version.
26
27 ### GNU Emacs is distributed in the hope that it will be useful,
28 ### but WITHOUT ANY WARRANTY; without even the implied warranty of
29 ### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30 ### GNU General Public License for more details.
31
32 ### You should have received a copy of the GNU General Public License
33 ### along with GNU Emacs; see the file COPYING. If not, write to
34 ### the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
35
36
37 ### Since Emacs has configuration requirements that autoconf can't
38 ### meet, this file is an unholy marriage of custom-baked
39 ### configuration code and autoconf macros. New versions of autoconf
40 ### could very well break this arrangement.
41 ###
42 ### We omit the invocation of autoconf's initialization function,
43 ### because it produces Bourne shell code to parse arguments, but we
44 ### need to parse our own arguments.
45 ###
46 ### We use the m4 quoting characters [ ] (as established by the
47 ### autoconf system) to include large sections of raw sewage - Oops, I
48 ### mean, shell code - in the final configuration script.
49 ###
50 ### Usage: configure config_name
51 ###
52 ### If configure succeeds, it leaves its status in config.status.
53 ### If configure fails after disturbing the status quo,
54 ### config.status is removed.
55
56
57 ### Remove any more than one leading "." element from the path name.
58 ### If we don't remove them, then another "./" will be prepended to
59 ### the file name each time we use config.status, and the program name
60 ### will get larger and larger. This wouldn't be a problem, except
61 ### that since progname gets recorded in all the Makefiles this script
62 ### produces, move-if-change thinks they're different when they're
63 ### not.
64 ###
65 ### It would be nice if we could put the ./ in a \( \) group and then
66 ### apply the * operator to that, so we remove as many leading ./././'s
67 ### as are present, but some seds (like Ultrix's sed) don't allow you to
68 ### apply * to a \( \) group. Bleah.
69 progname="`echo $0 | sed 's:^\./\./:\./:'`"
70
71
72 #### Usage messages.
73
74 short_usage="Usage: ${progname} CONFIGURATION [-OPTION[=VALUE] ...]
75
76 Set compilation and installation parameters for GNU Emacs, and report.
77 CONFIGURATION specifies the machine and operating system to build for.
78 --with-x Support the X Window System.
79 --with-x=no Don't support the X Window System.
80 --x-includes=DIR Search for X Window System header files in DIR.
81 --x-libraries=DIR Search for X Window System libraries in DIR.
82 --with-gcc Use GCC to compile Emacs.
83 --with-gcc=no Don't use GCC to compile Emacs.
84 --run-in-place Use libraries and data files directly out of the
85 source tree.
86 --srcdir=DIR Look for source in DIR.
87 --prefix=DIR Install files below dir.
88
89 If successful, ${progname} leaves its status in config.status. If
90 unsuccessful after disturbing the status quo, it removes config.status."
91
92
93 #### Option processing.
94
95 ### Record all the arguments, so we can save them in config.status.
96 arguments="$@"
97
98 ### These values are used to comment and uncomment different values
99 ### for the path variables in the Makefile, to choose the installed
100 ### configuration or the run-in-place configuration.
101 rip_paths='#disabled# '
102 inst_paths=''
103
104 ### Establish some default values.
105 prefix='/usr/local'
106
107 while [ $# != 0 ]; do
108 arg="$1"
109 case "${arg}" in
110
111 ## Anything starting with a hyphen we assume is an option.
112 -* )
113
114 ## Separate the switch name from the value it's being given.
115 case "${arg}" in
116 -*=*)
117 opt=`echo ${arg} | sed 's:^-*\([^=]*\)=.*$:\1:'`
118 val=`echo ${arg} | sed 's:^-*[^=]*=\(.*\)$:\1:'`
119 valomitted=no
120 ;;
121 -*)
122 ## If FOO is a boolean argument, --FOO is equivalent to
123 ## --FOO=yes. Otherwise, the value comes from the next
124 ## argument - see below.
125 opt=`echo ${arg} | sed 's:^-*\(.*\)$:\1:'`
126 val="yes"
127 valomitted=yes
128 ;;
129 esac
130
131 ## Change `-' in the option name to `_'.
132 optname="${opt}"
133 opt="`echo ${opt} | tr - _`"
134
135 ## Process the option.
136 case "${opt}" in
137
138 ## Has the user specified which window systems they want to support?
139 "with_x" | "with_x11" | "with_x10" )
140 ## Make sure the value given was either "yes" or "no".
141 case "${val}" in
142 y | ye | yes ) val=yes ;;
143 n | no ) val=no ;;
144 * )
145 (echo "${progname}: the \`--${optname}' option is supposed to have a boolean value.
146 Set it to either \`yes' or \`no'."
147 echo "${short_usage}") >&2
148 exit 1
149 ;;
150 esac
151 eval "${opt}=\"${val}\""
152 ;;
153
154 ## Has the user specified whether or not they want GCC?
155 "with_gcc" )
156 ## Make sure the value given was either "yes" or "no".
157 case "${val}" in
158 y | ye | yes ) val=yes ;;
159 n | no ) val=no ;;
160 * )
161 (echo "${progname}: the \`--${optname}' option is supposed to have a boolean value.
162 Set it to either \`yes' or \`no'."
163 echo "${short_usage}") >&2
164 exit 1
165 ;;
166 esac
167 eval "${opt}=\"${val}\""
168 ;;
169
170 ## Has the user specified a source directory?
171 "srcdir" )
172 ## If the value was omitted, get it from the next argument.
173 if [ "${valomitted}" = "yes" ]; then
174 ## Get the next argument from the argument list, if there is one.
175 if [ $# = 1 ]; then
176 (echo "${progname}: You must give a value for the \`--${optname}' option, as in
177 \`--${optname}=FOO'."
178 echo "${short_usage}") >&2
179 exit 1
180 fi
181 shift; val="$1"
182 fi
183 srcdir="${val}"
184 ;;
185
186 ## Has the user tried to tell us where the X files are?
187 ## I think these are dopey, but no less than three alpha
188 ## testers, at large sites, have said they have their X files
189 ## installed in odd places.
190 "x_includes" )
191 ## If the value was omitted, get it from the next argument.
192 if [ "${valomitted}" = "yes" ]; then
193 ## Get the next argument from the argument list, if there is one.
194 if [ $# = 1 ]; then
195 (echo "${progname}: You must give a value for the \`--${optname}' option, as in
196 \`--${optname}=FOO'."
197 echo "${short_usage}") >&2
198 exit 1
199 fi
200 shift; val="$1"
201 fi
202 x_includes="${val}"
203 C_SWITCH_X_SITE="-I${x_includes}"
204 ;;
205 "x_libraries" )
206 ## If the value was omitted, get it from the next argument.
207 if [ "${valomitted}" = "yes" ]; then
208 ## Get the next argument from the argument list, if there is one.
209 if [ $# = 1 ]; then
210 (echo "${progname}: You must give a value for the \`--${optname}' option, as in
211 \`--${optname}=FOO'."
212 echo "${short_usage}") >&2
213 exit 1
214 fi
215 shift; val="$1"
216 fi
217 x_libraries="${val}"
218 LD_SWITCH_X_SITE="-L${x_libraries}"
219 ;;
220
221 ## Should this use the "development configuration"?
222 "run_in_place" )
223 rip_paths=''
224 inst_paths='#disabled# '
225 ;;
226
227 ## Has the user specifiec an installation prefix?
228 "prefix" )
229 ## If the value was omitted, get it from the next argument.
230 if [ "${valomitted}" = "yes" ]; then
231 ## Get the next argument from the argument list, if there is one.
232 if [ $# = 1 ]; then
233 (echo "${progname}: You must give a value for the \`--${optname}' option, as in
234 \`--${optname}=FOO'."
235 echo "${short_usage}") >&2
236 exit 1
237 fi
238 shift; val="$1"
239 fi
240 prefix="${val}"
241 ;;
242
243 ## Has the user asked for some help?
244 "usage" | "help" )
245 echo "${short_usage}" | more
246 exit
247 ;;
248
249 ## We ignore all other options silently.
250 esac
251 ;;
252
253 ## Anything not starting with a hyphen we assume is a
254 ## configuration name.
255 *)
256 configuration=${arg}
257 ;;
258
259 esac
260 shift
261 done
262
263 if [ "${configuration}" = "" ]; then
264 (echo "${progname}: You must specify a configuration name as an argument."
265 echo "${short_usage}") >&2
266 exit 1
267 fi
268
269
270 #### Decide where the source is.
271 case "${srcdir}" in
272
273 ## If it's not specified, see if `.' or `..' might work.
274 "" )
275 if [ -f "./src/lisp.h" -a -f "./lisp/version.el" ]; then
276 srcdir=`pwd`
277 else
278 if [ -f "../src/lisp.h" -a -f "../lisp/version.el" ]; then
279 srcdir=`(cd .. ; pwd)`
280 else
281 (echo "\
282 ${progname}: Neither the current directory nor its parent seem to
283 contain the Emacs sources. If you do not want to build Emacs in its
284 source tree, you should run \`${progname}' in the directory in which
285 you wish to build Emacs, using its \`--srcdir' option to say where the
286 sources may be found."
287 echo "${short_usage}") >&2
288 exit 1
289 fi
290 fi
291 ;;
292
293 ## Otherwise, check if the directory they specified is okay.
294 * )
295 if [ ! -d "${srcdir}" -o ! -f "${srcdir}/src/lisp.h" -o ! -f "${srcdir}/lisp/version.el" ]; then
296 (echo "\
297 ${progname}: The directory specified with the \`--srcdir' option,
298 \`${srcdir}', doesn't seem to contain the Emacs sources. You should
299 either run the \`${progname}' script at the top of the Emacs source
300 tree, or use the \`--srcdir' option to specify where the Emacs sources
301 are."
302 echo "${short_usage}") >&2
303 exit 1
304 fi
305 ;;
306
307 esac
308
309 ### Make the necessary directories, if they don't exist.
310 if [ ! -d ./src ]; then
311 mkdir ./src
312 fi
313 if [ ! -d ./lib-src ]; then
314 mkdir ./lib-src
315 fi
316 if [ ! -d ./cpp ]; then
317 mkdir ./cpp
318 fi
319 if [ ! -d ./oldXMenu ]; then
320 mkdir ./oldXMenu
321 fi
322 if [ ! -d ./etc ]; then
323 mkdir ./etc
324 fi
325
326 #### Given the configuration name, set machfile and opsysfile to the
327 #### names of the m/*.h and s/*.h files we should use.
328
329 ### Canonicalize the configuration name.
330 echo "Checking the configuration name."
331 if configuration=`${srcdir}/config.sub "${configuration}"` ; then : ; else
332 exit $?
333 fi
334
335 ### If you add support for a new configuration, add code to this
336 ### switch statement to recognize your configuration name and select
337 ### the appropriate operating system and machine description files.
338
339 ### You would hope that you could choose an m/*.h file pretty much
340 ### based on the machine portion of the configuration name, and an s-
341 ### file based on the operating system portion. However, it turns out
342 ### that each m/*.h file is pretty manufacturer-specific - for
343 ### example, apollo.h, hp9000s300.h, mega68k, news.h, and tad68k are
344 ### all 68000 machines; mips.h, pmax.h, and news-risc are all MIPS
345 ### machines. So we basically have to have a special case for each
346 ### configuration name.
347 ###
348 ### As far as handling version numbers on operating systems is
349 ### concerned, make sure things will fail in a fixable way. If
350 ### /etc/MACHINES doesn't say anything about version numbers, be
351 ### prepared to handle anything reasonably. If version numbers
352 ### matter, be sure /etc/MACHINES says something about it.
353 ###
354 ### Eric Raymond says we should accept strings like "sysvr4" to mean
355 ### "System V Release 4"; he writes, "The old convention encouraged
356 ### confusion between `system' and `release' levels'."
357
358 machine='' opsys='' unported='false'
359 case "${configuration}" in
360
361 ## Alliant machines
362 ## Strictly speaking, we need the version of the alliant operating
363 ## system to choose the right machine file, but currently the
364 ## configuration name doesn't tell us enough to choose the right
365 ## one; we need to give alliants their own operating system name to
366 ## do this right. When someone cares, they can help us.
367 fx80-alliant-* )
368 machine=alliant4 opsys=bsd4-2
369 ;;
370 i860-alliant-* )
371 machine=alliant-2800 opsys=bsd4-3
372 ;;
373
374 ## Altos 3068
375 m68*-altos-sysv* )
376 machine=altos opsys=usg5-2
377 ;;
378
379 ## Amdahl UTS
380 580-amdahl-sysv* )
381 machine=amdahl opsys=usg5-2-2
382 ;;
383
384 ## Appallings - I mean, Apollos - running Domain
385 m68*-apollo* )
386 machine=apollo opsys=bsd4-2
387 ;;
388
389 ## AT&T 3b2, 3b5, 3b15, 3b20
390 we32k-att-sysv* )
391 machine=att3b opsys=usg5-2-2
392 ;;
393
394 ## AT&T 3b1 - The Mighty Unix PC!
395 m68*-att-sysv* )
396 machine=7300 opsys=usg5-2-2
397 ;;
398
399 ## Bull sps7
400 m68*-bull-sysv* )
401 machine=sps7 opsys=usg5-2
402 ;;
403
404 ## CCI 5/32, 6/32 -- see "Tahoe".
405
406 ## Celerity
407 ## I don't know what configuration name to use for this; config.sub
408 ## doesn't seem to know anything about it. Hey, Celerity users, get
409 ## in touch with us!
410 celerity-celerity-bsd* )
411 machine=celerity opsys=bsd4-2
412 ;;
413
414 ## Clipper
415 ## What operating systems does this chip run that Emacs has been
416 ## tested on?
417 clipper-* )
418 machine=clipper
419 ## We'll use the catch-all code at the bottom to guess the
420 ## operating system.
421 ;;
422
423 ## Convex
424 *-convex-bsd* )
425 machine=convex opsys=bsd4-3
426 ;;
427
428 ## Cubix QBx/386
429 i386-cubix-sysv* )
430 machine=intel386 opsys=usg5-3
431 ;;
432
433 ## Cydra 5
434 cydra*-cydrome-sysv* )
435 machine=cydra5 opsys=usg5-3
436 ;;
437
438 ## DECstations
439 mips-dec-ultrix[0-3].* | mips-dec-ultrix4.0 | mips-dec-bsd4.2 )
440 machine=pmax opsys=bsd4-2
441 ;;
442 mips-dec-ultrix* | mips-dec-bsd* )
443 machine=pmax opsys=bsd4-3
444 ;;
445 mips-dec-osf* )
446 machine=pmax opsys=osf1
447 ;;
448
449 ## Motorola Delta machines
450 m68*-motorola-sysv* )
451 machine=delta opsys=usg5-3
452 ;;
453 m88k-motorola-sysv* | m88k-motorola-m88kbcs* )
454 machine=delta88k opsys=usg5-3
455 ;;
456
457 ## Dual machines
458 m68*-dual-sysv* )
459 machine=dual opsys=usg5-2
460 ;;
461 m68*-dual-uniplus* )
462 machine=dual opsys=unipl5-2
463 ;;
464
465 ## Elxsi 6400
466 elxsi-elxsi-sysv* )
467 machine=elxsi opsys=usg5-2
468 ;;
469
470 ## Encore machines
471 ns16k-encore-bsd* )
472 machine=ns16000 opsys=umax
473 ;;
474
475 ## The GEC 93 - apparently, this port isn't really finished yet.
476
477 ## Gould Power Node and NP1
478 pn-gould-bsd4.2 )
479 machine=gould opsys=bsd4-2
480 ;;
481 pn-gould-bsd4.3 )
482 machine=gould opsys=bsd4-3
483 ;;
484 np1-gould-bsd* )
485 machine=gould-np1 opsys=bsd4-3
486 ;;
487
488 ## Honeywell XPS100
489 xps*-honeywell-sysv* )
490 machine=xps100 opsys=usg5-2
491 ;;
492
493 ## HP 9000 series 200 or 300
494 m68*-hp-bsd* )
495 machine=hp9000s300 opsys=bsd4-3
496 ;;
497 ## HP/UX 8 doesn't run on these machines, so use HP/UX 7.
498 m68*-hp-hpux* )
499 machine=hp9000s300 opsys=hpux
500 ;;
501
502 ## HP 9000 series 800, running HP/UX
503 hppa1.0-hp-hpux* )
504 machine=hp9000s800 opsys=hpux
505 ;;
506
507 ## Orion machines
508 orion-orion-bsd* )
509 machine=orion opsys=bsd4-2
510 ;;
511 clipper-orion-bsd* )
512 machine=orion105 opsys=bsd4-2
513 ;;
514
515 ## IBM machines
516 i386-ibm-aix1.1 )
517 machine=ibmps2-aix opsys=usg5-2-2
518 ;;
519 i386-ibm-aix1.2 )
520 machine=ibmps2-aix opsys=usg5-3
521 ;;
522 rs6000-ibm-aix3.1 )
523 machine=ibmrs6000 opsys=aix3-1
524 ;;
525 rs6000-ibm-aix3.2 | rs6000-ibm-aix* )
526 machine=ibmrs6000 opsys=aix3-2
527 ;;
528 romp-ibm-bsd* )
529 machine=ibmrt opsys=bsd4-2
530 ;;
531 romp-ibm-aix* )
532 machine=ibmrt-aix opsys=usg5-2-2
533 ;;
534
535 ## Integrated Solutions `Optimum V'
536 m68*-isi-bsd4.2 )
537 machine=isi-ov opsys=bsd4-2
538 ;;
539 m68*-isi-bsd4.3 )
540 machine=isi-ov opsys=bsd4-3
541 ;;
542
543 ## Intel 386 machines where we do care about the manufacturer
544 i[34]86-intsys-sysv* )
545 machine=is386 opsys=usg5-2-2
546 ;;
547 ## Intel 386 machines where we don't care about the manufacturer
548 i[34]86-* )
549 machine=intel386
550 case "${configuration}" in
551 *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
552 *-isc2.2 ) opsys=isc2-2 ;;
553 *-isc* ) opsys=isc3-0 ;;
554 *-esix5* ) opsys=esix5r4 ;;
555 *-esix* ) opsys=esix ;;
556 *-xenix* ) opsys=xenix ;;
557 *-linux* ) opsys=linux ;;
558 *-sco3.2v4* ) opsys=sco4 ;;
559 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
560 esac
561 ;;
562
563 ## Silicon Graphics machines
564 ## Iris 2500 and Iris 2500 Turbo (aka the Iris 3030)
565 m68*-sgi-iris3.5 )
566 machine=irist opsys=iris3-5
567 ;;
568 m68*-sgi-iris3.6 | m68*-sgi-iris*)
569 machine=irist opsys=iris3-6
570 ;;
571 ## Iris 4D
572 mips-sgi-irix3.* )
573 machine=iris4d opsys=irix3-3
574 ;;
575 mips-sgi-irix4.* | mips-sgi-irix* )
576 machine=iris4d opsys=irix4-0
577 ;;
578
579 ## Masscomp machines
580 m68*-masscomp-rtu )
581 machine=masscomp opsys=rtu
582 ;;
583
584 ## Megatest machines
585 m68*-megatest-bsd* )
586 machine=mega68 opsys=bsd4-2
587 ;;
588
589 ## Workstations sold by MIPS
590 ## This is not necessarily all workstations using the MIPS processor -
591 ## Irises are produced by SGI, and DECstations by DEC.
592
593 ## etc/MACHINES lists mips.h and mips4.h as possible machine files,
594 ## and usg5-2-2 and bsd4-3 as possible OS files. The only guidance
595 ## it gives for choosing between the alternatives seems to be "Use
596 ## -machine=mips4 for RISCOS version 4; use -opsystem=bsd4-3 with
597 ## the BSD world." I'll assume that these are instructions for
598 ## handling two odd situations, and that every other situation
599 ## should use mips.h and usg5-2-2, they being listed first.
600 mips-mips-riscos4* )
601 machine=mips4 opsys=usg5-2-2
602 ;;
603 mips-mips-bsd* )
604 machine=mips opsys=bsd4-3
605 ;;
606 mips-mips-* )
607 machine=mips opsys=usg5-2-2
608 ;;
609
610 ## NeXT
611 m68*-next-mach* | m68*-next-bsd* )
612 machine=next opsys=mach2
613 ;;
614
615 ## The complete machine from National Semiconductor
616 ns32k-ns-genix* )
617 machine=ns32000 opsys=usg5-2
618 ;;
619
620 ## NCR machines
621 m68*-ncr-sysv2* | m68*-ncr-sysvr2* )
622 machine=tower32 opsys=usg5-2-2
623 ;;
624 m68*-ncr-sysv3* | m68*-ncr-sysvr3* )
625 machine=tower32v3 opsys=usg5-3
626 ;;
627
628 ## Nixdorf Targon 31
629 m68*-nixdorf-sysv* )
630 machine=targon31 opsys=usg5-2-2
631 ;;
632
633 ## Nu (TI or LMI)
634 m68*-nu-sysv* )
635 machine=nu opsys=usg5-2
636 ;;
637
638 ## Plexus
639 m68*-plexus-sysv* )
640 machine=plexus opsys=usg5-2
641 ;;
642
643 ## Prime EXL
644 i386-prime-sysv* )
645 machine=i386 opsys=usg5-3
646 ;;
647
648 ## Pyramid machines
649 ## I don't really have any idea what sort of processor the Pyramid has,
650 ## so I'm assuming it is its own architecture.
651 pyramid-pyramid-bsd* )
652 machine=pyramid opsys=bsd4-2
653 ;;
654
655 ## Sequent Balance
656 ns32k-sequent-bsd4.2 )
657 machine=sequent opsys=bsd4-2
658 ;;
659 ns32k-sequent-bsd4.3 )
660 machine=sequent opsys=bsd4-3
661 ;;
662 ## Sequent Symmetry
663 i386-sequent-bsd* )
664 machine=symmetry opsys=bsd4-3
665 ;;
666
667 ## SONY machines
668 m68*-sony-bsd4.2 )
669 machine=news opsys=bsd4-2
670 ;;
671 m68*-sony-bsd4.3 )
672 machine=news opsys=bsd4-3
673 ;;
674 mips-sony-bsd* )
675 machine=news-risc opsys=bsd4-3
676 ;;
677
678 ## Stride
679 m68*-stride-sysv* )
680 machine=stride opsys=usg5-2
681 ;;
682
683 ## Suns
684 *-sun-sunos* | *-sun-bsd* | *-sun-solaris* )
685 case "${configuration}" in
686 m68*-sunos1* ) machine=sun1 ;;
687 m68*-sunos2* ) machine=sun2 ;;
688 m68* ) machine=sun3 ;;
689 i[34]86* ) machine=sun386 ;;
690 sparc* ) machine=sparc ;;
691 * ) unported=true ;;
692 esac
693 case "${configuration}" in
694 *-sunos4.0* ) opsys=sunos4-0 ;;
695 *-sunos4* | *-sunos ) opsys=sunos4-1 ;;
696 *-sunos5* | *-solaris* ) opsys=sol2 ;;
697 * ) opsys=bsd4-2 ;;
698 esac
699 ;;
700
701 ## Tadpole 68k
702 m68*-tadpole-sysv* )
703 machine=tad68k opsys=usg5-3
704 ;;
705
706 ## Tahoe machines
707 tahoe-tahoe-bsd4.2 )
708 machine=tahoe opsys=bsd4-2
709 ;;
710 tahoe-tahoe-bsd4.3 )
711 machine=tahoe opsys=bsd4-3
712 ;;
713
714 ## Tandem Integrity S2
715 mips-tandem-sysv* )
716 machine=tandem-s2 opsys=usg5-3
717 ;;
718
719 ## Tektronix 16000 box (6130?)
720 ns16k-tektronix-bsd* )
721 machine=ns16000 opsys=bsd4-2
722 ;;
723 ## Tektronix 4300
724 ## src/m/tek4300.h hints that this is a m68k machine.
725 m68*-tektronix-bsd* )
726 machine=tex4300 opsys=bsd4-3
727 ;;
728
729 ## Titan P2 or P3
730 ## We seem to have lost the machine-description file titan.h!
731 titan-titan-sysv* )
732 machine=titan opsys=usg5-3
733 ;;
734
735 ## Ustation E30 (SS5E)
736 m68*-unisys-uniplus* )
737 machine=ustation opsystem=unipl5-2
738 ;;
739
740 ## Vaxen.
741 vax-dec-* )
742 machine=vax
743 case "${configuration}" in
744 *-bsd4.1 ) opsys=bsd4-1 ;;
745 *-bsd4.2 | *-ultrix[0-3].* | *-ultrix4.0 ) opsys=bsd4-2 ;;
746 *-bsd4.3 | *-ultrix* ) opsys=bsd4-3 ;;
747 *-sysv[01]* | *-sysvr[01]* ) opsys=usg5-0 ;;
748 *-sysv2* | *-sysvr2* ) opsys=usg5-2 ;;
749 *-vms* ) opsys=vms ;;
750 * ) unported=true
751 esac
752 ;;
753
754 ## Whitechapel MG1
755 ns16k-whitechapel-* )
756 machine=mg1
757 ## We don't know what sort of OS runs on these; we'll let the
758 ## operating system guessing code below try.
759 ;;
760
761 ## Wicat
762 m68*-wicat-sysv* )
763 machine=wicat opsys=usg5-2
764 ;;
765
766 * )
767 unported=true
768 ;;
769 esac
770
771 ### If the code above didn't choose an operating system, just choose
772 ### an operating system based on the configuration name. You really
773 ### only want to use this when you have no idea what the right
774 ### operating system is; if you know what operating systems a machine
775 ### runs, it's cleaner to make it explicit in the case statement
776 ### above.
777 if [ ! "${opsys}" ]; then
778 case "${configuration}" in
779 *-bsd4.[01] ) opsys=bsd4-1 ;;
780 *-bsd4.2 ) opsys=bsd4-2 ;;
781 *-bsd4.3 ) opsys=bsd4-3 ;;
782 *-sysv0 | *-sysvr0 ) opsys=usg5-0 ;;
783 *-sysv2 | *-sysvr2 ) opsys=usg5-2 ;;
784 *-sysv2.2 | *-sysvr2.2 ) opsys=usg5-2-2 ;;
785 *-sysv3 | *-sysvr3 ) opsys=usg5-3 ;;
786 *-sysv4 | *-sysvr4 ) opsys=usg5-4 ;;
787 * )
788 unported=true
789 ;;
790 esac
791 fi
792
793 if $unported ; then
794 (echo "${progname}: Emacs hasn't been ported to \`${configuration}' systems."
795 echo "${progname}: Check \`etc/MACHINES' for recognized configuration names."
796 ) >&2
797 exit 1
798 fi
799
800 machfile="m/${machine}.h"
801 opsysfile="s/${opsys}.h"
802
803 ]
804 AC_PREPARE(lisp)
805 AC_CONFIG_HEADER(src/config.h)
806 [
807
808 #### Choose a compiler.
809 case ${with_gcc} in
810 "yes" ) CC="gcc" GCC=1 ;;
811 "no" ) CC="cc" ;;
812 * )
813 ] AC_PROG_CC [
814 esac
815
816 CFLAGS='-g'
817 if test -n "${GCC}"; then
818 CFLAGS='-g -O'
819 fi
820
821 #### Some other nice autoconf tests. If you add a test here which
822 #### should make an entry in src/config.h, don't forget to add an
823 #### #undef clause to src/config.h.in for autoconf to modify.
824 ]
825 dnl checks for programs
826 AC_LN_S
827 AC_PROG_CPP
828
829 dnl checks for UNIX variants that set `DEFS'
830
831 dnl checks for header files
832 AC_HAVE_HEADERS(sys/timeb.h sys/time.h)
833 AC_STDC_HEADERS
834 AC_TIME_WITH_SYS_TIME
835
836 dnl checks for typedefs
837 AC_RETSIGTYPE
838
839 dnl checks for functions
840 AC_ALLOCA
841 AC_HAVE_FUNCS(gettimeofday gethostname dup2)
842
843 dnl checks for structure members
844 AC_STRUCT_TM
845 AC_TIMEZONE
846
847 dnl checks for compiler characteristics
848 AC_CONST
849
850 dnl checks for operating system services
851
852 dnl other checks for UNIX variants
853 [
854
855
856 #### Choose a window system.
857 echo "Checking window system."
858
859 window_system=''
860 case "${with_x}" in
861 yes )
862 window_system=${window_system}x11
863 ;;
864 no )
865 window_system=${window_system}none
866 esac
867 case "${with_x11}" in
868 yes )
869 window_system=${window_system}x11
870 ;;
871 esac
872 case "${with_x10}" in
873 yes )
874 window_system=${window_system}x10
875 ;;
876 esac
877
878 case "${window_system}" in
879 "none" | "x11" | "x10" ) ;;
880 "" )
881 echo " No window system specifed. Looking for X Windows."
882 window_system=none
883 if [ -r /usr/lib/libX11.a \
884 -o -d /usr/include/X11 \
885 -o -d /usr/X386/include \
886 -o -d ${x_includes}/X11 ]; then
887 window_system=x11
888 fi
889 ;;
890 * )
891 echo "Don\'t specify the window system more than once." >&2
892 exit 1
893 ;;
894 esac
895
896 case "${window_system}" in
897 x11 )
898 HAVE_X_WINDOWS=yes
899 HAVE_X11=yes
900 echo " Using X11."
901 ;;
902 x10 )
903 HAVE_X_WINDOWS=yes
904 HAVE_X11=no
905 echo " Using X10."
906 ;;
907 none )
908 HAVE_X_WINDOWS=no
909 HAVE_X11=no
910 echo " Using no window system."
911 ;;
912 esac
913
914 ### If we're using X11, we should use the X menu package.
915 HAVE_X_MENU=no
916 case ${HAVE_X11} in
917 yes )
918 HAVE_X_MENU=yes
919 ;;
920 esac
921
922 ### Check for XFree386. It needs special hacks.
923 lib_havexbsd=no
924 ]
925 AC_HAVE_LIBRARY( Xbsd , have_libxbsd=yes , have_libxbsd=no )
926 [
927 if [ -n "${x_libraries}" ] && [ -f ${x_libraries}/libXbsd.a ]; then
928 have_libxbsd=yes
929 fi
930
931 case ${window_system} in
932 x11 )
933 if [ -d /usr/X386/include ] && [ "${have_libxbsd}" = "yes" ]; then
934 HAVE_XFREE386=yes
935 if [ "${C_SWITCH_X_SITE}" = "" ]; then
936 C_SWITCH_X_SITE="-I/usr/X386/include"
937 fi
938 fi
939 ;;
940 esac
941
942 #### Extract some information from the operating system and machine files.
943
944 echo "Examining the machine- and system-dependent files to find out"
945 echo " - which libraries the lib-src programs will want, and"
946 echo " - whether the GNU malloc routines are usable."
947
948 ### It's not important that this name contain the PID; you can't run
949 ### two configures in the same directory and have anything work
950 ### anyway.
951 tempcname="conftest.c"
952
953 echo '
954 #include "'${srcdir}'/src/'${opsysfile}'"
955 #include "'${srcdir}'/src/'${machfile}'"
956 #ifndef LIBS_MACHINE
957 #define LIBS_MACHINE
958 #endif
959 #ifndef LIBS_SYSTEM
960 #define LIBS_SYSTEM
961 #endif
962 #ifndef C_SWITCH_SYSTEM
963 #define C_SWITCH_SYSTEM
964 #endif
965 @configure@ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM
966 @configure@ c_switch_system=C_SWITCH_SYSTEM
967 #ifdef SYSTEM_MALLOC
968 @configure@ system_malloc=yes
969 #else
970 @configure@ system_malloc=no
971 #endif
972 ' > ${tempcname}
973 # The value of CPP is a quoted variable reference, so we need to do this
974 # to get its actual value...
975 foo=`eval "echo $CPP"`
976 eval `${foo} ${tempcname} \
977 | grep '@configure@' \
978 | sed -e 's/^@configure@ \([^=]*=\)\(.*\)$/\1"\2"/'`
979 rm ${tempcname}
980
981
982 # Do the opsystem or machine files prohibit the use of the GNU malloc?
983 # Assume not, until told otherwise.
984 GNU_MALLOC=yes
985 if [ "${system_malloc}" = "yes" ]; then
986 GNU_MALLOC=no
987 GNU_MALLOC_reason="
988 (The GNU allocators don't work with this system configuration.)"
989 fi
990
991 if [ ! "${REL_ALLOC}" ]; then
992 REL_ALLOC=${GNU_MALLOC}
993 fi
994
995 LISP_FLOAT_TYPE=yes
996
997
998 #### Find out which version of Emacs this is.
999 version=`grep 'defconst[ ]*emacs-version' ${srcdir}/lisp/version.el \
1000 | sed -e 's/^.*"\([0-9][0-9]*\.[0-9][0-9]*\)\..*$/\1/'`
1001 if [ ! "${version}" ]; then
1002 echo "${progname}: can't find current emacs version in
1003 \`${srcdir}/lisp/version.el'." >&2
1004 exit 1
1005 fi
1006
1007
1008 #### Specify what sort of things we'll be editing into Makefile and config.h.
1009 ]
1010 AC_SUBST(configuration)
1011 AC_SUBST(version)
1012 AC_SUBST(srcdir)
1013 AC_SUBST(c_switch_system)
1014 AC_SUBST(libsrc_libs)
1015 AC_SUBST(rip_paths)
1016 AC_SUBST(inst_paths)
1017 AC_SUBST(LD_SWITCH_X_SITE)
1018 AC_SUBST(C_SWITCH_X_SITE)
1019 AC_SUBST(CFLAGS)
1020 AC_SUBST(prefix)
1021
1022 AC_DEFINE_UNQUOTED(config_machfile, "\"${machfile}\"")
1023 AC_DEFINE_UNQUOTED(config_opsysfile, "\"${opsysfile}\"")
1024 AC_DEFINE_UNQUOTED(LD_SWITCH_X_SITE, ${LD_SWITCH_X_SITE})
1025 AC_DEFINE_UNQUOTED(C_SWITCH_X_SITE, ${C_SWITCH_X_SITE})
1026
1027 [
1028 if [ "${HAVE_X_WINDOWS}" = "yes" ] ; then
1029 ] AC_DEFINE(HAVE_X_WINDOWS) [
1030 fi
1031 if [ "${HAVE_X11}" = "yes" ] ; then
1032 ] AC_DEFINE(HAVE_X11) [
1033 fi
1034 if [ "${HAVE_XFREE386}" = "yes" ] ; then
1035 ] AC_DEFINE(HAVE_XFREE386) [
1036 fi
1037 if [ "${HAVE_X_MENU}" = "yes" ] ; then
1038 ] AC_DEFINE(HAVE_X_MENU) [
1039 fi
1040 if [ "${GNU_MALLOC}" = "yes" ] ; then
1041 ] AC_DEFINE(GNU_MALLOC) [
1042 fi
1043 if [ "${REL_ALLOC}" = "yes" ] ; then
1044 ] AC_DEFINE(REL_ALLOC) [
1045 fi
1046 if [ "${LISP_FLOAT_TYPE}" = "yes" ] ; then
1047 ] AC_DEFINE(LISP_FLOAT_TYPE) [
1048 fi
1049
1050
1051 #### Report on what we decided to do.
1052 echo "
1053
1054 Configured for \`${configuration}'.
1055
1056 What operating system and machine description files should Emacs use?
1057 \`${opsysfile}' and \`${machfile}'
1058 What compiler should emacs be built with? ${CC} ${CFLAGS}
1059 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
1060 Should Emacs use the relocating allocator for buffers? ${REL_ALLOC}
1061 What window system should Emacs use? ${window_system}${x_includes+
1062 Where do we find X Windows header files? }${x_includes}${x_libraries+
1063 Where do we find X Windows libraries? }${x_libraries}
1064
1065 "
1066
1067 ### Restore the arguments to this script, so autoconf can record them
1068 ### in the config.status file.
1069 set - ${arguments}
1070 ]
1071 AC_OUTPUT(Makefile)