]> code.delx.au - gnu-emacs/blob - configure1.in
(dun-save-game): Use correct name of endgame question.
[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 ;;
207 "x_libraries" )
208 ## If the value was omitted, get it from the next argument.
209 if [ "${valomitted}" = "yes" ]; then
210 ## Get the next argument from the argument list, if there is one.
211 if [ $index = $# ]; then
212 (echo "${progname}: You must give a value for the \`--${optname}' option, as in
213 \`--${optname}=FOO'."
214 echo "${short_usage}") >&2
215 exit 1
216 fi
217 index=`expr $index + 1`
218 val=`eval echo '$'$index`
219 fi
220 x_libraries="${val}"
221 ;;
222
223 ## Should this use the "development configuration"?
224 "run_in_place" )
225 rip_paths=''
226 inst_paths='#disabled# '
227 ;;
228
229 ## Has the user specified an installation prefix?
230 "prefix" )
231 ## If the value was omitted, get it from the next argument.
232 if [ "${valomitted}" = "yes" ]; then
233 ## Get the next argument from the argument list, if there is one.
234 if [ $index = $# ]; then
235 (echo "${progname}: You must give a value for the \`--${optname}' option, as in
236 \`--${optname}=FOO'."
237 echo "${short_usage}") >&2
238 exit 1
239 fi
240 index=`expr $index + 1`
241 val=`eval echo '$'$index`
242 fi
243 prefix="${val}"
244 ;;
245
246 ## Has the user specified an installation prefix?
247 "exec_prefix" )
248 ## If the value was omitted, get it from the next argument.
249 if [ "${valomitted}" = "yes" ]; then
250 ## Get the next argument from the argument list, if there is one.
251 if [ $index = $# ]; then
252 (echo "${progname}: You must give a value for the \`--${optname}' option, as in
253 \`--${optname}=FOO'."
254 echo "${short_usage}") >&2
255 exit 1
256 fi
257 index=`expr $index + 1`
258 val=`eval echo '$'$index`
259 fi
260 exec_prefix="${val}"
261 ;;
262
263 ## Verbose flag, tested by autoconf macros.
264 "verbose" )
265 verbose=yes
266 ;;
267
268 ## Has the user asked for some help?
269 "usage" | "help" )
270 if [ "x$PAGER" = x ]
271 then
272 echo "${short_usage}" | more
273 else
274 echo "${short_usage}" | $PAGER
275 fi
276 exit
277 ;;
278
279 ## We ignore all other options silently.
280 esac
281 ;;
282
283 ## Anything not starting with a hyphen we assume is a
284 ## configuration name.
285 *)
286 configuration=${arg}
287 ;;
288
289 esac
290 done
291
292 if [ "${configuration}" = "" ]; then
293 echo '- You did not tell me what kind of host system you want to configure.
294 - I will attempt to guess the kind of system this is.' 1>&2
295 guesssys=`echo ${progname} | sed 's/configure$/config.guess/'`
296 if configuration=`${guesssys}` ; then
297 echo "- Looks like this is a ${configuration}" 1>&2
298 else
299 echo '- Failed to guess the system type. You need to tell me.' 1>&2
300 echo "${short_usage}" >&2
301 exit 1
302 fi
303 fi
304
305 #### Decide where the source is.
306 case "${srcdir}" in
307
308 ## If it's not specified, see if `.' or `..' might work.
309 "" )
310 confdir=`echo $0 | sed 's|//|/|' | sed 's|/[^/]*$||'`
311 if [ -f $confdir/src/lisp.h -a -f $confdir/lisp/version.el ]; then
312 srcdir="${confdir}"
313 else
314 if [ -f "./src/lisp.h" -a -f "./lisp/version.el" ]; then
315 srcdir='.'
316 else
317 if [ -f "../src/lisp.h" -a -f "../lisp/version.el" ]; then
318 srcdir='..'
319 else
320 (echo "\
321 ${progname}: Neither the current directory nor its parent seem to
322 contain the Emacs sources. If you do not want to build Emacs in its
323 source tree, you should run \`${progname}' in the directory in which
324 you wish to build Emacs, using its \`--srcdir' option to say where the
325 sources may be found."
326 echo "${short_usage}") >&2
327 exit 1
328 fi
329 fi
330 fi
331 ;;
332
333 ## Otherwise, check if the directory they specified is okay.
334 * )
335 if [ ! -d "${srcdir}" -o ! -f "${srcdir}/src/lisp.h" -o ! -f "${srcdir}/lisp/version.el" ]; then
336 (echo "\
337 ${progname}: The directory specified with the \`--srcdir' option,
338 \`${srcdir}', doesn't seem to contain the Emacs sources. You should
339 either run the \`${progname}' script at the top of the Emacs source
340 tree, or use the \`--srcdir' option to specify where the Emacs sources
341 are."
342 echo "${short_usage}") >&2
343 exit 1
344 fi
345 ;;
346 esac
347
348 #### Make srcdir absolute, if it isn't already. It's important to
349 #### avoid running the path through pwd unnecessary, since pwd can
350 #### give you automounter prefixes, which can go away.
351 case "${srcdir}" in
352 /* ) ;;
353 . )
354 ## We may be able to use the $PWD environment variable to make this
355 ## absolute. But sometimes PWD is inaccurate.
356 if [ "${PWD}" != "" ] && [ "`(cd ${PWD} ; pwd)`" = "`pwd`" ] ; then
357 srcdir="$PWD"
358 else
359 srcdir="`(cd ${srcdir}; pwd)`"
360 fi
361 ;;
362 * ) srcdir="`(cd ${srcdir}; pwd)`" ;;
363 esac
364
365 ### Make the necessary directories, if they don't exist.
366 for dir in ./src ./lib-src ./cpp ./oldXMenu ./etc ; do
367 if [ ! -d ${dir} ]; then
368 mkdir ${dir}
369 fi
370 done
371
372 #### Given the configuration name, set machfile and opsysfile to the
373 #### names of the m/*.h and s/*.h files we should use.
374
375 ### Canonicalize the configuration name.
376 echo "Checking the configuration name."
377 if canonical=`${srcdir}/config.sub "${configuration}"` ; then : ; else
378 exit $?
379 fi
380
381 ### If you add support for a new configuration, add code to this
382 ### switch statement to recognize your configuration name and select
383 ### the appropriate operating system and machine description files.
384
385 ### You would hope that you could choose an m/*.h file pretty much
386 ### based on the machine portion of the configuration name, and an s-
387 ### file based on the operating system portion. However, it turns out
388 ### that each m/*.h file is pretty manufacturer-specific - for
389 ### example, apollo.h, hp9000s300.h, mega68k, news.h, and tad68k are
390 ### all 68000 machines; mips.h, pmax.h, and news-risc are all MIPS
391 ### machines. So we basically have to have a special case for each
392 ### configuration name.
393 ###
394 ### As far as handling version numbers on operating systems is
395 ### concerned, make sure things will fail in a fixable way. If
396 ### /etc/MACHINES doesn't say anything about version numbers, be
397 ### prepared to handle anything reasonably. If version numbers
398 ### matter, be sure /etc/MACHINES says something about it.
399 ###
400 ### Eric Raymond says we should accept strings like "sysvr4" to mean
401 ### "System V Release 4"; he writes, "The old convention encouraged
402 ### confusion between `system' and `release' levels'."
403
404 machine='' opsys='' unported='false'
405 case "${canonical}" in
406
407 ## Alliant machines
408 ## Strictly speaking, we need the version of the alliant operating
409 ## system to choose the right machine file, but currently the
410 ## configuration name doesn't tell us enough to choose the right
411 ## one; we need to give alliants their own operating system name to
412 ## do this right. When someone cares, they can help us.
413 fx80-alliant-* )
414 machine=alliant4 opsys=bsd4-2
415 ;;
416 i860-alliant-* )
417 machine=alliant-2800 opsys=bsd4-3
418 ;;
419
420 ## Altos 3068
421 m68*-altos-sysv* )
422 machine=altos opsys=usg5-2
423 ;;
424
425 ## Amdahl UTS
426 580-amdahl-sysv* )
427 machine=amdahl opsys=usg5-2-2
428 ;;
429
430 ## Appallings - I mean, Apollos - running Domain
431 m68*-apollo* )
432 machine=apollo opsys=bsd4-2
433 ;;
434
435 ## AT&T 3b2, 3b5, 3b15, 3b20
436 we32k-att-sysv* )
437 machine=att3b opsys=usg5-2-2
438 ;;
439
440 ## AT&T 3b1 - The Mighty Unix PC!
441 m68*-att-sysv* )
442 machine=7300 opsys=usg5-2-2
443 ;;
444
445 ## Bull dpx2
446 m68*-bull-sysv3* )
447 machine=dpx2 opsys=usg5-3
448 ;;
449
450 ## Bull sps7
451 m68*-bull-sysv2* )
452 machine=sps7 opsys=usg5-2
453 ;;
454
455 ## CCI 5/32, 6/32 -- see "Tahoe".
456
457 ## Celerity
458 ## I don't know what configuration name to use for this; config.sub
459 ## doesn't seem to know anything about it. Hey, Celerity users, get
460 ## in touch with us!
461 celerity-celerity-bsd* )
462 machine=celerity opsys=bsd4-2
463 ;;
464
465 ## Clipper
466 ## What operating systems does this chip run that Emacs has been
467 ## tested on?
468 clipper-* )
469 machine=clipper
470 ## We'll use the catch-all code at the bottom to guess the
471 ## operating system.
472 ;;
473
474 ## Convex
475 *-convex-bsd* )
476 machine=convex opsys=bsd4-3
477 ;;
478
479 ## Cubix QBx/386
480 i386-cubix-sysv* )
481 machine=intel386 opsys=usg5-3
482 ;;
483
484 ## Cydra 5
485 cydra*-cydrome-sysv* )
486 machine=cydra5 opsys=usg5-3
487 ;;
488
489 ## Data General AViiON Machines
490 m88k-dg-dgux* )
491 machine=aviion opsys=dgux
492 ;;
493
494 ## DECstations
495 mips-dec-ultrix[0-3].* | mips-dec-ultrix4.0* | mips-dec-bsd4.2* )
496 machine=pmax opsys=bsd4-2
497 ;;
498 mips-dec-ultrix* | mips-dec-bsd* )
499 machine=pmax opsys=bsd4-3
500 ;;
501 mips-dec-osf* )
502 machine=pmax opsys=osf1
503 ;;
504
505 ## Motorola Delta machines
506 m68*-motorola-sysv* )
507 machine=delta opsys=usg5-3
508 ;;
509 m88k-motorola-sysv4* )
510 machine=delta88k opsys=usg5-4
511 ;;
512 m88k-motorola-sysv* | m88k-motorola-m88kbcs* )
513 machine=delta88k opsys=usg5-3
514 ;;
515
516 ## Dual machines
517 m68*-dual-sysv* )
518 machine=dual opsys=usg5-2
519 ;;
520 m68*-dual-uniplus* )
521 machine=dual opsys=unipl5-2
522 ;;
523
524 ## Elxsi 6400
525 elxsi-elxsi-sysv* )
526 machine=elxsi opsys=usg5-2
527 ;;
528
529 ## Encore machines
530 ns16k-encore-bsd* )
531 machine=ns16000 opsys=umax
532 ;;
533
534 ## The GEC 93 - apparently, this port isn't really finished yet.
535
536 ## Gould Power Node and NP1
537 pn-gould-bsd4.2* )
538 machine=gould opsys=bsd4-2
539 ;;
540 pn-gould-bsd4.3* )
541 machine=gould opsys=bsd4-3
542 ;;
543 np1-gould-bsd* )
544 machine=gould-np1 opsys=bsd4-3
545 ;;
546
547 ## Honeywell XPS100
548 xps*-honeywell-sysv* )
549 machine=xps100 opsys=usg5-2
550 ;;
551
552 ## HP 9000 series 200 or 300
553 m68*-hp-bsd* )
554 machine=hp9000s300 opsys=bsd4-3
555 ;;
556 m68*-hp-netbsd* )
557 machine=hp9000s300 opsys=netbsd
558 ;;
559 ## HP/UX 7, 8 and 9 are supported on these machines.
560 m68*-hp-hpux* )
561 case "`uname -r`" in
562 ## Someone's system reports A.B8.05 for this.
563 ## I wonder what other possibilities there are.
564 *.B8.* ) machine=hp9000s300 opsys=hpux8 ;;
565 *.08.* ) machine=hp9000s300 opsys=hpux8 ;;
566 *.09.* ) machine=hp9000s300 opsys=hpux9 ;;
567 *) machine=hp9000s300 opsys=hpux ;;
568 esac
569 ;;
570
571 ## HP 9000 series 700 and 800, running HP/UX
572 hppa*-hp-hpux7* )
573 machine=hp9000s800 opsys=hpux
574 ;;
575 hppa*-hp-hpux8* )
576 machine=hp9000s800 opsys=hpux8
577 ;;
578 hppa*-hp-hpux9* )
579 machine=hp9000s800 opsys=hpux9
580 ;;
581
582 ## HP 9000 series 700 and 800, running HP/UX
583 hppa*-hp-hpux* )
584 ## Cross-compilation? Nah!
585 case "`uname -r`" in
586 ## Someone's system reports A.B8.05 for this.
587 ## I wonder what other possibilities there are.
588 *.B8.* ) machine=hp9000s800 opsys=hpux8 ;;
589 *.08.* ) machine=hp9000s800 opsys=hpux8 ;;
590 *.09.* ) machine=hp9000s800 opsys=hpux9 ;;
591 *) machine=hp9000s800 opsys=hpux ;;
592 esac
593 ;;
594
595 ## Orion machines
596 orion-orion-bsd* )
597 machine=orion opsys=bsd4-2
598 ;;
599 clipper-orion-bsd* )
600 machine=orion105 opsys=bsd4-2
601 ;;
602
603 ## IBM machines
604 i386-ibm-aix1.1* )
605 machine=ibmps2-aix opsys=usg5-2-2
606 ;;
607 i386-ibm-aix1.[23]* | i386-ibm-aix* )
608 machine=ibmps2-aix opsys=usg5-3
609 ;;
610 i370-ibm-aix*)
611 machine=ibm370aix opsys=usg5-3
612 ;;
613 rs6000-ibm-aix3.1* )
614 machine=ibmrs6000 opsys=aix3-1
615 ;;
616 rs6000-ibm-aix3.2* | rs6000-ibm-aix* )
617 machine=ibmrs6000 opsys=aix3-2
618 ;;
619 romp-ibm-bsd4.3* )
620 machine=ibmrt opsys=bsd4-3
621 ;;
622 romp-ibm-bsd4.2* )
623 machine=ibmrt opsys=bsd4-2
624 ;;
625 romp-ibm-aos4.3* )
626 machine=ibmrt opsys=bsd4-3
627 ;;
628 romp-ibm-aos4.2* )
629 machine=ibmrt opsys=bsd4-2
630 ;;
631 romp-ibm-aos* )
632 machine=ibmrt opsys=bsd4-3
633 ;;
634 romp-ibm-bsd* )
635 machine=ibmrt opsys=bsd4-3
636 ;;
637 romp-ibm-aix* )
638 machine=ibmrt-aix opsys=usg5-2-2
639 ;;
640
641 ## Integrated Solutions `Optimum V'
642 m68*-isi-bsd4.2* )
643 machine=isi-ov opsys=bsd4-2
644 ;;
645 m68*-isi-bsd4.3* )
646 machine=isi-ov opsys=bsd4-3
647 ;;
648
649 ## Intel 386 machines where we do care about the manufacturer
650 i[34]86-intsys-sysv* )
651 machine=is386 opsys=usg5-2-2
652 ;;
653
654 ## Prime EXL
655 i386-prime-sysv* )
656 machine=i386 opsys=usg5-3
657 ;;
658
659 ## Sequent Symmetry
660 i386-sequent-bsd* )
661 machine=symmetry opsys=bsd4-3
662 ;;
663
664 ## Intel 860
665 i860-*-sysvr4* )
666 machine=i860 opsys=usg5-4
667 ;;
668
669 ## Silicon Graphics machines
670 ## Iris 2500 and Iris 2500 Turbo (aka the Iris 3030)
671 m68*-sgi-iris3.5* )
672 machine=irist opsys=iris3-5
673 ;;
674 m68*-sgi-iris3.6* | m68*-sgi-iris*)
675 machine=irist opsys=iris3-6
676 ;;
677 ## Iris 4D
678 mips-sgi-irix3.* )
679 machine=iris4d opsys=irix3-3
680 ;;
681 mips-sgi-irix5.* )
682 machine=iris4d opsys=irix5-0
683 ;;
684 mips-sgi-irix4.* | mips-sgi-irix* )
685 machine=iris4d opsys=irix4-0
686 ;;
687
688 ## Masscomp machines
689 m68*-masscomp-rtu* )
690 machine=masscomp opsys=rtu
691 ;;
692
693 ## Megatest machines
694 m68*-megatest-bsd* )
695 machine=mega68 opsys=bsd4-2
696 ;;
697
698 ## Workstations sold by MIPS
699 ## This is not necessarily all workstations using the MIPS processor -
700 ## Irises are produced by SGI, and DECstations by DEC.
701
702 ## etc/MACHINES lists mips.h and mips4.h as possible machine files,
703 ## and usg5-2-2 and bsd4-3 as possible OS files. The only guidance
704 ## it gives for choosing between the alternatives seems to be "Use
705 ## -machine=mips4 for RISCOS version 4; use -opsystem=bsd4-3 with
706 ## the BSD world." I'll assume that these are instructions for
707 ## handling two odd situations, and that every other situation
708 ## should use mips.h and usg5-2-2, they being listed first.
709 mips-mips-usg* )
710 machine=mips4
711 ## Fall through to the general code at the bottom to decide on the OS.
712 ;;
713 mips-mips-riscos4* )
714 machine=mips4 opsys=bsd4-3
715 ;;
716 mips-mips-bsd* )
717 machine=mips opsys=bsd4-3
718 ;;
719 mips-mips-* )
720 machine=mips opsys=usg5-2-2
721 ;;
722
723 ## NeXT
724 m68*-next-mach* | m68*-next-bsd* )
725 machine=next opsys=mach2
726 ;;
727
728 ## The complete machine from National Semiconductor
729 ns32k-ns-genix* )
730 machine=ns32000 opsys=usg5-2
731 ;;
732
733 ## NCR machines
734 m68*-ncr-sysv2* | m68*-ncr-sysvr2* )
735 machine=tower32 opsys=usg5-2-2
736 ;;
737 m68*-ncr-sysv3* | m68*-ncr-sysvr3* )
738 machine=tower32v3 opsys=usg5-3
739 ;;
740
741 ## Nixdorf Targon 31
742 m68*-nixdorf-sysv* )
743 machine=targon31 opsys=usg5-2-2
744 ;;
745
746 ## Nu (TI or LMI)
747 m68*-nu-sysv* )
748 machine=nu opsys=usg5-2
749 ;;
750
751 ## Plexus
752 m68*-plexus-sysv* )
753 machine=plexus opsys=usg5-2
754 ;;
755
756 ## Pyramid machines
757 ## I don't really have any idea what sort of processor the Pyramid has,
758 ## so I'm assuming it is its own architecture.
759 pyramid-pyramid-bsd* )
760 machine=pyramid opsys=bsd4-2
761 ;;
762
763 ## Sequent Balance
764 ns32k-sequent-bsd4.2* )
765 machine=sequent opsys=bsd4-2
766 ;;
767 ns32k-sequent-bsd4.3* )
768 machine=sequent opsys=bsd4-3
769 ;;
770
771 ## SONY machines
772 m68*-sony-bsd4.2* )
773 machine=news opsys=bsd4-2
774 ;;
775 m68*-sony-bsd4.3* )
776 machine=news opsys=bsd4-3
777 ;;
778 m68*-sony-newsos3*)
779 machine=news opsys=bsd4-3
780 ;;
781 mips-sony-bsd* )
782 machine=news-risc opsys=bsd4-3
783 ;;
784
785 ## Stride
786 m68*-stride-sysv* )
787 machine=stride opsys=usg5-2
788 ;;
789
790 ## Suns
791 *-sun-sunos* | *-sun-bsd* | *-sun-solaris* )
792 case "${canonical}" in
793 m68*-sunos1* ) machine=sun1 ;;
794 m68*-sunos2* ) machine=sun2 ;;
795 m68* ) machine=sun3 ;;
796 i[34]86* ) machine=sun386 ;;
797 sparc* ) machine=sparc ;;
798 * ) unported=true ;;
799 esac
800 case "${canonical}" in
801 ## The Sun386 didn't get past 4.0.
802 i386-*-sunos4 ) opsys=sunos4-0 ;;
803 *-sunos4.0* ) opsys=sunos4-0 ;;
804 *-sunos4.1.3* ) opsys=sunos4-1-3 ;;
805 *-sunos4* | *-sunos ) opsys=sunos4-1 ;;
806 *-sunos5* | *-solaris* ) opsys=sol2 ;;
807 * ) opsys=bsd4-2 ;;
808 esac
809 ;;
810
811 ## Tadpole 68k
812 m68*-tadpole-sysv* )
813 machine=tad68k opsys=usg5-3
814 ;;
815
816 ## Tahoe machines
817 tahoe-tahoe-bsd4.2* )
818 machine=tahoe opsys=bsd4-2
819 ;;
820 tahoe-tahoe-bsd4.3* )
821 machine=tahoe opsys=bsd4-3
822 ;;
823
824 ## Tandem Integrity S2
825 mips-tandem-sysv* )
826 machine=tandem-s2 opsys=usg5-3
827 ;;
828
829 ## Tektronix XD88
830 m88k-tektronix-sysv3* )
831 machine=tekxd88 opsys=usg5-3
832 ;;
833
834 ## Tektronix 16000 box (6130?)
835 ns16k-tektronix-bsd* )
836 machine=ns16000 opsys=bsd4-2
837 ;;
838 ## Tektronix 4300
839 ## src/m/tek4300.h hints that this is a m68k machine.
840 m68*-tektronix-bsd* )
841 machine=tek4300 opsys=bsd4-3
842 ;;
843
844 ## Titan P2 or P3
845 ## We seem to have lost the machine-description file titan.h!
846 titan-titan-sysv* )
847 machine=titan opsys=usg5-3
848 ;;
849
850 ## Ustation E30 (SS5E)
851 m68*-unisys-uniplus* )
852 machine=ustation opsystem=unipl5-2
853 ;;
854
855 ## Vaxen.
856 vax-dec-* )
857 machine=vax
858 case "${canonical}" in
859 *-bsd4.1* ) opsys=bsd4-1 ;;
860 *-bsd4.2* | *-ultrix[0-3].* | *-ultrix4.0* ) opsys=bsd4-2 ;;
861 *-bsd4.3* | *-ultrix* ) opsys=bsd4-3 ;;
862 *-bsd386* ) opsys=bsd386 ;;
863 *-sysv[01]* | *-sysvr[01]* ) opsys=usg5-0 ;;
864 *-sysv2* | *-sysvr2* ) opsys=usg5-2 ;;
865 *-vms* ) opsys=vms ;;
866 * ) unported=true
867 esac
868 ;;
869
870 ## Whitechapel MG1
871 ns16k-whitechapel-* )
872 machine=mg1
873 ## We don't know what sort of OS runs on these; we'll let the
874 ## operating system guessing code below try.
875 ;;
876
877 ## Wicat
878 m68*-wicat-sysv* )
879 machine=wicat opsys=usg5-2
880 ;;
881
882 ## Intel 386 machines where we don't care about the manufacturer
883 i[34]86-*-* )
884 machine=intel386
885 case "${canonical}" in
886 *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
887 *-isc2.2* ) opsys=isc2-2 ;;
888 *-isc* ) opsys=isc3-0 ;;
889 *-esix5* ) opsys=esix5r4 ;;
890 *-esix* ) opsys=esix ;;
891 *-xenix* ) opsys=xenix ;;
892 *-linux* ) opsys=linux ;;
893 *-sco3.2v4* ) opsys=sco4 ;;
894 *-bsd386* ) opsys=bsd386 ;;
895 *-386bsd* ) opsys=386bsd ;;
896 *-netbsd* ) opsys=netbsd ;;
897 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
898 esac
899 ;;
900
901 * )
902 unported=true
903 ;;
904 esac
905
906 ### If the code above didn't choose an operating system, just choose
907 ### an operating system based on the configuration name. You really
908 ### only want to use this when you have no idea what the right
909 ### operating system is; if you know what operating systems a machine
910 ### runs, it's cleaner to make it explicit in the case statement
911 ### above.
912 if [ x"${opsys}" = x ]; then
913 case "${canonical}" in
914 *-bsd4.[01] ) opsys=bsd4-1 ;;
915 *-bsd4.2 ) opsys=bsd4-2 ;;
916 *-bsd4.3 ) opsys=bsd4-3 ;;
917 *-sysv0 | *-sysvr0 ) opsys=usg5-0 ;;
918 *-sysv2 | *-sysvr2 ) opsys=usg5-2 ;;
919 *-sysv2.2 | *-sysvr2.2 ) opsys=usg5-2-2 ;;
920 *-sysv3 | *-sysvr3 ) opsys=usg5-3 ;;
921 *-sysv4 | *-sysvr4 ) opsys=usg5-4 ;;
922 *-sysv4.2 | *-sysvr4.2 ) opsys=usg5-4-2 ;;
923 * )
924 unported=true
925 ;;
926 esac
927 fi
928
929 if $unported ; then
930 (echo "${progname}: Emacs hasn't been ported to \`${canonical}' systems."
931 echo "${progname}: Check \`etc/MACHINES' for recognized configuration names."
932 ) >&2
933 exit 1
934 fi
935
936 machfile="m/${machine}.h"
937 opsysfile="s/${opsys}.h"
938
939 ]
940 AC_PREPARE(lisp)
941 AC_CONFIG_HEADER(src/config.h)
942 [
943
944 #### Choose a compiler.
945 case ${with_gcc} in
946 "yes" ) CC="gcc" GCC=1 ;;
947 "no" ) CC="cc" ;;
948 * )
949 ] AC_PROG_CC [
950 esac
951
952 #### Some other nice autoconf tests. If you add a test here which
953 #### should make an entry in src/config.h, don't forget to add an
954 #### #undef clause to src/config.h.in for autoconf to modify.
955 ]
956 dnl checks for programs
957 AC_LN_S
958 AC_PROG_CPP
959 AC_PROG_INSTALL
960 AC_PROG_YACC
961
962 dnl checks for UNIX variants that set `DEFS'
963
964 dnl checks for header files
965 AC_HAVE_HEADERS(sys/timeb.h sys/time.h)
966 AC_STDC_HEADERS
967 AC_TIME_WITH_SYS_TIME
968
969 dnl checks for typedefs
970 AC_RETSIGTYPE
971
972 dnl checks for structure members
973 AC_STRUCT_TM
974 AC_TIMEZONE
975
976 dnl checks for compiler characteristics
977 AC_CONST
978
979 dnl checks for operating system services
980 AC_LONG_FILE_NAMES
981
982 dnl other checks for UNIX variants
983 [
984
985
986 #### Choose a window system.
987 echo "Checking window system."
988
989 window_system=''
990 case "${with_x}" in
991 yes )
992 window_system=${window_system}x11
993 ;;
994 no )
995 window_system=${window_system}none
996 esac
997 case "${with_x11}" in
998 yes )
999 window_system=${window_system}x11
1000 ;;
1001 esac
1002 case "${with_x10}" in
1003 yes )
1004 window_system=${window_system}x10
1005 ;;
1006 esac
1007
1008 case "${window_system}" in
1009 "none" | "x11" | "x10" ) ;;
1010 "" )
1011 # --x-includes or --x-libraries implies --with-x11.
1012 if [ -n "${x_includes}" ] || [ -n "${x_libraries}" ]; then
1013 window_system=x11
1014 else
1015 echo " No window system specified. Looking for X11."
1016 # If the user didn't specify a window system and we found X11, use it.
1017 if [ -r /usr/lib/libX11.a \
1018 -o -d /usr/include/X11 \
1019 -o -d /usr/X386/include \
1020 -o -d ${x_includes}/X11 ]; then
1021 window_system=x11
1022 fi
1023 fi
1024 ;;
1025 * )
1026 echo "Don't specify a window system more than once." >&2
1027 exit 1
1028 ;;
1029 esac
1030
1031 case "${window_system}" in
1032 "" | "x11" )
1033 ### If the user hasn't specified where we should find X, try
1034 ### letting autoconf figure that out.
1035 if [ -z "${x_includes}" ] && [ -z "${x_libraries}" ]; then
1036 ]
1037 AC_FIND_X
1038 [
1039 fi
1040 if [ -n "${x_includes}" ] || [ -n "${x_libraries}" ]; then
1041 window_system=x11
1042 fi
1043 ;;
1044 esac
1045
1046 [ -z "${window_system}" ] && window_system=none
1047
1048 [ -n "${x_libraries}" ] && LD_SWITCH_X_SITE="-L${x_libraries}"
1049 [ -n "${x_includes}" ] && C_SWITCH_X_SITE="-I${x_includes}"
1050
1051 case "${window_system}" in
1052 x11 )
1053 HAVE_X_WINDOWS=yes
1054 HAVE_X11=yes
1055 echo " Using X11."
1056 ;;
1057 x10 )
1058 HAVE_X_WINDOWS=yes
1059 HAVE_X11=no
1060 echo " Using X10."
1061 ;;
1062 none )
1063 HAVE_X_WINDOWS=no
1064 HAVE_X11=no
1065 echo " Using no window system."
1066 ;;
1067 esac
1068
1069 ### If we're using X11, we should use the X menu package.
1070 HAVE_X_MENU=no
1071 case ${HAVE_X11} in
1072 yes )
1073 HAVE_X_MENU=yes
1074 ;;
1075 esac
1076
1077 #### Extract some information from the operating system and machine files.
1078
1079 echo "Examining the machine- and system-dependent files to find out"
1080 echo " - which libraries the lib-src programs will want, and"
1081 echo " - whether the GNU malloc routines are usable."
1082
1083 ### It's not important that this name contain the PID; you can't run
1084 ### two configures in the same directory and have anything work
1085 ### anyway.
1086 tempcname="conftest.c"
1087
1088 echo '
1089 #include "'${srcdir}'/src/'${opsysfile}'"
1090 #include "'${srcdir}'/src/'${machfile}'"
1091 #ifndef LIBS_MACHINE
1092 #define LIBS_MACHINE
1093 #endif
1094 #ifndef LIBS_SYSTEM
1095 #define LIBS_SYSTEM
1096 #endif
1097 #ifndef C_SWITCH_SYSTEM
1098 #define C_SWITCH_SYSTEM
1099 #endif
1100 @configure@ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM
1101 @configure@ c_switch_system=C_SWITCH_SYSTEM
1102
1103 #ifndef LIB_X11_LIB
1104 #define LIB_X11_LIB -lX11
1105 #endif
1106
1107 #ifndef LIBX11_MACHINE
1108 #define LIBX11_MACHINE
1109 #endif
1110
1111 #ifndef LIBX11_SYSTEM
1112 #define LIBX11_SYSTEM
1113 #endif
1114 @configure@ LIBX=LIB_X11_LIB LIBX11_MACHINE LIBX11_SYSTEM
1115
1116 #ifdef UNEXEC
1117 @configure@ unexec=UNEXEC
1118 #else
1119 @configure@ unexec=unexec.o
1120 #endif
1121
1122 #ifdef SYSTEM_MALLOC
1123 @configure@ system_malloc=yes
1124 #else
1125 @configure@ system_malloc=no
1126 #endif
1127
1128 #ifndef C_DEBUG_SWITCH
1129 #define C_DEBUG_SWITCH -g
1130 #endif
1131
1132 #ifndef C_OPTIMIZE_SWITCH
1133 #define C_OPTIMIZE_SWITCH -O
1134 #endif
1135
1136 #ifdef __GNUC__
1137 @configure@ CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH
1138 #else
1139 @configure@ CFLAGS=C_DEBUG_SWITCH
1140 #endif
1141 ' > ${tempcname}
1142 # The value of CPP is a quoted variable reference, so we need to do this
1143 # to get its actual value...
1144 CPP=`eval "echo $CPP"`
1145 eval `${CPP} -Isrc ${tempcname} \
1146 | grep '@configure@' \
1147 | sed -e 's/^@configure@ \([^=]*=\)\(.*\)$/\1"\2"/'`
1148 rm ${tempcname}
1149
1150 ### Compute the unexec source name from the object name.
1151 UNEXEC_SRC="`echo ${unexec} | sed 's/\.o/.c/'`"
1152
1153 # Do the opsystem or machine files prohibit the use of the GNU malloc?
1154 # Assume not, until told otherwise.
1155 GNU_MALLOC=yes
1156 if [ "${system_malloc}" = "yes" ]; then
1157 GNU_MALLOC=no
1158 GNU_MALLOC_reason="
1159 (The GNU allocators don't work with this system configuration.)"
1160 fi
1161
1162 if [ x"${REL_ALLOC}" = x ]; then
1163 REL_ALLOC=${GNU_MALLOC}
1164 fi
1165
1166 LISP_FLOAT_TYPE=yes
1167
1168
1169 #### Add the libraries to LIBS and check for some functions.
1170
1171 ]
1172 DEFS="$c_switch_system $DEFS"
1173 LIBS="$libsrc_libs"
1174
1175 dnl If found, this defines HAVE_LIBDNET, which m/pmax.h checks,
1176 dnl and also adds -ldnet to LIBS, which Autoconf uses for checks.
1177 AC_HAVE_LIBRARY(-ldnet)
1178
1179 AC_HAVE_LIBRARY(-lXbsd, LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd")
1180
1181 echo checking for XFree86
1182 if test -d /usr/X386/include; then
1183 HAVE_XFREE386=yes
1184 test -z "${C_SWITCH_X_SITE}" && C_SWITCH_X_SITE="-I/usr/X386/include"
1185 fi
1186
1187 if test "${HAVE_X11}" = "yes"; then
1188 DEFS="$C_SWITCH_X_SITE $DEFS"
1189 LIBS="$LD_SWITCH_X_SITE $LIBX $LIBS"
1190 AC_HAVE_FUNCS(XrmSetDatabase XScreenResourceString XScreenNumberOfScreen)
1191 fi
1192
1193 AC_ALLOCA
1194
1195 # logb and frexp are found in -lm on most systems.
1196 AC_HAVE_LIBRARY(-lm)
1197 AC_HAVE_FUNCS(gettimeofday gethostname dup2 rename closedir mkdir rmdir random bcopy logb frexp ftime)
1198
1199 ok_so_far=true
1200 AC_FUNC_CHECK(socket, , ok_so_far=)
1201 if test -n "$ok_so_far"; then
1202 AC_HEADER_CHECK(netinet/in.h, , ok_so_far=)
1203 fi
1204 if test -n "$ok_so_far"; then
1205 AC_HEADER_CHECK(arpa/inet.h, , ok_so_far=)
1206 fi
1207 if test -n "$ok_so_far"; then
1208 AC_DEFINE(HAVE_INET_SOCKETS)
1209 fi
1210 [
1211 #### Find out which version of Emacs this is.
1212 version=`grep 'defconst[ ]*emacs-version' ${srcdir}/lisp/version.el \
1213 | sed -e 's/^.*"\([0-9][0-9]*\.[0-9][0-9]*\)\..*$/\1/'`
1214 if [ x"${version}" = x ]; then
1215 echo "${progname}: can't find current emacs version in
1216 \`${srcdir}/lisp/version.el'." >&2
1217 exit 1
1218 fi
1219
1220 if [ -f /usr/lpp/X11/bin/smt.exp ]; then
1221 ]
1222 AC_DEFINE(HAVE_AIX_SMT_EXP)
1223 [
1224 fi
1225
1226
1227 #### Specify what sort of things we'll be editing into Makefile and config.h.
1228 ### Use configuration here uncanonicalized to avoid exceeding size limits.
1229 ]
1230 AC_SUBST(configuration)
1231 AC_SUBST(version)
1232 AC_SUBST(srcdir)
1233 AC_SUBST(c_switch_system)
1234 AC_SUBST(libsrc_libs)
1235 AC_SUBST(rip_paths)
1236 AC_SUBST(inst_paths)
1237 AC_SUBST(LD_SWITCH_X_SITE)
1238 AC_SUBST(C_SWITCH_X_SITE)
1239 AC_SUBST(CFLAGS)
1240 AC_SUBST(prefix)
1241 AC_SUBST(exec_prefix)
1242
1243 AC_DEFINE_UNQUOTED(config_machfile, "\"${machfile}\"")
1244 AC_DEFINE_UNQUOTED(config_opsysfile, "\"${opsysfile}\"")
1245 AC_DEFINE_UNQUOTED(LD_SWITCH_X_SITE, ${LD_SWITCH_X_SITE})
1246 AC_DEFINE_UNQUOTED(C_SWITCH_X_SITE, ${C_SWITCH_X_SITE})
1247 AC_DEFINE_UNQUOTED(UNEXEC_SRC, ${UNEXEC_SRC})
1248
1249 [
1250 if [ "${HAVE_X_WINDOWS}" = "yes" ] ; then
1251 ] AC_DEFINE(HAVE_X_WINDOWS) [
1252 fi
1253 if [ "${HAVE_X11}" = "yes" ] ; then
1254 ] AC_DEFINE(HAVE_X11) [
1255 fi
1256 if [ "${HAVE_XFREE386}" = "yes" ] ; then
1257 ] AC_DEFINE(HAVE_XFREE386) [
1258 fi
1259 if [ "${HAVE_X_MENU}" = "yes" ] ; then
1260 ] AC_DEFINE(HAVE_X_MENU) [
1261 fi
1262 if [ "${GNU_MALLOC}" = "yes" ] ; then
1263 ] AC_DEFINE(GNU_MALLOC) [
1264 fi
1265 if [ "${REL_ALLOC}" = "yes" ] ; then
1266 ] AC_DEFINE(REL_ALLOC) [
1267 fi
1268 if [ "${LISP_FLOAT_TYPE}" = "yes" ] ; then
1269 ] AC_DEFINE(LISP_FLOAT_TYPE) [
1270 fi
1271
1272
1273 #### Report on what we decided to do.
1274 echo "
1275
1276 Configured for \`${canonical}'.
1277
1278 Where should the build process find the source code? ${srcdir}
1279 What operating system and machine description files should Emacs use?
1280 \`${opsysfile}' and \`${machfile}'
1281 What compiler should emacs be built with? ${CC} ${CFLAGS}
1282 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
1283 Should Emacs use the relocating allocator for buffers? ${REL_ALLOC}
1284 What window system should Emacs use? ${window_system}${x_includes+
1285 Where do we find X Windows header files? }${x_includes}${x_libraries+
1286 Where do we find X Windows libraries? }${x_libraries}
1287
1288 "
1289
1290 # Remove any trailing slashes in these variables.
1291 test -n "${prefix}" &&
1292 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
1293 test -n "${exec_prefix}" &&
1294 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
1295 ]
1296 AC_OUTPUT(Makefile)