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