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`
206 C_SWITCH_X_SITE="-I${x_includes}"
209 ## If the value was omitted, get it from the next argument.
210 if [ "${valomitted}" = "yes" ]; then
211 ## Get the next argument from the argument list, if there is one.
212 if [ $index = $# ]; then
213 (echo "${progname}: You must give a value for the \`--${optname}' option, as in
214 \`--${optname}=FOO'."
215 echo "${short_usage}") >&2
218 index=`expr $index + 1`
219 val=`eval echo '$'$index`
222 LD_SWITCH_X_SITE="-L${x_libraries}"
225 ## Should this use the "development configuration"?
228 inst_paths='#disabled# '
231 ## Has the user specified an installation prefix?
233 ## If the value was omitted, get it from the next argument.
234 if [ "${valomitted}" = "yes" ]; then
235 ## Get the next argument from the argument list, if there is one.
236 if [ $index = $# ]; then
237 (echo "${progname}: You must give a value for the \`--${optname}' option, as in
238 \`--${optname}=FOO'."
239 echo "${short_usage}") >&2
242 index=`expr $index + 1`
243 val=`eval echo '$'$index`
248 ## Has the user specified an installation prefix?
250 ## If the value was omitted, get it from the next argument.
251 if [ "${valomitted}" = "yes" ]; then
252 ## Get the next argument from the argument list, if there is one.
253 if [ $index = $# ]; then
254 (echo "${progname}: You must give a value for the \`--${optname}' option, as in
255 \`--${optname}=FOO'."
256 echo "${short_usage}") >&2
259 index=`expr $index + 1`
260 val=`eval echo '$'$index`
265 ## Has the user asked for some help?
267 echo "${short_usage}" | more
271 ## We ignore all other options silently.
275 ## Anything not starting with a hyphen we assume is a
276 ## configuration name.
284 if [ "${configuration}" = "" ]; then
285 echo '- You did not tell me what kind of host system you want to configure.
286 - I will attempt to guess the kind of system this is.' 1>&2
287 guesssys=`echo ${progname} | sed 's/configure$/config.guess/'`
288 if configuration=`${guesssys}` ; then
289 echo "- Looks like this is a ${configuration}" 1>&2
291 echo '- Failed to guess the system type. You need to tell me.' 1>&2
292 echo "${short_usage}" >&2
297 #### Decide where the source is.
300 ## If it's not specified, see if `.' or `..' might work.
302 confdir=`echo $0 | sed 's|//|/|' | sed 's|/[^/]*$||'`
303 if [ -f $confdir/src/lisp.h -a -f $confdir/lisp/version.el ]; then
306 if [ -f "./src/lisp.h" -a -f "./lisp/version.el" ]; then
309 if [ -f "../src/lisp.h" -a -f "../lisp/version.el" ]; then
313 ${progname}: Neither the current directory nor its parent seem to
314 contain the Emacs sources. If you do not want to build Emacs in its
315 source tree, you should run \`${progname}' in the directory in which
316 you wish to build Emacs, using its \`--srcdir' option to say where the
317 sources may be found."
318 echo "${short_usage}") >&2
325 ## Otherwise, check if the directory they specified is okay.
327 if [ ! -d "${srcdir}" -o ! -f "${srcdir}/src/lisp.h" -o ! -f "${srcdir}/lisp/version.el" ]; then
329 ${progname}: The directory specified with the \`--srcdir' option,
330 \`${srcdir}', doesn't seem to contain the Emacs sources. You should
331 either run the \`${progname}' script at the top of the Emacs source
332 tree, or use the \`--srcdir' option to specify where the Emacs sources
334 echo "${short_usage}") >&2
340 #### Make srcdir absolute, if it isn't already. It's important to
341 #### avoid running the path through pwd unnecessary, since pwd can
342 #### give you automounter prefixes, which can go away.
346 ## We may be able to use the $PWD environment variable to make this
347 ## absolute. But sometimes PWD is inaccurate.
348 if [ "${PWD}" != "" ] && [ "`(cd ${PWD} ; pwd)`" = "`pwd`" ] ; then
351 srcdir="`(cd ${srcdir}; pwd)`"
354 * ) srcdir="`(cd ${srcdir}; pwd)`" ;;
357 #### Make sure that the source directory doesn't already have a
358 #### configured system in it.
359 if [ `pwd` != `(cd ${srcdir} && pwd)` ] \
360 && [ -f "${srcdir}/src/config.h" ] ; then
361 (echo "${progname}: the directory tree \`${srcdir}' is being used"
362 echo " as a build directory right now; it has been configured in its own"
363 echo " right. You can't use srcdir in this situation.") >&2
367 ### Make the necessary directories, if they don't exist.
368 if [ ! -d ./src ]; then
371 if [ ! -d ./lib-src ]; then
374 if [ ! -d ./cpp ]; then
377 if [ ! -d ./oldXMenu ]; then
380 if [ ! -d ./etc ]; then
384 #### Given the configuration name, set machfile and opsysfile to the
385 #### names of the m/*.h and s/*.h files we should use.
387 ### Canonicalize the configuration name.
388 echo "Checking the configuration name."
389 if configuration=`${srcdir}/config.sub "${configuration}"` ; then : ; else
393 ### If you add support for a new configuration, add code to this
394 ### switch statement to recognize your configuration name and select
395 ### the appropriate operating system and machine description files.
397 ### You would hope that you could choose an m/*.h file pretty much
398 ### based on the machine portion of the configuration name, and an s-
399 ### file based on the operating system portion. However, it turns out
400 ### that each m/*.h file is pretty manufacturer-specific - for
401 ### example, apollo.h, hp9000s300.h, mega68k, news.h, and tad68k are
402 ### all 68000 machines; mips.h, pmax.h, and news-risc are all MIPS
403 ### machines. So we basically have to have a special case for each
404 ### configuration name.
406 ### As far as handling version numbers on operating systems is
407 ### concerned, make sure things will fail in a fixable way. If
408 ### /etc/MACHINES doesn't say anything about version numbers, be
409 ### prepared to handle anything reasonably. If version numbers
410 ### matter, be sure /etc/MACHINES says something about it.
412 ### Eric Raymond says we should accept strings like "sysvr4" to mean
413 ### "System V Release 4"; he writes, "The old convention encouraged
414 ### confusion between `system' and `release' levels'."
416 machine='' opsys='' unported='false'
417 case "${configuration}" in
420 ## Strictly speaking, we need the version of the alliant operating
421 ## system to choose the right machine file, but currently the
422 ## configuration name doesn't tell us enough to choose the right
423 ## one; we need to give alliants their own operating system name to
424 ## do this right. When someone cares, they can help us.
426 machine=alliant4 opsys=bsd4-2
429 machine=alliant-2800 opsys=bsd4-3
434 machine=altos opsys=usg5-2
439 machine=amdahl opsys=usg5-2-2
442 ## Appallings - I mean, Apollos - running Domain
444 machine=apollo opsys=bsd4-2
447 ## AT&T 3b2, 3b5, 3b15, 3b20
449 machine=att3b opsys=usg5-2-2
452 ## AT&T 3b1 - The Mighty Unix PC!
454 machine=7300 opsys=usg5-2-2
459 machine=sps7 opsys=usg5-2
462 ## CCI 5/32, 6/32 -- see "Tahoe".
465 ## I don't know what configuration name to use for this; config.sub
466 ## doesn't seem to know anything about it. Hey, Celerity users, get
468 celerity-celerity-bsd* )
469 machine=celerity opsys=bsd4-2
473 ## What operating systems does this chip run that Emacs has been
477 ## We'll use the catch-all code at the bottom to guess the
483 machine=convex opsys=bsd4-3
488 machine=intel386 opsys=usg5-3
492 cydra*-cydrome-sysv* )
493 machine=cydra5 opsys=usg5-3
496 ## Data General AViiON Machines
498 machine=aviion opsys=dgux
502 mips-dec-ultrix[0-3].* | mips-dec-ultrix4.0 | mips-dec-bsd4.2 )
503 machine=pmax opsys=bsd4-2
505 mips-dec-ultrix* | mips-dec-bsd* )
506 machine=pmax opsys=bsd4-3
509 machine=pmax opsys=osf1
512 ## Motorola Delta machines
513 m68*-motorola-sysv* )
514 machine=delta opsys=usg5-3
516 m88k-motorola-sysv* | m88k-motorola-m88kbcs* )
517 machine=delta88k opsys=usg5-3
522 machine=dual opsys=usg5-2
525 machine=dual opsys=unipl5-2
530 machine=elxsi opsys=usg5-2
535 machine=ns16000 opsys=umax
538 ## The GEC 93 - apparently, this port isn't really finished yet.
540 ## Gould Power Node and NP1
542 machine=gould opsys=bsd4-2
545 machine=gould opsys=bsd4-3
548 machine=gould-np1 opsys=bsd4-3
552 xps*-honeywell-sysv* )
553 machine=xps100 opsys=usg5-2
556 ## HP 9000 series 200 or 300
558 machine=hp9000s300 opsys=bsd4-3
560 ## HP/UX 8 doesn't run on these machines, so use HP/UX 7.
562 machine=hp9000s300 opsys=hpux
565 ## HP 9000 series 700 and 800, running HP/UX
567 machine=hp9000s800 opsys=hpux
570 machine=hp9000s800 opsys=hpux8
573 machine=hp9000s800 opsys=hpux9
576 ## HP 9000 series 700 and 800, running HP/UX
578 ## Cross-compilation? Nah!
580 *.08.* ) machine=hp9000s800 opsys=hpux8 ;;
581 *.09.* ) machine=hp9000s800 opsys=hpux9 ;;
582 *) machine=hp9000s800 opsys=hpux ;;
588 machine=orion opsys=bsd4-2
591 machine=orion105 opsys=bsd4-2
596 machine=ibmps2-aix opsys=usg5-2-2
598 i386-ibm-aix1.[23] | i386-ibm-aix* )
599 machine=ibmps2-aix opsys=usg5-3
602 machine=ibmrs6000 opsys=aix3-1
604 rs6000-ibm-aix3.2 | rs6000-ibm-aix* )
605 machine=ibmrs6000 opsys=aix3-2
608 machine=ibmrt opsys=bsd4-3
611 machine=ibmrt opsys=bsd4-2
614 machine=ibmrt opsys=bsd4-3
617 machine=ibmrt opsys=bsd4-2
620 machine=ibmrt opsys=bsd4-3
623 machine=ibmrt opsys=bsd4-3
626 machine=ibmrt-aix opsys=usg5-2-2
629 ## Integrated Solutions `Optimum V'
631 machine=isi-ov opsys=bsd4-2
634 machine=isi-ov opsys=bsd4-3
637 ## Intel 386 machines where we do care about the manufacturer
638 i[34]86-intsys-sysv* )
639 machine=is386 opsys=usg5-2-2
644 machine=i386 opsys=usg5-3
649 machine=symmetry opsys=bsd4-3
652 ## Intel 386 machines where we don't care about the manufacturer
655 case "${configuration}" in
656 *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
657 *-isc2.2 ) opsys=isc2-2 ;;
658 *-isc* ) opsys=isc3-0 ;;
659 *-esix5* ) opsys=esix5r4 ;;
660 *-esix* ) opsys=esix ;;
661 *-xenix* ) opsys=xenix ;;
662 *-linux* ) opsys=linux ;;
663 *-sco3.2v4* ) opsys=sco4 ;;
664 *-bsd386* ) opsys=bsd386 ;;
665 *-386bsd ) opsys=386bsd ;;
666 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
672 machine=i860 opsys=usg5-4
675 ## Silicon Graphics machines
676 ## Iris 2500 and Iris 2500 Turbo (aka the Iris 3030)
678 machine=irist opsys=iris3-5
680 m68*-sgi-iris3.6 | m68*-sgi-iris*)
681 machine=irist opsys=iris3-6
685 machine=iris4d opsys=irix3-3
687 mips-sgi-irix4.* | mips-sgi-irix* )
688 machine=iris4d opsys=irix4-0
693 machine=masscomp opsys=rtu
698 machine=mega68 opsys=bsd4-2
701 ## Workstations sold by MIPS
702 ## This is not necessarily all workstations using the MIPS processor -
703 ## Irises are produced by SGI, and DECstations by DEC.
705 ## etc/MACHINES lists mips.h and mips4.h as possible machine files,
706 ## and usg5-2-2 and bsd4-3 as possible OS files. The only guidance
707 ## it gives for choosing between the alternatives seems to be "Use
708 ## -machine=mips4 for RISCOS version 4; use -opsystem=bsd4-3 with
709 ## the BSD world." I'll assume that these are instructions for
710 ## handling two odd situations, and that every other situation
711 ## should use mips.h and usg5-2-2, they being listed first.
714 ## Fall through to the general code at the bottom to decide on the OS.
717 machine=mips4 opsys=bsd4-3
720 machine=mips opsys=bsd4-3
723 machine=mips opsys=usg5-2-2
727 m68*-next-mach* | m68*-next-bsd* )
728 machine=next opsys=mach2
731 ## The complete machine from National Semiconductor
733 machine=ns32000 opsys=usg5-2
737 m68*-ncr-sysv2* | m68*-ncr-sysvr2* )
738 machine=tower32 opsys=usg5-2-2
740 m68*-ncr-sysv3* | m68*-ncr-sysvr3* )
741 machine=tower32v3 opsys=usg5-3
746 machine=targon31 opsys=usg5-2-2
751 machine=nu opsys=usg5-2
756 machine=plexus opsys=usg5-2
760 ## I don't really have any idea what sort of processor the Pyramid has,
761 ## so I'm assuming it is its own architecture.
762 pyramid-pyramid-bsd* )
763 machine=pyramid opsys=bsd4-2
767 ns32k-sequent-bsd4.2 )
768 machine=sequent opsys=bsd4-2
770 ns32k-sequent-bsd4.3 )
771 machine=sequent opsys=bsd4-3
776 machine=news opsys=bsd4-2
779 machine=news opsys=bsd4-3
782 machine=news-risc opsys=bsd4-3
787 machine=stride opsys=usg5-2
791 *-sun-sunos* | *-sun-bsd* | *-sun-solaris* )
792 case "${configuration}" in
793 m68*-sunos1* ) machine=sun1 ;;
794 m68*-sunos2* ) machine=sun2 ;;
795 m68* ) machine=sun3 ;;
796 i[34]86* ) machine=sun386 ;;
797 sparc* ) machine=sparc ;;
800 case "${configuration}" in
801 *-sunos4.0* ) opsys=sunos4-0 ;;
802 *-sunos4.1.3* ) opsys=sunos4-1-3 ;;
803 *-sunos4* | *-sunos ) opsys=sunos4-1 ;;
804 *-sunos5* | *-solaris* ) opsys=sol2 ;;
811 machine=tad68k opsys=usg5-3
816 machine=tahoe opsys=bsd4-2
819 machine=tahoe opsys=bsd4-3
822 ## Tandem Integrity S2
824 machine=tandem-s2 opsys=usg5-3
828 m88k-tektronix-sysv3 )
829 machine=tekXD88 opsys=usg5-3
832 ## Tektronix 16000 box (6130?)
833 ns16k-tektronix-bsd* )
834 machine=ns16000 opsys=bsd4-2
837 ## src/m/tek4300.h hints that this is a m68k machine.
838 m68*-tektronix-bsd* )
839 machine=tex4300 opsys=bsd4-3
843 ## We seem to have lost the machine-description file titan.h!
845 machine=titan opsys=usg5-3
848 ## Ustation E30 (SS5E)
849 m68*-unisys-uniplus* )
850 machine=ustation opsystem=unipl5-2
856 case "${configuration}" in
857 *-bsd4.1 ) opsys=bsd4-1 ;;
858 *-bsd4.2 | *-ultrix[0-3].* | *-ultrix4.0 ) opsys=bsd4-2 ;;
859 *-bsd4.3 | *-ultrix* ) opsys=bsd4-3 ;;
860 *-bsd386 ) opsys=bsd386 ;;
861 *-sysv[01]* | *-sysvr[01]* ) opsys=usg5-0 ;;
862 *-sysv2* | *-sysvr2* ) opsys=usg5-2 ;;
863 *-vms* ) opsys=vms ;;
869 ns16k-whitechapel-* )
871 ## We don't know what sort of OS runs on these; we'll let the
872 ## operating system guessing code below try.
877 machine=wicat opsys=usg5-2
885 ### If the code above didn't choose an operating system, just choose
886 ### an operating system based on the configuration name. You really
887 ### only want to use this when you have no idea what the right
888 ### operating system is; if you know what operating systems a machine
889 ### runs, it's cleaner to make it explicit in the case statement
891 if [ x"${opsys}" = x ]; then
892 case "${configuration}" in
893 *-bsd4.[01] ) opsys=bsd4-1 ;;
894 *-bsd4.2 ) opsys=bsd4-2 ;;
895 *-bsd4.3 ) opsys=bsd4-3 ;;
896 *-sysv0 | *-sysvr0 ) opsys=usg5-0 ;;
897 *-sysv2 | *-sysvr2 ) opsys=usg5-2 ;;
898 *-sysv2.2 | *-sysvr2.2 ) opsys=usg5-2-2 ;;
899 *-sysv3 | *-sysvr3 ) opsys=usg5-3 ;;
900 *-sysv4 | *-sysvr4 ) opsys=usg5-4 ;;
901 *-sysv4.2 | *-sysvr4.2 ) opsys=usg5-4-2 ;;
909 (echo "${progname}: Emacs hasn't been ported to \`${configuration}' systems."
910 echo "${progname}: Check \`etc/MACHINES' for recognized configuration names."
915 machfile="m/${machine}.h"
916 opsysfile="s/${opsys}.h"
920 AC_CONFIG_HEADER(src/config.h)
923 #### Choose a compiler.
925 "yes" ) CC="gcc" GCC=1 ;;
931 #### Some other nice autoconf tests. If you add a test here which
932 #### should make an entry in src/config.h, don't forget to add an
933 #### #undef clause to src/config.h.in for autoconf to modify.
935 dnl checks for programs
941 dnl checks for UNIX variants that set `DEFS'
943 dnl checks for header files
944 AC_HAVE_HEADERS(sys/timeb.h sys/time.h)
946 AC_TIME_WITH_SYS_TIME
948 dnl checks for library files
949 AC_HAVE_LIBRARY(-ldnet)
951 dnl checks for typedefs
954 dnl checks for functions
956 AC_HAVE_FUNCS(gettimeofday gethostname dup2 rename)
958 dnl checks for structure members
962 dnl checks for compiler characteristics
965 dnl checks for operating system services
968 dnl other checks for UNIX variants
972 #### Choose a window system.
973 echo "Checking window system."
978 window_system=${window_system}x11
981 window_system=${window_system}none
983 case "${with_x11}" in
985 window_system=${window_system}x11
988 case "${with_x10}" in
990 window_system=${window_system}x10
994 case "${window_system}" in
995 "none" | "x11" | "x10" ) ;;
997 echo " No window system specified. Looking for X11."
999 if [ -r /usr/lib/libX11.a \
1000 -o -d /usr/include/X11 \
1001 -o -d /usr/X386/include \
1002 -o -d ${x_includes}/X11 ]; then
1007 echo "Don't specify the window system more than once." >&2
1012 case "${window_system}" in
1026 echo " Using no window system."
1030 ### If we're using X11, we should use the X menu package.
1038 ### Check for XFree386. It needs special hacks.
1041 AC_HAVE_LIBRARY( Xbsd , have_libxbsd=yes , have_libxbsd=no )
1043 if [ -n "${x_libraries}" ] && [ -f ${x_libraries}/libXbsd.a ]; then
1047 case ${window_system} in
1049 if [ -d /usr/X386/include ] && [ "${have_libxbsd}" = "yes" ]; then
1051 if [ "${C_SWITCH_X_SITE}" = "" ]; then
1052 C_SWITCH_X_SITE="-I/usr/X386/include"
1058 #### Extract some information from the operating system and machine files.
1060 echo "Examining the machine- and system-dependent files to find out"
1061 echo " - which libraries the lib-src programs will want, and"
1062 echo " - whether the GNU malloc routines are usable."
1064 ### It's not important that this name contain the PID; you can't run
1065 ### two configures in the same directory and have anything work
1067 tempcname="conftest.c"
1070 #include "'${srcdir}'/src/'${opsysfile}'"
1071 #include "'${srcdir}'/src/'${machfile}'"
1072 #ifndef LIBS_MACHINE
1073 #define LIBS_MACHINE
1078 #ifndef C_SWITCH_SYSTEM
1079 #define C_SWITCH_SYSTEM
1081 @configure@ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM
1082 @configure@ c_switch_system=C_SWITCH_SYSTEM
1085 @configure@ unexec=UNEXEC
1087 @configure@ unexec=unexec.o
1090 #ifdef SYSTEM_MALLOC
1091 @configure@ system_malloc=yes
1093 @configure@ system_malloc=no
1096 #ifndef C_DEBUG_SWITCH
1097 #define C_DEBUG_SWITCH -g
1100 #ifndef C_OPTIMIZE_SWITCH
1101 #define C_OPTIMIZE_SWITCH -O
1105 @configure@ CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH
1107 @configure@ CFLAGS=C_DEBUG_SWITCH
1110 # The value of CPP is a quoted variable reference, so we need to do this
1111 # to get its actual value...
1112 foo=`eval "echo $CPP"`
1113 eval `${foo} -Isrc ${tempcname} \
1114 | grep '@configure@' \
1115 | sed -e 's/^@configure@ \([^=]*=\)\(.*\)$/\1"\2"/'`
1118 ### Compute the unexec source name from the object name.
1119 UNEXEC_SRC="`echo ${unexec} | sed 's/\.o/.c/'`"
1121 # Do the opsystem or machine files prohibit the use of the GNU malloc?
1122 # Assume not, until told otherwise.
1124 if [ "${system_malloc}" = "yes" ]; then
1127 (The GNU allocators don't work with this system configuration.)"
1130 if [ x"${REL_ALLOC}" = x ]; then
1131 REL_ALLOC=${GNU_MALLOC}
1137 #### Find out which version of Emacs this is.
1138 version=`grep 'defconst[ ]*emacs-version' ${srcdir}/lisp/version.el \
1139 | sed -e 's/^.*"\([0-9][0-9]*\.[0-9][0-9]*\)\..*$/\1/'`
1140 if [ x"${version}" = x ]; then
1141 echo "${progname}: can't find current emacs version in
1142 \`${srcdir}/lisp/version.el'." >&2
1147 #### Specify what sort of things we'll be editing into Makefile and config.h.
1149 AC_SUBST(configuration)
1152 AC_SUBST(c_switch_system)
1153 AC_SUBST(libsrc_libs)
1155 AC_SUBST(inst_paths)
1156 AC_SUBST(LD_SWITCH_X_SITE)
1157 AC_SUBST(C_SWITCH_X_SITE)
1160 AC_SUBST(exec_prefix)
1162 AC_DEFINE_UNQUOTED(config_machfile, "\"${machfile}\"")
1163 AC_DEFINE_UNQUOTED(config_opsysfile, "\"${opsysfile}\"")
1164 AC_DEFINE_UNQUOTED(LD_SWITCH_X_SITE, ${LD_SWITCH_X_SITE})
1165 AC_DEFINE_UNQUOTED(C_SWITCH_X_SITE, ${C_SWITCH_X_SITE})
1166 AC_DEFINE_UNQUOTED(UNEXEC_SRC, ${UNEXEC_SRC})
1169 if [ "${HAVE_X_WINDOWS}" = "yes" ] ; then
1170 ] AC_DEFINE(HAVE_X_WINDOWS) [
1172 if [ "${HAVE_X11}" = "yes" ] ; then
1173 ] AC_DEFINE(HAVE_X11) [
1175 if [ "${HAVE_XFREE386}" = "yes" ] ; then
1176 ] AC_DEFINE(HAVE_XFREE386) [
1178 if [ "${HAVE_X_MENU}" = "yes" ] ; then
1179 ] AC_DEFINE(HAVE_X_MENU) [
1181 if [ "${GNU_MALLOC}" = "yes" ] ; then
1182 ] AC_DEFINE(GNU_MALLOC) [
1184 if [ "${REL_ALLOC}" = "yes" ] ; then
1185 ] AC_DEFINE(REL_ALLOC) [
1187 if [ "${LISP_FLOAT_TYPE}" = "yes" ] ; then
1188 ] AC_DEFINE(LISP_FLOAT_TYPE) [
1192 #### Report on what we decided to do.
1195 Configured for \`${configuration}'.
1197 Where should the build process find the source code? ${srcdir}
1198 What operating system and machine description files should Emacs use?
1199 \`${opsysfile}' and \`${machfile}'
1200 What compiler should emacs be built with? ${CC} ${CFLAGS}
1201 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
1202 Should Emacs use the relocating allocator for buffers? ${REL_ALLOC}
1203 What window system should Emacs use? ${window_system}${x_includes+
1204 Where do we find X Windows header files? }${x_includes}${x_libraries+
1205 Where do we find X Windows libraries? }${x_libraries}