Mercurial > emacs
annotate configure1.in @ 1559:b941e08deb56
Wed Nov 4 15:09:07 1992 Jim Blandy (jimb@totoro.cs.oberlin.edu)
* configure: When editing parameters into lib-src/Makefile, change
the definition of CONFIG_CFLAGS instead of CFLAGS itself; CFLAGS
needs some other flags too.
author | Jim Blandy <jimb@redhat.com> |
---|---|
date | Sat, 07 Nov 1992 06:33:57 +0000 |
parents | 868dcc4f0edd |
children | b57feef74718 |
rev | line source |
---|---|
603 | 1 #!/bin/sh |
2 # Configuration script for GNU Emacs | |
3 # Copyright (C) 1992 Free Software Foundation, Inc. | |
4 | |
5 #This file is part of GNU Emacs. | |
6 | |
7 #GNU Emacs is free software; you can redistribute it and/or modify | |
8 #it under the terms of the GNU General Public License as published by | |
9 #the Free Software Foundation; either version 1, or (at your option) | |
10 #any later version. | |
11 | |
12 #GNU Emacs is distributed in the hope that it will be useful, | |
13 #but WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 #GNU General Public License for more details. | |
16 | |
17 #You should have received a copy of the GNU General Public License | |
18 #along with GNU Emacs; see the file COPYING. If not, write to | |
19 #the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. | |
20 | |
21 # Shell script to edit files and make symlinks in preparation for | |
22 # compiling Emacs. | |
617 | 23 # |
603 | 24 # Usage: configure machine |
25 # | |
26 # If configure succeeds, it leaves its status in config.status. | |
617 | 27 # If configure fails after disturbing the status quo, |
603 | 28 # config.status is removed. |
29 # | |
30 | |
1112 | 31 # Remove any leading "." elements from the path name. If we don't |
32 # remove them, then another "./" will be prepended to the file name | |
33 # each time we use config.status, and the program name will get larger | |
34 # and larger. This wouldn't be a problem, except that since progname | |
35 # gets recorded in all the Makefiles this script produces, | |
638 | 36 # move-if-changed thinks they're different when they're not. |
1112 | 37 # |
38 # It would be nice if we could put the ./ in a \( \) group and then | |
39 # apply the * operator to that, so we remove as many leading ./././'s | |
40 # as are present, but some seds (like Ultrix's sed) don't allow you to | |
41 # apply * to a \( \) group. Bleah. | |
42 progname="`echo $0 | sed 's:^\./::'`" | |
603 | 43 |
44 short_usage="Type \`${progname} -usage' for more information about options." | |
45 | |
46 usage_message="Usage: ${progname} MACHINENAME [-OPTION[=VALUE] ...] | |
47 Set compilation and installation parameters for GNU Emacs, and report. | |
1423
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
48 MACHINENAME is the machine to build for. For example: |
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
49 ${progname} decstation |
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
50 configures Emacs to run on a DECstation running Ultrix. See \`etc/MACHINES'. |
603 | 51 Options are: |
1423
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
52 --with-x, --with-x11 or --with-x10 - what window system to use; |
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
53 default is to use X11 if present. If you don't want X, specify |
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
54 \`--with-x=no'. |
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
55 -g, -O - Passed to the compiler. Default is -g, plus -O if using gcc. |
1139 | 56 --prefix=DIR - where to install Emacs's library files |
57 --libdir=DIR - where to look for arch-dependent library files | |
58 --datadir=DIR - where to look for architecture-independent library files | |
59 --bindir=DIR - where to install the Emacs executable, and some friends | |
60 --lisppath=PATH - colon-separated list of Emacs Lisp directories | |
61 --lockdir=DIR - where Emacs should do its file-locking stuff | |
603 | 62 If successful, ${progname} leaves its status in config.status. If |
63 unsuccessful after disturbing the status quo, config.status is removed." | |
1139 | 64 # These are omitted since users should not mess with them. |
65 # --gnu-malloc=[yes] or no - use the GNU memory allocator | |
66 # --rel-alloc=[yes] or no - use compacting allocator for buffers | |
67 # --lisp-float-type=[yes] or no - Support floating point in Emacs Lisp. | |
68 # --window-system is omitted because --with... follow the conventions. | |
603 | 69 |
70 if [ ! -r ./src/lisp.h ]; then | |
71 echo "${progname}: Can't find Emacs sources in \`./src'. | |
732 | 72 Run this config script in the top directory of the Emacs source tree." >&2 |
603 | 73 exit 1 |
74 fi | |
75 | |
1139 | 76 # The option names defined here are actually the shell variable names. |
77 # They should have `_' in place of `-'. | |
603 | 78 options=":\ |
79 usage:help:\ | |
1423
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
80 with_x:with_x11:with_x10:\ |
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
81 g:O:\ |
621 | 82 prefix:bindir:emacsdir:datadir:lispdir:locallisppath:\ |
83 lisppath:buildlisppath:statedir:lockdir:libdir:mandir:infodir:\ | |
603 | 84 " |
85 | |
86 boolean_opts=":\ | |
1423
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
87 g:O:with_x:with_x10:\ |
603 | 88 " |
89 | |
90 config_h_opts=":\ | |
1423
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
91 have_x_windows:have_x11:have_x_menu:\ |
1483
868dcc4f0edd
Update LISP_FLOAT_TYPE in config.h.
Richard M. Stallman <rms@gnu.org>
parents:
1482
diff
changeset
|
92 c_switch_site:sigtype:gnu_malloc:rel_alloc:lisp_float_type:\ |
603 | 93 " |
94 | |
621 | 95 prefix= |
605 | 96 bindir=/usr/local/bin |
603 | 97 gnu_malloc=yes |
98 lisp_float_type=yes | |
99 | |
100 # The default values for the following options are guessed at after other | |
101 # options have been checked and given values, so we set them to null here. | |
102 lisppath="" | |
103 datadir="" | |
104 libdir="" | |
105 lockdir="" | |
106 window_system="" | |
107 | |
638 | 108 # Record all the arguments, so we can save them in config.status. |
1423
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
109 arguments="$@" |
638 | 110 |
617 | 111 echo "Examining options." |
621 | 112 while [ $# != 0 ]; do |
113 arg="$1" | |
603 | 114 case "${arg}" in |
115 -*) | |
116 # Separate the switch name from the value it's being given. | |
117 case "${arg}" in | |
1139 | 118 -*=*) |
1423
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
119 opt=`echo ${arg} | sed 's:^-*\([^=]*\)=.*$:\1:'` |
1139 | 120 val=`echo ${arg} | sed 's:^-*[^=]*=\(.*\)$:\1:'` |
603 | 121 valomitted=no |
122 ;; | |
1139 | 123 -*) |
621 | 124 # If FOO is a boolean argument, -FOO is equivalent to |
125 # -FOO=yes. Otherwise, the value comes from the next | |
126 # argument - see below. | |
1423
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
127 opt=`echo ${arg} | sed 's:^-*\(.*\)$:\1:'` |
603 | 128 val="yes" |
129 valomitted=yes | |
130 ;; | |
131 esac | |
132 | |
1423
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
133 # Also change `-' in the option name to `_'. |
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
134 opt="`echo ${opt} | tr - _`" |
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
135 |
603 | 136 # Make sure the argument is valid and unambiguous. |
137 case ${options} in | |
138 *:${opt}:* ) # Exact match. | |
139 optvar=${opt} | |
140 ;; | |
141 *:${opt}*:${opt}*:* ) # Ambiguous prefix. | |
142 echo "\`-${opt}' is an ambiguous switch; it could be any of the following:" | |
732 | 143 # We can't just use tr to translate colons to newlines, since |
144 # BSD sed and SYSV sed use different syntaxes for that. | |
145 spaced_options=`echo ${options} | tr ':' ' '` | |
146 echo `(for option in ${spaced_options}; do echo $option; done) \ | |
147 | grep "^${opt}"` | |
603 | 148 echo ${short_usage} |
149 exit 1 | |
150 ;; | |
151 *:${opt}*:* ) # Unambigous prefix. | |
152 optvar=`echo ${options} | sed 's/^.*:\('${opt}'[^:]*\):.*$/\1/'` | |
153 ;; | |
154 * ) | |
155 (echo "\`-${opt}' is not a valid option." | |
156 echo "${short_usage}") | more | |
157 exit 1 | |
158 ;; | |
159 esac | |
160 | |
161 case "${optvar}" in | |
162 usage | help) | |
163 echo "${usage_message}" | more | |
164 exit 1 | |
165 ;; | |
166 esac | |
167 | |
168 # If the variable is supposed to be boolean, make sure the value | |
169 # given is either "yes" or "no". If not, make sure some value | |
170 # was given. | |
171 case "${boolean_opts}" in | |
172 *:${optvar}:* ) | |
173 case "${val}" in | |
174 y | ye | yes ) val=yes ;; | |
175 n | no ) val=no ;; | |
176 * ) | |
177 echo "The \`-${optvar}' option (\`-${opt}') is supposed to have a boolean | |
732 | 178 value - set it to either \`yes' or \`no'." >&2 |
603 | 179 exit 1 |
180 ;; | |
181 esac | |
182 ;; | |
183 *) | |
184 if [ "${valomitted}" = "yes" ]; then | |
621 | 185 if [ $# = 1 ]; then |
186 (echo "${progname}: You must give a value for the \`-${opt}' option, as in | |
187 \`-${opt}=FOO'." | |
188 echo "${short_usage}") | more | |
189 exit 1 | |
190 fi | |
191 shift; val="$1" | |
603 | 192 fi |
193 ;; | |
194 esac | |
195 | |
196 eval "${optvar}=\"${val}\"" | |
197 ;; | |
198 *) | |
199 machine=${arg} | |
200 ;; | |
201 esac | |
621 | 202 shift |
603 | 203 done |
204 | |
205 if [ "${machine}" = "" ]; then | |
206 (echo "You must specify a machine name as an argument to ${progname}." | |
207 echo "${short_usage}") | more | |
208 exit 1 | |
209 fi | |
210 | |
1423
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
211 # Canonicalize the machine name. |
617 | 212 echo "Checking the machine." |
1423
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
213 machine=`./config.sub "${machine}"` |
603 | 214 |
1423
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
215 # Given the canonicalized machine name, set machfile and opsysfile to |
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
216 # the names of the m/*.h and s/*.h files we should use. |
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
217 case "${machine}" in |
603 | 218 |
1423
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
219 ## Alliant machines. |
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
220 ## Strictly speaking, we need the version of the alliant operating |
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
221 ## system to choose the right machine file, but currently the |
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
222 ## configuration name doesn't tell us enough to choose the right |
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
223 ## one; we need to give alliants their own operating system name to |
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
224 ## do this right. When someone cares, they can help us. |
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
225 fx80-alliant-* ) |
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
226 machfile=m/alliant4.h opsysfile=s/bsd4-2.h |
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
227 ;; |
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
228 i860-alliant-* ) |
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
229 machfile=m/alliant-2800.h opsysfile=s/bsd4-3.h |
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
230 ;; |
603 | 231 |
1423
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
232 ## DECstations. |
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
233 mips-*-ultrix* ) |
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
234 machfile=m/pmax.h opsysfile=s/bsd4-3.h |
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
235 ;; |
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
236 mips-*-osf* ) |
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
237 machfile=m/pmax.h opsysfile=s/osf1.h |
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
238 ;; |
603 | 239 |
1423
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
240 ## HP 9000 series 200 or 300. |
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
241 m68*-hp-bsd* ) |
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
242 machfile=m/hp9000s300.h opsysfile=s/bsd4-3.h |
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
243 ;; |
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
244 ## If it's running an unspecified version of HP/UX, assume version 8. |
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
245 m68*-hp-hpux7 ) |
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
246 machfile=m/hp9000s300.h opsysfile=s/hpux.h |
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
247 ;; |
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
248 m68*-hp-hpux* ) |
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
249 machfile=m/hp9000s300.h opsysfile=s/hpux8.h |
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
250 ;; |
603 | 251 |
1423
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
252 ## HP 9000 series 800, running HP/UX. |
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
253 hppa1.0-hp-hpux* ) |
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
254 machfile=m/hp9000s800.h opsysfile=s/hpux.h |
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
255 ;; |
603 | 256 |
1423
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
257 ## Suns. |
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
258 *-sun-sunos* | *-sun-bsd* ) |
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
259 case "${machine}" in |
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
260 m68*-sunos1* ) machfile=m/sun1.h ;; |
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
261 m68*-sunos2* ) machfile=m/sun2.h ;; |
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
262 m68* ) machfile=m/sun3.h ;; |
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
263 i[34]86* ) machfile=m/sun386.h ;; |
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
264 * ) machfile=m/sparc.h ;; |
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
265 esac |
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
266 case "${machine}" in |
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
267 *-sunos4.0* ) opsysfile=s/sunos4-0.h ;; |
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
268 *-sunos4* | *-sunos ) opsysfile=s/sunos4-1.h ;; |
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
269 * ) opsysfile=s/bsd4-2.h ;; |
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
270 esac |
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
271 ;; |
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
272 |
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
273 * ) |
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
274 (echo "${progname}: Emacs hasn't been ported to the machine \`${machine}'." |
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
275 echo "${progname}: Check \`etc/MACHINES' for recognized machine names.") \ |
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
276 >&2 |
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
277 ;; |
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
278 |
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
279 esac |
603 | 280 |
621 | 281 if [ ! "${prefix}" ]; then |
282 prefix="/usr/local" | |
283 fi | |
284 | |
285 if [ ! "${emacsdir}" ]; then | |
286 emacsdir="${prefix}/emacs-19.0" | |
287 fi | |
288 | |
289 if [ ! "${datadir}" ]; then | |
290 datadir="${emacsdir}/etc" | |
291 fi | |
292 | |
293 if [ ! "${lispdir}" ]; then | |
294 lispdir="${emacsdir}/lisp" | |
295 fi | |
296 | |
297 if [ ! "${locallisppath}" ]; then | |
298 locallisppath="${emacsdir}/local-lisp" | |
299 fi | |
300 | |
301 if [ ! "${lisppath}" ]; then | |
302 lisppath="${locallisppath}:${lispdir}" | |
303 fi | |
304 | |
305 if [ ! "${buildlisppath}" ]; then | |
306 buildlisppath=../lisp | |
307 fi | |
308 | |
309 if [ ! "${statedir}" ]; then | |
310 statedir="${emacsdir}" | |
311 fi | |
312 | |
313 if [ ! "${lockdir}" ]; then | |
314 lockdir="${statedir}/lock" | |
315 fi | |
316 | |
317 if [ "${libdir}" = "" ]; then | |
318 libdir="${emacsdir}/arch-lib" | |
319 fi | |
320 | |
321 if [ ! "${mandir}" ]; then | |
322 mandir="/usr/man/man1" | |
323 fi | |
324 | |
325 if [ ! "${infodir}" ]; then | |
326 infodir="${prefix}/info" | |
603 | 327 fi |
328 | |
617 | 329 echo "Checking window system." |
1423
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
330 indow_system='' |
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
331 case "${with_x}" in |
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
332 yes ) |
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
333 window_system=${window_system}x11 |
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
334 ;; |
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
335 no ) |
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
336 window_system=${window_system}none |
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
337 esac |
1139 | 338 case "${with_x11}" in |
339 yes ) | |
340 window_system=${window_system}x11 | |
1423
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
341 ;; |
1139 | 342 esac |
343 case "${with_x10}" in | |
344 yes ) | |
345 window_system=${window_system}x10 | |
1423
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
346 ;; |
1139 | 347 esac |
348 | |
603 | 349 case "${window_system}" in |
350 "none" | "x11" | "x10" ) ;; | |
351 "" ) | |
617 | 352 echo " No window system specifed. Looking for X Windows." |
603 | 353 window_system=none |
958 | 354 if [ -r /usr/lib/libX11.a -o -d /usr/include/X11 ]; then |
603 | 355 window_system=x11 |
617 | 356 fi |
603 | 357 ;; |
358 * ) | |
1139 | 359 echo "Don\'t specify the window system more than once." >&2 |
603 | 360 exit 1 |
361 ;; | |
362 esac | |
363 | |
364 case "${window_system}" in | |
365 x11 ) | |
366 have_x_windows=yes | |
367 have_x11=yes | |
368 ;; | |
369 x10 ) | |
370 have_x_windows=yes | |
371 have_x11=no | |
372 ;; | |
373 none ) | |
374 have_x_windows=no | |
375 have_x11=no | |
376 ;; | |
377 esac | |
378 | |
1423
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
379 # If we're using X11, we should use the X menu package. |
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
380 have_x_menu=no |
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
381 case ${have_x11} in |
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
382 yes ) |
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
383 have_x_menu=yes |
603 | 384 ;; |
385 esac | |
386 | |
1423
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
387 echo "Checking for GCC." |
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
388 temppath=`echo $PATH | sed 's/^:/.:/ |
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
389 s/::/:.:/g |
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
390 s/:$/:./ |
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
391 s/:/ /g'` |
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
392 cc=`( |
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
393 for dir in ${temppath}; do |
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
394 if [ -f ${dir}/gcc ]; then echo gcc; exit 0; fi |
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
395 done |
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
396 echo cc |
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
397 )` |
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
398 |
621 | 399 case "${cc}" in |
400 "gcc" ) | |
401 # With GCC, both O and g should default to yes, no matter what | |
402 # the other is. | |
403 case "${O},${g}" in | |
404 , ) O=yes; g=yes ;; | |
405 ,* ) O=yes; ;; | |
406 *, ) g=yes ;; | |
407 esac | |
408 ;; | |
409 "*" ) | |
410 # With other compilers, treat them as mutually exclusive, | |
411 # defaulting to debug. | |
412 case "${O},${g}" in | |
413 , ) O=no ; g=yes ;; | |
414 ,no ) O=yes; ;; | |
415 ,yes ) O=no ; ;; | |
416 no, ) g=yes ;; | |
417 yes, ) g=no ;; | |
418 esac | |
419 ;; | |
603 | 420 esac |
421 | |
621 | 422 # What is the return type of a signal handler? We run |
423 # /usr/include/signal.h through cpp and grep for the declaration of | |
424 # the signal function. Yuck. | |
425 echo "Looking for return type of signal handler functions." | |
426 signal_h_file='' | |
427 if [ -r /usr/include/signal.h ]; then | |
428 signal_h_file=/usr/include/signal.h | |
429 elif [ -r /usr/include/sys/signal.h ]; then | |
430 signal_h_file=/usr/include/sys/signal.h | |
431 fi | |
432 sigtype=void | |
433 if [ "${signal_h_file}" ]; then | |
434 sigpattern='[ ]*([ ]*\*[ ]*signal[ ]*(' | |
435 | |
999 | 436 # We make a copy whose name ends in .c, so the compiler |
621 | 437 # won't complain about having only been given a .h file. |
438 tempcname="configure.tmp.$$.c" | |
999 | 439 cp ${signal_h_file} ${tempcname} |
621 | 440 if ${cc} -E ${tempcname} | grep "int${sigpattern}" > /dev/null; then |
441 sigtype=int | |
442 fi | |
999 | 443 rm -f ${tempcname} |
621 | 444 fi |
445 | |
617 | 446 echo "Examining the machine- and system-dependent files to find out" |
447 echo " - which libraries the lib-src programs will want, and" | |
448 echo " - whether the GNU malloc routines are usable." | |
449 tempcname="configure.tmp.$$.c" | |
1112 | 450 echo '#include "src/'${opsysfile}'" |
451 #include "src/'${machfile}'" | |
603 | 452 #ifndef LIBS_MACHINE |
453 #define LIBS_MACHINE | |
454 #endif | |
455 #ifndef LIBS_SYSTEM | |
456 #define LIBS_SYSTEM | |
457 #endif | |
621 | 458 @configure@ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM |
617 | 459 #ifdef SYSTEM_MALLOC |
621 | 460 @configure@ system_malloc=yes |
617 | 461 #else |
621 | 462 @configure@ system_malloc=no |
617 | 463 #endif |
464 ' > ${tempcname} | |
621 | 465 eval `${cc} -E ${tempcname} \ |
466 | grep '@configure@' \ | |
467 | sed -e 's/^@configure@//'` | |
617 | 468 rm ${tempcname} |
469 | |
470 # Do the opsystem or machine files prohibit the use of the GNU malloc? | |
471 if [ "${system_malloc}" = "yes" ]; then | |
472 gnu_malloc=no | |
473 gnu_malloc_reason=" | |
474 (The GNU allocators don't work with this machine and/or operating system.)" | |
475 fi | |
476 | |
477 if [ ! "${rel_alloc}" ]; then | |
478 rel_alloc=${gnu_malloc} | |
479 fi | |
603 | 480 |
481 rm -f config.status | |
482 set -e | |
483 | |
484 # Make the proper settings in the config file. | |
617 | 485 echo "Making src/config.h from src/config.h.in" |
603 | 486 case "${g}" in |
487 "yes" ) c_switch_site="${c_switch_site} -g" ;; | |
488 esac | |
489 case "${O}" in | |
490 "yes" ) c_switch_site="${c_switch_site} -O" ;; | |
491 esac | |
492 sed_flags="-e 's:@machine@:${machfile}:'" | |
493 sed_flags="${sed_flags} -e 's:@opsystem@:${opsysfile}:'" | |
1482
b695cbb4fdab
Update GNU_MALLOC and REL_ALLOC in config.h.
Richard M. Stallman <rms@gnu.org>
parents:
1423
diff
changeset
|
494 |
603 | 495 for flag in `echo ${config_h_opts} | tr ':' ' '`; do |
732 | 496 # Note that SYSV `tr' doesn't handle character ranges. |
621 | 497 cflagname=`echo ${flag} \ |
498 | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ` | |
603 | 499 val=`eval echo '$'${flag}` |
500 case ${val} in | |
501 no | "") | |
502 f="-e 's:.*#define ${cflagname}.*:/\\* #define ${cflagname} \\*/:'" | |
503 ;; | |
504 yes) | |
505 f="-e 's:.*#define ${cflagname}.*:#define ${cflagname}:'" | |
506 ;; | |
507 *) | |
508 f="-e 's:.*#define ${cflagname}.*:#define ${cflagname} ${val}:'" | |
509 ;; | |
510 esac | |
511 sed_flags="${sed_flags} ${f}" | |
512 done | |
1482
b695cbb4fdab
Update GNU_MALLOC and REL_ALLOC in config.h.
Richard M. Stallman <rms@gnu.org>
parents:
1423
diff
changeset
|
513 |
704 | 514 rm -f src/config.h.tmp |
638 | 515 eval '/bin/sed '${sed_flags}' < src/config.h.in > src/config.h.tmp' |
516 ./move-if-change src/config.h.tmp src/config.h | |
617 | 517 # Remind people not to edit this. |
518 chmod -w src/config.h | |
603 | 519 |
520 # Modify the parameters in the top makefile. | |
617 | 521 echo "Producing ./Makefile from ./Makefile.in." |
704 | 522 rm -f Makefile.tmp |
617 | 523 (echo "# This file is generated by \`${progname}' from \`./Makefile.in'. |
524 # If you are thinking about editing it, you should seriously consider | |
525 # editing \`./Makefile.in' itself, or running \`${progname}' instead." | |
526 /bin/sed < Makefile.in \ | |
527 -e '/^# DIST: /d' \ | |
621 | 528 -e 's;^\(prefix=\).*$;\1'"${prefix};" \ |
617 | 529 -e 's;^\(bindir=\).*$;\1'"${bindir};" \ |
621 | 530 -e 's;^\(emacsdir=\).*$;\1'"${emacsdir};" \ |
531 -e 's;^\(datadir=\).*$;\1'"${datadir};" \ | |
532 -e 's;^\(lispdir=\).*$;\1'"${lispdir};" \ | |
533 -e 's;^\(locallisppath=\).*$;\1'"${locallisppath};" \ | |
617 | 534 -e 's;^\(lisppath=\).*$;\1'"${lisppath};" \ |
621 | 535 -e 's;^\(buildlisppath=\).*$;\1'"${buildlisppath};" \ |
536 -e 's;^\(statedir=\).*$;\1'"${statedir};" \ | |
617 | 537 -e 's;^\(lockdir=\).*$;\1'"${lockdir};" \ |
621 | 538 -e 's;^\(libdir=\).*$;\1'"${libdir};" \ |
539 -e 's;^\(mandir=\).*$;\1'"${mandir};" \ | |
540 -e 's;^\(infodir=\).*$;\1'"${infodir};" \ | |
638 | 541 ) > ./Makefile.tmp |
542 ./move-if-change Makefile.tmp Makefile | |
617 | 543 # Remind people not to edit this. |
544 chmod -w ./Makefile | |
603 | 545 |
546 # Modify the parameters in the `build-install' script. | |
617 | 547 echo "Producing ./build-install from ./build-install.in." |
704 | 548 rm -f ./build-install.tmp |
617 | 549 (echo "# This file is generated by \`${progname}' from \`./build-install.in'. |
550 # If you are thinking about editing it, you should seriously consider | |
551 # editing \`./build-install.in' itself, or running \`${progname}' instead." | |
552 /bin/sed < build-install.in \ | |
621 | 553 -e 's;^\(prefix=\).*$;\1'"${prefix};" \ |
554 -e 's;^\(bindir=\).*$;\1'"${bindir};" \ | |
555 -e 's;^\(lisppath=\).*$;\1'"${lisppath};" \ | |
556 -e 's;^\(datadir=\).*$;\1'"${datadir};" \ | |
557 -e 's;^\(lockdir=\).*$;\1'"${lockdir};" \ | |
638 | 558 -e 's;^\(libdir=\).*$;\1'"${libdir};") > ./build-install.tmp |
559 ./move-if-change build-install.tmp build-install | |
617 | 560 # Remind people not to edit this. |
561 chmod -w build-install | |
562 chmod +x build-install | |
603 | 563 |
564 # Modify the parameters in the src makefile. | |
617 | 565 echo "Producing src/Makefile from src/Makefile.in." |
704 | 566 rm -f src/Makefile.tmp |
617 | 567 (echo "# This file is generated by \`${progname}' from \`Makefile.in'. |
568 # If you are thinking about editing it, you should seriously consider | |
569 # editing \`Makefile.in' itself, or running \`${progname}' instead." | |
570 /bin/sed < src/Makefile.in \ | |
1112 | 571 -e '/^# DIST: /d' \ |
638 | 572 -e 's;^\(CC[ ]*=\).*$;\1'"${cc};") > src/Makefile.tmp |
573 ./move-if-change src/Makefile.tmp src/Makefile | |
617 | 574 # Remind people not to edit this. |
575 chmod -w src/Makefile | |
603 | 576 |
577 # Modify the parameters in the lib-src makefile. | |
617 | 578 echo "Producing lib-src/Makefile from lib-src/Makefile.in." |
704 | 579 rm -f lib-src/Makefile.tmp |
617 | 580 (echo "# This file is generated by \`${progname}' from \`Makefile.in'. |
581 # If you are thinking about editing it, you should seriously consider | |
582 # editing \`Makefile.in' itself, or running \`${progname}' instead." | |
583 /bin/sed < lib-src/Makefile.in \ | |
1112 | 584 -e '/^# DIST: /d' \ |
1559
b941e08deb56
Wed Nov 4 15:09:07 1992 Jim Blandy (jimb@totoro.cs.oberlin.edu)
Jim Blandy <jimb@redhat.com>
parents:
1483
diff
changeset
|
585 -e 's;^\(CONFIG_CFLAGS=\).*$;\1'"${c_switch_site};" \ |
617 | 586 -e 's;^\(LOADLIBES=\).*$;\1'"${libsrc_libs};" \ |
638 | 587 -e 's;^\(CC=\).*$;\1'"${cc};") > lib-src/Makefile.tmp |
588 ./move-if-change lib-src/Makefile.tmp lib-src/Makefile | |
617 | 589 # Remind people not to edit this. |
590 chmod -w lib-src/Makefile | |
591 | |
603 | 592 |
605 | 593 # Create a verbal description of what we have done. |
1423
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
594 message="Configured for \`${machine}'. |
732 | 595 The following values have been set in ./Makefile and ./build-install: |
1423
93ee9c5e7eec
Partially changed to use GCC-style configuration names.
Jim Blandy <jimb@redhat.com>
parents:
1139
diff
changeset
|
596 \`make install' or \`build-install' will place executables in |
732 | 597 ${bindir}. |
598 Emacs's lisp search path will be | |
599 \`${lisppath}'. | |
600 Emacs will look for its architecture-independent data in | |
601 ${datadir}. | |
602 Emacs will look for its utility programs and other architecture- | |
603 dependent data in | |
604 ${libdir}. | |
605 Emacs will keep track of file-locking in | |
606 ${lockdir}. | |
607 The following values have been set in src/config.h: | |
608 Should Emacs use the GNU version of malloc? ${gnu_malloc}${gnu_malloc_reason} | |
609 Should Emacs use the relocating allocator for buffers? ${rel_alloc} | |
1139 | 610 Should Emacs support a floating point data type? ${lisp_float_type} |
732 | 611 What window system should Emacs use? ${window_system} |
612 What compiler should emacs be built with? ${cc} | |
613 Should the compilation use \`-g' and/or \`-O'? ${c_switch_site- neither}" | |
605 | 614 |
615 # Document the damage we have done by writing config.status. | |
616 | |
617 echo '#!/bin/sh' > config.status | |
618 | |
619 echo "# This file is generated by \`${progname}.' | |
620 # If you are thinking about editing it, you should seriously consider | |
621 # running \`${progname}' instead. | |
622 " >> config.status | |
732 | 623 echo "${message}" | sed -e 's/^/# /' >> config.status |
999 | 624 echo "'${progname}' ${arguments} "'$@' >> config.status |
617 | 625 # Remind people not to edit this. |
626 chmod -w config.status | |
605 | 627 chmod +x config.status |
628 | |
629 # Print the description. | |
603 | 630 echo |
732 | 631 echo "${message}" |
603 | 632 |
633 exit 0 |