Fix library headers.
[emacs.git] / configure1.in
blob3661ff75b218964d5ae1b2ca2e8dc1633dc35edd
2 ### The above line is deliberately left blank.  If it starts with a #,
3 ### some CSH's will think this is a csh script.
5 #### Configuration script for GNU Emacs
6 #### Copyright (C) 1992 Free Software Foundation, Inc.
8 ### This file is part of GNU Emacs.
10 ### GNU Emacs is free software; you can redistribute it and/or modify
11 ### it under the terms of the GNU General Public License as published by
12 ### the Free Software Foundation; either version 1, or (at your option)
13 ### any later version.
15 ### GNU Emacs is distributed in the hope that it will be useful,
16 ### but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 ### GNU General Public License for more details.
20 ### You should have received a copy of the GNU General Public License
21 ### along with GNU Emacs; see the file COPYING.  If not, write to
22 ### the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
24 ### Shell script to edit files and make symlinks in preparation for
25 ### compiling Emacs.
26 ###
27 ### Usage: configure config_name
28 ###
29 ### If configure succeeds, it leaves its status in config.status.
30 ### If configure fails after disturbing the status quo,
31 ###     config.status is removed.
34 ### Remove any more than one leading "." element from the path name.
35 ### If we don't remove them, then another "./" will be prepended to
36 ### the file name each time we use config.status, and the program name
37 ### will get larger and larger.  This wouldn't be a problem, except
38 ### that since progname gets recorded in all the Makefiles this script
39 ### produces, move-if-change thinks they're different when they're
40 ### not.
41 ###
42 ### It would be nice if we could put the ./ in a \( \) group and then
43 ### apply the * operator to that, so we remove as many leading ./././'s
44 ### as are present, but some seds (like Ultrix's sed) don't allow you to
45 ### apply * to a \( \) group.  Bleah.
46 progname="`echo $0 | sed 's:^\./\./:\./:'`"
49 #### Usage messages.
51 short_usage="Type \`${progname} --usage' for more information about options."
53 long_usage="Usage: ${progname} CONFIGURATION [-OPTION[=VALUE] ...]
55 Set compilation and installation parameters for GNU Emacs, and report.
56 CONFIGURATION specifies the machine and operating system to build for.
57 For example:
58         ${progname} sparc-sun-sunos4.1
59 configures Emacs to build on a Sun Sparc machine running SunOS 4.1, and 
60         ${progname} decstation
61 configures Emacs to run on a DECstation running Ultrix.  See \`etc/MACHINES'.
63 The --with-x, --with-x11 and --with-x10 options specify what window
64         system to use; if all are omitted, use X11 if present.  If you
65         don't want X, specify \`--with-x=no'.
67 The --x-includes=DIR option tells the build process where to search for
68         the X Windows header files.  If this option is omitted, the
69         build process assumes they exist in a directory the compiler
70         checks by default.
72 The --x-libraries=DIR option tells the build process where to look for
73         the X windows libraries.  If this option is omitted, the build
74         process assumes they are in a directory the compiler checks by
75         default.
77 The --with-gcc option says that the build process should use GCC to
78         compile Emacs.  If you have GCC but don't want to use it,
79         specify \`--with-gcc=no'.  \`configure' tries to guess whether
80         or not you have GCC by searching your executable path, but if
81         it guesses incorrectly, you may need to use this.
83 The --srcdir=DIR option specifies that the configuration and build
84         processes should look for the Emacs source code in DIR, when
85         DIR is not the current directory.  This option doesn't work yet.
87 If successful, ${progname} leaves its status in config.status.  If
88 unsuccessful after disturbing the status quo, it removes config.status."
91 #### Option processing.
93 ### These are the names of CPP symbols we want to define or leave undefined
94 ### in src/config.h; their values are given by the shell variables of the same
95 ### names.
96 config_h_opts=" \
97 HAVE_X_WINDOWS HAVE_X11 HAVE_X_MENU \
98 SIGTYPE GNU_MALLOC REL_ALLOC LISP_FLOAT_TYPE HAVE_CONST\
99 LD_SWITCH_X_SITE C_SWITCH_X_SITE HAVE_XFREE386"
101 ### Record all the arguments, so we can save them in config.status.
102 arguments="$@"
104 while [ $# != 0 ]; do
105   arg="$1"
106   case "${arg}" in
108     ## Anything starting with a hyphen we assume is an option.
109     -* )
111       ## Separate the switch name from the value it's being given.
112       case "${arg}" in
113         -*=*)
114           opt=`echo ${arg} | sed 's:^-*\([^=]*\)=.*$:\1:'`
115           val=`echo ${arg} | sed 's:^-*[^=]*=\(.*\)$:\1:'`
116           valomitted=no
117         ;;
118         -*)
119           ## If FOO is a boolean argument, --FOO is equivalent to
120           ## --FOO=yes.  Otherwise, the value comes from the next
121           ## argument - see below.
122           opt=`echo ${arg} | sed 's:^-*\(.*\)$:\1:'`
123           val="yes"
124           valomitted=yes
125         ;;
126       esac
128       ## Change `-' in the option name to `_'.
129       opt="`echo ${opt} | tr - _`"
131       ## Process the option.
132       case "${opt}" in
134         ## Has the user specified which window systems they want to support?
135         "with_x" | "with_x11" | "with_x10" )
136           ## Make sure the value given was either "yes" or "no".
137           case "${val}" in
138             y | ye | yes )      val=yes ;;
139             n | no )            val=no  ;;
140             * )
141               (echo "${progname}: the \`--${opt}' option is supposed to have a boolean value.
142 Set it to either \`yes' or \`no'."
143                echo "${short_usage}") >&2
144               exit 1
145             ;;
146           esac
147           eval "${opt}=\"${val}\""
148         ;;
150         ## Has the user specified whether or not they want GCC?
151         "with_gcc" )
152           ## Make sure the value given was either "yes" or "no".
153           case "${val}" in
154             y | ye | yes )      val=yes ;;
155             n | no )            val=no  ;;
156             * )
157               (echo "${progname}: the \`--${opt}' option is supposed to have a boolean value.
158 Set it to either \`yes' or \`no'."
159                echo "${short_usage}") >&2
160               exit 1
161             ;;
162           esac
163           eval "${opt}=\"${val}\""
164         ;;
166         ## Has the user specified a source directory?
167         "srcdir" )
168           ## If the value was omitted, get it from the next argument.
169           if [ "${valomitted}" = "yes" ]; then
170             ## Get the next argument from the argument list, if there is one.
171             if [ $# = 1 ]; then
172               (echo "${progname}: You must give a value for the \`--${opt}' option, as in
173     \`--${opt}=FOO'."
174                echo "${short_usage}") >&2
175               exit 1
176             fi
177             shift; val="$1"
178           fi
179           srcdir="${val}"
181           echo "${progname}: Beware - the \`--srcdir' option doesn't work yet." >&2
182         ;;
184         ## Has the user tried to tell us where the X files are?
185         ## I think these are dopey, but no less than three alpha
186         ## testers, at large sites, have said they have their X files
187         ## installed in odd places.
188         "x-includes" )
189           ## If the value was omitted, get it from the next argument.
190           if [ "${valomitted}" = "yes" ]; then
191             ## Get the next argument from the argument list, if there is one.
192             if [ $# = 1 ]; then
193               (echo "${progname}: You must give a value for the \`--${opt}' option, as in
194     \`--${opt}=FOO'."
195                echo "${short_usage}") >&2
196               exit 1
197             fi
198             shift; val="$1"
199           fi
200           x_includes="${val}"
201           C_SWITCH_X_SITE="-I${x_includes}"
202         ;;
203         "x-libraries" )
204           ## If the value was omitted, get it from the next argument.
205           if [ "${valomitted}" = "yes" ]; then
206             ## Get the next argument from the argument list, if there is one.
207             if [ $# = 1 ]; then
208               (echo "${progname}: You must give a value for the \`--${opt}' option, as in
209     \`--${opt}=FOO'."
210                echo "${short_usage}") >&2
211               exit 1
212             fi
213             shift; val="$1"
214           fi
215           x_libraries="${val}"
216           LD_SWITCH_X_SITE="-L${x_libraries}"
217         ;;
219         ## Has the user asked for some help?
220         "usage" | "help" )
221           echo "${long_usage}" | more
222           exit
223         ;;
225         ## We ignore all other options silently.
226       esac
227     ;;
229     ## Anything not starting with a hyphen we assume is a
230     ## configuration name.
231     *)
232       configuration=${arg}
233     ;;
235   esac
236   shift
237 done
239 if [ "${configuration}" = "" ]; then
240   (echo "${progname}: You must specify a configuration name as an argument."
241    echo "${short_usage}") >&2
242   exit 1
246 #### Decide where the source is.
247 case "${srcdir}" in
249   ## If it's not specified, see if  `.' or `..' might work.
250   "" )
251     if [ -f "./src/lisp.h" -a -f "./lisp/version.el" ]; then
252       srcdir=`pwd`
253     else
254       if [ -f "../src/lisp.h" -a -f "../lisp/version.el" ]; then
255         srcdir=`(cd .. ; pwd)`
256       else
257         (echo "\
258 ${progname}: Neither the current directory nor its parent seem to
259 contain the Emacs sources.  If you do not want to build Emacs in its
260 source tree, you should run \`${progname}' in the directory in which
261 you wish to build Emacs, using its \`--srcdir' option to say where the
262 sources may be found."
263          echo "${short_usage}") >&2
264         exit 1
265       fi
266     fi
267   ;;
269   ## Otherwise, check if the directory they specified is okay.
270   * )
271     if [ ! -d "${srcdir}" -o ! -f "${srcdir}/src/lisp.h" -o ! -f "${srcdir}/lisp/version.el" ]; then
272       (echo "\
273 ${progname}: The directory specified with the \`--srcdir' option,
274 \`${srcdir}', doesn't seem to contain the Emacs sources.  You should
275 either run the \`${progname}' script at the top of the Emacs source
276 tree, or use the \`--srcdir' option to specify where the Emacs sources
277 are."
278        echo "${short_usage}") >&2
279       exit 1
280     fi
281   ;;
283 esac
285 ### Make the necessary directories, if they don't exist.
286 if [ ! -d ./src ]; then
287   mkdir ./src
289 if [ ! -d ./lib-src ]; then
290   mkdir ./lib-src
292 if [ ! -d ./cpp ]; then
293   mkdir ./cpp
295 if [ ! -d ./oldXMenu ]; then
296   mkdir ./oldXMenu
300 #### Given the configuration name, set machfile and opsysfile to the
301 #### names of the m/*.h and s/*.h files we should use.
303 ### Canonicalize the configuration name.
304 echo "Checking the configuration name."
305 if configuration=`${srcdir}/config.sub "${configuration}"` ; then : ; else
306   exit $?
309 ### If you add support for a new configuration, add code to this
310 ### switch statement to recognize your configuration name and select
311 ### the appropriate operating system and machine description files.
313 ### You would hope that you could choose an m/*.h file pretty much
314 ### based on the machine portion of the configuration name, and an s-
315 ### file based on the operating system portion.  However, it turns out
316 ### that each m/*.h file is pretty manufacturer-specific - for
317 ### example, apollo.h, hp9000s300.h, mega68k, news.h, and tad68k are
318 ### all 68000 machines; mips.h, pmax.h, and news-risc are all MIPS
319 ### machines.  So we basically have to have a special case for each
320 ### configuration name.
322 ### As far as handling version numbers on operating systems is
323 ### concerned, make sure things will fail in a fixable way.  If
324 ### /etc/MACHINES doesn't say anything about version numbers, be
325 ### prepared to handle anything reasonably.  If version numbers
326 ### matter, be sure /etc/MACHINES says something about it.
328 ### Eric Raymond says we should accept strings like "sysvr4" to mean
329 ### "System V Release 4"; he writes, "The old convention encouraged
330 ### confusion between `system' and `release' levels'."
332 machine='' opsys='' unported='false'
333 case "${configuration}" in
335   ## Alliant machines
336   ## Strictly speaking, we need the version of the alliant operating
337   ## system to choose the right machine file, but currently the
338   ## configuration name doesn't tell us enough to choose the right
339   ## one; we need to give alliants their own operating system name to
340   ## do this right.  When someone cares, they can help us.
341   fx80-alliant-* )
342     machine=alliant4 opsys=bsd4-2
343   ;;
344   i860-alliant-* )
345     machine=alliant-2800 opsys=bsd4-3
346   ;;
348   ## Altos 3068
349   m68*-altos-sysv* )
350     machine=altos opsys=usg5-2
351   ;;
352     
353   ## Amdahl UTS
354   580-amdahl-sysv* )
355     machine=amdahl opsys=usg5-2-2
356   ;;
358   ## Appallings - I mean, Apollos - running Domain
359   m68*-apollo* )
360     machine=apollo opsysfile=bsd4-2.h
361   ;;
363   ## AT&T 3b2, 3b5, 3b15, 3b20
364   we32k-att-sysv* )
365     machine=att3b opsys=usg5-2-2
366   ;;
368   ## AT&T 3b1 - The Mighty Unix PC!
369   m68*-att-sysv* )
370     machine=7300 opsys=usg5-2-2
371   ;;
373   ## Bull sps7
374   m68*-bull-sysv* )
375     machine=sps7 opsys=usg5-2
376   ;;
378   ## CCI 5/32, 6/32 -- see "Tahoe".
380   ## Celerity
381   ## I don't know what configuration name to use for this; config.sub
382   ## doesn't seem to know anything about it.  Hey, Celerity users, get
383   ## in touch with us!
384   celerity-celerity-bsd* )
385     machine=celerity opsys=bsd4-2
386   ;;
388   ## Clipper
389   ## What operating systems does this chip run that Emacs has been
390   ## tested on?
391   clipper-* )
392     machine=clipper
393     ## We'll use the catch-all code at the bottom to guess the
394     ## operating system.
395   ;;
397   ## Convex
398   *-convex-bsd* )
399     machine=convex opsys=bsd4-3
400   ;;
402   ## Cubix QBx/386
403   i386-cubix-sysv* )
404     machine=intel386 opsys=usg5-3
405   ;;
407   ## Cydra 5
408   cydra*-cydrome-sysv* )
409     machine=cydra5 opsys=usg5-3
410   ;;
412   ## DECstations
413   mips-dec-ultrix[0-3].* | mips-dec-ultrix4.0 | mips-dec-bsd4.2 )
414     machine=pmax opsys=bsd4-2
415   ;;
416   mips-dec-ultrix* | mips-dec-bsd* )
417     machine=pmax opsys=bsd4-3
418   ;;
419   mips-dec-osf* )
420     machine=pmax opsys=osf1
421   ;;
423   ## Motorola Delta machines
424   m68*-motorola-sysv* )
425     machine=delta opsys=usg5-3
426   ;;
427   m88k-motorola-sysv* | m88k-motorola-m88kbcs* )
428     machine=delta88k opsys=usg5-3
429   ;;
431   ## Dual machines
432   m68*-dual-sysv* )
433     machine=dual opsys=usg5-2
434   ;;
435   m68*-dual-uniplus* )
436     machine=dual opsys=unipl5-2
437   ;;
439   ## Elxsi 6400
440   elxsi-elxsi-sysv* )
441     machine=elxsi opsys=usg5-2
442   ;;
444   ## Encore machines
445   ns16k-encore-bsd* )
446     machine=ns16000 opsys=umax
447   ;;
449   ## The GEC 93 - apparently, this port isn't really finished yet.
451   ## Gould Power Node and NP1
452   pn-gould-bsd4.2 )
453     machine=gould opsys=bsd4-2
454   ;;
455   pn-gould-bsd4.3 )
456     machine=gould opsys=bsd4-3
457   ;;
458   np1-gould-bsd* )
459     machine=gould-np1 opsys=bsd4-3
460   ;;
462   ## Honeywell XPS100
463   xps*-honeywell-sysv* )
464     machine=xps100 opsys=usg5-2
465   ;;
467   ## HP 9000 series 200 or 300
468   m68*-hp-bsd* )
469     machine=hp9000s300 opsys=bsd4-3
470   ;;
471   ## HP/UX 8 doesn't run on these machines, so use HP/UX 7.
472   m68*-hp-hpux* )
473     machine=hp9000s300 opsys=hpux
474   ;;
476   ## HP 9000 series 800, running HP/UX
477   hppa1.0-hp-hpux* )
478     machine=hp9000s800 opsys=hpux
479   ;;
481   ## Orion machines
482   orion-orion-bsd* )
483     machine=orion opsys=bsd4-2
484   ;;
485   clipper-orion-bsd* )
486     machine=orion105 opsys=bsd4-2
487   ;;
489   ## IBM machines
490   i386-ibm-aix1.1 )
491     machine=ibmps2-aix opsys=usg5-2-2
492   ;;
493   i386-ibm-aix1.2 )
494     machine=ibmps2-aix opsys=usg5-3
495   ;;
496   rs6000-ibm-aix3.1 )
497     machine=ibmrs6000 opsys=aix3-1
498   ;;
499   rs6000-ibm-aix3.2 | rs6000-ibm-aix* )
500     machine=ibmrs6000 opsys=aix3-2
501   ;;
502   romp-ibm-bsd* )
503     machine=ibmrt opsys=bsd4-2
504   ;;
505   romp-ibm-aix* )
506     machine=ibmrt-aix opsys=usg5-2-2
507   ;;
509   ## Integrated Solutions `Optimum V'
510   m68*-isi-bsd4.2 )
511     machine=isi-ov opsys=bsd4-2
512   ;;
513   m68*-isi-bsd4.3 )
514     machine=isi-ov opsys=bsd4-3
515   ;;
517   ## Intel 386 machines where we do care about the manufacturer
518   i[34]86-intsys-sysv* )
519     machine=is386 opsys=usg5-2-2
520   ;;
521   ## Intel 386 machines where we don't care about the manufacturer
522   i[34]86-* )
523     machine=intel386
524     case "${configuration}" in
525       *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
526       *-isc2.2 )                opsys=isc2-2 ;;
527       *-isc* )                  opsys=isc3-0 ;;
528       *-esix* )                 opsys=esix ;;
529       *-xenix* )                opsys=xenix ;;
530       ## Otherwise, we'll fall through to the generic opsys code at the bottom.
531     esac
532   ;;
534   ## Silicon Graphics machines
535   ## Iris 2500 and Iris 2500 Turbo (aka the Iris 3030)
536   m68*-sgi-iris3.5 )
537     machine=irist opsys=iris3-5
538   ;;
539   m68*-sgi-iris3.6 | m68*-sgi-iris*)
540     machine=irist opsys=iris3-6
541   ;;
542   ## Iris 4D
543   mips-sgi-irix3.* )
544     machine=iris4d opsys=irix3-3
545   ;;
546   mips-sgi-irix4.* | mips-sgi-irix* )
547     machine=iris4d opsys=irix4-0
548   ;;
550   ## Masscomp machines
551   m68*-masscomp-rtu )
552     machine=masscomp opsys=rtu
553   ;;
555   ## Megatest machines
556   m68*-megatest-bsd* )
557     machine=mega68 opsys=bsd4-2
558   ;;
560   ## Workstations sold by MIPS
561   ## This is not necessarily all workstations using the MIPS processor -
562   ## Irises are produced by SGI, and DECstations by DEC.
564   ## etc/MACHINES lists mips.h and mips4.h as possible machine files,
565   ## and usg5-2-2 and bsd4-3 as possible OS files.  The only guidance
566   ## it gives for choosing between the alternatives seems to be "Use
567   ## -machine=mips4 for RISCOS version 4; use -opsystem=bsd4-3 with
568   ## the BSD world."  I'll assume that these are instructions for
569   ## handling two odd situations, and that every other situation
570   ## should use mips.h and usg5-2-2, they being listed first.
571   mips-mips-riscos4* )
572     machine=mips4 opsys=usg5-2-2
573   ;;
574   mips-mips-bsd* )
575     machine=mips opsys=bsd4-3
576   ;;
577   mips-mips-* )
578     machine=mips opsys=usg5-2-2
579   ;;
581   ## The complete machine from National Semiconductor
582   ns32k-ns-genix* )
583     machine=ns32000 opsys=usg5-2
584   ;;
586   ## NCR machines
587   m68*-ncr-sysv2* | m68*-ncr-sysvr2* )
588     machine=tower32 opsys=usg5-2-2
589   ;;
590   m68*-ncr-sysv3* | m68*-ncr-sysvr3* )
591     machine=tower32v3 opsys=usg5-3
592   ;;
594   ## Nixdorf Targon 31
595   m68*-nixdorf-sysv* )
596     machine=targon31 opsys=usg5-2-2
597   ;;
599   ## Nu (TI or LMI)
600   m68*-nu-sysv* )
601     machine=nu opsys=usg5-2
602   ;;
604   ## Plexus
605   m68*-plexus-sysv* )
606     machine=plexus opsys=usg5-2
607   ;;
609   ## Prime EXL
610   i386-prime-sysv* )
611     machine=i386 opsys=usg5-3
612   ;;
614   ## Pyramid machines
615   ## I don't really have any idea what sort of processor the Pyramid has,
616   ## so I'm assuming it is its own architecture.
617   pyramid-pyramid-bsd* )
618     machine=pyramid opsys=bsd4-2
619   ;;
621   ## Sequent Balance
622   ns32k-sequent-bsd4.2 )
623     machine=sequent opsys=bsd4-2
624   ;;
625   ns32k-sequent-bsd4.3 )
626     machine=sequent opsys=bsd4-3
627   ;;
628   ## Sequent Symmetry
629   i386-sequent-bsd* )
630     machine=symmetry opsys=bsd4-3
631   ;;
633   ## SONY machines
634   m68*-sony-bsd4.2 )
635     machine=news opsys=bsd4-2
636   ;;
637   m68*-sony-bsd4.3 )
638     machine=news opsys=bsd4-3
639   ;;
640   mips-sony-bsd* )
641     machine=news-risc opsys=bsd4-3
642   ;;
644   ## Stride
645   m68*-stride-sysv* )
646     machine=stride opsys=usg5-2
647   ;;
649   ## Suns
650   *-sun-sunos* | *-sun-bsd* )
651     case "${configuration}" in
652       m68*-sunos1* )    machine=sun1 ;;
653       m68*-sunos2* )    machine=sun2 ;;
654       m68* )            machine=sun3 ;;
655       i[34]86* )        machine=sun386 ;;
656       sparc* )          machine=sparc ;;
657       * )               unported=true ;;
658     esac
659     case "${configuration}" in
660       *-sunos4.0*         ) opsys=sunos4-0 ;;
661       *-sunos4* | *-sunos ) opsys=sunos4-1 ;;
662       *                   ) opsys=bsd4-2   ;;
663     esac
664   ;;
666   ## Tadpole 68k
667   m68*-tadpole-sysv* )
668     machine=tad68k opsys=usg5-3
669   ;;
671   ## Tahoe machines
672   tahoe-tahoe-bsd4.2 )
673     machine=tahoe opsys=bsd4-2
674   ;;
675   tahoe-tahoe-bsd4.3 )
676     machine=tahoe opsys=bsd4-3
677   ;;
679   ## Tandem Integrity S2
680   mips-tandem-sysv* )
681     machine=tandem-s2 opsys=usg5-3
682   ;;
684   ## Tektronix 16000 box (6130?)
685   ns16k-tektronix-bsd* )
686     machine=ns16000 opsys=bsd4-2
687   ;;
688   ## Tektronix 4300
689   ## src/m/tek4300.h hints that this is a m68k machine.
690   m68*-tektronix-bsd* )
691     machine=tex4300 opsys=bsd4-3
692   ;;
694   ## Titan P2 or P3
695   ## We seem to have lost the machine-description file titan.h!
696   titan-titan-sysv* )
697     machine=titan opsys=usg5-3
698   ;;
699   
700   ## Ustation E30 (SS5E)
701   m68*-unisys-uniplus* )
702     machine=ustation opsystem=unipl5-2
703   ;;
705   ## Vaxen.
706   vax-dec-* )
707     machine=vax
708     case "${configuration}" in
709       *-bsd4.1 )                                        opsys=bsd4-1 ;;
710       *-bsd4.2 | *-ultrix[0-3].* | *-ultrix4.0 )        opsys=bsd4-2 ;;
711       *-bsd4.3 | *-ultrix* )                            opsys=bsd4-3 ;;
712       *-sysv[01]* | *-sysvr[01]* )                      opsys=usg5-0 ;;
713       *-sysv2* | *-sysvr2* )                            opsys=usg5-2 ;;
714       *-vms* )                                          opsys=vms ;;
715       * )                                               unported=true
716     esac
717   ;;
719   ## Whitechapel MG1
720   ns16k-whitechapel-* )
721     machine=mg1
722     ## We don't know what sort of OS runs on these; we'll let the
723     ## operating system guessing code below try.
724   ;;
726   ## Wicat
727   m68*-wicat-sysv* )
728     machine=wicat opsys=usg5-2
729   ;;
731   * )
732     unported=true
733   ;;
734 esac
736 ### If the code above didn't choose an operating system, just choose
737 ### an operating system based on the configuration name.  You really
738 ### only want to use this when you have no idea what the right
739 ### operating system is; if you know what operating systems a machine
740 ### runs, it's cleaner to make it explicit in the case statement
741 ### above.
742 if [ ! "${opsys}" ]; then
743   case "${configuration}" in
744     *-bsd4.[01] )       opsys=bsd4-1 ;;
745     *-bsd4.2 )          opsys=bsd4-2 ;;
746     *-bsd4.3 )          opsys=bsd4-3 ;;
747     *-sysv0 | *-sysvr0 )                opsys=usg5-0 ;;
748     *-sysv2 | *-sysvr2 )                opsys=usg5-2 ;;
749     *-sysv2.2 | *-sysvr2.2 )            opsys=usg5-2-2 ;;
750     *-sysv3 | *-sysvr3 )                opsys=usg5-3 ;;
751     *-sysv4 | *-sysvr4 )                opsys=usg5-4 ;;
752     * )
753       unported=true
754     ;;
755   esac
758 if $unported ; then
759   (echo "${progname}: Emacs hasn't been ported to \`${configuration}' systems."
760    echo "${progname}: Check \`etc/MACHINES' for recognized configuration names."
761   ) >&2
762   exit 1
765 machfile="m/${machine}.h"
766 opsysfile="s/${opsys}.h"
769 #### Choose a window system.
770 echo "Checking window system."
771 window_system=''
772 case "${with_x}" in
773   yes )
774     window_system=${window_system}x11
775   ;;
776   no )
777     window_system=${window_system}none
778 esac
779 case "${with_x11}" in
780   yes )
781     window_system=${window_system}x11
782   ;;
783 esac
784 case "${with_x10}" in
785   yes )
786     window_system=${window_system}x10
787   ;;
788 esac
790 case "${window_system}" in
791   "none" | "x11" | "x10" ) ;;
792   "" )
793     echo "  No window system specifed.  Looking for X Windows."
794     window_system=none
795     if [ -r /usr/lib/libX11.a \
796          -o -d /usr/include/X11 \
797          -o -d /usr/X386/include]; then
798       window_system=x11
799     fi
800   ;;
801   * )
802     echo "Don\'t specify the window system more than once." >&2
803     exit 1
804   ;;
805 esac
807 case "${window_system}" in
808   x11 )
809     HAVE_X_WINDOWS=yes
810     HAVE_X11=yes
811     echo "  Using X11."
812   ;;
813   x10 )
814     HAVE_X_WINDOWS=yes
815     HAVE_X11=no
816     echo "  Using X10."
817   ;;
818   none )
819     HAVE_X_WINDOWS=no
820     HAVE_X11=no
821     echo "  Using no window system."
822   ;;
823 esac
825 ### If we're using X11, we should use the X menu package.
826 HAVE_X_MENU=no
827 case ${HAVE_X11} in
828   yes )
829     HAVE_X_MENU=yes
830   ;;
831 esac
833 ### Check for XFree386.  It needs special hacks.
834 case ${window_system} in
835   x11 )
836     if [ -d /usr/X386/include ]; then
837       HAVE_XFREE386=yes
838       if [ "${C_SWITCH_X_SITE}" = "" ]; then
839         C_SWITCH_X_SITE="-I/usr/X386/include
840       fi
841     fi
842   ;;
843 esac
845 #### Choose a compiler.
846 echo "Checking compilers."
847 if [ "${with_gcc}" = "" ]; then
848   echo "  Searching load path for GCC."
849   temppath=`echo $PATH | sed 's/^:/.:/
850                               s/::/:.:/g
851                               s/:$/:./
852                               s/:/ /g'`
853   default_cc=`(
854     for dir in ${temppath}; do
855       if [ -f ${dir}/gcc ]; then echo gcc; exit 0; fi
856     done
857     echo cc
858   )`
859 else
860   case ${with_gcc} in
861     "yes" ) default_cc="gcc" ;;
862     "no"  ) default_cc="cc"  ;;
863   esac
866 case "${default_cc}" in
867   "gcc" )
868     echo "  Using GCC."
869     default_cflags='-g -O'
870   ;;
871   * )
872     echo "  Using the system's CC."
873     default_cflags='-g'
874   ;;
875 esac
878 #### Does this compiler support the `const' keyword?
879 #### The code for this test was adapted from autoconf's test.
880 echo "Checking if the compiler supports \`const'."
881 rm -f conftest*
882 compile='${default_cc} conftest.c -o conftest >/dev/null 2>&1'
883 echo "
884 main() { exit(0); } t() { /* Ultrix mips cc rejects this.  */
885 typedef int charset[2]; const charset x;
886 /* SunOS 4.1.1 cc rejects this. */
887 char const *const *p;
888 char **p2;
889 /* HPUX 7.0 cc rejects these. */
890 ++p;
891 p2 = (char const* const*) p;
892  }" > conftest.c
893 if eval $compile; then
894   echo "  It seems to."
895   HAVE_CONST=yes
896 else
897   echo "  It doesn't seem to."
898   HAVE_CONST=no
900 rm -f conftest*
902 #### What is the return type of a signal handler?
904 ### We run /usr/include/signal.h through cpp and grep for the
905 ### declaration of the signal function.  Yuck.
906 echo "Looking for return type of signal handler functions."
907 signal_h_file=''
908 if [ -r /usr/include/signal.h ]; then
909   signal_h_file=/usr/include/signal.h
910 elif [ -r /usr/include/sys/signal.h ]; then
911   signal_h_file=/usr/include/sys/signal.h
913 SIGTYPE=void
914 if [ "${signal_h_file}" ]; then
915   sigpattern='[         ]*([    ]*\*[   ]*signal[       ]*('
917   ## We make a copy whose name ends in .c, so the compiler
918   ## won't complain about having only been given a .h file.
919   tempcname="configure.tmp.$$.c"
920   cp ${signal_h_file}  ${tempcname}
921   if ${default_cc} -E ${tempcname} | grep "int${sigpattern}" > /dev/null; then
922     SIGTYPE=int
923   fi
924   rm -f ${tempcname}
926 echo "  Guessing that signals return \`${SIGTYPE}'."
929 #### Extract some information from the operating system and machine files.
931 echo "Examining the machine- and system-dependent files to find out"
932 echo " - which libraries the lib-src programs will want, and"
933 echo " - whether the GNU malloc routines are usable."
934 tempcname="configure.tmp.$$.c"
935 echo '
936 #include "'${srcdir}'/src/'${opsysfile}'"
937 #include "'${srcdir}'/src/'${machfile}'"
938 #ifndef LIBS_MACHINE
939 #define LIBS_MACHINE
940 #endif
941 #ifndef LIBS_SYSTEM
942 #define LIBS_SYSTEM
943 #endif
944 @configure@ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM
945 #ifdef SYSTEM_MALLOC
946 @configure@ system_malloc=yes
947 #else
948 @configure@ system_malloc=no
949 #endif
950 ' > ${tempcname}
951 eval `${default_cc} -E ${tempcname} \
952        | grep '@configure@' \
953        | sed -e 's/^@configure@ \([^=]*=\)\(.*\)$/\1"\2"/'`
954 rm ${tempcname}
956 # Do the opsystem or machine files prohibit the use of the GNU malloc?
957 # Assume not, until told otherwise.
958 GNU_MALLOC=yes
959 if [ "${system_malloc}" = "yes" ]; then
960   GNU_MALLOC=no
961   GNU_MALLOC_reason="
962   (The GNU allocators don't work with this system configuration.)"
965 if [ ! "${REL_ALLOC}" ]; then
966   REL_ALLOC=${GNU_MALLOC}
969 LISP_FLOAT_TYPE=yes
972 #### Find out which version of Emacs this is.
973 version=`grep 'defconst[         ]*emacs-version' ${srcdir}/lisp/version.el \
974          | sed -e 's/^.*"\([0-9][0-9]*\.[0-9][0-9]*\)\..*$/\1/'`
975 if [ ! "${version}" ]; then
976   echo "${progname}: can't find current emacs version in
977         \`${srcdir}/lisp/version.el'." >&2
978   exit 1
982 #### Make the proper settings in `src/config.h'.
983 rm -f config.status
984 set -e
986 echo "Making \`./src/config.h' from \`${srcdir}/src/config.h.in'."
987 sed_flags="-e 's:@machine@:${machfile}:' -e 's:@opsystem@:${opsysfile}:'"
989 for flag in ${config_h_opts}; do
990   val=`eval echo '$'${flag}`
991   case ${val} in
992     no | "")
993       f="-e 's:.*#define ${flag}.*:/\\* #define ${flag} \\*/:'"
994     ;;
995     yes)
996       f="-e 's:.*#define ${flag}.*:#define ${flag}:'"
997     ;;
998     *)
999       f="-e 's:.*#define ${flag}.*:#define ${flag} ${val}:'"
1000     ;;
1001   esac
1002   sed_flags="${sed_flags} ${f}"
1003 done
1005 rm -f ./src/config.h.tmp
1006 (echo "/* This file is generated by \`${progname}' from"
1007  echo "   \`${srcdir}/src/config.h.in'."
1008  echo "   If you are thinking about editing it, you should seriously consider"
1009  echo "   running \`${progname} instead, or editing"
1010  echo "   \`${srcdir}/src/config.h.in' itself." 
1011  eval '/bin/sed '${sed_flags}' < "${srcdir}/src/config.h.in"'
1012 ) > src/config.h.tmp
1013 ${srcdir}/move-if-change src/config.h.tmp src/config.h
1014 ### Remind people not to edit this.
1015 chmod -w src/config.h
1018 #### Modify the parameters in the top-level Makefile.
1019 echo "Producing \`Makefile' from \`${srcdir}/Makefile.in'."
1020 rm -f Makefile.tmp
1021 (echo "\
1022 # This file is generated by \`${progname}' from
1023 # \`${srcdir}/Makefile.in'.
1024 # If you are thinking about editing it, you should seriously consider
1025 # running \`${progname}' instead, or editing
1026 # \`${srcdir}/Makefile.in' itself."
1027  /bin/sed < ${srcdir}/Makefile.in                               \
1028  -e 's|^configname *=.*$|configname='"${configuration}"'|'      \
1029  -e 's|^version *=.*$|version='"${version}"'|'          \
1030  -e 's|^srcdir *=.*$|srcdir='"${srcdir}"'|'                     \
1031  -e 's|^CC *=.*$|CC='"${default_cc}"'|'                 \
1032  -e 's|^CONFIG_CFLAGS *=.*$|CONFIG_CFLAGS='"${default_cflags}"'|'       \
1033  -e 's|^LOADLIBES *=.*$|LOADLIBES='"${libsrc_libs}"'|'  \
1034  -e '/^# DIST: /d') > Makefile.tmp
1035 ${srcdir}/move-if-change Makefile.tmp Makefile
1037 ### I'm commenting out this section until I bring the `build-install' script
1038 ### into line with the rest of the configuration stuff.
1040 ### # Modify the parameters in the `build-install' script.
1041 ### echo "Producing \`./build-install' from \`${srcdir}/build-install.in'."
1042 ### rm -f ./build-install.tmp
1043 ### (echo "\
1044 ### # This file is generated by \`${progname}' from \`${srcdir}/build-install.in'.
1045 ### # If you are thinking about editing it, you should seriously consider
1046 ### # editing \`./build-install.in' itself, or running \`${progname}' instead."
1047 ###  /bin/sed < ${srcdir}/build-install.in                      \
1048 ###  -e 's;^\(prefix=\).*$;\1'"${prefix};"                      \
1049 ###  -e 's;^\(bindir=\).*$;\1'"${bindir};"                      \
1050 ###  -e 's;^\(lisppath=\).*$;\1'"${lisppath};"          \
1051 ###  -e 's;^\(datadir=\).*$;\1'"${datadir};"            \
1052 ###  -e 's;^\(lockdir=\).*$;\1'"${lockdir};"            \
1053 ###  -e 's;^\(libdir=\).*$;\1'"${libdir};") > ./build-install.tmp
1054 ### ${srcdir}/move-if-change build-install.tmp build-install
1055 ### # Remind people not to edit this.
1056 ### chmod -w build-install
1057 ### chmod +x build-install
1060 #### Describe the results.
1062 ### Create a verbal description of what we have done.
1064 message="Configured for \`${configuration}'.
1066   What operating system and machine description files should Emacs use?
1067         \`${opsysfile}' and \`${machfile}'
1068   Should Emacs use the GNU version of malloc?             ${GNU_MALLOC}${GNU_MALLOC_reason}
1069   Should Emacs use the relocating allocator for buffers?  ${REL_ALLOC}
1070   What window system should Emacs use?                    ${window_system}
1071   What compiler should emacs be built with?               ${default_cc}
1072   Should the compilation use \`-g' and/or \`-O'?            ${default_cflags-neither}${x_includes+
1073   Where do we find X Windows header files?                }${x_includes}${x_libraries+
1074   Where do we find X Windows libraries?                   }${x_libraries}"
1076 ### Write config.status, documenting the damage we have done.
1078 (echo "\
1079 #!/bin/sh
1080 ### This file is generated by \`${progname}.'
1081 ### If you are thinking about editing it, you should seriously consider
1082 ### running \`${progname}' instead.
1084  echo "${message}" | sed -e 's/^/# /'
1085  echo "exec '${progname}' ${arguments} "'$@') > config.status
1087 ### Remind people not to edit this.
1088 chmod -w config.status
1089 chmod +x config.status
1091 ### Print the description.
1092 echo
1093 echo "${message}"
1095 exit 0