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}'
83 # We cannot use this variable in the case statement below, because many
84 # /bin/sh's have broken semantics for "case". Unfortunately, you must
85 # actually edit the clause itself.
86 # path_options="prefix | exec_prefix | bindir | libdir | etcdir | datadir"
87 # path_options="$path_options | archlibdir | statedir | mandir | infodir"
88 # path_options="$path_options | lispdir | lockdir | lisppath | locallisppath"
92 short_usage="Usage: ${progname} CONFIGURATION [-OPTION[=VALUE] ...]
94 Set compilation and installation parameters for GNU Emacs, and report.
95 CONFIGURATION specifies the machine and operating system to build for.
96 --with-x Support the X Window System.
97 --with-x=no Don't support X.
98 --x-includes=DIR Search for X header files in DIR.
99 --x-libraries=DIR Search for X libraries in DIR.
100 --with-gcc Use GCC to compile Emacs.
101 --with-gcc=no Don't use GCC to compile Emacs.
102 --run-in-place Use libraries and data files directly out of the
104 --single-tree=DIR Has the effect of creating a directory tree at DIR
106 .../DIR/bin/CONFIGNAME (emacs, etags, etc.)
107 .../DIR/bin/CONFIGNAME/etc (movemail, etc.)
108 .../DIR/common/lisp (emacs' lisp files)
109 .../DIR/common/site-lisp (local lisp files)
110 .../DIR/common/lib (DOC, TUTORIAL, etc.)
111 .../DIR/common/lock (lockfiles)
112 --srcdir=DIR Look for the Emacs source files in DIR.
113 --prefix=DIR Install files below DIR. Defaults to \`${prefix}'.
115 You may also specify any of the \`path' variables found in Makefile.in,
116 including --bindir, --libdir, --etcdir, --infodir, and so on. This allows
117 you to override a single default location when configuring.
119 If successful, ${progname} leaves its status in config.status. If
120 unsuccessful after disturbing the status quo, it removes config.status."
123 #### Option processing.
125 ### Record all the arguments, so we can save them in config.status.
128 ### Shell Magic: Quote the quoted arguments in ARGUMENTS. At a later date,
129 ### in order to get the arguments back in $@, we have to do an
130 ### `eval set x "$quoted_arguments"; shift'.
133 quoted_arguments="$quoted_arguments '$i'"
136 ### Don't use shift -- that destroys the argument list, which autoconf needs
137 ### to produce config.status. It turns out that "set - ${arguments}" doesn't
139 ### However, it also turns out that many shells cannot expand ${10} at all.
140 ### So using an index variable doesn't work either. It is possible to use
141 ### some shell magic to make 'set x "$arguments"; shift' work portably.
142 while [ $# != 0 ]; do
146 ## Anything starting with a hyphen we assume is an option.
148 ## Separate the switch name from the value it's being given.
151 opt=`echo ${arg} | sed 's:^-*\([^=]*\)=.*$:\1:'`
152 val=`echo ${arg} | sed 's:^-*[^=]*=\(.*\)$:\1:'`
156 ## If FOO is a boolean argument, --FOO is equivalent to
157 ## --FOO=yes. Otherwise, the value comes from the next
158 ## argument - see below.
159 opt=`echo ${arg} | sed 's:^-*\(.*\)$:\1:'`
165 ## Change `-' in the option name to `_'.
167 opt="`echo ${opt} | tr - _`"
169 ## Process the option.
172 ## Has the user specified which window systems they want to support?
173 "with_x" | "with_x11" | "with_x10" )
174 ## Make sure the value given was either "yes" or "no".
176 y | ye | yes ) val=yes ;;
179 (echo "${progname}: the \`--${optname}' option is supposed to have a boolean value.
180 Set it to either \`yes' or \`no'."
181 echo "${short_usage}") >&2
185 eval "${opt}=\"${val}\""
188 ## Has the user specified whether or not they want GCC?
189 "with_gcc" | "with_gnu_cc" )
190 ## Make sure the value given was either "yes" or "no".
192 y | ye | yes ) val=yes ;;
195 (echo "${progname}: the \`--${optname}' option is supposed to have a boolean value.
196 Set it to either \`yes' or \`no'."
197 echo "${short_usage}") >&2
201 eval "${opt}=\"${val}\""
204 ## Has the user specified a source directory?
206 ## If the value was omitted, get it from the next argument.
207 if [ "${valomitted}" = "yes" ]; then
208 ## Get the next argument from the argument list, if there is one.
210 (echo "${progname}: You must give a value for the \`--${optname}' option, as in
211 \`--${optname}=FOO'."
212 echo "${short_usage}") >&2
220 ## Has the user tried to tell us where the X files are?
221 ## I think these are dopey, but no less than three alpha
222 ## testers, at large sites, have said they have their X files
223 ## installed in odd places.
225 ## If the value was omitted, get it from the next argument.
226 if [ "${valomitted}" = "yes" ]; then
227 ## Get the next argument from the argument list, if there is one.
229 (echo "${progname}: You must give a value for the \`--${optname}' option, as in
230 \`--${optname}=/usr/local/X11/include'."
231 echo "${short_usage}") >&2
239 ## If the value was omitted, get it from the next argument.
240 if [ "${valomitted}" = "yes" ]; then
241 ## Get the next argument from the argument list, if there is one.
243 (echo "${progname}: You must give a value for the \`--${optname}' option, as in
244 \`--${optname}=/usr/local/X11/lib'."
245 echo "${short_usage}") >&2
253 ## Should this use the "development configuration"?
259 ## Should this use the "single tree" configuration?
265 ## Has the user specified one of the path options?
266 prefix | exec_prefix | bindir | libdir | etcdir | datadir | \
267 archlibdir | statedir | mandir | infodir | lispdir | lockdir | \
268 lisppath | locallisppath )
269 ## If the value was omitted, get it from the next argument.
270 if [ "${valomitted}" = "yes" ]; then
273 "$progname: You must give a value for the \`--${optname}' option,";
275 "as in \`--${optname}=`eval echo '$'$optname`.'"
276 echo "$short_usage") >&2
281 eval "${opt}=\"${val}\""
282 eval "${opt}_specified=1"
285 ## Verbose flag, tested by autoconf macros.
290 ## Has the user asked for some help?
294 echo "${short_usage}" | more
296 echo "${short_usage}" | $PAGER
301 ## We ignore all other options silently.
305 ## Anything not starting with a hyphen we assume is a
306 ## configuration name.
314 ### Get the arguments back. See the diatribe on Shell Magic above.
315 eval set x "$quoted_arguments"; shift
317 if [ "${configuration}" = "" ]; then
318 echo '- You did not tell me what kind of host system you want to configure.
319 - I will attempt to guess the kind of system this is.' 1>&2
320 guesssys=`echo ${progname} | sed 's/configure$/config.guess/'`
321 if configuration=`${guesssys}` ; then
322 echo "- Looks like this is a ${configuration}" 1>&2
324 echo '- Failed to guess the system type. You need to tell me.' 1>&2
325 echo "${short_usage}" >&2
330 #### Decide where the source is.
333 ## If it's not specified, see if `.' or `..' might work.
335 confdir=`echo $0 | sed 's|//|/|' | sed 's|/[^/]*$||'`
336 if [ -f $confdir/src/lisp.h -a -f $confdir/lisp/version.el ]; then
339 if [ -f "./src/lisp.h" -a -f "./lisp/version.el" ]; then
342 if [ -f "../src/lisp.h" -a -f "../lisp/version.el" ]; then
346 ${progname}: Neither the current directory nor its parent seem to
347 contain the Emacs sources. If you do not want to build Emacs in its
348 source tree, you should run \`${progname}' in the directory in which
349 you wish to build Emacs, using its \`--srcdir' option to say where the
350 sources may be found."
351 echo "${short_usage}") >&2
358 ## Otherwise, check if the directory they specified is okay.
360 if [ ! -d "${srcdir}" -o ! -f "${srcdir}/src/lisp.h" -o ! -f "${srcdir}/lisp/version.el" ]; then
362 ${progname}: The directory specified with the \`--srcdir' option,
363 \`${srcdir}', doesn't seem to contain the Emacs sources. You should
364 either run the \`${progname}' script at the top of the Emacs source
365 tree, or use the \`--srcdir' option to specify where the Emacs sources
367 echo "${short_usage}") >&2
373 #### Make srcdir absolute, if it isn't already. It's important to
374 #### avoid running the path through pwd unnecessary, since pwd can
375 #### give you automounter prefixes, which can go away.
379 ## We may be able to use the $PWD environment variable to make this
380 ## absolute. But sometimes PWD is inaccurate.
381 if [ "${PWD}" != "" ] && [ "`(cd ${PWD} ; sh -c pwd)`" = "`pwd`" ] ; then
384 srcdir="`(cd ${srcdir}; pwd)`"
387 * ) srcdir="`(cd ${srcdir}; pwd)`" ;;
390 #### Check if the source directory already has a configured system in it.
391 if [ `pwd` != `(cd ${srcdir} && pwd)` ] \
392 && [ -f "${srcdir}/src/config.h" ] ; then
393 (echo "${progname}: WARNING: The directory tree \`${srcdir}' is being used"
394 echo " as a build directory right now; it has been configured in its own"
395 echo " right. To configure in another directory as well, you MUST"
396 echo " use GNU make. If you do not have GNU make, then you must"
397 echo " now do \`make distclean' in ${srcdir},"
398 echo " and then run ${progname} again.") >&2
399 extrasub='/^VPATH[ ]*=/c\
405 vpath %.in $(srcdir)'
408 ### Make the necessary directories, if they don't exist.
409 for dir in ./src ./lib-src ./cpp ./oldXMenu ./etc ; do
410 if [ ! -d ${dir} ]; then
415 #### Given the configuration name, set machfile and opsysfile to the
416 #### names of the m/*.h and s/*.h files we should use.
418 ### Canonicalize the configuration name.
419 echo "Checking the configuration name."
420 if canonical=`${srcdir}/config.sub "${configuration}"` ; then : ; else
424 ### If you add support for a new configuration, add code to this
425 ### switch statement to recognize your configuration name and select
426 ### the appropriate operating system and machine description files.
428 ### You would hope that you could choose an m/*.h file pretty much
429 ### based on the machine portion of the configuration name, and an s-
430 ### file based on the operating system portion. However, it turns out
431 ### that each m/*.h file is pretty manufacturer-specific - for
432 ### example, apollo.h, hp9000s300.h, mega68k, news.h, and tad68k are
433 ### all 68000 machines; mips.h, pmax.h, and news-risc are all MIPS
434 ### machines. So we basically have to have a special case for each
435 ### configuration name.
437 ### As far as handling version numbers on operating systems is
438 ### concerned, make sure things will fail in a fixable way. If
439 ### /etc/MACHINES doesn't say anything about version numbers, be
440 ### prepared to handle anything reasonably. If version numbers
441 ### matter, be sure /etc/MACHINES says something about it.
443 ### Eric Raymond says we should accept strings like "sysvr4" to mean
444 ### "System V Release 4"; he writes, "The old convention encouraged
445 ### confusion between `system' and `release' levels'."
447 machine='' opsys='' unported='false'
448 case "${canonical}" in
451 ## Strictly speaking, we need the version of the alliant operating
452 ## system to choose the right machine file, but currently the
453 ## configuration name doesn't tell us enough to choose the right
454 ## one; we need to give alliants their own operating system name to
455 ## do this right. When someone cares, they can help us.
457 machine=alliant4 opsys=bsd4-2
460 machine=alliant-2800 opsys=bsd4-3
465 machine=altos opsys=usg5-2
470 machine=amdahl opsys=usg5-2-2
473 ## Appallings - I mean, Apollos - running Domain
475 machine=apollo opsys=bsd4-2
478 ## AT&T 3b2, 3b5, 3b15, 3b20
480 machine=att3b opsys=usg5-2-2
483 ## AT&T 3b1 - The Mighty Unix PC!
485 machine=7300 opsys=usg5-2-2
490 machine=dpx2 opsys=usg5-3
495 machine=sps7 opsys=usg5-2
498 ## CCI 5/32, 6/32 -- see "Tahoe".
501 ## I don't know what configuration name to use for this; config.sub
502 ## doesn't seem to know anything about it. Hey, Celerity users, get
504 celerity-celerity-bsd* )
505 machine=celerity opsys=bsd4-2
509 ## What operating systems does this chip run that Emacs has been
513 ## We'll use the catch-all code at the bottom to guess the
519 machine=convex opsys=bsd4-3
524 machine=intel386 opsys=usg5-3
528 cydra*-cydrome-sysv* )
529 machine=cydra5 opsys=usg5-3
532 ## Data General AViiON Machines
534 machine=aviion opsys=dgux
538 mips-dec-ultrix[0-3].* | mips-dec-ultrix4.0* | mips-dec-bsd4.2* )
539 machine=pmax opsys=bsd4-2
541 mips-dec-ultrix* | mips-dec-bsd* )
542 machine=pmax opsys=bsd4-3
545 machine=pmax opsys=osf1
548 ## Motorola Delta machines
549 m68*-motorola-sysv* )
550 machine=delta opsys=usg5-3
552 m88k-motorola-sysv4* )
553 machine=delta88k opsys=usg5-4
555 m88k-motorola-sysv* | m88k-motorola-m88kbcs* )
556 machine=delta88k opsys=usg5-3
561 machine=dual opsys=usg5-2
564 machine=dual opsys=unipl5-2
569 machine=elxsi opsys=usg5-2
574 machine=ns16000 opsys=umax
577 ## The GEC 93 - apparently, this port isn't really finished yet.
579 ## Gould Power Node and NP1
581 machine=gould opsys=bsd4-2
584 machine=gould opsys=bsd4-3
587 machine=gould-np1 opsys=bsd4-3
591 xps*-honeywell-sysv* )
592 machine=xps100 opsys=usg5-2
595 ## HP 9000 series 200 or 300
597 machine=hp9000s300 opsys=bsd4-3
600 machine=hp9000s300 opsys=netbsd
602 ## HP/UX 7, 8 and 9 are supported on these machines.
605 ## Someone's system reports A.B8.05 for this.
606 ## I wonder what other possibilities there are.
607 *.B8.* ) machine=hp9000s300 opsys=hpux8 ;;
608 *.08.* ) machine=hp9000s300 opsys=hpux8 ;;
609 *.09.* ) machine=hp9000s300 opsys=hpux9 ;;
610 *) machine=hp9000s300 opsys=hpux ;;
614 ## HP 9000 series 700 and 800, running HP/UX
616 machine=hp9000s800 opsys=hpux
619 machine=hp9000s800 opsys=hpux8
622 machine=hp9000s800 opsys=hpux9
625 ## HP 9000 series 700 and 800, running HP/UX
627 ## Cross-compilation? Nah!
629 ## Someone's system reports A.B8.05 for this.
630 ## I wonder what other possibilities there are.
631 *.B8.* ) machine=hp9000s800 opsys=hpux8 ;;
632 *.08.* ) machine=hp9000s800 opsys=hpux8 ;;
633 *.09.* ) machine=hp9000s800 opsys=hpux9 ;;
634 *) machine=hp9000s800 opsys=hpux ;;
640 machine=orion opsys=bsd4-2
643 machine=orion105 opsys=bsd4-2
648 machine=ibmps2-aix opsys=usg5-2-2
650 i386-ibm-aix1.[23]* | i386-ibm-aix* )
651 machine=ibmps2-aix opsys=usg5-3
654 machine=ibm370aix opsys=usg5-3
657 machine=ibmrs6000 opsys=aix3-1
659 rs6000-ibm-aix3.2* | rs6000-ibm-aix* )
660 machine=ibmrs6000 opsys=aix3-2
663 machine=ibmrt opsys=bsd4-3
666 machine=ibmrt opsys=bsd4-2
669 machine=ibmrt opsys=bsd4-3
672 machine=ibmrt opsys=bsd4-2
675 machine=ibmrt opsys=bsd4-3
678 machine=ibmrt opsys=bsd4-3
681 machine=ibmrt-aix opsys=usg5-2-2
684 ## Integrated Solutions `Optimum V'
686 machine=isi-ov opsys=bsd4-2
689 machine=isi-ov opsys=bsd4-3
692 ## Intel 386 machines where we do care about the manufacturer
693 i[34]86-intsys-sysv* )
694 machine=is386 opsys=usg5-2-2
699 machine=i386 opsys=usg5-3
704 machine=symmetry opsys=bsd4-3
707 ## Unspecified sysv on an ncr machine defaults to svr4.
709 machine=intel386 opsys=usg5-4
714 machine=i860 opsys=usg5-4
717 ## Silicon Graphics machines
718 ## Iris 2500 and Iris 2500 Turbo (aka the Iris 3030)
720 machine=irist opsys=iris3-5
722 m68*-sgi-iris3.6* | m68*-sgi-iris*)
723 machine=irist opsys=iris3-6
727 machine=iris4d opsys=irix3-3
730 machine=iris4d opsys=irix5-0
732 mips-sgi-irix4.* | mips-sgi-irix* )
733 machine=iris4d opsys=irix4-0
738 machine=masscomp opsys=rtu
743 machine=mega68 opsys=bsd4-2
746 ## Workstations sold by MIPS
747 ## This is not necessarily all workstations using the MIPS processor -
748 ## Irises are produced by SGI, and DECstations by DEC.
750 ## etc/MACHINES lists mips.h and mips4.h as possible machine files,
751 ## and usg5-2-2 and bsd4-3 as possible OS files. The only guidance
752 ## it gives for choosing between the alternatives seems to be "Use
753 ## -machine=mips4 for RISCOS version 4; use -opsystem=bsd4-3 with
754 ## the BSD world." I'll assume that these are instructions for
755 ## handling two odd situations, and that every other situation
756 ## should use mips.h and usg5-2-2, they being listed first.
759 ## Fall through to the general code at the bottom to decide on the OS.
762 machine=mips4 opsys=bsd4-3
765 machine=mips opsys=bsd4-3
768 machine=mips opsys=usg5-2-2
772 m68*-next-mach* | m68*-next-bsd* )
773 machine=next opsys=mach2
776 ## The complete machine from National Semiconductor
778 machine=ns32000 opsys=usg5-2
782 m68*-ncr-sysv2* | m68*-ncr-sysvr2* )
783 machine=tower32 opsys=usg5-2-2
785 m68*-ncr-sysv3* | m68*-ncr-sysvr3* )
786 machine=tower32v3 opsys=usg5-3
791 machine=targon31 opsys=usg5-2-2
796 machine=nu opsys=usg5-2
801 machine=plexus opsys=usg5-2
805 ## I don't really have any idea what sort of processor the Pyramid has,
806 ## so I'm assuming it is its own architecture.
807 pyramid-pyramid-bsd* )
808 machine=pyramid opsys=bsd4-2
812 ns32k-sequent-bsd4.2* )
813 machine=sequent opsys=bsd4-2
815 ns32k-sequent-bsd4.3* )
816 machine=sequent opsys=bsd4-3
821 machine=news opsys=bsd4-2
824 machine=news opsys=bsd4-3
827 machine=news opsys=bsd4-3
830 machine=news-risc opsys=bsd4-3
835 machine=stride opsys=usg5-2
839 *-sun-sunos* | *-sun-bsd* | *-sun-solaris* )
840 case "${canonical}" in
841 m68*-sunos1* ) machine=sun1 ;;
842 m68*-sunos2* ) machine=sun2 ;;
843 m68* ) machine=sun3 ;;
844 i[34]86* ) machine=sun386 ;;
845 sparc* ) machine=sparc ;;
848 case "${canonical}" in
849 ## The Sun386 didn't get past 4.0.
850 i386-*-sunos4 ) opsys=sunos4-0 ;;
851 *-sunos4.0* ) opsys=sunos4-0 ;;
852 *-sunos4.1.3* ) opsys=sunos4-1-3 ;;
853 *-sunos4* | *-sunos ) opsys=sunos4-1 ;;
854 *-sunos5* | *-solaris* ) opsys=sol2 ;;
861 machine=tad68k opsys=usg5-3
865 tahoe-tahoe-bsd4.2* )
866 machine=tahoe opsys=bsd4-2
868 tahoe-tahoe-bsd4.3* )
869 machine=tahoe opsys=bsd4-3
872 ## Tandem Integrity S2
874 machine=tandem-s2 opsys=usg5-3
878 m88k-tektronix-sysv3* )
879 machine=tekxd88 opsys=usg5-3
882 ## Tektronix 16000 box (6130?)
883 ns16k-tektronix-bsd* )
884 machine=ns16000 opsys=bsd4-2
887 ## src/m/tek4300.h hints that this is a m68k machine.
888 m68*-tektronix-bsd* )
889 machine=tek4300 opsys=bsd4-3
893 ## We seem to have lost the machine-description file titan.h!
895 machine=titan opsys=usg5-3
898 ## Ustation E30 (SS5E)
899 m68*-unisys-uniplus* )
900 machine=ustation opsystem=unipl5-2
906 case "${canonical}" in
907 *-bsd4.1* ) opsys=bsd4-1 ;;
908 *-bsd4.2* | *-ultrix[0-3].* | *-ultrix4.0* ) opsys=bsd4-2 ;;
909 *-bsd4.3* | *-ultrix* ) opsys=bsd4-3 ;;
910 *-bsd386* ) opsys=bsd386 ;;
911 *-sysv[01]* | *-sysvr[01]* ) opsys=usg5-0 ;;
912 *-sysv2* | *-sysvr2* ) opsys=usg5-2 ;;
913 *-vms* ) opsys=vms ;;
919 ns16k-whitechapel-* )
921 ## We don't know what sort of OS runs on these; we'll let the
922 ## operating system guessing code below try.
927 machine=wicat opsys=usg5-2
930 ## Intel 386 machines where we don't care about the manufacturer
933 case "${canonical}" in
934 *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
935 *-isc2.2* ) opsys=isc2-2 ;;
936 *-isc* ) opsys=isc3-0 ;;
937 *-esix5* ) opsys=esix5r4 ;;
938 *-esix* ) opsys=esix ;;
939 *-xenix* ) opsys=xenix ;;
940 *-linux* ) opsys=linux ;;
941 *-sco3.2v4* ) opsys=sco4 ;;
942 *-bsd386* ) opsys=bsd386 ;;
943 *-386bsd* ) opsys=386bsd ;;
944 *-netbsd* ) opsys=netbsd ;;
945 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
954 ### If the code above didn't choose an operating system, just choose
955 ### an operating system based on the configuration name. You really
956 ### only want to use this when you have no idea what the right
957 ### operating system is; if you know what operating systems a machine
958 ### runs, it's cleaner to make it explicit in the case statement
960 if [ x"${opsys}" = x ]; then
961 case "${canonical}" in
962 *-bsd4.[01] ) opsys=bsd4-1 ;;
963 *-bsd4.2 ) opsys=bsd4-2 ;;
964 *-bsd4.3 ) opsys=bsd4-3 ;;
965 *-sysv0 | *-sysvr0 ) opsys=usg5-0 ;;
966 *-sysv2 | *-sysvr2 ) opsys=usg5-2 ;;
967 *-sysv2.2 | *-sysvr2.2 ) opsys=usg5-2-2 ;;
968 *-sysv3 | *-sysvr3 ) opsys=usg5-3 ;;
969 *-sysv4 | *-sysvr4 ) opsys=usg5-4 ;;
970 *-sysv4.2 | *-sysvr4.2 ) opsys=usg5-4-2 ;;
978 (echo "${progname}: Emacs hasn't been ported to \`${canonical}' systems."
979 echo "${progname}: Check \`etc/MACHINES' for recognized configuration names."
984 machfile="m/${machine}.h"
985 opsysfile="s/${opsys}.h"
989 AC_CONFIG_HEADER(src/config.h)
992 #### Choose a compiler.
994 "yes" ) CC="gcc" GCC=1 ;;
1000 #### Some other nice autoconf tests. If you add a test here which
1001 #### should make an entry in src/config.h, don't forget to add an
1002 #### #undef clause to src/config.h.in for autoconf to modify.
1004 dnl checks for programs
1010 dnl checks for UNIX variants that set `DEFS'
1012 dnl checks for header files
1013 AC_HAVE_HEADERS(sys/timeb.h sys/time.h unistd.h)
1015 AC_TIME_WITH_SYS_TIME
1017 dnl checks for typedefs
1020 dnl checks for structure members
1024 dnl checks for compiler characteristics
1027 dnl checks for operating system services
1030 dnl other checks for UNIX variants
1033 #### Choose a window system.
1034 echo "Checking window system."
1039 window_system=${window_system}x11
1042 window_system=${window_system}none
1044 case "${with_x11}" in
1046 window_system=${window_system}x11
1049 case "${with_x10}" in
1051 window_system=${window_system}x10
1055 case "${window_system}" in
1056 "none" | "x11" | "x10" ) ;;
1058 # --x-includes or --x-libraries implies --with-x11.
1059 if [ -n "${x_includes}" ] || [ -n "${x_libraries}" ]; then
1062 echo " No window system specified. Looking for X11."
1063 # If the user didn't specify a window system and we found X11, use it.
1064 if [ -r /usr/lib/libX11.a \
1065 -o -d /usr/include/X11 \
1066 -o -d /usr/X386/include \
1067 -o -d ${x_includes}/X11 ]; then
1073 echo "Don't specify a window system more than once." >&2
1078 case "${window_system}" in
1080 ### If the user hasn't specified where we should find X, try
1081 ### letting autoconf figure that out.
1082 if [ -z "${x_includes}" ] && [ -z "${x_libraries}" ]; then
1087 if [ -n "${x_includes}" ] || [ -n "${x_libraries}" ]; then
1093 [ -z "${window_system}" ] && window_system=none
1095 [ -n "${x_libraries}" ] && LD_SWITCH_X_SITE="-L${x_libraries}"
1096 [ -n "${x_includes}" ] && C_SWITCH_X_SITE="-I${x_includes}"
1098 # Avoid forcing the search of /usr/include before fixed include files.
1099 if [ "$C_SWITCH_X_SITE" = "-I/usr/include" ]; then
1103 case "${window_system}" in
1117 echo " Using no window system."
1121 ### If we're using X11, we should use the X menu package.
1129 #### Extract some information from the operating system and machine files.
1131 echo "Examining the machine- and system-dependent files to find out"
1132 echo " - which libraries the lib-src programs will want, and"
1133 echo " - whether the GNU malloc routines are usable."
1135 ### It's not important that this name contain the PID; you can't run
1136 ### two configures in the same directory and have anything work
1138 tempcname="conftest.c"
1141 #include "'${srcdir}'/src/'${opsysfile}'"
1142 #include "'${srcdir}'/src/'${machfile}'"
1143 #ifndef LIBS_MACHINE
1144 #define LIBS_MACHINE
1149 #ifndef C_SWITCH_SYSTEM
1150 #define C_SWITCH_SYSTEM
1152 configure___ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM
1153 configure___ c_switch_system=C_SWITCH_SYSTEM
1156 #define LIB_X11_LIB -lX11
1159 #ifndef LIBX11_MACHINE
1160 #define LIBX11_MACHINE
1163 #ifndef LIBX11_SYSTEM
1164 #define LIBX11_SYSTEM
1166 configure___ LIBX=LIB_X11_LIB LIBX11_MACHINE LIBX11_SYSTEM
1169 configure___ unexec=UNEXEC
1171 configure___ unexec=unexec.o
1174 #ifdef SYSTEM_MALLOC
1175 configure___ system_malloc=yes
1177 configure___ system_malloc=no
1180 #ifndef C_DEBUG_SWITCH
1181 #define C_DEBUG_SWITCH -g
1184 #ifndef C_OPTIMIZE_SWITCH
1185 #define C_OPTIMIZE_SWITCH -O
1189 configure___ CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH
1191 configure___ CFLAGS=C_DEBUG_SWITCH
1194 # The value of CPP is a quoted variable reference, so we need to do this
1195 # to get its actual value...
1196 CPP=`eval "echo $CPP"`
1197 eval `${CPP} -Isrc ${tempcname} \
1198 | grep 'configure___' \
1199 | sed -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/'`
1202 ### Compute the unexec source name from the object name.
1203 UNEXEC_SRC="`echo ${unexec} | sed 's/\.o/.c/'`"
1205 # Do the opsystem or machine files prohibit the use of the GNU malloc?
1206 # Assume not, until told otherwise.
1208 if [ "${system_malloc}" = "yes" ]; then
1211 (The GNU allocators don't work with this system configuration.)"
1214 if [ x"${REL_ALLOC}" = x ]; then
1215 REL_ALLOC=${GNU_MALLOC}
1221 #### Add the libraries to LIBS and check for some functions.
1224 DEFS="$c_switch_system $DEFS"
1227 dnl If found, this defines HAVE_LIBDNET, which m/pmax.h checks,
1228 dnl and also adds -ldnet to LIBS, which Autoconf uses for checks.
1229 AC_HAVE_LIBRARY(-ldnet)
1231 AC_HAVE_LIBRARY(-lXbsd, LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd")
1233 echo checking for XFree86
1234 if test -d /usr/X386/include; then
1236 test -z "${C_SWITCH_X_SITE}" && C_SWITCH_X_SITE="-I/usr/X386/include"
1239 if test "${HAVE_X11}" = "yes"; then
1240 DEFS="$C_SWITCH_X_SITE $DEFS"
1241 LIBS="$LD_SWITCH_X_SITE $LIBX $LIBS"
1242 AC_HAVE_FUNCS(XrmSetDatabase XScreenResourceString XScreenNumberOfScreen)
1247 # logb and frexp are found in -lm on most systems.
1248 AC_HAVE_LIBRARY(-lm)
1249 AC_HAVE_FUNCS(gettimeofday gethostname dup2 rename closedir mkdir rmdir random bcopy logb frexp ftime res_init)
1252 AC_FUNC_CHECK(socket, , ok_so_far=)
1253 if test -n "$ok_so_far"; then
1254 AC_HEADER_CHECK(netinet/in.h, , ok_so_far=)
1256 if test -n "$ok_so_far"; then
1257 AC_HEADER_CHECK(arpa/inet.h, , ok_so_far=)
1259 if test -n "$ok_so_far"; then
1260 AC_DEFINE(HAVE_INET_SOCKETS)
1263 #### Find out which version of Emacs this is.
1264 version=`grep 'defconst[ ]*emacs-version' ${srcdir}/lisp/version.el \
1265 | sed -e 's/^.*"\([0-9][0-9]*\.[0-9][0-9]*\)\..*$/\1/'`
1266 if [ x"${version}" = x ]; then
1267 echo "${progname}: can't find current emacs version in
1268 \`${srcdir}/lisp/version.el'." >&2
1272 if [ -f /usr/lpp/X11/bin/smt.exp ]; then
1274 AC_DEFINE(HAVE_AIX_SMT_EXP)
1279 #### Specify what sort of things we'll be editing into Makefile and config.h.
1280 ### Use configuration here uncanonicalized to avoid exceeding size limits.
1282 AC_SUBST(configuration)
1286 AC_SUBST(exec_prefix)
1294 AC_SUBST(locallisppath)
1298 AC_SUBST(archlibdir)
1299 AC_SUBST(c_switch_system)
1300 AC_SUBST(libsrc_libs)
1301 AC_SUBST(LD_SWITCH_X_SITE)
1302 AC_SUBST(C_SWITCH_X_SITE)
1305 AC_DEFINE_UNQUOTED(config_machfile, "\"${machfile}\"")
1306 AC_DEFINE_UNQUOTED(config_opsysfile, "\"${opsysfile}\"")
1307 AC_DEFINE_UNQUOTED(LD_SWITCH_X_SITE, ${LD_SWITCH_X_SITE})
1308 AC_DEFINE_UNQUOTED(C_SWITCH_X_SITE, ${C_SWITCH_X_SITE})
1309 AC_DEFINE_UNQUOTED(UNEXEC_SRC, ${UNEXEC_SRC})
1312 if [ "${HAVE_X_WINDOWS}" = "yes" ] ; then
1313 ] AC_DEFINE(HAVE_X_WINDOWS) [
1315 if [ "${HAVE_X11}" = "yes" ] ; then
1316 ] AC_DEFINE(HAVE_X11) [
1318 if [ "${HAVE_XFREE386}" = "yes" ] ; then
1319 ] AC_DEFINE(HAVE_XFREE386) [
1321 if [ "${HAVE_X_MENU}" = "yes" ] ; then
1322 ] AC_DEFINE(HAVE_X_MENU) [
1324 if [ "${GNU_MALLOC}" = "yes" ] ; then
1325 ] AC_DEFINE(GNU_MALLOC) [
1327 if [ "${REL_ALLOC}" = "yes" ] ; then
1328 ] AC_DEFINE(REL_ALLOC) [
1330 if [ "${LISP_FLOAT_TYPE}" = "yes" ] ; then
1331 ] AC_DEFINE(LISP_FLOAT_TYPE) [
1334 # ====================== Developer's configuration =======================
1336 # The following assignments make sense if you're running Emacs on a single
1337 # machine, one version at a time, and you want changes to the lisp and etc
1338 # directories in the source tree to show up immediately in your working
1339 # environment. It saves a great deal of disk space by not duplicating the
1340 # lisp and etc directories.
1342 if [ "$run_in_place" = "1" ]; then
1343 lispdir='${srcdir}/lisp'
1344 locallisppath='${srcdir}/site-lisp'
1345 etcdir='${srcdir}/etc'
1346 lockdir='${srcdir}/lock'
1347 archlibdir='${srcdir}/lib-src'
1348 infodir='${srcdir}/info'
1349 elif [ "$single_tree" = "1" ]; then
1350 if [ "$exec_prefix_specified" = "" ]; then
1351 exec_prefix='${prefix}'
1353 if [ "$bindir_specified" = "" ]; then
1354 bindir='${exec_prefix}/bin/${configuration}'
1356 if [ "$datadir_specified" = "" ]; then
1357 datadir='${prefix}/common'
1359 if [ "$statedir_specified" = "" ]; then
1360 statedir='${prefix}/common'
1362 if [ "$libdir_specified" = "" ]; then
1365 if [ "$lispdir_specified" = "" ]; then
1366 lispdir='${prefix}/common/lisp'
1368 if [ "$locallisppath_specified" = "" ]; then
1369 locallisppath='${prefix}/common/site-lisp'
1371 if [ "$lockdir_specified" = "" ]; then
1372 lockdir='${prefix}/common/lock'
1374 if [ "$archlibdir_specified" = "" ]; then
1375 archlibdir='${libdir}/etc'
1377 if [ "$etcdir_specified" = "" ]; then
1378 etcdir='${prefix}/common/data'
1382 #### Report on what we decided to do.
1385 Configured for \`${canonical}'.
1387 Where should the build process find the source code? ${srcdir}
1388 What operating system and machine description files should Emacs use?
1389 \`${opsysfile}' and \`${machfile}'
1390 What compiler should emacs be built with? ${CC} ${CFLAGS}
1391 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
1392 Should Emacs use the relocating allocator for buffers? ${REL_ALLOC}
1393 What window system should Emacs use? ${window_system}${x_includes+
1394 Where do we find X Windows header files? }${x_includes}${x_libraries+
1395 Where do we find X Windows libraries? }${x_libraries}
1399 # Remove any trailing slashes in these variables.
1400 test -n "${prefix}" &&
1401 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
1402 test -n "${exec_prefix}" &&
1403 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
1405 AC_OUTPUT(Makefile lib-src/Makefile oldXMenu/Makefile src/Makefile.in) [
1406 # Build src/Makefile from ${srcdir}/src/Makefile.in. This must be done
1407 # after src/config.h is built, since we rely on that file. Only do the
1408 # build if "config.status" is present, since it's non-presence indicates
1411 if [ ! -f ./config.status ]; then
1415 # We discard all lines in Makefile.in that start with `# Generated' or /**/#
1416 # because some cpps get confused by them.
1417 # Really we should preserve them somehow into Makefile,
1418 # but that is beyond my level of shell programming.
1419 makefile_command='echo "creating src/Makefile";
1420 topsrcdir='"${topsrcdir}"';
1423 sed -e '\''s/^# Generated.*//'\'' -e '\''s%/\*\*/#.*%%'\'' < Makefile.in > junk.c;
1424 eval `echo ${CPP} -I. -I${topsrcdir}/src ${CPPFLAGS} junk.c \>junk.cpp`;
1426 ' sed -e '\''s/^#.*//'\'' '\
1427 ' -e '\''s/^[ \f\t][ \f\t]*$//'\'' '\
1428 ' -e '\''s/^ / /'\'' '\
1429 ' | sed -n -e '\''/^..*$/p'\'' '\
1431 chmod 444 Makefile.new;
1432 mv -f Makefile.new Makefile;
1433 rm -f junk.c junk.cpp;
1435 eval `echo $makefile_command`
1436 # AC-OUTPUT has created `config.status' already. We need to add the above
1437 # commands to re-create `src/Makefile', and we need to insert them before
1438 # the final "exit 0" which appears at the end of `config.status'.
1439 <config.status sed -e 's/^exit 0$//' >config.new
1440 echo $makefile_command >>config.new
1441 echo exit 0 >>config.new
1442 mv -f config.new config.status
1443 chmod +x config.status
1444 # Don't let the fact that we just rewrote config.status make Makefile think
1445 # that it is now newer. We have just rewritten all of the Makefiles as well.
1446 MFS="Makefile src/Makefile src/Makefile.in lib-src/Makefile oldXMenu/Makefile"
1447 for file in $MFS; do
1448 chmod a+w $file; touch $file; chmod 444 $file