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