Commit | Line | Data |
---|---|---|
fa97f756 | 1 | dnl This is an autoconf script. |
8fc40e80 JB |
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. | |
de5d70c1 | 9 | [#!/bin/sh |
0c22fbca JB |
10 | #### Configuration script for GNU Emacs |
11 | #### Copyright (C) 1992 Free Software Foundation, Inc. | |
12 | ||
8fc40e80 JB |
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. | |
19 | ||
0c22fbca JB |
20 | ### This file is part of GNU Emacs. |
21 | ||
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. | |
26 | ||
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. | |
31 | ||
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. | |
35 | ||
7d99494c JB |
36 | |
37 | ### Since Emacs has configuration requirements that autoconf can't | |
38 | ### meet, this file is an unholy marriage of custom-baked | |
44ee550f | 39 | ### configuration code and autoconf macros. |
7d99494c JB |
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. | |
0c22fbca JB |
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. | |
0c22fbca JB |
50 | |
51 | ||
3647c171 JB |
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. | |
0c22fbca JB |
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. | |
3647c171 | 64 | progname="`echo $0 | sed 's:^\./\./:\./:'`" |
ca1d1d23 | 65 | |
ca1d1d23 | 66 | |
0c22fbca JB |
67 | #### Usage messages. |
68 | ||
ae6756a2 | 69 | short_usage="Usage: ${progname} CONFIGURATION [-OPTION[=VALUE] ...] |
8509d50c | 70 | |
ca1d1d23 | 71 | Set compilation and installation parameters for GNU Emacs, and report. |
8509d50c | 72 | CONFIGURATION specifies the machine and operating system to build for. |
ae6756a2 | 73 | --with-x Support the X Window System. |
b735d4b3 RS |
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. | |
ae6756a2 JB |
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. | |
0c22fbca | 83 | |
ca1d1d23 | 84 | If successful, ${progname} leaves its status in config.status. If |
0c22fbca JB |
85 | unsuccessful after disturbing the status quo, it removes config.status." |
86 | ||
87 | ||
88 | #### Option processing. | |
ca1d1d23 | 89 | |
0c22fbca | 90 | ### Record all the arguments, so we can save them in config.status. |
20d9a863 | 91 | arguments="$@" |
e065a56e | 92 | |
c5f67786 JB |
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='' | |
98 | ||
ae6756a2 JB |
99 | ### Establish some default values. |
100 | prefix='/usr/local' | |
86ddcc58 | 101 | exec_prefix='${prefix}' |
ae6756a2 | 102 | |
3517b2e9 JB |
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` | |
ca1d1d23 | 110 | case "${arg}" in |
0c22fbca JB |
111 | |
112 | ## Anything starting with a hyphen we assume is an option. | |
113 | -* ) | |
114 | ||
115 | ## Separate the switch name from the value it's being given. | |
ca1d1d23 | 116 | case "${arg}" in |
2c44309a | 117 | -*=*) |
20d9a863 | 118 | opt=`echo ${arg} | sed 's:^-*\([^=]*\)=.*$:\1:'` |
2c44309a | 119 | val=`echo ${arg} | sed 's:^-*[^=]*=\(.*\)$:\1:'` |
ca1d1d23 JB |
120 | valomitted=no |
121 | ;; | |
2c44309a | 122 | -*) |
0c22fbca JB |
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. | |
20d9a863 | 126 | opt=`echo ${arg} | sed 's:^-*\(.*\)$:\1:'` |
ca1d1d23 JB |
127 | val="yes" |
128 | valomitted=yes | |
129 | ;; | |
130 | esac | |
131 | ||
0c22fbca | 132 | ## Change `-' in the option name to `_'. |
b0209e18 | 133 | optname="${opt}" |
20d9a863 JB |
134 | opt="`echo ${opt} | tr - _`" |
135 | ||
0c22fbca JB |
136 | ## Process the option. |
137 | case "${opt}" in | |
ca1d1d23 | 138 | |
0c22fbca JB |
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". | |
ca1d1d23 JB |
142 | case "${val}" in |
143 | y | ye | yes ) val=yes ;; | |
144 | n | no ) val=no ;; | |
145 | * ) | |
b0209e18 | 146 | (echo "${progname}: the \`--${optname}' option is supposed to have a boolean value. |
0c22fbca JB |
147 | Set it to either \`yes' or \`no'." |
148 | echo "${short_usage}") >&2 | |
ca1d1d23 JB |
149 | exit 1 |
150 | ;; | |
151 | esac | |
0c22fbca | 152 | eval "${opt}=\"${val}\"" |
ca1d1d23 | 153 | ;; |
0c22fbca | 154 | |
1bba56f6 | 155 | ## Has the user specified whether or not they want GCC? |
b735d4b3 | 156 | "with_gcc" | "with_gnu_cc" ) |
1bba56f6 JB |
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 | * ) | |
b0209e18 | 162 | (echo "${progname}: the \`--${optname}' option is supposed to have a boolean value. |
1bba56f6 JB |
163 | Set it to either \`yes' or \`no'." |
164 | echo "${short_usage}") >&2 | |
165 | exit 1 | |
166 | ;; | |
167 | esac | |
168 | eval "${opt}=\"${val}\"" | |
169 | ;; | |
170 | ||
0c22fbca JB |
171 | ## Has the user specified a source directory? |
172 | "srcdir" ) | |
173 | ## If the value was omitted, get it from the next argument. | |
ca1d1d23 | 174 | if [ "${valomitted}" = "yes" ]; then |
0c22fbca | 175 | ## Get the next argument from the argument list, if there is one. |
3517b2e9 | 176 | if [ $index = $# ]; then |
b0209e18 JB |
177 | (echo "${progname}: You must give a value for the \`--${optname}' option, as in |
178 | \`--${optname}=FOO'." | |
0c22fbca | 179 | echo "${short_usage}") >&2 |
4746118a JB |
180 | exit 1 |
181 | fi | |
3517b2e9 JB |
182 | index=`expr $index + 1` |
183 | val=`eval echo '$'$index` | |
ca1d1d23 | 184 | fi |
0c22fbca JB |
185 | srcdir="${val}" |
186 | ;; | |
187 | ||
9c7a7556 JB |
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. | |
b0209e18 | 192 | "x_includes" ) |
9c7a7556 JB |
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. | |
3517b2e9 | 196 | if [ $index = $# ]; then |
b0209e18 JB |
197 | (echo "${progname}: You must give a value for the \`--${optname}' option, as in |
198 | \`--${optname}=FOO'." | |
9c7a7556 JB |
199 | echo "${short_usage}") >&2 |
200 | exit 1 | |
201 | fi | |
3517b2e9 JB |
202 | index=`expr $index + 1` |
203 | val=`eval echo '$'$index` | |
9c7a7556 JB |
204 | fi |
205 | x_includes="${val}" | |
d69d8d1e | 206 | C_SWITCH_X_SITE="-I\"${x_includes}\"" |
9c7a7556 | 207 | ;; |
b0209e18 | 208 | "x_libraries" ) |
9c7a7556 JB |
209 | ## If the value was omitted, get it from the next argument. |
210 | if [ "${valomitted}" = "yes" ]; then | |
211 | ## Get the next argument from the argument list, if there is one. | |
3517b2e9 | 212 | if [ $index = $# ]; then |
b0209e18 JB |
213 | (echo "${progname}: You must give a value for the \`--${optname}' option, as in |
214 | \`--${optname}=FOO'." | |
9c7a7556 JB |
215 | echo "${short_usage}") >&2 |
216 | exit 1 | |
217 | fi | |
3517b2e9 JB |
218 | index=`expr $index + 1` |
219 | val=`eval echo '$'$index` | |
9c7a7556 JB |
220 | fi |
221 | x_libraries="${val}" | |
d69d8d1e | 222 | LD_SWITCH_X_SITE="-L\"${x_libraries}\"" |
9c7a7556 JB |
223 | ;; |
224 | ||
c5f67786 JB |
225 | ## Should this use the "development configuration"? |
226 | "run_in_place" ) | |
227 | rip_paths='' | |
228 | inst_paths='#disabled# ' | |
229 | ;; | |
230 | ||
eb8c3be9 | 231 | ## Has the user specified an installation prefix? |
ae6756a2 JB |
232 | "prefix" ) |
233 | ## If the value was omitted, get it from the next argument. | |
234 | if [ "${valomitted}" = "yes" ]; then | |
235 | ## Get the next argument from the argument list, if there is one. | |
3517b2e9 | 236 | if [ $index = $# ]; then |
ae6756a2 JB |
237 | (echo "${progname}: You must give a value for the \`--${optname}' option, as in |
238 | \`--${optname}=FOO'." | |
239 | echo "${short_usage}") >&2 | |
240 | exit 1 | |
241 | fi | |
3517b2e9 JB |
242 | index=`expr $index + 1` |
243 | val=`eval echo '$'$index` | |
ae6756a2 JB |
244 | fi |
245 | prefix="${val}" | |
246 | ;; | |
247 | ||
eb8c3be9 | 248 | ## Has the user specified an installation prefix? |
86ddcc58 JB |
249 | "exec_prefix" ) |
250 | ## If the value was omitted, get it from the next argument. | |
251 | if [ "${valomitted}" = "yes" ]; then | |
252 | ## Get the next argument from the argument list, if there is one. | |
3517b2e9 | 253 | if [ $index = $# ]; then |
86ddcc58 JB |
254 | (echo "${progname}: You must give a value for the \`--${optname}' option, as in |
255 | \`--${optname}=FOO'." | |
256 | echo "${short_usage}") >&2 | |
257 | exit 1 | |
258 | fi | |
3517b2e9 JB |
259 | index=`expr $index + 1` |
260 | val=`eval echo '$'$index` | |
86ddcc58 JB |
261 | fi |
262 | exec_prefix="${val}" | |
263 | ;; | |
264 | ||
0c22fbca JB |
265 | ## Has the user asked for some help? |
266 | "usage" | "help" ) | |
ae6756a2 | 267 | echo "${short_usage}" | more |
0c22fbca JB |
268 | exit |
269 | ;; | |
ca1d1d23 | 270 | |
0c22fbca JB |
271 | ## We ignore all other options silently. |
272 | esac | |
ca1d1d23 | 273 | ;; |
0c22fbca JB |
274 | |
275 | ## Anything not starting with a hyphen we assume is a | |
276 | ## configuration name. | |
ca1d1d23 | 277 | *) |
8509d50c | 278 | configuration=${arg} |
ca1d1d23 | 279 | ;; |
0c22fbca | 280 | |
ca1d1d23 JB |
281 | esac |
282 | done | |
283 | ||
8509d50c | 284 | if [ "${configuration}" = "" ]; then |
334e7c23 JB |
285 | echo '- You did not tell me what kind of host system you want to configure. |
286 | - I will attempt to guess the kind of system this is.' 1>&2 | |
287 | guesssys=`echo ${progname} | sed 's/configure$/config.guess/'` | |
288 | if configuration=`${guesssys}` ; then | |
289 | echo "- Looks like this is a ${configuration}" 1>&2 | |
290 | else | |
291 | echo '- Failed to guess the system type. You need to tell me.' 1>&2 | |
8428ef44 | 292 | echo "${short_usage}" >&2 |
334e7c23 JB |
293 | exit 1 |
294 | fi | |
0c22fbca JB |
295 | fi |
296 | ||
0c22fbca JB |
297 | #### Decide where the source is. |
298 | case "${srcdir}" in | |
299 | ||
e94740ce | 300 | ## If it's not specified, see if `.' or `..' might work. |
0c22fbca | 301 | "" ) |
2e694846 JB |
302 | confdir=`echo $0 | sed 's|//|/|' | sed 's|/[^/]*$||'` |
303 | if [ -f $confdir/src/lisp.h -a -f $confdir/lisp/version.el ]; then | |
0871bc22 | 304 | srcdir="${confdir}" |
e94740ce | 305 | else |
2e694846 | 306 | if [ -f "./src/lisp.h" -a -f "./lisp/version.el" ]; then |
426460bf | 307 | srcdir='.' |
e94740ce | 308 | else |
2e694846 | 309 | if [ -f "../src/lisp.h" -a -f "../lisp/version.el" ]; then |
426460bf | 310 | srcdir='..' |
2e694846 JB |
311 | else |
312 | (echo "\ | |
e94740ce JB |
313 | ${progname}: Neither the current directory nor its parent seem to |
314 | contain the Emacs sources. If you do not want to build Emacs in its | |
315 | source tree, you should run \`${progname}' in the directory in which | |
316 | you wish to build Emacs, using its \`--srcdir' option to say where the | |
317 | sources may be found." | |
2e694846 JB |
318 | echo "${short_usage}") >&2 |
319 | exit 1 | |
320 | fi | |
e94740ce JB |
321 | fi |
322 | fi | |
0c22fbca JB |
323 | ;; |
324 | ||
e94740ce | 325 | ## Otherwise, check if the directory they specified is okay. |
0c22fbca | 326 | * ) |
e94740ce JB |
327 | if [ ! -d "${srcdir}" -o ! -f "${srcdir}/src/lisp.h" -o ! -f "${srcdir}/lisp/version.el" ]; then |
328 | (echo "\ | |
329 | ${progname}: The directory specified with the \`--srcdir' option, | |
330 | \`${srcdir}', doesn't seem to contain the Emacs sources. You should | |
331 | either run the \`${progname}' script at the top of the Emacs source | |
332 | tree, or use the \`--srcdir' option to specify where the Emacs sources | |
333 | are." | |
0c22fbca JB |
334 | echo "${short_usage}") >&2 |
335 | exit 1 | |
336 | fi | |
337 | ;; | |
0871bc22 | 338 | esac |
0c22fbca | 339 | |
0871bc22 JB |
340 | #### Make srcdir absolute, if it isn't already. It's important to |
341 | #### avoid running the path through pwd unnecessary, since pwd can | |
342 | #### give you automounter prefixes, which can go away. | |
343 | case "${srcdir}" in | |
344 | /* ) ;; | |
c9ed10f6 JB |
345 | . ) |
346 | ## We may be able to use the $PWD environment variable to make this | |
347 | ## absolute. But sometimes PWD is inaccurate. | |
348 | if [ "${PWD}" != "" ] && [ "`(cd ${PWD} ; pwd)`" = "`pwd`" ] ; then | |
349 | srcdir="$PWD" | |
350 | else | |
351 | srcdir="`(cd ${srcdir}; pwd)`" | |
1d488950 | 352 | fi |
c9ed10f6 | 353 | ;; |
0871bc22 | 354 | * ) srcdir="`(cd ${srcdir}; pwd)`" ;; |
0c22fbca JB |
355 | esac |
356 | ||
1b4357f4 JB |
357 | #### Make sure that the source directory doesn't already have a |
358 | #### configured system in it. | |
cc40a99e JB |
359 | if [ `pwd` != `(cd ${srcdir} && pwd)` ] \ |
360 | && [ -f "${srcdir}/src/config.h" ] ; then | |
361 | (echo "${progname}: the directory tree \`${srcdir}' is being used" | |
362 | echo " as a build directory right now; it has been configured in its own" | |
363 | echo " right. You can't use srcdir in this situation.") >&2 | |
1b4357f4 JB |
364 | exit 1 |
365 | fi | |
0871bc22 | 366 | |
0c22fbca | 367 | ### Make the necessary directories, if they don't exist. |
30945baf JB |
368 | for dir in ./src ./lib-src ./cpp ./oldXMenu ./etc ; do |
369 | if [ ! -d ${dir} ]; then | |
370 | mkdir ${dir} | |
371 | fi | |
372 | done | |
0c22fbca JB |
373 | |
374 | #### Given the configuration name, set machfile and opsysfile to the | |
375 | #### names of the m/*.h and s/*.h files we should use. | |
376 | ||
377 | ### Canonicalize the configuration name. | |
8509d50c | 378 | echo "Checking the configuration name." |
e94740ce | 379 | if configuration=`${srcdir}/config.sub "${configuration}"` ; then : ; else |
8509d50c JB |
380 | exit $? |
381 | fi | |
20d9a863 | 382 | |
3647c171 JB |
383 | ### If you add support for a new configuration, add code to this |
384 | ### switch statement to recognize your configuration name and select | |
385 | ### the appropriate operating system and machine description files. | |
386 | ||
8509d50c JB |
387 | ### You would hope that you could choose an m/*.h file pretty much |
388 | ### based on the machine portion of the configuration name, and an s- | |
389 | ### file based on the operating system portion. However, it turns out | |
390 | ### that each m/*.h file is pretty manufacturer-specific - for | |
391 | ### example, apollo.h, hp9000s300.h, mega68k, news.h, and tad68k are | |
392 | ### all 68000 machines; mips.h, pmax.h, and news-risc are all MIPS | |
393 | ### machines. So we basically have to have a special case for each | |
394 | ### configuration name. | |
3647c171 | 395 | ### |
8509d50c JB |
396 | ### As far as handling version numbers on operating systems is |
397 | ### concerned, make sure things will fail in a fixable way. If | |
398 | ### /etc/MACHINES doesn't say anything about version numbers, be | |
399 | ### prepared to handle anything reasonably. If version numbers | |
400 | ### matter, be sure /etc/MACHINES says something about it. | |
3647c171 JB |
401 | ### |
402 | ### Eric Raymond says we should accept strings like "sysvr4" to mean | |
403 | ### "System V Release 4"; he writes, "The old convention encouraged | |
404 | ### confusion between `system' and `release' levels'." | |
405 | ||
8509d50c JB |
406 | machine='' opsys='' unported='false' |
407 | case "${configuration}" in | |
408 | ||
409 | ## Alliant machines | |
20d9a863 JB |
410 | ## Strictly speaking, we need the version of the alliant operating |
411 | ## system to choose the right machine file, but currently the | |
412 | ## configuration name doesn't tell us enough to choose the right | |
413 | ## one; we need to give alliants their own operating system name to | |
414 | ## do this right. When someone cares, they can help us. | |
415 | fx80-alliant-* ) | |
8509d50c | 416 | machine=alliant4 opsys=bsd4-2 |
20d9a863 JB |
417 | ;; |
418 | i860-alliant-* ) | |
8509d50c | 419 | machine=alliant-2800 opsys=bsd4-3 |
20d9a863 | 420 | ;; |
ca1d1d23 | 421 | |
8509d50c JB |
422 | ## Altos 3068 |
423 | m68*-altos-sysv* ) | |
424 | machine=altos opsys=usg5-2 | |
20d9a863 | 425 | ;; |
8509d50c JB |
426 | |
427 | ## Amdahl UTS | |
428 | 580-amdahl-sysv* ) | |
429 | machine=amdahl opsys=usg5-2-2 | |
20d9a863 | 430 | ;; |
ca1d1d23 | 431 | |
8509d50c JB |
432 | ## Appallings - I mean, Apollos - running Domain |
433 | m68*-apollo* ) | |
e4474817 | 434 | machine=apollo opsys=bsd4-2 |
20d9a863 | 435 | ;; |
8509d50c JB |
436 | |
437 | ## AT&T 3b2, 3b5, 3b15, 3b20 | |
438 | we32k-att-sysv* ) | |
439 | machine=att3b opsys=usg5-2-2 | |
440 | ;; | |
441 | ||
442 | ## AT&T 3b1 - The Mighty Unix PC! | |
443 | m68*-att-sysv* ) | |
444 | machine=7300 opsys=usg5-2-2 | |
445 | ;; | |
446 | ||
447 | ## Bull sps7 | |
448 | m68*-bull-sysv* ) | |
449 | machine=sps7 opsys=usg5-2 | |
20d9a863 | 450 | ;; |
8509d50c JB |
451 | |
452 | ## CCI 5/32, 6/32 -- see "Tahoe". | |
453 | ||
454 | ## Celerity | |
455 | ## I don't know what configuration name to use for this; config.sub | |
456 | ## doesn't seem to know anything about it. Hey, Celerity users, get | |
457 | ## in touch with us! | |
458 | celerity-celerity-bsd* ) | |
459 | machine=celerity opsys=bsd4-2 | |
460 | ;; | |
461 | ||
462 | ## Clipper | |
463 | ## What operating systems does this chip run that Emacs has been | |
464 | ## tested on? | |
465 | clipper-* ) | |
466 | machine=clipper | |
467 | ## We'll use the catch-all code at the bottom to guess the | |
468 | ## operating system. | |
469 | ;; | |
470 | ||
471 | ## Convex | |
472 | *-convex-bsd* ) | |
473 | machine=convex opsys=bsd4-3 | |
474 | ;; | |
475 | ||
476 | ## Cubix QBx/386 | |
477 | i386-cubix-sysv* ) | |
478 | machine=intel386 opsys=usg5-3 | |
479 | ;; | |
480 | ||
481 | ## Cydra 5 | |
482 | cydra*-cydrome-sysv* ) | |
483 | machine=cydra5 opsys=usg5-3 | |
484 | ;; | |
485 | ||
b86d694e JB |
486 | ## Data General AViiON Machines |
487 | m88k-dg-dgux* ) | |
488 | machine=aviion opsys=dgux | |
489 | ;; | |
490 | ||
8509d50c JB |
491 | ## DECstations |
492 | mips-dec-ultrix[0-3].* | mips-dec-ultrix4.0 | mips-dec-bsd4.2 ) | |
493 | machine=pmax opsys=bsd4-2 | |
494 | ;; | |
495 | mips-dec-ultrix* | mips-dec-bsd* ) | |
496 | machine=pmax opsys=bsd4-3 | |
497 | ;; | |
498 | mips-dec-osf* ) | |
499 | machine=pmax opsys=osf1 | |
500 | ;; | |
501 | ||
502 | ## Motorola Delta machines | |
503 | m68*-motorola-sysv* ) | |
504 | machine=delta opsys=usg5-3 | |
505 | ;; | |
ac0e6f3b JB |
506 | m88k-motorola-sysv4* ) |
507 | machine=delta88k opsys=usg5-4 | |
508 | ;; | |
8509d50c JB |
509 | m88k-motorola-sysv* | m88k-motorola-m88kbcs* ) |
510 | machine=delta88k opsys=usg5-3 | |
511 | ;; | |
512 | ||
513 | ## Dual machines | |
514 | m68*-dual-sysv* ) | |
515 | machine=dual opsys=usg5-2 | |
516 | ;; | |
517 | m68*-dual-uniplus* ) | |
518 | machine=dual opsys=unipl5-2 | |
519 | ;; | |
520 | ||
521 | ## Elxsi 6400 | |
522 | elxsi-elxsi-sysv* ) | |
523 | machine=elxsi opsys=usg5-2 | |
524 | ;; | |
525 | ||
526 | ## Encore machines | |
527 | ns16k-encore-bsd* ) | |
528 | machine=ns16000 opsys=umax | |
529 | ;; | |
530 | ||
531 | ## The GEC 93 - apparently, this port isn't really finished yet. | |
532 | ||
533 | ## Gould Power Node and NP1 | |
534 | pn-gould-bsd4.2 ) | |
535 | machine=gould opsys=bsd4-2 | |
536 | ;; | |
537 | pn-gould-bsd4.3 ) | |
538 | machine=gould opsys=bsd4-3 | |
539 | ;; | |
540 | np1-gould-bsd* ) | |
541 | machine=gould-np1 opsys=bsd4-3 | |
542 | ;; | |
543 | ||
544 | ## Honeywell XPS100 | |
545 | xps*-honeywell-sysv* ) | |
546 | machine=xps100 opsys=usg5-2 | |
547 | ;; | |
548 | ||
549 | ## HP 9000 series 200 or 300 | |
550 | m68*-hp-bsd* ) | |
551 | machine=hp9000s300 opsys=bsd4-3 | |
552 | ;; | |
d69d8d1e | 553 | ## HP/UX 7, 8 and 9 are supported on these machines. |
20d9a863 | 554 | m68*-hp-hpux* ) |
d69d8d1e JB |
555 | case "`uname -r`" in |
556 | *.08.* ) machine=hp9000s300 opsys=hpux8 ;; | |
557 | *.09.* ) machine=hp9000s300 opsys=hpux9 ;; | |
558 | *) machine=hp9000s300 opsys=hpux ;; | |
559 | esac | |
20d9a863 | 560 | ;; |
ca1d1d23 | 561 | |
c55f453b | 562 | ## HP 9000 series 700 and 800, running HP/UX |
ea2c2e02 | 563 | hppa*-hp-hpux7* ) |
602dc898 | 564 | machine=hp9000s800 opsys=hpux |
c55f453b | 565 | ;; |
ea2c2e02 | 566 | hppa*-hp-hpux8* ) |
602dc898 | 567 | machine=hp9000s800 opsys=hpux8 |
c55f453b | 568 | ;; |
ea2c2e02 | 569 | hppa*-hp-hpux9* ) |
602dc898 | 570 | machine=hp9000s800 opsys=hpux9 |
ea2c2e02 JB |
571 | ;; |
572 | ||
573 | ## HP 9000 series 700 and 800, running HP/UX | |
c55f453b JB |
574 | hppa*-hp-hpux* ) |
575 | ## Cross-compilation? Nah! | |
252c8b3b | 576 | case "`uname -r`" in |
ea2c2e02 JB |
577 | *.08.* ) machine=hp9000s800 opsys=hpux8 ;; |
578 | *.09.* ) machine=hp9000s800 opsys=hpux9 ;; | |
252c8b3b | 579 | *) machine=hp9000s800 opsys=hpux ;; |
c55f453b | 580 | esac |
8509d50c JB |
581 | ;; |
582 | ||
583 | ## Orion machines | |
584 | orion-orion-bsd* ) | |
585 | machine=orion opsys=bsd4-2 | |
586 | ;; | |
587 | clipper-orion-bsd* ) | |
588 | machine=orion105 opsys=bsd4-2 | |
589 | ;; | |
590 | ||
591 | ## IBM machines | |
592 | i386-ibm-aix1.1 ) | |
593 | machine=ibmps2-aix opsys=usg5-2-2 | |
594 | ;; | |
f2d5c40e | 595 | i386-ibm-aix1.[23] | i386-ibm-aix* ) |
8509d50c JB |
596 | machine=ibmps2-aix opsys=usg5-3 |
597 | ;; | |
17a624d1 | 598 | rs6000-ibm-aix3.1 ) |
8509d50c JB |
599 | machine=ibmrs6000 opsys=aix3-1 |
600 | ;; | |
17a624d1 JB |
601 | rs6000-ibm-aix3.2 | rs6000-ibm-aix* ) |
602 | machine=ibmrs6000 opsys=aix3-2 | |
603 | ;; | |
d20c62bf RS |
604 | romp-ibm-bsd4-3 ) |
605 | machine=ibmrt opsys=bsd4-3 | |
606 | ;; | |
607 | romp-ibm-bsd4-2 ) | |
608 | machine=ibmrt opsys=bsd4-2 | |
609 | ;; | |
610 | romp-ibm-aos4-3 ) | |
611 | machine=ibmrt opsys=bsd4-3 | |
612 | ;; | |
613 | romp-ibm-aos4-2 ) | |
8509d50c JB |
614 | machine=ibmrt opsys=bsd4-2 |
615 | ;; | |
d20c62bf RS |
616 | romp-ibm-aos* ) |
617 | machine=ibmrt opsys=bsd4-3 | |
618 | ;; | |
619 | romp-ibm-bsd* ) | |
620 | machine=ibmrt opsys=bsd4-3 | |
621 | ;; | |
8509d50c JB |
622 | romp-ibm-aix* ) |
623 | machine=ibmrt-aix opsys=usg5-2-2 | |
624 | ;; | |
625 | ||
626 | ## Integrated Solutions `Optimum V' | |
627 | m68*-isi-bsd4.2 ) | |
628 | machine=isi-ov opsys=bsd4-2 | |
629 | ;; | |
630 | m68*-isi-bsd4.3 ) | |
631 | machine=isi-ov opsys=bsd4-3 | |
632 | ;; | |
633 | ||
634 | ## Intel 386 machines where we do care about the manufacturer | |
635 | i[34]86-intsys-sysv* ) | |
636 | machine=is386 opsys=usg5-2-2 | |
637 | ;; | |
6992e6b7 RS |
638 | |
639 | ## Prime EXL | |
640 | i386-prime-sysv* ) | |
641 | machine=i386 opsys=usg5-3 | |
642 | ;; | |
643 | ||
644 | ## Sequent Symmetry | |
645 | i386-sequent-bsd* ) | |
646 | machine=symmetry opsys=bsd4-3 | |
647 | ;; | |
648 | ||
df4da582 JB |
649 | ## Intel 860 |
650 | i860-*-sysvr4 ) | |
651 | machine=i860 opsys=usg5-4 | |
652 | ;; | |
653 | ||
8509d50c JB |
654 | ## Silicon Graphics machines |
655 | ## Iris 2500 and Iris 2500 Turbo (aka the Iris 3030) | |
656 | m68*-sgi-iris3.5 ) | |
657 | machine=irist opsys=iris3-5 | |
658 | ;; | |
659 | m68*-sgi-iris3.6 | m68*-sgi-iris*) | |
660 | machine=irist opsys=iris3-6 | |
661 | ;; | |
662 | ## Iris 4D | |
663 | mips-sgi-irix3.* ) | |
664 | machine=iris4d opsys=irix3-3 | |
665 | ;; | |
666 | mips-sgi-irix4.* | mips-sgi-irix* ) | |
667 | machine=iris4d opsys=irix4-0 | |
20d9a863 JB |
668 | ;; |
669 | ||
8509d50c JB |
670 | ## Masscomp machines |
671 | m68*-masscomp-rtu ) | |
672 | machine=masscomp opsys=rtu | |
673 | ;; | |
674 | ||
675 | ## Megatest machines | |
676 | m68*-megatest-bsd* ) | |
677 | machine=mega68 opsys=bsd4-2 | |
678 | ;; | |
679 | ||
680 | ## Workstations sold by MIPS | |
681 | ## This is not necessarily all workstations using the MIPS processor - | |
682 | ## Irises are produced by SGI, and DECstations by DEC. | |
683 | ||
684 | ## etc/MACHINES lists mips.h and mips4.h as possible machine files, | |
685 | ## and usg5-2-2 and bsd4-3 as possible OS files. The only guidance | |
686 | ## it gives for choosing between the alternatives seems to be "Use | |
687 | ## -machine=mips4 for RISCOS version 4; use -opsystem=bsd4-3 with | |
688 | ## the BSD world." I'll assume that these are instructions for | |
689 | ## handling two odd situations, and that every other situation | |
690 | ## should use mips.h and usg5-2-2, they being listed first. | |
60e1b37f JB |
691 | mips-mips-usg* ) |
692 | machine=mips4 | |
693 | ## Fall through to the general code at the bottom to decide on the OS. | |
694 | ;; | |
8509d50c | 695 | mips-mips-riscos4* ) |
cc40a99e | 696 | machine=mips4 opsys=bsd4-3 |
8509d50c JB |
697 | ;; |
698 | mips-mips-bsd* ) | |
699 | machine=mips opsys=bsd4-3 | |
700 | ;; | |
701 | mips-mips-* ) | |
702 | machine=mips opsys=usg5-2-2 | |
703 | ;; | |
704 | ||
c5f67786 JB |
705 | ## NeXT |
706 | m68*-next-mach* | m68*-next-bsd* ) | |
707 | machine=next opsys=mach2 | |
708 | ;; | |
709 | ||
8509d50c JB |
710 | ## The complete machine from National Semiconductor |
711 | ns32k-ns-genix* ) | |
712 | machine=ns32000 opsys=usg5-2 | |
713 | ;; | |
714 | ||
715 | ## NCR machines | |
3647c171 | 716 | m68*-ncr-sysv2* | m68*-ncr-sysvr2* ) |
8509d50c JB |
717 | machine=tower32 opsys=usg5-2-2 |
718 | ;; | |
3647c171 | 719 | m68*-ncr-sysv3* | m68*-ncr-sysvr3* ) |
8509d50c JB |
720 | machine=tower32v3 opsys=usg5-3 |
721 | ;; | |
722 | ||
723 | ## Nixdorf Targon 31 | |
724 | m68*-nixdorf-sysv* ) | |
725 | machine=targon31 opsys=usg5-2-2 | |
726 | ;; | |
727 | ||
728 | ## Nu (TI or LMI) | |
729 | m68*-nu-sysv* ) | |
730 | machine=nu opsys=usg5-2 | |
731 | ;; | |
732 | ||
733 | ## Plexus | |
734 | m68*-plexus-sysv* ) | |
735 | machine=plexus opsys=usg5-2 | |
736 | ;; | |
737 | ||
8509d50c JB |
738 | ## Pyramid machines |
739 | ## I don't really have any idea what sort of processor the Pyramid has, | |
740 | ## so I'm assuming it is its own architecture. | |
741 | pyramid-pyramid-bsd* ) | |
742 | machine=pyramid opsys=bsd4-2 | |
743 | ;; | |
744 | ||
745 | ## Sequent Balance | |
746 | ns32k-sequent-bsd4.2 ) | |
747 | machine=sequent opsys=bsd4-2 | |
748 | ;; | |
749 | ns32k-sequent-bsd4.3 ) | |
750 | machine=sequent opsys=bsd4-3 | |
8509d50c JB |
751 | ;; |
752 | ||
753 | ## SONY machines | |
754 | m68*-sony-bsd4.2 ) | |
755 | machine=news opsys=bsd4-2 | |
756 | ;; | |
757 | m68*-sony-bsd4.3 ) | |
758 | machine=news opsys=bsd4-3 | |
759 | ;; | |
760 | mips-sony-bsd* ) | |
761 | machine=news-risc opsys=bsd4-3 | |
762 | ;; | |
763 | ||
764 | ## Stride | |
765 | m68*-stride-sysv* ) | |
766 | machine=stride opsys=usg5-2 | |
767 | ;; | |
768 | ||
769 | ## Suns | |
ddb73021 | 770 | *-sun-sunos* | *-sun-bsd* | *-sun-solaris* ) |
8509d50c JB |
771 | case "${configuration}" in |
772 | m68*-sunos1* ) machine=sun1 ;; | |
773 | m68*-sunos2* ) machine=sun2 ;; | |
774 | m68* ) machine=sun3 ;; | |
775 | i[34]86* ) machine=sun386 ;; | |
776 | sparc* ) machine=sparc ;; | |
777 | * ) unported=true ;; | |
778 | esac | |
779 | case "${configuration}" in | |
780 | *-sunos4.0* ) opsys=sunos4-0 ;; | |
7498a871 | 781 | *-sunos4.1.3* ) opsys=sunos4-1-3 ;; |
8509d50c | 782 | *-sunos4* | *-sunos ) opsys=sunos4-1 ;; |
ddb73021 | 783 | *-sunos5* | *-solaris* ) opsys=sol2 ;; |
8509d50c | 784 | * ) opsys=bsd4-2 ;; |
20d9a863 | 785 | esac |
8509d50c JB |
786 | ;; |
787 | ||
788 | ## Tadpole 68k | |
789 | m68*-tadpole-sysv* ) | |
790 | machine=tad68k opsys=usg5-3 | |
791 | ;; | |
792 | ||
793 | ## Tahoe machines | |
794 | tahoe-tahoe-bsd4.2 ) | |
795 | machine=tahoe opsys=bsd4-2 | |
796 | ;; | |
797 | tahoe-tahoe-bsd4.3 ) | |
798 | machine=tahoe opsys=bsd4-3 | |
799 | ;; | |
800 | ||
801 | ## Tandem Integrity S2 | |
802 | mips-tandem-sysv* ) | |
803 | machine=tandem-s2 opsys=usg5-3 | |
804 | ;; | |
805 | ||
26f186c2 JB |
806 | ## Tektronix XD88 |
807 | m88k-tektronix-sysv3 ) | |
808 | machine=tekXD88 opsys=usg5-3 | |
809 | ;; | |
810 | ||
8509d50c JB |
811 | ## Tektronix 16000 box (6130?) |
812 | ns16k-tektronix-bsd* ) | |
813 | machine=ns16000 opsys=bsd4-2 | |
814 | ;; | |
815 | ## Tektronix 4300 | |
816 | ## src/m/tek4300.h hints that this is a m68k machine. | |
817 | m68*-tektronix-bsd* ) | |
818 | machine=tex4300 opsys=bsd4-3 | |
819 | ;; | |
820 | ||
821 | ## Titan P2 or P3 | |
822 | ## We seem to have lost the machine-description file titan.h! | |
823 | titan-titan-sysv* ) | |
824 | machine=titan opsys=usg5-3 | |
825 | ;; | |
826 | ||
827 | ## Ustation E30 (SS5E) | |
828 | m68*-unisys-uniplus* ) | |
829 | machine=ustation opsystem=unipl5-2 | |
830 | ;; | |
831 | ||
832 | ## Vaxen. | |
833 | vax-dec-* ) | |
834 | machine=vax | |
835 | case "${configuration}" in | |
3647c171 JB |
836 | *-bsd4.1 ) opsys=bsd4-1 ;; |
837 | *-bsd4.2 | *-ultrix[0-3].* | *-ultrix4.0 ) opsys=bsd4-2 ;; | |
838 | *-bsd4.3 | *-ultrix* ) opsys=bsd4-3 ;; | |
87a6b538 | 839 | *-bsd386 ) opsys=bsd386 ;; |
3647c171 JB |
840 | *-sysv[01]* | *-sysvr[01]* ) opsys=usg5-0 ;; |
841 | *-sysv2* | *-sysvr2* ) opsys=usg5-2 ;; | |
842 | *-vms* ) opsys=vms ;; | |
843 | * ) unported=true | |
20d9a863 JB |
844 | esac |
845 | ;; | |
846 | ||
8509d50c JB |
847 | ## Whitechapel MG1 |
848 | ns16k-whitechapel-* ) | |
849 | machine=mg1 | |
850 | ## We don't know what sort of OS runs on these; we'll let the | |
851 | ## operating system guessing code below try. | |
852 | ;; | |
853 | ||
854 | ## Wicat | |
855 | m68*-wicat-sysv* ) | |
856 | machine=wicat opsys=usg5-2 | |
857 | ;; | |
858 | ||
b3fb7fc3 JB |
859 | ## Intel 386 machines where we don't care about the manufacturer |
860 | i[34]86-*-* ) | |
861 | machine=intel386 | |
862 | case "${configuration}" in | |
863 | *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;; | |
864 | *-isc2.2 ) opsys=isc2-2 ;; | |
865 | *-isc* ) opsys=isc3-0 ;; | |
866 | *-esix5* ) opsys=esix5r4 ;; | |
867 | *-esix* ) opsys=esix ;; | |
868 | *-xenix* ) opsys=xenix ;; | |
869 | *-linux* ) opsys=linux ;; | |
870 | *-sco3.2v4* ) opsys=sco4 ;; | |
871 | *-bsd386* ) opsys=bsd386 ;; | |
872 | *-386bsd ) opsys=386bsd ;; | |
873 | ## Otherwise, we'll fall through to the generic opsys code at the bottom. | |
874 | esac | |
875 | ;; | |
876 | ||
20d9a863 | 877 | * ) |
8509d50c | 878 | unported=true |
20d9a863 | 879 | ;; |
20d9a863 | 880 | esac |
ca1d1d23 | 881 | |
8509d50c JB |
882 | ### If the code above didn't choose an operating system, just choose |
883 | ### an operating system based on the configuration name. You really | |
884 | ### only want to use this when you have no idea what the right | |
885 | ### operating system is; if you know what operating systems a machine | |
886 | ### runs, it's cleaner to make it explicit in the case statement | |
887 | ### above. | |
87a6b538 | 888 | if [ x"${opsys}" = x ]; then |
8509d50c JB |
889 | case "${configuration}" in |
890 | *-bsd4.[01] ) opsys=bsd4-1 ;; | |
891 | *-bsd4.2 ) opsys=bsd4-2 ;; | |
892 | *-bsd4.3 ) opsys=bsd4-3 ;; | |
3647c171 JB |
893 | *-sysv0 | *-sysvr0 ) opsys=usg5-0 ;; |
894 | *-sysv2 | *-sysvr2 ) opsys=usg5-2 ;; | |
895 | *-sysv2.2 | *-sysvr2.2 ) opsys=usg5-2-2 ;; | |
896 | *-sysv3 | *-sysvr3 ) opsys=usg5-3 ;; | |
897 | *-sysv4 | *-sysvr4 ) opsys=usg5-4 ;; | |
7846ef2c | 898 | *-sysv4.2 | *-sysvr4.2 ) opsys=usg5-4-2 ;; |
8509d50c JB |
899 | * ) |
900 | unported=true | |
901 | ;; | |
902 | esac | |
903 | fi | |
904 | ||
905 | if $unported ; then | |
906 | (echo "${progname}: Emacs hasn't been ported to \`${configuration}' systems." | |
907 | echo "${progname}: Check \`etc/MACHINES' for recognized configuration names." | |
908 | ) >&2 | |
909 | exit 1 | |
910 | fi | |
911 | ||
912 | machfile="m/${machine}.h" | |
913 | opsysfile="s/${opsys}.h" | |
914 | ||
c5f67786 JB |
915 | ] |
916 | AC_PREPARE(lisp) | |
e4474817 | 917 | AC_CONFIG_HEADER(src/config.h) |
c5f67786 | 918 | [ |
7d99494c JB |
919 | |
920 | #### Choose a compiler. | |
7d99494c | 921 | case ${with_gcc} in |
8ba83d88 JB |
922 | "yes" ) CC="gcc" GCC=1 ;; |
923 | "no" ) CC="cc" ;; | |
7d99494c | 924 | * ) |
e4474817 | 925 | ] AC_PROG_CC [ |
7d99494c JB |
926 | esac |
927 | ||
00c564b5 JB |
928 | #### Some other nice autoconf tests. If you add a test here which |
929 | #### should make an entry in src/config.h, don't forget to add an | |
930 | #### #undef clause to src/config.h.in for autoconf to modify. | |
7d99494c | 931 | ] |
00c564b5 | 932 | dnl checks for programs |
e4474817 | 933 | AC_LN_S |
c5f67786 | 934 | AC_PROG_CPP |
86ddcc58 | 935 | AC_PROG_INSTALL |
4b5a51c1 | 936 | AC_PROG_YACC |
00c564b5 JB |
937 | |
938 | dnl checks for UNIX variants that set `DEFS' | |
939 | ||
940 | dnl checks for header files | |
a6eb6797 | 941 | AC_HAVE_HEADERS(sys/timeb.h sys/time.h) |
d855a603 | 942 | AC_STDC_HEADERS |
9397d456 | 943 | AC_TIME_WITH_SYS_TIME |
00c564b5 | 944 | |
4ed216b3 JB |
945 | dnl checks for library files |
946 | AC_HAVE_LIBRARY(-ldnet) | |
947 | ||
00c564b5 | 948 | dnl checks for typedefs |
7d99494c | 949 | AC_RETSIGTYPE |
00c564b5 JB |
950 | |
951 | dnl checks for functions | |
c5f67786 | 952 | AC_ALLOCA |
22288fe1 | 953 | AC_HAVE_FUNCS(gettimeofday gethostname dup2 rename closedir) |
00c564b5 JB |
954 | |
955 | dnl checks for structure members | |
a6eb6797 | 956 | AC_STRUCT_TM |
d52c5f58 | 957 | AC_TIMEZONE |
00c564b5 JB |
958 | |
959 | dnl checks for compiler characteristics | |
c5f67786 | 960 | AC_CONST |
00c564b5 JB |
961 | |
962 | dnl checks for operating system services | |
fe5de478 | 963 | AC_LONG_FILE_NAMES |
00c564b5 JB |
964 | |
965 | dnl other checks for UNIX variants | |
7d99494c JB |
966 | [ |
967 | ||
ca1d1d23 | 968 | |
0c22fbca | 969 | #### Choose a window system. |
46947372 | 970 | echo "Checking window system." |
c5f67786 | 971 | |
8509d50c | 972 | window_system='' |
20d9a863 | 973 | case "${with_x}" in |
2c44309a RS |
974 | yes ) |
975 | window_system=${window_system}x11 | |
20d9a863 JB |
976 | ;; |
977 | no ) | |
978 | window_system=${window_system}none | |
2c44309a | 979 | esac |
20d9a863 | 980 | case "${with_x11}" in |
2c44309a RS |
981 | yes ) |
982 | window_system=${window_system}x11 | |
20d9a863 | 983 | ;; |
2c44309a RS |
984 | esac |
985 | case "${with_x10}" in | |
986 | yes ) | |
987 | window_system=${window_system}x10 | |
20d9a863 | 988 | ;; |
2c44309a RS |
989 | esac |
990 | ||
ca1d1d23 JB |
991 | case "${window_system}" in |
992 | "none" | "x11" | "x10" ) ;; | |
ca1d1d23 | 993 | "" ) |
55c1a819 | 994 | echo " No window system specified. Looking for X11." |
ca1d1d23 | 995 | window_system=none |
5d9aefc7 JB |
996 | if [ -r /usr/lib/libX11.a \ |
997 | -o -d /usr/include/X11 \ | |
7d99494c JB |
998 | -o -d /usr/X386/include \ |
999 | -o -d ${x_includes}/X11 ]; then | |
ca1d1d23 | 1000 | window_system=x11 |
46947372 | 1001 | fi |
ca1d1d23 JB |
1002 | ;; |
1003 | * ) | |
97a983f4 | 1004 | echo "Don't specify the window system more than once." >&2 |
ca1d1d23 JB |
1005 | exit 1 |
1006 | ;; | |
1007 | esac | |
1008 | ||
1009 | case "${window_system}" in | |
1010 | x11 ) | |
0c22fbca JB |
1011 | HAVE_X_WINDOWS=yes |
1012 | HAVE_X11=yes | |
8509d50c | 1013 | echo " Using X11." |
ca1d1d23 JB |
1014 | ;; |
1015 | x10 ) | |
0c22fbca JB |
1016 | HAVE_X_WINDOWS=yes |
1017 | HAVE_X11=no | |
8509d50c | 1018 | echo " Using X10." |
ca1d1d23 JB |
1019 | ;; |
1020 | none ) | |
0c22fbca JB |
1021 | HAVE_X_WINDOWS=no |
1022 | HAVE_X11=no | |
8509d50c | 1023 | echo " Using no window system." |
ca1d1d23 JB |
1024 | ;; |
1025 | esac | |
1026 | ||
0c22fbca JB |
1027 | ### If we're using X11, we should use the X menu package. |
1028 | HAVE_X_MENU=no | |
1029 | case ${HAVE_X11} in | |
20d9a863 | 1030 | yes ) |
0c22fbca | 1031 | HAVE_X_MENU=yes |
ca1d1d23 JB |
1032 | ;; |
1033 | esac | |
1034 | ||
0c22fbca | 1035 | #### Extract some information from the operating system and machine files. |
4746118a | 1036 | |
46947372 JB |
1037 | echo "Examining the machine- and system-dependent files to find out" |
1038 | echo " - which libraries the lib-src programs will want, and" | |
1039 | echo " - whether the GNU malloc routines are usable." | |
c5f67786 JB |
1040 | |
1041 | ### It's not important that this name contain the PID; you can't run | |
1042 | ### two configures in the same directory and have anything work | |
1043 | ### anyway. | |
1044 | tempcname="conftest.c" | |
1045 | ||
e94740ce JB |
1046 | echo ' |
1047 | #include "'${srcdir}'/src/'${opsysfile}'" | |
1048 | #include "'${srcdir}'/src/'${machfile}'" | |
ca1d1d23 JB |
1049 | #ifndef LIBS_MACHINE |
1050 | #define LIBS_MACHINE | |
1051 | #endif | |
1052 | #ifndef LIBS_SYSTEM | |
1053 | #define LIBS_SYSTEM | |
1054 | #endif | |
80afd15e JB |
1055 | #ifndef C_SWITCH_SYSTEM |
1056 | #define C_SWITCH_SYSTEM | |
f071c05a | 1057 | #endif |
4746118a | 1058 | @configure@ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM |
80afd15e | 1059 | @configure@ c_switch_system=C_SWITCH_SYSTEM |
ac384e4f JB |
1060 | |
1061 | #ifdef UNEXEC | |
1062 | @configure@ unexec=UNEXEC | |
1063 | #else | |
1064 | @configure@ unexec=unexec.o | |
1065 | #endif | |
1066 | ||
46947372 | 1067 | #ifdef SYSTEM_MALLOC |
4746118a | 1068 | @configure@ system_malloc=yes |
46947372 | 1069 | #else |
4746118a | 1070 | @configure@ system_malloc=no |
46947372 | 1071 | #endif |
4ed216b3 JB |
1072 | |
1073 | #ifndef C_DEBUG_SWITCH | |
1074 | #define C_DEBUG_SWITCH -g | |
1075 | #endif | |
1076 | ||
1077 | #ifndef C_OPTIMIZE_SWITCH | |
1078 | #define C_OPTIMIZE_SWITCH -O | |
1079 | #endif | |
1080 | ||
1081 | #ifdef __GNUC__ | |
1082 | @configure@ CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH | |
1083 | #else | |
1084 | @configure@ CFLAGS=C_DEBUG_SWITCH | |
1085 | #endif | |
46947372 | 1086 | ' > ${tempcname} |
a6eb6797 JB |
1087 | # The value of CPP is a quoted variable reference, so we need to do this |
1088 | # to get its actual value... | |
b73fe839 JB |
1089 | CPP=`eval "echo $CPP"` |
1090 | eval `${CPP} -Isrc ${tempcname} \ | |
5d9aefc7 JB |
1091 | | grep '@configure@' \ |
1092 | | sed -e 's/^@configure@ \([^=]*=\)\(.*\)$/\1"\2"/'` | |
46947372 JB |
1093 | rm ${tempcname} |
1094 | ||
ac384e4f JB |
1095 | ### Compute the unexec source name from the object name. |
1096 | UNEXEC_SRC="`echo ${unexec} | sed 's/\.o/.c/'`" | |
7d99494c | 1097 | |
46947372 | 1098 | # Do the opsystem or machine files prohibit the use of the GNU malloc? |
e94740ce JB |
1099 | # Assume not, until told otherwise. |
1100 | GNU_MALLOC=yes | |
46947372 | 1101 | if [ "${system_malloc}" = "yes" ]; then |
0c22fbca JB |
1102 | GNU_MALLOC=no |
1103 | GNU_MALLOC_reason=" | |
8509d50c | 1104 | (The GNU allocators don't work with this system configuration.)" |
46947372 JB |
1105 | fi |
1106 | ||
87a6b538 | 1107 | if [ x"${REL_ALLOC}" = x ]; then |
0c22fbca | 1108 | REL_ALLOC=${GNU_MALLOC} |
46947372 | 1109 | fi |
ca1d1d23 | 1110 | |
0c22fbca JB |
1111 | LISP_FLOAT_TYPE=yes |
1112 | ||
e94740ce | 1113 | |
30945baf JB |
1114 | #### Add the X libraries to the list, and check for some functions found there. |
1115 | CFLAGS_save="$CFLAGS" | |
1116 | CFLAGS="${CFLAGS} ${LD_SWITCH_X_SITE}" | |
1117 | ] | |
1118 | AC_HAVE_LIBRARY(-lXbsd) | |
1119 | [ | |
1120 | LIBS_save="$LIBS" | |
1121 | if [ "${HAVE_X11}" = "yes" ] ; then | |
1122 | LIBS="-lX11 ${LIBS}" | |
1123 | fi | |
1124 | ] | |
1125 | AC_HAVE_FUNCS(XrmSetDatabase random) | |
1126 | [ | |
1127 | CFLAGS="$CFLAGS_save" | |
1128 | LIBS="$LIBS_save" | |
1129 | ||
564d75ed JB |
1130 | case "${window_system}:${LIBS}" in |
1131 | x11:*-lXbsd* ) | |
1132 | if [ -d /usr/X386/include ]; then | |
1133 | HAVE_XFREE386=yes | |
1134 | if [ "${C_SWITCH_X_SITE}" = "" ]; then | |
1135 | C_SWITCH_X_SITE="-I/usr/X386/include" | |
1136 | fi | |
1137 | fi | |
1138 | ;; | |
1139 | esac | |
30945baf | 1140 | |
e94740ce JB |
1141 | #### Find out which version of Emacs this is. |
1142 | version=`grep 'defconst[ ]*emacs-version' ${srcdir}/lisp/version.el \ | |
1143 | | sed -e 's/^.*"\([0-9][0-9]*\.[0-9][0-9]*\)\..*$/\1/'` | |
87a6b538 | 1144 | if [ x"${version}" = x ]; then |
e94740ce JB |
1145 | echo "${progname}: can't find current emacs version in |
1146 | \`${srcdir}/lisp/version.el'." >&2 | |
1147 | exit 1 | |
1148 | fi | |
1149 | ||
1150 | ||
e4474817 | 1151 | #### Specify what sort of things we'll be editing into Makefile and config.h. |
7d99494c JB |
1152 | ] |
1153 | AC_SUBST(configuration) | |
1154 | AC_SUBST(version) | |
1155 | AC_SUBST(srcdir) | |
1156 | AC_SUBST(c_switch_system) | |
1157 | AC_SUBST(libsrc_libs) | |
c5f67786 JB |
1158 | AC_SUBST(rip_paths) |
1159 | AC_SUBST(inst_paths) | |
7d99494c JB |
1160 | AC_SUBST(LD_SWITCH_X_SITE) |
1161 | AC_SUBST(C_SWITCH_X_SITE) | |
e4474817 | 1162 | AC_SUBST(CFLAGS) |
ae6756a2 | 1163 | AC_SUBST(prefix) |
86ddcc58 | 1164 | AC_SUBST(exec_prefix) |
e4474817 | 1165 | |
9361e005 JB |
1166 | AC_DEFINE_UNQUOTED(config_machfile, "\"${machfile}\"") |
1167 | AC_DEFINE_UNQUOTED(config_opsysfile, "\"${opsysfile}\"") | |
1168 | AC_DEFINE_UNQUOTED(LD_SWITCH_X_SITE, ${LD_SWITCH_X_SITE}) | |
1169 | AC_DEFINE_UNQUOTED(C_SWITCH_X_SITE, ${C_SWITCH_X_SITE}) | |
ac384e4f | 1170 | AC_DEFINE_UNQUOTED(UNEXEC_SRC, ${UNEXEC_SRC}) |
9361e005 | 1171 | |
7d99494c JB |
1172 | [ |
1173 | if [ "${HAVE_X_WINDOWS}" = "yes" ] ; then | |
1174 | ] AC_DEFINE(HAVE_X_WINDOWS) [ | |
1175 | fi | |
1176 | if [ "${HAVE_X11}" = "yes" ] ; then | |
1177 | ] AC_DEFINE(HAVE_X11) [ | |
1178 | fi | |
1179 | if [ "${HAVE_XFREE386}" = "yes" ] ; then | |
1180 | ] AC_DEFINE(HAVE_XFREE386) [ | |
1181 | fi | |
1182 | if [ "${HAVE_X_MENU}" = "yes" ] ; then | |
1183 | ] AC_DEFINE(HAVE_X_MENU) [ | |
1184 | fi | |
1185 | if [ "${GNU_MALLOC}" = "yes" ] ; then | |
1186 | ] AC_DEFINE(GNU_MALLOC) [ | |
1187 | fi | |
1188 | if [ "${REL_ALLOC}" = "yes" ] ; then | |
1189 | ] AC_DEFINE(REL_ALLOC) [ | |
1190 | fi | |
1191 | if [ "${LISP_FLOAT_TYPE}" = "yes" ] ; then | |
1192 | ] AC_DEFINE(LISP_FLOAT_TYPE) [ | |
1193 | fi | |
ca1d1d23 | 1194 | |
f6766fff | 1195 | |
7d99494c JB |
1196 | #### Report on what we decided to do. |
1197 | echo " | |
f6766fff | 1198 | |
7d99494c | 1199 | Configured for \`${configuration}'. |
8509d50c | 1200 | |
c9ed10f6 | 1201 | Where should the build process find the source code? ${srcdir} |
8509d50c JB |
1202 | What operating system and machine description files should Emacs use? |
1203 | \`${opsysfile}' and \`${machfile}' | |
e4474817 | 1204 | What compiler should emacs be built with? ${CC} ${CFLAGS} |
0c22fbca JB |
1205 | Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason} |
1206 | Should Emacs use the relocating allocator for buffers? ${REL_ALLOC} | |
7d99494c | 1207 | What window system should Emacs use? ${window_system}${x_includes+ |
9c7a7556 | 1208 | Where do we find X Windows header files? }${x_includes}${x_libraries+ |
7d99494c | 1209 | Where do we find X Windows libraries? }${x_libraries} |
8c0e7b73 | 1210 | |
e94740ce | 1211 | " |
7d99494c | 1212 | ] |
e4474817 | 1213 | AC_OUTPUT(Makefile) |