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