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.7 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='${libdir}/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?
201 ## Make sure the value given was either "yes" or "no".
203 y | ye | yes ) val=athena ;;
205 l | lu | luc | luci | lucid ) val=lucid ;;
206 a | at | ath | athe | athena ) val=athena ;;
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 ;;
211 (echo "${progname}: the \`--${optname}' option is supposed to have a value
212 which is \`yes', \`no', \`lucid', \`athena', \`motif' or \`open-look'."
213 echo "${short_usage}") >&2
217 eval "${opt}=\"${val}\""
220 ## Has the user specified whether or not they want GCC?
221 "with_gcc" | "with_gnu_cc" )
222 ## Make sure the value given was either "yes" or "no".
224 y | ye | yes ) val=yes ;;
227 (echo "${progname}: the \`--${optname}' option is supposed to have a boolean value.
228 Set it to either \`yes' or \`no'."
229 echo "${short_usage}") >&2
233 eval "${opt}=\"${val}\""
236 ## Has the user specified a source directory?
238 ## If the value was omitted, get it from the next argument.
239 if [ "${valomitted}" = "yes" ]; then
240 ## Get the next argument from the argument list, if there is one.
242 (echo "${progname}: You must give a value for the \`--${optname}' option, as in
243 \`--${optname}=FOO'."
244 echo "${short_usage}") >&2
252 ## Has the user tried to tell us where the X files are?
253 ## I think these are dopey, but no less than three alpha
254 ## testers, at large sites, have said they have their X files
255 ## installed in odd places.
257 ## If the value was omitted, get it from the next argument.
258 if [ "${valomitted}" = "yes" ]; then
259 ## Get the next argument from the argument list, if there is one.
261 (echo "${progname}: You must give a value for the \`--${optname}' option, as in
262 \`--${optname}=/usr/local/X11/include'."
263 echo "${short_usage}") >&2
271 ## If the value was omitted, get it from the next argument.
272 if [ "${valomitted}" = "yes" ]; then
273 ## Get the next argument from the argument list, if there is one.
275 (echo "${progname}: You must give a value for the \`--${optname}' option, as in
276 \`--${optname}=/usr/local/X11/lib'."
277 echo "${short_usage}") >&2
285 ## Should this use the "development configuration"?
291 ## Should this use the "single tree" configuration?
297 ## Has the user specified one of the path options?
298 prefix | exec_prefix | bindir | libdir | etcdir | datadir | \
299 archlibdir | statedir | mandir | infodir | lispdir | lockdir | \
300 lisppath | locallisppath | docdir )
301 ## If the value was omitted, get it from the next argument.
302 if [ "${valomitted}" = "yes" ]; then
305 "$progname: You must give a value for the \`--${optname}' option,";
307 "as in \`--${optname}=`eval echo '$'$optname`.'"
308 echo "$short_usage") >&2
313 eval "${opt}=\"${val}\""
314 eval "${opt}_specified=1"
317 ## Verbose flag, tested by autoconf macros.
322 ## Has the user asked for some help?
326 echo "${short_usage}" | more
328 echo "${short_usage}" | $PAGER
333 ## We ignore all other options silently.
337 ## Anything not starting with a hyphen we assume is a
338 ## configuration name.
346 ### Get the arguments back. See the diatribe on Shell Magic above.
347 eval set x "$quoted_arguments"; shift
349 if [ "${configuration}" = "" ]; then
350 echo '- You did not tell me what kind of host system you want to configure.
351 - I will attempt to guess the kind of system this is.' 1>&2
352 guesssys=`echo ${progname} | sed 's/configure$/config.guess/'`
353 if configuration=`${guesssys}` ; then
354 echo "- Looks like this is a ${configuration}" 1>&2
356 echo '- Failed to guess the system type. You need to tell me.' 1>&2
357 echo "${short_usage}" >&2
362 #### Decide where the source is.
365 ## If it's not specified, see if `.' or `..' might work.
367 confdir=`echo $0 | sed 's|//|/|' | sed 's|/[^/]*$||'`
368 if [ -f $confdir/src/lisp.h -a -f $confdir/lisp/version.el ]; then
371 if [ -f "./src/lisp.h" -a -f "./lisp/version.el" ]; then
374 if [ -f "../src/lisp.h" -a -f "../lisp/version.el" ]; then
378 ${progname}: Neither the current directory nor its parent seem to
379 contain the Emacs sources. If you do not want to build Emacs in its
380 source tree, you should run \`${progname}' in the directory in which
381 you wish to build Emacs, using its \`--srcdir' option to say where the
382 sources may be found."
383 echo "${short_usage}") >&2
390 ## Otherwise, check if the directory they specified is okay.
392 if [ ! -d "${srcdir}" -o ! -f "${srcdir}/src/lisp.h" -o ! -f "${srcdir}/lisp/version.el" ]; then
394 ${progname}: The directory specified with the \`--srcdir' option,
395 \`${srcdir}', doesn't seem to contain the Emacs sources. You should
396 either run the \`${progname}' script at the top of the Emacs source
397 tree, or use the \`--srcdir' option to specify where the Emacs sources
399 echo "${short_usage}") >&2
405 #### Make srcdir absolute, if it isn't already. It's important to
406 #### avoid running the path through pwd unnecessary, since pwd can
407 #### give you automounter prefixes, which can go away.
411 ## We may be able to use the $PWD environment variable to make this
412 ## absolute. But sometimes PWD is inaccurate.
413 if [ "${PWD}" != "" ] && [ "`(cd ${PWD} ; sh -c pwd)`" = "`pwd`" ] ; then
416 srcdir="`(cd ${srcdir}; pwd)`"
419 * ) srcdir="`(cd ${srcdir}; pwd)`" ;;
422 #### Check if the source directory already has a configured system in it.
423 if [ `pwd` != `(cd ${srcdir} && pwd)` ] \
424 && [ -f "${srcdir}/src/config.h" ] ; then
425 (echo "${progname}: WARNING: The directory tree \`${srcdir}' is being used"
426 echo " as a build directory right now; it has been configured in its own"
427 echo " right. To configure in another directory as well, you MUST"
428 echo " use GNU make. If you do not have GNU make, then you must"
429 echo " now do \`make distclean' in ${srcdir},"
430 echo " and then run ${progname} again.") >&2
431 extrasub='/^VPATH[ ]*=/c\
437 vpath %.in $(srcdir)'
440 ### Make the necessary directories, if they don't exist.
441 for dir in ./src ./lib-src ./cpp ./oldXMenu ./lwlib ./etc ; do
442 if [ ! -d ${dir} ]; then
447 #### Given the configuration name, set machfile and opsysfile to the
448 #### names of the m/*.h and s/*.h files we should use.
450 ### Canonicalize the configuration name.
451 echo "Checking the configuration name."
452 if canonical=`${srcdir}/config.sub "${configuration}"` ; then : ; else
456 ### If you add support for a new configuration, add code to this
457 ### switch statement to recognize your configuration name and select
458 ### the appropriate operating system and machine description files.
460 ### You would hope that you could choose an m/*.h file pretty much
461 ### based on the machine portion of the configuration name, and an s-
462 ### file based on the operating system portion. However, it turns out
463 ### that each m/*.h file is pretty manufacturer-specific - for
464 ### example, apollo.h, hp9000s300.h, mega68k, news.h, and tad68k are
465 ### all 68000 machines; mips.h, pmax.h, and news-risc are all MIPS
466 ### machines. So we basically have to have a special case for each
467 ### configuration name.
469 ### As far as handling version numbers on operating systems is
470 ### concerned, make sure things will fail in a fixable way. If
471 ### /etc/MACHINES doesn't say anything about version numbers, be
472 ### prepared to handle anything reasonably. If version numbers
473 ### matter, be sure /etc/MACHINES says something about it.
475 ### Eric Raymond says we should accept strings like "sysvr4" to mean
476 ### "System V Release 4"; he writes, "The old convention encouraged
477 ### confusion between `system' and `release' levels'."
479 machine='' opsys='' unported='false'
480 case "${canonical}" in
483 ## Strictly speaking, we need the version of the alliant operating
484 ## system to choose the right machine file, but currently the
485 ## configuration name doesn't tell us enough to choose the right
486 ## one; we need to give alliants their own operating system name to
487 ## do this right. When someone cares, they can help us.
489 machine=alliant4 opsys=bsd4-2
492 machine=alliant-2800 opsys=bsd4-3
497 machine=altos opsys=usg5-2
502 machine=amdahl opsys=usg5-2-2
505 ## Appallings - I mean, Apollos - running Domain
507 machine=apollo opsys=bsd4-2
510 ## AT&T 3b2, 3b5, 3b15, 3b20
512 machine=att3b opsys=usg5-2-2
515 ## AT&T 3b1 - The Mighty Unix PC!
517 machine=7300 opsys=usg5-2-2
522 machine=ibmrs6000 opsys=aix3-2
527 machine=dpx2 opsys=usg5-3
532 machine=sps7 opsys=usg5-2
535 ## CCI 5/32, 6/32 -- see "Tahoe".
538 ## I don't know what configuration name to use for this; config.sub
539 ## doesn't seem to know anything about it. Hey, Celerity users, get
541 celerity-celerity-bsd* )
542 machine=celerity opsys=bsd4-2
546 ## What operating systems does this chip run that Emacs has been
550 ## We'll use the catch-all code at the bottom to guess the
556 machine=convex opsys=bsd4-3
561 machine=intel386 opsys=usg5-3
565 cydra*-cydrome-sysv* )
566 machine=cydra5 opsys=usg5-3
569 ## Data General AViiON Machines
571 machine=aviion opsys=dgux
575 mips-dec-ultrix[0-3].* | mips-dec-ultrix4.0* | mips-dec-bsd4.2* )
576 machine=pmax opsys=bsd4-2
578 mips-dec-ultrix* | mips-dec-bsd* )
579 machine=pmax opsys=bsd4-3
582 machine=pmax opsys=osf1
585 ## Motorola Delta machines
586 m68k-motorola-sysv* | m68000-motorola-sysv* )
587 machine=delta opsys=usg5-3
588 if [ -z "`type gnucc | grep 'not found'`" ]
591 if [ -z "`type gcc | grep 'not found'`" ]
597 m88k-motorola-sysv4* )
598 machine=delta88k opsys=usg5-4
600 m88k-motorola-sysv* | m88k-motorola-m88kbcs* )
601 machine=delta88k opsys=usg5-3
606 machine=dual opsys=usg5-2
609 machine=dual opsys=unipl5-2
614 machine=elxsi opsys=usg5-2
619 machine=ns16000 opsys=umax
622 ## The GEC 93 - apparently, this port isn't really finished yet.
624 ## Gould Power Node and NP1
626 machine=gould opsys=bsd4-2
629 machine=gould opsys=bsd4-3
632 machine=gould-np1 opsys=bsd4-3
635 ## Harris Night Hawk machines running CX/UX (a 5000 looks just like a 4000
636 ## as far as Emacs is concerned).
638 # Build needs to be different on 7.0 and later releases
640 [56].[0-9] ) machine=nh4000 opsys=cxux ;;
641 [7].[0-9] ) machine=nh4000 opsys=cxux7 ;;
644 ## Harris ecx or gcx running CX/UX (Series 1200, Series 3000)
646 machine=nh3000 opsys=cxux
650 xps*-honeywell-sysv* )
651 machine=xps100 opsys=usg5-2
654 ## HP 9000 series 200 or 300
656 machine=hp9000s300 opsys=bsd4-3
659 machine=hp9000s300 opsys=netbsd
661 ## HP/UX 7, 8 and 9 are supported on these machines.
664 ## Someone's system reports A.B8.05 for this.
665 ## I wonder what other possibilities there are.
666 *.B8.* ) machine=hp9000s300 opsys=hpux8 ;;
667 *.08.* ) machine=hp9000s300 opsys=hpux8 ;;
668 *.09.* ) machine=hp9000s300 opsys=hpux9 ;;
669 *) machine=hp9000s300 opsys=hpux ;;
673 ## HP 9000 series 700 and 800, running HP/UX
675 machine=hp9000s800 opsys=hpux
678 machine=hp9000s800 opsys=hpux8
681 machine=hp9000s800 opsys=hpux9
684 ## HP 9000 series 700 and 800, running HP/UX
686 ## Cross-compilation? Nah!
688 ## Someone's system reports A.B8.05 for this.
689 ## I wonder what other possibilities there are.
690 *.B8.* ) machine=hp9000s800 opsys=hpux8 ;;
691 *.08.* ) machine=hp9000s800 opsys=hpux8 ;;
692 *.09.* ) machine=hp9000s800 opsys=hpux9 ;;
693 *) machine=hp9000s800 opsys=hpux ;;
699 machine=orion opsys=bsd4-2
702 machine=orion105 opsys=bsd4-2
707 machine=ibmps2-aix opsys=usg5-2-2
709 i386-ibm-aix1.[23]* | i386-ibm-aix* )
710 machine=ibmps2-aix opsys=usg5-3
713 machine=ibm370aix opsys=usg5-3
716 machine=ibmrs6000 opsys=aix3-1
718 rs6000-ibm-aix3.2* | rs6000-ibm-aix* )
719 machine=ibmrs6000 opsys=aix3-2
722 machine=ibmrt opsys=bsd4-3
725 machine=ibmrt opsys=bsd4-2
728 machine=ibmrt opsys=bsd4-3
731 machine=ibmrt opsys=bsd4-2
734 machine=ibmrt opsys=bsd4-3
737 machine=ibmrt opsys=bsd4-3
740 machine=ibmrt-aix opsys=usg5-2-2
743 ## Integrated Solutions `Optimum V'
745 machine=isi-ov opsys=bsd4-2
748 machine=isi-ov opsys=bsd4-3
751 ## Intel 386 machines where we do care about the manufacturer
752 i[34]86-intsys-sysv* )
753 machine=is386 opsys=usg5-2-2
758 machine=i386 opsys=usg5-3
763 machine=symmetry opsys=bsd4-3
766 ## Unspecified sysv on an ncr machine defaults to svr4.
768 machine=intel386 opsys=usg5-4
773 machine=i860 opsys=usg5-4
776 ## Silicon Graphics machines
777 ## Iris 2500 and Iris 2500 Turbo (aka the Iris 3030)
779 machine=irist opsys=iris3-5
781 m68*-sgi-iris3.6* | m68*-sgi-iris*)
782 machine=irist opsys=iris3-6
786 machine=iris4d opsys=irix3-3
789 machine=iris4d opsys=irix5-0
791 mips-sgi-irix4.* | mips-sgi-irix* )
792 machine=iris4d opsys=irix4-0
797 machine=masscomp opsys=rtu
802 machine=mega68 opsys=bsd4-2
805 ## Workstations sold by MIPS
806 ## This is not necessarily all workstations using the MIPS processor -
807 ## Irises are produced by SGI, and DECstations by DEC.
809 ## etc/MACHINES lists mips.h and mips4.h as possible machine files,
810 ## and usg5-2-2 and bsd4-3 as possible OS files. The only guidance
811 ## it gives for choosing between the alternatives seems to be "Use
812 ## -machine=mips4 for RISCOS version 4; use -opsystem=bsd4-3 with
813 ## the BSD world." I'll assume that these are instructions for
814 ## handling two odd situations, and that every other situation
815 ## should use mips.h and usg5-2-2, they being listed first.
818 ## Fall through to the general code at the bottom to decide on the OS.
821 machine=mips4 opsys=bsd4-3
822 NON_GNU_CC="cc -systype bsd43"
823 NON_GNU_CPP="cc -systype bsd43 -E"
826 machine=mips opsys=bsd4-3
829 machine=mips opsys=usg5-2-2
834 machine=next opsys=mach2
837 ## The complete machine from National Semiconductor
839 machine=ns32000 opsys=usg5-2
843 m68*-ncr-sysv2* | m68*-ncr-sysvr2* )
844 machine=tower32 opsys=usg5-2-2
846 m68*-ncr-sysv3* | m68*-ncr-sysvr3* )
847 machine=tower32v3 opsys=usg5-3
852 machine=targon31 opsys=usg5-2-2
857 machine=nu opsys=usg5-2
862 machine=plexus opsys=usg5-2
866 ## I don't really have any idea what sort of processor the Pyramid has,
867 ## so I'm assuming it is its own architecture.
868 pyramid-pyramid-bsd* )
869 machine=pyramid opsys=bsd4-2
873 ns32k-sequent-bsd4.2* )
874 machine=sequent opsys=bsd4-2
876 ns32k-sequent-bsd4.3* )
877 machine=sequent opsys=bsd4-3
882 machine=news opsys=bsd4-2
885 machine=news opsys=bsd4-3
888 machine=news opsys=bsd4-3
891 machine=news-risc opsys=bsd4-3
894 machine=mips opsys=newsos5
899 machine=stride opsys=usg5-2
903 *-sun-sunos* | *-sun-bsd* | *-sun-solaris* )
904 case "${canonical}" in
905 m68*-sunos1* ) machine=sun1 ;;
906 m68*-sunos2* ) machine=sun2 ;;
907 m68* ) machine=sun3 ;;
908 i[34]86* ) machine=sun386 ;;
909 sparc* ) machine=sparc ;;
912 case "${canonical}" in
913 ## The Sun386 didn't get past 4.0.
914 i386-*-sunos4 ) opsys=sunos4-0 ;;
915 *-sunos4.0* ) opsys=sunos4-0 ;;
916 *-sunos4.1.3* ) opsys=sunos4-1-3 ;;
917 *-sunos4* | *-sunos ) opsys=sunos4-1 ;;
918 *-sunos5.3* | *-solaris2.3* )
920 NON_GNU_CPP=/usr/ccs/lib/cpp
922 *-sunos5* | *-solaris* )
924 NON_GNU_CPP=/usr/ccs/lib/cpp
932 machine=tad68k opsys=usg5-3
936 tahoe-tahoe-bsd4.2* )
937 machine=tahoe opsys=bsd4-2
939 tahoe-tahoe-bsd4.3* )
940 machine=tahoe opsys=bsd4-3
943 ## Tandem Integrity S2
945 machine=tandem-s2 opsys=usg5-3
949 m88k-tektronix-sysv3* )
950 machine=tekxd88 opsys=usg5-3
953 ## Tektronix 16000 box (6130?)
954 ns16k-tektronix-bsd* )
955 machine=ns16000 opsys=bsd4-2
958 ## src/m/tek4300.h hints that this is a m68k machine.
959 m68*-tektronix-bsd* )
960 machine=tek4300 opsys=bsd4-3
964 ## We seem to have lost the machine-description file titan.h!
966 machine=titan opsys=usg5-3
969 ## Ustation E30 (SS5E)
970 m68*-unisys-uniplus* )
971 machine=ustation opsystem=unipl5-2
977 case "${canonical}" in
978 *-bsd4.1* ) opsys=bsd4-1 ;;
979 *-bsd4.2* | *-ultrix[0-3].* | *-ultrix4.0* ) opsys=bsd4-2 ;;
980 *-bsd4.3* | *-ultrix* ) opsys=bsd4-3 ;;
981 *-bsd386* ) opsys=bsd386 ;;
982 *-sysv[01]* | *-sysvr[01]* ) opsys=usg5-0 ;;
983 *-sysv2* | *-sysvr2* ) opsys=usg5-2 ;;
984 *-vms* ) opsys=vms ;;
990 ns16k-whitechapel-* )
992 ## We don't know what sort of OS runs on these; we'll let the
993 ## operating system guessing code below try.
998 machine=wicat opsys=usg5-2
1001 ## Intel 386 machines where we don't care about the manufacturer
1004 case "${canonical}" in
1005 *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
1006 *-isc2.2* ) opsys=isc2-2 ;;
1007 *-isc* ) opsys=isc3-0 ;;
1008 *-esix5* ) opsys=esix5r4 ;;
1009 *-esix* ) opsys=esix ;;
1010 *-xenix* ) opsys=xenix ;;
1011 *-linux* ) opsys=linux ;;
1012 *-sco3.2v4* ) opsys=sco4 ;;
1013 *-bsd386* ) opsys=bsd386 ;;
1014 *-386bsd* ) opsys=386bsd ;;
1015 *-netbsd* ) opsys=netbsd ;;
1016 *-nextstep* ) opsys=mach2 ;;
1017 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
1026 ### If the code above didn't choose an operating system, just choose
1027 ### an operating system based on the configuration name. You really
1028 ### only want to use this when you have no idea what the right
1029 ### operating system is; if you know what operating systems a machine
1030 ### runs, it's cleaner to make it explicit in the case statement
1032 if [ x"${opsys}" = x ]; then
1033 case "${canonical}" in
1034 *-bsd4.[01] ) opsys=bsd4-1 ;;
1035 *-bsd4.2 ) opsys=bsd4-2 ;;
1036 *-bsd4.3 ) opsys=bsd4-3 ;;
1037 *-sysv0 | *-sysvr0 ) opsys=usg5-0 ;;
1038 *-sysv2 | *-sysvr2 ) opsys=usg5-2 ;;
1039 *-sysv2.2 | *-sysvr2.2 ) opsys=usg5-2-2 ;;
1040 *-sysv3 | *-sysvr3 ) opsys=usg5-3 ;;
1041 *-sysv4 | *-sysvr4 ) opsys=usg5-4 ;;
1042 *-sysv4.2 | *-sysvr4.2 ) opsys=usg5-4-2 ;;
1050 (echo "${progname}: Emacs hasn't been ported to \`${canonical}' systems."
1051 echo "${progname}: Check \`etc/MACHINES' for recognized configuration names."
1056 machfile="m/${machine}.h"
1057 opsysfile="s/${opsys}.h"
1061 AC_CONFIG_HEADER(src/config.h)
1064 #### Choose a compiler.
1070 "yes" ) CC="gcc" GCC=1 ;;
1081 #### Some systems specify a CPP to use unless we are using GCC.
1082 #### Now that we know whether we are using GCC, we can decide whether
1083 #### to use that one.
1084 if [ "x$NON_GNU_CPP" = x ] || [ x$GCC = x1 ] || [ "x$CPP" = x ]
1090 #### Some systems specify a CC to use unless we are using GCC.
1091 #### Now that we know whether we are using GCC, we can decide whether
1092 #### to use that one.
1093 if [ "x$NON_GNU_CC" = x ] || [ x$GCC = x1 ] || [ x$cc_specified = x1 ]
1099 #### Some other nice autoconf tests. If you add a test here which
1100 #### should make an entry in src/config.h, don't forget to add an
1101 #### #undef clause to src/config.h.in for autoconf to modify.
1103 dnl checks for programs
1109 dnl checks for UNIX variants that set `DEFS'
1111 dnl checks for header files
1112 AC_HAVE_HEADERS(sys/timeb.h sys/time.h unistd.h)
1114 AC_TIME_WITH_SYS_TIME
1115 dnl In Autoconf 1.8 use AC_SYS_SIGLIST_DECLARED instead of this.
1116 AC_COMPILE_CHECK(sys_siglist declaration in signal.h or unistd.h,
1117 [#include <signal.h>
1118 /* NetBSD declares sys_siglist in <unistd.h>. */
1119 #ifdef HAVE_UNISTD_H
1121 #endif], [char *msg = *(sys_siglist + 1);],
1122 AC_DEFINE(SYS_SIGLIST_DECLARED))
1124 dnl checks for typedefs
1127 dnl checks for structure members
1131 dnl checks for compiler characteristics
1134 dnl checks for operating system services
1137 dnl other checks for UNIX variants
1140 #### Choose a window system.
1141 echo "Checking window system."
1146 window_system=${window_system}x11
1149 window_system=${window_system}none
1151 case "${with_x11}" in
1153 window_system=${window_system}x11
1156 case "${with_x10}" in
1158 window_system=${window_system}x10
1162 case "${window_system}" in
1163 "none" | "x11" | "x10" ) ;;
1165 # --x-includes or --x-libraries implies --with-x11.
1166 if [ -n "${x_includes}" ] || [ -n "${x_libraries}" ]; then
1169 echo " No window system specified. Looking for X11."
1170 # If the user didn't specify a window system and we found X11, use it.
1171 if [ -r /usr/lib/libX11.a \
1172 -o -d /usr/include/X11 \
1173 -o -d /usr/X386/include \
1174 -o -d ${x_includes}/X11 ]; then
1180 echo "Don't specify a window system more than once." >&2
1185 [ -z "${window_system}" ] && window_system=none
1187 [ -n "${x_libraries}" ] && LD_SWITCH_X_SITE="-L${x_libraries}"
1188 [ -n "${x_libraries}" ] && LD_SWITCH_X_SITE_AUX="-R${x_libraries}"
1189 [ -n "${x_includes}" ] && C_SWITCH_X_SITE="-I${x_includes}"
1191 # Avoid forcing the search of /usr/include before fixed include files.
1192 if [ "$C_SWITCH_X_SITE" = "-I/usr/include" ]; then
1196 case "${window_system}" in
1201 case "${with_x_toolkit}" in
1204 echo " Using Xt toolkit."
1208 echo " Using Motif toolkit."
1211 USE_X_TOOLKIT=OPEN_LOOK
1212 echo " Using Open-Look toolkit."
1216 echo " Using Xlib directly."
1229 echo " Using no window system."
1232 X_TOOLKIT_TYPE=$USE_X_TOOLKIT
1234 ### If we're using X11, we should use the X menu package.
1242 #### Extract some information from the operating system and machine files.
1244 echo "Examining the machine- and system-dependent files to find out"
1245 echo " - which libraries the lib-src programs will want, and"
1246 echo " - whether the GNU malloc routines are usable."
1248 ### It's not important that this name contain the PID; you can't run
1249 ### two configures in the same directory and have anything work
1251 tempcname="conftest.c"
1254 #include "'${srcdir}'/src/'${opsysfile}'"
1255 #include "'${srcdir}'/src/'${machfile}'"
1256 #ifndef LIBS_MACHINE
1257 #define LIBS_MACHINE
1262 #ifndef C_SWITCH_SYSTEM
1263 #define C_SWITCH_SYSTEM
1265 #ifndef C_SWITCH_MACHINE
1266 #define C_SWITCH_MACHINE
1268 configure___ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM
1269 configure___ c_switch_system=C_SWITCH_SYSTEM
1270 configure___ c_switch_machine=C_SWITCH_MACHINE
1273 #define LIB_X11_LIB -lX11
1276 #ifndef LIBX11_MACHINE
1277 #define LIBX11_MACHINE
1280 #ifndef LIBX11_SYSTEM
1281 #define LIBX11_SYSTEM
1283 configure___ LIBX=LIB_X11_LIB LIBX11_MACHINE LIBX11_SYSTEM
1286 configure___ unexec=UNEXEC
1288 configure___ unexec=unexec.o
1291 #ifdef SYSTEM_MALLOC
1292 configure___ system_malloc=yes
1294 configure___ system_malloc=no
1297 #ifndef C_DEBUG_SWITCH
1298 #define C_DEBUG_SWITCH -g
1301 #ifndef C_OPTIMIZE_SWITCH
1302 #define C_OPTIMIZE_SWITCH -O
1306 configure___ CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH
1308 configure___ CFLAGS=C_DEBUG_SWITCH
1311 # The value of CPP is a quoted variable reference, so we need to do this
1312 # to get its actual value...
1313 CPP=`eval "echo $CPP"`
1314 eval `${CPP} -Isrc ${tempcname} \
1315 | grep 'configure___' \
1316 | sed -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/'`
1319 ### Compute the unexec source name from the object name.
1320 UNEXEC_SRC="`echo ${unexec} | sed 's/\.o/.c/'`"
1322 # Do the opsystem or machine files prohibit the use of the GNU malloc?
1323 # Assume not, until told otherwise.
1325 if [ "${system_malloc}" = "yes" ]; then
1328 (The GNU allocators don't work with this system configuration.)"
1331 if [ x"${REL_ALLOC}" = x ]; then
1332 REL_ALLOC=${GNU_MALLOC}
1338 #### Add the libraries to LIBS and check for some functions.
1341 DEFS="$c_switch_system $c_switch_machine $DEFS"
1344 dnl If found, this defines HAVE_LIBDNET, which m/pmax.h checks,
1345 dnl and also adds -ldnet to LIBS, which Autoconf uses for checks.
1346 AC_HAVE_LIBRARY(-ldnet)
1348 AC_HAVE_LIBRARY(-lXbsd, LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd")
1350 echo checking for XFree86
1351 if test -d /usr/X386/include; then
1353 test -z "${C_SWITCH_X_SITE}" && C_SWITCH_X_SITE="-I/usr/X386/include"
1356 if test "${HAVE_X11}" = "yes"; then
1357 DEFS="$C_SWITCH_X_SITE $DEFS"
1358 LIBS="$LD_SWITCH_X_SITE $LIBX $LIBS"
1359 AC_HAVE_FUNCS(XrmSetDatabase XScreenResourceString XScreenNumberOfScreen XSetWMProtocols)
1364 # logb and frexp are found in -lm on most systems.
1365 AC_HAVE_LIBRARY(-lm)
1366 AC_HAVE_FUNCS(gettimeofday gethostname dup2 rename closedir mkdir rmdir \
1367 random bcopy bcmp logb frexp fmod drem ftime res_init setsid strerror)
1370 AC_FUNC_CHECK(socket, , ok_so_far=)
1371 if test -n "$ok_so_far"; then
1372 AC_HEADER_CHECK(netinet/in.h, , ok_so_far=)
1374 if test -n "$ok_so_far"; then
1375 AC_HEADER_CHECK(arpa/inet.h, , ok_so_far=)
1377 if test -n "$ok_so_far"; then
1378 AC_DEFINE(HAVE_INET_SOCKETS)
1381 #### Find out which version of Emacs this is.
1382 version=`grep 'defconst[ ]*emacs-version' ${srcdir}/lisp/version.el \
1383 | sed -e 's/^.*"\([0-9][0-9]*\.[0-9][0-9]*\)[."].*$/\1/'`
1384 if [ x"${version}" = x ]; then
1385 echo "${progname}: can't find current emacs version in
1386 \`${srcdir}/lisp/version.el'." >&2
1390 if [ -f /usr/lpp/X11/bin/smt.exp ]; then
1392 AC_DEFINE(HAVE_AIX_SMT_EXP)
1397 #### Specify what sort of things we'll be editing into Makefile and config.h.
1398 ### Use configuration here uncanonicalized to avoid exceeding size limits.
1400 AC_SUBST(configuration)
1404 AC_SUBST(exec_prefix)
1412 AC_SUBST(locallisppath)
1416 AC_SUBST(archlibdir)
1418 AC_SUBST(c_switch_system)
1419 AC_SUBST(c_switch_machine)
1420 AC_SUBST(libsrc_libs)
1421 AC_SUBST(LD_SWITCH_X_SITE)
1422 AC_SUBST(LD_SWITCH_X_SITE_AUX)
1423 AC_SUBST(C_SWITCH_X_SITE)
1425 AC_SUBST(X_TOOLKIT_TYPE)
1427 AC_DEFINE_UNQUOTED(config_machfile, "\"${machfile}\"")
1428 AC_DEFINE_UNQUOTED(config_opsysfile, "\"${opsysfile}\"")
1429 AC_DEFINE_UNQUOTED(LD_SWITCH_X_SITE, ${LD_SWITCH_X_SITE})
1430 AC_DEFINE_UNQUOTED(LD_SWITCH_X_SITE_AUX, ${LD_SWITCH_X_SITE_AUX})
1431 AC_DEFINE_UNQUOTED(C_SWITCH_X_SITE, ${C_SWITCH_X_SITE})
1432 AC_DEFINE_UNQUOTED(UNEXEC_SRC, ${UNEXEC_SRC})
1435 if [ "${HAVE_X_WINDOWS}" = "yes" ] ; then
1436 ] AC_DEFINE(HAVE_X_WINDOWS) [
1438 if [ "${USE_X_TOOLKIT}" != "no" ] ; then
1439 ] AC_DEFINE(USE_X_TOOLKIT) [
1441 if [ "${HAVE_X11}" = "yes" ] ; then
1442 ] AC_DEFINE(HAVE_X11) [
1444 if [ "${HAVE_XFREE386}" = "yes" ] ; then
1445 ] AC_DEFINE(HAVE_XFREE386) [
1447 if [ "${HAVE_X_MENU}" = "yes" ] ; then
1448 ] AC_DEFINE(HAVE_X_MENU) [
1450 if [ "${GNU_MALLOC}" = "yes" ] ; then
1451 ] AC_DEFINE(GNU_MALLOC) [
1453 if [ "${REL_ALLOC}" = "yes" ] ; then
1454 ] AC_DEFINE(REL_ALLOC) [
1456 if [ "${LISP_FLOAT_TYPE}" = "yes" ] ; then
1457 ] AC_DEFINE(LISP_FLOAT_TYPE) [
1460 # ====================== Developer's configuration =======================
1462 # The following assignments make sense if you're running Emacs on a single
1463 # machine, one version at a time, and you want changes to the lisp and etc
1464 # directories in the source tree to show up immediately in your working
1465 # environment. It saves a great deal of disk space by not duplicating the
1466 # lisp and etc directories.
1468 if [ "$run_in_place" = "1" ]; then
1469 lispdir='${srcdir}/lisp'
1470 locallisppath='${srcdir}/site-lisp'
1471 etcdir='${srcdir}/etc'
1472 lockdir='${srcdir}/lock'
1473 archlibdir=`(cd lib-src && pwd)`
1475 infodir='${srcdir}/info'
1476 elif [ "$single_tree" = "1" ]; then
1477 if [ "$exec_prefix_specified" = "" ]; then
1478 exec_prefix='${prefix}'
1480 if [ "$bindir_specified" = "" ]; then
1481 bindir='${exec_prefix}/bin/${configuration}'
1483 if [ "$datadir_specified" = "" ]; then
1484 datadir='${prefix}/common'
1486 if [ "$statedir_specified" = "" ]; then
1487 statedir='${prefix}/common'
1489 if [ "$libdir_specified" = "" ]; then
1492 if [ "$lispdir_specified" = "" ]; then
1493 lispdir='${prefix}/common/lisp'
1495 if [ "$locallisppath_specified" = "" ]; then
1496 locallisppath='${prefix}/common/site-lisp'
1498 if [ "$lockdir_specified" = "" ]; then
1499 lockdir='${prefix}/common/lock'
1501 if [ "$archlibdir_specified" = "" ]; then
1502 archlibdir='${libdir}/etc'
1504 if [ "$etcdir_specified" = "" ]; then
1505 etcdir='${prefix}/common/data'
1507 if [ "$docdir_specified" = "" ]; then
1508 docdir='${prefix}/common/data'
1512 #### Report on what we decided to do.
1515 Configured for \`${canonical}'.
1517 Where should the build process find the source code? ${srcdir}
1518 What operating system and machine description files should Emacs use?
1519 \`${opsysfile}' and \`${machfile}'
1520 What compiler should emacs be built with? ${CC} ${CFLAGS}
1521 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
1522 Should Emacs use the relocating allocator for buffers? ${REL_ALLOC}
1523 What window system should Emacs use? ${window_system}${x_includes+
1524 Where do we find X Windows header files? }${x_includes}${x_libraries+
1525 Where do we find X Windows libraries? }${x_libraries}
1529 # Remove any trailing slashes in these variables.
1530 test -n "${prefix}" &&
1531 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
1532 test -n "${exec_prefix}" &&
1533 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
1535 AC_OUTPUT(Makefile lib-src/Makefile oldXMenu/Makefile lwlib/Makefile src/Makefile.in, [
1536 # Build src/Makefile from ${srcdir}/src/Makefile.in. This must be done
1537 # after src/config.h is built, since we rely on that file.
1539 changequote(,)dnl The horror, the horror.
1540 # Now get this: Some word that is part of the ${srcdir} directory name
1541 # or the ${configuration} value might, just might, happen to be an
1542 # identifier like `sun4' or `i386' or something, and be predefined by
1543 # the C preprocessor to some helpful value like 1, or maybe the empty
1544 # string. Needless to say consequent macro substitutions are less
1545 # than conducive to the makefile finding the correct directory.
1546 undefs="`echo $top_srcdir $configuration |
1547 sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/ */ -U/g' \
1548 -e 's/ -U$//' -e 's/^[^ ]/-U/' \
1549 -e 's/-U[0-9][^ ]*//g' \
1553 echo creating src/Makefile
1556 sed -e 's@^# \(Generated.*\)$@/* \1 */@' \
1557 -e 's@/\*\*/#\(.*\)$@/* \1 */@' \
1558 < Makefile.in > junk.c
1559 $CPP $undefs -I. -I$top_srcdir/src $CPPFLAGS junk.c |
1560 sed -e 's/^ / /' -e '/^#/d' -e '/^[ ]*$/d' > Makefile.new
1562 chmod 444 Makefile.new;
1563 mv -f Makefile.new Makefile;