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.9 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, 1994 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.7 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 2, 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}'
82 docdir='${datadir}/emacs/${version}/etc'
84 # On Sun systems, people sometimes set up the variable CPP
85 # with a value that is a directory, not an executable at all.
86 # Detect that case, and ignore that value.
87 if [ "x$CPP" != x ] && [ -d "$CPP" ];
92 # We cannot use this variable in the case statement below, because many
93 # /bin/sh's have broken semantics for "case". Unfortunately, you must
94 # actually edit the clause itself.
95 # path_options="prefix | exec_prefix | bindir | libdir | etcdir | datadir"
96 # path_options="$path_options | archlibdir | statedir | mandir | infodir"
97 # path_options="$path_options | lispdir | lockdir | lisppath | locallisppath"
101 short_usage="Usage: ${progname} CONFIGURATION [-OPTION[=VALUE] ...]
103 Set compilation and installation parameters for GNU Emacs, and report.
104 CONFIGURATION specifies the machine and operating system to build for.
105 --with-x Support the X Window System.
106 --with-x=no Don't support X.
107 --with-x-toolkit Use an X toolkit.
108 --with-x-toolkit=no Don't use an X toolkit.
109 --with-gcc Use GCC to compile Emacs.
110 --with-gcc=no Don't use GCC to compile Emacs.
111 --x-includes=DIR Search for X header files in DIR.
112 --x-libraries=DIR Search for X libraries in DIR.
113 --run-in-place Use libraries and data files directly out of the
115 --single-tree=DIR Has the effect of creating a directory tree at DIR
117 .../DIR/bin/CONFIGNAME (emacs, etags, etc.)
118 .../DIR/bin/CONFIGNAME/etc (movemail, etc.)
119 .../DIR/common/lisp (emacs' lisp files)
120 .../DIR/common/site-lisp (local lisp files)
121 .../DIR/common/lib (DOC, TUTORIAL, etc.)
122 .../DIR/common/lock (lockfiles)
123 --srcdir=DIR Look for the Emacs source files in DIR.
124 --prefix=DIR Install files below DIR. Defaults to \`${prefix}'.
126 You may also specify any of the \`path' variables found in Makefile.in,
127 including --bindir, --libdir, --etcdir, --infodir, and so on. This allows
128 you to override a single default location when configuring.
130 If successful, ${progname} leaves its status in config.status. If
131 unsuccessful after disturbing the status quo, it removes config.status."
134 #### Option processing.
136 ### Record all the arguments, so we can save them in config.status.
139 ### Shell Magic: Quote the quoted arguments in ARGUMENTS. At a later date,
140 ### in order to get the arguments back in $@, we have to do an
141 ### `eval set x "$quoted_arguments"; shift'.
144 quoted_arguments="$quoted_arguments '$i'"
147 ### Don't use shift -- that destroys the argument list, which autoconf needs
148 ### to produce config.status. It turns out that "set - ${arguments}" doesn't
150 ### However, it also turns out that many shells cannot expand ${10} at all.
151 ### So using an index variable doesn't work either. It is possible to use
152 ### some shell magic to make 'set x "$arguments"; shift' work portably.
153 while [ $# != 0 ]; do
157 ## Anything starting with a hyphen we assume is an option.
159 ## Separate the switch name from the value it's being given.
162 opt=`echo ${arg} | sed 's:^-*\([^=]*\)=.*$:\1:'`
163 val=`echo ${arg} | sed 's:^-*[^=]*=\(.*\)$:\1:'`
167 ## If FOO is a boolean argument, --FOO is equivalent to
168 ## --FOO=yes. Otherwise, the value comes from the next
169 ## argument - see below.
170 opt=`echo ${arg} | sed 's:^-*\(.*\)$:\1:'`
176 ## Change `-' in the option name to `_'.
178 opt="`echo ${opt} | tr - _`"
180 ## Process the option.
183 ## Has the user specified which window systems they want to support?
184 "with_x" | "with_x11" | "with_x10" )
185 ## Make sure the value given was either "yes" or "no".
187 y | ye | yes ) val=yes ;;
190 (echo "${progname}: the \`--${optname}' option is supposed to have a boolean value.
191 Set it to either \`yes' or \`no'."
192 echo "${short_usage}") >&2
196 eval "${opt}=\"${val}\""
199 ## Has the user specified which toolkit they want to support?
202 y | ye | yes ) val=athena ;;
204 l | lu | luc | luci | lucid ) val=lucid ;;
205 a | at | ath | athe | athena ) val=athena ;;
206 # These don't currently work.
207 # m | mo | mot | moti | motif ) val=motif ;;
208 # o | op | ope | open | open- | open-l | open-lo \
209 # | open-loo | open-look ) val=open-look ;;
212 #echo "${progname}: the \`--${optname}' option is supposed to have a value
213 #which is \`yes', \`no', \`lucid', \`athena', \`motif' or \`open-look'."
214 echo "${progname}: the \`--${optname}' option is supposed to have a value
215 which is \`yes', \`no', \`lucid', or \`athena'.
216 Currently, \`yes', \`athena' and \`lucid' are synonyms."
217 echo "${short_usage}") >&2
221 eval "${opt}=\"${val}\""
224 ## Has the user specified whether or not they want GCC?
225 "with_gcc" | "with_gnu_cc" )
226 ## Make sure the value given was either "yes" or "no".
228 y | ye | yes ) val=yes ;;
231 (echo "${progname}: the \`--${optname}' option is supposed to have a boolean value.
232 Set it to either \`yes' or \`no'."
233 echo "${short_usage}") >&2
237 eval "${opt}=\"${val}\""
240 ## Has the user specified a source directory?
242 ## If the value was omitted, get it from the next argument.
243 if [ "${valomitted}" = "yes" ]; then
244 ## Get the next argument from the argument list, if there is one.
246 (echo "${progname}: You must give a value for the \`--${optname}' option, as in
247 \`--${optname}=FOO'."
248 echo "${short_usage}") >&2
256 ## Has the user tried to tell us where the X files are?
257 ## I think these are dopey, but no less than three alpha
258 ## testers, at large sites, have said they have their X files
259 ## installed in odd places.
261 ## If the value was omitted, get it from the next argument.
262 if [ "${valomitted}" = "yes" ]; then
263 ## Get the next argument from the argument list, if there is one.
265 (echo "${progname}: You must give a value for the \`--${optname}' option, as in
266 \`--${optname}=/usr/local/X11/include'."
267 echo "${short_usage}") >&2
275 ## If the value was omitted, get it from the next argument.
276 if [ "${valomitted}" = "yes" ]; then
277 ## Get the next argument from the argument list, if there is one.
279 (echo "${progname}: You must give a value for the \`--${optname}' option, as in
280 \`--${optname}=/usr/local/X11/lib'."
281 echo "${short_usage}") >&2
289 ## Should this use the "development" file organization?
295 ## Should this use the "single tree" file organization?
301 ## Has the user specified one of the path options?
302 prefix | exec_prefix | bindir | libdir | etcdir | datadir | \
303 archlibdir | statedir | mandir | infodir | lispdir | lockdir | \
304 lisppath | locallisppath | docdir )
305 ## If the value was omitted, get it from the next argument.
306 if [ "${valomitted}" = "yes" ]; then
309 "$progname: You must give a value for the \`--${optname}' option,";
311 "as in \`--${optname}=`eval echo '$'$optname`.'"
312 echo "$short_usage") >&2
317 eval "${opt}=\"${val}\""
318 eval "${opt}_specified=1"
321 ## Verbose flag, tested by autoconf macros.
326 ## Has the user asked for some help?
330 echo "${short_usage}" | more
332 echo "${short_usage}" | $PAGER
337 ## We ignore all other options silently.
341 ## Anything not starting with a hyphen we assume is a
342 ## configuration name.
350 ### Get the arguments back. See the diatribe on Shell Magic above.
351 eval set x "$quoted_arguments"; shift
353 if [ "${configuration}" = "" ]; then
354 echo '- You did not tell me what kind of host system you want to configure.
355 - I will attempt to guess the kind of system this is.' 1>&2
356 guesssys=`echo ${progname} | sed 's/configure$/config.guess/'`
357 if configuration=`${guesssys}` ; then
358 echo "- Looks like this is a ${configuration}" 1>&2
360 echo '- Failed to guess the system type. You need to tell me.' 1>&2
361 echo "${short_usage}" >&2
366 #### Decide where the source is.
369 ## If it's not specified, see if `.' or `..' might work.
371 confdir=`echo $0 | sed 's|//|/|' | sed 's|/[^/]*$||'`
372 if [ -f $confdir/src/lisp.h -a -f $confdir/lisp/version.el ]; then
375 if [ -f "./src/lisp.h" -a -f "./lisp/version.el" ]; then
378 if [ -f "../src/lisp.h" -a -f "../lisp/version.el" ]; then
382 ${progname}: Neither the current directory nor its parent seem to
383 contain the Emacs sources. If you do not want to build Emacs in its
384 source tree, you should run \`${progname}' in the directory in which
385 you wish to build Emacs, using its \`--srcdir' option to say where the
386 sources may be found."
387 echo "${short_usage}") >&2
394 ## Otherwise, check if the directory they specified is okay.
396 if [ ! -d "${srcdir}" -o ! -f "${srcdir}/src/lisp.h" -o ! -f "${srcdir}/lisp/version.el" ]; then
398 ${progname}: The directory specified with the \`--srcdir' option,
399 \`${srcdir}', doesn't seem to contain the Emacs sources. You should
400 either run the \`${progname}' script at the top of the Emacs source
401 tree, or use the \`--srcdir' option to specify where the Emacs sources
403 echo "${short_usage}") >&2
409 #### Make srcdir absolute, if it isn't already. It's important to
410 #### avoid running the path through pwd unnecessary, since pwd can
411 #### give you automounter prefixes, which can go away.
415 ## We may be able to use the $PWD environment variable to make this
416 ## absolute. But sometimes PWD is inaccurate.
417 if [ "${PWD}" != "" ] && [ "`(cd ${PWD} ; sh -c pwd)`" = "`pwd`" ] ; then
420 srcdir="`(cd ${srcdir}; pwd)`"
423 * ) srcdir="`(cd ${srcdir}; pwd)`" ;;
426 #### Check if the source directory already has a configured system in it.
427 if [ `pwd` != `(cd ${srcdir} && pwd)` ] \
428 && [ -f "${srcdir}/src/config.h" ] ; then
429 (echo "${progname}: WARNING: The directory tree \`${srcdir}' is being used"
430 echo " as a build directory right now; it has been configured in its own"
431 echo " right. To configure in another directory as well, you MUST"
432 echo " use GNU make. If you do not have GNU make, then you must"
433 echo " now do \`make distclean' in ${srcdir},"
434 echo " and then run ${progname} again.") >&2
435 extrasub='/^VPATH[ ]*=/c\
441 vpath %.in $(srcdir)'
444 ### Make the necessary directories, if they don't exist.
445 for dir in ./src ./lib-src ./cpp ./oldXMenu ./lwlib ./etc ; do
446 if [ ! -d ${dir} ]; then
451 #### Given the configuration name, set machfile and opsysfile to the
452 #### names of the m/*.h and s/*.h files we should use.
454 ### Canonicalize the configuration name.
455 echo "Checking the configuration name."
456 if canonical=`${srcdir}/config.sub "${configuration}"` ; then : ; else
460 ### If you add support for a new configuration, add code to this
461 ### switch statement to recognize your configuration name and select
462 ### the appropriate operating system and machine description files.
464 ### You would hope that you could choose an m/*.h file pretty much
465 ### based on the machine portion of the configuration name, and an s-
466 ### file based on the operating system portion. However, it turns out
467 ### that each m/*.h file is pretty manufacturer-specific - for
468 ### example, apollo.h, hp9000s300.h, mega68k, news.h, and tad68k are
469 ### all 68000 machines; mips.h, pmax.h, and news-risc are all MIPS
470 ### machines. So we basically have to have a special case for each
471 ### configuration name.
473 ### As far as handling version numbers on operating systems is
474 ### concerned, make sure things will fail in a fixable way. If
475 ### /etc/MACHINES doesn't say anything about version numbers, be
476 ### prepared to handle anything reasonably. If version numbers
477 ### matter, be sure /etc/MACHINES says something about it.
479 ### Eric Raymond says we should accept strings like "sysvr4" to mean
480 ### "System V Release 4"; he writes, "The old convention encouraged
481 ### confusion between `system' and `release' levels'."
483 machine='' opsys='' unported='false'
484 case "${canonical}" in
487 ## Strictly speaking, we need the version of the alliant operating
488 ## system to choose the right machine file, but currently the
489 ## configuration name doesn't tell us enough to choose the right
490 ## one; we need to give alliants their own operating system name to
491 ## do this right. When someone cares, they can help us.
493 machine=alliant4 opsys=bsd4-2
496 machine=alliant-2800 opsys=bsd4-3
501 machine=altos opsys=usg5-2
506 machine=amdahl opsys=usg5-2-2
509 ## Appallings - I mean, Apollos - running Domain
511 machine=apollo opsys=bsd4-2
514 ## AT&T 3b2, 3b5, 3b15, 3b20
516 machine=att3b opsys=usg5-2-2
519 ## AT&T 3b1 - The Mighty Unix PC!
521 machine=7300 opsys=usg5-2-2
526 machine=ibmrs6000 opsys=aix3-2
531 machine=dpx2 opsys=usg5-3
536 machine=sps7 opsys=usg5-2
539 ## CCI 5/32, 6/32 -- see "Tahoe".
542 ## I don't know what configuration name to use for this; config.sub
543 ## doesn't seem to know anything about it. Hey, Celerity users, get
545 celerity-celerity-bsd* )
546 machine=celerity opsys=bsd4-2
550 ## What operating systems does this chip run that Emacs has been
554 ## We'll use the catch-all code at the bottom to guess the
560 machine=convex opsys=bsd4-3
565 machine=intel386 opsys=usg5-3
569 cydra*-cydrome-sysv* )
570 machine=cydra5 opsys=usg5-3
573 ## Data General AViiON Machines
574 m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* )
575 machine=aviion opsys=dgux5-4r3
577 m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* )
578 machine=aviion opsys=dgux5-4r2
581 machine=aviion opsys=dgux
585 mips-dec-ultrix[0-3].* | mips-dec-ultrix4.0* | mips-dec-bsd4.2* )
586 machine=pmax opsys=bsd4-2
588 mips-dec-ultrix* | mips-dec-bsd* )
589 machine=pmax opsys=bsd4-3
592 machine=pmax opsys=osf1
595 ## Motorola Delta machines
596 m68k-motorola-sysv* | m68000-motorola-sysv* )
597 machine=delta opsys=usg5-3
598 if [ -z "`type gnucc | grep 'not found'`" ]
601 if [ -z "`type gcc | grep 'not found'`" ]
607 m88k-motorola-sysv4* )
608 machine=delta88k opsys=usg5-4
610 m88k-motorola-sysv* | m88k-motorola-m88kbcs* )
611 machine=delta88k opsys=usg5-3
616 machine=dual opsys=usg5-2
619 machine=dual opsys=unipl5-2
624 machine=elxsi opsys=usg5-2
629 machine=ns16000 opsys=umax
632 ## The GEC 93 - apparently, this port isn't really finished yet.
634 ## Gould Power Node and NP1
636 machine=gould opsys=bsd4-2
639 machine=gould opsys=bsd4-3
642 machine=gould-np1 opsys=bsd4-3
645 ## Harris Night Hawk machines running CX/UX (a 5000 looks just like a 4000
646 ## as far as Emacs is concerned).
648 # Build needs to be different on 7.0 and later releases
650 [56].[0-9] ) machine=nh4000 opsys=cxux ;;
651 [7].[0-9] ) machine=nh4000 opsys=cxux7 ;;
654 ## Harris ecx or gcx running CX/UX (Series 1200, Series 3000)
656 machine=nh3000 opsys=cxux
660 xps*-honeywell-sysv* )
661 machine=xps100 opsys=usg5-2
664 ## HP 9000 series 200 or 300
666 machine=hp9000s300 opsys=bsd4-3
669 machine=hp9000s300 opsys=netbsd
671 ## HP/UX 7, 8 and 9 are supported on these machines.
674 ## Someone's system reports A.B8.05 for this.
675 ## I wonder what other possibilities there are.
676 *.B8.* ) machine=hp9000s300 opsys=hpux8 ;;
677 *.08.* ) machine=hp9000s300 opsys=hpux8 ;;
678 *.09.* ) machine=hp9000s300 opsys=hpux9 ;;
679 *) machine=hp9000s300 opsys=hpux ;;
683 ## HP 9000 series 700 and 800, running HP/UX
685 machine=hp800 opsys=hpux
688 machine=hp800 opsys=hpux8
691 machine=hp800 opsys=hpux9
694 machine=hp800 opsys=hpux9shr
697 ## HP 9000 series 700 and 800, running HP/UX
699 ## Cross-compilation? Nah!
701 ## Someone's system reports A.B8.05 for this.
702 ## I wonder what other possibilities there are.
703 *.B8.* ) machine=hp800 opsys=hpux8 ;;
704 *.08.* ) machine=hp800 opsys=hpux8 ;;
705 *.09.* ) machine=hp800 opsys=hpux9 ;;
706 *) machine=hp800 opsys=hpux ;;
712 machine=orion opsys=bsd4-2
715 machine=orion105 opsys=bsd4-2
720 machine=ibmps2-aix opsys=usg5-2-2
722 i386-ibm-aix1.[23]* | i386-ibm-aix* )
723 machine=ibmps2-aix opsys=usg5-3
726 machine=ibm370aix opsys=usg5-3
729 machine=ibmrs6000 opsys=aix3-1
732 machine=ibmrs6000 opsys=aix3-2-5
734 rs6000-ibm-aix3.2* | rs6000-ibm-aix* )
735 machine=ibmrs6000 opsys=aix3-2
738 machine=ibmrt opsys=bsd4-3
741 machine=ibmrt opsys=bsd4-2
744 machine=ibmrt opsys=bsd4-3
747 machine=ibmrt opsys=bsd4-2
750 machine=ibmrt opsys=bsd4-3
753 machine=ibmrt opsys=bsd4-3
756 machine=ibmrt-aix opsys=usg5-2-2
759 ## Integrated Solutions `Optimum V'
761 machine=isi-ov opsys=bsd4-2
764 machine=isi-ov opsys=bsd4-3
767 ## Intel 386 machines where we do care about the manufacturer
768 i[34]86-intsys-sysv* )
769 machine=is386 opsys=usg5-2-2
774 machine=i386 opsys=usg5-3
779 machine=symmetry opsys=bsd4-3
782 ## Unspecified sysv on an ncr machine defaults to svr4.2.
783 ## (Plain usg5-4 doesn't turn on POSIX signals, which we need.)
785 machine=intel386 opsys=usg5-4-2
790 machine=i860 opsys=usg5-4
795 machine=masscomp opsys=rtu
800 machine=mega68 opsys=bsd4-2
803 ## Workstations sold by MIPS
804 ## This is not necessarily all workstations using the MIPS processor -
805 ## Irises are produced by SGI, and DECstations by DEC.
807 ## etc/MACHINES lists mips.h and mips4.h as possible machine files,
808 ## and usg5-2-2 and bsd4-3 as possible OS files. The only guidance
809 ## it gives for choosing between the alternatives seems to be "Use
810 ## -machine=mips4 for RISCOS version 4; use -opsystem=bsd4-3 with
811 ## the BSD world." I'll assume that these are instructions for
812 ## handling two odd situations, and that every other situation
813 ## should use mips.h and usg5-2-2, they being listed first.
816 ## Fall through to the general code at the bottom to decide on the OS.
819 machine=mips4 opsys=bsd4-3
820 NON_GNU_CC="cc -systype bsd43"
821 NON_GNU_CPP="cc -systype bsd43 -E"
824 machine=mips opsys=bsd4-3
827 machine=mips opsys=usg5-2-2
832 machine=next opsys=mach2
835 ## The complete machine from National Semiconductor
837 machine=ns32000 opsys=usg5-2
841 m68*-ncr-sysv2* | m68*-ncr-sysvr2* )
842 machine=tower32 opsys=usg5-2-2
844 m68*-ncr-sysv3* | m68*-ncr-sysvr3* )
845 machine=tower32v3 opsys=usg5-3
850 machine=targon31 opsys=usg5-2-2
855 machine=nu opsys=usg5-2
860 machine=plexus opsys=usg5-2
864 ## I don't really have any idea what sort of processor the Pyramid has,
865 ## so I'm assuming it is its own architecture.
866 pyramid-pyramid-bsd* )
867 machine=pyramid opsys=bsd4-2
871 ns32k-sequent-bsd4.2* )
872 machine=sequent opsys=bsd4-2
874 ns32k-sequent-bsd4.3* )
875 machine=sequent opsys=bsd4-3
880 machine=mips-siemens opsys=usg5-4
881 NON_GNU_CC=/usr/ccs/bin/cc
882 NON_GNU_CPP="/usr/ccs/bin/cc -E"
885 ## Silicon Graphics machines
886 ## Iris 2500 and Iris 2500 Turbo (aka the Iris 3030)
888 machine=irist opsys=iris3-5
890 m68*-sgi-iris3.6* | m68*-sgi-iris*)
891 machine=irist opsys=iris3-6
895 machine=iris4d opsys=irix3-3
898 machine=iris4d opsys=irix5-0
900 mips-sgi-irix4.* | mips-sgi-irix* )
901 machine=iris4d opsys=irix4-0
906 machine=news opsys=bsd4-2
909 machine=news opsys=bsd4-3
912 machine=news opsys=bsd4-3
915 machine=news-risc opsys=bsd4-3
918 machine=mips opsys=newsos5
923 machine=stride opsys=usg5-2
927 *-sun-sunos* | *-sun-bsd* | *-sun-solaris* )
928 case "${canonical}" in
929 m68*-sunos1* ) machine=sun1 ;;
930 m68*-sunos2* ) machine=sun2 ;;
931 m68* ) machine=sun3 ;;
932 i[34]86* ) machine=sun386 ;;
933 sparc* ) machine=sparc ;;
936 case "${canonical}" in
937 ## The Sun386 didn't get past 4.0.
938 i386-*-sunos4 ) opsys=sunos4-0 ;;
939 *-sunos4.0* ) opsys=sunos4-0 ;;
940 *-sunos4.1.3* ) opsys=sunos4-1-3
941 NON_GCC_TEST_OPTIONS=-Bstatic
942 GCC_TEST_OPTIONS=-static
944 *-sunos4shr* ) opsys=sunos4shr ;;
945 *-sunos4* | *-sunos ) opsys=sunos4-1 ;;
946 *-sunos5.3* | *-solaris2.3* )
948 NON_GNU_CPP=/usr/ccs/lib/cpp
950 *-sunos5* | *-solaris* )
952 NON_GNU_CPP=/usr/ccs/lib/cpp
960 machine=tad68k opsys=usg5-3
964 tahoe-tahoe-bsd4.2* )
965 machine=tahoe opsys=bsd4-2
967 tahoe-tahoe-bsd4.3* )
968 machine=tahoe opsys=bsd4-3
971 ## Tandem Integrity S2
973 machine=tandem-s2 opsys=usg5-3
977 m88k-tektronix-sysv3* )
978 machine=tekxd88 opsys=usg5-3
981 ## Tektronix 16000 box (6130?)
982 ns16k-tektronix-bsd* )
983 machine=ns16000 opsys=bsd4-2
986 ## src/m/tek4300.h hints that this is a m68k machine.
987 m68*-tektronix-bsd* )
988 machine=tek4300 opsys=bsd4-3
992 ## We seem to have lost the machine-description file titan.h!
994 machine=titan opsys=usg5-3
997 ## Ustation E30 (SS5E)
998 m68*-unisys-uniplus* )
999 machine=ustation opsystem=unipl5-2
1005 case "${canonical}" in
1006 *-bsd4.1* ) opsys=bsd4-1 ;;
1007 *-bsd4.2* | *-ultrix[0-3].* | *-ultrix4.0* ) opsys=bsd4-2 ;;
1008 *-bsd4.3* | *-ultrix* ) opsys=bsd4-3 ;;
1009 *-bsd386* ) opsys=bsd386 ;;
1010 *-sysv[01]* | *-sysvr[01]* ) opsys=usg5-0 ;;
1011 *-sysv2* | *-sysvr2* ) opsys=usg5-2 ;;
1012 *-vms* ) opsys=vms ;;
1018 ns16k-whitechapel-* )
1020 ## We don't know what sort of OS runs on these; we'll let the
1021 ## operating system guessing code below try.
1026 machine=wicat opsys=usg5-2
1029 ## Intel 386 machines where we don't care about the manufacturer
1032 case "${canonical}" in
1033 *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
1034 *-isc2.2* ) opsys=isc2-2 ;;
1035 *-isc4.0* ) opsys=isc4-0 ;;
1036 *-isc* ) opsys=isc3-0 ;;
1037 *-esix5* ) opsys=esix5r4; NON_GNU_CPP=/usr/lib/cpp ;;
1038 *-esix* ) opsys=esix ;;
1039 *-xenix* ) opsys=xenix ;;
1040 *-linux* ) opsys=linux ;;
1041 *-sco3.2v4* ) opsys=sco4 ;;
1042 *-bsd386* ) opsys=bsd386 ;;
1043 *-386bsd* ) opsys=386bsd ;;
1044 *-freebsd* ) opsys=freebsd ;;
1045 *-netbsd* ) opsys=netbsd ;;
1046 *-nextstep* ) opsys=mach2 ;;
1047 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
1056 ### If the code above didn't choose an operating system, just choose
1057 ### an operating system based on the configuration name. You really
1058 ### only want to use this when you have no idea what the right
1059 ### operating system is; if you know what operating systems a machine
1060 ### runs, it's cleaner to make it explicit in the case statement
1062 if [ x"${opsys}" = x ]; then
1063 case "${canonical}" in
1064 *-gnu* ) opsys=gnu ;;
1065 *-bsd4.[01] ) opsys=bsd4-1 ;;
1066 *-bsd4.2 ) opsys=bsd4-2 ;;
1067 *-bsd4.3 ) opsys=bsd4-3 ;;
1068 *-sysv0 | *-sysvr0 ) opsys=usg5-0 ;;
1069 *-sysv2 | *-sysvr2 ) opsys=usg5-2 ;;
1070 *-sysv2.2 | *-sysvr2.2 ) opsys=usg5-2-2 ;;
1071 *-sysv3 | *-sysvr3 ) opsys=usg5-3 ;;
1072 *-sysv4 | *-sysvr4 ) opsys=usg5-4 ;;
1073 *-sysv4.1 | *-sysvr4.1 )
1074 NON_GNU_CPP=/usr/lib/cpp
1076 *-sysv4.2 | *-sysvr4.2 ) opsys=usg5-4-2 ;;
1084 (echo "${progname}: Emacs hasn't been ported to \`${canonical}' systems."
1085 echo "${progname}: Check \`etc/MACHINES' for recognized configuration names."
1090 machfile="m/${machine}.h"
1091 opsysfile="s/${opsys}.h"
1095 AC_CONFIG_HEADER(src/config.h)
1098 #### Choose a compiler.
1105 "yes" ) CC="gcc" GCC=1 ;;
1116 #### Some systems specify a CPP to use unless we are using GCC.
1117 #### Now that we know whether we are using GCC, we can decide whether
1118 #### to use that one.
1119 if [ "x$NON_GNU_CPP" = x ] || [ x$GCC = x1 ] || [ "x$CPP" != x ]
1125 #### Some systems specify a CC to use unless we are using GCC.
1126 #### Now that we know whether we are using GCC, we can decide whether
1127 #### to use that one.
1128 if [ "x$NON_GNU_CC" = x ] || [ x$GCC = x1 ] || [ x$cc_specified = x1 ]
1134 if [ x$GCC = x1 ] && [ "x$GCC_TEST_OPTIONS" != x ]
1136 CC="$CC $GCC_TEST_OPTIONS"
1139 if [ x$GCC = x ] && [ "x$NON_GCC_TEST_OPTIONS" != x ]
1141 CC="$CC $NON_GCC_TEST_OPTIONS"
1144 #### Some other nice autoconf tests. If you add a test here which
1145 #### should make an entry in src/config.h, don't forget to add an
1146 #### #undef clause to src/config.h.in for autoconf to modify.
1148 dnl checks for programs
1154 dnl checks for UNIX variants that set `DEFS'
1156 dnl checks for header files
1157 AC_HAVE_HEADERS(sys/timeb.h sys/time.h unistd.h)
1159 AC_TIME_WITH_SYS_TIME
1160 dnl In Autoconf 1.8 use AC_SYS_SIGLIST_DECLARED instead of this.
1161 AC_COMPILE_CHECK(sys_siglist declaration in signal.h or unistd.h,
1162 [#include <signal.h>
1163 /* NetBSD declares sys_siglist in <unistd.h>. */
1164 #ifdef HAVE_UNISTD_H
1166 #endif], [char *msg = *(sys_siglist + 1);],
1167 AC_DEFINE(SYS_SIGLIST_DECLARED))
1169 dnl checks for typedefs
1172 dnl checks for structure members
1176 dnl checks for compiler characteristics
1179 dnl check for Make feature
1182 dnl checks for operating system services
1185 dnl other checks for UNIX variants
1188 #### Choose a window system.
1189 echo "Checking window system."
1194 window_system=${window_system}x11
1197 window_system=${window_system}none
1200 case "${window_system}" in
1204 case "${with_x11}" in
1212 case "${with_x10}" in
1223 case "${window_system}" in
1224 "none" | "x11" | "x10" ) ;;
1226 # --x-includes or --x-libraries implies --with-x11.
1227 if [ -n "${x_includes}" ] || [ -n "${x_libraries}" ]; then
1230 echo " No window system specified. Looking for X11."
1231 # If the user didn't specify a window system and we found X11, use it.
1232 if [ -r /usr/lib/libX11.a \
1233 -o -d /usr/include/X11 \
1234 -o -d /usr/X386/include \
1235 -o -d ${x_includes}/X11 ]; then
1241 echo "Don't specify a window system more than once." >&2
1246 case "${window_system}" in
1248 ### If the user hasn't specified where we should find X, try
1249 ### letting autoconf figure that out.
1250 if [ -z "${x_includes}" ] && [ -z "${x_libraries}" ]; then
1255 if [ -n "${x_includes}" ] || [ -n "${x_libraries}" ]; then
1261 [ -z "${window_system}" ] && window_system=none
1263 [ -n "${x_libraries}" ] && LD_SWITCH_X_SITE="-L${x_libraries}"
1264 [ -n "${x_libraries}" ] && LD_SWITCH_X_SITE_AUX="-R${x_libraries}"
1265 [ -n "${x_includes}" ] && C_SWITCH_X_SITE="-I${x_includes}"
1267 # Avoid forcing the search of /usr/include before fixed include files.
1268 if [ "$C_SWITCH_X_SITE" = "-I/usr/include" ]; then
1272 case "${window_system}" in
1277 case "${with_x_toolkit}" in
1280 echo " Using Xt toolkit."
1284 echo " Using Motif toolkit."
1287 USE_X_TOOLKIT=OPEN_LOOK
1288 echo " Using Open-Look toolkit."
1292 echo " Using Xlib directly."
1306 echo " Using no window system."
1309 X_TOOLKIT_TYPE=$USE_X_TOOLKIT
1311 ### If we're using X11, we should use the X menu package.
1319 #### Extract some information from the operating system and machine files.
1321 echo "Examining the machine- and system-dependent files to find out"
1322 echo " - which libraries the lib-src programs will want, and"
1323 echo " - whether the GNU malloc routines are usable."
1325 ### It's not important that this name contain the PID; you can't run
1326 ### two configures in the same directory and have anything work
1328 tempcname="conftest.c"
1331 #include "'${srcdir}'/src/'${opsysfile}'"
1332 #include "'${srcdir}'/src/'${machfile}'"
1333 #ifndef LIBS_MACHINE
1334 #define LIBS_MACHINE
1339 #ifndef C_SWITCH_SYSTEM
1340 #define C_SWITCH_SYSTEM
1342 #ifndef C_SWITCH_MACHINE
1343 #define C_SWITCH_MACHINE
1345 configure___ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM
1346 configure___ c_switch_system=C_SWITCH_SYSTEM
1347 configure___ c_switch_machine=C_SWITCH_MACHINE
1350 #define LIB_X11_LIB -lX11
1353 #ifndef LIBX11_MACHINE
1354 #define LIBX11_MACHINE
1357 #ifndef LIBX11_SYSTEM
1358 #define LIBX11_SYSTEM
1360 configure___ LIBX=LIB_X11_LIB LIBX11_MACHINE LIBX11_SYSTEM
1363 configure___ unexec=UNEXEC
1365 configure___ unexec=unexec.o
1368 #ifdef SYSTEM_MALLOC
1369 configure___ system_malloc=yes
1371 configure___ system_malloc=no
1374 #ifndef C_DEBUG_SWITCH
1375 #define C_DEBUG_SWITCH -g
1378 #ifndef C_OPTIMIZE_SWITCH
1379 #define C_OPTIMIZE_SWITCH -O
1383 configure___ CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${CFLAGS}'
1385 configure___ CFLAGS=C_DEBUG_SWITCH '${CFLAGS}'
1388 # The value of CPP is a quoted variable reference, so we need to do this
1389 # to get its actual value...
1390 CPP=`eval "echo $CPP"`
1391 eval `${CPP} -Isrc ${tempcname} \
1392 | grep 'configure___' \
1393 | sed -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/'`
1396 ### Compute the unexec source name from the object name.
1397 UNEXEC_SRC="`echo ${unexec} | sed 's/\.o/.c/'`"
1399 # Do the opsystem or machine files prohibit the use of the GNU malloc?
1400 # Assume not, until told otherwise.
1402 if [ "${system_malloc}" = "yes" ]; then
1405 (The GNU allocators don't work with this system configuration.)"
1408 if [ x"${REL_ALLOC}" = x ]; then
1409 REL_ALLOC=${GNU_MALLOC}
1415 #### Add the libraries to LIBS and check for some functions.
1418 DEFS="$c_switch_system $c_switch_machine $DEFS"
1421 dnl If found, this defines HAVE_LIBDNET, which m/pmax.h checks,
1422 dnl and also adds -ldnet to LIBS, which Autoconf uses for checks.
1423 AC_HAVE_LIBRARY(-ldnet)
1424 dnl This causes -lresolv to get used in subsequent tests,
1425 dnl which causes failures on some systems such as HPUX 9.
1426 dnl AC_HAVE_LIBRARY(-lresolv)
1428 AC_HAVE_LIBRARY(-lXbsd, LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd")
1430 echo checking for XFree86
1431 if test -d /usr/X386/include; then
1433 test -z "${C_SWITCH_X_SITE}" && C_SWITCH_X_SITE="-I/usr/X386/include"
1436 # We change CFLAGS temporarily so that C_SWITCH_X_SITE gets used
1437 # for the tests that follow.
1438 orig_cflags="$CFLAGS"
1440 if test "${HAVE_X11}" = "yes"; then
1441 DEFS="$C_SWITCH_X_SITE $DEFS"
1442 LIBS="$LD_SWITCH_X_SITE $LIBX $LIBS"
1443 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
1444 AC_HAVE_FUNCS(XrmSetDatabase XScreenResourceString \
1445 XScreenNumberOfScreen XSetWMProtocols)
1448 if test "${USE_X_TOOLKIT}" != "none"; then
1449 AC_COMPILE_CHECK(X11 toolkit version,
1450 [#include <X11/Intrinsic.h>],
1452 #if XtSpecificationRelease < 6
1456 AC_DEFINE(HAVE_X11XTR6))
1461 # logb and frexp are found in -lm on most systems.
1462 AC_HAVE_LIBRARY(-lm)
1463 AC_HAVE_FUNCS(gettimeofday gethostname dup2 rename closedir mkdir rmdir \
1464 random bcopy bcmp logb frexp fmod drem ftime res_init setsid strerror \
1468 AC_FUNC_CHECK(socket, , ok_so_far=)
1469 if test -n "$ok_so_far"; then
1470 AC_HEADER_CHECK(netinet/in.h, , ok_so_far=)
1472 if test -n "$ok_so_far"; then
1473 AC_HEADER_CHECK(arpa/inet.h, , ok_so_far=)
1475 if test -n "$ok_so_far"; then
1476 AC_DEFINE(HAVE_INET_SOCKETS)
1479 # Restore the original CFLAGS value.
1480 CFLAGS="$orig_cflags"
1483 #### Find out which version of Emacs this is.
1484 version=`grep 'defconst[ ]*emacs-version' ${srcdir}/lisp/version.el \
1485 | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`
1486 if [ x"${version}" = x ]; then
1487 echo "${progname}: can't find current emacs version in
1488 \`${srcdir}/lisp/version.el'." >&2
1492 if [ -f /usr/lpp/X11/bin/smt.exp ]; then
1494 AC_DEFINE(HAVE_AIX_SMT_EXP)
1498 #### Specify what sort of things we'll be editing into Makefile and config.h.
1499 ### Use configuration here uncanonicalized to avoid exceeding size limits.
1502 AC_SUBST(configuration)
1505 AC_SUBST(exec_prefix)
1513 AC_SUBST(locallisppath)
1517 AC_SUBST(archlibdir)
1519 AC_SUBST(c_switch_system)
1520 AC_SUBST(c_switch_machine)
1521 AC_SUBST(LD_SWITCH_X_SITE)
1522 AC_SUBST(LD_SWITCH_X_SITE_AUX)
1523 AC_SUBST(C_SWITCH_X_SITE)
1525 AC_SUBST(X_TOOLKIT_TYPE)
1529 AC_DEFINE_UNQUOTED(EMACS_CONFIGURATION, "\"${configuration}\"")
1530 AC_DEFINE_UNQUOTED(config_machfile, "\"${machfile}\"")
1531 AC_DEFINE_UNQUOTED(config_opsysfile, "\"${opsysfile}\"")
1532 AC_DEFINE_UNQUOTED(LD_SWITCH_X_SITE, ${LD_SWITCH_X_SITE})
1533 AC_DEFINE_UNQUOTED(LD_SWITCH_X_SITE_AUX, ${LD_SWITCH_X_SITE_AUX})
1534 AC_DEFINE_UNQUOTED(C_SWITCH_X_SITE, ${C_SWITCH_X_SITE})
1535 AC_DEFINE_UNQUOTED(UNEXEC_SRC, ${UNEXEC_SRC})
1538 if [ "${HAVE_X_WINDOWS}" = "yes" ] ; then
1539 ] AC_DEFINE(HAVE_X_WINDOWS) [
1541 if [ "${USE_X_TOOLKIT}" != "none" ] ; then
1542 ] AC_DEFINE(USE_X_TOOLKIT) [
1544 if [ "${HAVE_X11}" = "yes" ] ; then
1545 ] AC_DEFINE(HAVE_X11) [
1547 if [ "${HAVE_XFREE386}" = "yes" ] ; then
1548 ] AC_DEFINE(HAVE_XFREE386) [
1550 if [ "${HAVE_X_MENU}" = "yes" ] ; then
1551 ] AC_DEFINE(HAVE_X_MENU) [
1553 if [ "${GNU_MALLOC}" = "yes" ] ; then
1554 ] AC_DEFINE(GNU_MALLOC) [
1556 if [ "${REL_ALLOC}" = "yes" ] ; then
1557 ] AC_DEFINE(REL_ALLOC) [
1559 if [ "${LISP_FLOAT_TYPE}" = "yes" ] ; then
1560 ] AC_DEFINE(LISP_FLOAT_TYPE) [
1563 # ====================== Developer's configuration =======================
1565 # The following assignments make sense if you're running Emacs on a single
1566 # machine, one version at a time, and you want changes to the lisp and etc
1567 # directories in the source tree to show up immediately in your working
1568 # environment. It saves a great deal of disk space by not duplicating the
1569 # lisp and etc directories.
1571 if [ "$run_in_place" = "1" ]; then
1572 lispdir='${srcdir}/lisp'
1573 locallisppath='${srcdir}/site-lisp'
1574 etcdir='${srcdir}/etc'
1575 lockdir='${srcdir}/lock'
1576 # We used to make archlibdir and docdir absolute,
1577 # but that caused trouble with automounters.
1578 archlibdir='${srcdir}/lib-src'
1579 docdir='${srcdir}/etc'
1580 infodir='${srcdir}/info'
1581 elif [ "$single_tree" = "1" ]; then
1582 if [ "$exec_prefix_specified" = "" ]; then
1583 exec_prefix='${prefix}'
1585 if [ "$bindir_specified" = "" ]; then
1586 bindir='${exec_prefix}/bin/${configuration}'
1588 if [ "$datadir_specified" = "" ]; then
1589 datadir='${prefix}/common'
1591 if [ "$statedir_specified" = "" ]; then
1592 statedir='${prefix}/common'
1594 if [ "$libdir_specified" = "" ]; then
1597 if [ "$lispdir_specified" = "" ]; then
1598 lispdir='${prefix}/common/lisp'
1600 if [ "$locallisppath_specified" = "" ]; then
1601 locallisppath='${prefix}/common/site-lisp'
1603 if [ "$lockdir_specified" = "" ]; then
1604 lockdir='${prefix}/common/lock'
1606 if [ "$archlibdir_specified" = "" ]; then
1607 archlibdir='${libdir}/etc'
1609 if [ "$etcdir_specified" = "" ]; then
1610 etcdir='${prefix}/common/data'
1612 if [ "$docdir_specified" = "" ]; then
1613 docdir='${prefix}/common/data'
1617 #### Report on what we decided to do.
1620 Configured for \`${canonical}'.
1622 Where should the build process find the source code? ${srcdir}
1623 What operating system and machine description files should Emacs use?
1624 \`${opsysfile}' and \`${machfile}'
1625 What compiler should emacs be built with? ${CC} ${CFLAGS}
1626 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
1627 Should Emacs use the relocating allocator for buffers? ${REL_ALLOC}
1628 What window system should Emacs use? ${window_system}
1629 What toolkit should Emacs use? ${USE_X_TOOLKIT}${x_includes+
1630 Where do we find X Windows header files? }${x_includes}${x_libraries+
1631 Where do we find X Windows libraries? }${x_libraries}
1635 # Remove any trailing slashes in these variables.
1636 test -n "${prefix}" &&
1637 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
1638 test -n "${exec_prefix}" &&
1639 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
1641 AC_OUTPUT(Makefile lib-src/Makefile.in oldXMenu/Makefile lwlib/Makefile src/Makefile.in, [
1643 # Build src/Makefile from ${srcdir}/src/Makefile.in. This must be done
1644 # after src/config.h is built, since we rely on that file.
1646 changequote(,)dnl The horror, the horror.
1647 # Now get this: Some word that is part of the ${srcdir} directory name
1648 # or the ${configuration} value might, just might, happen to be an
1649 # identifier like `sun4' or `i386' or something, and be predefined by
1650 # the C preprocessor to some helpful value like 1, or maybe the empty
1651 # string. Needless to say consequent macro substitutions are less
1652 # than conducive to the makefile finding the correct directory.
1653 undefs="`echo $top_srcdir $configuration $canonical |
1654 sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/ *$//' \
1655 -e 's/ */ -U/g' -e 's/-U[0-9][^ ]*//g' \
1659 echo creating lib-src/Makefile
1661 rm -f junk.c junk1.c junk2.c
1662 sed -e '/start of cpp stuff/q' \
1663 < Makefile.in > junk1.c
1664 sed -e '1,/start of cpp stuff/d'\
1665 -e 's@/\*\*/#\(.*\)$@/* \1 */@' \
1666 < Makefile.in > junk.c
1667 $CPP $undefs -I. -I$top_srcdir/src $CPPFLAGS junk.c | \
1668 sed -e 's/^ / /' -e '/^#/d' -e '/^[
\f]*$/d' > junk2.c
1669 cat junk1.c junk2.c > Makefile.new
1670 rm -f junk.c junk1.c junk2.c
1671 chmod 444 Makefile.new
1672 mv -f Makefile.new Makefile
1675 echo creating src/Makefile
1677 rm -f junk.c junk1.c junk2.c
1678 sed -e '/start of cpp stuff/q' \
1679 < Makefile.in > junk1.c
1680 sed -e '1,/start of cpp stuff/d'\
1681 -e 's@/\*\*/#\(.*\)$@/* \1 */@' \
1682 < Makefile.in > junk.c
1683 $CPP $undefs -I. -I$top_srcdir/src $CPPFLAGS junk.c | \
1684 sed -e 's/^ / /' -e '/^#/d' -e '/^[
\f]*$/d' > junk2.c
1685 cat junk1.c junk2.c > Makefile.new
1686 rm -f junk.c junk1.c junk2.c
1687 chmod 444 Makefile.new
1688 mv -f Makefile.new Makefile