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