(XTread_socket): For UnmapNotify, if frame was visible,
[bpt/emacs.git] / 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
358 ### Make the necessary directories, if they don't exist.
359 if [ ! -d ./src ]; then
360 mkdir ./src
361 fi
362 if [ ! -d ./lib-src ]; then
363 mkdir ./lib-src
364 fi
365 if [ ! -d ./cpp ]; then
366 mkdir ./cpp
367 fi
368 if [ ! -d ./oldXMenu ]; then
369 mkdir ./oldXMenu
370 fi
371 if [ ! -d ./etc ]; then
372 mkdir ./etc
373 fi
374
375 #### Given the configuration name, set machfile and opsysfile to the
376 #### names of the m/*.h and s/*.h files we should use.
377
378 ### Canonicalize the configuration name.
379 echo "Checking the configuration name."
380 if configuration=`${srcdir}/config.sub "${configuration}"` ; then : ; else
381 exit $?
382 fi
383
384 ### If you add support for a new configuration, add code to this
385 ### switch statement to recognize your configuration name and select
386 ### the appropriate operating system and machine description files.
387
388 ### You would hope that you could choose an m/*.h file pretty much
389 ### based on the machine portion of the configuration name, and an s-
390 ### file based on the operating system portion. However, it turns out
391 ### that each m/*.h file is pretty manufacturer-specific - for
392 ### example, apollo.h, hp9000s300.h, mega68k, news.h, and tad68k are
393 ### all 68000 machines; mips.h, pmax.h, and news-risc are all MIPS
394 ### machines. So we basically have to have a special case for each
395 ### configuration name.
396 ###
397 ### As far as handling version numbers on operating systems is
398 ### concerned, make sure things will fail in a fixable way. If
399 ### /etc/MACHINES doesn't say anything about version numbers, be
400 ### prepared to handle anything reasonably. If version numbers
401 ### matter, be sure /etc/MACHINES says something about it.
402 ###
403 ### Eric Raymond says we should accept strings like "sysvr4" to mean
404 ### "System V Release 4"; he writes, "The old convention encouraged
405 ### confusion between `system' and `release' levels'."
406
407 machine='' opsys='' unported='false'
408 case "${configuration}" in
409
410 ## Alliant machines
411 ## Strictly speaking, we need the version of the alliant operating
412 ## system to choose the right machine file, but currently the
413 ## configuration name doesn't tell us enough to choose the right
414 ## one; we need to give alliants their own operating system name to
415 ## do this right. When someone cares, they can help us.
416 fx80-alliant-* )
417 machine=alliant4 opsys=bsd4-2
418 ;;
419 i860-alliant-* )
420 machine=alliant-2800 opsys=bsd4-3
421 ;;
422
423 ## Altos 3068
424 m68*-altos-sysv* )
425 machine=altos opsys=usg5-2
426 ;;
427
428 ## Amdahl UTS
429 580-amdahl-sysv* )
430 machine=amdahl opsys=usg5-2-2
431 ;;
432
433 ## Appallings - I mean, Apollos - running Domain
434 m68*-apollo* )
435 machine=apollo opsys=bsd4-2
436 ;;
437
438 ## AT&T 3b2, 3b5, 3b15, 3b20
439 we32k-att-sysv* )
440 machine=att3b opsys=usg5-2-2
441 ;;
442
443 ## AT&T 3b1 - The Mighty Unix PC!
444 m68*-att-sysv* )
445 machine=7300 opsys=usg5-2-2
446 ;;
447
448 ## Bull sps7
449 m68*-bull-sysv* )
450 machine=sps7 opsys=usg5-2
451 ;;
452
453 ## CCI 5/32, 6/32 -- see "Tahoe".
454
455 ## Celerity
456 ## I don't know what configuration name to use for this; config.sub
457 ## doesn't seem to know anything about it. Hey, Celerity users, get
458 ## in touch with us!
459 celerity-celerity-bsd* )
460 machine=celerity opsys=bsd4-2
461 ;;
462
463 ## Clipper
464 ## What operating systems does this chip run that Emacs has been
465 ## tested on?
466 clipper-* )
467 machine=clipper
468 ## We'll use the catch-all code at the bottom to guess the
469 ## operating system.
470 ;;
471
472 ## Convex
473 *-convex-bsd* )
474 machine=convex opsys=bsd4-3
475 ;;
476
477 ## Cubix QBx/386
478 i386-cubix-sysv* )
479 machine=intel386 opsys=usg5-3
480 ;;
481
482 ## Cydra 5
483 cydra*-cydrome-sysv* )
484 machine=cydra5 opsys=usg5-3
485 ;;
486
487 ## DECstations
488 mips-dec-ultrix[0-3].* | mips-dec-ultrix4.0 | mips-dec-bsd4.2 )
489 machine=pmax opsys=bsd4-2
490 ;;
491 mips-dec-ultrix* | mips-dec-bsd* )
492 machine=pmax opsys=bsd4-3
493 ;;
494 mips-dec-osf* )
495 machine=pmax opsys=osf1
496 ;;
497
498 ## Motorola Delta machines
499 m68*-motorola-sysv* )
500 machine=delta opsys=usg5-3
501 ;;
502 m88k-motorola-sysv* | m88k-motorola-m88kbcs* )
503 machine=delta88k opsys=usg5-3
504 ;;
505
506 ## Dual machines
507 m68*-dual-sysv* )
508 machine=dual opsys=usg5-2
509 ;;
510 m68*-dual-uniplus* )
511 machine=dual opsys=unipl5-2
512 ;;
513
514 ## Elxsi 6400
515 elxsi-elxsi-sysv* )
516 machine=elxsi opsys=usg5-2
517 ;;
518
519 ## Encore machines
520 ns16k-encore-bsd* )
521 machine=ns16000 opsys=umax
522 ;;
523
524 ## The GEC 93 - apparently, this port isn't really finished yet.
525
526 ## Gould Power Node and NP1
527 pn-gould-bsd4.2 )
528 machine=gould opsys=bsd4-2
529 ;;
530 pn-gould-bsd4.3 )
531 machine=gould opsys=bsd4-3
532 ;;
533 np1-gould-bsd* )
534 machine=gould-np1 opsys=bsd4-3
535 ;;
536
537 ## Honeywell XPS100
538 xps*-honeywell-sysv* )
539 machine=xps100 opsys=usg5-2
540 ;;
541
542 ## HP 9000 series 200 or 300
543 m68*-hp-bsd* )
544 machine=hp9000s300 opsys=bsd4-3
545 ;;
546 ## HP/UX 8 doesn't run on these machines, so use HP/UX 7.
547 m68*-hp-hpux* )
548 machine=hp9000s300 opsys=hpux
549 ;;
550
551 ## HP 9000 series 700 and 800, running HP/UX
552 hppa1.0-hp-hpux* )
553 machine=hp9000s800 opsys=hpux
554 ;;
555 hppa1.1-hp-hpux* )
556 machine=hp9000s800 opsys=hpux8
557 ;;
558 hppa*-hp-hpux* )
559 ## Cross-compilation? Nah!
560 case "`uname -r`" in
561 *.08.* ) machine=hp9000s800 opsys=hpux ;;
562 *.09.* ) machine=hp9000s800 opsys=hpux8 ;;
563 *) machine=hp9000s800 opsys=hpux ;;
564 esac
565 ;;
566
567 ## Orion machines
568 orion-orion-bsd* )
569 machine=orion opsys=bsd4-2
570 ;;
571 clipper-orion-bsd* )
572 machine=orion105 opsys=bsd4-2
573 ;;
574
575 ## IBM machines
576 i386-ibm-aix1.1 )
577 machine=ibmps2-aix opsys=usg5-2-2
578 ;;
579 i386-ibm-aix1.2 )
580 machine=ibmps2-aix opsys=usg5-3
581 ;;
582 rs6000-ibm-aix3.1 )
583 machine=ibmrs6000 opsys=aix3-1
584 ;;
585 rs6000-ibm-aix3.2 | rs6000-ibm-aix* )
586 machine=ibmrs6000 opsys=aix3-2
587 ;;
588 romp-ibm-bsd4-3 )
589 machine=ibmrt opsys=bsd4-3
590 ;;
591 romp-ibm-bsd4-2 )
592 machine=ibmrt opsys=bsd4-2
593 ;;
594 romp-ibm-aos4-3 )
595 machine=ibmrt opsys=bsd4-3
596 ;;
597 romp-ibm-aos4-2 )
598 machine=ibmrt opsys=bsd4-2
599 ;;
600 romp-ibm-aos* )
601 machine=ibmrt opsys=bsd4-3
602 ;;
603 romp-ibm-bsd* )
604 machine=ibmrt opsys=bsd4-3
605 ;;
606 romp-ibm-aix* )
607 machine=ibmrt-aix opsys=usg5-2-2
608 ;;
609
610 ## Integrated Solutions `Optimum V'
611 m68*-isi-bsd4.2 )
612 machine=isi-ov opsys=bsd4-2
613 ;;
614 m68*-isi-bsd4.3 )
615 machine=isi-ov opsys=bsd4-3
616 ;;
617
618 ## Intel 386 machines where we do care about the manufacturer
619 i[34]86-intsys-sysv* )
620 machine=is386 opsys=usg5-2-2
621 ;;
622 ## Intel 386 machines where we don't care about the manufacturer
623 i[34]86-unknown-* )
624 machine=intel386
625 case "${configuration}" in
626 *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
627 *-isc2.2 ) opsys=isc2-2 ;;
628 *-isc* ) opsys=isc3-0 ;;
629 *-esix5* ) opsys=esix5r4 ;;
630 *-esix* ) opsys=esix ;;
631 *-xenix* ) opsys=xenix ;;
632 *-linux* ) opsys=linux ;;
633 *-sco3.2v4* ) opsys=sco4 ;;
634 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
635 esac
636 ;;
637
638 ## Intel 860
639 i860-*-sysvr4 )
640 machine=i860 opsys=usg5-4
641 ;;
642
643 ## Silicon Graphics machines
644 ## Iris 2500 and Iris 2500 Turbo (aka the Iris 3030)
645 m68*-sgi-iris3.5 )
646 machine=irist opsys=iris3-5
647 ;;
648 m68*-sgi-iris3.6 | m68*-sgi-iris*)
649 machine=irist opsys=iris3-6
650 ;;
651 ## Iris 4D
652 mips-sgi-irix3.* )
653 machine=iris4d opsys=irix3-3
654 ;;
655 mips-sgi-irix4.* | mips-sgi-irix* )
656 machine=iris4d opsys=irix4-0
657 ;;
658
659 ## Masscomp machines
660 m68*-masscomp-rtu )
661 machine=masscomp opsys=rtu
662 ;;
663
664 ## Megatest machines
665 m68*-megatest-bsd* )
666 machine=mega68 opsys=bsd4-2
667 ;;
668
669 ## Workstations sold by MIPS
670 ## This is not necessarily all workstations using the MIPS processor -
671 ## Irises are produced by SGI, and DECstations by DEC.
672
673 ## etc/MACHINES lists mips.h and mips4.h as possible machine files,
674 ## and usg5-2-2 and bsd4-3 as possible OS files. The only guidance
675 ## it gives for choosing between the alternatives seems to be "Use
676 ## -machine=mips4 for RISCOS version 4; use -opsystem=bsd4-3 with
677 ## the BSD world." I'll assume that these are instructions for
678 ## handling two odd situations, and that every other situation
679 ## should use mips.h and usg5-2-2, they being listed first.
680 mips-mips-riscos4* )
681 machine=mips4 opsys=usg5-2-2
682 ;;
683 mips-mips-bsd* )
684 machine=mips opsys=bsd4-3
685 ;;
686 mips-mips-* )
687 machine=mips opsys=usg5-2-2
688 ;;
689
690 ## NeXT
691 m68*-next-mach* | m68*-next-bsd* )
692 machine=next opsys=mach2
693 ;;
694
695 ## The complete machine from National Semiconductor
696 ns32k-ns-genix* )
697 machine=ns32000 opsys=usg5-2
698 ;;
699
700 ## NCR machines
701 m68*-ncr-sysv2* | m68*-ncr-sysvr2* )
702 machine=tower32 opsys=usg5-2-2
703 ;;
704 m68*-ncr-sysv3* | m68*-ncr-sysvr3* )
705 machine=tower32v3 opsys=usg5-3
706 ;;
707
708 ## Nixdorf Targon 31
709 m68*-nixdorf-sysv* )
710 machine=targon31 opsys=usg5-2-2
711 ;;
712
713 ## Nu (TI or LMI)
714 m68*-nu-sysv* )
715 machine=nu opsys=usg5-2
716 ;;
717
718 ## Plexus
719 m68*-plexus-sysv* )
720 machine=plexus opsys=usg5-2
721 ;;
722
723 ## Prime EXL
724 i386-prime-sysv* )
725 machine=i386 opsys=usg5-3
726 ;;
727
728 ## Pyramid machines
729 ## I don't really have any idea what sort of processor the Pyramid has,
730 ## so I'm assuming it is its own architecture.
731 pyramid-pyramid-bsd* )
732 machine=pyramid opsys=bsd4-2
733 ;;
734
735 ## Sequent Balance
736 ns32k-sequent-bsd4.2 )
737 machine=sequent opsys=bsd4-2
738 ;;
739 ns32k-sequent-bsd4.3 )
740 machine=sequent opsys=bsd4-3
741 ;;
742 ## Sequent Symmetry
743 i386-sequent-bsd* )
744 machine=symmetry opsys=bsd4-3
745 ;;
746
747 ## SONY machines
748 m68*-sony-bsd4.2 )
749 machine=news opsys=bsd4-2
750 ;;
751 m68*-sony-bsd4.3 )
752 machine=news opsys=bsd4-3
753 ;;
754 mips-sony-bsd* )
755 machine=news-risc opsys=bsd4-3
756 ;;
757
758 ## Stride
759 m68*-stride-sysv* )
760 machine=stride opsys=usg5-2
761 ;;
762
763 ## Suns
764 *-sun-sunos* | *-sun-bsd* | *-sun-solaris* )
765 case "${configuration}" in
766 m68*-sunos1* ) machine=sun1 ;;
767 m68*-sunos2* ) machine=sun2 ;;
768 m68* ) machine=sun3 ;;
769 i[34]86* ) machine=sun386 ;;
770 sparc* ) machine=sparc ;;
771 * ) unported=true ;;
772 esac
773 case "${configuration}" in
774 *-sunos4.0* ) opsys=sunos4-0 ;;
775 *-sunos4.1.3* ) opsys=sunos4-1-3 ;;
776 *-sunos4* | *-sunos ) opsys=sunos4-1 ;;
777 *-sunos5* | *-solaris* ) opsys=sol2 ;;
778 * ) opsys=bsd4-2 ;;
779 esac
780 ;;
781
782 ## Tadpole 68k
783 m68*-tadpole-sysv* )
784 machine=tad68k opsys=usg5-3
785 ;;
786
787 ## Tahoe machines
788 tahoe-tahoe-bsd4.2 )
789 machine=tahoe opsys=bsd4-2
790 ;;
791 tahoe-tahoe-bsd4.3 )
792 machine=tahoe opsys=bsd4-3
793 ;;
794
795 ## Tandem Integrity S2
796 mips-tandem-sysv* )
797 machine=tandem-s2 opsys=usg5-3
798 ;;
799
800 ## Tektronix XD88
801 m88k-tektronix-sysv3 )
802 machine=tekXD88 opsys=usg5-3
803 ;;
804
805 ## Tektronix 16000 box (6130?)
806 ns16k-tektronix-bsd* )
807 machine=ns16000 opsys=bsd4-2
808 ;;
809 ## Tektronix 4300
810 ## src/m/tek4300.h hints that this is a m68k machine.
811 m68*-tektronix-bsd* )
812 machine=tex4300 opsys=bsd4-3
813 ;;
814
815 ## Titan P2 or P3
816 ## We seem to have lost the machine-description file titan.h!
817 titan-titan-sysv* )
818 machine=titan opsys=usg5-3
819 ;;
820
821 ## Ustation E30 (SS5E)
822 m68*-unisys-uniplus* )
823 machine=ustation opsystem=unipl5-2
824 ;;
825
826 ## Vaxen.
827 vax-dec-* )
828 machine=vax
829 case "${configuration}" in
830 *-bsd4.1 ) opsys=bsd4-1 ;;
831 *-bsd4.2 | *-ultrix[0-3].* | *-ultrix4.0 ) opsys=bsd4-2 ;;
832 *-bsd4.3 | *-ultrix* ) opsys=bsd4-3 ;;
833 *-sysv[01]* | *-sysvr[01]* ) opsys=usg5-0 ;;
834 *-sysv2* | *-sysvr2* ) opsys=usg5-2 ;;
835 *-vms* ) opsys=vms ;;
836 * ) unported=true
837 esac
838 ;;
839
840 ## Whitechapel MG1
841 ns16k-whitechapel-* )
842 machine=mg1
843 ## We don't know what sort of OS runs on these; we'll let the
844 ## operating system guessing code below try.
845 ;;
846
847 ## Wicat
848 m68*-wicat-sysv* )
849 machine=wicat opsys=usg5-2
850 ;;
851
852 * )
853 unported=true
854 ;;
855 esac
856
857 ### If the code above didn't choose an operating system, just choose
858 ### an operating system based on the configuration name. You really
859 ### only want to use this when you have no idea what the right
860 ### operating system is; if you know what operating systems a machine
861 ### runs, it's cleaner to make it explicit in the case statement
862 ### above.
863 if [ ! "${opsys}" ]; then
864 case "${configuration}" in
865 *-bsd4.[01] ) opsys=bsd4-1 ;;
866 *-bsd4.2 ) opsys=bsd4-2 ;;
867 *-bsd4.3 ) opsys=bsd4-3 ;;
868 *-sysv0 | *-sysvr0 ) opsys=usg5-0 ;;
869 *-sysv2 | *-sysvr2 ) opsys=usg5-2 ;;
870 *-sysv2.2 | *-sysvr2.2 ) opsys=usg5-2-2 ;;
871 *-sysv3 | *-sysvr3 ) opsys=usg5-3 ;;
872 *-sysv4 | *-sysvr4 ) opsys=usg5-4 ;;
873 *-sysv4.2 | *-sysvr4.2 ) opsys=usg5-4-2 ;;
874 * )
875 unported=true
876 ;;
877 esac
878 fi
879
880 if $unported ; then
881 (echo "${progname}: Emacs hasn't been ported to \`${configuration}' systems."
882 echo "${progname}: Check \`etc/MACHINES' for recognized configuration names."
883 ) >&2
884 exit 1
885 fi
886
887 machfile="m/${machine}.h"
888 opsysfile="s/${opsys}.h"
889
890 ]
891 AC_PREPARE(lisp)
892 AC_CONFIG_HEADER(src/config.h)
893 [
894
895 #### Choose a compiler.
896 case ${with_gcc} in
897 "yes" ) CC="gcc" GCC=1 ;;
898 "no" ) CC="cc" ;;
899 * )
900 ] AC_PROG_CC [
901 esac
902
903 CFLAGS='-g'
904 if test -n "${GCC}"; then
905 CFLAGS='-g -O'
906 fi
907
908 #### Some other nice autoconf tests. If you add a test here which
909 #### should make an entry in src/config.h, don't forget to add an
910 #### #undef clause to src/config.h.in for autoconf to modify.
911 ]
912 dnl checks for programs
913 AC_LN_S
914 AC_PROG_CPP
915 AC_PROG_INSTALL
916
917 dnl checks for UNIX variants that set `DEFS'
918
919 dnl checks for header files
920 AC_HAVE_HEADERS(sys/timeb.h sys/time.h)
921 AC_STDC_HEADERS
922 AC_TIME_WITH_SYS_TIME
923
924 dnl checks for typedefs
925 AC_RETSIGTYPE
926
927 dnl checks for functions
928 AC_ALLOCA
929 AC_HAVE_FUNCS(gettimeofday gethostname dup2 rename)
930
931 dnl checks for structure members
932 AC_STRUCT_TM
933 AC_TIMEZONE
934
935 dnl checks for compiler characteristics
936 AC_CONST
937
938 dnl checks for operating system services
939
940 dnl other checks for UNIX variants
941 [
942
943
944 #### Choose a window system.
945 echo "Checking window system."
946
947 window_system=''
948 case "${with_x}" in
949 yes )
950 window_system=${window_system}x11
951 ;;
952 no )
953 window_system=${window_system}none
954 esac
955 case "${with_x11}" in
956 yes )
957 window_system=${window_system}x11
958 ;;
959 esac
960 case "${with_x10}" in
961 yes )
962 window_system=${window_system}x10
963 ;;
964 esac
965
966 case "${window_system}" in
967 "none" | "x11" | "x10" ) ;;
968 "" )
969 echo " No window system specifed. Looking for X11."
970 window_system=none
971 if [ -r /usr/lib/libX11.a \
972 -o -d /usr/include/X11 \
973 -o -d /usr/X386/include \
974 -o -d ${x_includes}/X11 ]; then
975 window_system=x11
976 fi
977 ;;
978 * )
979 echo "Don't specify the window system more than once." >&2
980 exit 1
981 ;;
982 esac
983
984 case "${window_system}" in
985 x11 )
986 HAVE_X_WINDOWS=yes
987 HAVE_X11=yes
988 echo " Using X11."
989 ;;
990 x10 )
991 HAVE_X_WINDOWS=yes
992 HAVE_X11=no
993 echo " Using X10."
994 ;;
995 none )
996 HAVE_X_WINDOWS=no
997 HAVE_X11=no
998 echo " Using no window system."
999 ;;
1000 esac
1001
1002 ### If we're using X11, we should use the X menu package.
1003 HAVE_X_MENU=no
1004 case ${HAVE_X11} in
1005 yes )
1006 HAVE_X_MENU=yes
1007 ;;
1008 esac
1009
1010 ### Check for XFree386. It needs special hacks.
1011 lib_havexbsd=no
1012 ]
1013 AC_HAVE_LIBRARY( Xbsd , have_libxbsd=yes , have_libxbsd=no )
1014 [
1015 if [ -n "${x_libraries}" ] && [ -f ${x_libraries}/libXbsd.a ]; then
1016 have_libxbsd=yes
1017 fi
1018
1019 case ${window_system} in
1020 x11 )
1021 if [ -d /usr/X386/include ] && [ "${have_libxbsd}" = "yes" ]; then
1022 HAVE_XFREE386=yes
1023 if [ "${C_SWITCH_X_SITE}" = "" ]; then
1024 C_SWITCH_X_SITE="-I/usr/X386/include"
1025 fi
1026 fi
1027 ;;
1028 esac
1029
1030 #### Extract some information from the operating system and machine files.
1031
1032 echo "Examining the machine- and system-dependent files to find out"
1033 echo " - which libraries the lib-src programs will want, and"
1034 echo " - whether the GNU malloc routines are usable."
1035
1036 ### It's not important that this name contain the PID; you can't run
1037 ### two configures in the same directory and have anything work
1038 ### anyway.
1039 tempcname="conftest.c"
1040
1041 echo '
1042 #include "'${srcdir}'/src/'${opsysfile}'"
1043 #include "'${srcdir}'/src/'${machfile}'"
1044 #ifndef LIBS_MACHINE
1045 #define LIBS_MACHINE
1046 #endif
1047 #ifndef LIBS_SYSTEM
1048 #define LIBS_SYSTEM
1049 #endif
1050 #ifndef C_SWITCH_SYSTEM
1051 #define C_SWITCH_SYSTEM
1052 #endif
1053 @configure@ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM
1054 @configure@ c_switch_system=C_SWITCH_SYSTEM
1055
1056 #ifdef UNEXEC
1057 @configure@ unexec=UNEXEC
1058 #else
1059 @configure@ unexec=unexec.o
1060 #endif
1061
1062 #ifdef SYSTEM_MALLOC
1063 @configure@ system_malloc=yes
1064 #else
1065 @configure@ system_malloc=no
1066 #endif
1067 ' > ${tempcname}
1068 # The value of CPP is a quoted variable reference, so we need to do this
1069 # to get its actual value...
1070 foo=`eval "echo $CPP"`
1071 eval `${foo} ${tempcname} \
1072 | grep '@configure@' \
1073 | sed -e 's/^@configure@ \([^=]*=\)\(.*\)$/\1"\2"/'`
1074 rm ${tempcname}
1075
1076 ### Compute the unexec source name from the object name.
1077 UNEXEC_SRC="`echo ${unexec} | sed 's/\.o/.c/'`"
1078
1079 # Do the opsystem or machine files prohibit the use of the GNU malloc?
1080 # Assume not, until told otherwise.
1081 GNU_MALLOC=yes
1082 if [ "${system_malloc}" = "yes" ]; then
1083 GNU_MALLOC=no
1084 GNU_MALLOC_reason="
1085 (The GNU allocators don't work with this system configuration.)"
1086 fi
1087
1088 if [ ! "${REL_ALLOC}" ]; then
1089 REL_ALLOC=${GNU_MALLOC}
1090 fi
1091
1092 LISP_FLOAT_TYPE=yes
1093
1094
1095 #### Find out which version of Emacs this is.
1096 version=`grep 'defconst[ ]*emacs-version' ${srcdir}/lisp/version.el \
1097 | sed -e 's/^.*"\([0-9][0-9]*\.[0-9][0-9]*\)\..*$/\1/'`
1098 if [ ! "${version}" ]; then
1099 echo "${progname}: can't find current emacs version in
1100 \`${srcdir}/lisp/version.el'." >&2
1101 exit 1
1102 fi
1103
1104
1105 #### Specify what sort of things we'll be editing into Makefile and config.h.
1106 ]
1107 AC_SUBST(configuration)
1108 AC_SUBST(version)
1109 AC_SUBST(srcdir)
1110 AC_SUBST(c_switch_system)
1111 AC_SUBST(libsrc_libs)
1112 AC_SUBST(rip_paths)
1113 AC_SUBST(inst_paths)
1114 AC_SUBST(LD_SWITCH_X_SITE)
1115 AC_SUBST(C_SWITCH_X_SITE)
1116 AC_SUBST(CFLAGS)
1117 AC_SUBST(prefix)
1118 AC_SUBST(exec_prefix)
1119
1120 AC_DEFINE_UNQUOTED(config_machfile, "\"${machfile}\"")
1121 AC_DEFINE_UNQUOTED(config_opsysfile, "\"${opsysfile}\"")
1122 AC_DEFINE_UNQUOTED(LD_SWITCH_X_SITE, ${LD_SWITCH_X_SITE})
1123 AC_DEFINE_UNQUOTED(C_SWITCH_X_SITE, ${C_SWITCH_X_SITE})
1124 AC_DEFINE_UNQUOTED(UNEXEC_SRC, ${UNEXEC_SRC})
1125
1126 [
1127 if [ "${HAVE_X_WINDOWS}" = "yes" ] ; then
1128 ] AC_DEFINE(HAVE_X_WINDOWS) [
1129 fi
1130 if [ "${HAVE_X11}" = "yes" ] ; then
1131 ] AC_DEFINE(HAVE_X11) [
1132 fi
1133 if [ "${HAVE_XFREE386}" = "yes" ] ; then
1134 ] AC_DEFINE(HAVE_XFREE386) [
1135 fi
1136 if [ "${HAVE_X_MENU}" = "yes" ] ; then
1137 ] AC_DEFINE(HAVE_X_MENU) [
1138 fi
1139 if [ "${GNU_MALLOC}" = "yes" ] ; then
1140 ] AC_DEFINE(GNU_MALLOC) [
1141 fi
1142 if [ "${REL_ALLOC}" = "yes" ] ; then
1143 ] AC_DEFINE(REL_ALLOC) [
1144 fi
1145 if [ "${LISP_FLOAT_TYPE}" = "yes" ] ; then
1146 ] AC_DEFINE(LISP_FLOAT_TYPE) [
1147 fi
1148
1149
1150 #### Report on what we decided to do.
1151 echo "
1152
1153 Configured for \`${configuration}'.
1154
1155 Where should the build process find the source code? ${srcdir}
1156 What operating system and machine description files should Emacs use?
1157 \`${opsysfile}' and \`${machfile}'
1158 What compiler should emacs be built with? ${CC} ${CFLAGS}
1159 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
1160 Should Emacs use the relocating allocator for buffers? ${REL_ALLOC}
1161 What window system should Emacs use? ${window_system}${x_includes+
1162 Where do we find X Windows header files? }${x_includes}${x_libraries+
1163 Where do we find X Windows libraries? }${x_libraries}
1164
1165 "
1166 ]
1167 AC_OUTPUT(Makefile)