1 dnl This is an autoconf script.
2 dnl To rebuild the `configure' script from this, execute the command
4 dnl in the directory containing this script. You must have autoconf
5 dnl version 1.4 or later.
7 dnl The following text appears in the resulting `configure' script,
8 dnl explaining how to rebuild it.
10 #### Configuration script for GNU Emacs
11 #### Copyright (C) 1992 Free Software Foundation, Inc.
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
18 ### in the this directory. You must have autoconf version 1.4 or later.
20 ### This file is part of GNU Emacs.
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.
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.
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.
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.
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.
44 ### Usage: configure config_name
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.
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
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:^\./\./:\./:'`"
65 ### Establish some default values.
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}'
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"
93 short_usage="Usage: ${progname} CONFIGURATION [-OPTION[=VALUE] ...]
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
105 --single-tree=DIR Has the effect of creating a directory tree at DIR
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}'.
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.
120 If successful, ${progname} leaves its status in config.status. If
121 unsuccessful after disturbing the status quo, it removes config.status."
124 #### Option processing.
126 ### Record all the arguments, so we can save them in config.status.
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'.
134 quoted_arguments="$quoted_arguments '$i'"
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
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
147 ## Anything starting with a hyphen we assume is an option.
149 ## Separate the switch name from the value it's being given.
152 opt=`echo ${arg} | sed 's:^-*\([^=]*\)=.*$:\1:'`
153 val=`echo ${arg} | sed 's:^-*[^=]*=\(.*\)$:\1:'`
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:'`
166 ## Change `-' in the option name to `_'.
168 opt="`echo ${opt} | tr - _`"
170 ## Process the option.
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".
177 y | ye | yes ) val=yes ;;
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
186 eval "${opt}=\"${val}\""
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".
193 y | ye | yes ) val=yes ;;
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
202 eval "${opt}=\"${val}\""
205 ## Has the user specified a source directory?
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.
211 (echo "${progname}: You must give a value for the \`--${optname}' option, as in
212 \`--${optname}=FOO'."
213 echo "${short_usage}") >&2
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.
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.
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
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.
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
254 ## Should this use the "development configuration"?
260 ## Should this use the "single tree" configuration?
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
274 "$progname: You must give a value for the \`--${optname}' option,";
276 "as in \`--${optname}=`eval echo '$'$optname`.'"
277 echo "$short_usage") >&2
282 eval "${opt}=\"${val}\""
283 eval "${opt}_specified=1"
286 ## Verbose flag, tested by autoconf macros.
291 ## Has the user asked for some help?
295 echo "${short_usage}" | more
297 echo "${short_usage}" | $PAGER
302 ## We ignore all other options silently.
306 ## Anything not starting with a hyphen we assume is a
307 ## configuration name.
315 ### Get the arguments back. See the diatribe on Shell Magic above.
316 eval set x "$quoted_arguments"; shift
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
325 echo '- Failed to guess the system type. You need to tell me.' 1>&2
326 echo "${short_usage}" >&2
331 #### Decide where the source is.
334 ## If it's not specified, see if `.' or `..' might work.
336 confdir=`echo $0 | sed 's|//|/|' | sed 's|/[^/]*$||'`
337 if [ -f $confdir/src/lisp.h -a -f $confdir/lisp/version.el ]; then
340 if [ -f "./src/lisp.h" -a -f "./lisp/version.el" ]; then
343 if [ -f "../src/lisp.h" -a -f "../lisp/version.el" ]; then
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
359 ## Otherwise, check if the directory they specified is okay.
361 if [ ! -d "${srcdir}" -o ! -f "${srcdir}/src/lisp.h" -o ! -f "${srcdir}/lisp/version.el" ]; then
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
368 echo "${short_usage}") >&2
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.
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
385 srcdir="`(cd ${srcdir}; pwd)`"
388 * ) srcdir="`(cd ${srcdir}; pwd)`" ;;
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\
406 vpath %.in $(srcdir)'
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
416 #### Given the configuration name, set machfile and opsysfile to the
417 #### names of the m/*.h and s/*.h files we should use.
419 ### Canonicalize the configuration name.
420 echo "Checking the configuration name."
421 if canonical=`${srcdir}/config.sub "${configuration}"` ; then : ; else
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.
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.
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.
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'."
448 machine='' opsys='' unported='false'
449 case "${canonical}" in
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.
458 machine=alliant4 opsys=bsd4-2
461 machine=alliant-2800 opsys=bsd4-3
466 machine=altos opsys=usg5-2
471 machine=amdahl opsys=usg5-2-2
474 ## Appallings - I mean, Apollos - running Domain
476 machine=apollo opsys=bsd4-2
479 ## AT&T 3b2, 3b5, 3b15, 3b20
481 machine=att3b opsys=usg5-2-2
484 ## AT&T 3b1 - The Mighty Unix PC!
486 machine=7300 opsys=usg5-2-2
491 machine=dpx2 opsys=usg5-3
496 machine=sps7 opsys=usg5-2
499 ## CCI 5/32, 6/32 -- see "Tahoe".
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
505 celerity-celerity-bsd* )
506 machine=celerity opsys=bsd4-2
510 ## What operating systems does this chip run that Emacs has been
514 ## We'll use the catch-all code at the bottom to guess the
520 machine=convex opsys=bsd4-3
525 machine=intel386 opsys=usg5-3
529 cydra*-cydrome-sysv* )
530 machine=cydra5 opsys=usg5-3
533 ## Data General AViiON Machines
535 machine=aviion opsys=dgux
539 mips-dec-ultrix[0-3].* | mips-dec-ultrix4.0* | mips-dec-bsd4.2* )
540 machine=pmax opsys=bsd4-2
542 mips-dec-ultrix* | mips-dec-bsd* )
543 machine=pmax opsys=bsd4-3
546 machine=pmax opsys=osf1
549 ## Motorola Delta machines
550 m68*-motorola-sysv* )
551 machine=delta opsys=usg5-3
553 m88k-motorola-sysv4* )
554 machine=delta88k opsys=usg5-4
556 m88k-motorola-sysv* | m88k-motorola-m88kbcs* )
557 machine=delta88k opsys=usg5-3
562 machine=dual opsys=usg5-2
565 machine=dual opsys=unipl5-2
570 machine=elxsi opsys=usg5-2
575 machine=ns16000 opsys=umax
578 ## The GEC 93 - apparently, this port isn't really finished yet.
580 ## Gould Power Node and NP1
582 machine=gould opsys=bsd4-2
585 machine=gould opsys=bsd4-3
588 machine=gould-np1 opsys=bsd4-3
592 xps*-honeywell-sysv* )
593 machine=xps100 opsys=usg5-2
596 ## HP 9000 series 200 or 300
598 machine=hp9000s300 opsys=bsd4-3
601 machine=hp9000s300 opsys=netbsd
603 ## HP/UX 7, 8 and 9 are supported on these machines.
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 ;;
615 ## HP 9000 series 700 and 800, running HP/UX
617 machine=hp9000s800 opsys=hpux
620 machine=hp9000s800 opsys=hpux8
623 machine=hp9000s800 opsys=hpux9
626 ## HP 9000 series 700 and 800, running HP/UX
628 ## Cross-compilation? Nah!
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 ;;
641 machine=orion opsys=bsd4-2
644 machine=orion105 opsys=bsd4-2
649 machine=ibmps2-aix opsys=usg5-2-2
651 i386-ibm-aix1.[23]* | i386-ibm-aix* )
652 machine=ibmps2-aix opsys=usg5-3
655 machine=ibm370aix opsys=usg5-3
658 machine=ibmrs6000 opsys=aix3-1
660 rs6000-ibm-aix3.2* | rs6000-ibm-aix* )
661 machine=ibmrs6000 opsys=aix3-2
664 machine=ibmrt opsys=bsd4-3
667 machine=ibmrt opsys=bsd4-2
670 machine=ibmrt opsys=bsd4-3
673 machine=ibmrt opsys=bsd4-2
676 machine=ibmrt opsys=bsd4-3
679 machine=ibmrt opsys=bsd4-3
682 machine=ibmrt-aix opsys=usg5-2-2
685 ## Integrated Solutions `Optimum V'
687 machine=isi-ov opsys=bsd4-2
690 machine=isi-ov opsys=bsd4-3
693 ## Intel 386 machines where we do care about the manufacturer
694 i[34]86-intsys-sysv* )
695 machine=is386 opsys=usg5-2-2
700 machine=i386 opsys=usg5-3
705 machine=symmetry opsys=bsd4-3
708 ## Unspecified sysv on an ncr machine defaults to svr4.
710 machine=intel386 opsys=usg5-4
715 machine=i860 opsys=usg5-4
718 ## Silicon Graphics machines
719 ## Iris 2500 and Iris 2500 Turbo (aka the Iris 3030)
721 machine=irist opsys=iris3-5
723 m68*-sgi-iris3.6* | m68*-sgi-iris*)
724 machine=irist opsys=iris3-6
728 machine=iris4d opsys=irix3-3
731 machine=iris4d opsys=irix5-0
733 mips-sgi-irix4.* | mips-sgi-irix* )
734 machine=iris4d opsys=irix4-0
739 machine=masscomp opsys=rtu
744 machine=mega68 opsys=bsd4-2
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.
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.
760 ## Fall through to the general code at the bottom to decide on the OS.
763 machine=mips4 opsys=bsd4-3
764 NON_GNU_CC="cc -systype bsd43"
767 machine=mips opsys=bsd4-3
770 machine=mips opsys=usg5-2-2
775 machine=next opsys=mach2
778 ## The complete machine from National Semiconductor
780 machine=ns32000 opsys=usg5-2
784 m68*-ncr-sysv2* | m68*-ncr-sysvr2* )
785 machine=tower32 opsys=usg5-2-2
787 m68*-ncr-sysv3* | m68*-ncr-sysvr3* )
788 machine=tower32v3 opsys=usg5-3
793 machine=targon31 opsys=usg5-2-2
798 machine=nu opsys=usg5-2
803 machine=plexus opsys=usg5-2
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
814 ns32k-sequent-bsd4.2* )
815 machine=sequent opsys=bsd4-2
817 ns32k-sequent-bsd4.3* )
818 machine=sequent opsys=bsd4-3
823 machine=news opsys=bsd4-2
826 machine=news opsys=bsd4-3
829 machine=news opsys=bsd4-3
832 machine=news-risc opsys=bsd4-3
837 machine=stride opsys=usg5-2
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 ;;
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* )
858 NON_GNU_CPP=/usr/ccs/lib/cpp
860 *-sunos5* | *-solaris* )
862 NON_GNU_CPP=/usr/ccs/lib/cpp
870 machine=tad68k opsys=usg5-3
874 tahoe-tahoe-bsd4.2* )
875 machine=tahoe opsys=bsd4-2
877 tahoe-tahoe-bsd4.3* )
878 machine=tahoe opsys=bsd4-3
881 ## Tandem Integrity S2
883 machine=tandem-s2 opsys=usg5-3
887 m88k-tektronix-sysv3* )
888 machine=tekxd88 opsys=usg5-3
891 ## Tektronix 16000 box (6130?)
892 ns16k-tektronix-bsd* )
893 machine=ns16000 opsys=bsd4-2
896 ## src/m/tek4300.h hints that this is a m68k machine.
897 m68*-tektronix-bsd* )
898 machine=tek4300 opsys=bsd4-3
902 ## We seem to have lost the machine-description file titan.h!
904 machine=titan opsys=usg5-3
907 ## Ustation E30 (SS5E)
908 m68*-unisys-uniplus* )
909 machine=ustation opsystem=unipl5-2
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 ;;
928 ns16k-whitechapel-* )
930 ## We don't know what sort of OS runs on these; we'll let the
931 ## operating system guessing code below try.
936 machine=wicat opsys=usg5-2
939 ## Intel 386 machines where we don't care about the manufacturer
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 *-nextstep* ) opsys=mach2 ;;
955 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
964 ### If the code above didn't choose an operating system, just choose
965 ### an operating system based on the configuration name. You really
966 ### only want to use this when you have no idea what the right
967 ### operating system is; if you know what operating systems a machine
968 ### runs, it's cleaner to make it explicit in the case statement
970 if [ x"${opsys}" = x ]; then
971 case "${canonical}" in
972 *-bsd4.[01] ) opsys=bsd4-1 ;;
973 *-bsd4.2 ) opsys=bsd4-2 ;;
974 *-bsd4.3 ) opsys=bsd4-3 ;;
975 *-sysv0 | *-sysvr0 ) opsys=usg5-0 ;;
976 *-sysv2 | *-sysvr2 ) opsys=usg5-2 ;;
977 *-sysv2.2 | *-sysvr2.2 ) opsys=usg5-2-2 ;;
978 *-sysv3 | *-sysvr3 ) opsys=usg5-3 ;;
979 *-sysv4 | *-sysvr4 ) opsys=usg5-4 ;;
980 *-sysv4.2 | *-sysvr4.2 ) opsys=usg5-4-2 ;;
988 (echo "${progname}: Emacs hasn't been ported to \`${canonical}' systems."
989 echo "${progname}: Check \`etc/MACHINES' for recognized configuration names."
994 machfile="m/${machine}.h"
995 opsysfile="s/${opsys}.h"
999 AC_CONFIG_HEADER(src/config.h)
1002 #### Choose a compiler.
1004 "yes" ) CC="gcc" GCC=1 ;;
1005 "no" ) CC=${CC:-"cc"} ;;
1010 #### Some systems specify a CPP to use unless we are using GCC.
1011 #### Now that we know whether we are using GCC, we can decide whether
1012 #### to use that one.
1013 if [ x$NON_GNU_CPP = x ] || [ x$GCC = x1 ]
1019 #### Some systems specify a CC to use unless we are using GCC.
1020 #### Now that we know whether we are using GCC, we can decide whether
1021 #### to use that one.
1022 if [ x$NON_GNU_CC = x ] || [ x$GCC = x1 ]
1028 #### Some other nice autoconf tests. If you add a test here which
1029 #### should make an entry in src/config.h, don't forget to add an
1030 #### #undef clause to src/config.h.in for autoconf to modify.
1032 dnl checks for programs
1038 dnl checks for UNIX variants that set `DEFS'
1040 dnl checks for header files
1041 AC_HAVE_HEADERS(sys/timeb.h sys/time.h unistd.h)
1043 AC_TIME_WITH_SYS_TIME
1045 dnl checks for typedefs
1048 dnl checks for structure members
1052 dnl checks for compiler characteristics
1055 dnl checks for operating system services
1058 dnl other checks for UNIX variants
1061 #### Choose a window system.
1062 echo "Checking window system."
1067 window_system=${window_system}x11
1070 window_system=${window_system}none
1072 case "${with_x11}" in
1074 window_system=${window_system}x11
1077 case "${with_x10}" in
1079 window_system=${window_system}x10
1083 case "${window_system}" in
1084 "none" | "x11" | "x10" ) ;;
1086 # --x-includes or --x-libraries implies --with-x11.
1087 if [ -n "${x_includes}" ] || [ -n "${x_libraries}" ]; then
1090 echo " No window system specified. Looking for X11."
1091 # If the user didn't specify a window system and we found X11, use it.
1092 if [ -r /usr/lib/libX11.a \
1093 -o -d /usr/include/X11 \
1094 -o -d /usr/X386/include \
1095 -o -d ${x_includes}/X11 ]; then
1101 echo "Don't specify a window system more than once." >&2
1106 case "${window_system}" in
1108 ### If the user hasn't specified where we should find X, try
1109 ### letting autoconf figure that out.
1110 if [ -z "${x_includes}" ] && [ -z "${x_libraries}" ]; then
1115 if [ -n "${x_includes}" ] || [ -n "${x_libraries}" ]; then
1121 [ -z "${window_system}" ] && window_system=none
1123 [ -n "${x_libraries}" ] && LD_SWITCH_X_SITE="-L${x_libraries}"
1124 [ -n "${x_includes}" ] && C_SWITCH_X_SITE="-I${x_includes}"
1126 # Avoid forcing the search of /usr/include before fixed include files.
1127 if [ "$C_SWITCH_X_SITE" = "-I/usr/include" ]; then
1131 case "${window_system}" in
1145 echo " Using no window system."
1149 ### If we're using X11, we should use the X menu package.
1157 #### Extract some information from the operating system and machine files.
1159 echo "Examining the machine- and system-dependent files to find out"
1160 echo " - which libraries the lib-src programs will want, and"
1161 echo " - whether the GNU malloc routines are usable."
1163 ### It's not important that this name contain the PID; you can't run
1164 ### two configures in the same directory and have anything work
1166 tempcname="conftest.c"
1169 #include "'${srcdir}'/src/'${opsysfile}'"
1170 #include "'${srcdir}'/src/'${machfile}'"
1171 #ifndef LIBS_MACHINE
1172 #define LIBS_MACHINE
1177 #ifndef C_SWITCH_SYSTEM
1178 #define C_SWITCH_SYSTEM
1180 configure___ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM
1181 configure___ c_switch_system=C_SWITCH_SYSTEM
1184 #define LIB_X11_LIB -lX11
1187 #ifndef LIBX11_MACHINE
1188 #define LIBX11_MACHINE
1191 #ifndef LIBX11_SYSTEM
1192 #define LIBX11_SYSTEM
1194 configure___ LIBX=LIB_X11_LIB LIBX11_MACHINE LIBX11_SYSTEM
1197 configure___ unexec=UNEXEC
1199 configure___ unexec=unexec.o
1202 #ifdef SYSTEM_MALLOC
1203 configure___ system_malloc=yes
1205 configure___ system_malloc=no
1208 #ifndef C_DEBUG_SWITCH
1209 #define C_DEBUG_SWITCH -g
1212 #ifndef C_OPTIMIZE_SWITCH
1213 #define C_OPTIMIZE_SWITCH -O
1217 configure___ CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH
1219 configure___ CFLAGS=C_DEBUG_SWITCH
1222 # The value of CPP is a quoted variable reference, so we need to do this
1223 # to get its actual value...
1224 CPP=`eval "echo $CPP"`
1225 eval `${CPP} -Isrc ${tempcname} \
1226 | grep 'configure___' \
1227 | sed -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/'`
1230 ### Compute the unexec source name from the object name.
1231 UNEXEC_SRC="`echo ${unexec} | sed 's/\.o/.c/'`"
1233 # Do the opsystem or machine files prohibit the use of the GNU malloc?
1234 # Assume not, until told otherwise.
1236 if [ "${system_malloc}" = "yes" ]; then
1239 (The GNU allocators don't work with this system configuration.)"
1242 if [ x"${REL_ALLOC}" = x ]; then
1243 REL_ALLOC=${GNU_MALLOC}
1249 #### Add the libraries to LIBS and check for some functions.
1252 DEFS="$c_switch_system $DEFS"
1255 dnl If found, this defines HAVE_LIBDNET, which m/pmax.h checks,
1256 dnl and also adds -ldnet to LIBS, which Autoconf uses for checks.
1257 AC_HAVE_LIBRARY(-ldnet)
1259 AC_HAVE_LIBRARY(-lXbsd, LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd")
1261 echo checking for XFree86
1262 if test -d /usr/X386/include; then
1264 test -z "${C_SWITCH_X_SITE}" && C_SWITCH_X_SITE="-I/usr/X386/include"
1267 if test "${HAVE_X11}" = "yes"; then
1268 DEFS="$C_SWITCH_X_SITE $DEFS"
1269 LIBS="$LD_SWITCH_X_SITE $LIBX $LIBS"
1270 AC_HAVE_FUNCS(XrmSetDatabase XScreenResourceString XScreenNumberOfScreen XSetWMProtocols)
1275 # logb and frexp are found in -lm on most systems.
1276 AC_HAVE_LIBRARY(-lm)
1277 AC_HAVE_FUNCS(gettimeofday gethostname dup2 rename closedir mkdir rmdir random bcopy logb frexp ftime res_init setsid)
1280 AC_FUNC_CHECK(socket, , ok_so_far=)
1281 if test -n "$ok_so_far"; then
1282 AC_HEADER_CHECK(netinet/in.h, , ok_so_far=)
1284 if test -n "$ok_so_far"; then
1285 AC_HEADER_CHECK(arpa/inet.h, , ok_so_far=)
1287 if test -n "$ok_so_far"; then
1288 AC_DEFINE(HAVE_INET_SOCKETS)
1291 #### Find out which version of Emacs this is.
1292 version=`grep 'defconst[ ]*emacs-version' ${srcdir}/lisp/version.el \
1293 | sed -e 's/^.*"\([0-9][0-9]*\.[0-9][0-9]*\)\..*$/\1/'`
1294 if [ x"${version}" = x ]; then
1295 echo "${progname}: can't find current emacs version in
1296 \`${srcdir}/lisp/version.el'." >&2
1300 if [ -f /usr/lpp/X11/bin/smt.exp ]; then
1302 AC_DEFINE(HAVE_AIX_SMT_EXP)
1307 #### Specify what sort of things we'll be editing into Makefile and config.h.
1308 ### Use configuration here uncanonicalized to avoid exceeding size limits.
1310 AC_SUBST(configuration)
1314 AC_SUBST(exec_prefix)
1322 AC_SUBST(locallisppath)
1326 AC_SUBST(archlibdir)
1327 AC_SUBST(c_switch_system)
1328 AC_SUBST(libsrc_libs)
1329 AC_SUBST(LD_SWITCH_X_SITE)
1330 AC_SUBST(C_SWITCH_X_SITE)
1333 AC_DEFINE_UNQUOTED(config_machfile, "\"${machfile}\"")
1334 AC_DEFINE_UNQUOTED(config_opsysfile, "\"${opsysfile}\"")
1335 AC_DEFINE_UNQUOTED(LD_SWITCH_X_SITE, ${LD_SWITCH_X_SITE})
1336 AC_DEFINE_UNQUOTED(C_SWITCH_X_SITE, ${C_SWITCH_X_SITE})
1337 AC_DEFINE_UNQUOTED(UNEXEC_SRC, ${UNEXEC_SRC})
1340 if [ "${HAVE_X_WINDOWS}" = "yes" ] ; then
1341 ] AC_DEFINE(HAVE_X_WINDOWS) [
1343 if [ "${HAVE_X11}" = "yes" ] ; then
1344 ] AC_DEFINE(HAVE_X11) [
1346 if [ "${HAVE_XFREE386}" = "yes" ] ; then
1347 ] AC_DEFINE(HAVE_XFREE386) [
1349 if [ "${HAVE_X_MENU}" = "yes" ] ; then
1350 ] AC_DEFINE(HAVE_X_MENU) [
1352 if [ "${GNU_MALLOC}" = "yes" ] ; then
1353 ] AC_DEFINE(GNU_MALLOC) [
1355 if [ "${REL_ALLOC}" = "yes" ] ; then
1356 ] AC_DEFINE(REL_ALLOC) [
1358 if [ "${LISP_FLOAT_TYPE}" = "yes" ] ; then
1359 ] AC_DEFINE(LISP_FLOAT_TYPE) [
1362 # ====================== Developer's configuration =======================
1364 # The following assignments make sense if you're running Emacs on a single
1365 # machine, one version at a time, and you want changes to the lisp and etc
1366 # directories in the source tree to show up immediately in your working
1367 # environment. It saves a great deal of disk space by not duplicating the
1368 # lisp and etc directories.
1370 if [ "$run_in_place" = "1" ]; then
1371 lispdir='${srcdir}/lisp'
1372 locallisppath='${srcdir}/site-lisp'
1373 etcdir='${srcdir}/etc'
1374 lockdir='${srcdir}/lock'
1375 archlibdir='${srcdir}/lib-src'
1376 infodir='${srcdir}/info'
1377 elif [ "$single_tree" = "1" ]; then
1378 if [ "$exec_prefix_specified" = "" ]; then
1379 exec_prefix='${prefix}'
1381 if [ "$bindir_specified" = "" ]; then
1382 bindir='${exec_prefix}/bin/${configuration}'
1384 if [ "$datadir_specified" = "" ]; then
1385 datadir='${prefix}/common'
1387 if [ "$statedir_specified" = "" ]; then
1388 statedir='${prefix}/common'
1390 if [ "$libdir_specified" = "" ]; then
1393 if [ "$lispdir_specified" = "" ]; then
1394 lispdir='${prefix}/common/lisp'
1396 if [ "$locallisppath_specified" = "" ]; then
1397 locallisppath='${prefix}/common/site-lisp'
1399 if [ "$lockdir_specified" = "" ]; then
1400 lockdir='${prefix}/common/lock'
1402 if [ "$archlibdir_specified" = "" ]; then
1403 archlibdir='${libdir}/etc'
1405 if [ "$etcdir_specified" = "" ]; then
1406 etcdir='${prefix}/common/data'
1410 #### Report on what we decided to do.
1413 Configured for \`${canonical}'.
1415 Where should the build process find the source code? ${srcdir}
1416 What operating system and machine description files should Emacs use?
1417 \`${opsysfile}' and \`${machfile}'
1418 What compiler should emacs be built with? ${CC} ${CFLAGS}
1419 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
1420 Should Emacs use the relocating allocator for buffers? ${REL_ALLOC}
1421 What window system should Emacs use? ${window_system}${x_includes+
1422 Where do we find X Windows header files? }${x_includes}${x_libraries+
1423 Where do we find X Windows libraries? }${x_libraries}
1427 # Remove any trailing slashes in these variables.
1428 test -n "${prefix}" &&
1429 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
1430 test -n "${exec_prefix}" &&
1431 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
1433 AC_OUTPUT(Makefile lib-src/Makefile oldXMenu/Makefile src/Makefile.in) [
1434 # Build src/Makefile from ${srcdir}/src/Makefile.in. This must be done
1435 # after src/config.h is built, since we rely on that file. Only do the
1436 # build if "config.status" is present, since it's non-presence indicates
1439 if [ ! -f ./config.status ]; then
1443 # We discard all lines in Makefile.in that start with `# Generated' or /**/#
1444 # because some cpps get confused by them.
1445 # Really we should preserve them somehow into Makefile,
1446 # but that is beyond my level of shell programming.
1447 makefile_command='echo "creating src/Makefile";
1448 topsrcdir='"${topsrcdir}"';
1451 sed -e '\''s/^# Generated.*//'\'' -e '\''s%/\*\*/#.*%%'\'' < Makefile.in > junk.c;
1452 eval `echo ${CPP} -I. -I${topsrcdir}/src ${CPPFLAGS} junk.c \>junk.cpp`;
1454 ' sed -e '\''s/^#.*//'\'' '\
1455 ' -e '\''s/^[ \f\t][ \f\t]*$//'\'' '\
1456 ' -e '\''s/^ / /'\'' '\
1457 ' | sed -n -e '\''/^..*$/p'\'' '\
1459 chmod 444 Makefile.new;
1460 mv -f Makefile.new Makefile;
1461 rm -f junk.c junk.cpp;
1463 eval `echo $makefile_command`
1464 # AC-OUTPUT has created `config.status' already. We need to add the above
1465 # commands to re-create `src/Makefile', and we need to insert them before
1466 # the final "exit 0" which appears at the end of `config.status'.
1467 <config.status sed -e 's/^exit 0$//' >config.new
1468 echo $makefile_command >>config.new
1469 echo exit 0 >>config.new
1470 mv -f config.new config.status
1471 chmod +x config.status
1472 # Don't let the fact that we just rewrote config.status make Makefile think
1473 # that it is now newer. We have just rewritten all of the Makefiles as well.
1474 MFS="Makefile src/Makefile src/Makefile.in lib-src/Makefile oldXMenu/Makefile"
1475 for file in $MFS; do
1476 chmod a+w $file; touch $file; chmod 444 $file