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 | |
4703b679 | 5 | dnl version 1.8 or later. |
8fc40e80 JB |
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 | 10 | #### Configuration script for GNU Emacs |
5dd53b99 | 11 | #### Copyright (C) 1992, 1994 Free Software Foundation, Inc. |
0c22fbca | 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 | |
d317463c | 18 | ### in the this directory. You must have autoconf version 1.7 or later. |
8fc40e80 | 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 | |
5dd53b99 | 24 | ### the Free Software Foundation; either version 2, or (at your option) |
0c22fbca JB |
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 | ### Since Emacs has configuration requirements that autoconf can't |
37 | ### meet, this file is an unholy marriage of custom-baked | |
44ee550f | 38 | ### configuration code and autoconf macros. |
7d99494c JB |
39 | ### |
40 | ### We use the m4 quoting characters [ ] (as established by the | |
41 | ### autoconf system) to include large sections of raw sewage - Oops, I | |
42 | ### mean, shell code - in the final configuration script. | |
0c22fbca JB |
43 | ### |
44 | ### Usage: configure config_name | |
45 | ### | |
46 | ### If configure succeeds, it leaves its status in config.status. | |
47 | ### If configure fails after disturbing the status quo, | |
48 | ### config.status is removed. | |
0c22fbca | 49 | |
3647c171 JB |
50 | ### Remove any more than one leading "." element from the path name. |
51 | ### If we don't remove them, then another "./" will be prepended to | |
52 | ### the file name each time we use config.status, and the program name | |
53 | ### will get larger and larger. This wouldn't be a problem, except | |
54 | ### that since progname gets recorded in all the Makefiles this script | |
55 | ### produces, move-if-change thinks they're different when they're | |
56 | ### not. | |
0c22fbca JB |
57 | ### |
58 | ### It would be nice if we could put the ./ in a \( \) group and then | |
59 | ### apply the * operator to that, so we remove as many leading ./././'s | |
60 | ### as are present, but some seds (like Ultrix's sed) don't allow you to | |
61 | ### apply * to a \( \) group. Bleah. | |
3647c171 | 62 | progname="`echo $0 | sed 's:^\./\./:\./:'`" |
ca1d1d23 | 63 | |
ca1d1d23 | 64 | |
cedb6c1b BF |
65 | ### Establish some default values. |
66 | run_in_place= | |
67 | single_tree= | |
68 | prefix='/usr/local' | |
69 | exec_prefix='${prefix}' | |
70 | bindir='${exec_prefix}/bin' | |
71 | datadir='${prefix}/lib' | |
72 | statedir='${prefix}/lib' | |
73 | libdir='${exec_prefix}/lib' | |
74 | mandir='${prefix}/man/man1' | |
75 | infodir='${prefix}/info' | |
76 | lispdir='${datadir}/emacs/${version}/lisp' | |
77 | locallisppath='${datadir}/emacs/site-lisp' | |
78 | lisppath='${locallisppath}:${lispdir}' | |
79 | etcdir='${datadir}/emacs/${version}/etc' | |
80 | lockdir='${statedir}/emacs/lock' | |
81 | archlibdir='${libdir}/emacs/${version}/${configuration}' | |
080d8166 | 82 | docdir='${datadir}/emacs/${version}/etc' |
cedb6c1b | 83 | |
1c4ce111 RS |
84 | # On Sun systems, people sometimes set up the variable CPP |
85 | # with a value that is a directory, not an executable at all. | |
86 | # Detect that case, and ignore that value. | |
87 | if [ "x$CPP" != x ] && [ -d "$CPP" ]; | |
88 | then | |
89 | CPP= | |
90 | fi | |
91 | ||
cedb6c1b BF |
92 | # We cannot use this variable in the case statement below, because many |
93 | # /bin/sh's have broken semantics for "case". Unfortunately, you must | |
94 | # actually edit the clause itself. | |
95 | # path_options="prefix | exec_prefix | bindir | libdir | etcdir | datadir" | |
96 | # path_options="$path_options | archlibdir | statedir | mandir | infodir" | |
97 | # path_options="$path_options | lispdir | lockdir | lisppath | locallisppath" | |
98 | ||
0c22fbca JB |
99 | #### Usage messages. |
100 | ||
ae6756a2 | 101 | short_usage="Usage: ${progname} CONFIGURATION [-OPTION[=VALUE] ...] |
8509d50c | 102 | |
ca1d1d23 | 103 | Set compilation and installation parameters for GNU Emacs, and report. |
8509d50c | 104 | CONFIGURATION specifies the machine and operating system to build for. |
ae6756a2 | 105 | --with-x Support the X Window System. |
b735d4b3 | 106 | --with-x=no Don't support X. |
1c4ce111 RS |
107 | --with-x-toolkit Use an X toolkit. |
108 | --with-x-toolkit=no Don't use an X toolkit. | |
ae6756a2 JB |
109 | --with-gcc Use GCC to compile Emacs. |
110 | --with-gcc=no Don't use GCC to compile Emacs. | |
1c4ce111 RS |
111 | --x-includes=DIR Search for X header files in DIR. |
112 | --x-libraries=DIR Search for X libraries in DIR. | |
ae6756a2 JB |
113 | --run-in-place Use libraries and data files directly out of the |
114 | source tree. | |
cedb6c1b BF |
115 | --single-tree=DIR Has the effect of creating a directory tree at DIR |
116 | which looks like: | |
117 | .../DIR/bin/CONFIGNAME (emacs, etags, etc.) | |
118 | .../DIR/bin/CONFIGNAME/etc (movemail, etc.) | |
119 | .../DIR/common/lisp (emacs' lisp files) | |
120 | .../DIR/common/site-lisp (local lisp files) | |
121 | .../DIR/common/lib (DOC, TUTORIAL, etc.) | |
122 | .../DIR/common/lock (lockfiles) | |
123 | --srcdir=DIR Look for the Emacs source files in DIR. | |
124 | --prefix=DIR Install files below DIR. Defaults to \`${prefix}'. | |
125 | ||
126 | You may also specify any of the \`path' variables found in Makefile.in, | |
127 | including --bindir, --libdir, --etcdir, --infodir, and so on. This allows | |
128 | you to override a single default location when configuring. | |
0c22fbca | 129 | |
ca1d1d23 | 130 | If successful, ${progname} leaves its status in config.status. If |
0c22fbca JB |
131 | unsuccessful after disturbing the status quo, it removes config.status." |
132 | ||
133 | ||
134 | #### Option processing. | |
ca1d1d23 | 135 | |
0c22fbca | 136 | ### Record all the arguments, so we can save them in config.status. |
20d9a863 | 137 | arguments="$@" |
e065a56e | 138 | |
6703f6cd BF |
139 | ### Shell Magic: Quote the quoted arguments in ARGUMENTS. At a later date, |
140 | ### in order to get the arguments back in $@, we have to do an | |
141 | ### `eval set x "$quoted_arguments"; shift'. | |
142 | quoted_arguments= | |
143 | for i in "$@"; do | |
144 | quoted_arguments="$quoted_arguments '$i'" | |
145 | done | |
146 | ||
3517b2e9 JB |
147 | ### Don't use shift -- that destroys the argument list, which autoconf needs |
148 | ### to produce config.status. It turns out that "set - ${arguments}" doesn't | |
149 | ### work portably. | |
6703f6cd BF |
150 | ### However, it also turns out that many shells cannot expand ${10} at all. |
151 | ### So using an index variable doesn't work either. It is possible to use | |
152 | ### some shell magic to make 'set x "$arguments"; shift' work portably. | |
153 | while [ $# != 0 ]; do | |
154 | arg="$1"; shift | |
ca1d1d23 | 155 | case "${arg}" in |
0c22fbca JB |
156 | |
157 | ## Anything starting with a hyphen we assume is an option. | |
158 | -* ) | |
0c22fbca | 159 | ## Separate the switch name from the value it's being given. |
ca1d1d23 | 160 | case "${arg}" in |
2c44309a | 161 | -*=*) |
20d9a863 | 162 | opt=`echo ${arg} | sed 's:^-*\([^=]*\)=.*$:\1:'` |
2c44309a | 163 | val=`echo ${arg} | sed 's:^-*[^=]*=\(.*\)$:\1:'` |
ca1d1d23 JB |
164 | valomitted=no |
165 | ;; | |
2c44309a | 166 | -*) |
0c22fbca JB |
167 | ## If FOO is a boolean argument, --FOO is equivalent to |
168 | ## --FOO=yes. Otherwise, the value comes from the next | |
169 | ## argument - see below. | |
20d9a863 | 170 | opt=`echo ${arg} | sed 's:^-*\(.*\)$:\1:'` |
ca1d1d23 JB |
171 | val="yes" |
172 | valomitted=yes | |
173 | ;; | |
174 | esac | |
175 | ||
0c22fbca | 176 | ## Change `-' in the option name to `_'. |
b0209e18 | 177 | optname="${opt}" |
20d9a863 JB |
178 | opt="`echo ${opt} | tr - _`" |
179 | ||
0c22fbca JB |
180 | ## Process the option. |
181 | case "${opt}" in | |
ca1d1d23 | 182 | |
0c22fbca JB |
183 | ## Has the user specified which window systems they want to support? |
184 | "with_x" | "with_x11" | "with_x10" ) | |
185 | ## Make sure the value given was either "yes" or "no". | |
ca1d1d23 JB |
186 | case "${val}" in |
187 | y | ye | yes ) val=yes ;; | |
188 | n | no ) val=no ;; | |
189 | * ) | |
b0209e18 | 190 | (echo "${progname}: the \`--${optname}' option is supposed to have a boolean value. |
0c22fbca JB |
191 | Set it to either \`yes' or \`no'." |
192 | echo "${short_usage}") >&2 | |
ca1d1d23 JB |
193 | exit 1 |
194 | ;; | |
195 | esac | |
0c22fbca | 196 | eval "${opt}=\"${val}\"" |
ca1d1d23 | 197 | ;; |
0c22fbca | 198 | |
1c4ce111 RS |
199 | ## Has the user specified which toolkit they want to support? |
200 | "with_x_toolkit" ) | |
1c4ce111 RS |
201 | case "${val}" in |
202 | y | ye | yes ) val=athena ;; | |
203 | n | no ) val=no ;; | |
204 | l | lu | luc | luci | lucid ) val=lucid ;; | |
205 | a | at | ath | athe | athena ) val=athena ;; | |
0de5246d RS |
206 | # These don't currently work. |
207 | # m | mo | mot | moti | motif ) val=motif ;; | |
208 | # o | op | ope | open | open- | open-l | open-lo \ | |
209 | # | open-loo | open-look ) val=open-look ;; | |
1c4ce111 | 210 | * ) |
0de5246d RS |
211 | ( |
212 | #echo "${progname}: the \`--${optname}' option is supposed to have a value | |
213 | #which is \`yes', \`no', \`lucid', \`athena', \`motif' or \`open-look'." | |
214 | echo "${progname}: the \`--${optname}' option is supposed to have a value | |
6a66e3be RS |
215 | which is \`yes', \`no', \`lucid', or \`athena'. |
216 | Currently, \`yes', \`athena' and \`lucid' are synonyms." | |
1c4ce111 RS |
217 | echo "${short_usage}") >&2 |
218 | exit 1 | |
219 | ;; | |
220 | esac | |
221 | eval "${opt}=\"${val}\"" | |
222 | ;; | |
223 | ||
1bba56f6 | 224 | ## Has the user specified whether or not they want GCC? |
b735d4b3 | 225 | "with_gcc" | "with_gnu_cc" ) |
1bba56f6 JB |
226 | ## Make sure the value given was either "yes" or "no". |
227 | case "${val}" in | |
228 | y | ye | yes ) val=yes ;; | |
229 | n | no ) val=no ;; | |
230 | * ) | |
b0209e18 | 231 | (echo "${progname}: the \`--${optname}' option is supposed to have a boolean value. |
1bba56f6 JB |
232 | Set it to either \`yes' or \`no'." |
233 | echo "${short_usage}") >&2 | |
234 | exit 1 | |
235 | ;; | |
236 | esac | |
237 | eval "${opt}=\"${val}\"" | |
238 | ;; | |
239 | ||
0c22fbca JB |
240 | ## Has the user specified a source directory? |
241 | "srcdir" ) | |
242 | ## If the value was omitted, get it from the next argument. | |
ca1d1d23 | 243 | if [ "${valomitted}" = "yes" ]; then |
0c22fbca | 244 | ## Get the next argument from the argument list, if there is one. |
6703f6cd | 245 | if [ $# = 0 ]; then |
b0209e18 JB |
246 | (echo "${progname}: You must give a value for the \`--${optname}' option, as in |
247 | \`--${optname}=FOO'." | |
0c22fbca | 248 | echo "${short_usage}") >&2 |
4746118a JB |
249 | exit 1 |
250 | fi | |
1052acbf | 251 | val="$1"; shift |
ca1d1d23 | 252 | fi |
0c22fbca JB |
253 | srcdir="${val}" |
254 | ;; | |
255 | ||
9c7a7556 JB |
256 | ## Has the user tried to tell us where the X files are? |
257 | ## I think these are dopey, but no less than three alpha | |
258 | ## testers, at large sites, have said they have their X files | |
259 | ## installed in odd places. | |
b0209e18 | 260 | "x_includes" ) |
9c7a7556 JB |
261 | ## If the value was omitted, get it from the next argument. |
262 | if [ "${valomitted}" = "yes" ]; then | |
263 | ## Get the next argument from the argument list, if there is one. | |
6703f6cd | 264 | if [ $# = 0 ]; then |
b0209e18 | 265 | (echo "${progname}: You must give a value for the \`--${optname}' option, as in |
cedb6c1b | 266 | \`--${optname}=/usr/local/X11/include'." |
9c7a7556 JB |
267 | echo "${short_usage}") >&2 |
268 | exit 1 | |
269 | fi | |
6703f6cd | 270 | val="$1"; shift |
9c7a7556 JB |
271 | fi |
272 | x_includes="${val}" | |
9c7a7556 | 273 | ;; |
b0209e18 | 274 | "x_libraries" ) |
9c7a7556 JB |
275 | ## If the value was omitted, get it from the next argument. |
276 | if [ "${valomitted}" = "yes" ]; then | |
277 | ## Get the next argument from the argument list, if there is one. | |
6703f6cd | 278 | if [ $# = 0 ]; then |
b0209e18 | 279 | (echo "${progname}: You must give a value for the \`--${optname}' option, as in |
cedb6c1b | 280 | \`--${optname}=/usr/local/X11/lib'." |
9c7a7556 JB |
281 | echo "${short_usage}") >&2 |
282 | exit 1 | |
283 | fi | |
6703f6cd | 284 | val="$1"; shift |
9c7a7556 JB |
285 | fi |
286 | x_libraries="${val}" | |
9c7a7556 JB |
287 | ;; |
288 | ||
c5f67786 JB |
289 | ## Should this use the "development configuration"? |
290 | "run_in_place" ) | |
cedb6c1b BF |
291 | single_tree= |
292 | run_in_place=1 | |
c5f67786 JB |
293 | ;; |
294 | ||
1052acbf BF |
295 | ## Should this use the "single tree" configuration? |
296 | "single_tree" ) | |
297 | run_in_place= | |
298 | single_tree=1 | |
299 | ;; | |
300 | ||
cedb6c1b BF |
301 | ## Has the user specified one of the path options? |
302 | prefix | exec_prefix | bindir | libdir | etcdir | datadir | \ | |
303 | archlibdir | statedir | mandir | infodir | lispdir | lockdir | \ | |
109ebdd4 | 304 | lisppath | locallisppath | docdir ) |
cedb6c1b BF |
305 | ## If the value was omitted, get it from the next argument. |
306 | if [ "${valomitted}" = "yes" ]; then | |
6703f6cd | 307 | if [ $# = 0 ]; then |
cedb6c1b BF |
308 | (echo \ |
309 | "$progname: You must give a value for the \`--${optname}' option,"; | |
310 | echo \ | |
311 | "as in \`--${optname}=`eval echo '$'$optname`.'" | |
312 | echo "$short_usage") >&2 | |
313 | exit 1 | |
314 | fi | |
6703f6cd | 315 | val="$1"; shift |
cedb6c1b | 316 | fi |
6703f6cd BF |
317 | eval "${opt}=\"${val}\"" |
318 | eval "${opt}_specified=1" | |
cedb6c1b | 319 | ;; |
86ddcc58 | 320 | |
d02e05d1 JB |
321 | ## Verbose flag, tested by autoconf macros. |
322 | "verbose" ) | |
323 | verbose=yes | |
324 | ;; | |
325 | ||
0c22fbca JB |
326 | ## Has the user asked for some help? |
327 | "usage" | "help" ) | |
1c0feb67 RS |
328 | if [ "x$PAGER" = x ] |
329 | then | |
330 | echo "${short_usage}" | more | |
331 | else | |
332 | echo "${short_usage}" | $PAGER | |
333 | fi | |
0c22fbca JB |
334 | exit |
335 | ;; | |
ca1d1d23 | 336 | |
0c22fbca JB |
337 | ## We ignore all other options silently. |
338 | esac | |
ca1d1d23 | 339 | ;; |
0c22fbca JB |
340 | |
341 | ## Anything not starting with a hyphen we assume is a | |
342 | ## configuration name. | |
ca1d1d23 | 343 | *) |
8509d50c | 344 | configuration=${arg} |
ca1d1d23 | 345 | ;; |
0c22fbca | 346 | |
ca1d1d23 JB |
347 | esac |
348 | done | |
349 | ||
6703f6cd BF |
350 | ### Get the arguments back. See the diatribe on Shell Magic above. |
351 | eval set x "$quoted_arguments"; shift | |
352 | ||
8509d50c | 353 | if [ "${configuration}" = "" ]; then |
334e7c23 JB |
354 | echo '- You did not tell me what kind of host system you want to configure. |
355 | - I will attempt to guess the kind of system this is.' 1>&2 | |
356 | guesssys=`echo ${progname} | sed 's/configure$/config.guess/'` | |
357 | if configuration=`${guesssys}` ; then | |
358 | echo "- Looks like this is a ${configuration}" 1>&2 | |
359 | else | |
360 | echo '- Failed to guess the system type. You need to tell me.' 1>&2 | |
8428ef44 | 361 | echo "${short_usage}" >&2 |
334e7c23 JB |
362 | exit 1 |
363 | fi | |
0c22fbca JB |
364 | fi |
365 | ||
0c22fbca JB |
366 | #### Decide where the source is. |
367 | case "${srcdir}" in | |
368 | ||
e94740ce | 369 | ## If it's not specified, see if `.' or `..' might work. |
0c22fbca | 370 | "" ) |
2e694846 JB |
371 | confdir=`echo $0 | sed 's|//|/|' | sed 's|/[^/]*$||'` |
372 | if [ -f $confdir/src/lisp.h -a -f $confdir/lisp/version.el ]; then | |
0871bc22 | 373 | srcdir="${confdir}" |
e94740ce | 374 | else |
2e694846 | 375 | if [ -f "./src/lisp.h" -a -f "./lisp/version.el" ]; then |
426460bf | 376 | srcdir='.' |
e94740ce | 377 | else |
2e694846 | 378 | if [ -f "../src/lisp.h" -a -f "../lisp/version.el" ]; then |
426460bf | 379 | srcdir='..' |
2e694846 JB |
380 | else |
381 | (echo "\ | |
e94740ce JB |
382 | ${progname}: Neither the current directory nor its parent seem to |
383 | contain the Emacs sources. If you do not want to build Emacs in its | |
384 | source tree, you should run \`${progname}' in the directory in which | |
385 | you wish to build Emacs, using its \`--srcdir' option to say where the | |
386 | sources may be found." | |
2e694846 JB |
387 | echo "${short_usage}") >&2 |
388 | exit 1 | |
389 | fi | |
e94740ce JB |
390 | fi |
391 | fi | |
0c22fbca JB |
392 | ;; |
393 | ||
e94740ce | 394 | ## Otherwise, check if the directory they specified is okay. |
0c22fbca | 395 | * ) |
e94740ce JB |
396 | if [ ! -d "${srcdir}" -o ! -f "${srcdir}/src/lisp.h" -o ! -f "${srcdir}/lisp/version.el" ]; then |
397 | (echo "\ | |
398 | ${progname}: The directory specified with the \`--srcdir' option, | |
399 | \`${srcdir}', doesn't seem to contain the Emacs sources. You should | |
400 | either run the \`${progname}' script at the top of the Emacs source | |
401 | tree, or use the \`--srcdir' option to specify where the Emacs sources | |
402 | are." | |
0c22fbca JB |
403 | echo "${short_usage}") >&2 |
404 | exit 1 | |
405 | fi | |
406 | ;; | |
0871bc22 | 407 | esac |
0c22fbca | 408 | |
0871bc22 JB |
409 | #### Make srcdir absolute, if it isn't already. It's important to |
410 | #### avoid running the path through pwd unnecessary, since pwd can | |
411 | #### give you automounter prefixes, which can go away. | |
412 | case "${srcdir}" in | |
413 | /* ) ;; | |
c9ed10f6 JB |
414 | . ) |
415 | ## We may be able to use the $PWD environment variable to make this | |
416 | ## absolute. But sometimes PWD is inaccurate. | |
dce3d8a9 | 417 | if [ "${PWD}" != "" ] && [ "`(cd ${PWD} ; sh -c pwd)`" = "`pwd`" ] ; then |
c9ed10f6 JB |
418 | srcdir="$PWD" |
419 | else | |
420 | srcdir="`(cd ${srcdir}; pwd)`" | |
1d488950 | 421 | fi |
c9ed10f6 | 422 | ;; |
0871bc22 | 423 | * ) srcdir="`(cd ${srcdir}; pwd)`" ;; |
0c22fbca JB |
424 | esac |
425 | ||
acd399a1 RM |
426 | #### Check if the source directory already has a configured system in it. |
427 | if [ `pwd` != `(cd ${srcdir} && pwd)` ] \ | |
428 | && [ -f "${srcdir}/src/config.h" ] ; then | |
429 | (echo "${progname}: WARNING: The directory tree \`${srcdir}' is being used" | |
430 | echo " as a build directory right now; it has been configured in its own" | |
431 | echo " right. To configure in another directory as well, you MUST" | |
432 | echo " use GNU make. If you do not have GNU make, then you must" | |
433 | echo " now do \`make distclean' in ${srcdir}," | |
434 | echo " and then run ${progname} again.") >&2 | |
91675811 RM |
435 | extrasub='/^VPATH[ ]*=/c\ |
436 | vpath %.c $(srcdir)\ | |
437 | vpath %.h $(srcdir)\ | |
eb8a344d RM |
438 | vpath %.y $(srcdir)\ |
439 | vpath %.l $(srcdir)\ | |
440 | vpath %.s $(srcdir)\ | |
91675811 | 441 | vpath %.in $(srcdir)' |
acd399a1 | 442 | fi |
acd399a1 | 443 | |
0c22fbca | 444 | ### Make the necessary directories, if they don't exist. |
1c4ce111 | 445 | for dir in ./src ./lib-src ./cpp ./oldXMenu ./lwlib ./etc ; do |
30945baf JB |
446 | if [ ! -d ${dir} ]; then |
447 | mkdir ${dir} | |
448 | fi | |
449 | done | |
0c22fbca JB |
450 | |
451 | #### Given the configuration name, set machfile and opsysfile to the | |
452 | #### names of the m/*.h and s/*.h files we should use. | |
453 | ||
454 | ### Canonicalize the configuration name. | |
8509d50c | 455 | echo "Checking the configuration name." |
279271ba | 456 | if canonical=`${srcdir}/config.sub "${configuration}"` ; then : ; else |
8509d50c JB |
457 | exit $? |
458 | fi | |
20d9a863 | 459 | |
3647c171 JB |
460 | ### If you add support for a new configuration, add code to this |
461 | ### switch statement to recognize your configuration name and select | |
462 | ### the appropriate operating system and machine description files. | |
463 | ||
8509d50c JB |
464 | ### You would hope that you could choose an m/*.h file pretty much |
465 | ### based on the machine portion of the configuration name, and an s- | |
466 | ### file based on the operating system portion. However, it turns out | |
467 | ### that each m/*.h file is pretty manufacturer-specific - for | |
468 | ### example, apollo.h, hp9000s300.h, mega68k, news.h, and tad68k are | |
469 | ### all 68000 machines; mips.h, pmax.h, and news-risc are all MIPS | |
470 | ### machines. So we basically have to have a special case for each | |
471 | ### configuration name. | |
3647c171 | 472 | ### |
8509d50c JB |
473 | ### As far as handling version numbers on operating systems is |
474 | ### concerned, make sure things will fail in a fixable way. If | |
475 | ### /etc/MACHINES doesn't say anything about version numbers, be | |
476 | ### prepared to handle anything reasonably. If version numbers | |
477 | ### matter, be sure /etc/MACHINES says something about it. | |
3647c171 JB |
478 | ### |
479 | ### Eric Raymond says we should accept strings like "sysvr4" to mean | |
480 | ### "System V Release 4"; he writes, "The old convention encouraged | |
481 | ### confusion between `system' and `release' levels'." | |
482 | ||
8509d50c | 483 | machine='' opsys='' unported='false' |
279271ba | 484 | case "${canonical}" in |
8509d50c JB |
485 | |
486 | ## Alliant machines | |
20d9a863 JB |
487 | ## Strictly speaking, we need the version of the alliant operating |
488 | ## system to choose the right machine file, but currently the | |
489 | ## configuration name doesn't tell us enough to choose the right | |
490 | ## one; we need to give alliants their own operating system name to | |
491 | ## do this right. When someone cares, they can help us. | |
492 | fx80-alliant-* ) | |
8509d50c | 493 | machine=alliant4 opsys=bsd4-2 |
20d9a863 JB |
494 | ;; |
495 | i860-alliant-* ) | |
8509d50c | 496 | machine=alliant-2800 opsys=bsd4-3 |
20d9a863 | 497 | ;; |
ca1d1d23 | 498 | |
8509d50c JB |
499 | ## Altos 3068 |
500 | m68*-altos-sysv* ) | |
501 | machine=altos opsys=usg5-2 | |
20d9a863 | 502 | ;; |
8509d50c JB |
503 | |
504 | ## Amdahl UTS | |
505 | 580-amdahl-sysv* ) | |
506 | machine=amdahl opsys=usg5-2-2 | |
20d9a863 | 507 | ;; |
ca1d1d23 | 508 | |
8509d50c JB |
509 | ## Appallings - I mean, Apollos - running Domain |
510 | m68*-apollo* ) | |
e4474817 | 511 | machine=apollo opsys=bsd4-2 |
20d9a863 | 512 | ;; |
8509d50c JB |
513 | |
514 | ## AT&T 3b2, 3b5, 3b15, 3b20 | |
515 | we32k-att-sysv* ) | |
516 | machine=att3b opsys=usg5-2-2 | |
517 | ;; | |
518 | ||
519 | ## AT&T 3b1 - The Mighty Unix PC! | |
520 | m68*-att-sysv* ) | |
521 | machine=7300 opsys=usg5-2-2 | |
522 | ;; | |
523 | ||
f9b9f71b FP |
524 | ## Bull dpx20 |
525 | rs6000-bull-bosx* ) | |
526 | machine=ibmrs6000 opsys=aix3-2 | |
527 | ;; | |
528 | ||
6ec1f458 JB |
529 | ## Bull dpx2 |
530 | m68*-bull-sysv3* ) | |
531 | machine=dpx2 opsys=usg5-3 | |
532 | ;; | |
533 | ||
8509d50c | 534 | ## Bull sps7 |
6ec1f458 | 535 | m68*-bull-sysv2* ) |
8509d50c | 536 | machine=sps7 opsys=usg5-2 |
20d9a863 | 537 | ;; |
8509d50c JB |
538 | |
539 | ## CCI 5/32, 6/32 -- see "Tahoe". | |
540 | ||
541 | ## Celerity | |
542 | ## I don't know what configuration name to use for this; config.sub | |
543 | ## doesn't seem to know anything about it. Hey, Celerity users, get | |
544 | ## in touch with us! | |
545 | celerity-celerity-bsd* ) | |
546 | machine=celerity opsys=bsd4-2 | |
547 | ;; | |
548 | ||
549 | ## Clipper | |
550 | ## What operating systems does this chip run that Emacs has been | |
551 | ## tested on? | |
552 | clipper-* ) | |
553 | machine=clipper | |
554 | ## We'll use the catch-all code at the bottom to guess the | |
555 | ## operating system. | |
556 | ;; | |
557 | ||
558 | ## Convex | |
559 | *-convex-bsd* ) | |
560 | machine=convex opsys=bsd4-3 | |
561 | ;; | |
562 | ||
563 | ## Cubix QBx/386 | |
564 | i386-cubix-sysv* ) | |
565 | machine=intel386 opsys=usg5-3 | |
566 | ;; | |
567 | ||
568 | ## Cydra 5 | |
569 | cydra*-cydrome-sysv* ) | |
570 | machine=cydra5 opsys=usg5-3 | |
571 | ;; | |
572 | ||
b86d694e | 573 | ## Data General AViiON Machines |
39178e9e RS |
574 | m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* ) |
575 | machine=aviion opsys=dgux5-4r3 | |
677159d6 | 576 | ;; |
39178e9e RS |
577 | m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* ) |
578 | machine=aviion opsys=dgux5-4r2 | |
677159d6 | 579 | ;; |
b86d694e JB |
580 | m88k-dg-dgux* ) |
581 | machine=aviion opsys=dgux | |
582 | ;; | |
583 | ||
8509d50c | 584 | ## DECstations |
1c0feb67 | 585 | mips-dec-ultrix[0-3].* | mips-dec-ultrix4.0* | mips-dec-bsd4.2* ) |
8509d50c JB |
586 | machine=pmax opsys=bsd4-2 |
587 | ;; | |
588 | mips-dec-ultrix* | mips-dec-bsd* ) | |
589 | machine=pmax opsys=bsd4-3 | |
590 | ;; | |
591 | mips-dec-osf* ) | |
592 | machine=pmax opsys=osf1 | |
593 | ;; | |
594 | ||
595 | ## Motorola Delta machines | |
98f5cfc3 | 596 | m68k-motorola-sysv* | m68000-motorola-sysv* ) |
8509d50c | 597 | machine=delta opsys=usg5-3 |
764b979b RS |
598 | if [ -z "`type gnucc | grep 'not found'`" ] |
599 | then CC=gnucc | |
600 | else | |
601 | if [ -z "`type gcc | grep 'not found'`" ] | |
602 | then CC=gcc | |
603 | else CC=cc | |
604 | fi | |
605 | fi | |
8509d50c | 606 | ;; |
ac0e6f3b JB |
607 | m88k-motorola-sysv4* ) |
608 | machine=delta88k opsys=usg5-4 | |
609 | ;; | |
8509d50c JB |
610 | m88k-motorola-sysv* | m88k-motorola-m88kbcs* ) |
611 | machine=delta88k opsys=usg5-3 | |
612 | ;; | |
613 | ||
614 | ## Dual machines | |
615 | m68*-dual-sysv* ) | |
616 | machine=dual opsys=usg5-2 | |
617 | ;; | |
618 | m68*-dual-uniplus* ) | |
619 | machine=dual opsys=unipl5-2 | |
620 | ;; | |
621 | ||
622 | ## Elxsi 6400 | |
623 | elxsi-elxsi-sysv* ) | |
624 | machine=elxsi opsys=usg5-2 | |
625 | ;; | |
626 | ||
627 | ## Encore machines | |
628 | ns16k-encore-bsd* ) | |
629 | machine=ns16000 opsys=umax | |
630 | ;; | |
631 | ||
632 | ## The GEC 93 - apparently, this port isn't really finished yet. | |
633 | ||
634 | ## Gould Power Node and NP1 | |
1c0feb67 | 635 | pn-gould-bsd4.2* ) |
8509d50c JB |
636 | machine=gould opsys=bsd4-2 |
637 | ;; | |
1c0feb67 | 638 | pn-gould-bsd4.3* ) |
8509d50c JB |
639 | machine=gould opsys=bsd4-3 |
640 | ;; | |
641 | np1-gould-bsd* ) | |
642 | machine=gould-np1 opsys=bsd4-3 | |
643 | ;; | |
644 | ||
d8e16cd2 RS |
645 | ## Harris Night Hawk machines running CX/UX (a 5000 looks just like a 4000 |
646 | ## as far as Emacs is concerned). | |
647 | m88k-harris-cxux* ) | |
648 | # Build needs to be different on 7.0 and later releases | |
649 | case "`uname -r`" in | |
650 | [56].[0-9] ) machine=nh4000 opsys=cxux ;; | |
651 | [7].[0-9] ) machine=nh4000 opsys=cxux7 ;; | |
652 | esac | |
653 | ;; | |
654 | ## Harris ecx or gcx running CX/UX (Series 1200, Series 3000) | |
655 | m68k-harris-cxux* ) | |
656 | machine=nh3000 opsys=cxux | |
657 | ;; | |
658 | ||
8509d50c JB |
659 | ## Honeywell XPS100 |
660 | xps*-honeywell-sysv* ) | |
661 | machine=xps100 opsys=usg5-2 | |
662 | ;; | |
663 | ||
664 | ## HP 9000 series 200 or 300 | |
665 | m68*-hp-bsd* ) | |
666 | machine=hp9000s300 opsys=bsd4-3 | |
667 | ;; | |
dbf6ad3d RM |
668 | m68*-hp-netbsd* ) |
669 | machine=hp9000s300 opsys=netbsd | |
670 | ;; | |
d69d8d1e | 671 | ## HP/UX 7, 8 and 9 are supported on these machines. |
20d9a863 | 672 | m68*-hp-hpux* ) |
d69d8d1e | 673 | case "`uname -r`" in |
1c0feb67 RS |
674 | ## Someone's system reports A.B8.05 for this. |
675 | ## I wonder what other possibilities there are. | |
676 | *.B8.* ) machine=hp9000s300 opsys=hpux8 ;; | |
d69d8d1e JB |
677 | *.08.* ) machine=hp9000s300 opsys=hpux8 ;; |
678 | *.09.* ) machine=hp9000s300 opsys=hpux9 ;; | |
679 | *) machine=hp9000s300 opsys=hpux ;; | |
680 | esac | |
20d9a863 | 681 | ;; |
ca1d1d23 | 682 | |
c55f453b | 683 | ## HP 9000 series 700 and 800, running HP/UX |
ea2c2e02 | 684 | hppa*-hp-hpux7* ) |
280ec6c2 | 685 | machine=hp800 opsys=hpux |
c55f453b | 686 | ;; |
ea2c2e02 | 687 | hppa*-hp-hpux8* ) |
280ec6c2 | 688 | machine=hp800 opsys=hpux8 |
c55f453b | 689 | ;; |
ea2c2e02 | 690 | hppa*-hp-hpux9* ) |
280ec6c2 | 691 | machine=hp800 opsys=hpux9 |
ea2c2e02 JB |
692 | ;; |
693 | ||
694 | ## HP 9000 series 700 and 800, running HP/UX | |
c55f453b JB |
695 | hppa*-hp-hpux* ) |
696 | ## Cross-compilation? Nah! | |
252c8b3b | 697 | case "`uname -r`" in |
1c0feb67 RS |
698 | ## Someone's system reports A.B8.05 for this. |
699 | ## I wonder what other possibilities there are. | |
280ec6c2 RS |
700 | *.B8.* ) machine=hp800 opsys=hpux8 ;; |
701 | *.08.* ) machine=hp800 opsys=hpux8 ;; | |
702 | *.09.* ) machine=hp800 opsys=hpux9 ;; | |
703 | *) machine=hp800 opsys=hpux ;; | |
c55f453b | 704 | esac |
8509d50c JB |
705 | ;; |
706 | ||
707 | ## Orion machines | |
708 | orion-orion-bsd* ) | |
709 | machine=orion opsys=bsd4-2 | |
710 | ;; | |
711 | clipper-orion-bsd* ) | |
712 | machine=orion105 opsys=bsd4-2 | |
713 | ;; | |
714 | ||
715 | ## IBM machines | |
1c0feb67 | 716 | i386-ibm-aix1.1* ) |
8509d50c JB |
717 | machine=ibmps2-aix opsys=usg5-2-2 |
718 | ;; | |
1c0feb67 | 719 | i386-ibm-aix1.[23]* | i386-ibm-aix* ) |
8509d50c JB |
720 | machine=ibmps2-aix opsys=usg5-3 |
721 | ;; | |
d5aac16a RS |
722 | i370-ibm-aix*) |
723 | machine=ibm370aix opsys=usg5-3 | |
724 | ;; | |
1c0feb67 | 725 | rs6000-ibm-aix3.1* ) |
8509d50c JB |
726 | machine=ibmrs6000 opsys=aix3-1 |
727 | ;; | |
a69c774b KH |
728 | rs6000-ibm-aix3.2.5) |
729 | machine=ibmrs6000 opsys=aix3-2-5 | |
730 | ;; | |
1c0feb67 | 731 | rs6000-ibm-aix3.2* | rs6000-ibm-aix* ) |
17a624d1 JB |
732 | machine=ibmrs6000 opsys=aix3-2 |
733 | ;; | |
1c0feb67 | 734 | romp-ibm-bsd4.3* ) |
d20c62bf RS |
735 | machine=ibmrt opsys=bsd4-3 |
736 | ;; | |
1c0feb67 | 737 | romp-ibm-bsd4.2* ) |
d20c62bf RS |
738 | machine=ibmrt opsys=bsd4-2 |
739 | ;; | |
1c0feb67 | 740 | romp-ibm-aos4.3* ) |
d20c62bf RS |
741 | machine=ibmrt opsys=bsd4-3 |
742 | ;; | |
1c0feb67 | 743 | romp-ibm-aos4.2* ) |
8509d50c JB |
744 | machine=ibmrt opsys=bsd4-2 |
745 | ;; | |
d20c62bf RS |
746 | romp-ibm-aos* ) |
747 | machine=ibmrt opsys=bsd4-3 | |
748 | ;; | |
749 | romp-ibm-bsd* ) | |
750 | machine=ibmrt opsys=bsd4-3 | |
751 | ;; | |
8509d50c JB |
752 | romp-ibm-aix* ) |
753 | machine=ibmrt-aix opsys=usg5-2-2 | |
754 | ;; | |
755 | ||
756 | ## Integrated Solutions `Optimum V' | |
1c0feb67 | 757 | m68*-isi-bsd4.2* ) |
8509d50c JB |
758 | machine=isi-ov opsys=bsd4-2 |
759 | ;; | |
1c0feb67 | 760 | m68*-isi-bsd4.3* ) |
8509d50c JB |
761 | machine=isi-ov opsys=bsd4-3 |
762 | ;; | |
763 | ||
764 | ## Intel 386 machines where we do care about the manufacturer | |
765 | i[34]86-intsys-sysv* ) | |
766 | machine=is386 opsys=usg5-2-2 | |
767 | ;; | |
6992e6b7 RS |
768 | |
769 | ## Prime EXL | |
770 | i386-prime-sysv* ) | |
771 | machine=i386 opsys=usg5-3 | |
772 | ;; | |
773 | ||
774 | ## Sequent Symmetry | |
775 | i386-sequent-bsd* ) | |
776 | machine=symmetry opsys=bsd4-3 | |
777 | ;; | |
778 | ||
4acc6824 RS |
779 | ## Unspecified sysv on an ncr machine defaults to svr4.2. |
780 | ## (Plain usg5-4 doesn't turn on POSIX signals, which we need.) | |
14442cbf | 781 | i[34]86-ncr-sysv* ) |
4acc6824 | 782 | machine=intel386 opsys=usg5-4-2 |
14442cbf RS |
783 | ;; |
784 | ||
df4da582 | 785 | ## Intel 860 |
9c34bd79 | 786 | i860-*-sysv4* ) |
df4da582 JB |
787 | machine=i860 opsys=usg5-4 |
788 | ;; | |
789 | ||
8509d50c | 790 | ## Masscomp machines |
1c0feb67 | 791 | m68*-masscomp-rtu* ) |
8509d50c JB |
792 | machine=masscomp opsys=rtu |
793 | ;; | |
794 | ||
795 | ## Megatest machines | |
796 | m68*-megatest-bsd* ) | |
797 | machine=mega68 opsys=bsd4-2 | |
798 | ;; | |
799 | ||
800 | ## Workstations sold by MIPS | |
801 | ## This is not necessarily all workstations using the MIPS processor - | |
802 | ## Irises are produced by SGI, and DECstations by DEC. | |
803 | ||
804 | ## etc/MACHINES lists mips.h and mips4.h as possible machine files, | |
805 | ## and usg5-2-2 and bsd4-3 as possible OS files. The only guidance | |
806 | ## it gives for choosing between the alternatives seems to be "Use | |
807 | ## -machine=mips4 for RISCOS version 4; use -opsystem=bsd4-3 with | |
808 | ## the BSD world." I'll assume that these are instructions for | |
809 | ## handling two odd situations, and that every other situation | |
810 | ## should use mips.h and usg5-2-2, they being listed first. | |
60e1b37f JB |
811 | mips-mips-usg* ) |
812 | machine=mips4 | |
813 | ## Fall through to the general code at the bottom to decide on the OS. | |
814 | ;; | |
8509d50c | 815 | mips-mips-riscos4* ) |
cc40a99e | 816 | machine=mips4 opsys=bsd4-3 |
9c34bd79 | 817 | NON_GNU_CC="cc -systype bsd43" |
781ce8e8 | 818 | NON_GNU_CPP="cc -systype bsd43 -E" |
8509d50c JB |
819 | ;; |
820 | mips-mips-bsd* ) | |
821 | machine=mips opsys=bsd4-3 | |
822 | ;; | |
823 | mips-mips-* ) | |
824 | machine=mips opsys=usg5-2-2 | |
825 | ;; | |
826 | ||
c5f67786 | 827 | ## NeXT |
624e2ec3 | 828 | m68*-next-* ) |
c5f67786 JB |
829 | machine=next opsys=mach2 |
830 | ;; | |
831 | ||
8509d50c JB |
832 | ## The complete machine from National Semiconductor |
833 | ns32k-ns-genix* ) | |
834 | machine=ns32000 opsys=usg5-2 | |
835 | ;; | |
836 | ||
837 | ## NCR machines | |
3647c171 | 838 | m68*-ncr-sysv2* | m68*-ncr-sysvr2* ) |
8509d50c JB |
839 | machine=tower32 opsys=usg5-2-2 |
840 | ;; | |
3647c171 | 841 | m68*-ncr-sysv3* | m68*-ncr-sysvr3* ) |
8509d50c JB |
842 | machine=tower32v3 opsys=usg5-3 |
843 | ;; | |
844 | ||
845 | ## Nixdorf Targon 31 | |
846 | m68*-nixdorf-sysv* ) | |
847 | machine=targon31 opsys=usg5-2-2 | |
848 | ;; | |
849 | ||
850 | ## Nu (TI or LMI) | |
851 | m68*-nu-sysv* ) | |
852 | machine=nu opsys=usg5-2 | |
853 | ;; | |
854 | ||
855 | ## Plexus | |
856 | m68*-plexus-sysv* ) | |
857 | machine=plexus opsys=usg5-2 | |
858 | ;; | |
859 | ||
8509d50c JB |
860 | ## Pyramid machines |
861 | ## I don't really have any idea what sort of processor the Pyramid has, | |
862 | ## so I'm assuming it is its own architecture. | |
863 | pyramid-pyramid-bsd* ) | |
864 | machine=pyramid opsys=bsd4-2 | |
865 | ;; | |
866 | ||
867 | ## Sequent Balance | |
1c0feb67 | 868 | ns32k-sequent-bsd4.2* ) |
8509d50c JB |
869 | machine=sequent opsys=bsd4-2 |
870 | ;; | |
1c0feb67 | 871 | ns32k-sequent-bsd4.3* ) |
8509d50c | 872 | machine=sequent opsys=bsd4-3 |
8509d50c JB |
873 | ;; |
874 | ||
73e7c7be RS |
875 | ## Siemens Nixdorf |
876 | mips-siemens-sysv* ) | |
877 | machine=mips-siemens opsys=usg5-4 | |
878 | NON_GNU_CC=/usr/ccs/bin/cc | |
879 | NON_GNU_CPP=/usr/ccs/bin/cc -E | |
880 | ;; | |
881 | ||
882 | ## Silicon Graphics machines | |
883 | ## Iris 2500 and Iris 2500 Turbo (aka the Iris 3030) | |
884 | m68*-sgi-iris3.5* ) | |
885 | machine=irist opsys=iris3-5 | |
886 | ;; | |
887 | m68*-sgi-iris3.6* | m68*-sgi-iris*) | |
888 | machine=irist opsys=iris3-6 | |
889 | ;; | |
890 | ## Iris 4D | |
891 | mips-sgi-irix3.* ) | |
892 | machine=iris4d opsys=irix3-3 | |
893 | ;; | |
894 | mips-sgi-irix5.* ) | |
895 | machine=iris4d opsys=irix5-0 | |
896 | ;; | |
897 | mips-sgi-irix4.* | mips-sgi-irix* ) | |
898 | machine=iris4d opsys=irix4-0 | |
899 | ;; | |
900 | ||
8509d50c | 901 | ## SONY machines |
1c0feb67 | 902 | m68*-sony-bsd4.2* ) |
8509d50c JB |
903 | machine=news opsys=bsd4-2 |
904 | ;; | |
1c0feb67 RS |
905 | m68*-sony-bsd4.3* ) |
906 | machine=news opsys=bsd4-3 | |
907 | ;; | |
908 | m68*-sony-newsos3*) | |
8509d50c JB |
909 | machine=news opsys=bsd4-3 |
910 | ;; | |
911 | mips-sony-bsd* ) | |
912 | machine=news-risc opsys=bsd4-3 | |
913 | ;; | |
eaa2dcbd RS |
914 | mips-sony-newsos* ) |
915 | machine=mips opsys=newsos5 | |
916 | ;; | |
8509d50c JB |
917 | |
918 | ## Stride | |
919 | m68*-stride-sysv* ) | |
920 | machine=stride opsys=usg5-2 | |
921 | ;; | |
922 | ||
923 | ## Suns | |
ddb73021 | 924 | *-sun-sunos* | *-sun-bsd* | *-sun-solaris* ) |
279271ba | 925 | case "${canonical}" in |
8509d50c JB |
926 | m68*-sunos1* ) machine=sun1 ;; |
927 | m68*-sunos2* ) machine=sun2 ;; | |
928 | m68* ) machine=sun3 ;; | |
929 | i[34]86* ) machine=sun386 ;; | |
930 | sparc* ) machine=sparc ;; | |
931 | * ) unported=true ;; | |
932 | esac | |
279271ba | 933 | case "${canonical}" in |
34207774 RS |
934 | ## The Sun386 didn't get past 4.0. |
935 | i386-*-sunos4 ) opsys=sunos4-0 ;; | |
8509d50c | 936 | *-sunos4.0* ) opsys=sunos4-0 ;; |
7498a871 | 937 | *-sunos4.1.3* ) opsys=sunos4-1-3 ;; |
b2c3b7ff | 938 | *-sunos4shr* ) opsys=sunos4shr ;; |
8509d50c | 939 | *-sunos4* | *-sunos ) opsys=sunos4-1 ;; |
9c34bd79 RS |
940 | *-sunos5.3* | *-solaris2.3* ) |
941 | opsys=sol2-3 | |
942 | NON_GNU_CPP=/usr/ccs/lib/cpp | |
943 | ;; | |
944 | *-sunos5* | *-solaris* ) | |
945 | opsys=sol2 | |
946 | NON_GNU_CPP=/usr/ccs/lib/cpp | |
947 | ;; | |
8509d50c | 948 | * ) opsys=bsd4-2 ;; |
20d9a863 | 949 | esac |
8509d50c JB |
950 | ;; |
951 | ||
952 | ## Tadpole 68k | |
953 | m68*-tadpole-sysv* ) | |
954 | machine=tad68k opsys=usg5-3 | |
955 | ;; | |
956 | ||
957 | ## Tahoe machines | |
1c0feb67 | 958 | tahoe-tahoe-bsd4.2* ) |
8509d50c JB |
959 | machine=tahoe opsys=bsd4-2 |
960 | ;; | |
1c0feb67 | 961 | tahoe-tahoe-bsd4.3* ) |
8509d50c JB |
962 | machine=tahoe opsys=bsd4-3 |
963 | ;; | |
964 | ||
965 | ## Tandem Integrity S2 | |
966 | mips-tandem-sysv* ) | |
967 | machine=tandem-s2 opsys=usg5-3 | |
968 | ;; | |
969 | ||
26f186c2 | 970 | ## Tektronix XD88 |
0d33a690 RS |
971 | m88k-tektronix-sysv3* ) |
972 | machine=tekxd88 opsys=usg5-3 | |
26f186c2 JB |
973 | ;; |
974 | ||
8509d50c JB |
975 | ## Tektronix 16000 box (6130?) |
976 | ns16k-tektronix-bsd* ) | |
977 | machine=ns16000 opsys=bsd4-2 | |
978 | ;; | |
979 | ## Tektronix 4300 | |
980 | ## src/m/tek4300.h hints that this is a m68k machine. | |
981 | m68*-tektronix-bsd* ) | |
1c0feb67 | 982 | machine=tek4300 opsys=bsd4-3 |
8509d50c JB |
983 | ;; |
984 | ||
985 | ## Titan P2 or P3 | |
986 | ## We seem to have lost the machine-description file titan.h! | |
987 | titan-titan-sysv* ) | |
988 | machine=titan opsys=usg5-3 | |
989 | ;; | |
990 | ||
991 | ## Ustation E30 (SS5E) | |
992 | m68*-unisys-uniplus* ) | |
993 | machine=ustation opsystem=unipl5-2 | |
994 | ;; | |
995 | ||
996 | ## Vaxen. | |
997 | vax-dec-* ) | |
998 | machine=vax | |
279271ba | 999 | case "${canonical}" in |
1c0feb67 RS |
1000 | *-bsd4.1* ) opsys=bsd4-1 ;; |
1001 | *-bsd4.2* | *-ultrix[0-3].* | *-ultrix4.0* ) opsys=bsd4-2 ;; | |
1002 | *-bsd4.3* | *-ultrix* ) opsys=bsd4-3 ;; | |
1003 | *-bsd386* ) opsys=bsd386 ;; | |
3647c171 JB |
1004 | *-sysv[01]* | *-sysvr[01]* ) opsys=usg5-0 ;; |
1005 | *-sysv2* | *-sysvr2* ) opsys=usg5-2 ;; | |
1006 | *-vms* ) opsys=vms ;; | |
1007 | * ) unported=true | |
20d9a863 JB |
1008 | esac |
1009 | ;; | |
1010 | ||
8509d50c JB |
1011 | ## Whitechapel MG1 |
1012 | ns16k-whitechapel-* ) | |
1013 | machine=mg1 | |
1014 | ## We don't know what sort of OS runs on these; we'll let the | |
1015 | ## operating system guessing code below try. | |
1016 | ;; | |
1017 | ||
1018 | ## Wicat | |
1019 | m68*-wicat-sysv* ) | |
1020 | machine=wicat opsys=usg5-2 | |
1021 | ;; | |
1022 | ||
b3fb7fc3 JB |
1023 | ## Intel 386 machines where we don't care about the manufacturer |
1024 | i[34]86-*-* ) | |
1025 | machine=intel386 | |
279271ba | 1026 | case "${canonical}" in |
b3fb7fc3 | 1027 | *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;; |
1c0feb67 | 1028 | *-isc2.2* ) opsys=isc2-2 ;; |
e5f1d6a0 | 1029 | *-isc4.0* ) opsys=isc4-0 ;; |
b3fb7fc3 | 1030 | *-isc* ) opsys=isc3-0 ;; |
dc6ace12 | 1031 | *-esix5* ) opsys=esix5r4; NON_GNU_CPP=/usr/lib/cpp ;; |
b3fb7fc3 JB |
1032 | *-esix* ) opsys=esix ;; |
1033 | *-xenix* ) opsys=xenix ;; | |
1034 | *-linux* ) opsys=linux ;; | |
1035 | *-sco3.2v4* ) opsys=sco4 ;; | |
1036 | *-bsd386* ) opsys=bsd386 ;; | |
1c0feb67 | 1037 | *-386bsd* ) opsys=386bsd ;; |
a117e51e | 1038 | *-freebsd* ) opsys=freebsd ;; |
dbf6ad3d | 1039 | *-netbsd* ) opsys=netbsd ;; |
91d39bf0 | 1040 | *-nextstep* ) opsys=mach2 ;; |
b3fb7fc3 JB |
1041 | ## Otherwise, we'll fall through to the generic opsys code at the bottom. |
1042 | esac | |
1043 | ;; | |
1044 | ||
20d9a863 | 1045 | * ) |
8509d50c | 1046 | unported=true |
20d9a863 | 1047 | ;; |
20d9a863 | 1048 | esac |
ca1d1d23 | 1049 | |
8509d50c JB |
1050 | ### If the code above didn't choose an operating system, just choose |
1051 | ### an operating system based on the configuration name. You really | |
1052 | ### only want to use this when you have no idea what the right | |
1053 | ### operating system is; if you know what operating systems a machine | |
1054 | ### runs, it's cleaner to make it explicit in the case statement | |
1055 | ### above. | |
87a6b538 | 1056 | if [ x"${opsys}" = x ]; then |
279271ba | 1057 | case "${canonical}" in |
d6dddccb RM |
1058 | *-gnu* ) opsys=gnu ;; |
1059 | *-bsd4.[01] ) opsys=bsd4-1 ;; | |
1060 | *-bsd4.2 ) opsys=bsd4-2 ;; | |
1061 | *-bsd4.3 ) opsys=bsd4-3 ;; | |
3647c171 JB |
1062 | *-sysv0 | *-sysvr0 ) opsys=usg5-0 ;; |
1063 | *-sysv2 | *-sysvr2 ) opsys=usg5-2 ;; | |
1064 | *-sysv2.2 | *-sysvr2.2 ) opsys=usg5-2-2 ;; | |
1065 | *-sysv3 | *-sysvr3 ) opsys=usg5-3 ;; | |
1066 | *-sysv4 | *-sysvr4 ) opsys=usg5-4 ;; | |
effdbe0d RS |
1067 | *-sysv4.1 | *-sysvr4.1 ) |
1068 | NON_GNU_CPP=/usr/lib/cpp | |
1069 | opsys=usg5-4 ;; | |
7846ef2c | 1070 | *-sysv4.2 | *-sysvr4.2 ) opsys=usg5-4-2 ;; |
8509d50c JB |
1071 | * ) |
1072 | unported=true | |
1073 | ;; | |
1074 | esac | |
1075 | fi | |
1076 | ||
1077 | if $unported ; then | |
279271ba | 1078 | (echo "${progname}: Emacs hasn't been ported to \`${canonical}' systems." |
8509d50c JB |
1079 | echo "${progname}: Check \`etc/MACHINES' for recognized configuration names." |
1080 | ) >&2 | |
1081 | exit 1 | |
1082 | fi | |
1083 | ||
1084 | machfile="m/${machine}.h" | |
1085 | opsysfile="s/${opsys}.h" | |
1086 | ||
c5f67786 JB |
1087 | ] |
1088 | AC_PREPARE(lisp) | |
e4474817 | 1089 | AC_CONFIG_HEADER(src/config.h) |
c5f67786 | 1090 | [ |
7d99494c JB |
1091 | |
1092 | #### Choose a compiler. | |
63041661 | 1093 | if [ "x$CC" = x ] |
c78f294b RS |
1094 | then true |
1095 | else cc_specified=1 | |
63041661 RS |
1096 | fi |
1097 | ||
7d99494c | 1098 | case ${with_gcc} in |
8ba83d88 | 1099 | "yes" ) CC="gcc" GCC=1 ;; |
63041661 RS |
1100 | "no" ) |
1101 | if [ "x$CC" = x ] | |
c78f294b RS |
1102 | then CC=cc; |
1103 | else true; | |
63041661 RS |
1104 | fi |
1105 | ;; | |
7d99494c | 1106 | * ) |
e4474817 | 1107 | ] AC_PROG_CC [ |
7d99494c JB |
1108 | esac |
1109 | ||
9c34bd79 RS |
1110 | #### Some systems specify a CPP to use unless we are using GCC. |
1111 | #### Now that we know whether we are using GCC, we can decide whether | |
1112 | #### to use that one. | |
f4828eac | 1113 | if [ "x$NON_GNU_CPP" = x ] || [ x$GCC = x1 ] || [ "x$CPP" != x ] |
9c34bd79 RS |
1114 | then true |
1115 | else | |
990a7421 | 1116 | CPP="$NON_GNU_CPP" |
9c34bd79 RS |
1117 | fi |
1118 | ||
1119 | #### Some systems specify a CC to use unless we are using GCC. | |
1120 | #### Now that we know whether we are using GCC, we can decide whether | |
1121 | #### to use that one. | |
63041661 | 1122 | if [ "x$NON_GNU_CC" = x ] || [ x$GCC = x1 ] || [ x$cc_specified = x1 ] |
9c34bd79 RS |
1123 | then true |
1124 | else | |
63041661 | 1125 | CC="$NON_GNU_CC" |
9c34bd79 RS |
1126 | fi |
1127 | ||
00c564b5 JB |
1128 | #### Some other nice autoconf tests. If you add a test here which |
1129 | #### should make an entry in src/config.h, don't forget to add an | |
1130 | #### #undef clause to src/config.h.in for autoconf to modify. | |
7d99494c | 1131 | ] |
00c564b5 | 1132 | dnl checks for programs |
e4474817 | 1133 | AC_LN_S |
c5f67786 | 1134 | AC_PROG_CPP |
86ddcc58 | 1135 | AC_PROG_INSTALL |
4b5a51c1 | 1136 | AC_PROG_YACC |
00c564b5 JB |
1137 | |
1138 | dnl checks for UNIX variants that set `DEFS' | |
1139 | ||
1140 | dnl checks for header files | |
1052acbf | 1141 | AC_HAVE_HEADERS(sys/timeb.h sys/time.h unistd.h) |
d855a603 | 1142 | AC_STDC_HEADERS |
9397d456 | 1143 | AC_TIME_WITH_SYS_TIME |
764b979b RS |
1144 | dnl In Autoconf 1.8 use AC_SYS_SIGLIST_DECLARED instead of this. |
1145 | AC_COMPILE_CHECK(sys_siglist declaration in signal.h or unistd.h, | |
1146 | [#include <signal.h> | |
1147 | /* NetBSD declares sys_siglist in <unistd.h>. */ | |
1148 | #ifdef HAVE_UNISTD_H | |
1149 | #include <unistd.h> | |
1150 | #endif], [char *msg = *(sys_siglist + 1);], | |
1151 | AC_DEFINE(SYS_SIGLIST_DECLARED)) | |
00c564b5 JB |
1152 | |
1153 | dnl checks for typedefs | |
7d99494c | 1154 | AC_RETSIGTYPE |
00c564b5 | 1155 | |
00c564b5 | 1156 | dnl checks for structure members |
a6eb6797 | 1157 | AC_STRUCT_TM |
d52c5f58 | 1158 | AC_TIMEZONE |
00c564b5 JB |
1159 | |
1160 | dnl checks for compiler characteristics | |
c5f67786 | 1161 | AC_CONST |
00c564b5 | 1162 | |
4703b679 RS |
1163 | dnl check for Make feature |
1164 | AC_SET_MAKE | |
1165 | ||
00c564b5 | 1166 | dnl checks for operating system services |
fe5de478 | 1167 | AC_LONG_FILE_NAMES |
00c564b5 JB |
1168 | |
1169 | dnl other checks for UNIX variants | |
7d99494c JB |
1170 | [ |
1171 | ||
0c22fbca | 1172 | #### Choose a window system. |
46947372 | 1173 | echo "Checking window system." |
c5f67786 | 1174 | |
8509d50c | 1175 | window_system='' |
20d9a863 | 1176 | case "${with_x}" in |
2c44309a RS |
1177 | yes ) |
1178 | window_system=${window_system}x11 | |
20d9a863 JB |
1179 | ;; |
1180 | no ) | |
1181 | window_system=${window_system}none | |
20d9a863 | 1182 | ;; |
2c44309a | 1183 | esac |
a1493829 RS |
1184 | case "${window_system}" in |
1185 | .* ) | |
1186 | ;; | |
1187 | * ) | |
1188 | case "${with_x11}" in | |
1189 | yes ) | |
1190 | window_system=x11 | |
1191 | ;; | |
1192 | no ) | |
1193 | window_system=none | |
1194 | ;; | |
1195 | esac | |
1196 | case "${with_x10}" in | |
1197 | yes ) | |
1198 | window_system=x10 | |
1199 | ;; | |
1200 | no ) | |
1201 | window_system=none | |
1202 | ;; | |
1203 | esac | |
20d9a863 | 1204 | ;; |
2c44309a RS |
1205 | esac |
1206 | ||
ca1d1d23 JB |
1207 | case "${window_system}" in |
1208 | "none" | "x11" | "x10" ) ;; | |
ca1d1d23 | 1209 | "" ) |
825e4ec2 JB |
1210 | # --x-includes or --x-libraries implies --with-x11. |
1211 | if [ -n "${x_includes}" ] || [ -n "${x_libraries}" ]; then | |
1212 | window_system=x11 | |
1213 | else | |
1214 | echo " No window system specified. Looking for X11." | |
1215 | # If the user didn't specify a window system and we found X11, use it. | |
1216 | if [ -r /usr/lib/libX11.a \ | |
5d9aefc7 | 1217 | -o -d /usr/include/X11 \ |
7d99494c JB |
1218 | -o -d /usr/X386/include \ |
1219 | -o -d ${x_includes}/X11 ]; then | |
825e4ec2 JB |
1220 | window_system=x11 |
1221 | fi | |
46947372 | 1222 | fi |
ca1d1d23 JB |
1223 | ;; |
1224 | * ) | |
825e4ec2 | 1225 | echo "Don't specify a window system more than once." >&2 |
ca1d1d23 JB |
1226 | exit 1 |
1227 | ;; | |
1228 | esac | |
1229 | ||
1659e114 RS |
1230 | case "${window_system}" in |
1231 | "" | "x11" ) | |
1232 | ### If the user hasn't specified where we should find X, try | |
1233 | ### letting autoconf figure that out. | |
1234 | if [ -z "${x_includes}" ] && [ -z "${x_libraries}" ]; then | |
1235 | ] | |
1236 | AC_FIND_X | |
1237 | [ | |
1238 | fi | |
1239 | if [ -n "${x_includes}" ] || [ -n "${x_libraries}" ]; then | |
1240 | window_system=x11 | |
1241 | fi | |
1242 | ;; | |
1243 | esac | |
1244 | ||
825e4ec2 JB |
1245 | [ -z "${window_system}" ] && window_system=none |
1246 | ||
1247 | [ -n "${x_libraries}" ] && LD_SWITCH_X_SITE="-L${x_libraries}" | |
5b46c383 | 1248 | [ -n "${x_libraries}" ] && LD_SWITCH_X_SITE_AUX="-R${x_libraries}" |
825e4ec2 JB |
1249 | [ -n "${x_includes}" ] && C_SWITCH_X_SITE="-I${x_includes}" |
1250 | ||
7a5e0891 BF |
1251 | # Avoid forcing the search of /usr/include before fixed include files. |
1252 | if [ "$C_SWITCH_X_SITE" = "-I/usr/include" ]; then | |
1253 | C_SWITCH_X_SITE=" " | |
1254 | fi | |
1255 | ||
ca1d1d23 JB |
1256 | case "${window_system}" in |
1257 | x11 ) | |
0c22fbca JB |
1258 | HAVE_X_WINDOWS=yes |
1259 | HAVE_X11=yes | |
8509d50c | 1260 | echo " Using X11." |
1c4ce111 | 1261 | case "${with_x_toolkit}" in |
c6a9d251 | 1262 | athena | lucid ) |
1c4ce111 | 1263 | USE_X_TOOLKIT=LUCID |
c6a9d251 | 1264 | echo " Using Xt toolkit." |
1c4ce111 RS |
1265 | ;; |
1266 | motif ) | |
1267 | USE_X_TOOLKIT=MOTIF | |
1268 | echo " Using Motif toolkit." | |
1269 | ;; | |
1270 | open-look ) | |
1271 | USE_X_TOOLKIT=OPEN_LOOK | |
1272 | echo " Using Open-Look toolkit." | |
1273 | ;; | |
1274 | * ) | |
78a0e199 | 1275 | USE_X_TOOLKIT=none |
1c4ce111 RS |
1276 | echo " Using Xlib directly." |
1277 | ;; | |
1278 | esac | |
ca1d1d23 JB |
1279 | ;; |
1280 | x10 ) | |
0c22fbca JB |
1281 | HAVE_X_WINDOWS=yes |
1282 | HAVE_X11=no | |
78a0e199 | 1283 | USE_X_TOOLKIT=none |
8509d50c | 1284 | echo " Using X10." |
ca1d1d23 JB |
1285 | ;; |
1286 | none ) | |
0c22fbca JB |
1287 | HAVE_X_WINDOWS=no |
1288 | HAVE_X11=no | |
78a0e199 | 1289 | USE_X_TOOLKIT=none |
8509d50c | 1290 | echo " Using no window system." |
ca1d1d23 JB |
1291 | ;; |
1292 | esac | |
1c4ce111 | 1293 | X_TOOLKIT_TYPE=$USE_X_TOOLKIT |
ca1d1d23 | 1294 | |
0c22fbca JB |
1295 | ### If we're using X11, we should use the X menu package. |
1296 | HAVE_X_MENU=no | |
1297 | case ${HAVE_X11} in | |
20d9a863 | 1298 | yes ) |
0c22fbca | 1299 | HAVE_X_MENU=yes |
ca1d1d23 JB |
1300 | ;; |
1301 | esac | |
1302 | ||
0c22fbca | 1303 | #### Extract some information from the operating system and machine files. |
4746118a | 1304 | |
46947372 JB |
1305 | echo "Examining the machine- and system-dependent files to find out" |
1306 | echo " - which libraries the lib-src programs will want, and" | |
1307 | echo " - whether the GNU malloc routines are usable." | |
c5f67786 JB |
1308 | |
1309 | ### It's not important that this name contain the PID; you can't run | |
1310 | ### two configures in the same directory and have anything work | |
1311 | ### anyway. | |
1312 | tempcname="conftest.c" | |
1313 | ||
e94740ce JB |
1314 | echo ' |
1315 | #include "'${srcdir}'/src/'${opsysfile}'" | |
1316 | #include "'${srcdir}'/src/'${machfile}'" | |
ca1d1d23 JB |
1317 | #ifndef LIBS_MACHINE |
1318 | #define LIBS_MACHINE | |
1319 | #endif | |
1320 | #ifndef LIBS_SYSTEM | |
1321 | #define LIBS_SYSTEM | |
1322 | #endif | |
80afd15e JB |
1323 | #ifndef C_SWITCH_SYSTEM |
1324 | #define C_SWITCH_SYSTEM | |
f071c05a | 1325 | #endif |
1e39d86d RS |
1326 | #ifndef C_SWITCH_MACHINE |
1327 | #define C_SWITCH_MACHINE | |
1328 | #endif | |
0028bd66 RS |
1329 | configure___ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM |
1330 | configure___ c_switch_system=C_SWITCH_SYSTEM | |
1e39d86d | 1331 | configure___ c_switch_machine=C_SWITCH_MACHINE |
ac384e4f | 1332 | |
825e4ec2 | 1333 | #ifndef LIB_X11_LIB |
1c0feb67 | 1334 | #define LIB_X11_LIB -lX11 |
825e4ec2 JB |
1335 | #endif |
1336 | ||
1337 | #ifndef LIBX11_MACHINE | |
1338 | #define LIBX11_MACHINE | |
1339 | #endif | |
1340 | ||
1341 | #ifndef LIBX11_SYSTEM | |
1342 | #define LIBX11_SYSTEM | |
1343 | #endif | |
0028bd66 | 1344 | configure___ LIBX=LIB_X11_LIB LIBX11_MACHINE LIBX11_SYSTEM |
825e4ec2 | 1345 | |
ac384e4f | 1346 | #ifdef UNEXEC |
0028bd66 | 1347 | configure___ unexec=UNEXEC |
ac384e4f | 1348 | #else |
0028bd66 | 1349 | configure___ unexec=unexec.o |
ac384e4f JB |
1350 | #endif |
1351 | ||
46947372 | 1352 | #ifdef SYSTEM_MALLOC |
0028bd66 | 1353 | configure___ system_malloc=yes |
46947372 | 1354 | #else |
0028bd66 | 1355 | configure___ system_malloc=no |
46947372 | 1356 | #endif |
4ed216b3 JB |
1357 | |
1358 | #ifndef C_DEBUG_SWITCH | |
1359 | #define C_DEBUG_SWITCH -g | |
1360 | #endif | |
1361 | ||
1362 | #ifndef C_OPTIMIZE_SWITCH | |
1363 | #define C_OPTIMIZE_SWITCH -O | |
1364 | #endif | |
1365 | ||
1366 | #ifdef __GNUC__ | |
a84cd140 | 1367 | configure___ CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${CFLAGS}' |
4ed216b3 | 1368 | #else |
a84cd140 | 1369 | configure___ CFLAGS=C_DEBUG_SWITCH '${CFLAGS}' |
4ed216b3 | 1370 | #endif |
46947372 | 1371 | ' > ${tempcname} |
a6eb6797 JB |
1372 | # The value of CPP is a quoted variable reference, so we need to do this |
1373 | # to get its actual value... | |
b73fe839 JB |
1374 | CPP=`eval "echo $CPP"` |
1375 | eval `${CPP} -Isrc ${tempcname} \ | |
0028bd66 RS |
1376 | | grep 'configure___' \ |
1377 | | sed -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/'` | |
46947372 JB |
1378 | rm ${tempcname} |
1379 | ||
ac384e4f JB |
1380 | ### Compute the unexec source name from the object name. |
1381 | UNEXEC_SRC="`echo ${unexec} | sed 's/\.o/.c/'`" | |
7d99494c | 1382 | |
46947372 | 1383 | # Do the opsystem or machine files prohibit the use of the GNU malloc? |
e94740ce JB |
1384 | # Assume not, until told otherwise. |
1385 | GNU_MALLOC=yes | |
46947372 | 1386 | if [ "${system_malloc}" = "yes" ]; then |
0c22fbca JB |
1387 | GNU_MALLOC=no |
1388 | GNU_MALLOC_reason=" | |
8509d50c | 1389 | (The GNU allocators don't work with this system configuration.)" |
46947372 JB |
1390 | fi |
1391 | ||
87a6b538 | 1392 | if [ x"${REL_ALLOC}" = x ]; then |
0c22fbca | 1393 | REL_ALLOC=${GNU_MALLOC} |
46947372 | 1394 | fi |
ca1d1d23 | 1395 | |
0c22fbca JB |
1396 | LISP_FLOAT_TYPE=yes |
1397 | ||
e94740ce | 1398 | |
825e4ec2 JB |
1399 | #### Add the libraries to LIBS and check for some functions. |
1400 | ||
30945baf | 1401 | ] |
1e39d86d | 1402 | DEFS="$c_switch_system $c_switch_machine $DEFS" |
825e4ec2 JB |
1403 | LIBS="$libsrc_libs" |
1404 | ||
1405 | dnl If found, this defines HAVE_LIBDNET, which m/pmax.h checks, | |
1406 | dnl and also adds -ldnet to LIBS, which Autoconf uses for checks. | |
1407 | AC_HAVE_LIBRARY(-ldnet) | |
30a91516 RS |
1408 | dnl This causes -lresolv to get used in subsequent tests, |
1409 | dnl which causes failures on some systems such as HPUX 9. | |
1410 | dnl AC_HAVE_LIBRARY(-lresolv) | |
30945baf | 1411 | |
dbf6ad3d RM |
1412 | AC_HAVE_LIBRARY(-lXbsd, LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd") |
1413 | ||
1414 | echo checking for XFree86 | |
1415 | if test -d /usr/X386/include; then | |
1416 | HAVE_XFREE386=yes | |
1417 | test -z "${C_SWITCH_X_SITE}" && C_SWITCH_X_SITE="-I/usr/X386/include" | |
1418 | fi | |
30945baf | 1419 | |
825e4ec2 JB |
1420 | if test "${HAVE_X11}" = "yes"; then |
1421 | DEFS="$C_SWITCH_X_SITE $DEFS" | |
1422 | LIBS="$LD_SWITCH_X_SITE $LIBX $LIBS" | |
5725490b RM |
1423 | AC_HAVE_FUNCS(XrmSetDatabase XScreenResourceString \ |
1424 | XScreenNumberOfScreen XSetWMProtocols) | |
825e4ec2 JB |
1425 | fi |
1426 | ||
1427 | AC_ALLOCA | |
3f469c2e RM |
1428 | |
1429 | # logb and frexp are found in -lm on most systems. | |
1430 | AC_HAVE_LIBRARY(-lm) | |
5dd53b99 | 1431 | AC_HAVE_FUNCS(gettimeofday gethostname dup2 rename closedir mkdir rmdir \ |
5725490b RM |
1432 | random bcopy bcmp logb frexp fmod drem ftime res_init setsid strerror \ |
1433 | fpathconf) | |
825e4ec2 JB |
1434 | |
1435 | ok_so_far=true | |
1436 | AC_FUNC_CHECK(socket, , ok_so_far=) | |
1437 | if test -n "$ok_so_far"; then | |
1438 | AC_HEADER_CHECK(netinet/in.h, , ok_so_far=) | |
1439 | fi | |
1440 | if test -n "$ok_so_far"; then | |
1441 | AC_HEADER_CHECK(arpa/inet.h, , ok_so_far=) | |
1442 | fi | |
1443 | if test -n "$ok_so_far"; then | |
1444 | AC_DEFINE(HAVE_INET_SOCKETS) | |
1445 | fi | |
1446 | [ | |
e94740ce JB |
1447 | #### Find out which version of Emacs this is. |
1448 | version=`grep 'defconst[ ]*emacs-version' ${srcdir}/lisp/version.el \ | |
73e7c7be | 1449 | | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'` |
87a6b538 | 1450 | if [ x"${version}" = x ]; then |
e94740ce JB |
1451 | echo "${progname}: can't find current emacs version in |
1452 | \`${srcdir}/lisp/version.el'." >&2 | |
1453 | exit 1 | |
1454 | fi | |
1455 | ||
8686888e JB |
1456 | if [ -f /usr/lpp/X11/bin/smt.exp ]; then |
1457 | ] | |
1458 | AC_DEFINE(HAVE_AIX_SMT_EXP) | |
1459 | [ | |
1460 | fi | |
1461 | ||
e4474817 | 1462 | #### Specify what sort of things we'll be editing into Makefile and config.h. |
279271ba | 1463 | ### Use configuration here uncanonicalized to avoid exceeding size limits. |
7d99494c | 1464 | ] |
7d99494c | 1465 | AC_SUBST(version) |
ca2a1384 | 1466 | AC_SUBST(configuration) |
7d99494c | 1467 | AC_SUBST(srcdir) |
cedb6c1b BF |
1468 | AC_SUBST(prefix) |
1469 | AC_SUBST(exec_prefix) | |
1470 | AC_SUBST(bindir) | |
1471 | AC_SUBST(datadir) | |
1472 | AC_SUBST(statedir) | |
1473 | AC_SUBST(libdir) | |
1474 | AC_SUBST(mandir) | |
1475 | AC_SUBST(infodir) | |
1476 | AC_SUBST(lispdir) | |
1477 | AC_SUBST(locallisppath) | |
1478 | AC_SUBST(lisppath) | |
1479 | AC_SUBST(etcdir) | |
1480 | AC_SUBST(lockdir) | |
1481 | AC_SUBST(archlibdir) | |
109ebdd4 | 1482 | AC_SUBST(docdir) |
7d99494c | 1483 | AC_SUBST(c_switch_system) |
1e39d86d | 1484 | AC_SUBST(c_switch_machine) |
7d99494c | 1485 | AC_SUBST(LD_SWITCH_X_SITE) |
5b46c383 | 1486 | AC_SUBST(LD_SWITCH_X_SITE_AUX) |
7d99494c | 1487 | AC_SUBST(C_SWITCH_X_SITE) |
e4474817 | 1488 | AC_SUBST(CFLAGS) |
1c4ce111 | 1489 | AC_SUBST(X_TOOLKIT_TYPE) |
73e7c7be RS |
1490 | AC_SUBST(machfile) |
1491 | AC_SUBST(opsysfile) | |
e4474817 | 1492 | |
041b4242 | 1493 | AC_DEFINE_UNQUOTED(CONFIGURATION, "\"${configuration}\"") |
9361e005 JB |
1494 | AC_DEFINE_UNQUOTED(config_machfile, "\"${machfile}\"") |
1495 | AC_DEFINE_UNQUOTED(config_opsysfile, "\"${opsysfile}\"") | |
1496 | AC_DEFINE_UNQUOTED(LD_SWITCH_X_SITE, ${LD_SWITCH_X_SITE}) | |
382d3536 | 1497 | AC_DEFINE_UNQUOTED(LD_SWITCH_X_SITE_AUX, ${LD_SWITCH_X_SITE_AUX}) |
9361e005 | 1498 | AC_DEFINE_UNQUOTED(C_SWITCH_X_SITE, ${C_SWITCH_X_SITE}) |
ac384e4f | 1499 | AC_DEFINE_UNQUOTED(UNEXEC_SRC, ${UNEXEC_SRC}) |
9361e005 | 1500 | |
7d99494c JB |
1501 | [ |
1502 | if [ "${HAVE_X_WINDOWS}" = "yes" ] ; then | |
1503 | ] AC_DEFINE(HAVE_X_WINDOWS) [ | |
1504 | fi | |
78a0e199 | 1505 | if [ "${USE_X_TOOLKIT}" != "none" ] ; then |
1c4ce111 RS |
1506 | ] AC_DEFINE(USE_X_TOOLKIT) [ |
1507 | fi | |
7d99494c JB |
1508 | if [ "${HAVE_X11}" = "yes" ] ; then |
1509 | ] AC_DEFINE(HAVE_X11) [ | |
1510 | fi | |
1511 | if [ "${HAVE_XFREE386}" = "yes" ] ; then | |
1512 | ] AC_DEFINE(HAVE_XFREE386) [ | |
1513 | fi | |
1514 | if [ "${HAVE_X_MENU}" = "yes" ] ; then | |
1515 | ] AC_DEFINE(HAVE_X_MENU) [ | |
1516 | fi | |
1517 | if [ "${GNU_MALLOC}" = "yes" ] ; then | |
1518 | ] AC_DEFINE(GNU_MALLOC) [ | |
1519 | fi | |
1520 | if [ "${REL_ALLOC}" = "yes" ] ; then | |
1521 | ] AC_DEFINE(REL_ALLOC) [ | |
1522 | fi | |
1523 | if [ "${LISP_FLOAT_TYPE}" = "yes" ] ; then | |
1524 | ] AC_DEFINE(LISP_FLOAT_TYPE) [ | |
1525 | fi | |
ca1d1d23 | 1526 | |
cedb6c1b BF |
1527 | # ====================== Developer's configuration ======================= |
1528 | ||
1529 | # The following assignments make sense if you're running Emacs on a single | |
1530 | # machine, one version at a time, and you want changes to the lisp and etc | |
1531 | # directories in the source tree to show up immediately in your working | |
1532 | # environment. It saves a great deal of disk space by not duplicating the | |
1533 | # lisp and etc directories. | |
1534 | ||
1535 | if [ "$run_in_place" = "1" ]; then | |
1536 | lispdir='${srcdir}/lisp' | |
7f291b64 | 1537 | locallisppath='${srcdir}/site-lisp' |
cedb6c1b BF |
1538 | etcdir='${srcdir}/etc' |
1539 | lockdir='${srcdir}/lock' | |
542eb82b RS |
1540 | # We used to make archlibdir and docdir absolute, |
1541 | # but that caused trouble with automounters. | |
1542 | archlibdir='${srcdir}/lib-src' | |
1543 | docdir='${srcdir}/etc' | |
cedb6c1b BF |
1544 | infodir='${srcdir}/info' |
1545 | elif [ "$single_tree" = "1" ]; then | |
1546 | if [ "$exec_prefix_specified" = "" ]; then | |
1547 | exec_prefix='${prefix}' | |
1548 | fi | |
1549 | if [ "$bindir_specified" = "" ]; then | |
1550 | bindir='${exec_prefix}/bin/${configuration}' | |
1551 | fi | |
1552 | if [ "$datadir_specified" = "" ]; then | |
1553 | datadir='${prefix}/common' | |
1554 | fi | |
1555 | if [ "$statedir_specified" = "" ]; then | |
1556 | statedir='${prefix}/common' | |
1557 | fi | |
1558 | if [ "$libdir_specified" = "" ]; then | |
1559 | libdir='${bindir}' | |
1560 | fi | |
1561 | if [ "$lispdir_specified" = "" ]; then | |
1562 | lispdir='${prefix}/common/lisp' | |
1563 | fi | |
1564 | if [ "$locallisppath_specified" = "" ]; then | |
1565 | locallisppath='${prefix}/common/site-lisp' | |
1566 | fi | |
1567 | if [ "$lockdir_specified" = "" ]; then | |
1568 | lockdir='${prefix}/common/lock' | |
1569 | fi | |
1570 | if [ "$archlibdir_specified" = "" ]; then | |
1571 | archlibdir='${libdir}/etc' | |
1572 | fi | |
1573 | if [ "$etcdir_specified" = "" ]; then | |
1574 | etcdir='${prefix}/common/data' | |
1575 | fi | |
109ebdd4 KH |
1576 | if [ "$docdir_specified" = "" ]; then |
1577 | docdir='${prefix}/common/data' | |
1578 | fi | |
cedb6c1b | 1579 | fi |
f6766fff | 1580 | |
7d99494c JB |
1581 | #### Report on what we decided to do. |
1582 | echo " | |
f6766fff | 1583 | |
279271ba | 1584 | Configured for \`${canonical}'. |
8509d50c | 1585 | |
c9ed10f6 | 1586 | Where should the build process find the source code? ${srcdir} |
8509d50c JB |
1587 | What operating system and machine description files should Emacs use? |
1588 | \`${opsysfile}' and \`${machfile}' | |
e4474817 | 1589 | What compiler should emacs be built with? ${CC} ${CFLAGS} |
0c22fbca JB |
1590 | Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason} |
1591 | Should Emacs use the relocating allocator for buffers? ${REL_ALLOC} | |
78a0e199 RS |
1592 | What window system should Emacs use? ${window_system} |
1593 | What toolkit should Emacs use? ${USE_X_TOOLKIT}${x_includes+ | |
9c7a7556 | 1594 | Where do we find X Windows header files? }${x_includes}${x_libraries+ |
7d99494c | 1595 | Where do we find X Windows libraries? }${x_libraries} |
8c0e7b73 | 1596 | |
e94740ce | 1597 | " |
825e4ec2 JB |
1598 | |
1599 | # Remove any trailing slashes in these variables. | |
1600 | test -n "${prefix}" && | |
1601 | prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'` | |
1602 | test -n "${exec_prefix}" && | |
1603 | exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'` | |
7d99494c | 1604 | ] |
4acc6824 | 1605 | AC_OUTPUT(Makefile lib-src/Makefile.in oldXMenu/Makefile lwlib/Makefile src/Makefile.in, [ |
6e4b48e2 | 1606 | |
cedb6c1b | 1607 | # Build src/Makefile from ${srcdir}/src/Makefile.in. This must be done |
47241a65 RM |
1608 | # after src/config.h is built, since we rely on that file. |
1609 | ||
1610 | changequote(,)dnl The horror, the horror. | |
764b979b RS |
1611 | # Now get this: Some word that is part of the ${srcdir} directory name |
1612 | # or the ${configuration} value might, just might, happen to be an | |
1613 | # identifier like `sun4' or `i386' or something, and be predefined by | |
1614 | # the C preprocessor to some helpful value like 1, or maybe the empty | |
1615 | # string. Needless to say consequent macro substitutions are less | |
1616 | # than conducive to the makefile finding the correct directory. | |
23aaa342 | 1617 | undefs="`echo $top_srcdir $configuration $canonical | |
196a7903 KH |
1618 | sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/ *$//' \ |
1619 | -e 's/ */ -U/g' -e 's/-U[0-9][^ ]*//g' \ | |
47241a65 RM |
1620 | `" |
1621 | changequote([,])dnl | |
1622 | ||
4acc6824 RS |
1623 | echo creating lib-src/Makefile |
1624 | ( cd lib-src | |
23aaa342 RS |
1625 | rm -f junk.c junk1.c junk2.c |
1626 | sed -e '/start of cpp stuff/q' \ | |
1627 | < Makefile.in > junk1.c | |
1628 | sed -e '1,/start of cpp stuff/d'\ | |
4acc6824 RS |
1629 | -e 's@/\*\*/#\(.*\)$@/* \1 */@' \ |
1630 | < Makefile.in > junk.c | |
23aaa342 RS |
1631 | $CPP $undefs -I. -I$top_srcdir/src $CPPFLAGS junk.c | \ |
1632 | sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c | |
1633 | cat junk1.c junk2.c > Makefile.new | |
1634 | rm -f junk.c junk1.c junk2.c | |
1635 | chmod 444 Makefile.new | |
1636 | mv -f Makefile.new Makefile | |
4acc6824 RS |
1637 | ) |
1638 | ||
47241a65 RM |
1639 | echo creating src/Makefile |
1640 | ( cd src | |
23aaa342 RS |
1641 | rm -f junk.c junk1.c junk2.c |
1642 | sed -e '/start of cpp stuff/q' \ | |
1643 | < Makefile.in > junk1.c | |
1644 | sed -e '1,/start of cpp stuff/d'\ | |
47241a65 RM |
1645 | -e 's@/\*\*/#\(.*\)$@/* \1 */@' \ |
1646 | < Makefile.in > junk.c | |
23aaa342 RS |
1647 | $CPP $undefs -I. -I$top_srcdir/src $CPPFLAGS junk.c | \ |
1648 | sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c | |
1649 | cat junk1.c junk2.c > Makefile.new | |
1650 | rm -f junk.c junk1.c junk2.c | |
1651 | chmod 444 Makefile.new | |
1652 | mv -f Makefile.new Makefile | |
47241a65 | 1653 | )]) |