1 dnl Autoconf script for GNU Emacs
2 dnl To rebuild the `configure' script from this, execute the command
4 dnl in the directory containing this script.
6 dnl Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001
7 dnl Free Software Foundation, Inc.
9 dnl This file is part of GNU Emacs.
11 dnl GNU Emacs is free software; you can redistribute it and/or modify
12 dnl it under the terms of the GNU General Public License as published by
13 dnl the Free Software Foundation; either version 2, or (at your option)
14 dnl any later version.
16 dnl GNU Emacs is distributed in the hope that it will be useful,
17 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
18 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 dnl GNU General Public License for more details.
21 dnl You should have received a copy of the GNU General Public License
22 dnl along with GNU Emacs; see the file COPYING. If not, write to the
23 dnl Free Software Foundation, Inc., 59 Temple Place - Suite 330,
24 dnl Boston, MA 02111-1307, USA.
28 AC_CONFIG_HEADER(src/config.h:src/config.in)
30 dnl Support for --program-prefix, --program-suffix and
31 dnl --program-transform-name options
34 lispdir='${datadir}/emacs/${version}/lisp'
35 locallisppath='${datadir}/emacs/${version}/site-lisp:'\
36 '${datadir}/emacs/site-lisp:${datadir}/emacs/${version}/leim'
37 lisppath='${locallisppath}:${lispdir}'
38 etcdir='${datadir}/emacs/${version}/etc'
39 archlibdir='${libexecdir}/emacs/${version}/${configuration}'
40 docdir='${datadir}/emacs/${version}/etc'
43 [ --without-gcc don't use GCC to compile Emacs if GCC is found])
45 [ --without-pop don't support POP mail retrieval with movemail],
46 [if test "$withval" = yes; then
47 AC_DEFINE(MAIL_USE_POP)
50 AC_DEFINE(MAIL_USE_POP))
52 [ --with-kerberos support Kerberos-authenticated POP],
53 [AC_DEFINE(KERBEROS)])
54 AC_ARG_WITH(kerberos5,
55 [ --with-kerberos5 support Kerberos version 5 authenticated POP],
56 [if test "${with_kerberos5+set}" = set; then
57 if test "${with_kerberos+set}" != set; then
62 AC_DEFINE(KERBEROS5)])
64 [ --with-hesiod support Hesiod to get the POP server host],
66 dnl This should be the last --with option, because --with-x is
67 dnl added later on when we find the path of X, and it's best to
68 dnl keep them together visually.
69 AC_ARG_WITH(x-toolkit,
70 [ --with-x-toolkit=KIT use an X toolkit (KIT = yes/lucid/athena/motif/no)],
71 [ case "${withval}" in
72 y | ye | yes ) val=athena ;;
74 l | lu | luc | luci | lucid ) val=lucid ;;
75 a | at | ath | athe | athen | athena ) val=athena ;;
76 m | mo | mot | moti | motif ) val=motif ;;
77 dnl These don't currently work.
78 dnl o | op | ope | open | open- | open-l | open-lo \
79 dnl | open-loo | open-look ) val=open-look ;;
81 dnl AC_MSG_ERROR([the \`--with-x-toolkit' option is supposed to have a value
82 dnl which is \`yes', \`no', \`lucid', \`athena', \`motif' or \`open-look'.])
83 AC_MSG_ERROR([\`--with-x-toolkit=$withval' is invalid\;
84 this option's value should be \`yes', \`no', \`lucid', \`athena', or \`motif'.
85 Currently, \`yes', \`athena' and \`lucid' are synonyms.])
91 [ --with-xpm use -lXpm for displaying XPM images])
93 [ --with-jpeg use -ljpeg for displaying JPEG images])
95 [ --with-tiff use -ltiff for displaying TIFF images])
97 [ --with-gif use -lungif for displaying GIF images])
99 [ --with-png use -lpng for displaying PNG images])
100 AC_ARG_WITH(toolkit-scroll-bars,
101 [ --without-toolkit-scroll-bars
102 don't use Motif or Xaw3d scroll bars])
104 [ --without-xim don't use X11 XIM])
106 #### Make srcdir absolute, if it isn't already. It's important to
107 #### avoid running the path through pwd unnecessarily, since pwd can
108 #### give you automounter prefixes, which can go away. We do all this
109 #### so Emacs can find its files when run uninstalled.
110 ## Make sure CDPATH doesn't affect cd (in case PWD is relative).
115 ## We may be able to use the $PWD environment variable to make this
116 ## absolute. But sometimes PWD is inaccurate.
117 if test ".${PWD}" != "." && test ".`(cd ${PWD} ; sh -c pwd)`" = ".${PWD}" ;
121 srcdir="`(cd ${srcdir}; pwd)`"
124 * ) srcdir="`(cd ${srcdir}; pwd)`" ;;
127 #### Check if the source directory already has a configured system in it.
128 if test `pwd` != `(cd ${srcdir} && pwd)` \
129 && test -f "${srcdir}/src/config.h" ; then
130 AC_MSG_WARN([The directory tree \`${srcdir}' is being used
131 as a build directory right now; it has been configured in its own
132 right. To configure in another directory as well, you MUST
133 use GNU make. If you do not have GNU make, then you must
134 now do \`make distclean' in ${srcdir},
135 and then run $0 again.])
138 extrasub='/^VPATH[ ]*=/c\
145 vpath %.in $(srcdir)\
146 vpath %.texi $(srcdir)'
149 #### Given the configuration name, set machfile and opsysfile to the
150 #### names of the m/*.h and s/*.h files we should use.
152 ### Canonicalize the configuration name.
156 configuration=${host_alias-$host}
160 ### If you add support for a new configuration, add code to this
161 ### switch statement to recognize your configuration name and select
162 ### the appropriate operating system and machine description files.
164 ### You would hope that you could choose an m/*.h file pretty much
165 ### based on the machine portion of the configuration name, and an s-
166 ### file based on the operating system portion. However, it turns out
167 ### that each m/*.h file is pretty manufacturer-specific - for
168 ### example, apollo.h, hp9000s300.h, mega68k, news.h, and tad68k are
169 ### all 68000 machines; mips.h, pmax.h, and news-risc are all MIPS
170 ### machines. So we basically have to have a special case for each
171 ### configuration name.
173 ### As far as handling version numbers on operating systems is
174 ### concerned, make sure things will fail in a fixable way. If
175 ### /etc/MACHINES doesn't say anything about version numbers, be
176 ### prepared to handle anything reasonably. If version numbers
177 ### matter, be sure /etc/MACHINES says something about it.
179 ### Eric Raymond says we should accept strings like "sysvr4" to mean
180 ### "System V Release 4"; he writes, "The old convention encouraged
181 ### confusion between `system' and `release' levels'."
183 machine='' opsys='' unported=no
184 case "${canonical}" in
189 case "${canonical}" in
190 alpha*-*-freebsd*) machine=alpha ;;
191 i[3456]86-*-freebsd*) machine=intel386 ;;
198 case "${canonical}" in
199 alpha*-*-netbsd*) machine=alpha ;;
200 i[3456]86-*-netbsd*) machine=intel386 ;;
202 # This is somewhat bogus.
203 machine=hp9000s300 ;;
204 powerpc-apple-netbsd*) machine=macppc ;;
205 mips-*-netbsd*) machine=pmax ;;
206 mipsel-*-netbsd*) machine=pmax ;;
207 ns32k-*-netbsd*) machine=ns32000 ;;
208 powerpc-*-netbsd*) machine=macppc ;;
209 sparc*-*-netbsd*) machine=sparc ;;
210 vax-*-netbsd*) machine=vax ;;
211 arm-*-netbsd*) machine=arm ;;
218 case "${canonical}" in
219 alpha*-*-openbsd*) machine=alpha ;;
220 i386-*-openbsd*) machine=intel386 ;;
221 m68k-*-openbsd*) machine=hp9000s300 ;;
222 mipsel-*-openbsd*) machine=pmax ;;
223 ns32k-*-openbsd*) machine=ns32000 ;;
224 sparc-*-openbsd*) machine=sparc ;;
225 vax-*-openbsd*) machine=vax ;;
230 arm-acorn-riscix1.1* )
231 machine=acorn opsys=riscix1-1
233 arm-acorn-riscix1.2* | arm-acorn-riscix )
234 ## This name is riscix12 instead of riscix1.2
235 ## to avoid a file name conflict on MSDOS.
236 machine=acorn opsys=riscix12
242 case "${canonical}" in
243 i[345]86-*-bsdi*) machine=intel386 ;;
244 sparc-*-bsdi*) machine=sparc ;;
245 powerpc-*-bsdi*) machine=macppc ;;
247 case "${canonical}" in
248 *-*-bsd386* | *-*-bsdi1* ) opsys=bsd386 ;;
249 *-*-bsdi2.0* ) opsys=bsdos2 ;;
250 *-*-bsdi2* ) opsys=bsdos2-1 ;;
251 *-*-bsdi3* ) opsys=bsdos3 ;;
252 *-*-bsdi4* ) opsys=bsdos4 ;;
257 ## Strictly speaking, we need the version of the alliant operating
258 ## system to choose the right machine file, but currently the
259 ## configuration name doesn't tell us enough to choose the right
260 ## one; we need to give alliants their own operating system name to
261 ## do this right. When someone cares, they can help us.
263 machine=alliant4 opsys=bsd4-2
266 machine=alliant-2800 opsys=bsd4-3
269 ## Alpha (DEC) machines.
271 machine=alpha opsys=osf1
272 # This is needed to find X11R6.1 libraries for certain tests.
273 NON_GCC_LINK_TEST_OPTIONS=-Wl,-rpath,/usr/X11R6/lib
274 GCC_LINK_TEST_OPTIONS=-Wl,-rpath,/usr/X11R6/lib
275 # NON_GNU_CPP is necessary on 5.0 to avoid mangling src/Makefile
276 # due to non-traditional preprocessing with the current compiler
277 # defaults. OSF 4 can also have that compiler version, and there
278 # seems always to have been a usable /usr/bin/cpp.
279 NON_GNU_CPP=/usr/bin/cpp
280 case "${canonical}" in
281 alpha*-dec-osf[5-9]*)
286 alpha*-*-linux-gnu* )
287 machine=alpha opsys=gnu-linux
291 machine=arm opsys=gnu-linux
296 machine=macppc opsys=gnu-linux
301 machine=altos opsys=usg5-2
306 machine=amdahl opsys=usg5-2-2
311 machine=apollo opsys=bsd4-3
314 ## AT&T 3b2, 3b5, 3b15, 3b20
316 machine=att3b opsys=usg5-2-2
319 ## AT&T 3b1 - The Mighty Unix PC!
321 machine=7300 opsys=usg5-2-2
326 machine=ibmrs6000 opsys=aix3-2
331 machine=dpx2 opsys=usg5-3
336 machine=sps7 opsys=usg5-2
339 ## CCI 5/32, 6/32 -- see "Tahoe".
342 ## I don't know what configuration name to use for this; config.sub
343 ## doesn't seem to know anything about it. Hey, Celerity users, get
345 celerity-celerity-bsd* )
346 machine=celerity opsys=bsd4-2
350 ## What operating systems does this chip run that Emacs has been
354 ## We'll use the catch-all code at the bottom to guess the
359 *-convex-bsd* | *-convex-convexos* )
360 machine=convex opsys=bsd4-3
361 ## Prevents spurious white space in makefiles - d.m.cooke@larc.nasa.gov
362 NON_GNU_CPP="cc -E -P"
366 i[3456]86-cubix-sysv* )
367 machine=intel386 opsys=usg5-3
371 cydra*-cydrome-sysv* )
372 machine=cydra5 opsys=usg5-3
375 ## Data General AViiON Machines
376 ## DG changed naming conventions with the release of 5.4.4.10, they
377 ## dropped the initial 5.4 but left the intervening R. Because of the
378 ## R this shouldn't conflict with older versions of the OS (which I
379 ## think were named like dgux4.*). In addition, DG new AViiONs series
380 ## uses either Motorola M88k or Intel Pentium CPUs.
381 m88k-dg-dguxR4.* | m88k-dg-dgux4* )
382 machine=aviion opsys=dgux4
384 m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* )
385 ## This name is dgux5-4-3 instead of dgux5-4r3
386 ## to avoid a file name conflict on MSDOS.
387 machine=aviion opsys=dgux5-4-3
389 m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* )
390 machine=aviion opsys=dgux5-4r2
393 machine=aviion opsys=dgux
396 ## Data General AViiON Intel (x86) Machines
397 ## Exists from 5.4.3 (current i586-dg-dguxR4.11)
398 ## Ehud Karni, 1998-may-30, ehud@unix.simonwiesel.co.il
399 i[345]86-dg-dguxR4* )
400 machine=aviion-intel opsys=dgux4
404 mips-dec-ultrix[0-3].* | mips-dec-ultrix4.0* | mips-dec-bsd4.2* )
405 machine=pmax opsys=bsd4-2
407 mips-dec-ultrix4.[12]* | mips-dec-bsd* )
408 machine=pmax opsys=bsd4-3
411 machine=pmax opsys=ultrix4-3
414 machine=pmax opsys=osf1
416 mips-dec-mach_bsd4.3* )
417 machine=pmax opsys=mach-bsd4-3
420 ## Motorola Delta machines
421 m68k-motorola-sysv* | m68000-motorola-sysv* )
422 machine=delta opsys=usg5-3
423 if test -z "`type gnucc | grep 'not found'`"
425 if test -s /etc/167config
426 then CC="gnucc -m68040"
427 else CC="gnucc -m68881"
430 if test -z "`type gcc | grep 'not found'`"
436 m88k-motorola-sysv4* )
437 # jbotte@bnr.ca says that UNIX_System_V <hostName> 4.0 R40V4.3 m88k mc88110
438 # needs POSIX_SIGNALS and therefore needs usg5-4-2.
439 # I hope there are not other 4.0 versions for this machine
440 # which really need usg5-4 instead.
441 machine=delta88k opsys=usg5-4-2
443 m88k-motorola-sysv* | m88k-motorola-m88kbcs* )
444 machine=delta88k opsys=usg5-3
449 machine=dual opsys=usg5-2
452 machine=dual opsys=unipl5-2
457 machine=elxsi opsys=usg5-2
462 machine=ns16000 opsys=umax
465 ## The GEC 63 - apparently, this port isn't really finished yet.
466 # I'm sure we finished off the last of the machines, though. -- fx
468 ## Gould Power Node and NP1
470 machine=gould opsys=bsd4-2
473 machine=gould opsys=bsd4-3
476 machine=gould-np1 opsys=bsd4-3
479 ## Harris Night Hawk machines running CX/UX (a 5000 looks just like a 4000
480 ## as far as Emacs is concerned).
482 # Build needs to be different on 7.0 and later releases
484 [56].[0-9] ) machine=nh4000 opsys=cxux ;;
485 [7].[0-9] ) machine=nh4000 opsys=cxux7 ;;
487 NON_GNU_CPP="/lib/cpp"
489 ## Harris ecx or gcx running CX/UX (Series 1200, Series 3000)
491 machine=nh3000 opsys=cxux
493 ## Harris power pc NightHawk running Power UNIX (Series 6000)
494 powerpc-harris-powerunix )
495 machine=nh6000 opsys=powerunix
496 NON_GNU_CPP="cc -Xo -E -P"
498 ## SR2001/SR2201 running HI-UX/MPP
499 hppa1.1-hitachi-hiuxmpp* )
500 machine=sr2k opsys=hiuxmpp
502 hppa1.1-hitachi-hiuxwe2* )
503 machine=sr2k opsys=hiuxwe2
506 xps*-honeywell-sysv* )
507 machine=xps100 opsys=usg5-2
510 ## HP 9000 series 200 or 300
512 machine=hp9000s300 opsys=bsd4-3
514 ## HP/UX 7, 8, 9, and 10 are supported on these machines.
517 ## Someone's system reports A.B8.05 for this.
518 ## I wonder what other possibilities there are.
519 *.B8.* ) machine=hp9000s300 opsys=hpux8 ;;
520 *.08.* ) machine=hp9000s300 opsys=hpux8 ;;
521 *.09.* ) machine=hp9000s300 opsys=hpux9 ;;
522 *.1[0-9].* ) machine=hp9000s300 opsys=hpux9shr ;;
523 *) machine=hp9000s300 opsys=hpux ;;
527 ## HP 9000 series 700 and 800, running HP/UX
529 machine=hp800 opsys=hpux
532 machine=hp800 opsys=hpux8
535 machine=hp800 opsys=hpux9shr
538 machine=hp800 opsys=hpux9
541 machine=hp800 opsys=hpux10
543 hppa*-hp-hpux1[1-9]* )
544 machine=hp800 opsys=hpux11
547 ## HP 9000 series 700 and 800, running HP/UX
549 ## Cross-compilation? Nah!
551 ## Someone's system reports A.B8.05 for this.
552 ## I wonder what other possibilities there are.
553 *.B8.* ) machine=hp800 opsys=hpux8 ;;
554 *.08.* ) machine=hp800 opsys=hpux8 ;;
555 *.09.* ) machine=hp800 opsys=hpux9 ;;
556 *) machine=hp800 opsys=hpux10 ;;
560 machine=hp800 opsys=nextstep
565 machine=orion opsys=bsd4-2
568 machine=orion105 opsys=bsd4-2
572 i[3456]86-ibm-aix1.1* )
573 machine=ibmps2-aix opsys=usg5-2-2
575 i[3456]86-ibm-aix1.[23]* | i[3456]86-ibm-aix* )
576 machine=ibmps2-aix opsys=usg5-3
579 machine=ibm370aix opsys=usg5-3
582 machine=ibms390 opsys=gnu-linux
584 rs6000-ibm-aix3.1* | powerpc-ibm-aix3.1* )
585 machine=ibmrs6000 opsys=aix3-1
587 rs6000-ibm-aix3.2.5 | powerpc-ibm-aix3.2.5 )
588 machine=ibmrs6000 opsys=aix3-2-5
590 rs6000-ibm-aix4.1* | powerpc-ibm-aix4.1* )
591 machine=ibmrs6000 opsys=aix4-1
593 rs6000-ibm-aix4.2* | powerpc-ibm-aix4.2* )
594 machine=ibmrs6000 opsys=aix4-2
596 rs6000-ibm-aix4.0* | powerpc-ibm-aix4.0* )
597 machine=ibmrs6000 opsys=aix4
599 rs6000-ibm-aix4* | powerpc-ibm-aix4* )
600 machine=ibmrs6000 opsys=aix4-1
602 rs6000-ibm-aix* | powerpc-ibm-aix* )
603 machine=ibmrs6000 opsys=aix3-2
606 machine=ibmrt opsys=bsd4-3
609 machine=ibmrt opsys=bsd4-2
612 machine=ibmrt opsys=bsd4-3
615 machine=ibmrt opsys=bsd4-2
618 machine=ibmrt opsys=bsd4-3
621 machine=ibmrt opsys=bsd4-3
624 machine=ibmrt-aix opsys=usg5-2-2
627 ## Integrated Solutions `Optimum V'
629 machine=isi-ov opsys=bsd4-2
632 machine=isi-ov opsys=bsd4-3
635 ## Intel 386 machines where we do care about the manufacturer
636 i[3456]86-intsys-sysv* )
637 machine=is386 opsys=usg5-2-2
641 i[3456]86-prime-sysv* )
642 machine=i386 opsys=usg5-3
645 ## Sequent Symmetry running Dynix
646 i[3456]86-sequent-bsd* )
647 machine=symmetry opsys=bsd4-3
650 ## Sequent Symmetry running ptx 4, which is a modified SVR4.
651 i[3456]86-sequent-ptx4* | i[3456]86-sequent-sysv4* )
652 machine=sequent-ptx opsys=ptx4
656 ## Sequent Symmetry running DYNIX/ptx
657 ## Use the old cpp rather than the newer ANSI one.
658 i[3456]86-sequent-ptx* )
659 machine=sequent-ptx opsys=ptx
660 NON_GNU_CPP="/lib/cpp"
663 ## ncr machine running svr4.3.
664 i[3456]86-ncr-sysv4.3 )
665 machine=ncr386 opsys=usg5-4-3
668 ## Unspecified sysv on an ncr machine defaults to svr4.2.
669 ## (Plain usg5-4 doesn't turn on POSIX signals, which we need.)
670 i[3456]86-ncr-sysv* )
671 machine=ncr386 opsys=usg5-4-2
674 ## Intel Paragon OSF/1
676 machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp
681 machine=i860 opsys=usg5-4
682 NON_GNU_CC="/bin/cc" # Ie, not the one in /usr/ucb/cc.
683 NON_GNU_CPP="/usr/ccs/lib/cpp" # cc -E tokenizes macro expansion.
687 powerpc*-*-linux-gnu* )
688 machine=macppc opsys=gnu-linux
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
718 NON_GNU_CC="cc -systype bsd43"
719 NON_GNU_CPP="cc -systype bsd43 -E"
722 machine=mips4 opsys=riscos5
723 NON_GNU_CC="cc -systype bsd43"
724 NON_GNU_CPP="cc -systype bsd43 -E"
727 machine=mips opsys=bsd4-3
730 machine=mips opsys=usg5-2-2
734 m68*-next-* | m68k-*-nextstep* )
735 machine=m68k opsys=nextstep
738 ## The complete machine from National Semiconductor
740 machine=ns32000 opsys=usg5-2
744 m68*-ncr-sysv2* | m68*-ncr-sysvr2* )
745 machine=tower32 opsys=usg5-2-2
747 m68*-ncr-sysv3* | m68*-ncr-sysvr3* )
748 machine=tower32v3 opsys=usg5-3
753 machine=ews4800 opsys=ux4800
758 machine=targon31 opsys=usg5-2-2
763 machine=nu opsys=usg5-2
768 machine=plexus opsys=usg5-2
771 ## PowerPC reference platform
772 powerpcle-*-solaris2* )
778 ## I don't really have any idea what sort of processor the Pyramid has,
779 ## so I'm assuming it is its own architecture.
780 pyramid-pyramid-bsd* )
781 machine=pyramid opsys=bsd4-2
785 ns32k-sequent-bsd4.2* )
786 machine=sequent opsys=bsd4-2
788 ns32k-sequent-bsd4.3* )
789 machine=sequent opsys=bsd4-3
793 mips-siemens-sysv* | mips-sni-sysv*)
794 machine=mips-siemens opsys=usg5-4
795 NON_GNU_CC=/usr/ccs/bin/cc
796 NON_GNU_CPP=/usr/ccs/lib/cpp
799 ## Silicon Graphics machines
800 ## Iris 2500 and Iris 2500 Turbo (aka the Iris 3030)
802 machine=irist opsys=iris3-5
804 m68*-sgi-iris3.6* | m68*-sgi-iris*)
805 machine=irist opsys=iris3-6
809 machine=iris4d opsys=irix3-3
812 machine=iris4d opsys=irix4-0
815 machine=iris4d opsys=irix6-5
816 # Without defining _LANGUAGE_C, things get masked out in the headers
817 # so that, for instance, grepping for `free' in stdlib.h fails and
818 # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
819 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
820 NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C"
823 machine=iris4d opsys=irix6-0
824 # It's not clear whether -D_LANGUAGE_C is necessary as it is for 6.5,
825 # but presumably it does no harm.
826 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
827 # -32 probably isn't necessary in later v.6s -- anyone know which?
828 NON_GCC_TEST_OPTIONS=-32
830 mips-sgi-irix5.[01]* )
831 machine=iris4d opsys=irix5-0
833 mips-sgi-irix5* | mips-sgi-irix* )
834 machine=iris4d opsys=irix5-2
839 machine=news opsys=bsd4-2
842 machine=news opsys=bsd4-3
844 m68*-sony-newsos3* | m68*-sony-news3*)
845 machine=news opsys=bsd4-3
847 mips-sony-bsd* | mips-sony-newsos4* | mips-sony-news4*)
848 machine=news-risc opsys=bsd4-3
851 machine=news-r6 opsys=newsos6
854 machine=news-risc opsys=newsos5
859 machine=stride opsys=usg5-2
863 sparc-*-linux-gnu* | sparc64-*-linux-gnu* )
864 machine=sparc opsys=gnu-linux
867 *-auspex-sunos* | *-sun-sunos* | *-sun-bsd* | *-sun-solaris* \
868 | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* | powerpc*-*-solaris2* \
869 | rs6000-*-solaris2*)
870 case "${canonical}" in
871 m68*-sunos1* ) machine=sun1 ;;
872 m68*-sunos2* ) machine=sun2 ;;
873 m68* ) machine=sun3 ;;
874 i[3456]86-sun-sunos[34]* ) machine=sun386 ;;
875 i[3456]86-*-* ) machine=intel386 ;;
876 powerpcle* ) machine=powerpcle ;;
877 powerpc* | rs6000* ) machine=ibmrs6000 ;;
878 sparc* ) machine=sparc ;;
881 case "${canonical}" in
882 ## The Sun386 didn't get past 4.0.
883 i[3456]86-*-sunos4 ) opsys=sunos4-0 ;;
884 *-sunos4.0* ) opsys=sunos4-0 ;;
885 *-sunos4.1.[3-9]*noshare )
886 ## This name is sunos413 instead of sunos4-1-3
887 ## to avoid a file name conflict on MSDOS.
889 NON_GNU_CPP=/usr/lib/cpp
890 NON_GCC_TEST_OPTIONS=-Bstatic
891 GCC_TEST_OPTIONS=-static
893 *-sunos4.1.[3-9]* | *-sunos4shr*)
895 NON_GNU_CPP=/usr/lib/cpp
897 *-sunos4* | *-sunos )
899 NON_GCC_TEST_OPTIONS=-Bstatic
900 GCC_TEST_OPTIONS=-static
902 *-sunos5.3* | *-solaris2.3* )
904 NON_GNU_CPP=/usr/ccs/lib/cpp
906 *-sunos5.4* | *-solaris2.4* )
908 NON_GNU_CPP=/usr/ccs/lib/cpp
911 *-sunos5.5* | *-solaris2.5* )
913 NON_GNU_CPP=/usr/ccs/lib/cpp
916 *-sunos5* | *-solaris* )
918 NON_GNU_CPP=/usr/ccs/lib/cpp
922 ## Watch out for a compiler that we know will not work.
923 case "${canonical}" in
924 *-solaris* | *-sunos5* )
925 if [ "x$CC" = x/usr/ucb/cc ]; then
926 ## /usr/ucb/cc doesn't work;
927 ## we should find some other compiler that does work.
935 machine=sparc opsys=nextstep
940 machine=tad68k opsys=usg5-3
944 tahoe-tahoe-bsd4.2* )
945 machine=tahoe opsys=bsd4-2
947 tahoe-tahoe-bsd4.3* )
948 machine=tahoe opsys=bsd4-3
951 ## Tandem Integrity S2
953 machine=tandem-s2 opsys=usg5-3
957 m88k-tektronix-sysv3* )
958 machine=tekxd88 opsys=usg5-3
961 ## Tektronix 16000 box (6130?)
962 ns16k-tektronix-bsd* )
963 machine=ns16000 opsys=bsd4-2
966 ## src/m/tek4300.h hints that this is a m68k machine.
967 m68*-tektronix-bsd* )
968 machine=tek4300 opsys=bsd4-3
972 ## We seem to have lost the machine-description file titan.h!
974 machine=titan opsys=usg5-3
977 ## Ustation E30 (SS5E)
978 m68*-unisys-uniplus* )
979 machine=ustation opsystem=unipl5-2
985 case "${canonical}" in
986 *-bsd4.1* ) opsys=bsd4-1 ;;
987 *-bsd4.2* | *-ultrix[0-3].* | *-ultrix4.0* ) opsys=bsd4-2 ;;
988 *-bsd4.3* | *-ultrix* ) opsys=bsd4-3 ;;
989 *-sysv[01]* | *-sysvr[01]* ) opsys=usg5-0 ;;
990 *-sysv2* | *-sysvr2* ) opsys=usg5-2 ;;
991 *-vms* ) opsys=vms ;;
997 ns16k-whitechapel-* )
999 ## We don't know what sort of OS runs on these; we'll let the
1000 ## operating system guessing code below try.
1005 machine=wicat opsys=usg5-2
1010 machine=ia64 opsys=gnu-linux
1013 ## Intel 386 machines where we don't care about the manufacturer
1016 case "${canonical}" in
1017 *-lynxos* ) opsys=lynxos ;;
1018 *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
1019 *-isc2.2* ) opsys=isc2-2 ;;
1020 *-isc4.0* ) opsys=isc4-0 ;;
1021 *-isc4.* ) opsys=isc4-1
1022 GCC_TEST_OPTIONS=-posix
1023 NON_GCC_TEST_OPTIONS=-Xp
1025 *-isc* ) opsys=isc3-0 ;;
1026 *-esix5* ) opsys=esix5r4; NON_GNU_CPP=/usr/lib/cpp ;;
1027 *-esix* ) opsys=esix ;;
1028 *-xenix* ) opsys=xenix ;;
1029 *-linux-gnu* ) opsys=gnu-linux ;;
1030 *-sco3.2v4* ) opsys=sco4 ; NON_GNU_CPP=/lib/cpp ;;
1031 *-sco3.2v5* ) opsys=sco5
1032 NON_GNU_CPP=/lib/cpp
1033 # Prevent -belf from being passed to $CPP.
1034 # /lib/cpp does not accept it.
1035 OVERRIDE_CPPFLAGS=" "
1037 *-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
1038 *-386bsd* ) opsys=386bsd ;;
1039 *-nextstep* ) opsys=nextstep ;;
1040 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
1044 ## m68k Linux-based GNU system
1046 machine=m68k opsys=gnu-linux
1049 ## Mips Linux-based GNU system
1051 machine=mips opsys=gnu-linux
1055 sparc-fujitsu-sysv4* )
1056 machine=sparc opsys=uxpds
1057 NON_GNU_CPP=/usr/ccs/lib/cpp
1062 f301-fujitsu-uxpv4.1)
1063 machine=f301 opsys=uxpv
1071 ### If the code above didn't choose an operating system, just choose
1072 ### an operating system based on the configuration name. You really
1073 ### only want to use this when you have no idea what the right
1074 ### operating system is; if you know what operating systems a machine
1075 ### runs, it's cleaner to make it explicit in the case statement
1077 if test x"${opsys}" = x; then
1078 case "${canonical}" in
1079 *-gnu* ) opsys=gnu ;;
1080 *-bsd4.[01] ) opsys=bsd4-1 ;;
1081 *-bsd4.2 ) opsys=bsd4-2 ;;
1082 *-bsd4.3 ) opsys=bsd4-3 ;;
1083 *-sysv0 | *-sysvr0 ) opsys=usg5-0 ;;
1084 *-sysv2 | *-sysvr2 ) opsys=usg5-2 ;;
1085 *-sysv2.2 | *-sysvr2.2 ) opsys=usg5-2-2 ;;
1086 *-sysv3* | *-sysvr3* ) opsys=usg5-3 ;;
1087 *-sysv4.2uw* ) opsys=unixware ;;
1088 *-sysv4.1* | *-sysvr4.1* )
1089 NON_GNU_CPP=/usr/lib/cpp
1091 *-sysv4.[2-9]* | *-sysvr4.[2-9]* )
1092 if [ x$NON_GNU_CPP = x ]; then
1093 if [ -f /usr/ccs/lib/cpp ]; then
1094 NON_GNU_CPP=/usr/ccs/lib/cpp
1096 NON_GNU_CPP=/lib/cpp
1100 *-sysv4* | *-sysvr4* ) opsys=usg5-4 ;;
1107 changequote([, ])dnl
1109 if test $unported = yes; then
1110 AC_MSG_ERROR([Emacs hasn't been ported to \`${canonical}' systems.
1111 Check \`etc/MACHINES' for recognized configuration names.])
1114 machfile="m/${machine}.h"
1115 opsysfile="s/${opsys}.h"
1118 #### Choose a compiler.
1119 test -n "$CC" && cc_specified=yes
1121 # Save the value of CFLAGS that the user specified.
1122 SPECIFIED_CFLAGS="$CFLAGS"
1125 "yes" ) CC="gcc" GCC=yes ;;
1126 "no" ) : ${CC=cc} ;;
1131 # On Suns, sometimes $CPP names a directory.
1132 if test -n "$CPP" && test -d "$CPP"; then
1136 #### Some systems specify a CPP to use unless we are using GCC.
1137 #### Now that we know whether we are using GCC, we can decide whether
1138 #### to use that one.
1139 if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x
1144 #### Some systems specify a CC to use unless we are using GCC.
1145 #### Now that we know whether we are using GCC, we can decide whether
1146 #### to use that one.
1147 if test "x$NON_GNU_CC" != x && test x$GCC != xyes &&
1148 test x$cc_specified != xyes
1153 if test x$GCC = xyes && test "x$GCC_TEST_OPTIONS" != x
1155 CC="$CC $GCC_TEST_OPTIONS"
1158 if test x$GCC = x && test "x$NON_GCC_TEST_OPTIONS" != x
1160 CC="$CC $NON_GCC_TEST_OPTIONS"
1163 if test x$GCC = xyes && test "x$GCC_LINK_TEST_OPTIONS" != x
1165 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
1168 if test x$GCC = x && test "x$NON_GCC_LINK_TEST_OPTIONS" != x
1170 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
1173 #### Some other nice autoconf tests. If you add a test here which
1174 #### should make an entry in src/config.h, don't forget to add an
1175 #### #undef clause to src/config.h.in for autoconf to modify.
1177 dnl checks for programs
1182 if test "x$RANLIB" = x; then
1186 dnl checks for Unix variants
1189 #### Extract some information from the operating system and machine files.
1191 AC_CHECKING([the machine- and system-dependent files to find out
1192 - which libraries the lib-src programs will want, and
1193 - whether the GNU malloc routines are usable])
1195 ### First figure out CFLAGS (which we use for running the compiler here)
1196 ### and REAL_CFLAGS (which we use for real compilation).
1197 ### The two are the same except on a few systems, where they are made
1198 ### different to work around various lossages. For example,
1199 ### GCC 2.5 on GNU/Linux needs them to be different because it treats -g
1200 ### as implying static linking.
1202 ### If the CFLAGS env var is specified, we use that value
1203 ### instead of the default.
1205 ### It's not important that this name contain the PID; you can't run
1206 ### two configures in the same directory and have anything work
1208 tempcname="conftest.c"
1211 #include "'${srcdir}'/src/'${opsysfile}'"
1212 #include "'${srcdir}'/src/'${machfile}'"
1213 #ifndef LIBS_MACHINE
1214 #define LIBS_MACHINE
1219 #ifndef C_SWITCH_SYSTEM
1220 #define C_SWITCH_SYSTEM
1222 #ifndef C_SWITCH_MACHINE
1223 #define C_SWITCH_MACHINE
1225 configure___ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM
1226 configure___ c_switch_system=C_SWITCH_SYSTEM
1227 configure___ c_switch_machine=C_SWITCH_MACHINE
1230 #define LIB_X11_LIB -lX11
1233 #ifndef LIBX11_MACHINE
1234 #define LIBX11_MACHINE
1237 #ifndef LIBX11_SYSTEM
1238 #define LIBX11_SYSTEM
1240 configure___ LIBX=LIB_X11_LIB LIBX11_MACHINE LIBX11_SYSTEM
1243 configure___ unexec=UNEXEC
1245 configure___ unexec=unexec.o
1248 #ifdef SYSTEM_MALLOC
1249 configure___ system_malloc=yes
1251 configure___ system_malloc=no
1254 #ifdef USE_MMAP_FOR_BUFFERS
1255 configure___ use_mmap_for_buffers=yes
1257 configure___ use_mmap_for_buffers=no
1260 #ifndef C_DEBUG_SWITCH
1261 #define C_DEBUG_SWITCH -g
1264 #ifndef C_OPTIMIZE_SWITCH
1266 #define C_OPTIMIZE_SWITCH -O2
1268 #define C_OPTIMIZE_SWITCH -O
1272 #ifndef LD_SWITCH_MACHINE
1273 #define LD_SWITCH_MACHINE
1276 #ifndef LD_SWITCH_SYSTEM
1277 #define LD_SWITCH_SYSTEM
1280 #ifndef LD_SWITCH_X_SITE_AUX
1281 #define LD_SWITCH_X_SITE_AUX
1284 configure___ ld_switch_system=LD_SWITCH_SYSTEM
1285 configure___ ld_switch_machine=LD_SWITCH_MACHINE
1287 #ifdef THIS_IS_CONFIGURE
1289 /* Get the CFLAGS for tests in configure. */
1291 configure___ CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
1293 configure___ CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
1296 #else /* not THIS_IS_CONFIGURE */
1298 /* Get the CFLAGS for real compilation. */
1300 configure___ REAL_CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
1302 configure___ REAL_CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
1305 #endif /* not THIS_IS_CONFIGURE */
1308 # The value of CPP is a quoted variable reference, so we need to do this
1309 # to get its actual value...
1310 CPP=`eval "echo $CPP"`
1312 eval `${CPP} -Isrc ${tempcname} \
1313 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
1314 if test "x$SPECIFIED_CFLAGS" = x; then
1315 eval `${CPP} -Isrc -DTHIS_IS_CONFIGURE ${tempcname} \
1316 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
1318 REAL_CFLAGS="$CFLAGS"
1320 changequote([, ])dnl
1323 ac_link="$ac_link $ld_switch_machine $ld_switch_system"
1325 ### Make sure subsequent tests use flags consistent with the build flags.
1327 if test x"${OVERRIDE_CPPFLAGS}" != x; then
1328 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
1330 CPPFLAGS="$c_switch_system $c_switch_machine $CPPFLAGS"
1333 dnl Do this early because it can frob feature test macros for Unix-98 &c.
1336 # Sound support for GNU/Linux and the free BSDs.
1337 AC_CHECK_HEADERS(machine/soundcard.h sys/soundcard.h soundcard.h)
1338 # Emulation library used on NetBSD.
1339 AC_CHECK_LIB(ossaudio, _oss_ioctl, LIBSOUND=-lossaudio, LIBSOUND=)
1342 dnl checks for header files
1343 AC_CHECK_HEADERS(sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \
1344 linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \
1345 termcap.h stdio_ext.h fcntl.h term.h strings.h coff.h)
1351 dnl Some systems have utime.h but don't declare the struct anyplace.
1352 AC_CACHE_CHECK(for struct utimbuf, emacs_cv_struct_utimbuf,
1353 AC_TRY_COMPILE([#ifdef TIME_WITH_SYS_TIME
1354 #include <sys/time.h>
1357 #ifdef HAVE_SYS_TIME_H
1358 #include <sys/time.h>
1365 #endif], [static struct utimbuf x; x.actime = x.modtime;],
1366 emacs_cv_struct_utimbuf=yes, emacs_cv_struct_utimbuf=no))
1367 if test $emacs_cv_struct_utimbuf = yes; then
1368 AC_DEFINE(HAVE_STRUCT_UTIMBUF)
1371 dnl checks for typedefs
1374 dnl Check for speed_t typedef.
1375 AC_CACHE_CHECK(for speed_t, emacs_cv_speed_t,
1376 AC_TRY_COMPILE([#include <termios.h>], [speed_t x = 1;],
1377 emacs_cv_speed_t=yes, emacs_cv_speed_t=no))
1378 if test $emacs_cv_speed_t = yes; then
1379 AC_DEFINE(HAVE_SPEED_T)
1382 AC_CACHE_CHECK(for struct timeval, emacs_cv_struct_timeval,
1383 AC_TRY_COMPILE([#ifdef TIME_WITH_SYS_TIME
1384 #include <sys/time.h>
1387 #ifdef HAVE_SYS_TIME_H
1388 #include <sys/time.h>
1392 #endif], [static struct timeval x; x.tv_sec = x.tv_usec;],
1393 emacs_cv_struct_timeval=yes, emacs_cv_struct_timeval=no))
1394 HAVE_TIMEVAL=$emacs_cv_struct_timeval
1395 if test $emacs_cv_struct_timeval = yes; then
1396 AC_DEFINE(HAVE_TIMEVAL)
1399 AC_CACHE_CHECK(for struct exception, emacs_cv_struct_exception,
1400 AC_TRY_COMPILE([#include <math.h>],
1401 [static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1;],
1402 emacs_cv_struct_exception=yes, emacs_cv_struct_exception=no))
1403 HAVE_EXCEPTION=$emacs_cv_struct_exception
1404 if test $emacs_cv_struct_exception != yes; then
1405 AC_DEFINE(NO_MATHERR)
1408 dnl checks for structure members
1411 AC_CACHE_CHECK(for tm_gmtoff in struct tm, emacs_cv_tm_gmtoff,
1412 AC_TRY_LINK([#include <time.h>], [struct tm t; t.tm_gmtoff = 0],
1413 emacs_cv_tm_gmtoff=yes,
1414 emacs_cv_tm_gmtoff=no))
1415 if test $emacs_cv_tm_gmtoff = yes; then
1416 AC_DEFINE(HAVE_TM_GMTOFF)
1419 dnl checks for compiler characteristics
1421 dnl Testing __STDC__ to determine prototype support isn't good enough.
1422 dnl DEC C, for instance, doesn't define it with default options, and
1423 dnl is used on 64-bit systems (OSF Alphas). Similarly for volatile
1428 dnl This isn't useful because we can't turn on use of `inline' unless
1429 dnl the compiler groks `extern inline'.
1431 AC_CACHE_CHECK([for void * support], emacs_cv_void_star,
1432 [AC_TRY_COMPILE(, [void * foo;],
1433 emacs_cv_void_star=yes, emacs_cv_void_star=no)])
1434 if test $emacs_cv_void_star = yes; then
1435 AC_DEFINE(POINTER_TYPE, void)
1437 AC_DEFINE(POINTER_TYPE, char)
1440 dnl check for Make feature
1443 dnl checks for operating system services
1444 AC_SYS_LONG_FILE_NAMES
1446 #### Choose a window system.
1449 if test "$no_x" = yes; then
1455 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
1456 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
1457 LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"`
1458 x_default_search_path=""
1459 for x_library in `echo ${x_libraries} | sed -e "s/:/ /g"`; do
1461 ${x_library}/X11/%L/%T/%N%C%S:\
1462 ${x_library}/X11/%l/%T/%N%C%S:\
1463 ${x_library}/X11/%T/%N%C%S:\
1464 ${x_library}/X11/%L/%T/%N%S:\
1465 ${x_library}/X11/%l/%T/%N%S:\
1466 ${x_library}/X11/%T/%N%S"
1467 if test x"${x_default_search_path}" = x; then
1468 x_default_search_path=${x_search_path}
1470 x_default_search_path="${x_search_path}:${x_default_search_path}"
1474 if test "${x_includes}" != NONE && test -n "${x_includes}"; then
1475 C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"`
1478 if test x"${x_includes}" = x; then
1479 bitmapdir=/usr/include/X11/bitmaps
1481 # accumulate include directories that have X11 bitmap subdirectories
1483 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
1484 if test -d "${bmd}/X11/bitmaps"; then
1485 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
1487 if test -d "${bmd}/bitmaps"; then
1488 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
1491 if test ${bmd_acc} != "dummyval"; then
1492 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
1496 case "${window_system}" in
1500 case "${with_x_toolkit}" in
1501 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
1502 motif ) USE_X_TOOLKIT=MOTIF ;;
1503 dnl open-look ) USE_X_TOOLKIT=OPEN_LOOK ;;
1504 no ) USE_X_TOOLKIT=none ;;
1505 dnl If user did not say whether to use a toolkit,
1506 dnl make this decision later: use the toolkit if we have X11R5 or newer.
1507 * ) USE_X_TOOLKIT=maybe ;;
1517 ### If we're using X11, we should use the X menu package.
1520 yes ) HAVE_MENUS=yes ;;
1523 if test "${opsys}" = "hpux9"; then
1524 case "${x_libraries}" in
1526 opsysfile="s/hpux9-x11r4.h"
1531 if test "${opsys}" = "hpux9shr"; then
1532 case "${x_libraries}" in
1534 opsysfile="s/hpux9shxr4.h"
1539 ### Compute the unexec source name from the object name.
1540 UNEXEC_SRC="`echo ${unexec} | sed 's/\.o/.c/'`"
1542 # Do the opsystem or machine files prohibit the use of the GNU malloc?
1543 # Assume not, until told otherwise.
1546 AC_CHECK_FUNC(malloc_get_state, ,doug_lea_malloc=no)
1547 AC_CHECK_FUNC(malloc_set_state, ,doug_lea_malloc=no)
1548 AC_CACHE_CHECK(whether __after_morecore_hook exists,
1549 emacs_cv_var___after_morecore_hook,
1550 [AC_TRY_LINK([extern void (* __after_morecore_hook)();],[__after_morecore_hook = 0],
1551 emacs_cv_var___after_morecore_hook=yes,
1552 emacs_cv_var___after_morecore_hook=no)])
1553 if test $emacs_cv_var___after_morecore_hook = no; then
1556 if test "${system_malloc}" = "yes"; then
1559 (The GNU allocators don't work with this system configuration.)"
1561 if test "$doug_lea_malloc" = "yes" ; then
1562 if test "$GNU_MALLOC" = yes ; then
1564 (Using Doug Lea's new malloc from the GNU C Library.)"
1566 AC_DEFINE(DOUG_LEA_MALLOC)
1569 if test x"${REL_ALLOC}" = x; then
1570 REL_ALLOC=${GNU_MALLOC}
1573 dnl For now, need to use an explicit `#define USE_MMAP_FOR_BUFFERS 1'
1574 dnl the system configuration file (s/*.h) to turn the use of mmap
1575 dnl in the relocating allocator on.
1578 if test $use_mmap_for_buffers = yes; then
1582 LIBS="$libsrc_libs $LIBS"
1584 dnl If found, this defines HAVE_LIBDNET, which m/pmax.h checks,
1585 dnl and also adds -ldnet to LIBS, which Autoconf uses for checks.
1586 AC_CHECK_LIB(dnet, dnet_ntoa)
1587 dnl This causes -lresolv to get used in subsequent tests,
1588 dnl which causes failures on some systems such as HPUX 9.
1589 dnl AC_CHECK_LIB(resolv, gethostbyname)
1591 dnl FIXME replace main with a function we actually want from this library.
1592 AC_CHECK_LIB(Xbsd, main, LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd")
1594 AC_CHECK_LIB(pthreads, cma_open)
1596 AC_MSG_CHECKING(for XFree86 in /usr/X386)
1597 if test -d /usr/X386/include; then
1599 : ${C_SWITCH_X_SITE="-I/usr/X386/include"}
1603 AC_MSG_RESULT($HAVE_XFREE386)
1605 # Change CFLAGS temporarily so that C_SWITCH_X_SITE gets used
1606 # for the tests that follow. We set it back to REAL_CFLAGS later on.
1608 REAL_CPPFLAGS="$CPPFLAGS"
1610 if test "${HAVE_X11}" = "yes"; then
1611 DEFS="$C_SWITCH_X_SITE $DEFS"
1612 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
1614 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
1615 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
1617 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
1618 # This is handled by LD_SWITCH_X_SITE_AUX during the real build,
1619 # but it's more convenient here to set LD_RUN_PATH
1620 # since this also works on hosts that don't understand LD_SWITCH_X_SITE_AUX.
1621 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
1622 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
1626 if test "${opsys}" = "gnu-linux"; then
1627 AC_MSG_CHECKING(whether X on GNU/Linux needs -b to link)
1629 [XOpenDisplay ("foo");],
1630 [xlinux_first_failure=no],
1631 [xlinux_first_failure=yes])
1632 if test "${xlinux_first_failure}" = "yes"; then
1633 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
1634 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
1635 OLD_CPPFLAGS="$CPPFLAGS"
1637 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
1638 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
1639 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
1640 LIBS="$LIBS -b i486-linuxaout"
1642 [XOpenDisplay ("foo");],
1643 [xlinux_second_failure=no],
1644 [xlinux_second_failure=yes])
1645 if test "${xlinux_second_failure}" = "yes"; then
1646 # If we get the same failure with -b, there is no use adding -b.
1647 # So take it out. This plays safe.
1648 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
1649 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
1650 CPPFLAGS="$OLD_CPPFLAGS"
1661 # Reportedly, some broken Solaris systems have XKBlib.h but are missing
1662 # header files included from there.
1663 AC_MSG_CHECKING(for Xkb)
1664 AC_TRY_LINK([#include <X11/Xlib.h>
1665 #include <X11/XKBlib.h>],
1666 [XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);],
1667 emacs_xkb=yes, emacs_xkb=no)
1668 AC_MSG_RESULT($emacs_xkb)
1669 if test $emacs_xkb = yes; then
1670 AC_DEFINE(HAVE_XKBGETKEYBOARD)
1673 AC_CHECK_FUNCS(XrmSetDatabase XScreenResourceString \
1674 XScreenNumberOfScreen XSetWMProtocols)
1677 if test "${window_system}" = "x11"; then
1678 AC_MSG_CHECKING(X11 version 6)
1679 AC_CACHE_VAL(emacs_cv_x11_version_6,
1680 [AC_TRY_LINK([#include <X11/Xlib.h>],
1681 [#if XlibSpecificationRelease < 6
1684 ], emacs_cv_x11_version_6=yes, emacs_cv_x11_version_6=no)])
1685 if test $emacs_cv_x11_version_6 = yes; then
1686 AC_MSG_RESULT(6 or newer)
1687 AC_DEFINE(HAVE_X11R6)
1689 AC_MSG_RESULT(before 6)
1693 if test "${window_system}" = "x11"; then
1694 AC_MSG_CHECKING(X11 version 5)
1695 AC_CACHE_VAL(emacs_cv_x11_version_5,
1696 [AC_TRY_LINK([#include <X11/Xlib.h>],
1697 [#if XlibSpecificationRelease < 5
1700 ], emacs_cv_x11_version_5=yes, emacs_cv_x11_version_5=no)])
1701 if test $emacs_cv_x11_version_5 = yes; then
1702 AC_MSG_RESULT(5 or newer)
1704 AC_DEFINE(HAVE_X11R5)
1707 AC_MSG_RESULT(before 5)
1711 dnl Do not put whitespace before the #include statements below.
1712 dnl Older compilers (eg sunos4 cc) choke on it.
1713 if test x"${USE_X_TOOLKIT}" = xmaybe; then
1714 if test x"${HAVE_X11R5}" = xyes; then
1715 AC_MSG_CHECKING(X11 version 5 with Xaw)
1716 AC_CACHE_VAL(emacs_cv_x11_version_5_with_xaw,
1718 #include <X11/Intrinsic.h>
1719 #include <X11/Xaw/Simple.h>],
1721 emacs_cv_x11_version_5_with_xaw=yes,
1722 emacs_cv_x11_version_5_with_xaw=no)])
1723 if test $emacs_cv_x11_version_5_with_xaw = yes; then
1724 AC_MSG_RESULT([5 or newer, with Xaw; use toolkit by default])
1727 AC_MSG_RESULT(before 5 or no Xaw; do not use toolkit by default)
1735 X_TOOLKIT_TYPE=$USE_X_TOOLKIT
1737 if test "${USE_X_TOOLKIT}" != "none"; then
1738 AC_MSG_CHECKING(X11 toolkit version)
1739 AC_CACHE_VAL(emacs_cv_x11_toolkit_version_6,
1740 [AC_TRY_LINK([#include <X11/Intrinsic.h>],
1741 [#if XtSpecificationRelease < 6
1744 ], emacs_cv_x11_toolkit_version_6=yes, emacs_cv_x11_toolkit_version_6=no)])
1745 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
1746 if test $emacs_cv_x11_toolkit_version_6 = yes; then
1747 AC_MSG_RESULT(6 or newer)
1748 AC_DEFINE(HAVE_X11XTR6)
1750 AC_MSG_RESULT(before 6)
1753 dnl If using toolkit, check whether libXmu.a exists.
1754 dnl tranle@intellicorp.com says libXmu.a can need XtMalloc in libXt.a to link.
1756 if test x$HAVE_X11XTR6 = xyes; then
1757 LIBS="-lXt -lSM -lICE $LIBS"
1761 AC_CHECK_LIB(Xmu, XmuConvertStandardSelection)
1762 test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
1765 # On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D.
1766 if test "${HAVE_X11}" = "yes"; then
1767 if test "${USE_X_TOOLKIT}" != "none"; then
1768 AC_CHECK_LIB(Xext, XShapeQueryExtension)
1772 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
1773 AC_CACHE_CHECK(for Motif version 2.1, emacs_cv_motif_version_2_1,
1774 [AC_TRY_COMPILE([#include <Xm/Xm.h>],
1775 [#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
1778 Motif version prior to 2.1.
1780 emacs_cv_motif_version_2_1=yes, emacs_cv_motif_version_2_1=no)])
1781 HAVE_MOTIF_2_1=$emacs_cv_motif_version_2_1
1782 if test $emacs_cv_motif_version_2_1 = yes; then
1784 AC_DEFINE(HAVE_MOTIF_2_1)
1785 AC_CHECK_LIB(Xp, XpCreateContext, HAVE_LIBXP=yes)
1786 if test ${HAVE_LIBXP} = yes; then
1787 AC_DEFINE(HAVE_LIBXP)
1792 ### Is -lXaw3d available?
1794 if test "${HAVE_X11}" = "yes"; then
1795 if test "${USE_X_TOOLKIT}" != "none"; then
1796 AC_CHECK_HEADER(X11/Xaw3d/Scrollbar.h,
1797 AC_CHECK_LIB(Xaw3d, XawScrollbarSetThumb, HAVE_XAW3D=yes))
1798 if test "${HAVE_XAW3D}" = "yes"; then
1799 AC_DEFINE(HAVE_XAW3D)
1804 dnl Use toolkit scroll bars if configured for X toolkit and either
1805 dnl using Motif or Xaw3d is available, and unless
1806 dnl --with-toolkit-scroll-bars=no was specified.
1808 USE_TOOLKIT_SCROLL_BARS=no
1809 if test "${with_toolkit_scroll_bars}" != "no"; then
1810 if test "${USE_X_TOOLKIT}" != "none"; then
1811 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
1812 AC_DEFINE(USE_TOOLKIT_SCROLL_BARS)
1814 USE_TOOLKIT_SCROLL_BARS=yes
1815 elif test "${HAVE_XAW3D}" = "yes"; then
1816 AC_DEFINE(USE_TOOLKIT_SCROLL_BARS)
1817 USE_TOOLKIT_SCROLL_BARS=yes
1822 dnl Don't use X11 input methods if user specifies he doesn't want it
1823 dnl with `--with-xim=no'.
1825 if test "${with_xim}" != "no"; then
1829 ### Use -lXpm if available, unless `--with-xpm=no'.
1831 if test "${HAVE_X11}" = "yes"; then
1832 if test "${with_xpm}" != "no"; then
1833 AC_CHECK_HEADER(X11/xpm.h,
1834 AC_CHECK_LIB(Xpm, XpmReadFileToPixmap, HAVE_XPM=yes, , -lX11))
1835 if test "${HAVE_XPM}" = "yes"; then
1836 AC_MSG_CHECKING(for XpmReturnAllocPixels preprocessor define)
1837 AC_EGREP_CPP(no_return_alloc_pixels,
1838 [#include "X11/xpm.h"
1839 #ifndef XpmReturnAllocPixels
1840 no_return_alloc_pixels
1842 ], HAVE_XPM=no, HAVE_XPM=yes)
1844 if test "${HAVE_XPM}" = "yes"; then
1852 if test "${HAVE_XPM}" = "yes"; then
1857 ### Use -ljpeg if available, unless `--with-jpeg=no'.
1859 if test "${HAVE_X11}" = "yes"; then
1860 if test "${with_jpeg}" != "no"; then
1861 dnl Checking for jpeglib.h can lose becsue of a redefinition of
1863 AC_CHECK_HEADER(jerror.h,
1864 AC_CHECK_LIB(jpeg, jpeg_destroy_compress, HAVE_JPEG=yes))
1867 if test "${HAVE_JPEG}" = "yes"; then
1868 AC_DEFINE(HAVE_JPEG)
1872 ### Use -lpng if available, unless `--with-png=no'.
1874 if test "${HAVE_X11}" = "yes"; then
1875 if test "${with_png}" != "no"; then
1876 AC_CHECK_HEADER(png.h,
1877 AC_CHECK_LIB(png, png_get_channels, HAVE_PNG=yes, , -lz -lm))
1880 if test "${HAVE_PNG}" = "yes"; then
1885 ### Use -ltiff if available, unless `--with-tiff=no'.
1887 if test "${HAVE_X11}" = "yes"; then
1888 if test "${with_tiff}" != "no"; then
1889 AC_CHECK_HEADER(tiffio.h,
1891 # At least one tiff package requires the jpeg library.
1892 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
1893 AC_CHECK_LIB(tiff, TIFFGetVersion, HAVE_TIFF=yes, , $tifflibs))
1896 if test "${HAVE_TIFF}" = "yes"; then
1897 AC_DEFINE(HAVE_TIFF)
1901 ### Use -lgif if available, unless `--with-gif=no'.
1903 if test "${HAVE_X11}" = "yes"; then
1904 if test "${with_gif}" != "no"; then
1905 AC_CHECK_HEADER(gif_lib.h,
1906 AC_CHECK_LIB(ungif, DGifOpen, HAVE_GIF=yes))
1909 if test "${HAVE_GIF}" = "yes"; then
1914 # If netdb.h doesn't declare h_errno, we must declare it by hand.
1915 AC_CACHE_CHECK(whether netdb declares h_errno,
1916 emacs_cv_netdb_declares_h_errno,
1917 [AC_TRY_LINK([#include <netdb.h>],
1919 emacs_cv_netdb_declares_h_errno=yes, emacs_cv_netdb_declares_h_errno=no)])
1920 if test $emacs_cv_netdb_declares_h_errno = yes; then
1921 AC_DEFINE(HAVE_H_ERRNO)
1926 # fmod, logb, and frexp are found in -lm on most systems.
1927 # On HPUX 9.01, -lm does not contain logb, so check for sqrt.
1928 AC_CHECK_LIB(m, sqrt)
1930 # Check for mail-locking functions in a "mail" library
1931 AC_CHECK_LIB(mail, maillock)
1932 dnl Debian, at least:
1933 dnl AC_CHECK_LIB(lockfile, maillock, [AC_DEFINE(HAVE_LIBMAIL)])
1934 AC_CHECK_LIB(lockfile, maillock)
1935 # If we have the shared liblockfile, assume we must use it for mail
1936 # locking (e.g. Debian). If we couldn't link against liblockfile
1937 # (no liblockfile.a installed), ensure that we don't need to.
1938 if test "$ac_cv_lib_lockfile_maillock" = no; then
1939 dnl This works for files generally, not just executables.
1940 dnl Should we look elsewhere for it? Maybe examine /etc/ld.so.conf?
1941 AC_CHECK_PROG(liblockfile, liblockfile.so, yes, no,
1942 /usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH)
1943 if test $ac_cv_prog_liblockfile = yes; then
1944 AC_MSG_ERROR([Shared liblockfile found but can't link against it.
1945 This probably means that movemail could lose mail.
1946 There may be a \`development' package to install containing liblockfile.])
1947 else AC_DEFINE(LIBMAIL, -llockfile)
1951 AC_CHECK_FUNCS(touchlock)
1952 AC_CHECK_HEADERS(maillock.h)
1954 AC_CHECK_FUNCS(gethostname getdomainname dup2 \
1955 rename closedir mkdir rmdir sysinfo \
1956 random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime res_init setsid \
1957 strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \
1958 utimes setrlimit setpgid getcwd getwd shutdown strftime getaddrinfo \
1959 __fpending mblen mbrlen strsignal setitimer ualarm index rindex \
1960 gai_strerror mkstemp)
1963 if test "$ac_cv_func_working_mktime" = no; then
1964 AC_DEFINE(BROKEN_MKTIME)
1972 AC_CHECK_FUNCS(grantpt)
1974 # PTY-related GNU extensions.
1975 AC_CHECK_FUNCS(getpt)
1977 # Check this now, so that we will NOT find the above functions in ncurses.
1978 # That is because we have not set up to link ncurses in lib-src.
1979 # It's better to believe a function is not available
1980 # than to expect to find it in ncurses.
1981 AC_CHECK_LIB(ncurses, tparm)
1983 # Do we need the Hesiod library to provide the support routines?
1984 if test "$with_hesiod" = yes ; then
1985 # Don't set $LIBS here -- see comments above.
1987 AC_CHECK_FUNC(res_send, , [AC_CHECK_FUNC(__res_send, ,
1988 [AC_CHECK_LIB(resolv, res_send, resolv=yes,
1989 [AC_CHECK_LIB(resolv, __res_send, resolv=yes)])])])
1990 if test "$resolv" = yes ; then
1992 AC_DEFINE(HAVE_LIBRESOLV)
1996 AC_CHECK_FUNC(hes_getmailhost, , [AC_CHECK_LIB(hesiod, hes_getmailhost,
1997 AC_DEFINE(HAVE_LIBHESIOD), :, $RESOLVLIB)])
2000 # These tell us which Kerberos-related libraries to use.
2001 if test "${with_kerberos+set}" = set; then
2002 AC_CHECK_LIB(com_err, com_err)
2003 AC_CHECK_LIB(k5crypto, mit_des_cbc_encrypt)
2004 AC_CHECK_LIB(crypto, mit_des_cbc_encrypt)
2005 AC_CHECK_LIB(krb5, krb5_init_context)
2006 if test "${with_kerberos5+set}" != set; then
2007 AC_CHECK_LIB(des425, des_cbc_encrypt,,
2008 AC_CHECK_LIB(des, des_cbc_encrypt))
2009 AC_CHECK_LIB(krb4, krb_get_cred,,
2010 AC_CHECK_LIB(krb, krb_get_cred))
2013 if test "${with_kerberos5+set}" = set; then
2014 AC_CHECK_HEADERS(krb5.h)
2016 AC_CHECK_HEADERS(des.h,,
2017 [AC_CHECK_HEADERS(kerberosIV/des.h,,
2018 [AC_CHECK_HEADERS(kerberos/des.h)])])
2019 AC_CHECK_HEADERS(krb.h,,
2020 [AC_CHECK_HEADERS(kerberosIV/krb.h,,
2021 [AC_CHECK_HEADERS(kerberos/krb.h)])])
2023 AC_CHECK_HEADERS(com_err.h)
2026 # Solaris requires -lintl if you want strerror (which calls dgettext)
2027 # to return localized messages.
2028 AC_CHECK_LIB(intl, dgettext)
2030 AC_MSG_CHECKING(whether localtime caches TZ)
2031 AC_CACHE_VAL(emacs_cv_localtime_cache,
2032 [if test x$ac_cv_func_tzset = xyes; then
2033 AC_TRY_RUN([#include <time.h>
2034 extern char **environ;
2038 for (to = from = environ; (*to = *from); from++)
2039 if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
2042 char TZ_GMT0[] = "TZ=GMT0";
2043 char TZ_PST8[] = "TZ=PST8";
2046 time_t now = time ((time_t *) 0);
2047 int hour_GMT0, hour_unset;
2048 if (putenv (TZ_GMT0) != 0)
2050 hour_GMT0 = localtime (&now)->tm_hour;
2052 hour_unset = localtime (&now)->tm_hour;
2053 if (putenv (TZ_PST8) != 0)
2055 if (localtime (&now)->tm_hour == hour_GMT0)
2058 if (localtime (&now)->tm_hour != hour_unset)
2061 }], emacs_cv_localtime_cache=no, emacs_cv_localtime_cache=yes,
2062 [# If we have tzset, assume the worst when cross-compiling.
2063 emacs_cv_localtime_cache=yes])
2065 # If we lack tzset, report that localtime does not cache TZ,
2066 # since we can't invalidate the cache if we don't have tzset.
2067 emacs_cv_localtime_cache=no
2069 AC_MSG_RESULT($emacs_cv_localtime_cache)
2070 if test $emacs_cv_localtime_cache = yes; then
2071 AC_DEFINE(LOCALTIME_CACHE)
2074 if test "x$HAVE_TIMEVAL" = xyes; then
2075 AC_CHECK_FUNCS(gettimeofday)
2076 AC_CACHE_CHECK(whether gettimeofday can accept two arguments,
2077 emacs_cv_gettimeofday_two_arguments,
2079 #ifdef TIME_WITH_SYS_TIME
2080 #include <sys/time.h>
2083 #ifdef HAVE_SYS_TIME_H
2084 #include <sys/time.h>
2089 [struct timeval time;
2090 gettimeofday (&time, 0);],
2091 emacs_cv_gettimeofday_two_arguments=yes,
2092 emacs_cv_gettimeofday_two_arguments=no)])
2093 if test $emacs_cv_gettimeofday_two_arguments = no; then
2094 AC_DEFINE(GETTIMEOFDAY_ONE_ARGUMENT)
2098 dnl Note that AC_STRUCT_TIMEZONE doesn't do what you might expect.
2099 if test "$ac_cv_func_gettimeofday" = yes; then
2100 AC_CACHE_CHECK([for struct timezone], emacs_cv_struct_timezone,
2101 [AC_TRY_COMPILE([#include <sys/time.h>],
2102 [struct timezone tz;],
2103 dnl It may be that we can't call gettimeofday with a non-null pointer,
2104 dnl even though we have struct timezone (e.g. HPUX). In that case
2105 dnl we'll lie about struct timezone.
2107 #ifdef TIME_WITH_SYS_TIME
2108 #include <sys/time.h>
2111 #ifdef HAVE_SYS_TIME_H
2112 #include <sys/time.h>
2118 struct timeval time;
2119 struct timezone dummy;
2120 exit (gettimeofday (&time, &dummy));
2122 emacs_cv_struct_timezone=yes,
2123 emacs_cv_struct_timezone=no, emacs_cv_struct_timezone=yes)],
2124 emacs_cv_struct_timezone=no)])
2128 AC_CHECK_FUNC(socket, , ok_so_far=no)
2129 if test $ok_so_far = yes; then
2130 AC_CHECK_HEADER(netinet/in.h, , ok_so_far=no)
2132 if test $ok_so_far = yes; then
2133 AC_CHECK_HEADER(arpa/inet.h, , ok_so_far=no)
2135 if test $ok_so_far = yes; then
2136 AC_DEFINE(HAVE_INET_SOCKETS)
2139 if test -f /usr/lpp/X11/bin/smt.exp; then
2140 AC_DEFINE(HAVE_AIX_SMT_EXP)
2143 AC_MSG_CHECKING(whether system supports dynamic ptys)
2144 if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then
2146 AC_DEFINE(HAVE_DEV_PTMX)
2153 # Fixme: This should be replaced when we have autoconf 2.14.
2156 # Set up the CFLAGS for real compilation, so we can substitute it.
2157 CFLAGS="$REAL_CFLAGS"
2158 CPPFLAGS="$REAL_CPPFLAGS"
2161 #### Find out which version of Emacs this is.
2162 version=`grep 'defconst[ ]*emacs-version' ${srcdir}/lisp/version.el \
2163 | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`
2164 changequote([, ])dnl
2165 if test x"${version}" = x; then
2166 AC_MSG_ERROR(can't find current emacs version in \`${srcdir}/lisp/version.el'.)
2169 ### Specify what sort of things we'll be editing into Makefile and config.h.
2170 ### Use configuration here uncanonicalized to avoid exceeding size limits.
2172 AC_SUBST(configuration)
2176 AC_SUBST(exec_prefix)
2179 AC_SUBST(sharedstatedir)
2180 AC_SUBST(libexecdir)
2184 AC_SUBST(locallisppath)
2186 AC_SUBST(x_default_search_path)
2188 AC_SUBST(archlibdir)
2191 AC_SUBST(c_switch_system)
2192 AC_SUBST(c_switch_machine)
2193 AC_SUBST(LD_SWITCH_X_SITE)
2194 AC_SUBST(LD_SWITCH_X_SITE_AUX)
2195 AC_SUBST(C_SWITCH_X_SITE)
2197 AC_SUBST(X_TOOLKIT_TYPE)
2200 AC_SUBST(GETLOADAVG_LIBS)
2202 AC_DEFINE_UNQUOTED(EMACS_CONFIGURATION, "${canonical}")
2203 AC_DEFINE_UNQUOTED(EMACS_CONFIG_OPTIONS, "${ac_configure_args}")
2204 AC_DEFINE_UNQUOTED(config_machfile, "${machfile}")
2205 AC_DEFINE_UNQUOTED(config_opsysfile, "${opsysfile}")
2206 AC_DEFINE_UNQUOTED(LD_SWITCH_X_SITE, ${LD_SWITCH_X_SITE})
2207 AC_DEFINE_UNQUOTED(LD_SWITCH_X_SITE_AUX, ${LD_SWITCH_X_SITE_AUX})
2208 AC_DEFINE_UNQUOTED(C_SWITCH_X_SITE, ${C_SWITCH_X_SITE})
2209 AC_DEFINE_UNQUOTED(UNEXEC_SRC, ${UNEXEC_SRC})
2211 if test "${HAVE_X_WINDOWS}" = "yes" ; then
2212 AC_DEFINE(HAVE_X_WINDOWS)
2214 if test "${USE_X_TOOLKIT}" != "none" ; then
2215 AC_DEFINE(USE_X_TOOLKIT)
2217 if test "${HAVE_X11}" = "yes" ; then
2220 if test "${HAVE_XFREE386}" = "yes" ; then
2221 AC_DEFINE(HAVE_XFREE386)
2223 if test "${HAVE_MENUS}" = "yes" ; then
2224 AC_DEFINE(HAVE_MENUS)
2226 if test "${GNU_MALLOC}" = "yes" ; then
2227 AC_DEFINE(GNU_MALLOC)
2229 if test "${REL_ALLOC}" = "yes" ; then
2230 AC_DEFINE(REL_ALLOC)
2233 AC_CHECK_HEADERS(nlist.h, [AC_DEFINE(NLIST_STRUCT, 1,
2234 [Define if you have <nlist.h>.])])
2236 #### Report on what we decided to do.
2238 Configured for \`${canonical}'.
2240 Where should the build process find the source code? ${srcdir}
2241 What operating system and machine description files should Emacs use?
2242 \`${opsysfile}' and \`${machfile}'
2243 What compiler should emacs be built with? ${CC} ${CFLAGS}
2244 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
2245 Should Emacs use a relocating allocator for buffers? ${REL_ALLOC}
2246 Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers
2247 What window system should Emacs use? ${window_system}
2248 What toolkit should Emacs use? ${USE_X_TOOLKIT}"
2250 if test -n "${x_includes}"; then
2251 echo " Where do we find X Windows header files? ${x_includes}"
2253 echo " Where do we find X Windows header files? Standard dirs"
2255 if test -n "${x_libraries}"; then
2256 echo " Where do we find X Windows libraries? ${x_libraries}"
2258 echo " Where do we find X Windows libraries? Standard dirs"
2261 echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}"
2262 echo " Does Emacs use -lXpm? ${HAVE_XPM}"
2263 echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
2264 echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
2265 echo " Does Emacs use -lungif? ${HAVE_GIF}"
2266 echo " Does Emacs use -lpng? ${HAVE_PNG}"
2267 echo " Does Emacs use X toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}"
2270 # Remove any trailing slashes in these variables.
2272 test "${prefix}" != NONE &&
2273 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
2274 test "${exec_prefix}" != NONE &&
2275 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
2276 changequote([, ])dnl
2278 ## Check if the C preprocessor will convert `..' to `. .'. If so, set
2279 ## CPP_NEED_TRADITIONAL to `yes' so that the code to generate Makefile
2280 ## from Makefile.c can correctly provide the arg `-traditional' to the
2283 AC_EGREP_CPP(yes..yes,
2285 CPP_NEED_TRADITIONAL=no,
2286 CPP_NEED_TRADITIONAL=yes)
2288 AC_OUTPUT(Makefile lib-src/Makefile.c:lib-src/Makefile.in oldXMenu/Makefile \
2289 man/Makefile lwlib/Makefile src/Makefile.c:src/Makefile.in \
2290 lisp/Makefile lispref/Makefile lispintro/Makefile leim/Makefile, [
2292 ### Make the necessary directories, if they don't exist.
2293 for dir in etc lisp ; do
2294 test -d ${dir} || mkdir ${dir}
2297 # Build src/Makefile from ${srcdir}/src/Makefile.c
2298 # and lib-src/Makefile from ${srcdir}/lib-src/Makefile.c
2299 # This must be done after src/config.h is built, since we rely on that file.
2301 changequote(, )dnl The horror, the horror.
2302 # Now get this: Some word that is part of the ${srcdir} directory name
2303 # or the ${configuration} value might, just might, happen to be an
2304 # identifier like `sun4' or `i386' or something, and be predefined by
2305 # the C preprocessor to some helpful value like 1, or maybe the empty
2306 # string. Needless to say consequent macro substitutions are less
2307 # than conducive to the makefile finding the correct directory.
2308 undefs="`echo $top_srcdir $configuration $canonical |
2309 sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/ *$//' \
2310 -e 's/ */ -U/g' -e 's/-U[0-9][^ ]*//g' \
2312 changequote([, ])dnl
2314 echo creating src/epaths.h
2315 ${MAKE-make} epaths-force
2317 # As of 2000-11-19, newest development versions of GNU cpp preprocess
2318 # `..' to `. .' unless invoked with -traditional
2320 if test "x$GCC" = xyes && test "x$CPP_NEED_TRADITIONAL" = xyes; then
2321 CPPFLAGS="$CPPFLAGS -traditional"
2324 echo creating lib-src/Makefile
2326 rm -f junk.c junk1.c junk2.c
2327 sed -e '/start of cpp stuff/q' \
2328 < Makefile.c > junk1.c
2329 sed -e '1,/start of cpp stuff/d'\
2330 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
2331 < Makefile.c > junk.c
2332 $CPP $undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
2333 sed -e 's/^ / /' -e '/^#/d' -e '/^[
\f]*$/d' > junk2.c
2334 cat junk1.c junk2.c > Makefile.new
2335 rm -f junk.c junk1.c junk2.c
2336 chmod 444 Makefile.new
2337 mv -f Makefile.new Makefile
2340 echo creating src/Makefile
2342 rm -f junk.c junk1.c junk2.c
2343 sed -e '/start of cpp stuff/q' \
2344 < Makefile.c > junk1.c
2345 sed -e '1,/start of cpp stuff/d'\
2346 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
2347 < Makefile.c > junk.c
2348 $CPP $undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
2349 sed -e 's/^ / /' -e '/^#/d' -e '/^[
\f]*$/d' > junk2.c
2350 cat junk1.c junk2.c > Makefile.new
2351 rm -f junk.c junk1.c junk2.c
2352 chmod 444 Makefile.new
2353 mv -f Makefile.new Makefile
2356 if test ! -f src/.gdbinit && test -f $srcdir/src/.gdbinit; then
2357 echo creating src/.gdbinit
2358 echo source $srcdir/src/.gdbinit > src/.gdbinit
2361 # This is how we know whether to re-run configure in certain cases.
2362 touch src/config.stamp
2364 ], [GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPP_NEED_TRADITIONAL="$CPP_NEED_TRADITIONAL" CPPFLAGS="$CPPFLAGS"])