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