Make boldness and italicness affect subsequently created frames.
[emacs.git] / configure1.in
blobd1f4ed20674048067d603ba81561d579fb5975b3
1 dnl This is an autoconf script.
2 dnl To rebuild the `configure' script from this, execute the command
3 dnl     autoconf
4 dnl in the directory containing this script.  You must have autoconf
5 dnl version 1.4 or later.
6 dnl
7 dnl The following text appears in the resulting `configure' script,
8 dnl explaining how to rebuild it.
9 [#!/bin/sh
10 #### Configuration script for GNU Emacs
11 #### Copyright (C) 1992 Free Software Foundation, Inc.
13 ### Don't edit this script!
14 ### This script was automatically generated by the `autoconf' program
15 ### from the file `./configure.in'.
16 ### To rebuild it, execute the command
17 ###     autoconf
18 ### in the this directory.  You must have autoconf version 1.4 or later.
20 ### This file is part of GNU Emacs.
22 ### GNU Emacs is free software; you can redistribute it and/or modify
23 ### it under the terms of the GNU General Public License as published by
24 ### the Free Software Foundation; either version 1, or (at your option)
25 ### any later version.
27 ### GNU Emacs is distributed in the hope that it will be useful,
28 ### but WITHOUT ANY WARRANTY; without even the implied warranty of
29 ### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
30 ### GNU General Public License for more details.
32 ### You should have received a copy of the GNU General Public License
33 ### along with GNU Emacs; see the file COPYING.  If not, write to
34 ### the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
37 ### Since Emacs has configuration requirements that autoconf can't
38 ### meet, this file is an unholy marriage of custom-baked
39 ### configuration code and autoconf macros.
40 ###
41 ### We use the m4 quoting characters [ ] (as established by the
42 ### autoconf system) to include large sections of raw sewage - Oops, I
43 ### mean, shell code - in the final configuration script.
44 ###
45 ### Usage: configure config_name
46 ###
47 ### If configure succeeds, it leaves its status in config.status.
48 ### If configure fails after disturbing the status quo,
49 ###     config.status is removed.
52 ### Remove any more than one leading "." element from the path name.
53 ### If we don't remove them, then another "./" will be prepended to
54 ### the file name each time we use config.status, and the program name
55 ### will get larger and larger.  This wouldn't be a problem, except
56 ### that since progname gets recorded in all the Makefiles this script
57 ### produces, move-if-change thinks they're different when they're
58 ### not.
59 ###
60 ### It would be nice if we could put the ./ in a \( \) group and then
61 ### apply the * operator to that, so we remove as many leading ./././'s
62 ### as are present, but some seds (like Ultrix's sed) don't allow you to
63 ### apply * to a \( \) group.  Bleah.
64 progname="`echo $0 | sed 's:^\./\./:\./:'`"
67 #### Usage messages.
69 short_usage="Usage: ${progname} CONFIGURATION [-OPTION[=VALUE] ...]
71 Set compilation and installation parameters for GNU Emacs, and report.
72 CONFIGURATION specifies the machine and operating system to build for.
73 --with-x                Support the X Window System.
74 --with-x=no             Don't support X.
75 --x-includes=DIR        Search for X header files in DIR.
76 --x-libraries=DIR       Search for X libraries in DIR.
77 --with-gcc              Use GCC to compile Emacs.
78 --with-gcc=no           Don't use GCC to compile Emacs.
79 --run-in-place          Use libraries and data files directly out of the 
80                         source tree.
81 --srcdir=DIR            Look for source in DIR.
82 --prefix=DIR            Install files below dir.
84 If successful, ${progname} leaves its status in config.status.  If
85 unsuccessful after disturbing the status quo, it removes config.status."
88 #### Option processing.
90 ### Record all the arguments, so we can save them in config.status.
91 arguments="$@"
93 ### These values are used to comment and uncomment different values
94 ### for the path variables in the Makefile, to choose the installed
95 ### configuration or the run-in-place configuration.
96 rip_paths='#disabled# '
97 inst_paths=''
99 ### Establish some default values.
100 prefix='/usr/local'
101 exec_prefix='${prefix}'
103 ### Don't use shift -- that destroys the argument list, which autoconf needs
104 ### to produce config.status.  It turns out that "set - ${arguments}" doesn't
105 ### work portably.
106 index=0
107 while [ $index -lt $# ]; do
108   index=`expr $index + 1`
109   arg=`eval echo '$'$index`
110   case "${arg}" in
112     ## Anything starting with a hyphen we assume is an option.
113     -* )
115       ## Separate the switch name from the value it's being given.
116       case "${arg}" in
117         -*=*)
118           opt=`echo ${arg} | sed 's:^-*\([^=]*\)=.*$:\1:'`
119           val=`echo ${arg} | sed 's:^-*[^=]*=\(.*\)$:\1:'`
120           valomitted=no
121         ;;
122         -*)
123           ## If FOO is a boolean argument, --FOO is equivalent to
124           ## --FOO=yes.  Otherwise, the value comes from the next
125           ## argument - see below.
126           opt=`echo ${arg} | sed 's:^-*\(.*\)$:\1:'`
127           val="yes"
128           valomitted=yes
129         ;;
130       esac
132       ## Change `-' in the option name to `_'.
133       optname="${opt}"
134       opt="`echo ${opt} | tr - _`"
136       ## Process the option.
137       case "${opt}" in
139         ## Has the user specified which window systems they want to support?
140         "with_x" | "with_x11" | "with_x10" )
141           ## Make sure the value given was either "yes" or "no".
142           case "${val}" in
143             y | ye | yes )      val=yes ;;
144             n | no )            val=no  ;;
145             * )
146               (echo "${progname}: the \`--${optname}' option is supposed to have a boolean value.
147 Set it to either \`yes' or \`no'."
148                echo "${short_usage}") >&2
149               exit 1
150             ;;
151           esac
152           eval "${opt}=\"${val}\""
153         ;;
155         ## Has the user specified whether or not they want GCC?
156         "with_gcc" | "with_gnu_cc" )
157           ## Make sure the value given was either "yes" or "no".
158           case "${val}" in
159             y | ye | yes )      val=yes ;;
160             n | no )            val=no  ;;
161             * )
162               (echo "${progname}: the \`--${optname}' option is supposed to have a boolean value.
163 Set it to either \`yes' or \`no'."
164                echo "${short_usage}") >&2
165               exit 1
166             ;;
167           esac
168           eval "${opt}=\"${val}\""
169         ;;
171         ## Has the user specified a source directory?
172         "srcdir" )
173           ## If the value was omitted, get it from the next argument.
174           if [ "${valomitted}" = "yes" ]; then
175             ## Get the next argument from the argument list, if there is one.
176             if [ $index = $# ]; then
177               (echo "${progname}: You must give a value for the \`--${optname}' option, as in
178     \`--${optname}=FOO'."
179                echo "${short_usage}") >&2
180               exit 1
181             fi
182             index=`expr $index + 1`
183             val=`eval echo '$'$index`
184           fi
185           srcdir="${val}"
186         ;;
188         ## Has the user tried to tell us where the X files are?
189         ## I think these are dopey, but no less than three alpha
190         ## testers, at large sites, have said they have their X files
191         ## installed in odd places.
192         "x_includes" )
193           ## If the value was omitted, get it from the next argument.
194           if [ "${valomitted}" = "yes" ]; then
195             ## Get the next argument from the argument list, if there is one.
196             if [ $index = $# ]; then
197               (echo "${progname}: You must give a value for the \`--${optname}' option, as in
198     \`--${optname}=FOO'."
199                echo "${short_usage}") >&2
200               exit 1
201             fi
202             index=`expr $index + 1`
203             val=`eval echo '$'$index`
204           fi
205           x_includes="${val}"
206         ;;
207         "x_libraries" )
208           ## If the value was omitted, get it from the next argument.
209           if [ "${valomitted}" = "yes" ]; then
210             ## Get the next argument from the argument list, if there is one.
211             if [ $index = $# ]; then
212               (echo "${progname}: You must give a value for the \`--${optname}' option, as in
213     \`--${optname}=FOO'."
214                echo "${short_usage}") >&2
215               exit 1
216             fi
217             index=`expr $index + 1`
218             val=`eval echo '$'$index`
219           fi
220           x_libraries="${val}"
221         ;;
223         ## Should this use the "development configuration"?
224         "run_in_place" )
225           rip_paths=''
226           inst_paths='#disabled# '
227         ;;
229         ## Has the user specified an installation prefix?
230         "prefix" )
231           ## If the value was omitted, get it from the next argument.
232           if [ "${valomitted}" = "yes" ]; then
233             ## Get the next argument from the argument list, if there is one.
234             if [ $index = $# ]; then
235               (echo "${progname}: You must give a value for the \`--${optname}' option, as in
236     \`--${optname}=FOO'."
237                echo "${short_usage}") >&2
238               exit 1
239             fi
240             index=`expr $index + 1`
241             val=`eval echo '$'$index`
242           fi
243           prefix="${val}"
244         ;;
246         ## Has the user specified an installation prefix?
247         "exec_prefix" )
248           ## If the value was omitted, get it from the next argument.
249           if [ "${valomitted}" = "yes" ]; then
250             ## Get the next argument from the argument list, if there is one.
251             if [ $index = $# ]; then
252               (echo "${progname}: You must give a value for the \`--${optname}' option, as in
253     \`--${optname}=FOO'."
254                echo "${short_usage}") >&2
255               exit 1
256             fi
257             index=`expr $index + 1`
258             val=`eval echo '$'$index`
259           fi
260           exec_prefix="${val}"
261         ;;
263         ## Verbose flag, tested by autoconf macros.
264         "verbose" )
265           verbose=yes
266         ;;
268         ## Has the user asked for some help?
269         "usage" | "help" )
270           echo "${short_usage}" | more
271           exit
272         ;;
274         ## We ignore all other options silently.
275       esac
276     ;;
278     ## Anything not starting with a hyphen we assume is a
279     ## configuration name.
280     *)
281       configuration=${arg}
282     ;;
284   esac
285 done
287 if [ "${configuration}" = "" ]; then
288   echo '- You did not tell me what kind of host system you want to configure.
289 - I will attempt to guess the kind of system this is.' 1>&2
290   guesssys=`echo ${progname} | sed 's/configure$/config.guess/'`
291   if configuration=`${guesssys}` ; then
292     echo "- Looks like this is a ${configuration}" 1>&2
293   else
294     echo '- Failed to guess the system type.  You need to tell me.' 1>&2
295     echo "${short_usage}" >&2
296     exit 1
297   fi
300 #### Decide where the source is.
301 case "${srcdir}" in
303   ## If it's not specified, see if  `.' or `..' might work.
304   "" )
305     confdir=`echo $0 | sed 's|//|/|' | sed 's|/[^/]*$||'`
306     if [ -f $confdir/src/lisp.h -a -f $confdir/lisp/version.el ]; then
307       srcdir="${confdir}"
308     else
309       if [ -f "./src/lisp.h" -a -f "./lisp/version.el" ]; then
310         srcdir='.'
311       else
312         if [ -f "../src/lisp.h" -a -f "../lisp/version.el" ]; then
313           srcdir='..'
314         else
315           (echo "\
316 ${progname}: Neither the current directory nor its parent seem to
317 contain the Emacs sources.  If you do not want to build Emacs in its
318 source tree, you should run \`${progname}' in the directory in which
319 you wish to build Emacs, using its \`--srcdir' option to say where the
320 sources may be found."
321             echo "${short_usage}") >&2
322           exit 1
323         fi
324       fi
325     fi
326   ;;
328   ## Otherwise, check if the directory they specified is okay.
329   * )
330     if [ ! -d "${srcdir}" -o ! -f "${srcdir}/src/lisp.h" -o ! -f "${srcdir}/lisp/version.el" ]; then
331       (echo "\
332 ${progname}: The directory specified with the \`--srcdir' option,
333 \`${srcdir}', doesn't seem to contain the Emacs sources.  You should
334 either run the \`${progname}' script at the top of the Emacs source
335 tree, or use the \`--srcdir' option to specify where the Emacs sources
336 are."
337        echo "${short_usage}") >&2
338       exit 1
339     fi
340   ;;
341 esac
343 #### Make srcdir absolute, if it isn't already.  It's important to
344 #### avoid running the path through pwd unnecessary, since pwd can
345 #### give you automounter prefixes, which can go away.
346 case "${srcdir}" in
347   /* ) ;;
348   . )
349     ## We may be able to use the $PWD environment variable to make this
350     ## absolute.  But sometimes PWD is inaccurate.
351     if [ "${PWD}" != "" ] && [ "`(cd ${PWD} ; pwd)`" = "`pwd`" ] ; then
352       srcdir="$PWD"
353     else
354       srcdir="`(cd ${srcdir}; pwd)`"
355     fi
356   ;;
357   *  ) srcdir="`(cd ${srcdir}; pwd)`" ;;
358 esac
360 #### Make sure that the source directory doesn't already have a
361 #### configured system in it.
362 if [ `pwd` != `(cd ${srcdir} && pwd)` ] \
363    && [ -f "${srcdir}/src/config.h" ] ; then
364   (echo "${progname}: the directory tree \`${srcdir}' is being used"
365    echo "   as a build directory right now; it has been configured in its own"
366    echo "   right.  You can't use srcdir in this situation.") >&2
367   exit 1
370 ### Make the necessary directories, if they don't exist.
371 for dir in ./src ./lib-src ./cpp ./oldXMenu ./etc ; do
372   if [ ! -d ${dir} ]; then
373     mkdir ${dir}
374   fi
375 done
377 #### Given the configuration name, set machfile and opsysfile to the
378 #### names of the m/*.h and s/*.h files we should use.
380 ### Canonicalize the configuration name.
381 echo "Checking the configuration name."
382 if canonical=`${srcdir}/config.sub "${configuration}"` ; then : ; else
383   exit $?
386 ### If you add support for a new configuration, add code to this
387 ### switch statement to recognize your configuration name and select
388 ### the appropriate operating system and machine description files.
390 ### You would hope that you could choose an m/*.h file pretty much
391 ### based on the machine portion of the configuration name, and an s-
392 ### file based on the operating system portion.  However, it turns out
393 ### that each m/*.h file is pretty manufacturer-specific - for
394 ### example, apollo.h, hp9000s300.h, mega68k, news.h, and tad68k are
395 ### all 68000 machines; mips.h, pmax.h, and news-risc are all MIPS
396 ### machines.  So we basically have to have a special case for each
397 ### configuration name.
399 ### As far as handling version numbers on operating systems is
400 ### concerned, make sure things will fail in a fixable way.  If
401 ### /etc/MACHINES doesn't say anything about version numbers, be
402 ### prepared to handle anything reasonably.  If version numbers
403 ### matter, be sure /etc/MACHINES says something about it.
405 ### Eric Raymond says we should accept strings like "sysvr4" to mean
406 ### "System V Release 4"; he writes, "The old convention encouraged
407 ### confusion between `system' and `release' levels'."
409 machine='' opsys='' unported='false'
410 case "${canonical}" in
412   ## Alliant machines
413   ## Strictly speaking, we need the version of the alliant operating
414   ## system to choose the right machine file, but currently the
415   ## configuration name doesn't tell us enough to choose the right
416   ## one; we need to give alliants their own operating system name to
417   ## do this right.  When someone cares, they can help us.
418   fx80-alliant-* )
419     machine=alliant4 opsys=bsd4-2
420   ;;
421   i860-alliant-* )
422     machine=alliant-2800 opsys=bsd4-3
423   ;;
425   ## Altos 3068
426   m68*-altos-sysv* )
427     machine=altos opsys=usg5-2
428   ;;
429     
430   ## Amdahl UTS
431   580-amdahl-sysv* )
432     machine=amdahl opsys=usg5-2-2
433   ;;
435   ## Appallings - I mean, Apollos - running Domain
436   m68*-apollo* )
437     machine=apollo opsys=bsd4-2
438   ;;
440   ## AT&T 3b2, 3b5, 3b15, 3b20
441   we32k-att-sysv* )
442     machine=att3b opsys=usg5-2-2
443   ;;
445   ## AT&T 3b1 - The Mighty Unix PC!
446   m68*-att-sysv* )
447     machine=7300 opsys=usg5-2-2
448   ;;
450   ## Bull dpx2
451   m68*-bull-sysv3* )
452     machine=dpx2 opsys=usg5-3
453   ;;
455   ## Bull sps7
456   m68*-bull-sysv2* )
457     machine=sps7 opsys=usg5-2
458   ;;
460   ## CCI 5/32, 6/32 -- see "Tahoe".
462   ## Celerity
463   ## I don't know what configuration name to use for this; config.sub
464   ## doesn't seem to know anything about it.  Hey, Celerity users, get
465   ## in touch with us!
466   celerity-celerity-bsd* )
467     machine=celerity opsys=bsd4-2
468   ;;
470   ## Clipper
471   ## What operating systems does this chip run that Emacs has been
472   ## tested on?
473   clipper-* )
474     machine=clipper
475     ## We'll use the catch-all code at the bottom to guess the
476     ## operating system.
477   ;;
479   ## Convex
480   *-convex-bsd* )
481     machine=convex opsys=bsd4-3
482   ;;
484   ## Cubix QBx/386
485   i386-cubix-sysv* )
486     machine=intel386 opsys=usg5-3
487   ;;
489   ## Cydra 5
490   cydra*-cydrome-sysv* )
491     machine=cydra5 opsys=usg5-3
492   ;;
494   ## Data General AViiON Machines
495   m88k-dg-dgux* )
496     machine=aviion opsys=dgux
497   ;;
499   ## DECstations
500   mips-dec-ultrix[0-3].* | mips-dec-ultrix4.0 | mips-dec-bsd4.2 )
501     machine=pmax opsys=bsd4-2
502   ;;
503   mips-dec-ultrix* | mips-dec-bsd* )
504     machine=pmax opsys=bsd4-3
505   ;;
506   mips-dec-osf* )
507     machine=pmax opsys=osf1
508   ;;
510   ## Motorola Delta machines
511   m68*-motorola-sysv* )
512     machine=delta opsys=usg5-3
513   ;;
514   m88k-motorola-sysv4* )
515     machine=delta88k opsys=usg5-4
516   ;;
517   m88k-motorola-sysv* | m88k-motorola-m88kbcs* )
518     machine=delta88k opsys=usg5-3
519   ;;
521   ## Dual machines
522   m68*-dual-sysv* )
523     machine=dual opsys=usg5-2
524   ;;
525   m68*-dual-uniplus* )
526     machine=dual opsys=unipl5-2
527   ;;
529   ## Elxsi 6400
530   elxsi-elxsi-sysv* )
531     machine=elxsi opsys=usg5-2
532   ;;
534   ## Encore machines
535   ns16k-encore-bsd* )
536     machine=ns16000 opsys=umax
537   ;;
539   ## The GEC 93 - apparently, this port isn't really finished yet.
541   ## Gould Power Node and NP1
542   pn-gould-bsd4.2 )
543     machine=gould opsys=bsd4-2
544   ;;
545   pn-gould-bsd4.3 )
546     machine=gould opsys=bsd4-3
547   ;;
548   np1-gould-bsd* )
549     machine=gould-np1 opsys=bsd4-3
550   ;;
552   ## Honeywell XPS100
553   xps*-honeywell-sysv* )
554     machine=xps100 opsys=usg5-2
555   ;;
557   ## HP 9000 series 200 or 300
558   m68*-hp-bsd* )
559     machine=hp9000s300 opsys=bsd4-3
560   ;;
561   ## HP/UX 7, 8 and 9 are supported on these machines.
562   m68*-hp-hpux* )
563     case "`uname -r`" in
564       *.08.* ) machine=hp9000s300 opsys=hpux8 ;;
565       *.09.* ) machine=hp9000s300 opsys=hpux9 ;;
566       *) machine=hp9000s300 opsys=hpux ;;
567     esac
568   ;;
570   ## HP 9000 series 700 and 800, running HP/UX
571   hppa*-hp-hpux7* )
572     machine=hp9000s800 opsys=hpux
573   ;;
574   hppa*-hp-hpux8* )
575     machine=hp9000s800 opsys=hpux8
576   ;;
577   hppa*-hp-hpux9* )
578     machine=hp9000s800 opsys=hpux9
579   ;;
581   ## HP 9000 series 700 and 800, running HP/UX
582   hppa*-hp-hpux* )
583     ## Cross-compilation?  Nah!
584     case "`uname -r`" in
585       *.08.* ) machine=hp9000s800 opsys=hpux8 ;;
586       *.09.* ) machine=hp9000s800 opsys=hpux9 ;;
587       *) machine=hp9000s800 opsys=hpux ;;
588     esac
589   ;;
591   ## Orion machines
592   orion-orion-bsd* )
593     machine=orion opsys=bsd4-2
594   ;;
595   clipper-orion-bsd* )
596     machine=orion105 opsys=bsd4-2
597   ;;
599   ## IBM machines
600   i386-ibm-aix1.1 )
601     machine=ibmps2-aix opsys=usg5-2-2
602   ;;
603   i386-ibm-aix1.[23] | i386-ibm-aix* )
604     machine=ibmps2-aix opsys=usg5-3
605   ;;
606   rs6000-ibm-aix3.1 )
607     machine=ibmrs6000 opsys=aix3-1
608   ;;
609   rs6000-ibm-aix3.2 | rs6000-ibm-aix* )
610     machine=ibmrs6000 opsys=aix3-2
611   ;;
612   romp-ibm-bsd4-3 )
613     machine=ibmrt opsys=bsd4-3
614   ;;    
615   romp-ibm-bsd4-2 )
616     machine=ibmrt opsys=bsd4-2
617   ;;
618   romp-ibm-aos4-3 )
619     machine=ibmrt opsys=bsd4-3
620   ;;    
621   romp-ibm-aos4-2 )
622     machine=ibmrt opsys=bsd4-2
623   ;;
624   romp-ibm-aos* )
625     machine=ibmrt opsys=bsd4-3
626   ;;
627   romp-ibm-bsd* )
628     machine=ibmrt opsys=bsd4-3
629   ;;
630   romp-ibm-aix* )
631     machine=ibmrt-aix opsys=usg5-2-2
632   ;;
634   ## Integrated Solutions `Optimum V'
635   m68*-isi-bsd4.2 )
636     machine=isi-ov opsys=bsd4-2
637   ;;
638   m68*-isi-bsd4.3 )
639     machine=isi-ov opsys=bsd4-3
640   ;;
642   ## Intel 386 machines where we do care about the manufacturer
643   i[34]86-intsys-sysv* )
644     machine=is386 opsys=usg5-2-2
645   ;;
647   ## Prime EXL
648   i386-prime-sysv* )
649     machine=i386 opsys=usg5-3
650   ;;
652   ## Sequent Symmetry
653   i386-sequent-bsd* )
654     machine=symmetry opsys=bsd4-3
655   ;;
657   ## Intel 860
658   i860-*-sysvr4 )
659     machine=i860 opsys=usg5-4
660   ;;
662   ## Silicon Graphics machines
663   ## Iris 2500 and Iris 2500 Turbo (aka the Iris 3030)
664   m68*-sgi-iris3.5 )
665     machine=irist opsys=iris3-5
666   ;;
667   m68*-sgi-iris3.6 | m68*-sgi-iris*)
668     machine=irist opsys=iris3-6
669   ;;
670   ## Iris 4D
671   mips-sgi-irix3.* )
672     machine=iris4d opsys=irix3-3
673   ;;
674   mips-sgi-irix4.* | mips-sgi-irix* )
675     machine=iris4d opsys=irix4-0
676   ;;
678   ## Masscomp machines
679   m68*-masscomp-rtu )
680     machine=masscomp opsys=rtu
681   ;;
683   ## Megatest machines
684   m68*-megatest-bsd* )
685     machine=mega68 opsys=bsd4-2
686   ;;
688   ## Workstations sold by MIPS
689   ## This is not necessarily all workstations using the MIPS processor -
690   ## Irises are produced by SGI, and DECstations by DEC.
692   ## etc/MACHINES lists mips.h and mips4.h as possible machine files,
693   ## and usg5-2-2 and bsd4-3 as possible OS files.  The only guidance
694   ## it gives for choosing between the alternatives seems to be "Use
695   ## -machine=mips4 for RISCOS version 4; use -opsystem=bsd4-3 with
696   ## the BSD world."  I'll assume that these are instructions for
697   ## handling two odd situations, and that every other situation
698   ## should use mips.h and usg5-2-2, they being listed first.
699   mips-mips-usg* )
700     machine=mips4
701     ## Fall through to the general code at the bottom to decide on the OS.
702   ;;
703   mips-mips-riscos4* )
704     machine=mips4 opsys=bsd4-3
705   ;;
706   mips-mips-bsd* )
707     machine=mips opsys=bsd4-3
708   ;;
709   mips-mips-* )
710     machine=mips opsys=usg5-2-2
711   ;;
713   ## NeXT
714   m68*-next-mach* | m68*-next-bsd* )
715     machine=next opsys=mach2
716   ;;
718   ## The complete machine from National Semiconductor
719   ns32k-ns-genix* )
720     machine=ns32000 opsys=usg5-2
721   ;;
723   ## NCR machines
724   m68*-ncr-sysv2* | m68*-ncr-sysvr2* )
725     machine=tower32 opsys=usg5-2-2
726   ;;
727   m68*-ncr-sysv3* | m68*-ncr-sysvr3* )
728     machine=tower32v3 opsys=usg5-3
729   ;;
731   ## Nixdorf Targon 31
732   m68*-nixdorf-sysv* )
733     machine=targon31 opsys=usg5-2-2
734   ;;
736   ## Nu (TI or LMI)
737   m68*-nu-sysv* )
738     machine=nu opsys=usg5-2
739   ;;
741   ## Plexus
742   m68*-plexus-sysv* )
743     machine=plexus opsys=usg5-2
744   ;;
746   ## Pyramid machines
747   ## I don't really have any idea what sort of processor the Pyramid has,
748   ## so I'm assuming it is its own architecture.
749   pyramid-pyramid-bsd* )
750     machine=pyramid opsys=bsd4-2
751   ;;
753   ## Sequent Balance
754   ns32k-sequent-bsd4.2 )
755     machine=sequent opsys=bsd4-2
756   ;;
757   ns32k-sequent-bsd4.3 )
758     machine=sequent opsys=bsd4-3
759   ;;
761   ## SONY machines
762   m68*-sony-bsd4.2 )
763     machine=news opsys=bsd4-2
764   ;;
765   m68*-sony-bsd4.3 )
766     machine=news opsys=bsd4-3
767   ;;
768   mips-sony-bsd* )
769     machine=news-risc opsys=bsd4-3
770   ;;
772   ## Stride
773   m68*-stride-sysv* )
774     machine=stride opsys=usg5-2
775   ;;
777   ## Suns
778   *-sun-sunos* | *-sun-bsd* | *-sun-solaris* )
779     case "${canonical}" in
780       m68*-sunos1* )    machine=sun1 ;;
781       m68*-sunos2* )    machine=sun2 ;;
782       m68* )            machine=sun3 ;;
783       i[34]86* )        machine=sun386 ;;
784       sparc* )          machine=sparc ;;
785       * )               unported=true ;;
786     esac
787     case "${canonical}" in
788       *-sunos4.0*         ) opsys=sunos4-0 ;;
789       *-sunos4.1.3*       ) opsys=sunos4-1-3 ;;
790       *-sunos4* | *-sunos ) opsys=sunos4-1 ;;
791       *-sunos5* | *-solaris* ) opsys=sol2 ;;
792       *                   ) opsys=bsd4-2   ;;
793     esac
794   ;;
796   ## Tadpole 68k
797   m68*-tadpole-sysv* )
798     machine=tad68k opsys=usg5-3
799   ;;
801   ## Tahoe machines
802   tahoe-tahoe-bsd4.2 )
803     machine=tahoe opsys=bsd4-2
804   ;;
805   tahoe-tahoe-bsd4.3 )
806     machine=tahoe opsys=bsd4-3
807   ;;
809   ## Tandem Integrity S2
810   mips-tandem-sysv* )
811     machine=tandem-s2 opsys=usg5-3
812   ;;
814   ## Tektronix XD88
815   m88k-tektronix-sysv3 )
816   machine=tekXD88 opsys=usg5-3
817   ;;
819   ## Tektronix 16000 box (6130?)
820   ns16k-tektronix-bsd* )
821     machine=ns16000 opsys=bsd4-2
822   ;;
823   ## Tektronix 4300
824   ## src/m/tek4300.h hints that this is a m68k machine.
825   m68*-tektronix-bsd* )
826     machine=tex4300 opsys=bsd4-3
827   ;;
829   ## Titan P2 or P3
830   ## We seem to have lost the machine-description file titan.h!
831   titan-titan-sysv* )
832     machine=titan opsys=usg5-3
833   ;;
834   
835   ## Ustation E30 (SS5E)
836   m68*-unisys-uniplus* )
837     machine=ustation opsystem=unipl5-2
838   ;;
840   ## Vaxen.
841   vax-dec-* )
842     machine=vax
843     case "${canonical}" in
844       *-bsd4.1 )                                        opsys=bsd4-1 ;;
845       *-bsd4.2 | *-ultrix[0-3].* | *-ultrix4.0 )        opsys=bsd4-2 ;;
846       *-bsd4.3 | *-ultrix* )                            opsys=bsd4-3 ;;
847       *-bsd386 )                                        opsys=bsd386 ;;
848       *-sysv[01]* | *-sysvr[01]* )                      opsys=usg5-0 ;;
849       *-sysv2* | *-sysvr2* )                            opsys=usg5-2 ;;
850       *-vms* )                                          opsys=vms ;;
851       * )                                               unported=true
852     esac
853   ;;
855   ## Whitechapel MG1
856   ns16k-whitechapel-* )
857     machine=mg1
858     ## We don't know what sort of OS runs on these; we'll let the
859     ## operating system guessing code below try.
860   ;;
862   ## Wicat
863   m68*-wicat-sysv* )
864     machine=wicat opsys=usg5-2
865   ;;
867   ## Intel 386 machines where we don't care about the manufacturer
868   i[34]86-*-* )
869     machine=intel386
870     case "${canonical}" in
871       *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
872       *-isc2.2 )                opsys=isc2-2 ;;
873       *-isc* )                  opsys=isc3-0 ;;
874       *-esix5* )                opsys=esix5r4 ;;
875       *-esix* )                 opsys=esix ;;
876       *-xenix* )                opsys=xenix ;;
877       *-linux* )                opsys=linux ;;
878       *-sco3.2v4* )             opsys=sco4 ;;
879       *-bsd386* )               opsys=bsd386 ;;
880       *-386bsd )                opsys=386bsd ;;
881       ## Otherwise, we'll fall through to the generic opsys code at the bottom.
882     esac
883   ;;
885   * )
886     unported=true
887   ;;
888 esac
890 ### If the code above didn't choose an operating system, just choose
891 ### an operating system based on the configuration name.  You really
892 ### only want to use this when you have no idea what the right
893 ### operating system is; if you know what operating systems a machine
894 ### runs, it's cleaner to make it explicit in the case statement
895 ### above.
896 if [ x"${opsys}" = x ]; then
897   case "${canonical}" in
898     *-bsd4.[01] )       opsys=bsd4-1 ;;
899     *-bsd4.2 )          opsys=bsd4-2 ;;
900     *-bsd4.3 )          opsys=bsd4-3 ;;
901     *-sysv0 | *-sysvr0 )                opsys=usg5-0 ;;
902     *-sysv2 | *-sysvr2 )                opsys=usg5-2 ;;
903     *-sysv2.2 | *-sysvr2.2 )            opsys=usg5-2-2 ;;
904     *-sysv3 | *-sysvr3 )                opsys=usg5-3 ;;
905     *-sysv4 | *-sysvr4 )                opsys=usg5-4 ;;
906     *-sysv4.2 | *-sysvr4.2 )            opsys=usg5-4-2 ;;
907     * )
908       unported=true
909     ;;
910   esac
913 if $unported ; then
914   (echo "${progname}: Emacs hasn't been ported to \`${canonical}' systems."
915    echo "${progname}: Check \`etc/MACHINES' for recognized configuration names."
916   ) >&2
917   exit 1
920 machfile="m/${machine}.h"
921 opsysfile="s/${opsys}.h"
924 AC_PREPARE(lisp)
925 AC_CONFIG_HEADER(src/config.h)
928 #### Choose a compiler.
929 case ${with_gcc} in
930   "yes" ) CC="gcc" GCC=1 ;;
931   "no"  ) CC="cc"        ;;
932   * )
933     ] AC_PROG_CC [
934 esac
936 #### Some other nice autoconf tests.  If you add a test here which
937 #### should make an entry in src/config.h, don't forget to add an
938 #### #undef clause to src/config.h.in for autoconf to modify.
940 dnl checks for programs
941 AC_LN_S
942 AC_PROG_CPP
943 AC_PROG_INSTALL
944 AC_PROG_YACC
946 dnl checks for UNIX variants that set `DEFS'
948 dnl checks for header files
949 AC_HAVE_HEADERS(sys/timeb.h sys/time.h)
950 AC_STDC_HEADERS
951 AC_TIME_WITH_SYS_TIME
953 dnl checks for typedefs
954 AC_RETSIGTYPE
956 dnl checks for structure members
957 AC_STRUCT_TM
958 AC_TIMEZONE
960 dnl checks for compiler characteristics
961 AC_CONST
963 dnl checks for operating system services
964 AC_LONG_FILE_NAMES
966 dnl other checks for UNIX variants
970 #### Choose a window system.
971 echo "Checking window system."
973 window_system=''
974 case "${with_x}" in
975   yes )
976     window_system=${window_system}x11
977   ;;
978   no )
979     window_system=${window_system}none
980 esac
981 case "${with_x11}" in
982   yes )
983     window_system=${window_system}x11
984   ;;
985 esac
986 case "${with_x10}" in
987   yes )
988     window_system=${window_system}x10
989   ;;
990 esac
992 case "${window_system}" in
993   "none" | "x11" | "x10" ) ;;
994   "" )
995     # --x-includes or --x-libraries implies --with-x11.
996     if [ -n "${x_includes}" ] || [ -n "${x_libraries}" ]; then
997       window_system=x11
998     else
999       echo "  No window system specified.  Looking for X11."
1000       # If the user didn't specify a window system and we found X11, use it.
1001       if [ -r /usr/lib/libX11.a \
1002          -o -d /usr/include/X11 \
1003          -o -d /usr/X386/include \
1004          -o -d ${x_includes}/X11 ]; then
1005         window_system=x11
1006       fi
1007     fi
1008   ;;
1009   * )
1010     echo "Don't specify a window system more than once." >&2
1011     exit 1
1012   ;;
1013 esac
1015 case "${window_system}" in
1016   "" | "x11" )
1017     ### If the user hasn't specified where we should find X, try
1018     ### letting autoconf figure that out.
1019     if [ -z "${x_includes}" ] && [ -z "${x_libraries}" ]; then
1020       ]
1021       AC_FIND_X
1022       [
1023     fi
1024     if [ -n "${x_includes}" ] || [ -n "${x_libraries}" ]; then
1025       window_system=x11
1026     fi
1027   ;;
1028 esac
1030 [ -z "${window_system}" ] && window_system=none
1032 [ -n "${x_libraries}" ] && LD_SWITCH_X_SITE="-L${x_libraries}"
1033 [ -n "${x_includes}" ] && C_SWITCH_X_SITE="-I${x_includes}"
1035 case "${window_system}" in
1036   x11 )
1037     HAVE_X_WINDOWS=yes
1038     HAVE_X11=yes
1039     echo "  Using X11."
1040   ;;
1041   x10 )
1042     HAVE_X_WINDOWS=yes
1043     HAVE_X11=no
1044     echo "  Using X10."
1045   ;;
1046   none )
1047     HAVE_X_WINDOWS=no
1048     HAVE_X11=no
1049     echo "  Using no window system."
1050   ;;
1051 esac
1053 ### If we're using X11, we should use the X menu package.
1054 HAVE_X_MENU=no
1055 case ${HAVE_X11} in
1056   yes )
1057     HAVE_X_MENU=yes
1058   ;;
1059 esac
1061 #### Extract some information from the operating system and machine files.
1063 echo "Examining the machine- and system-dependent files to find out"
1064 echo " - which libraries the lib-src programs will want, and"
1065 echo " - whether the GNU malloc routines are usable."
1067 ### It's not important that this name contain the PID; you can't run
1068 ### two configures in the same directory and have anything work
1069 ### anyway.
1070 tempcname="conftest.c"
1072 echo '
1073 #include "'${srcdir}'/src/'${opsysfile}'"
1074 #include "'${srcdir}'/src/'${machfile}'"
1075 #ifndef LIBS_MACHINE
1076 #define LIBS_MACHINE
1077 #endif
1078 #ifndef LIBS_SYSTEM
1079 #define LIBS_SYSTEM
1080 #endif
1081 #ifndef C_SWITCH_SYSTEM
1082 #define C_SWITCH_SYSTEM
1083 #endif
1084 @configure@ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM
1085 @configure@ c_switch_system=C_SWITCH_SYSTEM
1087 #ifndef LIB_X11_LIB
1088 #define LIB_X11_LIB
1089 #endif
1091 #ifndef LIBX11_MACHINE
1092 #define LIBX11_MACHINE
1093 #endif
1095 #ifndef LIBX11_SYSTEM
1096 #define LIBX11_SYSTEM
1097 #endif
1098 @configure@ LIBX=LIB_X11_LIB LIBX11_MACHINE LIBX11_SYSTEM
1100 #ifdef UNEXEC
1101 @configure@ unexec=UNEXEC
1102 #else
1103 @configure@ unexec=unexec.o
1104 #endif
1106 #ifdef SYSTEM_MALLOC
1107 @configure@ system_malloc=yes
1108 #else
1109 @configure@ system_malloc=no
1110 #endif
1112 #ifndef C_DEBUG_SWITCH
1113 #define C_DEBUG_SWITCH -g
1114 #endif
1116 #ifndef C_OPTIMIZE_SWITCH
1117 #define C_OPTIMIZE_SWITCH -O
1118 #endif
1120 #ifdef __GNUC__
1121 @configure@ CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH
1122 #else
1123 @configure@ CFLAGS=C_DEBUG_SWITCH
1124 #endif
1125 ' > ${tempcname}
1126 # The value of CPP is a quoted variable reference, so we need to do this
1127 # to get its actual value...
1128 CPP=`eval "echo $CPP"`
1129 eval `${CPP} -Isrc ${tempcname} \
1130        | grep '@configure@' \
1131        | sed -e 's/^@configure@ \([^=]*=\)\(.*\)$/\1"\2"/'`
1132 rm ${tempcname}
1134 ### Compute the unexec source name from the object name.
1135 UNEXEC_SRC="`echo ${unexec} | sed 's/\.o/.c/'`"
1137 # Do the opsystem or machine files prohibit the use of the GNU malloc?
1138 # Assume not, until told otherwise.
1139 GNU_MALLOC=yes
1140 if [ "${system_malloc}" = "yes" ]; then
1141   GNU_MALLOC=no
1142   GNU_MALLOC_reason="
1143   (The GNU allocators don't work with this system configuration.)"
1146 if [ x"${REL_ALLOC}" = x ]; then
1147   REL_ALLOC=${GNU_MALLOC}
1150 LISP_FLOAT_TYPE=yes
1153 #### Add the libraries to LIBS and check for some functions.
1156 DEFS="$c_switch_system $DEFS"
1157 LIBS="$libsrc_libs"
1159 dnl If found, this defines HAVE_LIBDNET, which m/pmax.h checks,
1160 dnl and also adds -ldnet to LIBS, which Autoconf uses for checks.
1161 AC_HAVE_LIBRARY(-ldnet)
1163 AC_HAVE_LIBRARY(-lXbsd, LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
1164     if test -d /usr/X386/include; then
1165       HAVE_XFREE386=yes
1166       test -z "${C_SWITCH_X_SITE}" && C_SWITCH_X_SITE="-I/usr/X386/include"
1167     fi)
1169 if test "${HAVE_X11}" = "yes"; then
1170   DEFS="$C_SWITCH_X_SITE $DEFS"
1171   LIBS="$LD_SWITCH_X_SITE $LIBX $LIBS"
1172   AC_HAVE_FUNCS(XrmSetDatabase XScreenResourceString)
1175 AC_ALLOCA
1176 AC_HAVE_FUNCS(gettimeofday gethostname dup2 rename closedir mkdir rmdir random bcopy)
1178 ok_so_far=true
1179 AC_FUNC_CHECK(socket, , ok_so_far=)
1180 if test -n "$ok_so_far"; then
1181   AC_HEADER_CHECK(netinet/in.h, , ok_so_far=)
1183 if test -n "$ok_so_far"; then
1184   AC_HEADER_CHECK(arpa/inet.h, , ok_so_far=)
1186 if test -n "$ok_so_far"; then
1187   AC_DEFINE(HAVE_INET_SOCKETS)
1190 #### Find out which version of Emacs this is.
1191 version=`grep 'defconst[         ]*emacs-version' ${srcdir}/lisp/version.el \
1192          | sed -e 's/^.*"\([0-9][0-9]*\.[0-9][0-9]*\)\..*$/\1/'`
1193 if [ x"${version}" = x ]; then
1194   echo "${progname}: can't find current emacs version in
1195         \`${srcdir}/lisp/version.el'." >&2
1196   exit 1
1199 if [ -f /usr/lpp/X11/bin/smt.exp ]; then
1200   ]
1201   AC_DEFINE(HAVE_AIX_SMT_EXP)
1202   [
1206 #### Specify what sort of things we'll be editing into Makefile and config.h.
1207 ### Use configuration here uncanonicalized to avoid exceeding size limits.
1209 AC_SUBST(configuration)
1210 AC_SUBST(version)
1211 AC_SUBST(srcdir)
1212 AC_SUBST(c_switch_system)
1213 AC_SUBST(libsrc_libs)
1214 AC_SUBST(rip_paths)
1215 AC_SUBST(inst_paths)
1216 AC_SUBST(LD_SWITCH_X_SITE)
1217 AC_SUBST(C_SWITCH_X_SITE)
1218 AC_SUBST(CFLAGS)
1219 AC_SUBST(prefix)
1220 AC_SUBST(exec_prefix)
1222 AC_DEFINE_UNQUOTED(config_machfile,  "\"${machfile}\"")
1223 AC_DEFINE_UNQUOTED(config_opsysfile, "\"${opsysfile}\"")
1224 AC_DEFINE_UNQUOTED(LD_SWITCH_X_SITE, ${LD_SWITCH_X_SITE})
1225 AC_DEFINE_UNQUOTED(C_SWITCH_X_SITE,  ${C_SWITCH_X_SITE})
1226 AC_DEFINE_UNQUOTED(UNEXEC_SRC,       ${UNEXEC_SRC})
1229 if [ "${HAVE_X_WINDOWS}" = "yes" ] ; then
1230   ] AC_DEFINE(HAVE_X_WINDOWS) [
1232 if [ "${HAVE_X11}" = "yes" ] ; then
1233   ] AC_DEFINE(HAVE_X11) [
1235 if [ "${HAVE_XFREE386}" = "yes" ] ; then
1236   ] AC_DEFINE(HAVE_XFREE386) [
1238 if [ "${HAVE_X_MENU}" = "yes" ] ; then
1239   ] AC_DEFINE(HAVE_X_MENU) [
1241 if [ "${GNU_MALLOC}" = "yes" ] ; then
1242   ] AC_DEFINE(GNU_MALLOC) [
1244 if [ "${REL_ALLOC}" = "yes" ] ; then
1245   ] AC_DEFINE(REL_ALLOC) [
1247 if [ "${LISP_FLOAT_TYPE}" = "yes" ] ; then
1248   ] AC_DEFINE(LISP_FLOAT_TYPE) [
1252 #### Report on what we decided to do.
1253 echo "
1255 Configured for \`${canonical}'.
1257   Where should the build process find the source code?    ${srcdir}
1258   What operating system and machine description files should Emacs use?
1259         \`${opsysfile}' and \`${machfile}'
1260   What compiler should emacs be built with?               ${CC} ${CFLAGS}
1261   Should Emacs use the GNU version of malloc?             ${GNU_MALLOC}${GNU_MALLOC_reason}
1262   Should Emacs use the relocating allocator for buffers?  ${REL_ALLOC}
1263   What window system should Emacs use?                    ${window_system}${x_includes+
1264   Where do we find X Windows header files?                }${x_includes}${x_libraries+
1265   Where do we find X Windows libraries?                   }${x_libraries}
1269 # Remove any trailing slashes in these variables.
1270 test -n "${prefix}" &&
1271   prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
1272 test -n "${exec_prefix}" &&
1273   exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
1275 AC_OUTPUT(Makefile)