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