Fix lots of doc strings.
[emacs.git] / configure1.in
blob1d674248e7da07f398adec90cd1ddbf2e353806b
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           if [ "x$PAGER" = x ]
271           then
272             echo "${short_usage}" | more
273           else
274             echo "${short_usage}" | $PAGER
275           fi
276           exit
277         ;;
279         ## We ignore all other options silently.
280       esac
281     ;;
283     ## Anything not starting with a hyphen we assume is a
284     ## configuration name.
285     *)
286       configuration=${arg}
287     ;;
289   esac
290 done
292 if [ "${configuration}" = "" ]; then
293   echo '- You did not tell me what kind of host system you want to configure.
294 - I will attempt to guess the kind of system this is.' 1>&2
295   guesssys=`echo ${progname} | sed 's/configure$/config.guess/'`
296   if configuration=`${guesssys}` ; then
297     echo "- Looks like this is a ${configuration}" 1>&2
298   else
299     echo '- Failed to guess the system type.  You need to tell me.' 1>&2
300     echo "${short_usage}" >&2
301     exit 1
302   fi
305 #### Decide where the source is.
306 case "${srcdir}" in
308   ## If it's not specified, see if  `.' or `..' might work.
309   "" )
310     confdir=`echo $0 | sed 's|//|/|' | sed 's|/[^/]*$||'`
311     if [ -f $confdir/src/lisp.h -a -f $confdir/lisp/version.el ]; then
312       srcdir="${confdir}"
313     else
314       if [ -f "./src/lisp.h" -a -f "./lisp/version.el" ]; then
315         srcdir='.'
316       else
317         if [ -f "../src/lisp.h" -a -f "../lisp/version.el" ]; then
318           srcdir='..'
319         else
320           (echo "\
321 ${progname}: Neither the current directory nor its parent seem to
322 contain the Emacs sources.  If you do not want to build Emacs in its
323 source tree, you should run \`${progname}' in the directory in which
324 you wish to build Emacs, using its \`--srcdir' option to say where the
325 sources may be found."
326             echo "${short_usage}") >&2
327           exit 1
328         fi
329       fi
330     fi
331   ;;
333   ## Otherwise, check if the directory they specified is okay.
334   * )
335     if [ ! -d "${srcdir}" -o ! -f "${srcdir}/src/lisp.h" -o ! -f "${srcdir}/lisp/version.el" ]; then
336       (echo "\
337 ${progname}: The directory specified with the \`--srcdir' option,
338 \`${srcdir}', doesn't seem to contain the Emacs sources.  You should
339 either run the \`${progname}' script at the top of the Emacs source
340 tree, or use the \`--srcdir' option to specify where the Emacs sources
341 are."
342        echo "${short_usage}") >&2
343       exit 1
344     fi
345   ;;
346 esac
348 #### Make srcdir absolute, if it isn't already.  It's important to
349 #### avoid running the path through pwd unnecessary, since pwd can
350 #### give you automounter prefixes, which can go away.
351 case "${srcdir}" in
352   /* ) ;;
353   . )
354     ## We may be able to use the $PWD environment variable to make this
355     ## absolute.  But sometimes PWD is inaccurate.
356     if [ "${PWD}" != "" ] && [ "`(cd ${PWD} ; pwd)`" = "`pwd`" ] ; then
357       srcdir="$PWD"
358     else
359       srcdir="`(cd ${srcdir}; pwd)`"
360     fi
361   ;;
362   *  ) srcdir="`(cd ${srcdir}; pwd)`" ;;
363 esac
365 #### Check if the source directory already has a configured system in it.
366 if [ `pwd` != `(cd ${srcdir} && pwd)` ] \
367    && [ -f "${srcdir}/src/config.h" ] ; then
368   (echo "${progname}: WARNING: The directory tree \`${srcdir}' is being used"
369    echo "   as a build directory right now; it has been configured in its own"
370    echo "   right.  To configure in another directory as well, you MUST"
371    echo "   use GNU make.  If you do not have GNU make, then you must"
372    echo "   now do \`make distclean' in ${srcdir},"
373    echo "   and then run ${progname} again.") >&2
374   # We need a multi-line sed script, which cannot go in a makefile.
375   vpath_sed='-f vpath.sed'
376 else
377   # Do the normal substitution for VPATH.  This will not crash non-GNU make.
378   vpath_sed='-e '\''s|^\(VPATH *=\).*$$|\1 ='\''"${srcdir}/${subdir}|"'
380 ] AC_SUBST(vpath_sed) [
382 ### Make the necessary directories, if they don't exist.
383 for dir in ./src ./lib-src ./cpp ./oldXMenu ./etc ; do
384   if [ ! -d ${dir} ]; then
385     mkdir ${dir}
386   fi
387 done
389 #### Given the configuration name, set machfile and opsysfile to the
390 #### names of the m/*.h and s/*.h files we should use.
392 ### Canonicalize the configuration name.
393 echo "Checking the configuration name."
394 if canonical=`${srcdir}/config.sub "${configuration}"` ; then : ; else
395   exit $?
398 ### If you add support for a new configuration, add code to this
399 ### switch statement to recognize your configuration name and select
400 ### the appropriate operating system and machine description files.
402 ### You would hope that you could choose an m/*.h file pretty much
403 ### based on the machine portion of the configuration name, and an s-
404 ### file based on the operating system portion.  However, it turns out
405 ### that each m/*.h file is pretty manufacturer-specific - for
406 ### example, apollo.h, hp9000s300.h, mega68k, news.h, and tad68k are
407 ### all 68000 machines; mips.h, pmax.h, and news-risc are all MIPS
408 ### machines.  So we basically have to have a special case for each
409 ### configuration name.
411 ### As far as handling version numbers on operating systems is
412 ### concerned, make sure things will fail in a fixable way.  If
413 ### /etc/MACHINES doesn't say anything about version numbers, be
414 ### prepared to handle anything reasonably.  If version numbers
415 ### matter, be sure /etc/MACHINES says something about it.
417 ### Eric Raymond says we should accept strings like "sysvr4" to mean
418 ### "System V Release 4"; he writes, "The old convention encouraged
419 ### confusion between `system' and `release' levels'."
421 machine='' opsys='' unported='false'
422 case "${canonical}" in
424   ## Alliant machines
425   ## Strictly speaking, we need the version of the alliant operating
426   ## system to choose the right machine file, but currently the
427   ## configuration name doesn't tell us enough to choose the right
428   ## one; we need to give alliants their own operating system name to
429   ## do this right.  When someone cares, they can help us.
430   fx80-alliant-* )
431     machine=alliant4 opsys=bsd4-2
432   ;;
433   i860-alliant-* )
434     machine=alliant-2800 opsys=bsd4-3
435   ;;
437   ## Altos 3068
438   m68*-altos-sysv* )
439     machine=altos opsys=usg5-2
440   ;;
441     
442   ## Amdahl UTS
443   580-amdahl-sysv* )
444     machine=amdahl opsys=usg5-2-2
445   ;;
447   ## Appallings - I mean, Apollos - running Domain
448   m68*-apollo* )
449     machine=apollo opsys=bsd4-2
450   ;;
452   ## AT&T 3b2, 3b5, 3b15, 3b20
453   we32k-att-sysv* )
454     machine=att3b opsys=usg5-2-2
455   ;;
457   ## AT&T 3b1 - The Mighty Unix PC!
458   m68*-att-sysv* )
459     machine=7300 opsys=usg5-2-2
460   ;;
462   ## Bull dpx2
463   m68*-bull-sysv3* )
464     machine=dpx2 opsys=usg5-3
465   ;;
467   ## Bull sps7
468   m68*-bull-sysv2* )
469     machine=sps7 opsys=usg5-2
470   ;;
472   ## CCI 5/32, 6/32 -- see "Tahoe".
474   ## Celerity
475   ## I don't know what configuration name to use for this; config.sub
476   ## doesn't seem to know anything about it.  Hey, Celerity users, get
477   ## in touch with us!
478   celerity-celerity-bsd* )
479     machine=celerity opsys=bsd4-2
480   ;;
482   ## Clipper
483   ## What operating systems does this chip run that Emacs has been
484   ## tested on?
485   clipper-* )
486     machine=clipper
487     ## We'll use the catch-all code at the bottom to guess the
488     ## operating system.
489   ;;
491   ## Convex
492   *-convex-bsd* )
493     machine=convex opsys=bsd4-3
494   ;;
496   ## Cubix QBx/386
497   i386-cubix-sysv* )
498     machine=intel386 opsys=usg5-3
499   ;;
501   ## Cydra 5
502   cydra*-cydrome-sysv* )
503     machine=cydra5 opsys=usg5-3
504   ;;
506   ## Data General AViiON Machines
507   m88k-dg-dgux* )
508     machine=aviion opsys=dgux
509   ;;
511   ## DECstations
512   mips-dec-ultrix[0-3].* | mips-dec-ultrix4.0* | mips-dec-bsd4.2* )
513     machine=pmax opsys=bsd4-2
514   ;;
515   mips-dec-ultrix* | mips-dec-bsd* )
516     machine=pmax opsys=bsd4-3
517   ;;
518   mips-dec-osf* )
519     machine=pmax opsys=osf1
520   ;;
522   ## Motorola Delta machines
523   m68*-motorola-sysv* )
524     machine=delta opsys=usg5-3
525   ;;
526   m88k-motorola-sysv4* )
527     machine=delta88k opsys=usg5-4
528   ;;
529   m88k-motorola-sysv* | m88k-motorola-m88kbcs* )
530     machine=delta88k opsys=usg5-3
531   ;;
533   ## Dual machines
534   m68*-dual-sysv* )
535     machine=dual opsys=usg5-2
536   ;;
537   m68*-dual-uniplus* )
538     machine=dual opsys=unipl5-2
539   ;;
541   ## Elxsi 6400
542   elxsi-elxsi-sysv* )
543     machine=elxsi opsys=usg5-2
544   ;;
546   ## Encore machines
547   ns16k-encore-bsd* )
548     machine=ns16000 opsys=umax
549   ;;
551   ## The GEC 93 - apparently, this port isn't really finished yet.
553   ## Gould Power Node and NP1
554   pn-gould-bsd4.2* )
555     machine=gould opsys=bsd4-2
556   ;;
557   pn-gould-bsd4.3* )
558     machine=gould opsys=bsd4-3
559   ;;
560   np1-gould-bsd* )
561     machine=gould-np1 opsys=bsd4-3
562   ;;
564   ## Honeywell XPS100
565   xps*-honeywell-sysv* )
566     machine=xps100 opsys=usg5-2
567   ;;
569   ## HP 9000 series 200 or 300
570   m68*-hp-bsd* )
571     machine=hp9000s300 opsys=bsd4-3
572   ;;
573   m68*-hp-netbsd* )
574     machine=hp9000s300 opsys=netbsd
575   ;;
576   ## HP/UX 7, 8 and 9 are supported on these machines.
577   m68*-hp-hpux* )
578     case "`uname -r`" in
579       ## Someone's system reports A.B8.05 for this.
580       ## I wonder what other possibilities there are.
581       *.B8.* ) machine=hp9000s300 opsys=hpux8 ;;
582       *.08.* ) machine=hp9000s300 opsys=hpux8 ;;
583       *.09.* ) machine=hp9000s300 opsys=hpux9 ;;
584       *) machine=hp9000s300 opsys=hpux ;;
585     esac
586   ;;
588   ## HP 9000 series 700 and 800, running HP/UX
589   hppa*-hp-hpux7* )
590     machine=hp9000s800 opsys=hpux
591   ;;
592   hppa*-hp-hpux8* )
593     machine=hp9000s800 opsys=hpux8
594   ;;
595   hppa*-hp-hpux9* )
596     machine=hp9000s800 opsys=hpux9
597   ;;
599   ## HP 9000 series 700 and 800, running HP/UX
600   hppa*-hp-hpux* )
601     ## Cross-compilation?  Nah!
602     case "`uname -r`" in
603       ## Someone's system reports A.B8.05 for this.
604       ## I wonder what other possibilities there are.
605       *.B8.* ) machine=hp9000s800 opsys=hpux8 ;;
606       *.08.* ) machine=hp9000s800 opsys=hpux8 ;;
607       *.09.* ) machine=hp9000s800 opsys=hpux9 ;;
608       *) machine=hp9000s800 opsys=hpux ;;
609     esac
610   ;;
612   ## Orion machines
613   orion-orion-bsd* )
614     machine=orion opsys=bsd4-2
615   ;;
616   clipper-orion-bsd* )
617     machine=orion105 opsys=bsd4-2
618   ;;
620   ## IBM machines
621   i386-ibm-aix1.1* )
622     machine=ibmps2-aix opsys=usg5-2-2
623   ;;
624   i386-ibm-aix1.[23]* | i386-ibm-aix* )
625     machine=ibmps2-aix opsys=usg5-3
626   ;;
627   i370-ibm-aix*)
628     machine=ibm370aix opsys=usg5-3
629   ;;
630   rs6000-ibm-aix3.1* )
631     machine=ibmrs6000 opsys=aix3-1
632   ;;
633   rs6000-ibm-aix3.2* | rs6000-ibm-aix* )
634     machine=ibmrs6000 opsys=aix3-2
635   ;;
636   romp-ibm-bsd4.3* )
637     machine=ibmrt opsys=bsd4-3
638   ;;    
639   romp-ibm-bsd4.2* )
640     machine=ibmrt opsys=bsd4-2
641   ;;
642   romp-ibm-aos4.3* )
643     machine=ibmrt opsys=bsd4-3
644   ;;    
645   romp-ibm-aos4.2* )
646     machine=ibmrt opsys=bsd4-2
647   ;;
648   romp-ibm-aos* )
649     machine=ibmrt opsys=bsd4-3
650   ;;
651   romp-ibm-bsd* )
652     machine=ibmrt opsys=bsd4-3
653   ;;
654   romp-ibm-aix* )
655     machine=ibmrt-aix opsys=usg5-2-2
656   ;;
658   ## Integrated Solutions `Optimum V'
659   m68*-isi-bsd4.2* )
660     machine=isi-ov opsys=bsd4-2
661   ;;
662   m68*-isi-bsd4.3* )
663     machine=isi-ov opsys=bsd4-3
664   ;;
666   ## Intel 386 machines where we do care about the manufacturer
667   i[34]86-intsys-sysv* )
668     machine=is386 opsys=usg5-2-2
669   ;;
671   ## Prime EXL
672   i386-prime-sysv* )
673     machine=i386 opsys=usg5-3
674   ;;
676   ## Sequent Symmetry
677   i386-sequent-bsd* )
678     machine=symmetry opsys=bsd4-3
679   ;;
681   ## Intel 860
682   i860-*-sysvr4* )
683     machine=i860 opsys=usg5-4
684   ;;
686   ## Silicon Graphics machines
687   ## Iris 2500 and Iris 2500 Turbo (aka the Iris 3030)
688   m68*-sgi-iris3.5* )
689     machine=irist opsys=iris3-5
690   ;;
691   m68*-sgi-iris3.6* | m68*-sgi-iris*)
692     machine=irist opsys=iris3-6
693   ;;
694   ## Iris 4D
695   mips-sgi-irix3.* )
696     machine=iris4d opsys=irix3-3
697   ;;
698   mips-sgi-irix5.* )
699     machine=iris4d opsys=irix5-0
700   ;;
701   mips-sgi-irix4.* | mips-sgi-irix* )
702     machine=iris4d opsys=irix4-0
703   ;;
705   ## Masscomp machines
706   m68*-masscomp-rtu* )
707     machine=masscomp opsys=rtu
708   ;;
710   ## Megatest machines
711   m68*-megatest-bsd* )
712     machine=mega68 opsys=bsd4-2
713   ;;
715   ## Workstations sold by MIPS
716   ## This is not necessarily all workstations using the MIPS processor -
717   ## Irises are produced by SGI, and DECstations by DEC.
719   ## etc/MACHINES lists mips.h and mips4.h as possible machine files,
720   ## and usg5-2-2 and bsd4-3 as possible OS files.  The only guidance
721   ## it gives for choosing between the alternatives seems to be "Use
722   ## -machine=mips4 for RISCOS version 4; use -opsystem=bsd4-3 with
723   ## the BSD world."  I'll assume that these are instructions for
724   ## handling two odd situations, and that every other situation
725   ## should use mips.h and usg5-2-2, they being listed first.
726   mips-mips-usg* )
727     machine=mips4
728     ## Fall through to the general code at the bottom to decide on the OS.
729   ;;
730   mips-mips-riscos4* )
731     machine=mips4 opsys=bsd4-3
732   ;;
733   mips-mips-bsd* )
734     machine=mips opsys=bsd4-3
735   ;;
736   mips-mips-* )
737     machine=mips opsys=usg5-2-2
738   ;;
740   ## NeXT
741   m68*-next-mach* | m68*-next-bsd* )
742     machine=next opsys=mach2
743   ;;
745   ## The complete machine from National Semiconductor
746   ns32k-ns-genix* )
747     machine=ns32000 opsys=usg5-2
748   ;;
750   ## NCR machines
751   m68*-ncr-sysv2* | m68*-ncr-sysvr2* )
752     machine=tower32 opsys=usg5-2-2
753   ;;
754   m68*-ncr-sysv3* | m68*-ncr-sysvr3* )
755     machine=tower32v3 opsys=usg5-3
756   ;;
758   ## Nixdorf Targon 31
759   m68*-nixdorf-sysv* )
760     machine=targon31 opsys=usg5-2-2
761   ;;
763   ## Nu (TI or LMI)
764   m68*-nu-sysv* )
765     machine=nu opsys=usg5-2
766   ;;
768   ## Plexus
769   m68*-plexus-sysv* )
770     machine=plexus opsys=usg5-2
771   ;;
773   ## Pyramid machines
774   ## I don't really have any idea what sort of processor the Pyramid has,
775   ## so I'm assuming it is its own architecture.
776   pyramid-pyramid-bsd* )
777     machine=pyramid opsys=bsd4-2
778   ;;
780   ## Sequent Balance
781   ns32k-sequent-bsd4.2* )
782     machine=sequent opsys=bsd4-2
783   ;;
784   ns32k-sequent-bsd4.3* )
785     machine=sequent opsys=bsd4-3
786   ;;
788   ## SONY machines
789   m68*-sony-bsd4.2* )
790     machine=news opsys=bsd4-2
791   ;;
792   m68*-sony-bsd4.3* )
793     machine=news opsys=bsd4-3
794   ;;
795   m68*-sony-newsos3*)
796     machine=news opsys=bsd4-3
797   ;;
798   mips-sony-bsd* )
799     machine=news-risc opsys=bsd4-3
800   ;;
802   ## Stride
803   m68*-stride-sysv* )
804     machine=stride opsys=usg5-2
805   ;;
807   ## Suns
808   *-sun-sunos* | *-sun-bsd* | *-sun-solaris* )
809     case "${canonical}" in
810       m68*-sunos1* )    machine=sun1 ;;
811       m68*-sunos2* )    machine=sun2 ;;
812       m68* )            machine=sun3 ;;
813       i[34]86* )        machine=sun386 ;;
814       sparc* )          machine=sparc ;;
815       * )               unported=true ;;
816     esac
817     case "${canonical}" in
818       ## The Sun386 didn't get past 4.0.
819       i386-*-sunos4       ) opsys=sunos4-0 ;;
820       *-sunos4.0*         ) opsys=sunos4-0 ;;
821       *-sunos4.1.3*       ) opsys=sunos4-1-3 ;;
822       *-sunos4* | *-sunos ) opsys=sunos4-1 ;;
823       *-sunos5* | *-solaris* ) opsys=sol2 ;;
824       *                   ) opsys=bsd4-2   ;;
825     esac
826   ;;
828   ## Tadpole 68k
829   m68*-tadpole-sysv* )
830     machine=tad68k opsys=usg5-3
831   ;;
833   ## Tahoe machines
834   tahoe-tahoe-bsd4.2* )
835     machine=tahoe opsys=bsd4-2
836   ;;
837   tahoe-tahoe-bsd4.3* )
838     machine=tahoe opsys=bsd4-3
839   ;;
841   ## Tandem Integrity S2
842   mips-tandem-sysv* )
843     machine=tandem-s2 opsys=usg5-3
844   ;;
846   ## Tektronix XD88
847   m88k-tektronix-sysv3* )
848   machine=tekxd88 opsys=usg5-3
849   ;;
851   ## Tektronix 16000 box (6130?)
852   ns16k-tektronix-bsd* )
853     machine=ns16000 opsys=bsd4-2
854   ;;
855   ## Tektronix 4300
856   ## src/m/tek4300.h hints that this is a m68k machine.
857   m68*-tektronix-bsd* )
858     machine=tek4300 opsys=bsd4-3
859   ;;
861   ## Titan P2 or P3
862   ## We seem to have lost the machine-description file titan.h!
863   titan-titan-sysv* )
864     machine=titan opsys=usg5-3
865   ;;
866   
867   ## Ustation E30 (SS5E)
868   m68*-unisys-uniplus* )
869     machine=ustation opsystem=unipl5-2
870   ;;
872   ## Vaxen.
873   vax-dec-* )
874     machine=vax
875     case "${canonical}" in
876       *-bsd4.1* )                                       opsys=bsd4-1 ;;
877       *-bsd4.2* | *-ultrix[0-3].* | *-ultrix4.0* )      opsys=bsd4-2 ;;
878       *-bsd4.3* | *-ultrix* )                           opsys=bsd4-3 ;;
879       *-bsd386* )                                       opsys=bsd386 ;;
880       *-sysv[01]* | *-sysvr[01]* )                      opsys=usg5-0 ;;
881       *-sysv2* | *-sysvr2* )                            opsys=usg5-2 ;;
882       *-vms* )                                          opsys=vms ;;
883       * )                                               unported=true
884     esac
885   ;;
887   ## Whitechapel MG1
888   ns16k-whitechapel-* )
889     machine=mg1
890     ## We don't know what sort of OS runs on these; we'll let the
891     ## operating system guessing code below try.
892   ;;
894   ## Wicat
895   m68*-wicat-sysv* )
896     machine=wicat opsys=usg5-2
897   ;;
899   ## Intel 386 machines where we don't care about the manufacturer
900   i[34]86-*-* )
901     machine=intel386
902     case "${canonical}" in
903       *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
904       *-isc2.2* )               opsys=isc2-2 ;;
905       *-isc* )                  opsys=isc3-0 ;;
906       *-esix5* )                opsys=esix5r4 ;;
907       *-esix* )                 opsys=esix ;;
908       *-xenix* )                opsys=xenix ;;
909       *-linux* )                opsys=linux ;;
910       *-sco3.2v4* )             opsys=sco4 ;;
911       *-bsd386* )               opsys=bsd386 ;;
912       *-386bsd* )               opsys=386bsd ;;
913       *-netbsd* )               opsys=netbsd ;;
914       ## Otherwise, we'll fall through to the generic opsys code at the bottom.
915     esac
916   ;;
918   * )
919     unported=true
920   ;;
921 esac
923 ### If the code above didn't choose an operating system, just choose
924 ### an operating system based on the configuration name.  You really
925 ### only want to use this when you have no idea what the right
926 ### operating system is; if you know what operating systems a machine
927 ### runs, it's cleaner to make it explicit in the case statement
928 ### above.
929 if [ x"${opsys}" = x ]; then
930   case "${canonical}" in
931     *-bsd4.[01] )       opsys=bsd4-1 ;;
932     *-bsd4.2 )          opsys=bsd4-2 ;;
933     *-bsd4.3 )          opsys=bsd4-3 ;;
934     *-sysv0 | *-sysvr0 )                opsys=usg5-0 ;;
935     *-sysv2 | *-sysvr2 )                opsys=usg5-2 ;;
936     *-sysv2.2 | *-sysvr2.2 )            opsys=usg5-2-2 ;;
937     *-sysv3 | *-sysvr3 )                opsys=usg5-3 ;;
938     *-sysv4 | *-sysvr4 )                opsys=usg5-4 ;;
939     *-sysv4.2 | *-sysvr4.2 )            opsys=usg5-4-2 ;;
940     * )
941       unported=true
942     ;;
943   esac
946 if $unported ; then
947   (echo "${progname}: Emacs hasn't been ported to \`${canonical}' systems."
948    echo "${progname}: Check \`etc/MACHINES' for recognized configuration names."
949   ) >&2
950   exit 1
953 machfile="m/${machine}.h"
954 opsysfile="s/${opsys}.h"
957 AC_PREPARE(lisp)
958 AC_CONFIG_HEADER(src/config.h)
961 #### Choose a compiler.
962 case ${with_gcc} in
963   "yes" ) CC="gcc" GCC=1 ;;
964   "no"  ) CC="cc"        ;;
965   * )
966     ] AC_PROG_CC [
967 esac
969 #### Some other nice autoconf tests.  If you add a test here which
970 #### should make an entry in src/config.h, don't forget to add an
971 #### #undef clause to src/config.h.in for autoconf to modify.
973 dnl checks for programs
974 AC_LN_S
975 AC_PROG_CPP
976 AC_PROG_INSTALL
977 AC_PROG_YACC
979 dnl checks for UNIX variants that set `DEFS'
981 dnl checks for header files
982 AC_HAVE_HEADERS(sys/timeb.h sys/time.h)
983 AC_STDC_HEADERS
984 AC_TIME_WITH_SYS_TIME
986 dnl checks for typedefs
987 AC_RETSIGTYPE
989 dnl checks for structure members
990 AC_STRUCT_TM
991 AC_TIMEZONE
993 dnl checks for compiler characteristics
994 AC_CONST
996 dnl checks for operating system services
997 AC_LONG_FILE_NAMES
999 dnl other checks for UNIX variants
1003 #### Choose a window system.
1004 echo "Checking window system."
1006 window_system=''
1007 case "${with_x}" in
1008   yes )
1009     window_system=${window_system}x11
1010   ;;
1011   no )
1012     window_system=${window_system}none
1013 esac
1014 case "${with_x11}" in
1015   yes )
1016     window_system=${window_system}x11
1017   ;;
1018 esac
1019 case "${with_x10}" in
1020   yes )
1021     window_system=${window_system}x10
1022   ;;
1023 esac
1025 case "${window_system}" in
1026   "none" | "x11" | "x10" ) ;;
1027   "" )
1028     # --x-includes or --x-libraries implies --with-x11.
1029     if [ -n "${x_includes}" ] || [ -n "${x_libraries}" ]; then
1030       window_system=x11
1031     else
1032       echo "  No window system specified.  Looking for X11."
1033       # If the user didn't specify a window system and we found X11, use it.
1034       if [ -r /usr/lib/libX11.a \
1035          -o -d /usr/include/X11 \
1036          -o -d /usr/X386/include \
1037          -o -d ${x_includes}/X11 ]; then
1038         window_system=x11
1039       fi
1040     fi
1041   ;;
1042   * )
1043     echo "Don't specify a window system more than once." >&2
1044     exit 1
1045   ;;
1046 esac
1048 case "${window_system}" in
1049   "" | "x11" )
1050     ### If the user hasn't specified where we should find X, try
1051     ### letting autoconf figure that out.
1052     if [ -z "${x_includes}" ] && [ -z "${x_libraries}" ]; then
1053       ]
1054       AC_FIND_X
1055       [
1056     fi
1057     if [ -n "${x_includes}" ] || [ -n "${x_libraries}" ]; then
1058       window_system=x11
1059     fi
1060   ;;
1061 esac
1063 [ -z "${window_system}" ] && window_system=none
1065 [ -n "${x_libraries}" ] && LD_SWITCH_X_SITE="-L${x_libraries}"
1066 [ -n "${x_includes}" ] && C_SWITCH_X_SITE="-I${x_includes}"
1068 case "${window_system}" in
1069   x11 )
1070     HAVE_X_WINDOWS=yes
1071     HAVE_X11=yes
1072     echo "  Using X11."
1073   ;;
1074   x10 )
1075     HAVE_X_WINDOWS=yes
1076     HAVE_X11=no
1077     echo "  Using X10."
1078   ;;
1079   none )
1080     HAVE_X_WINDOWS=no
1081     HAVE_X11=no
1082     echo "  Using no window system."
1083   ;;
1084 esac
1086 ### If we're using X11, we should use the X menu package.
1087 HAVE_X_MENU=no
1088 case ${HAVE_X11} in
1089   yes )
1090     HAVE_X_MENU=yes
1091   ;;
1092 esac
1094 #### Extract some information from the operating system and machine files.
1096 echo "Examining the machine- and system-dependent files to find out"
1097 echo " - which libraries the lib-src programs will want, and"
1098 echo " - whether the GNU malloc routines are usable."
1100 ### It's not important that this name contain the PID; you can't run
1101 ### two configures in the same directory and have anything work
1102 ### anyway.
1103 tempcname="conftest.c"
1105 echo '
1106 #include "'${srcdir}'/src/'${opsysfile}'"
1107 #include "'${srcdir}'/src/'${machfile}'"
1108 #ifndef LIBS_MACHINE
1109 #define LIBS_MACHINE
1110 #endif
1111 #ifndef LIBS_SYSTEM
1112 #define LIBS_SYSTEM
1113 #endif
1114 #ifndef C_SWITCH_SYSTEM
1115 #define C_SWITCH_SYSTEM
1116 #endif
1117 @configure@ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM
1118 @configure@ c_switch_system=C_SWITCH_SYSTEM
1120 #ifndef LIB_X11_LIB
1121 #define LIB_X11_LIB -lX11
1122 #endif
1124 #ifndef LIBX11_MACHINE
1125 #define LIBX11_MACHINE
1126 #endif
1128 #ifndef LIBX11_SYSTEM
1129 #define LIBX11_SYSTEM
1130 #endif
1131 @configure@ LIBX=LIB_X11_LIB LIBX11_MACHINE LIBX11_SYSTEM
1133 #ifdef UNEXEC
1134 @configure@ unexec=UNEXEC
1135 #else
1136 @configure@ unexec=unexec.o
1137 #endif
1139 #ifdef SYSTEM_MALLOC
1140 @configure@ system_malloc=yes
1141 #else
1142 @configure@ system_malloc=no
1143 #endif
1145 #ifndef C_DEBUG_SWITCH
1146 #define C_DEBUG_SWITCH -g
1147 #endif
1149 #ifndef C_OPTIMIZE_SWITCH
1150 #define C_OPTIMIZE_SWITCH -O
1151 #endif
1153 #ifdef __GNUC__
1154 @configure@ CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH
1155 #else
1156 @configure@ CFLAGS=C_DEBUG_SWITCH
1157 #endif
1158 ' > ${tempcname}
1159 # The value of CPP is a quoted variable reference, so we need to do this
1160 # to get its actual value...
1161 CPP=`eval "echo $CPP"`
1162 eval `${CPP} -Isrc ${tempcname} \
1163        | grep '@configure@' \
1164        | sed -e 's/^@configure@ \([^=]*=\)\(.*\)$/\1"\2"/'`
1165 rm ${tempcname}
1167 ### Compute the unexec source name from the object name.
1168 UNEXEC_SRC="`echo ${unexec} | sed 's/\.o/.c/'`"
1170 # Do the opsystem or machine files prohibit the use of the GNU malloc?
1171 # Assume not, until told otherwise.
1172 GNU_MALLOC=yes
1173 if [ "${system_malloc}" = "yes" ]; then
1174   GNU_MALLOC=no
1175   GNU_MALLOC_reason="
1176   (The GNU allocators don't work with this system configuration.)"
1179 if [ x"${REL_ALLOC}" = x ]; then
1180   REL_ALLOC=${GNU_MALLOC}
1183 LISP_FLOAT_TYPE=yes
1186 #### Add the libraries to LIBS and check for some functions.
1189 DEFS="$c_switch_system $DEFS"
1190 LIBS="$libsrc_libs"
1192 dnl If found, this defines HAVE_LIBDNET, which m/pmax.h checks,
1193 dnl and also adds -ldnet to LIBS, which Autoconf uses for checks.
1194 AC_HAVE_LIBRARY(-ldnet)
1196 AC_HAVE_LIBRARY(-lXbsd, LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd")
1198 echo checking for XFree86
1199 if test -d /usr/X386/include; then
1200   HAVE_XFREE386=yes
1201   test -z "${C_SWITCH_X_SITE}" && C_SWITCH_X_SITE="-I/usr/X386/include"
1204 if test "${HAVE_X11}" = "yes"; then
1205   DEFS="$C_SWITCH_X_SITE $DEFS"
1206   LIBS="$LD_SWITCH_X_SITE $LIBX $LIBS"
1207   AC_HAVE_FUNCS(XrmSetDatabase XScreenResourceString XScreenNumberOfScreen)
1210 AC_ALLOCA
1212 # logb and frexp are found in -lm on most systems.
1213 AC_HAVE_LIBRARY(-lm)
1214 AC_HAVE_FUNCS(gettimeofday gethostname dup2 rename closedir mkdir rmdir random bcopy logb frexp ftime)
1216 ok_so_far=true
1217 AC_FUNC_CHECK(socket, , ok_so_far=)
1218 if test -n "$ok_so_far"; then
1219   AC_HEADER_CHECK(netinet/in.h, , ok_so_far=)
1221 if test -n "$ok_so_far"; then
1222   AC_HEADER_CHECK(arpa/inet.h, , ok_so_far=)
1224 if test -n "$ok_so_far"; then
1225   AC_DEFINE(HAVE_INET_SOCKETS)
1228 #### Find out which version of Emacs this is.
1229 version=`grep 'defconst[         ]*emacs-version' ${srcdir}/lisp/version.el \
1230          | sed -e 's/^.*"\([0-9][0-9]*\.[0-9][0-9]*\)\..*$/\1/'`
1231 if [ x"${version}" = x ]; then
1232   echo "${progname}: can't find current emacs version in
1233         \`${srcdir}/lisp/version.el'." >&2
1234   exit 1
1237 if [ -f /usr/lpp/X11/bin/smt.exp ]; then
1238   ]
1239   AC_DEFINE(HAVE_AIX_SMT_EXP)
1240   [
1244 #### Specify what sort of things we'll be editing into Makefile and config.h.
1245 ### Use configuration here uncanonicalized to avoid exceeding size limits.
1247 AC_SUBST(configuration)
1248 AC_SUBST(version)
1249 AC_SUBST(srcdir)
1250 AC_SUBST(c_switch_system)
1251 AC_SUBST(libsrc_libs)
1252 AC_SUBST(rip_paths)
1253 AC_SUBST(inst_paths)
1254 AC_SUBST(LD_SWITCH_X_SITE)
1255 AC_SUBST(C_SWITCH_X_SITE)
1256 AC_SUBST(CFLAGS)
1257 AC_SUBST(prefix)
1258 AC_SUBST(exec_prefix)
1260 AC_DEFINE_UNQUOTED(config_machfile,  "\"${machfile}\"")
1261 AC_DEFINE_UNQUOTED(config_opsysfile, "\"${opsysfile}\"")
1262 AC_DEFINE_UNQUOTED(LD_SWITCH_X_SITE, ${LD_SWITCH_X_SITE})
1263 AC_DEFINE_UNQUOTED(C_SWITCH_X_SITE,  ${C_SWITCH_X_SITE})
1264 AC_DEFINE_UNQUOTED(UNEXEC_SRC,       ${UNEXEC_SRC})
1267 if [ "${HAVE_X_WINDOWS}" = "yes" ] ; then
1268   ] AC_DEFINE(HAVE_X_WINDOWS) [
1270 if [ "${HAVE_X11}" = "yes" ] ; then
1271   ] AC_DEFINE(HAVE_X11) [
1273 if [ "${HAVE_XFREE386}" = "yes" ] ; then
1274   ] AC_DEFINE(HAVE_XFREE386) [
1276 if [ "${HAVE_X_MENU}" = "yes" ] ; then
1277   ] AC_DEFINE(HAVE_X_MENU) [
1279 if [ "${GNU_MALLOC}" = "yes" ] ; then
1280   ] AC_DEFINE(GNU_MALLOC) [
1282 if [ "${REL_ALLOC}" = "yes" ] ; then
1283   ] AC_DEFINE(REL_ALLOC) [
1285 if [ "${LISP_FLOAT_TYPE}" = "yes" ] ; then
1286   ] AC_DEFINE(LISP_FLOAT_TYPE) [
1290 #### Report on what we decided to do.
1291 echo "
1293 Configured for \`${canonical}'.
1295   Where should the build process find the source code?    ${srcdir}
1296   What operating system and machine description files should Emacs use?
1297         \`${opsysfile}' and \`${machfile}'
1298   What compiler should emacs be built with?               ${CC} ${CFLAGS}
1299   Should Emacs use the GNU version of malloc?             ${GNU_MALLOC}${GNU_MALLOC_reason}
1300   Should Emacs use the relocating allocator for buffers?  ${REL_ALLOC}
1301   What window system should Emacs use?                    ${window_system}${x_includes+
1302   Where do we find X Windows header files?                }${x_includes}${x_libraries+
1303   Where do we find X Windows libraries?                   }${x_libraries}
1307 # Remove any trailing slashes in these variables.
1308 test -n "${prefix}" &&
1309   prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
1310 test -n "${exec_prefix}" &&
1311   exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
1313 AC_OUTPUT(Makefile ${extra_output})