(XTread_socket, case ClientMessage): Don't call
[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.8 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, 1994 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.7 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 2, 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 ### Since Emacs has configuration requirements that autoconf can't
37 ### meet, this file is an unholy marriage of custom-baked
38 ### configuration code and autoconf macros.
39 ###
40 ### We use the m4 quoting characters [ ] (as established by the
41 ### autoconf system) to include large sections of raw sewage - Oops, I
42 ### mean, shell code - in the final configuration script.
43 ###
44 ### Usage: configure config_name
45 ###
46 ### If configure succeeds, it leaves its status in config.status.
47 ### If configure fails after disturbing the status quo,
48 ### config.status is removed.
49
50 ### Remove any more than one leading "." element from the path name.
51 ### If we don't remove them, then another "./" will be prepended to
52 ### the file name each time we use config.status, and the program name
53 ### will get larger and larger. This wouldn't be a problem, except
54 ### that since progname gets recorded in all the Makefiles this script
55 ### produces, move-if-change thinks they're different when they're
56 ### not.
57 ###
58 ### It would be nice if we could put the ./ in a \( \) group and then
59 ### apply the * operator to that, so we remove as many leading ./././'s
60 ### as are present, but some seds (like Ultrix's sed) don't allow you to
61 ### apply * to a \( \) group. Bleah.
62 progname="`echo $0 | sed 's:^\./\./:\./:'`"
63
64
65 ### Establish some default values.
66 run_in_place=
67 single_tree=
68 prefix='/usr/local'
69 exec_prefix='${prefix}'
70 bindir='${exec_prefix}/bin'
71 datadir='${prefix}/lib'
72 statedir='${prefix}/lib'
73 libdir='${exec_prefix}/lib'
74 mandir='${prefix}/man/man1'
75 infodir='${prefix}/info'
76 lispdir='${datadir}/emacs/${version}/lisp'
77 locallisppath='${datadir}/emacs/site-lisp'
78 lisppath='${locallisppath}:${lispdir}'
79 etcdir='${datadir}/emacs/${version}/etc'
80 lockdir='${statedir}/emacs/lock'
81 archlibdir='${libdir}/emacs/${version}/${configuration}'
82 docdir='${datadir}/emacs/${version}/etc'
83
84 # On Sun systems, people sometimes set up the variable CPP
85 # with a value that is a directory, not an executable at all.
86 # Detect that case, and ignore that value.
87 if [ "x$CPP" != x ] && [ -d "$CPP" ];
88 then
89 CPP=
90 fi
91
92 # We cannot use this variable in the case statement below, because many
93 # /bin/sh's have broken semantics for "case". Unfortunately, you must
94 # actually edit the clause itself.
95 # path_options="prefix | exec_prefix | bindir | libdir | etcdir | datadir"
96 # path_options="$path_options | archlibdir | statedir | mandir | infodir"
97 # path_options="$path_options | lispdir | lockdir | lisppath | locallisppath"
98
99 #### Usage messages.
100
101 short_usage="Usage: ${progname} CONFIGURATION [-OPTION[=VALUE] ...]
102
103 Set compilation and installation parameters for GNU Emacs, and report.
104 CONFIGURATION specifies the machine and operating system to build for.
105 --with-x Support the X Window System.
106 --with-x=no Don't support X.
107 --with-x-toolkit Use an X toolkit.
108 --with-x-toolkit=no Don't use an X toolkit.
109 --with-gcc Use GCC to compile Emacs.
110 --with-gcc=no Don't use GCC to compile Emacs.
111 --x-includes=DIR Search for X header files in DIR.
112 --x-libraries=DIR Search for X libraries in DIR.
113 --run-in-place Use libraries and data files directly out of the
114 source tree.
115 --single-tree=DIR Has the effect of creating a directory tree at DIR
116 which looks like:
117 .../DIR/bin/CONFIGNAME (emacs, etags, etc.)
118 .../DIR/bin/CONFIGNAME/etc (movemail, etc.)
119 .../DIR/common/lisp (emacs' lisp files)
120 .../DIR/common/site-lisp (local lisp files)
121 .../DIR/common/lib (DOC, TUTORIAL, etc.)
122 .../DIR/common/lock (lockfiles)
123 --srcdir=DIR Look for the Emacs source files in DIR.
124 --prefix=DIR Install files below DIR. Defaults to \`${prefix}'.
125
126 You may also specify any of the \`path' variables found in Makefile.in,
127 including --bindir, --libdir, --etcdir, --infodir, and so on. This allows
128 you to override a single default location when configuring.
129
130 If successful, ${progname} leaves its status in config.status. If
131 unsuccessful after disturbing the status quo, it removes config.status."
132
133
134 #### Option processing.
135
136 ### Record all the arguments, so we can save them in config.status.
137 arguments="$@"
138
139 ### Shell Magic: Quote the quoted arguments in ARGUMENTS. At a later date,
140 ### in order to get the arguments back in $@, we have to do an
141 ### `eval set x "$quoted_arguments"; shift'.
142 quoted_arguments=
143 for i in "$@"; do
144 quoted_arguments="$quoted_arguments '$i'"
145 done
146
147 ### Don't use shift -- that destroys the argument list, which autoconf needs
148 ### to produce config.status. It turns out that "set - ${arguments}" doesn't
149 ### work portably.
150 ### However, it also turns out that many shells cannot expand ${10} at all.
151 ### So using an index variable doesn't work either. It is possible to use
152 ### some shell magic to make 'set x "$arguments"; shift' work portably.
153 while [ $# != 0 ]; do
154 arg="$1"; shift
155 case "${arg}" in
156
157 ## Anything starting with a hyphen we assume is an option.
158 -* )
159 ## Separate the switch name from the value it's being given.
160 case "${arg}" in
161 -*=*)
162 opt=`echo ${arg} | sed 's:^-*\([^=]*\)=.*$:\1:'`
163 val=`echo ${arg} | sed 's:^-*[^=]*=\(.*\)$:\1:'`
164 valomitted=no
165 ;;
166 -*)
167 ## If FOO is a boolean argument, --FOO is equivalent to
168 ## --FOO=yes. Otherwise, the value comes from the next
169 ## argument - see below.
170 opt=`echo ${arg} | sed 's:^-*\(.*\)$:\1:'`
171 val="yes"
172 valomitted=yes
173 ;;
174 esac
175
176 ## Change `-' in the option name to `_'.
177 optname="${opt}"
178 opt="`echo ${opt} | tr - _`"
179
180 ## Process the option.
181 case "${opt}" in
182
183 ## Has the user specified which window systems they want to support?
184 "with_x" | "with_x11" | "with_x10" )
185 ## Make sure the value given was either "yes" or "no".
186 case "${val}" in
187 y | ye | yes ) val=yes ;;
188 n | no ) val=no ;;
189 * )
190 (echo "${progname}: the \`--${optname}' option is supposed to have a boolean value.
191 Set it to either \`yes' or \`no'."
192 echo "${short_usage}") >&2
193 exit 1
194 ;;
195 esac
196 eval "${opt}=\"${val}\""
197 ;;
198
199 ## Has the user specified which toolkit they want to support?
200 "with_x_toolkit" )
201 case "${val}" in
202 y | ye | yes ) val=athena ;;
203 n | no ) val=no ;;
204 l | lu | luc | luci | lucid ) val=lucid ;;
205 a | at | ath | athe | athena ) val=athena ;;
206 # These don't currently work.
207 # m | mo | mot | moti | motif ) val=motif ;;
208 # o | op | ope | open | open- | open-l | open-lo \
209 # | open-loo | open-look ) val=open-look ;;
210 * )
211 (
212 #echo "${progname}: the \`--${optname}' option is supposed to have a value
213 #which is \`yes', \`no', \`lucid', \`athena', \`motif' or \`open-look'."
214 echo "${progname}: the \`--${optname}' option is supposed to have a value
215 which is \`yes', \`no', \`lucid', or \`athena'."
216 echo "${short_usage}") >&2
217 exit 1
218 ;;
219 esac
220 eval "${opt}=\"${val}\""
221 ;;
222
223 ## Has the user specified whether or not they want GCC?
224 "with_gcc" | "with_gnu_cc" )
225 ## Make sure the value given was either "yes" or "no".
226 case "${val}" in
227 y | ye | yes ) val=yes ;;
228 n | no ) val=no ;;
229 * )
230 (echo "${progname}: the \`--${optname}' option is supposed to have a boolean value.
231 Set it to either \`yes' or \`no'."
232 echo "${short_usage}") >&2
233 exit 1
234 ;;
235 esac
236 eval "${opt}=\"${val}\""
237 ;;
238
239 ## Has the user specified a source directory?
240 "srcdir" )
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 [ $# = 0 ]; 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 val="$1"; shift
251 fi
252 srcdir="${val}"
253 ;;
254
255 ## Has the user tried to tell us where the X files are?
256 ## I think these are dopey, but no less than three alpha
257 ## testers, at large sites, have said they have their X files
258 ## installed in odd places.
259 "x_includes" )
260 ## If the value was omitted, get it from the next argument.
261 if [ "${valomitted}" = "yes" ]; then
262 ## Get the next argument from the argument list, if there is one.
263 if [ $# = 0 ]; then
264 (echo "${progname}: You must give a value for the \`--${optname}' option, as in
265 \`--${optname}=/usr/local/X11/include'."
266 echo "${short_usage}") >&2
267 exit 1
268 fi
269 val="$1"; shift
270 fi
271 x_includes="${val}"
272 ;;
273 "x_libraries" )
274 ## If the value was omitted, get it from the next argument.
275 if [ "${valomitted}" = "yes" ]; then
276 ## Get the next argument from the argument list, if there is one.
277 if [ $# = 0 ]; then
278 (echo "${progname}: You must give a value for the \`--${optname}' option, as in
279 \`--${optname}=/usr/local/X11/lib'."
280 echo "${short_usage}") >&2
281 exit 1
282 fi
283 val="$1"; shift
284 fi
285 x_libraries="${val}"
286 ;;
287
288 ## Should this use the "development configuration"?
289 "run_in_place" )
290 single_tree=
291 run_in_place=1
292 ;;
293
294 ## Should this use the "single tree" configuration?
295 "single_tree" )
296 run_in_place=
297 single_tree=1
298 ;;
299
300 ## Has the user specified one of the path options?
301 prefix | exec_prefix | bindir | libdir | etcdir | datadir | \
302 archlibdir | statedir | mandir | infodir | lispdir | lockdir | \
303 lisppath | locallisppath | docdir )
304 ## If the value was omitted, get it from the next argument.
305 if [ "${valomitted}" = "yes" ]; then
306 if [ $# = 0 ]; then
307 (echo \
308 "$progname: You must give a value for the \`--${optname}' option,";
309 echo \
310 "as in \`--${optname}=`eval echo '$'$optname`.'"
311 echo "$short_usage") >&2
312 exit 1
313 fi
314 val="$1"; shift
315 fi
316 eval "${opt}=\"${val}\""
317 eval "${opt}_specified=1"
318 ;;
319
320 ## Verbose flag, tested by autoconf macros.
321 "verbose" )
322 verbose=yes
323 ;;
324
325 ## Has the user asked for some help?
326 "usage" | "help" )
327 if [ "x$PAGER" = x ]
328 then
329 echo "${short_usage}" | more
330 else
331 echo "${short_usage}" | $PAGER
332 fi
333 exit
334 ;;
335
336 ## We ignore all other options silently.
337 esac
338 ;;
339
340 ## Anything not starting with a hyphen we assume is a
341 ## configuration name.
342 *)
343 configuration=${arg}
344 ;;
345
346 esac
347 done
348
349 ### Get the arguments back. See the diatribe on Shell Magic above.
350 eval set x "$quoted_arguments"; shift
351
352 if [ "${configuration}" = "" ]; then
353 echo '- You did not tell me what kind of host system you want to configure.
354 - I will attempt to guess the kind of system this is.' 1>&2
355 guesssys=`echo ${progname} | sed 's/configure$/config.guess/'`
356 if configuration=`${guesssys}` ; then
357 echo "- Looks like this is a ${configuration}" 1>&2
358 else
359 echo '- Failed to guess the system type. You need to tell me.' 1>&2
360 echo "${short_usage}" >&2
361 exit 1
362 fi
363 fi
364
365 #### Decide where the source is.
366 case "${srcdir}" in
367
368 ## If it's not specified, see if `.' or `..' might work.
369 "" )
370 confdir=`echo $0 | sed 's|//|/|' | sed 's|/[^/]*$||'`
371 if [ -f $confdir/src/lisp.h -a -f $confdir/lisp/version.el ]; then
372 srcdir="${confdir}"
373 else
374 if [ -f "./src/lisp.h" -a -f "./lisp/version.el" ]; then
375 srcdir='.'
376 else
377 if [ -f "../src/lisp.h" -a -f "../lisp/version.el" ]; then
378 srcdir='..'
379 else
380 (echo "\
381 ${progname}: Neither the current directory nor its parent seem to
382 contain the Emacs sources. If you do not want to build Emacs in its
383 source tree, you should run \`${progname}' in the directory in which
384 you wish to build Emacs, using its \`--srcdir' option to say where the
385 sources may be found."
386 echo "${short_usage}") >&2
387 exit 1
388 fi
389 fi
390 fi
391 ;;
392
393 ## Otherwise, check if the directory they specified is okay.
394 * )
395 if [ ! -d "${srcdir}" -o ! -f "${srcdir}/src/lisp.h" -o ! -f "${srcdir}/lisp/version.el" ]; then
396 (echo "\
397 ${progname}: The directory specified with the \`--srcdir' option,
398 \`${srcdir}', doesn't seem to contain the Emacs sources. You should
399 either run the \`${progname}' script at the top of the Emacs source
400 tree, or use the \`--srcdir' option to specify where the Emacs sources
401 are."
402 echo "${short_usage}") >&2
403 exit 1
404 fi
405 ;;
406 esac
407
408 #### Make srcdir absolute, if it isn't already. It's important to
409 #### avoid running the path through pwd unnecessary, since pwd can
410 #### give you automounter prefixes, which can go away.
411 case "${srcdir}" in
412 /* ) ;;
413 . )
414 ## We may be able to use the $PWD environment variable to make this
415 ## absolute. But sometimes PWD is inaccurate.
416 if [ "${PWD}" != "" ] && [ "`(cd ${PWD} ; sh -c pwd)`" = "`pwd`" ] ; then
417 srcdir="$PWD"
418 else
419 srcdir="`(cd ${srcdir}; pwd)`"
420 fi
421 ;;
422 * ) srcdir="`(cd ${srcdir}; pwd)`" ;;
423 esac
424
425 #### Check if the source directory already has a configured system in it.
426 if [ `pwd` != `(cd ${srcdir} && pwd)` ] \
427 && [ -f "${srcdir}/src/config.h" ] ; then
428 (echo "${progname}: WARNING: The directory tree \`${srcdir}' is being used"
429 echo " as a build directory right now; it has been configured in its own"
430 echo " right. To configure in another directory as well, you MUST"
431 echo " use GNU make. If you do not have GNU make, then you must"
432 echo " now do \`make distclean' in ${srcdir},"
433 echo " and then run ${progname} again.") >&2
434 extrasub='/^VPATH[ ]*=/c\
435 vpath %.c $(srcdir)\
436 vpath %.h $(srcdir)\
437 vpath %.y $(srcdir)\
438 vpath %.l $(srcdir)\
439 vpath %.s $(srcdir)\
440 vpath %.in $(srcdir)'
441 fi
442
443 ### Make the necessary directories, if they don't exist.
444 for dir in ./src ./lib-src ./cpp ./oldXMenu ./lwlib ./etc ; do
445 if [ ! -d ${dir} ]; then
446 mkdir ${dir}
447 fi
448 done
449
450 #### Given the configuration name, set machfile and opsysfile to the
451 #### names of the m/*.h and s/*.h files we should use.
452
453 ### Canonicalize the configuration name.
454 echo "Checking the configuration name."
455 if canonical=`${srcdir}/config.sub "${configuration}"` ; then : ; else
456 exit $?
457 fi
458
459 ### If you add support for a new configuration, add code to this
460 ### switch statement to recognize your configuration name and select
461 ### the appropriate operating system and machine description files.
462
463 ### You would hope that you could choose an m/*.h file pretty much
464 ### based on the machine portion of the configuration name, and an s-
465 ### file based on the operating system portion. However, it turns out
466 ### that each m/*.h file is pretty manufacturer-specific - for
467 ### example, apollo.h, hp9000s300.h, mega68k, news.h, and tad68k are
468 ### all 68000 machines; mips.h, pmax.h, and news-risc are all MIPS
469 ### machines. So we basically have to have a special case for each
470 ### configuration name.
471 ###
472 ### As far as handling version numbers on operating systems is
473 ### concerned, make sure things will fail in a fixable way. If
474 ### /etc/MACHINES doesn't say anything about version numbers, be
475 ### prepared to handle anything reasonably. If version numbers
476 ### matter, be sure /etc/MACHINES says something about it.
477 ###
478 ### Eric Raymond says we should accept strings like "sysvr4" to mean
479 ### "System V Release 4"; he writes, "The old convention encouraged
480 ### confusion between `system' and `release' levels'."
481
482 machine='' opsys='' unported='false'
483 case "${canonical}" in
484
485 ## Alliant machines
486 ## Strictly speaking, we need the version of the alliant operating
487 ## system to choose the right machine file, but currently the
488 ## configuration name doesn't tell us enough to choose the right
489 ## one; we need to give alliants their own operating system name to
490 ## do this right. When someone cares, they can help us.
491 fx80-alliant-* )
492 machine=alliant4 opsys=bsd4-2
493 ;;
494 i860-alliant-* )
495 machine=alliant-2800 opsys=bsd4-3
496 ;;
497
498 ## Altos 3068
499 m68*-altos-sysv* )
500 machine=altos opsys=usg5-2
501 ;;
502
503 ## Amdahl UTS
504 580-amdahl-sysv* )
505 machine=amdahl opsys=usg5-2-2
506 ;;
507
508 ## Appallings - I mean, Apollos - running Domain
509 m68*-apollo* )
510 machine=apollo opsys=bsd4-2
511 ;;
512
513 ## AT&T 3b2, 3b5, 3b15, 3b20
514 we32k-att-sysv* )
515 machine=att3b opsys=usg5-2-2
516 ;;
517
518 ## AT&T 3b1 - The Mighty Unix PC!
519 m68*-att-sysv* )
520 machine=7300 opsys=usg5-2-2
521 ;;
522
523 ## Bull dpx20
524 rs6000-bull-bosx* )
525 machine=ibmrs6000 opsys=aix3-2
526 ;;
527
528 ## Bull dpx2
529 m68*-bull-sysv3* )
530 machine=dpx2 opsys=usg5-3
531 ;;
532
533 ## Bull sps7
534 m68*-bull-sysv2* )
535 machine=sps7 opsys=usg5-2
536 ;;
537
538 ## CCI 5/32, 6/32 -- see "Tahoe".
539
540 ## Celerity
541 ## I don't know what configuration name to use for this; config.sub
542 ## doesn't seem to know anything about it. Hey, Celerity users, get
543 ## in touch with us!
544 celerity-celerity-bsd* )
545 machine=celerity opsys=bsd4-2
546 ;;
547
548 ## Clipper
549 ## What operating systems does this chip run that Emacs has been
550 ## tested on?
551 clipper-* )
552 machine=clipper
553 ## We'll use the catch-all code at the bottom to guess the
554 ## operating system.
555 ;;
556
557 ## Convex
558 *-convex-bsd* )
559 machine=convex opsys=bsd4-3
560 ;;
561
562 ## Cubix QBx/386
563 i386-cubix-sysv* )
564 machine=intel386 opsys=usg5-3
565 ;;
566
567 ## Cydra 5
568 cydra*-cydrome-sysv* )
569 machine=cydra5 opsys=usg5-3
570 ;;
571
572 ## Data General AViiON Machines
573 m88k-dg-dgux* )
574 machine=aviion opsys=dgux
575 ;;
576
577 ## DECstations
578 mips-dec-ultrix[0-3].* | mips-dec-ultrix4.0* | mips-dec-bsd4.2* )
579 machine=pmax opsys=bsd4-2
580 ;;
581 mips-dec-ultrix* | mips-dec-bsd* )
582 machine=pmax opsys=bsd4-3
583 ;;
584 mips-dec-osf* )
585 machine=pmax opsys=osf1
586 ;;
587
588 ## Motorola Delta machines
589 m68k-motorola-sysv* | m68000-motorola-sysv* )
590 machine=delta opsys=usg5-3
591 if [ -z "`type gnucc | grep 'not found'`" ]
592 then CC=gnucc
593 else
594 if [ -z "`type gcc | grep 'not found'`" ]
595 then CC=gcc
596 else CC=cc
597 fi
598 fi
599 ;;
600 m88k-motorola-sysv4* )
601 machine=delta88k opsys=usg5-4
602 ;;
603 m88k-motorola-sysv* | m88k-motorola-m88kbcs* )
604 machine=delta88k opsys=usg5-3
605 ;;
606
607 ## Dual machines
608 m68*-dual-sysv* )
609 machine=dual opsys=usg5-2
610 ;;
611 m68*-dual-uniplus* )
612 machine=dual opsys=unipl5-2
613 ;;
614
615 ## Elxsi 6400
616 elxsi-elxsi-sysv* )
617 machine=elxsi opsys=usg5-2
618 ;;
619
620 ## Encore machines
621 ns16k-encore-bsd* )
622 machine=ns16000 opsys=umax
623 ;;
624
625 ## The GEC 93 - apparently, this port isn't really finished yet.
626
627 ## Gould Power Node and NP1
628 pn-gould-bsd4.2* )
629 machine=gould opsys=bsd4-2
630 ;;
631 pn-gould-bsd4.3* )
632 machine=gould opsys=bsd4-3
633 ;;
634 np1-gould-bsd* )
635 machine=gould-np1 opsys=bsd4-3
636 ;;
637
638 ## Harris Night Hawk machines running CX/UX (a 5000 looks just like a 4000
639 ## as far as Emacs is concerned).
640 m88k-harris-cxux* )
641 # Build needs to be different on 7.0 and later releases
642 case "`uname -r`" in
643 [56].[0-9] ) machine=nh4000 opsys=cxux ;;
644 [7].[0-9] ) machine=nh4000 opsys=cxux7 ;;
645 esac
646 ;;
647 ## Harris ecx or gcx running CX/UX (Series 1200, Series 3000)
648 m68k-harris-cxux* )
649 machine=nh3000 opsys=cxux
650 ;;
651
652 ## Honeywell XPS100
653 xps*-honeywell-sysv* )
654 machine=xps100 opsys=usg5-2
655 ;;
656
657 ## HP 9000 series 200 or 300
658 m68*-hp-bsd* )
659 machine=hp9000s300 opsys=bsd4-3
660 ;;
661 m68*-hp-netbsd* )
662 machine=hp9000s300 opsys=netbsd
663 ;;
664 ## HP/UX 7, 8 and 9 are supported on these machines.
665 m68*-hp-hpux* )
666 case "`uname -r`" in
667 ## Someone's system reports A.B8.05 for this.
668 ## I wonder what other possibilities there are.
669 *.B8.* ) machine=hp9000s300 opsys=hpux8 ;;
670 *.08.* ) machine=hp9000s300 opsys=hpux8 ;;
671 *.09.* ) machine=hp9000s300 opsys=hpux9 ;;
672 *) machine=hp9000s300 opsys=hpux ;;
673 esac
674 ;;
675
676 ## HP 9000 series 700 and 800, running HP/UX
677 hppa*-hp-hpux7* )
678 machine=hp9000s800 opsys=hpux
679 ;;
680 hppa*-hp-hpux8* )
681 machine=hp9000s800 opsys=hpux8
682 ;;
683 hppa*-hp-hpux9* )
684 machine=hp9000s800 opsys=hpux9
685 ;;
686
687 ## HP 9000 series 700 and 800, running HP/UX
688 hppa*-hp-hpux* )
689 ## Cross-compilation? Nah!
690 case "`uname -r`" in
691 ## Someone's system reports A.B8.05 for this.
692 ## I wonder what other possibilities there are.
693 *.B8.* ) machine=hp9000s800 opsys=hpux8 ;;
694 *.08.* ) machine=hp9000s800 opsys=hpux8 ;;
695 *.09.* ) machine=hp9000s800 opsys=hpux9 ;;
696 *) machine=hp9000s800 opsys=hpux ;;
697 esac
698 ;;
699
700 ## Orion machines
701 orion-orion-bsd* )
702 machine=orion opsys=bsd4-2
703 ;;
704 clipper-orion-bsd* )
705 machine=orion105 opsys=bsd4-2
706 ;;
707
708 ## IBM machines
709 i386-ibm-aix1.1* )
710 machine=ibmps2-aix opsys=usg5-2-2
711 ;;
712 i386-ibm-aix1.[23]* | i386-ibm-aix* )
713 machine=ibmps2-aix opsys=usg5-3
714 ;;
715 i370-ibm-aix*)
716 machine=ibm370aix opsys=usg5-3
717 ;;
718 rs6000-ibm-aix3.1* )
719 machine=ibmrs6000 opsys=aix3-1
720 ;;
721 rs6000-ibm-aix3.2.5)
722 machine=ibmrs6000 opsys=aix3-2-5
723 ;;
724 rs6000-ibm-aix3.2* | rs6000-ibm-aix* )
725 machine=ibmrs6000 opsys=aix3-2
726 ;;
727 romp-ibm-bsd4.3* )
728 machine=ibmrt opsys=bsd4-3
729 ;;
730 romp-ibm-bsd4.2* )
731 machine=ibmrt opsys=bsd4-2
732 ;;
733 romp-ibm-aos4.3* )
734 machine=ibmrt opsys=bsd4-3
735 ;;
736 romp-ibm-aos4.2* )
737 machine=ibmrt opsys=bsd4-2
738 ;;
739 romp-ibm-aos* )
740 machine=ibmrt opsys=bsd4-3
741 ;;
742 romp-ibm-bsd* )
743 machine=ibmrt opsys=bsd4-3
744 ;;
745 romp-ibm-aix* )
746 machine=ibmrt-aix opsys=usg5-2-2
747 ;;
748
749 ## Integrated Solutions `Optimum V'
750 m68*-isi-bsd4.2* )
751 machine=isi-ov opsys=bsd4-2
752 ;;
753 m68*-isi-bsd4.3* )
754 machine=isi-ov opsys=bsd4-3
755 ;;
756
757 ## Intel 386 machines where we do care about the manufacturer
758 i[34]86-intsys-sysv* )
759 machine=is386 opsys=usg5-2-2
760 ;;
761
762 ## Prime EXL
763 i386-prime-sysv* )
764 machine=i386 opsys=usg5-3
765 ;;
766
767 ## Sequent Symmetry
768 i386-sequent-bsd* )
769 machine=symmetry opsys=bsd4-3
770 ;;
771
772 ## Unspecified sysv on an ncr machine defaults to svr4.2.
773 ## (Plain usg5-4 doesn't turn on POSIX signals, which we need.)
774 i[34]86-ncr-sysv* )
775 machine=intel386 opsys=usg5-4-2
776 ;;
777
778 ## Intel 860
779 i860-*-sysv4* )
780 machine=i860 opsys=usg5-4
781 ;;
782
783 ## Masscomp machines
784 m68*-masscomp-rtu* )
785 machine=masscomp opsys=rtu
786 ;;
787
788 ## Megatest machines
789 m68*-megatest-bsd* )
790 machine=mega68 opsys=bsd4-2
791 ;;
792
793 ## Workstations sold by MIPS
794 ## This is not necessarily all workstations using the MIPS processor -
795 ## Irises are produced by SGI, and DECstations by DEC.
796
797 ## etc/MACHINES lists mips.h and mips4.h as possible machine files,
798 ## and usg5-2-2 and bsd4-3 as possible OS files. The only guidance
799 ## it gives for choosing between the alternatives seems to be "Use
800 ## -machine=mips4 for RISCOS version 4; use -opsystem=bsd4-3 with
801 ## the BSD world." I'll assume that these are instructions for
802 ## handling two odd situations, and that every other situation
803 ## should use mips.h and usg5-2-2, they being listed first.
804 mips-mips-usg* )
805 machine=mips4
806 ## Fall through to the general code at the bottom to decide on the OS.
807 ;;
808 mips-mips-riscos4* )
809 machine=mips4 opsys=bsd4-3
810 NON_GNU_CC="cc -systype bsd43"
811 NON_GNU_CPP="cc -systype bsd43 -E"
812 ;;
813 mips-mips-bsd* )
814 machine=mips opsys=bsd4-3
815 ;;
816 mips-mips-* )
817 machine=mips opsys=usg5-2-2
818 ;;
819
820 ## NeXT
821 m68*-next-* )
822 machine=next opsys=mach2
823 ;;
824
825 ## The complete machine from National Semiconductor
826 ns32k-ns-genix* )
827 machine=ns32000 opsys=usg5-2
828 ;;
829
830 ## NCR machines
831 m68*-ncr-sysv2* | m68*-ncr-sysvr2* )
832 machine=tower32 opsys=usg5-2-2
833 ;;
834 m68*-ncr-sysv3* | m68*-ncr-sysvr3* )
835 machine=tower32v3 opsys=usg5-3
836 ;;
837
838 ## Nixdorf Targon 31
839 m68*-nixdorf-sysv* )
840 machine=targon31 opsys=usg5-2-2
841 ;;
842
843 ## Nu (TI or LMI)
844 m68*-nu-sysv* )
845 machine=nu opsys=usg5-2
846 ;;
847
848 ## Plexus
849 m68*-plexus-sysv* )
850 machine=plexus opsys=usg5-2
851 ;;
852
853 ## Pyramid machines
854 ## I don't really have any idea what sort of processor the Pyramid has,
855 ## so I'm assuming it is its own architecture.
856 pyramid-pyramid-bsd* )
857 machine=pyramid opsys=bsd4-2
858 ;;
859
860 ## Sequent Balance
861 ns32k-sequent-bsd4.2* )
862 machine=sequent opsys=bsd4-2
863 ;;
864 ns32k-sequent-bsd4.3* )
865 machine=sequent opsys=bsd4-3
866 ;;
867
868 ## Siemens Nixdorf
869 mips-siemens-sysv* )
870 machine=mips-siemens opsys=usg5-4
871 NON_GNU_CC=/usr/ccs/bin/cc
872 NON_GNU_CPP=/usr/ccs/bin/cc -E
873 ;;
874
875 ## Silicon Graphics machines
876 ## Iris 2500 and Iris 2500 Turbo (aka the Iris 3030)
877 m68*-sgi-iris3.5* )
878 machine=irist opsys=iris3-5
879 ;;
880 m68*-sgi-iris3.6* | m68*-sgi-iris*)
881 machine=irist opsys=iris3-6
882 ;;
883 ## Iris 4D
884 mips-sgi-irix3.* )
885 machine=iris4d opsys=irix3-3
886 ;;
887 mips-sgi-irix5.* )
888 machine=iris4d opsys=irix5-0
889 ;;
890 mips-sgi-irix4.* | mips-sgi-irix* )
891 machine=iris4d opsys=irix4-0
892 ;;
893
894 ## SONY machines
895 m68*-sony-bsd4.2* )
896 machine=news opsys=bsd4-2
897 ;;
898 m68*-sony-bsd4.3* )
899 machine=news opsys=bsd4-3
900 ;;
901 m68*-sony-newsos3*)
902 machine=news opsys=bsd4-3
903 ;;
904 mips-sony-bsd* )
905 machine=news-risc opsys=bsd4-3
906 ;;
907 mips-sony-newsos* )
908 machine=mips opsys=newsos5
909 ;;
910
911 ## Stride
912 m68*-stride-sysv* )
913 machine=stride opsys=usg5-2
914 ;;
915
916 ## Suns
917 *-sun-sunos* | *-sun-bsd* | *-sun-solaris* )
918 case "${canonical}" in
919 m68*-sunos1* ) machine=sun1 ;;
920 m68*-sunos2* ) machine=sun2 ;;
921 m68* ) machine=sun3 ;;
922 i[34]86* ) machine=sun386 ;;
923 sparc* ) machine=sparc ;;
924 * ) unported=true ;;
925 esac
926 case "${canonical}" in
927 ## The Sun386 didn't get past 4.0.
928 i386-*-sunos4 ) opsys=sunos4-0 ;;
929 *-sunos4.0* ) opsys=sunos4-0 ;;
930 *-sunos4.1.3* ) opsys=sunos4-1-3 ;;
931 *-sunos4shr* ) opsys=sunos4shr ;;
932 *-sunos4* | *-sunos ) opsys=sunos4-1 ;;
933 *-sunos5.3* | *-solaris2.3* )
934 opsys=sol2-3
935 NON_GNU_CPP=/usr/ccs/lib/cpp
936 ;;
937 *-sunos5* | *-solaris* )
938 opsys=sol2
939 NON_GNU_CPP=/usr/ccs/lib/cpp
940 ;;
941 * ) opsys=bsd4-2 ;;
942 esac
943 ;;
944
945 ## Tadpole 68k
946 m68*-tadpole-sysv* )
947 machine=tad68k opsys=usg5-3
948 ;;
949
950 ## Tahoe machines
951 tahoe-tahoe-bsd4.2* )
952 machine=tahoe opsys=bsd4-2
953 ;;
954 tahoe-tahoe-bsd4.3* )
955 machine=tahoe opsys=bsd4-3
956 ;;
957
958 ## Tandem Integrity S2
959 mips-tandem-sysv* )
960 machine=tandem-s2 opsys=usg5-3
961 ;;
962
963 ## Tektronix XD88
964 m88k-tektronix-sysv3* )
965 machine=tekxd88 opsys=usg5-3
966 ;;
967
968 ## Tektronix 16000 box (6130?)
969 ns16k-tektronix-bsd* )
970 machine=ns16000 opsys=bsd4-2
971 ;;
972 ## Tektronix 4300
973 ## src/m/tek4300.h hints that this is a m68k machine.
974 m68*-tektronix-bsd* )
975 machine=tek4300 opsys=bsd4-3
976 ;;
977
978 ## Titan P2 or P3
979 ## We seem to have lost the machine-description file titan.h!
980 titan-titan-sysv* )
981 machine=titan opsys=usg5-3
982 ;;
983
984 ## Ustation E30 (SS5E)
985 m68*-unisys-uniplus* )
986 machine=ustation opsystem=unipl5-2
987 ;;
988
989 ## Vaxen.
990 vax-dec-* )
991 machine=vax
992 case "${canonical}" in
993 *-bsd4.1* ) opsys=bsd4-1 ;;
994 *-bsd4.2* | *-ultrix[0-3].* | *-ultrix4.0* ) opsys=bsd4-2 ;;
995 *-bsd4.3* | *-ultrix* ) opsys=bsd4-3 ;;
996 *-bsd386* ) opsys=bsd386 ;;
997 *-sysv[01]* | *-sysvr[01]* ) opsys=usg5-0 ;;
998 *-sysv2* | *-sysvr2* ) opsys=usg5-2 ;;
999 *-vms* ) opsys=vms ;;
1000 * ) unported=true
1001 esac
1002 ;;
1003
1004 ## Whitechapel MG1
1005 ns16k-whitechapel-* )
1006 machine=mg1
1007 ## We don't know what sort of OS runs on these; we'll let the
1008 ## operating system guessing code below try.
1009 ;;
1010
1011 ## Wicat
1012 m68*-wicat-sysv* )
1013 machine=wicat opsys=usg5-2
1014 ;;
1015
1016 ## Intel 386 machines where we don't care about the manufacturer
1017 i[34]86-*-* )
1018 machine=intel386
1019 case "${canonical}" in
1020 *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
1021 *-isc2.2* ) opsys=isc2-2 ;;
1022 *-isc4.0* ) opsys=isc4-0 ;;
1023 *-isc* ) opsys=isc3-0 ;;
1024 *-esix5* ) opsys=esix5r4; NON_GNU_CPP=/usr/lib/cpp ;;
1025 *-esix* ) opsys=esix ;;
1026 *-xenix* ) opsys=xenix ;;
1027 *-linux* ) opsys=linux ;;
1028 *-sco3.2v4* ) opsys=sco4 ;;
1029 *-bsd386* ) opsys=bsd386 ;;
1030 *-386bsd* ) opsys=386bsd ;;
1031 *-freebsd* ) opsys=freebsd ;;
1032 *-netbsd* ) opsys=netbsd ;;
1033 *-nextstep* ) opsys=mach2 ;;
1034 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
1035 esac
1036 ;;
1037
1038 * )
1039 unported=true
1040 ;;
1041 esac
1042
1043 ### If the code above didn't choose an operating system, just choose
1044 ### an operating system based on the configuration name. You really
1045 ### only want to use this when you have no idea what the right
1046 ### operating system is; if you know what operating systems a machine
1047 ### runs, it's cleaner to make it explicit in the case statement
1048 ### above.
1049 if [ x"${opsys}" = x ]; then
1050 case "${canonical}" in
1051 *-bsd4.[01] ) opsys=bsd4-1 ;;
1052 *-bsd4.2 ) opsys=bsd4-2 ;;
1053 *-bsd4.3 ) opsys=bsd4-3 ;;
1054 *-sysv0 | *-sysvr0 ) opsys=usg5-0 ;;
1055 *-sysv2 | *-sysvr2 ) opsys=usg5-2 ;;
1056 *-sysv2.2 | *-sysvr2.2 ) opsys=usg5-2-2 ;;
1057 *-sysv3 | *-sysvr3 ) opsys=usg5-3 ;;
1058 *-sysv4 | *-sysvr4 ) opsys=usg5-4 ;;
1059 *-sysv4.1 | *-sysvr4.1 )
1060 NON_GNU_CPP=/usr/lib/cpp
1061 opsys=usg5-4 ;;
1062 *-sysv4.2 | *-sysvr4.2 ) opsys=usg5-4-2 ;;
1063 * )
1064 unported=true
1065 ;;
1066 esac
1067 fi
1068
1069 if $unported ; then
1070 (echo "${progname}: Emacs hasn't been ported to \`${canonical}' systems."
1071 echo "${progname}: Check \`etc/MACHINES' for recognized configuration names."
1072 ) >&2
1073 exit 1
1074 fi
1075
1076 machfile="m/${machine}.h"
1077 opsysfile="s/${opsys}.h"
1078
1079 ]
1080 AC_PREPARE(lisp)
1081 ifdef([AC_LANG_C], AC_LANG_C)dnl
1082 AC_CONFIG_HEADER(src/config.h)
1083 [
1084
1085 #### Choose a compiler.
1086 if [ "x$CC" = x ]
1087 then true
1088 else cc_specified=1
1089 fi
1090
1091 case ${with_gcc} in
1092 "yes" ) CC="gcc" GCC=1 ;;
1093 "no" )
1094 if [ "x$CC" = x ]
1095 then CC=cc;
1096 else true;
1097 fi
1098 ;;
1099 * )
1100 ] AC_PROG_CC [
1101 esac
1102
1103 #### Some systems specify a CPP to use unless we are using GCC.
1104 #### Now that we know whether we are using GCC, we can decide whether
1105 #### to use that one.
1106 if [ "x$NON_GNU_CPP" = x ] || [ x$GCC = x1 ] || [ "x$CPP" = x ]
1107 then true
1108 else
1109 CPP="$NON_GNU_CPP"
1110 fi
1111
1112 #### Some systems specify a CC to use unless we are using GCC.
1113 #### Now that we know whether we are using GCC, we can decide whether
1114 #### to use that one.
1115 if [ "x$NON_GNU_CC" = x ] || [ x$GCC = x1 ] || [ x$cc_specified = x1 ]
1116 then true
1117 else
1118 CC="$NON_GNU_CC"
1119 fi
1120
1121 #### Some other nice autoconf tests. If you add a test here which
1122 #### should make an entry in src/config.h, don't forget to add an
1123 #### #undef clause to src/config.h.in for autoconf to modify.
1124 ]
1125 dnl checks for programs
1126 AC_LN_S
1127 AC_PROG_CPP
1128 AC_PROG_INSTALL
1129 AC_PROG_YACC
1130
1131 dnl checks for UNIX variants that set `DEFS'
1132
1133 dnl checks for header files
1134 AC_HAVE_HEADERS(sys/timeb.h sys/time.h unistd.h)
1135 AC_STDC_HEADERS
1136 AC_TIME_WITH_SYS_TIME
1137 dnl In Autoconf 1.8 use AC_SYS_SIGLIST_DECLARED instead of this.
1138 AC_COMPILE_CHECK(sys_siglist declaration in signal.h or unistd.h,
1139 [#include <signal.h>
1140 /* NetBSD declares sys_siglist in <unistd.h>. */
1141 #ifdef HAVE_UNISTD_H
1142 #include <unistd.h>
1143 #endif], [char *msg = *(sys_siglist + 1);],
1144 AC_DEFINE(SYS_SIGLIST_DECLARED))
1145
1146 dnl checks for typedefs
1147 AC_RETSIGTYPE
1148
1149 dnl checks for structure members
1150 AC_STRUCT_TM
1151 AC_TIMEZONE
1152
1153 dnl checks for compiler characteristics
1154 AC_CONST
1155
1156 dnl check for Make feature
1157 AC_SET_MAKE
1158
1159 dnl checks for operating system services
1160 AC_LONG_FILE_NAMES
1161
1162 dnl other checks for UNIX variants
1163 [
1164
1165 #### Choose a window system.
1166 echo "Checking window system."
1167
1168 window_system=''
1169 case "${with_x}" in
1170 yes )
1171 window_system=${window_system}x11
1172 ;;
1173 no )
1174 window_system=${window_system}none
1175 ;;
1176 esac
1177 case "${window_system}" in
1178 .* )
1179 ;;
1180 * )
1181 case "${with_x11}" in
1182 yes )
1183 window_system=x11
1184 ;;
1185 no )
1186 window_system=none
1187 ;;
1188 esac
1189 case "${with_x10}" in
1190 yes )
1191 window_system=x10
1192 ;;
1193 no )
1194 window_system=none
1195 ;;
1196 esac
1197 ;;
1198 esac
1199
1200 case "${window_system}" in
1201 "none" | "x11" | "x10" ) ;;
1202 "" )
1203 # --x-includes or --x-libraries implies --with-x11.
1204 if [ -n "${x_includes}" ] || [ -n "${x_libraries}" ]; then
1205 window_system=x11
1206 else
1207 echo " No window system specified. Looking for X11."
1208 # If the user didn't specify a window system and we found X11, use it.
1209 if [ -r /usr/lib/libX11.a \
1210 -o -d /usr/include/X11 \
1211 -o -d /usr/X386/include \
1212 -o -d ${x_includes}/X11 ]; then
1213 window_system=x11
1214 fi
1215 fi
1216 ;;
1217 * )
1218 echo "Don't specify a window system more than once." >&2
1219 exit 1
1220 ;;
1221 esac
1222
1223 [ -z "${window_system}" ] && window_system=none
1224
1225 [ -n "${x_libraries}" ] && LD_SWITCH_X_SITE="-L${x_libraries}"
1226 [ -n "${x_libraries}" ] && LD_SWITCH_X_SITE_AUX="-R${x_libraries}"
1227 [ -n "${x_includes}" ] && C_SWITCH_X_SITE="-I${x_includes}"
1228
1229 # Avoid forcing the search of /usr/include before fixed include files.
1230 if [ "$C_SWITCH_X_SITE" = "-I/usr/include" ]; then
1231 C_SWITCH_X_SITE=" "
1232 fi
1233
1234 case "${window_system}" in
1235 x11 )
1236 HAVE_X_WINDOWS=yes
1237 HAVE_X11=yes
1238 echo " Using X11."
1239 case "${with_x_toolkit}" in
1240 athena | lucid )
1241 USE_X_TOOLKIT=LUCID
1242 echo " Using Xt toolkit."
1243 ;;
1244 motif )
1245 USE_X_TOOLKIT=MOTIF
1246 echo " Using Motif toolkit."
1247 ;;
1248 open-look )
1249 USE_X_TOOLKIT=OPEN_LOOK
1250 echo " Using Open-Look toolkit."
1251 ;;
1252 * )
1253 USE_X_TOOLKIT=none
1254 echo " Using Xlib directly."
1255 ;;
1256 esac
1257 ;;
1258 x10 )
1259 HAVE_X_WINDOWS=yes
1260 HAVE_X11=no
1261 USE_X_TOOLKIT=none
1262 echo " Using X10."
1263 ;;
1264 none )
1265 HAVE_X_WINDOWS=no
1266 HAVE_X11=no
1267 USE_X_TOOLKIT=none
1268 echo " Using no window system."
1269 ;;
1270 esac
1271 X_TOOLKIT_TYPE=$USE_X_TOOLKIT
1272
1273 ### If we're using X11, we should use the X menu package.
1274 HAVE_X_MENU=no
1275 case ${HAVE_X11} in
1276 yes )
1277 HAVE_X_MENU=yes
1278 ;;
1279 esac
1280
1281 #### Extract some information from the operating system and machine files.
1282
1283 echo "Examining the machine- and system-dependent files to find out"
1284 echo " - which libraries the lib-src programs will want, and"
1285 echo " - whether the GNU malloc routines are usable."
1286
1287 ### It's not important that this name contain the PID; you can't run
1288 ### two configures in the same directory and have anything work
1289 ### anyway.
1290 tempcname="conftest.c"
1291
1292 echo '
1293 #include "'${srcdir}'/src/'${opsysfile}'"
1294 #include "'${srcdir}'/src/'${machfile}'"
1295 #ifndef LIBS_MACHINE
1296 #define LIBS_MACHINE
1297 #endif
1298 #ifndef LIBS_SYSTEM
1299 #define LIBS_SYSTEM
1300 #endif
1301 #ifndef C_SWITCH_SYSTEM
1302 #define C_SWITCH_SYSTEM
1303 #endif
1304 #ifndef C_SWITCH_MACHINE
1305 #define C_SWITCH_MACHINE
1306 #endif
1307 configure___ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM
1308 configure___ c_switch_system=C_SWITCH_SYSTEM
1309 configure___ c_switch_machine=C_SWITCH_MACHINE
1310
1311 #ifndef LIB_X11_LIB
1312 #define LIB_X11_LIB -lX11
1313 #endif
1314
1315 #ifndef LIBX11_MACHINE
1316 #define LIBX11_MACHINE
1317 #endif
1318
1319 #ifndef LIBX11_SYSTEM
1320 #define LIBX11_SYSTEM
1321 #endif
1322 configure___ LIBX=LIB_X11_LIB LIBX11_MACHINE LIBX11_SYSTEM
1323
1324 #ifdef UNEXEC
1325 configure___ unexec=UNEXEC
1326 #else
1327 configure___ unexec=unexec.o
1328 #endif
1329
1330 #ifdef SYSTEM_MALLOC
1331 configure___ system_malloc=yes
1332 #else
1333 configure___ system_malloc=no
1334 #endif
1335
1336 #ifndef C_DEBUG_SWITCH
1337 #define C_DEBUG_SWITCH -g
1338 #endif
1339
1340 #ifndef C_OPTIMIZE_SWITCH
1341 #define C_OPTIMIZE_SWITCH -O
1342 #endif
1343
1344 #ifdef __GNUC__
1345 configure___ CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${CFLAGS}'
1346 #else
1347 configure___ CFLAGS=C_DEBUG_SWITCH '${CFLAGS}'
1348 #endif
1349 ' > ${tempcname}
1350 # The value of CPP is a quoted variable reference, so we need to do this
1351 # to get its actual value...
1352 CPP=`eval "echo $CPP"`
1353 eval `${CPP} -Isrc ${tempcname} \
1354 | grep 'configure___' \
1355 | sed -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/'`
1356 rm ${tempcname}
1357
1358 ### Compute the unexec source name from the object name.
1359 UNEXEC_SRC="`echo ${unexec} | sed 's/\.o/.c/'`"
1360
1361 # Do the opsystem or machine files prohibit the use of the GNU malloc?
1362 # Assume not, until told otherwise.
1363 GNU_MALLOC=yes
1364 if [ "${system_malloc}" = "yes" ]; then
1365 GNU_MALLOC=no
1366 GNU_MALLOC_reason="
1367 (The GNU allocators don't work with this system configuration.)"
1368 fi
1369
1370 if [ x"${REL_ALLOC}" = x ]; then
1371 REL_ALLOC=${GNU_MALLOC}
1372 fi
1373
1374 LISP_FLOAT_TYPE=yes
1375
1376
1377 #### Add the libraries to LIBS and check for some functions.
1378
1379 ]
1380 DEFS="$c_switch_system $c_switch_machine $DEFS"
1381 LIBS="$libsrc_libs"
1382
1383 dnl If found, this defines HAVE_LIBDNET, which m/pmax.h checks,
1384 dnl and also adds -ldnet to LIBS, which Autoconf uses for checks.
1385 AC_HAVE_LIBRARY(-ldnet)
1386 AC_HAVE_LIBRARY(-lresolv)
1387
1388 AC_HAVE_LIBRARY(-lXbsd, LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd")
1389
1390 echo checking for XFree86
1391 if test -d /usr/X386/include; then
1392 HAVE_XFREE386=yes
1393 test -z "${C_SWITCH_X_SITE}" && C_SWITCH_X_SITE="-I/usr/X386/include"
1394 fi
1395
1396 if test "${HAVE_X11}" = "yes"; then
1397 DEFS="$C_SWITCH_X_SITE $DEFS"
1398 LIBS="$LD_SWITCH_X_SITE $LIBX $LIBS"
1399 AC_HAVE_FUNCS(XrmSetDatabase XScreenResourceString \
1400 XScreenNumberOfScreen XSetWMProtocols)
1401 fi
1402
1403 AC_ALLOCA
1404
1405 # logb and frexp are found in -lm on most systems.
1406 AC_HAVE_LIBRARY(-lm)
1407 AC_HAVE_FUNCS(gettimeofday gethostname dup2 rename closedir mkdir rmdir \
1408 random bcopy bcmp logb frexp fmod drem ftime res_init setsid strerror \
1409 fpathconf)
1410
1411 ok_so_far=true
1412 AC_FUNC_CHECK(socket, , ok_so_far=)
1413 if test -n "$ok_so_far"; then
1414 AC_HEADER_CHECK(netinet/in.h, , ok_so_far=)
1415 fi
1416 if test -n "$ok_so_far"; then
1417 AC_HEADER_CHECK(arpa/inet.h, , ok_so_far=)
1418 fi
1419 if test -n "$ok_so_far"; then
1420 AC_DEFINE(HAVE_INET_SOCKETS)
1421 fi
1422 [
1423 #### Find out which version of Emacs this is.
1424 version=`grep 'defconst[ ]*emacs-version' ${srcdir}/lisp/version.el \
1425 | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`
1426 if [ x"${version}" = x ]; then
1427 echo "${progname}: can't find current emacs version in
1428 \`${srcdir}/lisp/version.el'." >&2
1429 exit 1
1430 fi
1431
1432 if [ -f /usr/lpp/X11/bin/smt.exp ]; then
1433 ]
1434 AC_DEFINE(HAVE_AIX_SMT_EXP)
1435 [
1436 fi
1437
1438 #### Specify what sort of things we'll be editing into Makefile and config.h.
1439 ### Use configuration here uncanonicalized to avoid exceeding size limits.
1440 ]
1441 AC_SUBST(version)
1442 AC_SUBST(srcdir)
1443 AC_SUBST(prefix)
1444 AC_SUBST(exec_prefix)
1445 AC_SUBST(bindir)
1446 AC_SUBST(datadir)
1447 AC_SUBST(statedir)
1448 AC_SUBST(libdir)
1449 AC_SUBST(mandir)
1450 AC_SUBST(infodir)
1451 AC_SUBST(lispdir)
1452 AC_SUBST(locallisppath)
1453 AC_SUBST(lisppath)
1454 AC_SUBST(etcdir)
1455 AC_SUBST(lockdir)
1456 AC_SUBST(archlibdir)
1457 AC_SUBST(docdir)
1458 AC_SUBST(c_switch_system)
1459 AC_SUBST(c_switch_machine)
1460 AC_SUBST(LD_SWITCH_X_SITE)
1461 AC_SUBST(LD_SWITCH_X_SITE_AUX)
1462 AC_SUBST(C_SWITCH_X_SITE)
1463 AC_SUBST(CFLAGS)
1464 AC_SUBST(X_TOOLKIT_TYPE)
1465 AC_SUBST(machfile)
1466 AC_SUBST(opsysfile)
1467
1468 AC_DEFINE_UNQUOTED(CONFIGURATION, "\"${configuration}\"")
1469 AC_DEFINE_UNQUOTED(config_machfile, "\"${machfile}\"")
1470 AC_DEFINE_UNQUOTED(config_opsysfile, "\"${opsysfile}\"")
1471 AC_DEFINE_UNQUOTED(LD_SWITCH_X_SITE, ${LD_SWITCH_X_SITE})
1472 AC_DEFINE_UNQUOTED(LD_SWITCH_X_SITE_AUX, ${LD_SWITCH_X_SITE_AUX})
1473 AC_DEFINE_UNQUOTED(C_SWITCH_X_SITE, ${C_SWITCH_X_SITE})
1474 AC_DEFINE_UNQUOTED(UNEXEC_SRC, ${UNEXEC_SRC})
1475
1476 [
1477 if [ "${HAVE_X_WINDOWS}" = "yes" ] ; then
1478 ] AC_DEFINE(HAVE_X_WINDOWS) [
1479 fi
1480 if [ "${USE_X_TOOLKIT}" != "none" ] ; then
1481 ] AC_DEFINE(USE_X_TOOLKIT) [
1482 fi
1483 if [ "${HAVE_X11}" = "yes" ] ; then
1484 ] AC_DEFINE(HAVE_X11) [
1485 fi
1486 if [ "${HAVE_XFREE386}" = "yes" ] ; then
1487 ] AC_DEFINE(HAVE_XFREE386) [
1488 fi
1489 if [ "${HAVE_X_MENU}" = "yes" ] ; then
1490 ] AC_DEFINE(HAVE_X_MENU) [
1491 fi
1492 if [ "${GNU_MALLOC}" = "yes" ] ; then
1493 ] AC_DEFINE(GNU_MALLOC) [
1494 fi
1495 if [ "${REL_ALLOC}" = "yes" ] ; then
1496 ] AC_DEFINE(REL_ALLOC) [
1497 fi
1498 if [ "${LISP_FLOAT_TYPE}" = "yes" ] ; then
1499 ] AC_DEFINE(LISP_FLOAT_TYPE) [
1500 fi
1501
1502 # ====================== Developer's configuration =======================
1503
1504 # The following assignments make sense if you're running Emacs on a single
1505 # machine, one version at a time, and you want changes to the lisp and etc
1506 # directories in the source tree to show up immediately in your working
1507 # environment. It saves a great deal of disk space by not duplicating the
1508 # lisp and etc directories.
1509
1510 if [ "$run_in_place" = "1" ]; then
1511 lispdir='${srcdir}/lisp'
1512 locallisppath='${srcdir}/site-lisp'
1513 etcdir='${srcdir}/etc'
1514 lockdir='${srcdir}/lock'
1515 archlibdir=`(cd lib-src && pwd)`
1516 docdir=`(cd etc && pwd)`
1517 infodir='${srcdir}/info'
1518 elif [ "$single_tree" = "1" ]; then
1519 if [ "$exec_prefix_specified" = "" ]; then
1520 exec_prefix='${prefix}'
1521 fi
1522 if [ "$bindir_specified" = "" ]; then
1523 bindir='${exec_prefix}/bin/${configuration}'
1524 fi
1525 if [ "$datadir_specified" = "" ]; then
1526 datadir='${prefix}/common'
1527 fi
1528 if [ "$statedir_specified" = "" ]; then
1529 statedir='${prefix}/common'
1530 fi
1531 if [ "$libdir_specified" = "" ]; then
1532 libdir='${bindir}'
1533 fi
1534 if [ "$lispdir_specified" = "" ]; then
1535 lispdir='${prefix}/common/lisp'
1536 fi
1537 if [ "$locallisppath_specified" = "" ]; then
1538 locallisppath='${prefix}/common/site-lisp'
1539 fi
1540 if [ "$lockdir_specified" = "" ]; then
1541 lockdir='${prefix}/common/lock'
1542 fi
1543 if [ "$archlibdir_specified" = "" ]; then
1544 archlibdir='${libdir}/etc'
1545 fi
1546 if [ "$etcdir_specified" = "" ]; then
1547 etcdir='${prefix}/common/data'
1548 fi
1549 if [ "$docdir_specified" = "" ]; then
1550 docdir='${prefix}/common/data'
1551 fi
1552 fi
1553
1554 #### Report on what we decided to do.
1555 echo "
1556
1557 Configured for \`${canonical}'.
1558
1559 Where should the build process find the source code? ${srcdir}
1560 What operating system and machine description files should Emacs use?
1561 \`${opsysfile}' and \`${machfile}'
1562 What compiler should emacs be built with? ${CC} ${CFLAGS}
1563 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
1564 Should Emacs use the relocating allocator for buffers? ${REL_ALLOC}
1565 What window system should Emacs use? ${window_system}
1566 What toolkit should Emacs use? ${USE_X_TOOLKIT}${x_includes+
1567 Where do we find X Windows header files? }${x_includes}${x_libraries+
1568 Where do we find X Windows libraries? }${x_libraries}
1569
1570 "
1571
1572 # Remove any trailing slashes in these variables.
1573 test -n "${prefix}" &&
1574 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
1575 test -n "${exec_prefix}" &&
1576 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
1577 ]
1578 AC_OUTPUT(Makefile lib-src/Makefile.in oldXMenu/Makefile lwlib/Makefile src/Makefile.in, [
1579
1580 # Build src/Makefile from ${srcdir}/src/Makefile.in. This must be done
1581 # after src/config.h is built, since we rely on that file.
1582
1583 changequote(,)dnl The horror, the horror.
1584 # Now get this: Some word that is part of the ${srcdir} directory name
1585 # or the ${configuration} value might, just might, happen to be an
1586 # identifier like `sun4' or `i386' or something, and be predefined by
1587 # the C preprocessor to some helpful value like 1, or maybe the empty
1588 # string. Needless to say consequent macro substitutions are less
1589 # than conducive to the makefile finding the correct directory.
1590 undefs="`echo $top_srcdir $configuration |
1591 sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/ *$//' \
1592 -e 's/ */ -U/g' -e 's/-U[0-9][^ ]*//g' \
1593 `"
1594 changequote([,])dnl
1595
1596 echo creating lib-src/Makefile
1597 ( cd lib-src
1598 rm -f junk.c
1599 sed -e 's@^# \(Generated.*\)$@/* \1 */@' \
1600 -e 's@/\*\*/#\(.*\)$@/* \1 */@' \
1601 < Makefile.in > junk.c
1602 $CPP $undefs -I. -I$top_srcdir/src $CPPFLAGS junk.c |
1603 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > Makefile.new
1604 rm -f junk.c
1605 chmod 444 Makefile.new;
1606 mv -f Makefile.new Makefile;
1607 )
1608
1609 echo creating src/Makefile
1610 ( cd src
1611 rm -f junk.c
1612 sed -e 's@^# \(Generated.*\)$@/* \1 */@' \
1613 -e 's@/\*\*/#\(.*\)$@/* \1 */@' \
1614 < Makefile.in > junk.c
1615 $CPP $undefs -I. -I$top_srcdir/src $CPPFLAGS junk.c |
1616 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > Makefile.new
1617 rm -f junk.c
1618 chmod 444 Makefile.new;
1619 mv -f Makefile.new Makefile;
1620 )])