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.
37 ### Since Emacs has configuration requirements that autoconf can't
38 ### meet, this file is an unholy marriage of custom-baked
39 ### configuration code and autoconf macros.
41 ### We use the m4 quoting characters [ ] (as established by the
42 ### autoconf system) to include large sections of raw sewage - Oops, I
43 ### mean, shell code - in the final configuration script.
45 ### Usage: configure config_name
47 ### If configure succeeds, it leaves its status in config.status.
48 ### If configure fails after disturbing the status quo,
49 ### config.status is removed.
52 ### Remove any more than one leading "." element from the path name.
53 ### If we don't remove them, then another "./" will be prepended to
54 ### the file name each time we use config.status, and the program name
55 ### will get larger and larger. This wouldn't be a problem, except
56 ### that since progname gets recorded in all the Makefiles this script
57 ### produces, move-if-change thinks they're different when they're
60 ### It would be nice if we could put the ./ in a \( \) group and then
61 ### apply the * operator to that, so we remove as many leading ./././'s
62 ### as are present, but some seds (like Ultrix's sed) don't allow you to
63 ### apply * to a \( \) group. Bleah.
64 progname="`echo $0 | sed 's:^\./\./:\./:'`"
69 short_usage="Usage: ${progname} CONFIGURATION [-OPTION[=VALUE] ...]
71 Set compilation and installation parameters for GNU Emacs, and report.
72 CONFIGURATION specifies the machine and operating system to build for.
73 --with-x Support the X Window System.
74 --with-x=no Don't support X.
75 --x-includes=DIR Search for X header files in DIR.
76 --x-libraries=DIR Search for X libraries in DIR.
77 --with-gcc Use GCC to compile Emacs.
78 --with-gcc=no Don't use GCC to compile Emacs.
79 --run-in-place Use libraries and data files directly out of the
81 --srcdir=DIR Look for source in DIR.
82 --prefix=DIR Install files below dir.
84 If successful, ${progname} leaves its status in config.status. If
85 unsuccessful after disturbing the status quo, it removes config.status."
88 #### Option processing.
90 ### Record all the arguments, so we can save them in config.status.
93 ### These values are used to comment and uncomment different values
94 ### for the path variables in the Makefile, to choose the installed
95 ### configuration or the run-in-place configuration.
96 rip_paths='#disabled# '
99 ### Establish some default values.
101 exec_prefix='${prefix}'
103 ### Don't use shift -- that destroys the argument list, which autoconf needs
104 ### to produce config.status. It turns out that "set - ${arguments}" doesn't
107 while [ $index -lt $# ]; do
108 index=`expr $index + 1`
109 arg=`eval echo '$'$index`
112 ## Anything starting with a hyphen we assume is an option.
115 ## Separate the switch name from the value it's being given.
118 opt=`echo ${arg} | sed 's:^-*\([^=]*\)=.*$:\1:'`
119 val=`echo ${arg} | sed 's:^-*[^=]*=\(.*\)$:\1:'`
123 ## If FOO is a boolean argument, --FOO is equivalent to
124 ## --FOO=yes. Otherwise, the value comes from the next
125 ## argument - see below.
126 opt=`echo ${arg} | sed 's:^-*\(.*\)$:\1:'`
132 ## Change `-' in the option name to `_'.
134 opt="`echo ${opt} | tr - _`"
136 ## Process the option.
139 ## Has the user specified which window systems they want to support?
140 "with_x" | "with_x11" | "with_x10" )
141 ## Make sure the value given was either "yes" or "no".
143 y | ye | yes ) val=yes ;;
146 (echo "${progname}: the \`--${optname}' option is supposed to have a boolean value.
147 Set it to either \`yes' or \`no'."
148 echo "${short_usage}") >&2
152 eval "${opt}=\"${val}\""
155 ## Has the user specified whether or not they want GCC?
156 "with_gcc" | "with_gnu_cc" )
157 ## Make sure the value given was either "yes" or "no".
159 y | ye | yes ) val=yes ;;
162 (echo "${progname}: the \`--${optname}' option is supposed to have a boolean value.
163 Set it to either \`yes' or \`no'."
164 echo "${short_usage}") >&2
168 eval "${opt}=\"${val}\""
171 ## Has the user specified a source directory?
173 ## If the value was omitted, get it from the next argument.
174 if [ "${valomitted}" = "yes" ]; then
175 ## Get the next argument from the argument list, if there is one.
176 if [ $index = $# ]; then
177 (echo "${progname}: You must give a value for the \`--${optname}' option, as in
178 \`--${optname}=FOO'."
179 echo "${short_usage}") >&2
182 index=`expr $index + 1`
183 val=`eval echo '$'$index`
188 ## Has the user tried to tell us where the X files are?
189 ## I think these are dopey, but no less than three alpha
190 ## testers, at large sites, have said they have their X files
191 ## installed in odd places.
193 ## If the value was omitted, get it from the next argument.
194 if [ "${valomitted}" = "yes" ]; then
195 ## Get the next argument from the argument list, if there is one.
196 if [ $index = $# ]; then
197 (echo "${progname}: You must give a value for the \`--${optname}' option, as in
198 \`--${optname}=FOO'."
199 echo "${short_usage}") >&2
202 index=`expr $index + 1`
203 val=`eval echo '$'$index`
208 ## If the value was omitted, get it from the next argument.
209 if [ "${valomitted}" = "yes" ]; then
210 ## Get the next argument from the argument list, if there is one.
211 if [ $index = $# ]; then
212 (echo "${progname}: You must give a value for the \`--${optname}' option, as in
213 \`--${optname}=FOO'."
214 echo "${short_usage}") >&2
217 index=`expr $index + 1`
218 val=`eval echo '$'$index`
223 ## Should this use the "development configuration"?
226 inst_paths='#disabled# '
229 ## Has the user specified an installation prefix?
231 ## If the value was omitted, get it from the next argument.
232 if [ "${valomitted}" = "yes" ]; then
233 ## Get the next argument from the argument list, if there is one.
234 if [ $index = $# ]; then
235 (echo "${progname}: You must give a value for the \`--${optname}' option, as in
236 \`--${optname}=FOO'."
237 echo "${short_usage}") >&2
240 index=`expr $index + 1`
241 val=`eval echo '$'$index`
246 ## Has the user specified an installation prefix?
248 ## If the value was omitted, get it from the next argument.
249 if [ "${valomitted}" = "yes" ]; then
250 ## Get the next argument from the argument list, if there is one.
251 if [ $index = $# ]; then
252 (echo "${progname}: You must give a value for the \`--${optname}' option, as in
253 \`--${optname}=FOO'."
254 echo "${short_usage}") >&2
257 index=`expr $index + 1`
258 val=`eval echo '$'$index`
263 ## Verbose flag, tested by autoconf macros.
268 ## Has the user asked for some help?
272 echo "${short_usage}" | more
274 echo "${short_usage}" | $PAGER
279 ## We ignore all other options silently.
283 ## Anything not starting with a hyphen we assume is a
284 ## configuration name.
292 if [ "${configuration}" = "" ]; then
293 echo '- You did not tell me what kind of host system you want to configure.
294 - I will attempt to guess the kind of system this is.' 1>&2
295 guesssys=`echo ${progname} | sed 's/configure$/config.guess/'`
296 if configuration=`${guesssys}` ; then
297 echo "- Looks like this is a ${configuration}" 1>&2
299 echo '- Failed to guess the system type. You need to tell me.' 1>&2
300 echo "${short_usage}" >&2
305 #### Decide where the source is.
308 ## If it's not specified, see if `.' or `..' might work.
310 confdir=`echo $0 | sed 's|//|/|' | sed 's|/[^/]*$||'`
311 if [ -f $confdir/src/lisp.h -a -f $confdir/lisp/version.el ]; then
314 if [ -f "./src/lisp.h" -a -f "./lisp/version.el" ]; then
317 if [ -f "../src/lisp.h" -a -f "../lisp/version.el" ]; then
321 ${progname}: Neither the current directory nor its parent seem to
322 contain the Emacs sources. If you do not want to build Emacs in its
323 source tree, you should run \`${progname}' in the directory in which
324 you wish to build Emacs, using its \`--srcdir' option to say where the
325 sources may be found."
326 echo "${short_usage}") >&2
333 ## Otherwise, check if the directory they specified is okay.
335 if [ ! -d "${srcdir}" -o ! -f "${srcdir}/src/lisp.h" -o ! -f "${srcdir}/lisp/version.el" ]; then
337 ${progname}: The directory specified with the \`--srcdir' option,
338 \`${srcdir}', doesn't seem to contain the Emacs sources. You should
339 either run the \`${progname}' script at the top of the Emacs source
340 tree, or use the \`--srcdir' option to specify where the Emacs sources
342 echo "${short_usage}") >&2
348 #### Make srcdir absolute, if it isn't already. It's important to
349 #### avoid running the path through pwd unnecessary, since pwd can
350 #### give you automounter prefixes, which can go away.
354 ## We may be able to use the $PWD environment variable to make this
355 ## absolute. But sometimes PWD is inaccurate.
356 if [ "${PWD}" != "" ] && [ "`(cd ${PWD} ; pwd)`" = "`pwd`" ] ; then
359 srcdir="`(cd ${srcdir}; pwd)`"
362 * ) srcdir="`(cd ${srcdir}; pwd)`" ;;
365 #### Check if the source directory already has a configured system in it.
366 if [ `pwd` != `(cd ${srcdir} && pwd)` ] \
367 && [ -f "${srcdir}/src/config.h" ] ; then
368 (echo "${progname}: WARNING: The directory tree \`${srcdir}' is being used"
369 echo " as a build directory right now; it has been configured in its own"
370 echo " right. To configure in another directory as well, you MUST"
371 echo " use GNU make. If you do not have GNU make, then you must"
372 echo " now do \`make distclean' in ${srcdir},"
373 echo " and then run ${progname} again.") >&2
374 # We need a multi-line sed script, which cannot go in a makefile.
375 vpath_sed='-f vpath.sed'
377 # Do the normal substitution for VPATH. This will not crash non-GNU make.
378 vpath_sed=]'AC_QUOTE_SQUOTE(AC_QUOTE_SQUOTE('-e '\''s|^\(VPATH *=\).*$$|\1 ='\''"${srcdir}/${subdir}|"'))'[
380 ] AC_SUBST(vpath_sed) [
382 ### Make the necessary directories, if they don't exist.
383 for dir in ./src ./lib-src ./cpp ./oldXMenu ./etc ; do
384 if [ ! -d ${dir} ]; then
389 #### Given the configuration name, set machfile and opsysfile to the
390 #### names of the m/*.h and s/*.h files we should use.
392 ### Canonicalize the configuration name.
393 echo "Checking the configuration name."
394 if canonical=`${srcdir}/config.sub "${configuration}"` ; then : ; else
398 ### If you add support for a new configuration, add code to this
399 ### switch statement to recognize your configuration name and select
400 ### the appropriate operating system and machine description files.
402 ### You would hope that you could choose an m/*.h file pretty much
403 ### based on the machine portion of the configuration name, and an s-
404 ### file based on the operating system portion. However, it turns out
405 ### that each m/*.h file is pretty manufacturer-specific - for
406 ### example, apollo.h, hp9000s300.h, mega68k, news.h, and tad68k are
407 ### all 68000 machines; mips.h, pmax.h, and news-risc are all MIPS
408 ### machines. So we basically have to have a special case for each
409 ### configuration name.
411 ### As far as handling version numbers on operating systems is
412 ### concerned, make sure things will fail in a fixable way. If
413 ### /etc/MACHINES doesn't say anything about version numbers, be
414 ### prepared to handle anything reasonably. If version numbers
415 ### matter, be sure /etc/MACHINES says something about it.
417 ### Eric Raymond says we should accept strings like "sysvr4" to mean
418 ### "System V Release 4"; he writes, "The old convention encouraged
419 ### confusion between `system' and `release' levels'."
421 machine='' opsys='' unported='false'
422 case "${canonical}" in
425 ## Strictly speaking, we need the version of the alliant operating
426 ## system to choose the right machine file, but currently the
427 ## configuration name doesn't tell us enough to choose the right
428 ## one; we need to give alliants their own operating system name to
429 ## do this right. When someone cares, they can help us.
431 machine=alliant4 opsys=bsd4-2
434 machine=alliant-2800 opsys=bsd4-3
439 machine=altos opsys=usg5-2
444 machine=amdahl opsys=usg5-2-2
447 ## Appallings - I mean, Apollos - running Domain
449 machine=apollo opsys=bsd4-2
452 ## AT&T 3b2, 3b5, 3b15, 3b20
454 machine=att3b opsys=usg5-2-2
457 ## AT&T 3b1 - The Mighty Unix PC!
459 machine=7300 opsys=usg5-2-2
464 machine=dpx2 opsys=usg5-3
469 machine=sps7 opsys=usg5-2
472 ## CCI 5/32, 6/32 -- see "Tahoe".
475 ## I don't know what configuration name to use for this; config.sub
476 ## doesn't seem to know anything about it. Hey, Celerity users, get
478 celerity-celerity-bsd* )
479 machine=celerity opsys=bsd4-2
483 ## What operating systems does this chip run that Emacs has been
487 ## We'll use the catch-all code at the bottom to guess the
493 machine=convex opsys=bsd4-3
498 machine=intel386 opsys=usg5-3
502 cydra*-cydrome-sysv* )
503 machine=cydra5 opsys=usg5-3
506 ## Data General AViiON Machines
508 machine=aviion opsys=dgux
512 mips-dec-ultrix[0-3].* | mips-dec-ultrix4.0* | mips-dec-bsd4.2* )
513 machine=pmax opsys=bsd4-2
515 mips-dec-ultrix* | mips-dec-bsd* )
516 machine=pmax opsys=bsd4-3
519 machine=pmax opsys=osf1
522 ## Motorola Delta machines
523 m68*-motorola-sysv* )
524 machine=delta opsys=usg5-3
526 m88k-motorola-sysv4* )
527 machine=delta88k opsys=usg5-4
529 m88k-motorola-sysv* | m88k-motorola-m88kbcs* )
530 machine=delta88k opsys=usg5-3
535 machine=dual opsys=usg5-2
538 machine=dual opsys=unipl5-2
543 machine=elxsi opsys=usg5-2
548 machine=ns16000 opsys=umax
551 ## The GEC 93 - apparently, this port isn't really finished yet.
553 ## Gould Power Node and NP1
555 machine=gould opsys=bsd4-2
558 machine=gould opsys=bsd4-3
561 machine=gould-np1 opsys=bsd4-3
565 xps*-honeywell-sysv* )
566 machine=xps100 opsys=usg5-2
569 ## HP 9000 series 200 or 300
571 machine=hp9000s300 opsys=bsd4-3
574 machine=hp9000s300 opsys=netbsd
576 ## HP/UX 7, 8 and 9 are supported on these machines.
579 ## Someone's system reports A.B8.05 for this.
580 ## I wonder what other possibilities there are.
581 *.B8.* ) machine=hp9000s300 opsys=hpux8 ;;
582 *.08.* ) machine=hp9000s300 opsys=hpux8 ;;
583 *.09.* ) machine=hp9000s300 opsys=hpux9 ;;
584 *) machine=hp9000s300 opsys=hpux ;;
588 ## HP 9000 series 700 and 800, running HP/UX
590 machine=hp9000s800 opsys=hpux
593 machine=hp9000s800 opsys=hpux8
596 machine=hp9000s800 opsys=hpux9
599 ## HP 9000 series 700 and 800, running HP/UX
601 ## Cross-compilation? Nah!
603 ## Someone's system reports A.B8.05 for this.
604 ## I wonder what other possibilities there are.
605 *.B8.* ) machine=hp9000s800 opsys=hpux8 ;;
606 *.08.* ) machine=hp9000s800 opsys=hpux8 ;;
607 *.09.* ) machine=hp9000s800 opsys=hpux9 ;;
608 *) machine=hp9000s800 opsys=hpux ;;
614 machine=orion opsys=bsd4-2
617 machine=orion105 opsys=bsd4-2
622 machine=ibmps2-aix opsys=usg5-2-2
624 i386-ibm-aix1.[23]* | i386-ibm-aix* )
625 machine=ibmps2-aix opsys=usg5-3
628 machine=ibm370aix opsys=usg5-3
631 machine=ibmrs6000 opsys=aix3-1
633 rs6000-ibm-aix3.2* | rs6000-ibm-aix* )
634 machine=ibmrs6000 opsys=aix3-2
637 machine=ibmrt opsys=bsd4-3
640 machine=ibmrt opsys=bsd4-2
643 machine=ibmrt opsys=bsd4-3
646 machine=ibmrt opsys=bsd4-2
649 machine=ibmrt opsys=bsd4-3
652 machine=ibmrt opsys=bsd4-3
655 machine=ibmrt-aix opsys=usg5-2-2
658 ## Integrated Solutions `Optimum V'
660 machine=isi-ov opsys=bsd4-2
663 machine=isi-ov opsys=bsd4-3
666 ## Intel 386 machines where we do care about the manufacturer
667 i[34]86-intsys-sysv* )
668 machine=is386 opsys=usg5-2-2
673 machine=i386 opsys=usg5-3
678 machine=symmetry opsys=bsd4-3
683 machine=i860 opsys=usg5-4
686 ## Silicon Graphics machines
687 ## Iris 2500 and Iris 2500 Turbo (aka the Iris 3030)
689 machine=irist opsys=iris3-5
691 m68*-sgi-iris3.6* | m68*-sgi-iris*)
692 machine=irist opsys=iris3-6
696 machine=iris4d opsys=irix3-3
699 machine=iris4d opsys=irix5-0
701 mips-sgi-irix4.* | mips-sgi-irix* )
702 machine=iris4d opsys=irix4-0
707 machine=masscomp opsys=rtu
712 machine=mega68 opsys=bsd4-2
715 ## Workstations sold by MIPS
716 ## This is not necessarily all workstations using the MIPS processor -
717 ## Irises are produced by SGI, and DECstations by DEC.
719 ## etc/MACHINES lists mips.h and mips4.h as possible machine files,
720 ## and usg5-2-2 and bsd4-3 as possible OS files. The only guidance
721 ## it gives for choosing between the alternatives seems to be "Use
722 ## -machine=mips4 for RISCOS version 4; use -opsystem=bsd4-3 with
723 ## the BSD world." I'll assume that these are instructions for
724 ## handling two odd situations, and that every other situation
725 ## should use mips.h and usg5-2-2, they being listed first.
728 ## Fall through to the general code at the bottom to decide on the OS.
731 machine=mips4 opsys=bsd4-3
734 machine=mips opsys=bsd4-3
737 machine=mips opsys=usg5-2-2
741 m68*-next-mach* | m68*-next-bsd* )
742 machine=next opsys=mach2
745 ## The complete machine from National Semiconductor
747 machine=ns32000 opsys=usg5-2
751 m68*-ncr-sysv2* | m68*-ncr-sysvr2* )
752 machine=tower32 opsys=usg5-2-2
754 m68*-ncr-sysv3* | m68*-ncr-sysvr3* )
755 machine=tower32v3 opsys=usg5-3
760 machine=targon31 opsys=usg5-2-2
765 machine=nu opsys=usg5-2
770 machine=plexus opsys=usg5-2
774 ## I don't really have any idea what sort of processor the Pyramid has,
775 ## so I'm assuming it is its own architecture.
776 pyramid-pyramid-bsd* )
777 machine=pyramid opsys=bsd4-2
781 ns32k-sequent-bsd4.2* )
782 machine=sequent opsys=bsd4-2
784 ns32k-sequent-bsd4.3* )
785 machine=sequent opsys=bsd4-3
790 machine=news opsys=bsd4-2
793 machine=news opsys=bsd4-3
796 machine=news opsys=bsd4-3
799 machine=news-risc opsys=bsd4-3
804 machine=stride opsys=usg5-2
808 *-sun-sunos* | *-sun-bsd* | *-sun-solaris* )
809 case "${canonical}" in
810 m68*-sunos1* ) machine=sun1 ;;
811 m68*-sunos2* ) machine=sun2 ;;
812 m68* ) machine=sun3 ;;
813 i[34]86* ) machine=sun386 ;;
814 sparc* ) machine=sparc ;;
817 case "${canonical}" in
818 ## The Sun386 didn't get past 4.0.
819 i386-*-sunos4 ) opsys=sunos4-0 ;;
820 *-sunos4.0* ) opsys=sunos4-0 ;;
821 *-sunos4.1.3* ) opsys=sunos4-1-3 ;;
822 *-sunos4* | *-sunos ) opsys=sunos4-1 ;;
823 *-sunos5* | *-solaris* ) opsys=sol2 ;;
830 machine=tad68k opsys=usg5-3
834 tahoe-tahoe-bsd4.2* )
835 machine=tahoe opsys=bsd4-2
837 tahoe-tahoe-bsd4.3* )
838 machine=tahoe opsys=bsd4-3
841 ## Tandem Integrity S2
843 machine=tandem-s2 opsys=usg5-3
847 m88k-tektronix-sysv3* )
848 machine=tekxd88 opsys=usg5-3
851 ## Tektronix 16000 box (6130?)
852 ns16k-tektronix-bsd* )
853 machine=ns16000 opsys=bsd4-2
856 ## src/m/tek4300.h hints that this is a m68k machine.
857 m68*-tektronix-bsd* )
858 machine=tek4300 opsys=bsd4-3
862 ## We seem to have lost the machine-description file titan.h!
864 machine=titan opsys=usg5-3
867 ## Ustation E30 (SS5E)
868 m68*-unisys-uniplus* )
869 machine=ustation opsystem=unipl5-2
875 case "${canonical}" in
876 *-bsd4.1* ) opsys=bsd4-1 ;;
877 *-bsd4.2* | *-ultrix[0-3].* | *-ultrix4.0* ) opsys=bsd4-2 ;;
878 *-bsd4.3* | *-ultrix* ) opsys=bsd4-3 ;;
879 *-bsd386* ) opsys=bsd386 ;;
880 *-sysv[01]* | *-sysvr[01]* ) opsys=usg5-0 ;;
881 *-sysv2* | *-sysvr2* ) opsys=usg5-2 ;;
882 *-vms* ) opsys=vms ;;
888 ns16k-whitechapel-* )
890 ## We don't know what sort of OS runs on these; we'll let the
891 ## operating system guessing code below try.
896 machine=wicat opsys=usg5-2
899 ## Intel 386 machines where we don't care about the manufacturer
902 case "${canonical}" in
903 *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
904 *-isc2.2* ) opsys=isc2-2 ;;
905 *-isc* ) opsys=isc3-0 ;;
906 *-esix5* ) opsys=esix5r4 ;;
907 *-esix* ) opsys=esix ;;
908 *-xenix* ) opsys=xenix ;;
909 *-linux* ) opsys=linux ;;
910 *-sco3.2v4* ) opsys=sco4 ;;
911 *-bsd386* ) opsys=bsd386 ;;
912 *-386bsd* ) opsys=386bsd ;;
913 *-netbsd* ) opsys=netbsd ;;
914 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
923 ### If the code above didn't choose an operating system, just choose
924 ### an operating system based on the configuration name. You really
925 ### only want to use this when you have no idea what the right
926 ### operating system is; if you know what operating systems a machine
927 ### runs, it's cleaner to make it explicit in the case statement
929 if [ x"${opsys}" = x ]; then
930 case "${canonical}" in
931 *-bsd4.[01] ) opsys=bsd4-1 ;;
932 *-bsd4.2 ) opsys=bsd4-2 ;;
933 *-bsd4.3 ) opsys=bsd4-3 ;;
934 *-sysv0 | *-sysvr0 ) opsys=usg5-0 ;;
935 *-sysv2 | *-sysvr2 ) opsys=usg5-2 ;;
936 *-sysv2.2 | *-sysvr2.2 ) opsys=usg5-2-2 ;;
937 *-sysv3 | *-sysvr3 ) opsys=usg5-3 ;;
938 *-sysv4 | *-sysvr4 ) opsys=usg5-4 ;;
939 *-sysv4.2 | *-sysvr4.2 ) opsys=usg5-4-2 ;;
947 (echo "${progname}: Emacs hasn't been ported to \`${canonical}' systems."
948 echo "${progname}: Check \`etc/MACHINES' for recognized configuration names."
953 machfile="m/${machine}.h"
954 opsysfile="s/${opsys}.h"
958 AC_CONFIG_HEADER(src/config.h)
961 #### Choose a compiler.
963 "yes" ) CC="gcc" GCC=1 ;;
969 #### Some other nice autoconf tests. If you add a test here which
970 #### should make an entry in src/config.h, don't forget to add an
971 #### #undef clause to src/config.h.in for autoconf to modify.
973 dnl checks for programs
979 dnl checks for UNIX variants that set `DEFS'
981 dnl checks for header files
982 AC_HAVE_HEADERS(sys/timeb.h sys/time.h)
984 AC_TIME_WITH_SYS_TIME
986 dnl checks for typedefs
989 dnl checks for structure members
993 dnl checks for compiler characteristics
996 dnl checks for operating system services
999 dnl other checks for UNIX variants
1003 #### Choose a window system.
1004 echo "Checking window system."
1009 window_system=${window_system}x11
1012 window_system=${window_system}none
1014 case "${with_x11}" in
1016 window_system=${window_system}x11
1019 case "${with_x10}" in
1021 window_system=${window_system}x10
1025 case "${window_system}" in
1026 "none" | "x11" | "x10" ) ;;
1028 # --x-includes or --x-libraries implies --with-x11.
1029 if [ -n "${x_includes}" ] || [ -n "${x_libraries}" ]; then
1032 echo " No window system specified. Looking for X11."
1033 # If the user didn't specify a window system and we found X11, use it.
1034 if [ -r /usr/lib/libX11.a \
1035 -o -d /usr/include/X11 \
1036 -o -d /usr/X386/include \
1037 -o -d ${x_includes}/X11 ]; then
1043 echo "Don't specify a window system more than once." >&2
1048 case "${window_system}" in
1050 ### If the user hasn't specified where we should find X, try
1051 ### letting autoconf figure that out.
1052 if [ -z "${x_includes}" ] && [ -z "${x_libraries}" ]; then
1057 if [ -n "${x_includes}" ] || [ -n "${x_libraries}" ]; then
1063 [ -z "${window_system}" ] && window_system=none
1065 [ -n "${x_libraries}" ] && LD_SWITCH_X_SITE="-L${x_libraries}"
1066 [ -n "${x_includes}" ] && C_SWITCH_X_SITE="-I${x_includes}"
1068 case "${window_system}" in
1082 echo " Using no window system."
1086 ### If we're using X11, we should use the X menu package.
1094 #### Extract some information from the operating system and machine files.
1096 echo "Examining the machine- and system-dependent files to find out"
1097 echo " - which libraries the lib-src programs will want, and"
1098 echo " - whether the GNU malloc routines are usable."
1100 ### It's not important that this name contain the PID; you can't run
1101 ### two configures in the same directory and have anything work
1103 tempcname="conftest.c"
1106 #include "'${srcdir}'/src/'${opsysfile}'"
1107 #include "'${srcdir}'/src/'${machfile}'"
1108 #ifndef LIBS_MACHINE
1109 #define LIBS_MACHINE
1114 #ifndef C_SWITCH_SYSTEM
1115 #define C_SWITCH_SYSTEM
1117 configure___ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM
1118 configure___ c_switch_system=C_SWITCH_SYSTEM
1121 #define LIB_X11_LIB -lX11
1124 #ifndef LIBX11_MACHINE
1125 #define LIBX11_MACHINE
1128 #ifndef LIBX11_SYSTEM
1129 #define LIBX11_SYSTEM
1131 configure___ LIBX=LIB_X11_LIB LIBX11_MACHINE LIBX11_SYSTEM
1134 configure___ unexec=UNEXEC
1136 configure___ unexec=unexec.o
1139 #ifdef SYSTEM_MALLOC
1140 configure___ system_malloc=yes
1142 configure___ system_malloc=no
1145 #ifndef C_DEBUG_SWITCH
1146 #define C_DEBUG_SWITCH -g
1149 #ifndef C_OPTIMIZE_SWITCH
1150 #define C_OPTIMIZE_SWITCH -O
1154 configure___ CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH
1156 configure___ CFLAGS=C_DEBUG_SWITCH
1159 # The value of CPP is a quoted variable reference, so we need to do this
1160 # to get its actual value...
1161 CPP=`eval "echo $CPP"`
1162 eval `${CPP} -Isrc ${tempcname} \
1163 | grep 'configure___' \
1164 | sed -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/'`
1167 ### Compute the unexec source name from the object name.
1168 UNEXEC_SRC="`echo ${unexec} | sed 's/\.o/.c/'`"
1170 # Do the opsystem or machine files prohibit the use of the GNU malloc?
1171 # Assume not, until told otherwise.
1173 if [ "${system_malloc}" = "yes" ]; then
1176 (The GNU allocators don't work with this system configuration.)"
1179 if [ x"${REL_ALLOC}" = x ]; then
1180 REL_ALLOC=${GNU_MALLOC}
1186 #### Add the libraries to LIBS and check for some functions.
1189 DEFS="$c_switch_system $DEFS"
1192 dnl If found, this defines HAVE_LIBDNET, which m/pmax.h checks,
1193 dnl and also adds -ldnet to LIBS, which Autoconf uses for checks.
1194 AC_HAVE_LIBRARY(-ldnet)
1196 AC_HAVE_LIBRARY(-lXbsd, LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd")
1198 echo checking for XFree86
1199 if test -d /usr/X386/include; then
1201 test -z "${C_SWITCH_X_SITE}" && C_SWITCH_X_SITE="-I/usr/X386/include"
1204 if test "${HAVE_X11}" = "yes"; then
1205 DEFS="$C_SWITCH_X_SITE $DEFS"
1206 LIBS="$LD_SWITCH_X_SITE $LIBX $LIBS"
1207 AC_HAVE_FUNCS(XrmSetDatabase XScreenResourceString XScreenNumberOfScreen)
1212 # logb and frexp are found in -lm on most systems.
1213 AC_HAVE_LIBRARY(-lm)
1214 AC_HAVE_FUNCS(gettimeofday gethostname dup2 rename closedir mkdir rmdir random bcopy logb frexp ftime res_init)
1217 AC_FUNC_CHECK(socket, , ok_so_far=)
1218 if test -n "$ok_so_far"; then
1219 AC_HEADER_CHECK(netinet/in.h, , ok_so_far=)
1221 if test -n "$ok_so_far"; then
1222 AC_HEADER_CHECK(arpa/inet.h, , ok_so_far=)
1224 if test -n "$ok_so_far"; then
1225 AC_DEFINE(HAVE_INET_SOCKETS)
1228 #### Find out which version of Emacs this is.
1229 version=`grep 'defconst[ ]*emacs-version' ${srcdir}/lisp/version.el \
1230 | sed -e 's/^.*"\([0-9][0-9]*\.[0-9][0-9]*\)\..*$/\1/'`
1231 if [ x"${version}" = x ]; then
1232 echo "${progname}: can't find current emacs version in
1233 \`${srcdir}/lisp/version.el'." >&2
1237 if [ -f /usr/lpp/X11/bin/smt.exp ]; then
1239 AC_DEFINE(HAVE_AIX_SMT_EXP)
1244 #### Specify what sort of things we'll be editing into Makefile and config.h.
1245 ### Use configuration here uncanonicalized to avoid exceeding size limits.
1247 AC_SUBST(configuration)
1250 AC_SUBST(c_switch_system)
1251 AC_SUBST(libsrc_libs)
1253 AC_SUBST(inst_paths)
1254 AC_SUBST(LD_SWITCH_X_SITE)
1255 AC_SUBST(C_SWITCH_X_SITE)
1258 AC_SUBST(exec_prefix)
1260 AC_DEFINE_UNQUOTED(config_machfile, "\"${machfile}\"")
1261 AC_DEFINE_UNQUOTED(config_opsysfile, "\"${opsysfile}\"")
1262 AC_DEFINE_UNQUOTED(LD_SWITCH_X_SITE, ${LD_SWITCH_X_SITE})
1263 AC_DEFINE_UNQUOTED(C_SWITCH_X_SITE, ${C_SWITCH_X_SITE})
1264 AC_DEFINE_UNQUOTED(UNEXEC_SRC, ${UNEXEC_SRC})
1267 if [ "${HAVE_X_WINDOWS}" = "yes" ] ; then
1268 ] AC_DEFINE(HAVE_X_WINDOWS) [
1270 if [ "${HAVE_X11}" = "yes" ] ; then
1271 ] AC_DEFINE(HAVE_X11) [
1273 if [ "${HAVE_XFREE386}" = "yes" ] ; then
1274 ] AC_DEFINE(HAVE_XFREE386) [
1276 if [ "${HAVE_X_MENU}" = "yes" ] ; then
1277 ] AC_DEFINE(HAVE_X_MENU) [
1279 if [ "${GNU_MALLOC}" = "yes" ] ; then
1280 ] AC_DEFINE(GNU_MALLOC) [
1282 if [ "${REL_ALLOC}" = "yes" ] ; then
1283 ] AC_DEFINE(REL_ALLOC) [
1285 if [ "${LISP_FLOAT_TYPE}" = "yes" ] ; then
1286 ] AC_DEFINE(LISP_FLOAT_TYPE) [
1290 #### Report on what we decided to do.
1293 Configured for \`${canonical}'.
1295 Where should the build process find the source code? ${srcdir}
1296 What operating system and machine description files should Emacs use?
1297 \`${opsysfile}' and \`${machfile}'
1298 What compiler should emacs be built with? ${CC} ${CFLAGS}
1299 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
1300 Should Emacs use the relocating allocator for buffers? ${REL_ALLOC}
1301 What window system should Emacs use? ${window_system}${x_includes+
1302 Where do we find X Windows header files? }${x_includes}${x_libraries+
1303 Where do we find X Windows libraries? }${x_libraries}
1307 # Remove any trailing slashes in these variables.
1308 test -n "${prefix}" &&
1309 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
1310 test -n "${exec_prefix}" &&
1311 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`