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, 2002
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'
44 [ --with-game-dir use a shared game directory if possible],
45 [if test "$withval" = yes; then
46 gamedir="${localstatedir}/games/emacs"
48 if test "$withval" = no; then
57 AC_ARG_WITH(game-user,
58 [ --with-game-user use specified user for game directory],
59 [gameuser="$withval"])
62 [ --without-gcc don't use GCC to compile Emacs if GCC is found])
64 [ --without-pop don't support POP mail retrieval with movemail],
65 [if test "$withval" = yes; then
66 AC_DEFINE(MAIL_USE_POP)
69 AC_DEFINE(MAIL_USE_POP))
71 [ --with-kerberos support Kerberos-authenticated POP],
72 [AC_DEFINE(KERBEROS)])
73 AC_ARG_WITH(kerberos5,
74 [ --with-kerberos5 support Kerberos version 5 authenticated POP],
75 [if test "${with_kerberos5+set}" = set; then
76 if test "${with_kerberos+set}" != set; then
81 AC_DEFINE(KERBEROS5)])
83 [ --with-hesiod support Hesiod to get the POP server host],
87 [ --without-sound don't compile with sound support])
89 dnl This should be the last --with option, because --with-x is
90 dnl added later on when we find the path of X, and it's best to
91 dnl keep them together visually.
92 AC_ARG_WITH(x-toolkit,
93 [ --with-x-toolkit=KIT use an X toolkit (KIT = yes/lucid/athena/motif/no)],
94 [ case "${withval}" in
95 y | ye | yes ) val=athena ;;
97 l | lu | luc | luci | lucid ) val=lucid ;;
98 a | at | ath | athe | athen | athena ) val=athena ;;
99 m | mo | mot | moti | motif ) val=motif ;;
100 dnl These don't currently work.
101 dnl o | op | ope | open | open- | open-l | open-lo \
102 dnl | open-loo | open-look ) val=open-look ;;
104 dnl AC_MSG_ERROR([the \`--with-x-toolkit' option is supposed to have a value
105 dnl which is \`yes', \`no', \`lucid', \`athena', \`motif' or \`open-look'.])
106 AC_MSG_ERROR([\`--with-x-toolkit=$withval' is invalid\;
107 this option's value should be \`yes', \`no', \`lucid', \`athena', or \`motif'.
108 Currently, \`yes', \`athena' and \`lucid' are synonyms.])
114 [ --with-xpm use -lXpm for displaying XPM images])
116 [ --with-jpeg use -ljpeg for displaying JPEG images])
118 [ --with-tiff use -ltiff for displaying TIFF images])
120 [ --with-gif use -lungif for displaying GIF images])
122 [ --with-png use -lpng for displaying PNG images])
123 AC_ARG_WITH(toolkit-scroll-bars,
124 [ --without-toolkit-scroll-bars
125 don't use Motif or Xaw3d scroll bars])
127 [ --without-xim don't use X11 XIM])
129 #### Make srcdir absolute, if it isn't already. It's important to
130 #### avoid running the path through pwd unnecessarily, since pwd can
131 #### give you automounter prefixes, which can go away. We do all this
132 #### so Emacs can find its files when run uninstalled.
133 ## Make sure CDPATH doesn't affect cd (in case PWD is relative).
138 ## We may be able to use the $PWD environment variable to make this
139 ## absolute. But sometimes PWD is inaccurate.
140 ## Note: we used to use ${PWD} at the end instead of `pwd`,
141 ## but that tested only for a well-formed and valid PWD,
142 ## it did not object when PWD was well-formed and valid but just wrong.
143 if test ".${PWD}" != "." && test ".`(cd ${PWD} ; sh -c pwd)`" = ".`pwd`" ;
147 srcdir="`(cd ${srcdir}; pwd)`"
150 * ) srcdir="`(cd ${srcdir}; pwd)`" ;;
153 #### Check if the source directory already has a configured system in it.
154 if test `pwd` != `(cd ${srcdir} && pwd)` \
155 && test -f "${srcdir}/src/config.h" ; then
156 AC_MSG_WARN([The directory tree \`${srcdir}' is being used
157 as a build directory right now; it has been configured in its own
158 right. To configure in another directory as well, you MUST
159 use GNU make. If you do not have GNU make, then you must
160 now do \`make distclean' in ${srcdir},
161 and then run $0 again.])
164 extrasub='/^VPATH[ ]*=/c\
171 vpath %.in $(srcdir)\
172 vpath %.texi $(srcdir)'
175 #### Given the configuration name, set machfile and opsysfile to the
176 #### names of the m/*.h and s/*.h files we should use.
178 ### Canonicalize the configuration name.
182 configuration=${host_alias-$host}
186 ### If you add support for a new configuration, add code to this
187 ### switch statement to recognize your configuration name and select
188 ### the appropriate operating system and machine description files.
190 ### You would hope that you could choose an m/*.h file pretty much
191 ### based on the machine portion of the configuration name, and an s-
192 ### file based on the operating system portion. However, it turns out
193 ### that each m/*.h file is pretty manufacturer-specific - for
194 ### example, apollo.h, hp9000s300.h, mega68k, news.h, and tad68k are
195 ### all 68000 machines; mips.h, pmax.h, and news-risc are all MIPS
196 ### machines. So we basically have to have a special case for each
197 ### configuration name.
199 ### As far as handling version numbers on operating systems is
200 ### concerned, make sure things will fail in a fixable way. If
201 ### /etc/MACHINES doesn't say anything about version numbers, be
202 ### prepared to handle anything reasonably. If version numbers
203 ### matter, be sure /etc/MACHINES says something about it.
205 ### Eric Raymond says we should accept strings like "sysvr4" to mean
206 ### "System V Release 4"; he writes, "The old convention encouraged
207 ### confusion between `system' and `release' levels'."
209 machine='' opsys='' unported=no
210 case "${canonical}" in
215 case "${canonical}" in
216 alpha*-*-freebsd*) machine=alpha ;;
217 i[3456]86-*-freebsd*) machine=intel386 ;;
224 case "${canonical}" in
225 alpha*-*-netbsd*) machine=alpha ;;
226 i[3456]86-*-netbsd*) machine=intel386 ;;
228 # This is somewhat bogus.
229 machine=hp9000s300 ;;
230 powerpc-apple-netbsd*) machine=macppc ;;
231 mips-*-netbsd*) machine=pmax ;;
232 mipsel-*-netbsd*) machine=pmax ;;
233 ns32k-*-netbsd*) machine=ns32000 ;;
234 powerpc-*-netbsd*) machine=macppc ;;
235 sparc*-*-netbsd*) machine=sparc ;;
236 vax-*-netbsd*) machine=vax ;;
237 arm-*-netbsd*) machine=arm ;;
244 case "${canonical}" in
245 alpha*-*-openbsd*) machine=alpha ;;
246 i386-*-openbsd*) machine=intel386 ;;
247 m68k-*-openbsd*) machine=hp9000s300 ;;
248 mipsel-*-openbsd*) machine=pmax ;;
249 ns32k-*-openbsd*) machine=ns32000 ;;
250 sparc-*-openbsd*) machine=sparc ;;
251 vax-*-openbsd*) machine=vax ;;
256 arm-acorn-riscix1.1* )
257 machine=acorn opsys=riscix1-1
259 arm-acorn-riscix1.2* | arm-acorn-riscix )
260 ## This name is riscix12 instead of riscix1.2
261 ## to avoid a file name conflict on MSDOS.
262 machine=acorn opsys=riscix12
268 case "${canonical}" in
269 i[345]86-*-bsdi*) machine=intel386 ;;
270 sparc-*-bsdi*) machine=sparc ;;
271 powerpc-*-bsdi*) machine=macppc ;;
273 case "${canonical}" in
274 *-*-bsd386* | *-*-bsdi1* ) opsys=bsd386 ;;
275 *-*-bsdi2.0* ) opsys=bsdos2 ;;
276 *-*-bsdi2* ) opsys=bsdos2-1 ;;
277 *-*-bsdi3* ) opsys=bsdos3 ;;
278 *-*-bsdi[45]* ) opsys=bsdos4 ;;
283 ## Strictly speaking, we need the version of the alliant operating
284 ## system to choose the right machine file, but currently the
285 ## configuration name doesn't tell us enough to choose the right
286 ## one; we need to give alliants their own operating system name to
287 ## do this right. When someone cares, they can help us.
289 machine=alliant4 opsys=bsd4-2
292 machine=alliant-2800 opsys=bsd4-3
295 ## Alpha (DEC) machines.
297 machine=alpha opsys=osf1
298 # This is needed to find X11R6.1 libraries for certain tests.
299 NON_GCC_LINK_TEST_OPTIONS=-Wl,-rpath,/usr/X11R6/lib
300 GCC_LINK_TEST_OPTIONS=-Wl,-rpath,/usr/X11R6/lib
301 # NON_GNU_CPP is necessary on 5.0 to avoid mangling src/Makefile
302 # due to non-traditional preprocessing with the current compiler
303 # defaults. OSF 4 can also have that compiler version, and there
304 # seems always to have been a usable /usr/bin/cpp.
305 NON_GNU_CPP=/usr/bin/cpp
306 case "${canonical}" in
307 alpha*-dec-osf[5-9]*)
312 alpha*-*-linux-gnu* )
313 machine=alpha opsys=gnu-linux
317 machine=arm opsys=gnu-linux
322 machine=macppc opsys=gnu-linux
327 machine=altos opsys=usg5-2
332 machine=amdahl opsys=usg5-2-2
337 machine=apollo opsys=bsd4-3
340 ## AT&T 3b2, 3b5, 3b15, 3b20
342 machine=att3b opsys=usg5-2-2
345 ## AT&T 3b1 - The Mighty Unix PC!
347 machine=7300 opsys=usg5-2-2
352 machine=ibmrs6000 opsys=aix3-2
357 machine=dpx2 opsys=usg5-3
362 machine=sps7 opsys=usg5-2
365 ## CCI 5/32, 6/32 -- see "Tahoe".
368 ## I don't know what configuration name to use for this; config.sub
369 ## doesn't seem to know anything about it. Hey, Celerity users, get
371 celerity-celerity-bsd* )
372 machine=celerity opsys=bsd4-2
376 ## What operating systems does this chip run that Emacs has been
380 ## We'll use the catch-all code at the bottom to guess the
385 mips-compaq-nonstopux* )
386 machine=nonstopux opsys=nonstopux
390 *-convex-bsd* | *-convex-convexos* )
391 machine=convex opsys=bsd4-3
392 ## Prevents spurious white space in makefiles - d.m.cooke@larc.nasa.gov
393 NON_GNU_CPP="cc -E -P"
397 i[3456]86-cubix-sysv* )
398 machine=intel386 opsys=usg5-3
402 cydra*-cydrome-sysv* )
403 machine=cydra5 opsys=usg5-3
406 ## Data General AViiON Machines
407 ## DG changed naming conventions with the release of 5.4.4.10, they
408 ## dropped the initial 5.4 but left the intervening R. Because of the
409 ## R this shouldn't conflict with older versions of the OS (which I
410 ## think were named like dgux4.*). In addition, DG new AViiONs series
411 ## uses either Motorola M88k or Intel Pentium CPUs.
412 m88k-dg-dguxR4.* | m88k-dg-dgux4* )
413 machine=aviion opsys=dgux4
415 m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* )
416 ## This name is dgux5-4-3 instead of dgux5-4r3
417 ## to avoid a file name conflict on MSDOS.
418 machine=aviion opsys=dgux5-4-3
420 m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* )
421 machine=aviion opsys=dgux5-4r2
424 machine=aviion opsys=dgux
427 ## Data General AViiON Intel (x86) Machines
428 ## Exists from 5.4.3 (current i586-dg-dguxR4.11)
429 ## Ehud Karni, 1998-may-30, ehud@unix.simonwiesel.co.il
430 i[345]86-dg-dguxR4* )
431 machine=aviion-intel opsys=dgux4
435 mips-dec-ultrix[0-3].* | mips-dec-ultrix4.0* | mips-dec-bsd4.2* )
436 machine=pmax opsys=bsd4-2
438 mips-dec-ultrix4.[12]* | mips-dec-bsd* )
439 machine=pmax opsys=bsd4-3
442 machine=pmax opsys=ultrix4-3
445 machine=pmax opsys=osf1
447 mips-dec-mach_bsd4.3* )
448 machine=pmax opsys=mach-bsd4-3
451 ## Motorola Delta machines
452 m68k-motorola-sysv* | m68000-motorola-sysv* )
453 machine=delta opsys=usg5-3
454 if test -z "`type gnucc | grep 'not found'`"
456 if test -s /etc/167config
457 then CC="gnucc -m68040"
458 else CC="gnucc -m68881"
461 if test -z "`type gcc | grep 'not found'`"
467 m88k-motorola-sysv4* )
468 # jbotte@bnr.ca says that UNIX_System_V <hostName> 4.0 R40V4.3 m88k mc88110
469 # needs POSIX_SIGNALS and therefore needs usg5-4-2.
470 # I hope there are not other 4.0 versions for this machine
471 # which really need usg5-4 instead.
472 machine=delta88k opsys=usg5-4-2
474 m88k-motorola-sysv* | m88k-motorola-m88kbcs* )
475 machine=delta88k opsys=usg5-3
480 machine=dual opsys=usg5-2
483 machine=dual opsys=unipl5-2
488 machine=elxsi opsys=usg5-2
493 machine=ns16000 opsys=umax
496 ## The GEC 63 - apparently, this port isn't really finished yet.
497 # I'm sure we finished off the last of the machines, though. -- fx
499 ## Gould Power Node and NP1
501 machine=gould opsys=bsd4-2
504 machine=gould opsys=bsd4-3
507 machine=gould-np1 opsys=bsd4-3
510 ## Harris Night Hawk machines running CX/UX (a 5000 looks just like a 4000
511 ## as far as Emacs is concerned).
513 # Build needs to be different on 7.0 and later releases
515 [56].[0-9] ) machine=nh4000 opsys=cxux ;;
516 [7].[0-9] ) machine=nh4000 opsys=cxux7 ;;
518 NON_GNU_CPP="/lib/cpp"
520 ## Harris ecx or gcx running CX/UX (Series 1200, Series 3000)
522 machine=nh3000 opsys=cxux
524 ## Harris power pc NightHawk running Power UNIX (Series 6000)
525 powerpc-harris-powerunix )
526 machine=nh6000 opsys=powerunix
527 NON_GNU_CPP="cc -Xo -E -P"
529 ## SR2001/SR2201 running HI-UX/MPP
530 hppa1.1-hitachi-hiuxmpp* )
531 machine=sr2k opsys=hiuxmpp
533 hppa1.1-hitachi-hiuxwe2* )
534 machine=sr2k opsys=hiuxwe2
537 xps*-honeywell-sysv* )
538 machine=xps100 opsys=usg5-2
541 ## HP 9000 series 200 or 300
543 machine=hp9000s300 opsys=bsd4-3
545 ## HP/UX 7, 8, 9, and 10 are supported on these machines.
548 ## Someone's system reports A.B8.05 for this.
549 ## I wonder what other possibilities there are.
550 *.B8.* ) machine=hp9000s300 opsys=hpux8 ;;
551 *.08.* ) machine=hp9000s300 opsys=hpux8 ;;
552 *.09.* ) machine=hp9000s300 opsys=hpux9 ;;
553 *.1[0-9].* ) machine=hp9000s300 opsys=hpux9shr ;;
554 *) machine=hp9000s300 opsys=hpux ;;
558 ## HP 9000 series 700 and 800, running HP/UX
560 machine=hp800 opsys=hpux
563 machine=hp800 opsys=hpux8
566 machine=hp800 opsys=hpux9shr
569 machine=hp800 opsys=hpux9
572 machine=hp800 opsys=hpux10
574 hppa*-hp-hpux1[1-9]* )
575 machine=hp800 opsys=hpux11
579 machine=hp800 opsys=gnu-linux
582 ## HP 9000 series 700 and 800, running HP/UX
584 ## Cross-compilation? Nah!
586 ## Someone's system reports A.B8.05 for this.
587 ## I wonder what other possibilities there are.
588 *.B8.* ) machine=hp800 opsys=hpux8 ;;
589 *.08.* ) machine=hp800 opsys=hpux8 ;;
590 *.09.* ) machine=hp800 opsys=hpux9 ;;
591 *) machine=hp800 opsys=hpux10 ;;
595 machine=hp800 opsys=nextstep
600 machine=orion opsys=bsd4-2
603 machine=orion105 opsys=bsd4-2
607 i[3456]86-ibm-aix1.1* )
608 machine=ibmps2-aix opsys=usg5-2-2
610 i[3456]86-ibm-aix1.[23]* | i[3456]86-ibm-aix* )
611 machine=ibmps2-aix opsys=usg5-3
614 machine=ibm370aix opsys=usg5-3
617 machine=ibms390 opsys=gnu-linux
619 rs6000-ibm-aix3.1* | powerpc-ibm-aix3.1* )
620 machine=ibmrs6000 opsys=aix3-1
622 rs6000-ibm-aix3.2.5 | powerpc-ibm-aix3.2.5 )
623 machine=ibmrs6000 opsys=aix3-2-5
625 rs6000-ibm-aix4.1* | powerpc-ibm-aix4.1* )
626 machine=ibmrs6000 opsys=aix4-1
628 rs6000-ibm-aix4.2* | powerpc-ibm-aix4.2* )
629 machine=ibmrs6000 opsys=aix4-2
631 rs6000-ibm-aix5.1* | powerpc-ibm-aix5.1* )
632 machine=ibmrs6000 opsys=aix4-2
634 rs6000-ibm-aix4.0* | powerpc-ibm-aix4.0* )
635 machine=ibmrs6000 opsys=aix4
637 rs6000-ibm-aix4* | powerpc-ibm-aix4* )
638 machine=ibmrs6000 opsys=aix4-1
640 rs6000-ibm-aix* | powerpc-ibm-aix* )
641 machine=ibmrs6000 opsys=aix3-2
644 machine=ibmrt opsys=bsd4-3
647 machine=ibmrt opsys=bsd4-2
650 machine=ibmrt opsys=bsd4-3
653 machine=ibmrt opsys=bsd4-2
656 machine=ibmrt opsys=bsd4-3
659 machine=ibmrt opsys=bsd4-3
662 machine=ibmrt-aix opsys=usg5-2-2
665 ## Integrated Solutions `Optimum V'
667 machine=isi-ov opsys=bsd4-2
670 machine=isi-ov opsys=bsd4-3
673 ## Intel 386 machines where we do care about the manufacturer
674 i[3456]86-intsys-sysv* )
675 machine=is386 opsys=usg5-2-2
679 i[3456]86-prime-sysv* )
680 machine=i386 opsys=usg5-3
683 ## Sequent Symmetry running Dynix
684 i[3456]86-sequent-bsd* )
685 machine=symmetry opsys=bsd4-3
688 ## Sequent Symmetry running ptx 4, which is a modified SVR4.
689 i[3456]86-sequent-ptx4* | i[3456]86-sequent-sysv4* )
690 machine=sequent-ptx opsys=ptx4
694 ## Sequent Symmetry running DYNIX/ptx
695 ## Use the old cpp rather than the newer ANSI one.
696 i[3456]86-sequent-ptx* )
697 machine=sequent-ptx opsys=ptx
698 NON_GNU_CPP="/lib/cpp"
701 ## ncr machine running svr4.3.
702 i[3456]86-ncr-sysv4.3 )
703 machine=ncr386 opsys=usg5-4-3
706 ## Unspecified sysv on an ncr machine defaults to svr4.2.
707 ## (Plain usg5-4 doesn't turn on POSIX signals, which we need.)
708 i[3456]86-ncr-sysv* )
709 machine=ncr386 opsys=usg5-4-2
712 ## Intel Paragon OSF/1
714 machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp
719 machine=i860 opsys=usg5-4
720 NON_GNU_CC="/bin/cc" # Ie, not the one in /usr/ucb/cc.
721 NON_GNU_CPP="/usr/ccs/lib/cpp" # cc -E tokenizes macro expansion.
725 powerpc*-*-linux-gnu* )
726 machine=macppc opsys=gnu-linux
731 machine=masscomp opsys=rtu
736 machine=mega68 opsys=bsd4-2
739 ## Workstations sold by MIPS
740 ## This is not necessarily all workstations using the MIPS processor -
741 ## Irises are produced by SGI, and DECstations by DEC.
743 ## etc/MACHINES lists mips.h and mips4.h as possible machine files,
744 ## and usg5-2-2 and bsd4-3 as possible OS files. The only guidance
745 ## it gives for choosing between the alternatives seems to be "Use
746 ## -machine=mips4 for RISCOS version 4; use -opsystem=bsd4-3 with
747 ## the BSD world." I'll assume that these are instructions for
748 ## handling two odd situations, and that every other situation
749 ## should use mips.h and usg5-2-2, they being listed first.
752 ## Fall through to the general code at the bottom to decide on the OS.
755 machine=mips4 opsys=bsd4-3
756 NON_GNU_CC="cc -systype bsd43"
757 NON_GNU_CPP="cc -systype bsd43 -E"
760 machine=mips4 opsys=riscos5
761 NON_GNU_CC="cc -systype bsd43"
762 NON_GNU_CPP="cc -systype bsd43 -E"
765 machine=mips opsys=bsd4-3
768 machine=mips opsys=usg5-2-2
772 m68*-next-* | m68k-*-nextstep* )
773 machine=m68k opsys=nextstep
776 ## The complete machine from National Semiconductor
778 machine=ns32000 opsys=usg5-2
782 m68*-ncr-sysv2* | m68*-ncr-sysvr2* )
783 machine=tower32 opsys=usg5-2-2
785 m68*-ncr-sysv3* | m68*-ncr-sysvr3* )
786 machine=tower32v3 opsys=usg5-3
791 machine=ews4800 opsys=ux4800
796 machine=targon31 opsys=usg5-2-2
801 machine=nu opsys=usg5-2
806 machine=plexus opsys=usg5-2
809 ## PowerPC reference platform
810 powerpcle-*-solaris2* )
816 ## I don't really have any idea what sort of processor the Pyramid has,
817 ## so I'm assuming it is its own architecture.
818 pyramid-pyramid-bsd* )
819 machine=pyramid opsys=bsd4-2
823 ns32k-sequent-bsd4.2* )
824 machine=sequent opsys=bsd4-2
826 ns32k-sequent-bsd4.3* )
827 machine=sequent opsys=bsd4-3
831 mips-siemens-sysv* | mips-sni-sysv*)
832 machine=mips-siemens opsys=usg5-4
833 NON_GNU_CC=/usr/ccs/bin/cc
834 NON_GNU_CPP=/usr/ccs/lib/cpp
837 ## Silicon Graphics machines
838 ## Iris 2500 and Iris 2500 Turbo (aka the Iris 3030)
840 machine=irist opsys=iris3-5
842 m68*-sgi-iris3.6* | m68*-sgi-iris*)
843 machine=irist opsys=iris3-6
847 machine=iris4d opsys=irix3-3
850 machine=iris4d opsys=irix4-0
853 machine=iris4d opsys=irix6-5
854 # Without defining _LANGUAGE_C, things get masked out in the headers
855 # so that, for instance, grepping for `free' in stdlib.h fails and
856 # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
857 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
858 NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C"
861 machine=iris4d opsys=irix6-0
862 # It's not clear whether -D_LANGUAGE_C is necessary as it is for 6.5,
863 # but presumably it does no harm.
864 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
865 # -32 probably isn't necessary in later v.6s -- anyone know which?
866 NON_GCC_TEST_OPTIONS=-32
868 mips-sgi-irix5.[01]* )
869 machine=iris4d opsys=irix5-0
871 mips-sgi-irix5* | mips-sgi-irix* )
872 machine=iris4d opsys=irix5-2
877 machine=news opsys=bsd4-2
880 machine=news opsys=bsd4-3
882 m68*-sony-newsos3* | m68*-sony-news3*)
883 machine=news opsys=bsd4-3
885 mips-sony-bsd* | mips-sony-newsos4* | mips-sony-news4*)
886 machine=news-risc opsys=bsd4-3
889 machine=news-r6 opsys=newsos6
892 machine=news-risc opsys=newsos5
897 machine=stride opsys=usg5-2
901 sparc-*-linux-gnu* | sparc64-*-linux-gnu* )
902 machine=sparc opsys=gnu-linux
905 *-auspex-sunos* | *-sun-sunos* | *-sun-bsd* | *-sun-solaris* \
906 | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* | powerpc*-*-solaris2* \
907 | rs6000-*-solaris2*)
908 case "${canonical}" in
909 m68*-sunos1* ) machine=sun1 ;;
910 m68*-sunos2* ) machine=sun2 ;;
911 m68* ) machine=sun3 ;;
912 i[3456]86-sun-sunos[34]* ) machine=sun386 ;;
913 i[3456]86-*-* ) machine=intel386 ;;
914 powerpcle* ) machine=powerpcle ;;
915 powerpc* | rs6000* ) machine=ibmrs6000 ;;
916 sparc* ) machine=sparc ;;
919 case "${canonical}" in
920 ## The Sun386 didn't get past 4.0.
921 i[3456]86-*-sunos4 ) opsys=sunos4-0 ;;
922 *-sunos4.0* ) opsys=sunos4-0 ;;
923 *-sunos4.1.[3-9]*noshare )
924 ## This name is sunos413 instead of sunos4-1-3
925 ## to avoid a file name conflict on MSDOS.
927 NON_GNU_CPP=/usr/lib/cpp
928 NON_GCC_TEST_OPTIONS=-Bstatic
929 GCC_TEST_OPTIONS=-static
931 *-sunos4.1.[3-9]* | *-sunos4shr*)
933 NON_GNU_CPP=/usr/lib/cpp
935 *-sunos4* | *-sunos )
937 NON_GCC_TEST_OPTIONS=-Bstatic
938 GCC_TEST_OPTIONS=-static
940 *-sunos5.3* | *-solaris2.3* )
942 NON_GNU_CPP=/usr/ccs/lib/cpp
944 *-sunos5.4* | *-solaris2.4* )
946 NON_GNU_CPP=/usr/ccs/lib/cpp
949 *-sunos5.5* | *-solaris2.5* )
951 NON_GNU_CPP=/usr/ccs/lib/cpp
954 *-sunos5* | *-solaris* )
956 NON_GNU_CPP=/usr/ccs/lib/cpp
960 ## Watch out for a compiler that we know will not work.
961 case "${canonical}" in
962 *-solaris* | *-sunos5* )
963 if [ "x$CC" = x/usr/ucb/cc ]; then
964 ## /usr/ucb/cc doesn't work;
965 ## we should find some other compiler that does work.
973 machine=sparc opsys=nextstep
978 machine=tad68k opsys=usg5-3
982 tahoe-tahoe-bsd4.2* )
983 machine=tahoe opsys=bsd4-2
985 tahoe-tahoe-bsd4.3* )
986 machine=tahoe opsys=bsd4-3
989 ## Tandem Integrity S2
991 machine=tandem-s2 opsys=usg5-3
995 m88k-tektronix-sysv3* )
996 machine=tekxd88 opsys=usg5-3
999 ## Tektronix 16000 box (6130?)
1000 ns16k-tektronix-bsd* )
1001 machine=ns16000 opsys=bsd4-2
1004 ## src/m/tek4300.h hints that this is a m68k machine.
1005 m68*-tektronix-bsd* )
1006 machine=tek4300 opsys=bsd4-3
1010 ## We seem to have lost the machine-description file titan.h!
1012 machine=titan opsys=usg5-3
1015 ## Ustation E30 (SS5E)
1016 m68*-unisys-uniplus* )
1017 machine=ustation opsystem=unipl5-2
1023 case "${canonical}" in
1024 *-bsd4.1* ) opsys=bsd4-1 ;;
1025 *-bsd4.2* | *-ultrix[0-3].* | *-ultrix4.0* ) opsys=bsd4-2 ;;
1026 *-bsd4.3* | *-ultrix* ) opsys=bsd4-3 ;;
1027 *-sysv[01]* | *-sysvr[01]* ) opsys=usg5-0 ;;
1028 *-sysv2* | *-sysvr2* ) opsys=usg5-2 ;;
1029 *-vms* ) opsys=vms ;;
1035 ns16k-whitechapel-* )
1037 ## We don't know what sort of OS runs on these; we'll let the
1038 ## operating system guessing code below try.
1043 machine=wicat opsys=usg5-2
1048 machine=ia64 opsys=gnu-linux
1051 ## Intel 386 machines where we don't care about the manufacturer
1054 case "${canonical}" in
1055 *-lynxos* ) opsys=lynxos ;;
1056 *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
1057 *-isc2.2* ) opsys=isc2-2 ;;
1058 *-isc4.0* ) opsys=isc4-0 ;;
1059 *-isc4.* ) opsys=isc4-1
1060 GCC_TEST_OPTIONS=-posix
1061 NON_GCC_TEST_OPTIONS=-Xp
1063 *-isc* ) opsys=isc3-0 ;;
1064 *-esix5* ) opsys=esix5r4; NON_GNU_CPP=/usr/lib/cpp ;;
1065 *-esix* ) opsys=esix ;;
1066 *-xenix* ) opsys=xenix ;;
1067 *-linux-gnu* ) opsys=gnu-linux ;;
1068 *-sco3.2v4* ) opsys=sco4 ; NON_GNU_CPP=/lib/cpp ;;
1069 *-sco3.2v5* ) opsys=sco5
1070 NON_GNU_CPP=/lib/cpp
1071 # Prevent -belf from being passed to $CPP.
1072 # /lib/cpp does not accept it.
1073 OVERRIDE_CPPFLAGS=" "
1075 *-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
1076 *-386bsd* ) opsys=386bsd ;;
1077 *-nextstep* ) opsys=nextstep ;;
1078 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
1082 ## m68k Linux-based GNU system
1084 machine=m68k opsys=gnu-linux
1087 ## Mips Linux-based GNU system
1089 machine=mips opsys=gnu-linux
1093 sparc-fujitsu-sysv4* )
1094 machine=sparc opsys=uxpds
1095 NON_GNU_CPP=/usr/ccs/lib/cpp
1100 f301-fujitsu-uxpv4.1)
1101 machine=f301 opsys=uxpv
1109 ### If the code above didn't choose an operating system, just choose
1110 ### an operating system based on the configuration name. You really
1111 ### only want to use this when you have no idea what the right
1112 ### operating system is; if you know what operating systems a machine
1113 ### runs, it's cleaner to make it explicit in the case statement
1115 if test x"${opsys}" = x; then
1116 case "${canonical}" in
1117 *-gnu* ) opsys=gnu ;;
1118 *-bsd4.[01] ) opsys=bsd4-1 ;;
1119 *-bsd4.2 ) opsys=bsd4-2 ;;
1120 *-bsd4.3 ) opsys=bsd4-3 ;;
1121 *-sysv0 | *-sysvr0 ) opsys=usg5-0 ;;
1122 *-sysv2 | *-sysvr2 ) opsys=usg5-2 ;;
1123 *-sysv2.2 | *-sysvr2.2 ) opsys=usg5-2-2 ;;
1124 *-sysv3* | *-sysvr3* ) opsys=usg5-3 ;;
1125 *-sysv4.2uw* ) opsys=unixware ;;
1126 *-sysv4.1* | *-sysvr4.1* )
1127 NON_GNU_CPP=/usr/lib/cpp
1129 *-sysv4.[2-9]* | *-sysvr4.[2-9]* )
1130 if [ x$NON_GNU_CPP = x ]; then
1131 if [ -f /usr/ccs/lib/cpp ]; then
1132 NON_GNU_CPP=/usr/ccs/lib/cpp
1134 NON_GNU_CPP=/lib/cpp
1138 *-sysv4* | *-sysvr4* ) opsys=usg5-4 ;;
1145 changequote([, ])dnl
1147 if test $unported = yes; then
1148 AC_MSG_ERROR([Emacs hasn't been ported to \`${canonical}' systems.
1149 Check \`etc/MACHINES' for recognized configuration names.])
1152 machfile="m/${machine}.h"
1153 opsysfile="s/${opsys}.h"
1156 #### Choose a compiler.
1157 test -n "$CC" && cc_specified=yes
1159 # Save the value of CFLAGS that the user specified.
1160 SPECIFIED_CFLAGS="$CFLAGS"
1163 "yes" ) CC="gcc" GCC=yes ;;
1164 "no" ) : ${CC=cc} ;;
1169 # On Suns, sometimes $CPP names a directory.
1170 if test -n "$CPP" && test -d "$CPP"; then
1174 #### Some systems specify a CPP to use unless we are using GCC.
1175 #### Now that we know whether we are using GCC, we can decide whether
1176 #### to use that one.
1177 if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x
1182 #### Some systems specify a CC to use unless we are using GCC.
1183 #### Now that we know whether we are using GCC, we can decide whether
1184 #### to use that one.
1185 if test "x$NON_GNU_CC" != x && test x$GCC != xyes &&
1186 test x$cc_specified != xyes
1191 if test x$GCC = xyes && test "x$GCC_TEST_OPTIONS" != x
1193 CC="$CC $GCC_TEST_OPTIONS"
1196 if test x$GCC = x && test "x$NON_GCC_TEST_OPTIONS" != x
1198 CC="$CC $NON_GCC_TEST_OPTIONS"
1201 if test x$GCC = xyes && test "x$GCC_LINK_TEST_OPTIONS" != x
1203 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
1206 if test x$GCC = x && test "x$NON_GCC_LINK_TEST_OPTIONS" != x
1208 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
1211 #### Some other nice autoconf tests. If you add a test here which
1212 #### should make an entry in src/config.h, don't forget to add an
1213 #### #undef clause to src/config.h.in for autoconf to modify.
1215 dnl checks for programs
1220 if test "x$RANLIB" = x; then
1224 dnl checks for Unix variants
1227 #### Extract some information from the operating system and machine files.
1229 AC_CHECKING([the machine- and system-dependent files to find out
1230 - which libraries the lib-src programs will want, and
1231 - whether the GNU malloc routines are usable])
1233 ### First figure out CFLAGS (which we use for running the compiler here)
1234 ### and REAL_CFLAGS (which we use for real compilation).
1235 ### The two are the same except on a few systems, where they are made
1236 ### different to work around various lossages. For example,
1237 ### GCC 2.5 on GNU/Linux needs them to be different because it treats -g
1238 ### as implying static linking.
1240 ### If the CFLAGS env var is specified, we use that value
1241 ### instead of the default.
1243 ### It's not important that this name contain the PID; you can't run
1244 ### two configures in the same directory and have anything work
1246 tempcname="conftest.c"
1249 #include "'${srcdir}'/src/'${opsysfile}'"
1250 #include "'${srcdir}'/src/'${machfile}'"
1251 #ifndef LIBS_MACHINE
1252 #define LIBS_MACHINE
1257 #ifndef C_SWITCH_SYSTEM
1258 #define C_SWITCH_SYSTEM
1260 #ifndef C_SWITCH_MACHINE
1261 #define C_SWITCH_MACHINE
1263 configure___ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM
1264 configure___ c_switch_system=C_SWITCH_SYSTEM
1265 configure___ c_switch_machine=C_SWITCH_MACHINE
1268 #define LIB_X11_LIB -lX11
1271 #ifndef LIBX11_MACHINE
1272 #define LIBX11_MACHINE
1275 #ifndef LIBX11_SYSTEM
1276 #define LIBX11_SYSTEM
1278 configure___ LIBX=LIB_X11_LIB LIBX11_MACHINE LIBX11_SYSTEM
1281 configure___ unexec=UNEXEC
1283 configure___ unexec=unexec.o
1286 #ifdef SYSTEM_MALLOC
1287 configure___ system_malloc=yes
1289 configure___ system_malloc=no
1292 #ifdef USE_MMAP_FOR_BUFFERS
1293 configure___ use_mmap_for_buffers=yes
1295 configure___ use_mmap_for_buffers=no
1298 #ifndef C_DEBUG_SWITCH
1299 #define C_DEBUG_SWITCH -g
1302 #ifndef C_OPTIMIZE_SWITCH
1304 #define C_OPTIMIZE_SWITCH -O2
1306 #define C_OPTIMIZE_SWITCH -O
1310 #ifndef LD_SWITCH_MACHINE
1311 #define LD_SWITCH_MACHINE
1314 #ifndef LD_SWITCH_SYSTEM
1315 #define LD_SWITCH_SYSTEM
1318 #ifndef LD_SWITCH_X_SITE_AUX
1319 #define LD_SWITCH_X_SITE_AUX
1322 configure___ ld_switch_system=LD_SWITCH_SYSTEM
1323 configure___ ld_switch_machine=LD_SWITCH_MACHINE
1325 #ifdef THIS_IS_CONFIGURE
1327 /* Get the CFLAGS for tests in configure. */
1329 configure___ CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
1331 configure___ CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
1334 #else /* not THIS_IS_CONFIGURE */
1336 /* Get the CFLAGS for real compilation. */
1338 configure___ REAL_CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
1340 configure___ REAL_CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
1343 #endif /* not THIS_IS_CONFIGURE */
1346 # The value of CPP is a quoted variable reference, so we need to do this
1347 # to get its actual value...
1348 CPP=`eval "echo $CPP"`
1350 eval `${CPP} -Isrc ${tempcname} \
1351 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
1352 if test "x$SPECIFIED_CFLAGS" = x; then
1353 eval `${CPP} -Isrc -DTHIS_IS_CONFIGURE ${tempcname} \
1354 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
1356 REAL_CFLAGS="$CFLAGS"
1358 changequote([, ])dnl
1361 ac_link="$ac_link $ld_switch_machine $ld_switch_system"
1363 ### Make sure subsequent tests use flags consistent with the build flags.
1365 if test x"${OVERRIDE_CPPFLAGS}" != x; then
1366 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
1368 CPPFLAGS="$c_switch_system $c_switch_machine $CPPFLAGS"
1371 dnl Do this early because it can frob feature test macros for Unix-98 &c.
1374 if test "${with_sound}" != "no"; then
1375 # Sound support for GNU/Linux and the free BSDs.
1376 AC_CHECK_HEADERS(machine/soundcard.h sys/soundcard.h soundcard.h)
1377 # Emulation library used on NetBSD.
1378 AC_CHECK_LIB(ossaudio, _oss_ioctl, LIBSOUND=-lossaudio, LIBSOUND=)
1382 dnl checks for header files
1383 AC_CHECK_HEADERS(sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \
1384 linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \
1385 termcap.h stdio_ext.h fcntl.h term.h strings.h coff.h)
1391 dnl Some systems have utime.h but don't declare the struct anyplace.
1392 AC_CACHE_CHECK(for struct utimbuf, emacs_cv_struct_utimbuf,
1393 AC_TRY_COMPILE([#ifdef TIME_WITH_SYS_TIME
1394 #include <sys/time.h>
1397 #ifdef HAVE_SYS_TIME_H
1398 #include <sys/time.h>
1405 #endif], [static struct utimbuf x; x.actime = x.modtime;],
1406 emacs_cv_struct_utimbuf=yes, emacs_cv_struct_utimbuf=no))
1407 if test $emacs_cv_struct_utimbuf = yes; then
1408 AC_DEFINE(HAVE_STRUCT_UTIMBUF)
1411 dnl checks for typedefs
1414 dnl Check for speed_t typedef.
1415 AC_CACHE_CHECK(for speed_t, emacs_cv_speed_t,
1416 AC_TRY_COMPILE([#include <termios.h>], [speed_t x = 1;],
1417 emacs_cv_speed_t=yes, emacs_cv_speed_t=no))
1418 if test $emacs_cv_speed_t = yes; then
1419 AC_DEFINE(HAVE_SPEED_T)
1422 AC_CACHE_CHECK(for struct timeval, emacs_cv_struct_timeval,
1423 AC_TRY_COMPILE([#ifdef TIME_WITH_SYS_TIME
1424 #include <sys/time.h>
1427 #ifdef HAVE_SYS_TIME_H
1428 #include <sys/time.h>
1432 #endif], [static struct timeval x; x.tv_sec = x.tv_usec;],
1433 emacs_cv_struct_timeval=yes, emacs_cv_struct_timeval=no))
1434 HAVE_TIMEVAL=$emacs_cv_struct_timeval
1435 if test $emacs_cv_struct_timeval = yes; then
1436 AC_DEFINE(HAVE_TIMEVAL)
1439 AC_CACHE_CHECK(for struct exception, emacs_cv_struct_exception,
1440 AC_TRY_COMPILE([#include <math.h>],
1441 [static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1;],
1442 emacs_cv_struct_exception=yes, emacs_cv_struct_exception=no))
1443 HAVE_EXCEPTION=$emacs_cv_struct_exception
1444 if test $emacs_cv_struct_exception != yes; then
1445 AC_DEFINE(NO_MATHERR)
1448 dnl checks for structure members
1451 AC_CACHE_CHECK(for tm_gmtoff in struct tm, emacs_cv_tm_gmtoff,
1452 AC_TRY_LINK([#include <time.h>], [struct tm t; t.tm_gmtoff = 0],
1453 emacs_cv_tm_gmtoff=yes,
1454 emacs_cv_tm_gmtoff=no))
1455 if test $emacs_cv_tm_gmtoff = yes; then
1456 AC_DEFINE(HAVE_TM_GMTOFF)
1459 dnl checks for compiler characteristics
1461 dnl Testing __STDC__ to determine prototype support isn't good enough.
1462 dnl DEC C, for instance, doesn't define it with default options, and
1463 dnl is used on 64-bit systems (OSF Alphas). Similarly for volatile
1468 dnl This isn't useful because we can't turn on use of `inline' unless
1469 dnl the compiler groks `extern inline'.
1471 AC_CACHE_CHECK([for void * support], emacs_cv_void_star,
1472 [AC_TRY_COMPILE(, [void * foo;],
1473 emacs_cv_void_star=yes, emacs_cv_void_star=no)])
1474 if test $emacs_cv_void_star = yes; then
1475 AC_DEFINE(POINTER_TYPE, void)
1477 AC_DEFINE(POINTER_TYPE, char)
1480 dnl check for Make feature
1483 dnl checks for operating system services
1484 AC_SYS_LONG_FILE_NAMES
1486 if test "$gamedir" = no; then :
1488 AC_MSG_CHECKING([for access to game group "$gameuser"])
1489 rm -f conf$$chown.file
1490 touch conf$$chown.file
1491 dnl If we can't chown a file to group games, then the users
1492 dnl can't share scores.
1493 if chown "$gameuser" conf$$chown.file 1>/dev/null 2>&1; then
1494 AC_MSG_RESULT([yes])
1495 if test "$gamedir" = "yes"; then
1496 gamedir="${localstatedir}/games/emacs"
1498 tgamedir=`eval "echo $gamedir"`
1499 AC_DEFINE_UNQUOTED(HAVE_SHARED_GAME_DIR, "$tgamedir")
1505 #### Choose a window system.
1508 if test "$no_x" = yes; then
1514 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
1515 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
1516 LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"`
1517 x_default_search_path=""
1518 for x_library in `echo ${x_libraries} | sed -e "s/:/ /g"`; do
1520 ${x_library}/X11/%L/%T/%N%C%S:\
1521 ${x_library}/X11/%l/%T/%N%C%S:\
1522 ${x_library}/X11/%T/%N%C%S:\
1523 ${x_library}/X11/%L/%T/%N%S:\
1524 ${x_library}/X11/%l/%T/%N%S:\
1525 ${x_library}/X11/%T/%N%S"
1526 if test x"${x_default_search_path}" = x; then
1527 x_default_search_path=${x_search_path}
1529 x_default_search_path="${x_search_path}:${x_default_search_path}"
1533 if test "${x_includes}" != NONE && test -n "${x_includes}"; then
1534 C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"`
1537 if test x"${x_includes}" = x; then
1538 bitmapdir=/usr/include/X11/bitmaps
1540 # accumulate include directories that have X11 bitmap subdirectories
1542 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
1543 if test -d "${bmd}/X11/bitmaps"; then
1544 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
1546 if test -d "${bmd}/bitmaps"; then
1547 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
1550 if test ${bmd_acc} != "dummyval"; then
1551 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
1555 case "${window_system}" in
1559 case "${with_x_toolkit}" in
1560 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
1561 motif ) USE_X_TOOLKIT=MOTIF ;;
1562 dnl open-look ) USE_X_TOOLKIT=OPEN_LOOK ;;
1563 no ) USE_X_TOOLKIT=none ;;
1564 dnl If user did not say whether to use a toolkit,
1565 dnl make this decision later: use the toolkit if we have X11R5 or newer.
1566 * ) USE_X_TOOLKIT=maybe ;;
1576 ### If we're using X11, we should use the X menu package.
1579 yes ) HAVE_MENUS=yes ;;
1582 if test "${opsys}" = "hpux9"; then
1583 case "${x_libraries}" in
1585 opsysfile="s/hpux9-x11r4.h"
1590 if test "${opsys}" = "hpux9shr"; then
1591 case "${x_libraries}" in
1593 opsysfile="s/hpux9shxr4.h"
1598 ### Compute the unexec source name from the object name.
1599 UNEXEC_SRC="`echo ${unexec} | sed 's/\.o/.c/'`"
1601 # Do the opsystem or machine files prohibit the use of the GNU malloc?
1602 # Assume not, until told otherwise.
1605 AC_CHECK_FUNC(malloc_get_state, ,doug_lea_malloc=no)
1606 AC_CHECK_FUNC(malloc_set_state, ,doug_lea_malloc=no)
1607 AC_CACHE_CHECK(whether __after_morecore_hook exists,
1608 emacs_cv_var___after_morecore_hook,
1609 [AC_TRY_LINK([extern void (* __after_morecore_hook)();],[__after_morecore_hook = 0],
1610 emacs_cv_var___after_morecore_hook=yes,
1611 emacs_cv_var___after_morecore_hook=no)])
1612 if test $emacs_cv_var___after_morecore_hook = no; then
1615 if test "${system_malloc}" = "yes"; then
1618 (The GNU allocators don't work with this system configuration.)"
1620 if test "$doug_lea_malloc" = "yes" ; then
1621 if test "$GNU_MALLOC" = yes ; then
1623 (Using Doug Lea's new malloc from the GNU C Library.)"
1625 AC_DEFINE(DOUG_LEA_MALLOC)
1628 if test x"${REL_ALLOC}" = x; then
1629 REL_ALLOC=${GNU_MALLOC}
1632 dnl For now, need to use an explicit `#define USE_MMAP_FOR_BUFFERS 1'
1633 dnl the system configuration file (s/*.h) to turn the use of mmap
1634 dnl in the relocating allocator on.
1637 if test $use_mmap_for_buffers = yes; then
1641 LIBS="$libsrc_libs $LIBS"
1643 dnl If found, this defines HAVE_LIBDNET, which m/pmax.h checks,
1644 dnl and also adds -ldnet to LIBS, which Autoconf uses for checks.
1645 AC_CHECK_LIB(dnet, dnet_ntoa)
1646 dnl This causes -lresolv to get used in subsequent tests,
1647 dnl which causes failures on some systems such as HPUX 9.
1648 dnl AC_CHECK_LIB(resolv, gethostbyname)
1650 dnl FIXME replace main with a function we actually want from this library.
1651 AC_CHECK_LIB(Xbsd, main, LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd")
1653 AC_CHECK_LIB(pthreads, cma_open)
1655 AC_MSG_CHECKING(for XFree86 in /usr/X386)
1656 if test -d /usr/X386/include; then
1658 : ${C_SWITCH_X_SITE="-I/usr/X386/include"}
1662 AC_MSG_RESULT($HAVE_XFREE386)
1664 # Change CFLAGS temporarily so that C_SWITCH_X_SITE gets used
1665 # for the tests that follow. We set it back to REAL_CFLAGS later on.
1667 REAL_CPPFLAGS="$CPPFLAGS"
1669 if test "${HAVE_X11}" = "yes"; then
1670 DEFS="$C_SWITCH_X_SITE $DEFS"
1671 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
1673 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
1674 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
1676 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
1677 # This is handled by LD_SWITCH_X_SITE_AUX during the real build,
1678 # but it's more convenient here to set LD_RUN_PATH
1679 # since this also works on hosts that don't understand LD_SWITCH_X_SITE_AUX.
1680 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
1681 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
1685 if test "${opsys}" = "gnu-linux"; then
1686 AC_MSG_CHECKING(whether X on GNU/Linux needs -b to link)
1688 [XOpenDisplay ("foo");],
1689 [xlinux_first_failure=no],
1690 [xlinux_first_failure=yes])
1691 if test "${xlinux_first_failure}" = "yes"; then
1692 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
1693 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
1694 OLD_CPPFLAGS="$CPPFLAGS"
1696 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
1697 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
1698 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
1699 LIBS="$LIBS -b i486-linuxaout"
1701 [XOpenDisplay ("foo");],
1702 [xlinux_second_failure=no],
1703 [xlinux_second_failure=yes])
1704 if test "${xlinux_second_failure}" = "yes"; then
1705 # If we get the same failure with -b, there is no use adding -b.
1706 # So take it out. This plays safe.
1707 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
1708 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
1709 CPPFLAGS="$OLD_CPPFLAGS"
1720 # Reportedly, some broken Solaris systems have XKBlib.h but are missing
1721 # header files included from there.
1722 AC_MSG_CHECKING(for Xkb)
1723 AC_TRY_LINK([#include <X11/Xlib.h>
1724 #include <X11/XKBlib.h>],
1725 [XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);],
1726 emacs_xkb=yes, emacs_xkb=no)
1727 AC_MSG_RESULT($emacs_xkb)
1728 if test $emacs_xkb = yes; then
1729 AC_DEFINE(HAVE_XKBGETKEYBOARD)
1732 AC_CHECK_FUNCS(XrmSetDatabase XScreenResourceString \
1733 XScreenNumberOfScreen XSetWMProtocols)
1736 if test "${window_system}" = "x11"; then
1737 AC_MSG_CHECKING(X11 version 6)
1738 AC_CACHE_VAL(emacs_cv_x11_version_6,
1739 [AC_TRY_LINK([#include <X11/Xlib.h>],
1740 [#if XlibSpecificationRelease < 6
1743 ], emacs_cv_x11_version_6=yes, emacs_cv_x11_version_6=no)])
1744 if test $emacs_cv_x11_version_6 = yes; then
1745 AC_MSG_RESULT(6 or newer)
1746 AC_DEFINE(HAVE_X11R6)
1748 AC_MSG_RESULT(before 6)
1752 if test "${window_system}" = "x11"; then
1753 AC_MSG_CHECKING(X11 version 5)
1754 AC_CACHE_VAL(emacs_cv_x11_version_5,
1755 [AC_TRY_LINK([#include <X11/Xlib.h>],
1756 [#if XlibSpecificationRelease < 5
1759 ], emacs_cv_x11_version_5=yes, emacs_cv_x11_version_5=no)])
1760 if test $emacs_cv_x11_version_5 = yes; then
1761 AC_MSG_RESULT(5 or newer)
1763 AC_DEFINE(HAVE_X11R5)
1766 AC_MSG_RESULT(before 5)
1770 dnl Do not put whitespace before the #include statements below.
1771 dnl Older compilers (eg sunos4 cc) choke on it.
1772 if test x"${USE_X_TOOLKIT}" = xmaybe; then
1773 if test x"${HAVE_X11R5}" = xyes; then
1774 AC_MSG_CHECKING(X11 version 5 with Xaw)
1775 AC_CACHE_VAL(emacs_cv_x11_version_5_with_xaw,
1777 #include <X11/Intrinsic.h>
1778 #include <X11/Xaw/Simple.h>],
1780 emacs_cv_x11_version_5_with_xaw=yes,
1781 emacs_cv_x11_version_5_with_xaw=no)])
1782 if test $emacs_cv_x11_version_5_with_xaw = yes; then
1783 AC_MSG_RESULT([5 or newer, with Xaw; use toolkit by default])
1786 AC_MSG_RESULT(before 5 or no Xaw; do not use toolkit by default)
1794 X_TOOLKIT_TYPE=$USE_X_TOOLKIT
1796 if test "${USE_X_TOOLKIT}" != "none"; then
1797 AC_MSG_CHECKING(X11 toolkit version)
1798 AC_CACHE_VAL(emacs_cv_x11_toolkit_version_6,
1799 [AC_TRY_LINK([#include <X11/Intrinsic.h>],
1800 [#if XtSpecificationRelease < 6
1803 ], emacs_cv_x11_toolkit_version_6=yes, emacs_cv_x11_toolkit_version_6=no)])
1804 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
1805 if test $emacs_cv_x11_toolkit_version_6 = yes; then
1806 AC_MSG_RESULT(6 or newer)
1807 AC_DEFINE(HAVE_X11XTR6)
1809 AC_MSG_RESULT(before 6)
1812 dnl If using toolkit, check whether libXmu.a exists.
1813 dnl tranle@intellicorp.com says libXmu.a can need XtMalloc in libXt.a to link.
1815 if test x$HAVE_X11XTR6 = xyes; then
1816 LIBS="-lXt -lSM -lICE $LIBS"
1820 AC_CHECK_LIB(Xmu, XmuConvertStandardSelection)
1821 test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
1824 # On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D.
1825 if test "${HAVE_X11}" = "yes"; then
1826 if test "${USE_X_TOOLKIT}" != "none"; then
1827 AC_CHECK_LIB(Xext, XShapeQueryExtension)
1831 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
1832 AC_CACHE_CHECK(for Motif version 2.1, emacs_cv_motif_version_2_1,
1833 [AC_TRY_COMPILE([#include <Xm/Xm.h>],
1834 [#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
1837 Motif version prior to 2.1.
1839 emacs_cv_motif_version_2_1=yes, emacs_cv_motif_version_2_1=no)])
1840 HAVE_MOTIF_2_1=$emacs_cv_motif_version_2_1
1841 if test $emacs_cv_motif_version_2_1 = yes; then
1843 AC_DEFINE(HAVE_MOTIF_2_1)
1844 AC_CHECK_LIB(Xp, XpCreateContext, HAVE_LIBXP=yes)
1845 if test ${HAVE_LIBXP} = yes; then
1846 AC_DEFINE(HAVE_LIBXP)
1851 ### Is -lXaw3d available?
1853 if test "${HAVE_X11}" = "yes"; then
1854 if test "${USE_X_TOOLKIT}" != "none"; then
1855 AC_CHECK_HEADER(X11/Xaw3d/Scrollbar.h,
1856 AC_CHECK_LIB(Xaw3d, XawScrollbarSetThumb, HAVE_XAW3D=yes))
1857 if test "${HAVE_XAW3D}" = "yes"; then
1858 AC_DEFINE(HAVE_XAW3D)
1863 dnl Use toolkit scroll bars if configured for X toolkit and either
1864 dnl using Motif or Xaw3d is available, and unless
1865 dnl --with-toolkit-scroll-bars=no was specified.
1867 USE_TOOLKIT_SCROLL_BARS=no
1868 if test "${with_toolkit_scroll_bars}" != "no"; then
1869 if test "${USE_X_TOOLKIT}" != "none"; then
1870 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
1871 AC_DEFINE(USE_TOOLKIT_SCROLL_BARS)
1873 USE_TOOLKIT_SCROLL_BARS=yes
1874 elif test "${HAVE_XAW3D}" = "yes"; then
1875 AC_DEFINE(USE_TOOLKIT_SCROLL_BARS)
1876 USE_TOOLKIT_SCROLL_BARS=yes
1881 dnl Don't use X11 input methods if user specifies he doesn't want it
1882 dnl with `--with-xim=no'.
1884 if test "${with_xim}" != "no"; then
1888 ### Use -lXpm if available, unless `--with-xpm=no'.
1890 if test "${HAVE_X11}" = "yes"; then
1891 if test "${with_xpm}" != "no"; then
1892 AC_CHECK_HEADER(X11/xpm.h,
1893 AC_CHECK_LIB(Xpm, XpmReadFileToPixmap, HAVE_XPM=yes, , -lX11))
1894 if test "${HAVE_XPM}" = "yes"; then
1895 AC_MSG_CHECKING(for XpmReturnAllocPixels preprocessor define)
1896 AC_EGREP_CPP(no_return_alloc_pixels,
1897 [#include "X11/xpm.h"
1898 #ifndef XpmReturnAllocPixels
1899 no_return_alloc_pixels
1901 ], HAVE_XPM=no, HAVE_XPM=yes)
1903 if test "${HAVE_XPM}" = "yes"; then
1911 if test "${HAVE_XPM}" = "yes"; then
1916 ### Use -ljpeg if available, unless `--with-jpeg=no'.
1918 if test "${HAVE_X11}" = "yes"; then
1919 if test "${with_jpeg}" != "no"; then
1920 dnl Checking for jpeglib.h can lose becsue of a redefinition of
1922 AC_CHECK_HEADER(jerror.h,
1923 AC_CHECK_LIB(jpeg, jpeg_destroy_compress, HAVE_JPEG=yes))
1926 if test "${HAVE_JPEG}" = "yes"; then
1927 AC_DEFINE(HAVE_JPEG)
1929 changequote({, })dnl avoid leadingspace on the next line
1930 {version= *(6[2-9]|[7-9][0-9])},
1931 changequote([, ])dnl
1932 [#include <jpeglib.h>
1933 version=JPEG_LIB_VERSION
1935 AC_DEFINE(HAVE_JPEG),
1936 [AC_MSG_WARN([libjpeg found, but not version 6b or later])
1941 ### Use -lpng if available, unless `--with-png=no'.
1943 if test "${HAVE_X11}" = "yes"; then
1944 if test "${with_png}" != "no"; then
1945 AC_CHECK_HEADER(png.h,
1946 AC_CHECK_LIB(png, png_get_channels, HAVE_PNG=yes, , -lz -lm))
1949 if test "${HAVE_PNG}" = "yes"; then
1954 ### Use -ltiff if available, unless `--with-tiff=no'.
1956 if test "${HAVE_X11}" = "yes"; then
1957 if test "${with_tiff}" != "no"; then
1958 AC_CHECK_HEADER(tiffio.h,
1960 # At least one tiff package requires the jpeg library.
1961 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
1962 AC_CHECK_LIB(tiff, TIFFGetVersion, HAVE_TIFF=yes, , $tifflibs))
1965 if test "${HAVE_TIFF}" = "yes"; then
1966 AC_DEFINE(HAVE_TIFF)
1970 ### Use -lgif if available, unless `--with-gif=no'.
1972 if test "${HAVE_X11}" = "yes"; then
1973 if test "${with_gif}" != "no"; then
1974 AC_CHECK_HEADER(gif_lib.h,
1975 # EGifPutExtensionLast only exists from version libungif-4.1.0b1.
1976 # Earlier versions can crash Emacs.
1977 AC_CHECK_LIB(ungif, EGifPutExtensionLast, HAVE_GIF=yes))
1980 if test "${HAVE_GIF}" = "yes"; then
1985 ### Use session management (-lSM -lICE) if available
1987 if test "${HAVE_X11}" = "yes"; then
1988 AC_CHECK_HEADER(X11/SM/SMlib.h,
1989 AC_CHECK_LIB(SM, SmcOpenConnection, HAVE_X_SM=yes, -lICE))
1991 if test "${HAVE_X_SM}" = "yes"; then
1992 AC_DEFINE(HAVE_X_SM)
1995 *) LIBS="-lSM -lICE $LIBS" ;;
2000 # If netdb.h doesn't declare h_errno, we must declare it by hand.
2001 AC_CACHE_CHECK(whether netdb declares h_errno,
2002 emacs_cv_netdb_declares_h_errno,
2003 [AC_TRY_LINK([#include <netdb.h>],
2005 emacs_cv_netdb_declares_h_errno=yes, emacs_cv_netdb_declares_h_errno=no)])
2006 if test $emacs_cv_netdb_declares_h_errno = yes; then
2007 AC_DEFINE(HAVE_H_ERRNO)
2012 # fmod, logb, and frexp are found in -lm on most systems.
2013 # On HPUX 9.01, -lm does not contain logb, so check for sqrt.
2014 AC_CHECK_LIB(m, sqrt)
2016 # Check for mail-locking functions in a "mail" library
2017 AC_CHECK_LIB(mail, maillock)
2018 dnl Debian, at least:
2019 dnl AC_CHECK_LIB(lockfile, maillock, [AC_DEFINE(HAVE_LIBMAIL)])
2020 AC_CHECK_LIB(lockfile, maillock)
2021 # If we have the shared liblockfile, assume we must use it for mail
2022 # locking (e.g. Debian). If we couldn't link against liblockfile
2023 # (no liblockfile.a installed), ensure that we don't need to.
2024 if test "$ac_cv_lib_lockfile_maillock" = no; then
2025 dnl This works for files generally, not just executables.
2026 dnl Should we look elsewhere for it? Maybe examine /etc/ld.so.conf?
2027 AC_CHECK_PROG(liblockfile, liblockfile.so, yes, no,
2028 /usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH)
2029 if test $ac_cv_prog_liblockfile = yes; then
2030 AC_MSG_ERROR([Shared liblockfile found but can't link against it.
2031 This probably means that movemail could lose mail.
2032 There may be a \`development' package to install containing liblockfile.])
2033 else AC_DEFINE(LIBMAIL, -llockfile)
2037 AC_CHECK_FUNCS(touchlock)
2038 AC_CHECK_HEADERS(maillock.h)
2040 AC_CHECK_FUNCS(gethostname getdomainname dup2 \
2041 rename closedir mkdir rmdir sysinfo \
2042 random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime res_init setsid \
2043 strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \
2044 utimes setrlimit setpgid getcwd getwd shutdown strftime getaddrinfo \
2045 __fpending mblen mbrlen mbsinit strsignal setitimer ualarm index rindex \
2046 sendto recvfrom getsockopt setsockopt getsockname getpeername \
2047 gai_strerror mkstemp getline getdelim)
2049 AC_CHECK_HEADERS(sys/un.h)
2052 if test "$ac_cv_func_working_mktime" = no; then
2053 AC_DEFINE(BROKEN_MKTIME)
2061 AC_CHECK_FUNCS(grantpt)
2063 # PTY-related GNU extensions.
2064 AC_CHECK_FUNCS(getpt)
2066 # Check this now, so that we will NOT find the above functions in ncurses.
2067 # That is because we have not set up to link ncurses in lib-src.
2068 # It's better to believe a function is not available
2069 # than to expect to find it in ncurses.
2070 AC_CHECK_LIB(ncurses, tparm)
2072 # Do we need the Hesiod library to provide the support routines?
2073 if test "$with_hesiod" = yes ; then
2074 # Don't set $LIBS here -- see comments above.
2076 AC_CHECK_FUNC(res_send, , [AC_CHECK_FUNC(__res_send, ,
2077 [AC_CHECK_LIB(resolv, res_send, resolv=yes,
2078 [AC_CHECK_LIB(resolv, __res_send, resolv=yes)])])])
2079 if test "$resolv" = yes ; then
2081 AC_DEFINE(HAVE_LIBRESOLV)
2085 AC_CHECK_FUNC(hes_getmailhost, , [AC_CHECK_LIB(hesiod, hes_getmailhost,
2086 AC_DEFINE(HAVE_LIBHESIOD), :, $RESOLVLIB)])
2089 # These tell us which Kerberos-related libraries to use.
2090 if test "${with_kerberos+set}" = set; then
2091 AC_CHECK_LIB(com_err, com_err)
2092 AC_CHECK_LIB(k5crypto, mit_des_cbc_encrypt)
2093 AC_CHECK_LIB(crypto, mit_des_cbc_encrypt)
2094 AC_CHECK_LIB(krb5, krb5_init_context)
2095 if test "${with_kerberos5+set}" != set; then
2096 AC_CHECK_LIB(des425, des_cbc_encrypt,,
2097 AC_CHECK_LIB(des, des_cbc_encrypt))
2098 AC_CHECK_LIB(krb4, krb_get_cred,,
2099 AC_CHECK_LIB(krb, krb_get_cred))
2102 if test "${with_kerberos5+set}" = set; then
2103 AC_CHECK_HEADERS(krb5.h)
2105 AC_CHECK_HEADERS(des.h,,
2106 [AC_CHECK_HEADERS(kerberosIV/des.h,,
2107 [AC_CHECK_HEADERS(kerberos/des.h)])])
2108 AC_CHECK_HEADERS(krb.h,,
2109 [AC_CHECK_HEADERS(kerberosIV/krb.h,,
2110 [AC_CHECK_HEADERS(kerberos/krb.h)])])
2112 AC_CHECK_HEADERS(com_err.h)
2115 # Solaris requires -lintl if you want strerror (which calls dgettext)
2116 # to return localized messages.
2117 AC_CHECK_LIB(intl, dgettext)
2119 AC_MSG_CHECKING(whether localtime caches TZ)
2120 AC_CACHE_VAL(emacs_cv_localtime_cache,
2121 [if test x$ac_cv_func_tzset = xyes; then
2122 AC_TRY_RUN([#include <time.h>
2123 extern char **environ;
2127 for (to = from = environ; (*to = *from); from++)
2128 if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
2131 char TZ_GMT0[] = "TZ=GMT0";
2132 char TZ_PST8[] = "TZ=PST8";
2135 time_t now = time ((time_t *) 0);
2136 int hour_GMT0, hour_unset;
2137 if (putenv (TZ_GMT0) != 0)
2139 hour_GMT0 = localtime (&now)->tm_hour;
2141 hour_unset = localtime (&now)->tm_hour;
2142 if (putenv (TZ_PST8) != 0)
2144 if (localtime (&now)->tm_hour == hour_GMT0)
2147 if (localtime (&now)->tm_hour != hour_unset)
2150 }], emacs_cv_localtime_cache=no, emacs_cv_localtime_cache=yes,
2151 [# If we have tzset, assume the worst when cross-compiling.
2152 emacs_cv_localtime_cache=yes])
2154 # If we lack tzset, report that localtime does not cache TZ,
2155 # since we can't invalidate the cache if we don't have tzset.
2156 emacs_cv_localtime_cache=no
2158 AC_MSG_RESULT($emacs_cv_localtime_cache)
2159 if test $emacs_cv_localtime_cache = yes; then
2160 AC_DEFINE(LOCALTIME_CACHE)
2163 if test "x$HAVE_TIMEVAL" = xyes; then
2164 AC_CHECK_FUNCS(gettimeofday)
2165 AC_CACHE_CHECK(whether gettimeofday can accept two arguments,
2166 emacs_cv_gettimeofday_two_arguments,
2168 #ifdef TIME_WITH_SYS_TIME
2169 #include <sys/time.h>
2172 #ifdef HAVE_SYS_TIME_H
2173 #include <sys/time.h>
2178 [struct timeval time;
2179 gettimeofday (&time, 0);],
2180 emacs_cv_gettimeofday_two_arguments=yes,
2181 emacs_cv_gettimeofday_two_arguments=no)])
2182 if test $emacs_cv_gettimeofday_two_arguments = no; then
2183 AC_DEFINE(GETTIMEOFDAY_ONE_ARGUMENT)
2187 dnl Note that AC_STRUCT_TIMEZONE doesn't do what you might expect.
2188 if test "$ac_cv_func_gettimeofday" = yes; then
2189 AC_CACHE_CHECK([for struct timezone], emacs_cv_struct_timezone,
2190 [AC_TRY_COMPILE([#include <sys/time.h>],
2191 [struct timezone tz;],
2192 dnl It may be that we can't call gettimeofday with a non-null pointer,
2193 dnl even though we have struct timezone (e.g. HPUX). In that case
2194 dnl we'll lie about struct timezone.
2196 #ifdef TIME_WITH_SYS_TIME
2197 #include <sys/time.h>
2200 #ifdef HAVE_SYS_TIME_H
2201 #include <sys/time.h>
2207 struct timeval time;
2208 struct timezone dummy;
2209 exit (gettimeofday (&time, &dummy));
2211 emacs_cv_struct_timezone=yes,
2212 emacs_cv_struct_timezone=no, emacs_cv_struct_timezone=yes)],
2213 emacs_cv_struct_timezone=no)])
2217 AC_CHECK_FUNC(socket, , ok_so_far=no)
2218 if test $ok_so_far = yes; then
2219 AC_CHECK_HEADER(netinet/in.h, , ok_so_far=no)
2221 if test $ok_so_far = yes; then
2222 AC_CHECK_HEADER(arpa/inet.h, , ok_so_far=no)
2224 if test $ok_so_far = yes; then
2225 AC_DEFINE(HAVE_INET_SOCKETS)
2228 if test -f /usr/lpp/X11/bin/smt.exp; then
2229 AC_DEFINE(HAVE_AIX_SMT_EXP)
2232 AC_MSG_CHECKING(whether system supports dynamic ptys)
2233 if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then
2235 AC_DEFINE(HAVE_DEV_PTMX)
2242 # Fixme: This should be replaced when we have autoconf 2.14.
2245 # Set up the CFLAGS for real compilation, so we can substitute it.
2246 CFLAGS="$REAL_CFLAGS"
2247 CPPFLAGS="$REAL_CPPFLAGS"
2250 #### Find out which version of Emacs this is.
2251 version=`grep 'defconst[ ]*emacs-version' ${srcdir}/lisp/version.el \
2252 | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`
2253 changequote([, ])dnl
2254 if test x"${version}" = x; then
2255 AC_MSG_ERROR(can't find current emacs version in \`${srcdir}/lisp/version.el'.)
2258 ### Specify what sort of things we'll be editing into Makefile and config.h.
2259 ### Use configuration here uncanonicalized to avoid exceeding size limits.
2261 AC_SUBST(configuration)
2265 AC_SUBST(exec_prefix)
2268 AC_SUBST(sharedstatedir)
2269 AC_SUBST(libexecdir)
2273 AC_SUBST(locallisppath)
2275 AC_SUBST(x_default_search_path)
2277 AC_SUBST(archlibdir)
2282 AC_SUBST(c_switch_system)
2283 AC_SUBST(c_switch_machine)
2284 AC_SUBST(LD_SWITCH_X_SITE)
2285 AC_SUBST(LD_SWITCH_X_SITE_AUX)
2286 AC_SUBST(C_SWITCH_X_SITE)
2288 AC_SUBST(X_TOOLKIT_TYPE)
2291 AC_SUBST(GETLOADAVG_LIBS)
2293 AC_DEFINE_UNQUOTED(EMACS_CONFIGURATION, "${canonical}")
2294 AC_DEFINE_UNQUOTED(EMACS_CONFIG_OPTIONS, "${ac_configure_args}")
2295 AC_DEFINE_UNQUOTED(config_machfile, "${machfile}")
2296 AC_DEFINE_UNQUOTED(config_opsysfile, "${opsysfile}")
2297 AC_DEFINE_UNQUOTED(LD_SWITCH_X_SITE, ${LD_SWITCH_X_SITE})
2298 AC_DEFINE_UNQUOTED(LD_SWITCH_X_SITE_AUX, ${LD_SWITCH_X_SITE_AUX})
2299 AC_DEFINE_UNQUOTED(C_SWITCH_X_SITE, ${C_SWITCH_X_SITE})
2300 AC_DEFINE_UNQUOTED(UNEXEC_SRC, ${UNEXEC_SRC})
2302 if test "${HAVE_X_WINDOWS}" = "yes" ; then
2303 AC_DEFINE(HAVE_X_WINDOWS)
2305 if test "${USE_X_TOOLKIT}" != "none" ; then
2306 AC_DEFINE(USE_X_TOOLKIT)
2308 if test "${HAVE_X11}" = "yes" ; then
2311 if test "${HAVE_XFREE386}" = "yes" ; then
2312 AC_DEFINE(HAVE_XFREE386)
2314 if test "${HAVE_MENUS}" = "yes" ; then
2315 AC_DEFINE(HAVE_MENUS)
2317 if test "${GNU_MALLOC}" = "yes" ; then
2318 AC_DEFINE(GNU_MALLOC)
2320 if test "${REL_ALLOC}" = "yes" ; then
2321 AC_DEFINE(REL_ALLOC)
2324 AC_CHECK_HEADERS(nlist.h, [AC_DEFINE(NLIST_STRUCT, 1,
2325 [Define if you have <nlist.h>.])])
2327 #### Report on what we decided to do.
2329 Configured for \`${canonical}'.
2331 Where should the build process find the source code? ${srcdir}
2332 What operating system and machine description files should Emacs use?
2333 \`${opsysfile}' and \`${machfile}'
2334 What compiler should emacs be built with? ${CC} ${CFLAGS}
2335 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
2336 Should Emacs use a relocating allocator for buffers? ${REL_ALLOC}
2337 Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers
2338 What window system should Emacs use? ${window_system}
2339 What toolkit should Emacs use? ${USE_X_TOOLKIT}
2340 Should Emacs use a shared game state directory? ${gamedir}"
2342 if test -n "${x_includes}"; then
2343 echo " Where do we find X Windows header files? ${x_includes}"
2345 echo " Where do we find X Windows header files? Standard dirs"
2347 if test -n "${x_libraries}"; then
2348 echo " Where do we find X Windows libraries? ${x_libraries}"
2350 echo " Where do we find X Windows libraries? Standard dirs"
2353 echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}"
2354 echo " Does Emacs use -lXpm? ${HAVE_XPM}"
2355 echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
2356 echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
2357 echo " Does Emacs use -lungif? ${HAVE_GIF}"
2358 echo " Does Emacs use -lpng? ${HAVE_PNG}"
2359 echo " Does Emacs use X toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}"
2362 # Remove any trailing slashes in these variables.
2364 test "${prefix}" != NONE &&
2365 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
2366 test "${exec_prefix}" != NONE &&
2367 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
2368 changequote([, ])dnl
2370 ## Check if the C preprocessor will convert `..' to `. .'. If so, set
2371 ## CPP_NEED_TRADITIONAL to `yes' so that the code to generate Makefile
2372 ## from Makefile.c can correctly provide the arg `-traditional' to the
2375 AC_EGREP_CPP(yes..yes,
2377 CPP_NEED_TRADITIONAL=no,
2378 CPP_NEED_TRADITIONAL=yes)
2380 AC_OUTPUT(Makefile lib-src/Makefile.c:lib-src/Makefile.in oldXMenu/Makefile \
2381 man/Makefile lwlib/Makefile src/Makefile.c:src/Makefile.in \
2382 lisp/Makefile lispref/Makefile lispintro/Makefile leim/Makefile, [
2384 ### Make the necessary directories, if they don't exist.
2385 for dir in etc lisp ; do
2386 test -d ${dir} || mkdir ${dir}
2389 # Build src/Makefile from ${srcdir}/src/Makefile.c
2390 # and lib-src/Makefile from ${srcdir}/lib-src/Makefile.c
2391 # This must be done after src/config.h is built, since we rely on that file.
2393 changequote(, )dnl The horror, the horror.
2394 # Now get this: Some word that is part of the ${srcdir} directory name
2395 # or the ${configuration} value might, just might, happen to be an
2396 # identifier like `sun4' or `i386' or something, and be predefined by
2397 # the C preprocessor to some helpful value like 1, or maybe the empty
2398 # string. Needless to say consequent macro substitutions are less
2399 # than conducive to the makefile finding the correct directory.
2400 undefs="`echo $top_srcdir $configuration $canonical |
2401 sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/ *$//' \
2402 -e 's/ */ -U/g' -e 's/-U[0-9][^ ]*//g' \
2404 changequote([, ])dnl
2406 echo creating src/epaths.h
2407 ${MAKE-make} epaths-force
2409 # As of 2000-11-19, newest development versions of GNU cpp preprocess
2410 # `..' to `. .' unless invoked with -traditional
2412 if test "x$GCC" = xyes && test "x$CPP_NEED_TRADITIONAL" = xyes; then
2413 CPPFLAGS="$CPPFLAGS -traditional"
2416 echo creating lib-src/Makefile
2418 rm -f junk.c junk1.c junk2.c
2419 sed -e '/start of cpp stuff/q' \
2420 < Makefile.c > junk1.c
2421 sed -e '1,/start of cpp stuff/d'\
2422 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
2423 < Makefile.c > junk.c
2424 $CPP $undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
2425 sed -e 's/^ / /' -e '/^#/d' -e '/^[
\f]*$/d' > junk2.c
2426 cat junk1.c junk2.c > Makefile.new
2427 rm -f junk.c junk1.c junk2.c
2428 chmod 444 Makefile.new
2429 mv -f Makefile.new Makefile
2432 echo creating src/Makefile
2434 rm -f junk.c junk1.c junk2.c
2435 sed -e '/start of cpp stuff/q' \
2436 < Makefile.c > junk1.c
2437 sed -e '1,/start of cpp stuff/d'\
2438 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
2439 < Makefile.c > junk.c
2440 $CPP $undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
2441 sed -e 's/^ / /' -e '/^#/d' -e '/^[
\f]*$/d' > junk2.c
2442 cat junk1.c junk2.c > Makefile.new
2443 rm -f junk.c junk1.c junk2.c
2444 chmod 444 Makefile.new
2445 mv -f Makefile.new Makefile
2448 if test ! -f src/.gdbinit && test -f $srcdir/src/.gdbinit; then
2449 echo creating src/.gdbinit
2450 echo source $srcdir/src/.gdbinit > src/.gdbinit
2453 # This is how we know whether to re-run configure in certain cases.
2454 touch src/config.stamp
2456 ], [GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPP_NEED_TRADITIONAL="$CPP_NEED_TRADITIONAL" CPPFLAGS="$CPPFLAGS"])