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