(Fconstrain_to_field): Make sure we don't violate the
[bpt/emacs.git] / configure
CommitLineData
ba4481b5
DL
1#! /bin/sh
2
3# Guess values for system-dependent variables and create Makefiles.
4# Generated automatically using autoconf version 2.13
5# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6#
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
9
10# Defaults:
11ac_help=
12ac_default_prefix=/usr/local
13# Any additions from configure.in:
14ac_help="$ac_help
243cf185 15 --without-gcc don't use GCC to compile Emacs if GCC is found"
ba4481b5 16ac_help="$ac_help
243cf185 17 --without-pop don't support POP mail retrieval with movemail"
ba4481b5
DL
18ac_help="$ac_help
19 --with-hesiod support Hesiod to get the POP server host"
20ac_help="$ac_help
21 --with-x-toolkit=KIT use an X toolkit (KIT = yes/lucid/athena/motif/no)"
22ac_help="$ac_help
23 --with-xpm use -lXpm for displaying XPM images"
24ac_help="$ac_help
25 --with-jpeg use -ljpeg for displaying JPEG images"
26ac_help="$ac_help
27 --with-tiff use -ltiff for displaying TIFF images"
28ac_help="$ac_help
29 --with-gif use -lungif for displaying GIF images"
30ac_help="$ac_help
31 --with-png use -lpng for displaying PNG images"
32ac_help="$ac_help
243cf185 33 --without-toolkit-scroll-bars don't use Motif or Xaw3d scroll bars"
ba4481b5
DL
34ac_help="$ac_help
35 --with-x use the X Window System"
36
37# Initialize some variables set by options.
38# The variables have the same names as the options, with
39# dashes changed to underlines.
40build=NONE
41cache_file=./config.cache
42exec_prefix=NONE
43host=NONE
44no_create=
45nonopt=NONE
46no_recursion=
47prefix=NONE
48program_prefix=NONE
49program_suffix=NONE
50program_transform_name=s,x,x,
51silent=
52site=
53srcdir=
54target=NONE
55verbose=
56x_includes=NONE
57x_libraries=NONE
58bindir='${exec_prefix}/bin'
59sbindir='${exec_prefix}/sbin'
60libexecdir='${exec_prefix}/libexec'
61datadir='${prefix}/share'
62sysconfdir='${prefix}/etc'
63sharedstatedir='${prefix}/com'
64localstatedir='${prefix}/var'
65libdir='${exec_prefix}/lib'
66includedir='${prefix}/include'
67oldincludedir='/usr/include'
68infodir='${prefix}/info'
69mandir='${prefix}/man'
70
71# Initialize some other variables.
72subdirs=
73MFLAGS= MAKEFLAGS=
74SHELL=${CONFIG_SHELL-/bin/sh}
75# Maximum number of lines to put in a shell here document.
76ac_max_here_lines=12
77
78ac_prev=
79for ac_option
80do
81
82 # If the previous option needs an argument, assign it.
83 if test -n "$ac_prev"; then
84 eval "$ac_prev=\$ac_option"
85 ac_prev=
86 continue
87 fi
88
89 case "$ac_option" in
90 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
91 *) ac_optarg= ;;
92 esac
93
94 # Accept the important Cygnus configure options, so we can diagnose typos.
95
96 case "$ac_option" in
97
98 -bindir | --bindir | --bindi | --bind | --bin | --bi)
99 ac_prev=bindir ;;
100 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
101 bindir="$ac_optarg" ;;
102
103 -build | --build | --buil | --bui | --bu)
104 ac_prev=build ;;
105 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
106 build="$ac_optarg" ;;
107
108 -cache-file | --cache-file | --cache-fil | --cache-fi \
109 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
110 ac_prev=cache_file ;;
111 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
112 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
113 cache_file="$ac_optarg" ;;
114
115 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
116 ac_prev=datadir ;;
117 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
118 | --da=*)
119 datadir="$ac_optarg" ;;
120
121 -disable-* | --disable-*)
122 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
123 # Reject names that are not valid shell variable names.
124 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
125 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
126 fi
127 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
128 eval "enable_${ac_feature}=no" ;;
129
130 -enable-* | --enable-*)
131 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
132 # Reject names that are not valid shell variable names.
133 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
134 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
135 fi
136 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
137 case "$ac_option" in
138 *=*) ;;
139 *) ac_optarg=yes ;;
140 esac
141 eval "enable_${ac_feature}='$ac_optarg'" ;;
142
143 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
144 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
145 | --exec | --exe | --ex)
146 ac_prev=exec_prefix ;;
147 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
148 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
149 | --exec=* | --exe=* | --ex=*)
150 exec_prefix="$ac_optarg" ;;
151
152 -gas | --gas | --ga | --g)
153 # Obsolete; use --with-gas.
154 with_gas=yes ;;
155
156 -help | --help | --hel | --he)
157 # Omit some internal or obsolete options to make the list less imposing.
158 # This message is too long to be a string in the A/UX 3.1 sh.
159 cat << EOF
160Usage: configure [options] [host]
161Options: [defaults in brackets after descriptions]
162Configuration:
163 --cache-file=FILE cache test results in FILE
164 --help print this message
165 --no-create do not create output files
166 --quiet, --silent do not print \`checking...' messages
167 --version print the version of autoconf that created configure
168Directory and file names:
169 --prefix=PREFIX install architecture-independent files in PREFIX
170 [$ac_default_prefix]
171 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
172 [same as prefix]
173 --bindir=DIR user executables in DIR [EPREFIX/bin]
174 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
175 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
176 --datadir=DIR read-only architecture-independent data in DIR
177 [PREFIX/share]
178 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
179 --sharedstatedir=DIR modifiable architecture-independent data in DIR
180 [PREFIX/com]
181 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
182 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
183 --includedir=DIR C header files in DIR [PREFIX/include]
184 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
185 --infodir=DIR info documentation in DIR [PREFIX/info]
186 --mandir=DIR man documentation in DIR [PREFIX/man]
187 --srcdir=DIR find the sources in DIR [configure dir or ..]
188 --program-prefix=PREFIX prepend PREFIX to installed program names
189 --program-suffix=SUFFIX append SUFFIX to installed program names
190 --program-transform-name=PROGRAM
191 run sed PROGRAM on installed program names
192EOF
193 cat << EOF
194Host type:
195 --build=BUILD configure for building on BUILD [BUILD=HOST]
196 --host=HOST configure for HOST [guessed]
197 --target=TARGET configure for TARGET [TARGET=HOST]
198Features and packages:
199 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
200 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
201 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
202 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
203 --x-includes=DIR X include files are in DIR
204 --x-libraries=DIR X library files are in DIR
205EOF
206 if test -n "$ac_help"; then
207 echo "--enable and --with options recognized:$ac_help"
208 fi
209 exit 0 ;;
210
211 -host | --host | --hos | --ho)
212 ac_prev=host ;;
213 -host=* | --host=* | --hos=* | --ho=*)
214 host="$ac_optarg" ;;
215
216 -includedir | --includedir | --includedi | --included | --include \
217 | --includ | --inclu | --incl | --inc)
218 ac_prev=includedir ;;
219 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
220 | --includ=* | --inclu=* | --incl=* | --inc=*)
221 includedir="$ac_optarg" ;;
222
223 -infodir | --infodir | --infodi | --infod | --info | --inf)
224 ac_prev=infodir ;;
225 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
226 infodir="$ac_optarg" ;;
227
228 -libdir | --libdir | --libdi | --libd)
229 ac_prev=libdir ;;
230 -libdir=* | --libdir=* | --libdi=* | --libd=*)
231 libdir="$ac_optarg" ;;
232
233 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
234 | --libexe | --libex | --libe)
235 ac_prev=libexecdir ;;
236 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
237 | --libexe=* | --libex=* | --libe=*)
238 libexecdir="$ac_optarg" ;;
239
240 -localstatedir | --localstatedir | --localstatedi | --localstated \
241 | --localstate | --localstat | --localsta | --localst \
242 | --locals | --local | --loca | --loc | --lo)
243 ac_prev=localstatedir ;;
244 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
245 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
246 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
247 localstatedir="$ac_optarg" ;;
248
249 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
250 ac_prev=mandir ;;
251 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
252 mandir="$ac_optarg" ;;
253
254 -nfp | --nfp | --nf)
255 # Obsolete; use --without-fp.
256 with_fp=no ;;
257
258 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
259 | --no-cr | --no-c)
260 no_create=yes ;;
261
262 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
263 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
264 no_recursion=yes ;;
265
266 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
267 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
268 | --oldin | --oldi | --old | --ol | --o)
269 ac_prev=oldincludedir ;;
270 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
271 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
272 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
273 oldincludedir="$ac_optarg" ;;
274
275 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
276 ac_prev=prefix ;;
277 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
278 prefix="$ac_optarg" ;;
279
280 -program-prefix | --program-prefix | --program-prefi | --program-pref \
281 | --program-pre | --program-pr | --program-p)
282 ac_prev=program_prefix ;;
283 -program-prefix=* | --program-prefix=* | --program-prefi=* \
284 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
285 program_prefix="$ac_optarg" ;;
286
287 -program-suffix | --program-suffix | --program-suffi | --program-suff \
288 | --program-suf | --program-su | --program-s)
289 ac_prev=program_suffix ;;
290 -program-suffix=* | --program-suffix=* | --program-suffi=* \
291 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
292 program_suffix="$ac_optarg" ;;
293
294 -program-transform-name | --program-transform-name \
295 | --program-transform-nam | --program-transform-na \
296 | --program-transform-n | --program-transform- \
297 | --program-transform | --program-transfor \
298 | --program-transfo | --program-transf \
299 | --program-trans | --program-tran \
300 | --progr-tra | --program-tr | --program-t)
301 ac_prev=program_transform_name ;;
302 -program-transform-name=* | --program-transform-name=* \
303 | --program-transform-nam=* | --program-transform-na=* \
304 | --program-transform-n=* | --program-transform-=* \
305 | --program-transform=* | --program-transfor=* \
306 | --program-transfo=* | --program-transf=* \
307 | --program-trans=* | --program-tran=* \
308 | --progr-tra=* | --program-tr=* | --program-t=*)
309 program_transform_name="$ac_optarg" ;;
310
311 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
312 | -silent | --silent | --silen | --sile | --sil)
313 silent=yes ;;
314
315 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
316 ac_prev=sbindir ;;
317 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
318 | --sbi=* | --sb=*)
319 sbindir="$ac_optarg" ;;
320
321 -sharedstatedir | --sharedstatedir | --sharedstatedi \
322 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
323 | --sharedst | --shareds | --shared | --share | --shar \
324 | --sha | --sh)
325 ac_prev=sharedstatedir ;;
326 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
327 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
328 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
329 | --sha=* | --sh=*)
330 sharedstatedir="$ac_optarg" ;;
331
332 -site | --site | --sit)
333 ac_prev=site ;;
334 -site=* | --site=* | --sit=*)
335 site="$ac_optarg" ;;
336
337 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
338 ac_prev=srcdir ;;
339 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
340 srcdir="$ac_optarg" ;;
341
342 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
343 | --syscon | --sysco | --sysc | --sys | --sy)
344 ac_prev=sysconfdir ;;
345 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
346 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
347 sysconfdir="$ac_optarg" ;;
348
349 -target | --target | --targe | --targ | --tar | --ta | --t)
350 ac_prev=target ;;
351 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
352 target="$ac_optarg" ;;
353
354 -v | -verbose | --verbose | --verbos | --verbo | --verb)
355 verbose=yes ;;
356
357 -version | --version | --versio | --versi | --vers)
358 echo "configure generated by autoconf version 2.13"
359 exit 0 ;;
360
361 -with-* | --with-*)
362 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
363 # Reject names that are not valid shell variable names.
364 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
365 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
366 fi
367 ac_package=`echo $ac_package| sed 's/-/_/g'`
368 case "$ac_option" in
369 *=*) ;;
370 *) ac_optarg=yes ;;
371 esac
372 eval "with_${ac_package}='$ac_optarg'" ;;
373
374 -without-* | --without-*)
375 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
376 # Reject names that are not valid shell variable names.
377 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
378 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
379 fi
380 ac_package=`echo $ac_package| sed 's/-/_/g'`
381 eval "with_${ac_package}=no" ;;
382
383 --x)
384 # Obsolete; use --with-x.
385 with_x=yes ;;
386
387 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
388 | --x-incl | --x-inc | --x-in | --x-i)
389 ac_prev=x_includes ;;
390 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
391 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
392 x_includes="$ac_optarg" ;;
393
394 -x-libraries | --x-libraries | --x-librarie | --x-librari \
395 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
396 ac_prev=x_libraries ;;
397 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
398 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
399 x_libraries="$ac_optarg" ;;
400
401 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
402 ;;
403
404 *)
405 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
406 echo "configure: warning: $ac_option: invalid host type" 1>&2
407 fi
408 if test "x$nonopt" != xNONE; then
409 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
410 fi
411 nonopt="$ac_option"
412 ;;
413
414 esac
415done
416
417if test -n "$ac_prev"; then
418 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
419fi
420
421trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
422
423# File descriptor usage:
424# 0 standard input
425# 1 file creation
426# 2 errors and warnings
427# 3 some systems may open it to /dev/tty
428# 4 used on the Kubota Titan
429# 6 checking for... messages and results
430# 5 compiler messages saved in config.log
431if test "$silent" = yes; then
432 exec 6>/dev/null
433else
434 exec 6>&1
435fi
436exec 5>./config.log
437
438echo "\
439This file contains any messages produced by compilers while
440running configure, to aid debugging if configure makes a mistake.
441" 1>&5
442
443# Strip out --no-create and --no-recursion so they do not pile up.
444# Also quote any args containing shell metacharacters.
445ac_configure_args=
446for ac_arg
447do
448 case "$ac_arg" in
449 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
450 | --no-cr | --no-c) ;;
451 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
452 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
453 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
454 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
455 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
456 esac
457done
458
459# NLS nuisances.
460# Only set these to C if already set. These must not be set unconditionally
461# because not all systems understand e.g. LANG=C (notably SCO).
462# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
463# Non-C LC_CTYPE values break the ctype check.
464if test "${LANG+set}" = set; then LANG=C; export LANG; fi
465if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
466if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
467if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
468
469# confdefs.h avoids OS command line length limits that DEFS can exceed.
470rm -rf conftest* confdefs.h
471# AIX cpp loses on an empty file, so make sure it contains at least a newline.
472echo > confdefs.h
473
474# A filename unique to this package, relative to the directory that
475# configure is in, which we can look for to find out if srcdir is correct.
476ac_unique_file=src/lisp.h
477
478# Find the source files, if location was not specified.
479if test -z "$srcdir"; then
480 ac_srcdir_defaulted=yes
481 # Try the directory containing this script, then its parent.
482 ac_prog=$0
483 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
484 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
485 srcdir=$ac_confdir
486 if test ! -r $srcdir/$ac_unique_file; then
487 srcdir=..
488 fi
489else
490 ac_srcdir_defaulted=no
491fi
492if test ! -r $srcdir/$ac_unique_file; then
493 if test "$ac_srcdir_defaulted" = yes; then
494 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
495 else
496 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
497 fi
498fi
499srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
500
501# Prefer explicitly selected file to automatically selected ones.
502if test -z "$CONFIG_SITE"; then
503 if test "x$prefix" != xNONE; then
504 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
505 else
506 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
507 fi
508fi
509for ac_site_file in $CONFIG_SITE; do
510 if test -r "$ac_site_file"; then
511 echo "loading site script $ac_site_file"
512 . "$ac_site_file"
513 fi
514done
515
516if test -r "$cache_file"; then
517 echo "loading cache $cache_file"
518 . $cache_file
519else
520 echo "creating cache $cache_file"
521 > $cache_file
522fi
523
524ac_ext=c
525# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
526ac_cpp='$CPP $CPPFLAGS'
527ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
528ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
529cross_compiling=$ac_cv_prog_cc_cross
530
531ac_exeext=
532ac_objext=o
533if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
534 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
535 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
536 ac_n= ac_c='
537' ac_t=' '
538 else
539 ac_n=-n ac_c= ac_t=
540 fi
541else
542 ac_n= ac_c='\c' ac_t=
543fi
544
545
546
547
548lispdir='${datadir}/emacs/${version}/lisp'
549locallisppath='${datadir}/emacs/${version}/site-lisp:'\
550'${datadir}/emacs/site-lisp:${datadir}/emacs/${version}/leim'
551lisppath='${locallisppath}:${lispdir}'
552etcdir='${datadir}/emacs/${version}/etc'
553archlibdir='${libexecdir}/emacs/${version}/${configuration}'
554docdir='${datadir}/emacs/${version}/etc'
555
556# Check whether --with-gcc or --without-gcc was given.
557if test "${with_gcc+set}" = set; then
558 withval="$with_gcc"
559 :
560fi
561
562# Check whether --with-pop or --without-pop was given.
563if test "${with_pop+set}" = set; then
564 withval="$with_pop"
243cf185
DL
565 if test "$withval" = yes; then
566 cat >> confdefs.h <<\EOF
ba4481b5
DL
567#define MAIL_USE_POP 1
568EOF
569
243cf185
DL
570else :
571fi
ba4481b5
DL
572fi
573
574# Check whether --with-hesiod or --without-hesiod was given.
575if test "${with_hesiod+set}" = set; then
576 withval="$with_hesiod"
577 cat >> confdefs.h <<\EOF
578#define HESIOD 1
579EOF
580
581fi
582
583# Check whether --with-x-toolkit or --without-x-toolkit was given.
584if test "${with_x_toolkit+set}" = set; then
585 withval="$with_x_toolkit"
586 case "${withval}" in
587 y | ye | yes ) val=athena ;;
588 n | no ) val=no ;;
589 l | lu | luc | luci | lucid ) val=lucid ;;
590 a | at | ath | athe | athen | athena ) val=athena ;;
591 m | mo | mot | moti | motif ) val=motif ;;
592 * )
593{ echo "configure: error: \`--with-x-toolkit=$withval' is invalid\;
594this option's value should be \`yes', \`no', \`lucid', \`athena', or \`motif'.
595Currently, \`yes', \`athena' and \`lucid' are synonyms." 1>&2; exit 1; }
596 ;;
597 esac
598 with_x_toolkit=$val
599
600fi
601
602# Check whether --with-xpm or --without-xpm was given.
603if test "${with_xpm+set}" = set; then
604 withval="$with_xpm"
605 :
606fi
607
608# Check whether --with-jpeg or --without-jpeg was given.
609if test "${with_jpeg+set}" = set; then
610 withval="$with_jpeg"
611 :
612fi
613
614# Check whether --with-tiff or --without-tiff was given.
615if test "${with_tiff+set}" = set; then
616 withval="$with_tiff"
617 :
618fi
619
620# Check whether --with-gif or --without-gif was given.
621if test "${with_gif+set}" = set; then
622 withval="$with_gif"
623 :
624fi
625
626# Check whether --with-png or --without-png was given.
627if test "${with_png+set}" = set; then
628 withval="$with_png"
629 :
630fi
631
632# Check whether --with-toolkit-scroll-bars or --without-toolkit-scroll-bars was given.
633if test "${with_toolkit_scroll_bars+set}" = set; then
634 withval="$with_toolkit_scroll_bars"
635 :
636fi
637
638
639#### Make srcdir absolute, if it isn't already. It's important to
640#### avoid running the path through pwd unnecessary, since pwd can
641#### give you automounter prefixes, which can go away. We do all this
642#### so Emacs can find its files when run uninstalled.
643case "${srcdir}" in
644 /* ) ;;
645 . )
646 ## We may be able to use the $PWD environment variable to make this
647 ## absolute. But sometimes PWD is inaccurate.
648 ## Make sure CDPATH doesn't affect cd (in case PWD is relative).
649 unset CDPATH
650 if test "${PWD}" != "" && test "`(cd ${PWD} ; sh -c pwd)`" = "`pwd`" ;
651 then
652 srcdir="$PWD"
653 else
654 srcdir="`(cd ${srcdir}; pwd)`"
655 fi
656 ;;
657 * ) srcdir="`(cd ${srcdir}; pwd)`" ;;
658esac
659
660#### Check if the source directory already has a configured system in it.
661if test `pwd` != `(cd ${srcdir} && pwd)` \
662 && test -f "${srcdir}/src/config.h" ; then
663 echo "configure: warning: The directory tree \`${srcdir}' is being used
664 as a build directory right now; it has been configured in its own
665 right. To configure in another directory as well, you MUST
666 use GNU make. If you do not have GNU make, then you must
667 now do \`make distclean' in ${srcdir},
668 and then run $0 again." 1>&2
669
670 extrasub='/^VPATH[ ]*=/c\
671vpath %.c $(srcdir)\
672vpath %.h $(srcdir)\
673vpath %.y $(srcdir)\
674vpath %.l $(srcdir)\
675vpath %.s $(srcdir)\
676vpath %.in $(srcdir)\
677vpath %.texi $(srcdir)'
678fi
679
680#### Given the configuration name, set machfile and opsysfile to the
681#### names of the m/*.h and s/*.h files we should use.
682
683### Canonicalize the configuration name.
684
685ac_aux_dir=
686for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
687 if test -f $ac_dir/install-sh; then
688 ac_aux_dir=$ac_dir
689 ac_install_sh="$ac_aux_dir/install-sh -c"
690 break
691 elif test -f $ac_dir/install.sh; then
692 ac_aux_dir=$ac_dir
693 ac_install_sh="$ac_aux_dir/install.sh -c"
694 break
695 fi
696done
697if test -z "$ac_aux_dir"; then
698 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
699fi
700ac_config_guess=$ac_aux_dir/config.guess
701ac_config_sub=$ac_aux_dir/config.sub
702ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
703
704
705# Make sure we can run config.sub.
706if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
707else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
708fi
709
710echo $ac_n "checking host system type""... $ac_c" 1>&6
243cf185 711echo "configure:712: checking host system type" >&5
ba4481b5
DL
712
713host_alias=$host
714case "$host_alias" in
715NONE)
716 case $nonopt in
717 NONE)
718 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
719 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
720 fi ;;
721 *) host_alias=$nonopt ;;
722 esac ;;
723esac
724
725host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
726host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
727host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
728host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
729echo "$ac_t""$host" 1>&6
730
731canonical=$host
732configuration=$host_alias
733
734
735### If you add support for a new configuration, add code to this
736### switch statement to recognize your configuration name and select
737### the appropriate operating system and machine description files.
738
739### You would hope that you could choose an m/*.h file pretty much
740### based on the machine portion of the configuration name, and an s-
741### file based on the operating system portion. However, it turns out
742### that each m/*.h file is pretty manufacturer-specific - for
743### example, apollo.h, hp9000s300.h, mega68k, news.h, and tad68k are
744### all 68000 machines; mips.h, pmax.h, and news-risc are all MIPS
745### machines. So we basically have to have a special case for each
746### configuration name.
747###
748### As far as handling version numbers on operating systems is
749### concerned, make sure things will fail in a fixable way. If
750### /etc/MACHINES doesn't say anything about version numbers, be
751### prepared to handle anything reasonably. If version numbers
752### matter, be sure /etc/MACHINES says something about it.
753###
754### Eric Raymond says we should accept strings like "sysvr4" to mean
755### "System V Release 4"; he writes, "The old convention encouraged
756### confusion between `system' and `release' levels'."
757
758machine='' opsys='' unported=no
759case "${canonical}" in
760
761 ## NetBSD ports
762 *-*-netbsd* )
763 opsys=netbsd
764 case "${canonical}" in
765 alpha*-*-netbsd*) machine=alpha ;;
766 i[3456]86-*-netbsd*) machine=intel386 ;;
767 m68k-*-netbsd*)
768 # This is somewhat bogus.
769 machine=hp9000s300 ;;
770 powerpc-apple-netbsd*) machine=macppc ;;
771 mips-*-netbsd*) machine=pmax ;;
772 ns32k-*-netbsd*) machine=ns32000 ;;
773 sparc-*-netbsd*) machine=sparc ;;
774 vax-*-netbsd*) machine=vax ;;
775 esac
776 ;;
777
778 ## OpenBSD ports
779 *-*-openbsd* )
780 opsys=openbsd
781 case "${canonical}" in
782 alpha*-*-openbsd*) machine=alpha ;;
783 i386-*-openbsd*) machine=intel386 ;;
784 m68k-*-openbsd*) machine=hp9000s300 ;;
785 mipsel-*-openbsd*) machine=pmax ;;
786 ns32k-*-openbsd*) machine=ns32000 ;;
787 sparc-*-openbsd*) machine=sparc ;;
788 vax-*-openbsd*) machine=vax ;;
789 esac
790 ;;
791
792 ## Acorn RISCiX:
793 arm-acorn-riscix1.1* )
794 machine=acorn opsys=riscix1-1
795 ;;
796 arm-acorn-riscix1.2* | arm-acorn-riscix )
797 ## This name is riscix12 instead of riscix1.2
798 ## to avoid a file name conflict on MSDOS.
799 machine=acorn opsys=riscix12
800 ;;
801
802 ## BSDI ports
803 *-*-bsdi* )
804 opsys=bsdi
805 case "${canonical}" in
806 i[345]86-*-bsdi*) machine=intel386 ;;
807 sparc-*-bsdi*) machine=sparc ;;
808 powerpc-*-bsdi*) machine=powerpc ;;
809 esac
810 case "${canonical}" in
811 *-*-bsd386* | *-*-bsdi1* ) opsys=bsd386 ;;
812 *-*-bsdi2.0* ) opsys=bsdos2 ;;
813 *-*-bsdi2* ) opsys=bsdos2-1 ;;
814 *-*-bsdi3* ) opsys=bsdos3 ;;
815 *-*-bsdi4* ) opsys=bsdos4 ;;
816 esac
817 ;;
818
819 ## Alliant machines
820 ## Strictly speaking, we need the version of the alliant operating
821 ## system to choose the right machine file, but currently the
822 ## configuration name doesn't tell us enough to choose the right
823 ## one; we need to give alliants their own operating system name to
824 ## do this right. When someone cares, they can help us.
825 fx80-alliant-* )
826 machine=alliant4 opsys=bsd4-2
827 ;;
828 i860-alliant-* )
829 machine=alliant-2800 opsys=bsd4-3
830 ;;
831
832 ## Alpha (DEC) machines.
833 alpha*-dec-osf* )
834 machine=alpha opsys=osf1
835 # This is needed to find X11R6.1 libraries for certain tests.
836 NON_GCC_LINK_TEST_OPTIONS=-Wl,-rpath,/usr/X11R6/lib
837 GCC_LINK_TEST_OPTIONS=-Wl,-rpath,/usr/X11R6/lib
838 ;;
839
840 alpha*-*-linux-gnu* )
841 machine=alpha opsys=gnu-linux
842 ;;
843
844 ## Altos 3068
845 m68*-altos-sysv* )
846 machine=altos opsys=usg5-2
847 ;;
848
849 ## Amdahl UTS
850 580-amdahl-sysv* )
851 machine=amdahl opsys=usg5-2-2
852 ;;
853
854 ## Apollo, Domain/OS
855 m68*-apollo-* )
856 machine=apollo opsys=bsd4-3
857 ;;
858
859 ## AT&T 3b2, 3b5, 3b15, 3b20
860 we32k-att-sysv* )
861 machine=att3b opsys=usg5-2-2
862 ;;
863
864 ## AT&T 3b1 - The Mighty Unix PC!
865 m68*-att-sysv* )
866 machine=7300 opsys=usg5-2-2
867 ;;
868
869 ## Bull dpx20
870 rs6000-bull-bosx* )
871 machine=ibmrs6000 opsys=aix3-2
872 ;;
873
874 ## Bull dpx2
875 m68*-bull-sysv3* )
876 machine=dpx2 opsys=usg5-3
877 ;;
878
879 ## Bull sps7
880 m68*-bull-sysv2* )
881 machine=sps7 opsys=usg5-2
882 ;;
883
884 ## CCI 5/32, 6/32 -- see "Tahoe".
885
886 ## Celerity
887 ## I don't know what configuration name to use for this; config.sub
888 ## doesn't seem to know anything about it. Hey, Celerity users, get
889 ## in touch with us!
890 celerity-celerity-bsd* )
891 machine=celerity opsys=bsd4-2
892 ;;
893
894 ## Clipper
895 ## What operating systems does this chip run that Emacs has been
896 ## tested on?
897 clipper-* )
898 machine=clipper
899 ## We'll use the catch-all code at the bottom to guess the
900 ## operating system.
901 ;;
902
903 ## Convex
904 *-convex-bsd* | *-convex-convexos* )
905 machine=convex opsys=bsd4-3
906 ## Prevents spurious white space in makefiles - d.m.cooke@larc.nasa.gov
907 NON_GNU_CPP="cc -E -P"
908 ;;
909
910 ## Cubix QBx/386
911 i[3456]86-cubix-sysv* )
912 machine=intel386 opsys=usg5-3
913 ;;
914
915 ## Cydra 5
916 cydra*-cydrome-sysv* )
917 machine=cydra5 opsys=usg5-3
918 ;;
919
920 ## Data General AViiON Machines
921 ## DG changed naming conventions with the release of 5.4.4.10, they
922 ## dropped the initial 5.4 but left the intervening R. Because of the
923 ## R this shouldn't conflict with older versions of the OS (which I
924 ## think were named like dgux4.*). In addition, DG new AViiONs series
925 ## uses either Motorola M88k or Intel Pentium CPUs.
926 m88k-dg-dguxR4.* | m88k-dg-dgux4* )
927 machine=aviion opsys=dgux4
928 ;;
929 m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* )
930 ## This name is dgux5-4-3 instead of dgux5-4r3
931 ## to avoid a file name conflict on MSDOS.
932 machine=aviion opsys=dgux5-4-3
933 ;;
934 m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* )
935 machine=aviion opsys=dgux5-4r2
936 ;;
937 m88k-dg-dgux* )
938 machine=aviion opsys=dgux
939 ;;
940
941 ## Data General AViiON Intel (x86) Machines
942 ## Exists from 5.4.3 (current i586-dg-dguxR4.11)
943 ## Ehud Karni, 1998-may-30, ehud@unix.simonwiesel.co.il
944 i[345]86-dg-dguxR4* )
945 machine=aviion-intel opsys=dgux4
946 ;;
947
948 ## DECstations
949 mips-dec-ultrix[0-3].* | mips-dec-ultrix4.0* | mips-dec-bsd4.2* )
950 machine=pmax opsys=bsd4-2
951 ;;
952 mips-dec-ultrix4.[12]* | mips-dec-bsd* )
953 machine=pmax opsys=bsd4-3
954 ;;
955 mips-dec-ultrix* )
956 machine=pmax opsys=ultrix4-3
957 ;;
958 mips-dec-osf* )
959 machine=pmax opsys=osf1
960 ;;
961 mips-dec-mach_bsd4.3* )
962 machine=pmax opsys=mach-bsd4-3
963 ;;
964
965 ## Motorola Delta machines
966 m68k-motorola-sysv* | m68000-motorola-sysv* )
967 machine=delta opsys=usg5-3
968 if test -z "`type gnucc | grep 'not found'`"
969 then
970 if test -s /etc/167config
971 then CC="gnucc -m68040"
972 else CC="gnucc -m68881"
973 fi
974 else
975 if test -z "`type gcc | grep 'not found'`"
976 then CC=gcc
977 else CC=cc
978 fi
979 fi
980 ;;
981 m88k-motorola-sysv4* )
982 # jbotte@bnr.ca says that UNIX_System_V <hostName> 4.0 R40V4.3 m88k mc88110
983 # needs POSIX_SIGNALS and therefore needs usg5-4-2.
984 # I hope there are not other 4.0 versions for this machine
985 # which really need usg5-4 instead.
986 machine=delta88k opsys=usg5-4-2
987 ;;
988 m88k-motorola-sysv* | m88k-motorola-m88kbcs* )
989 machine=delta88k opsys=usg5-3
990 ;;
991
992 ## Dual machines
993 m68*-dual-sysv* )
994 machine=dual opsys=usg5-2
995 ;;
996 m68*-dual-uniplus* )
997 machine=dual opsys=unipl5-2
998 ;;
999
1000 ## Elxsi 6400
1001 elxsi-elxsi-sysv* )
1002 machine=elxsi opsys=usg5-2
1003 ;;
1004
1005 ## Encore machines
1006 ns16k-encore-bsd* )
1007 machine=ns16000 opsys=umax
1008 ;;
1009
1010 ## The GEC 93 - apparently, this port isn't really finished yet.
1011
1012 ## Gould Power Node and NP1
1013 pn-gould-bsd4.2* )
1014 machine=gould opsys=bsd4-2
1015 ;;
1016 pn-gould-bsd4.3* )
1017 machine=gould opsys=bsd4-3
1018 ;;
1019 np1-gould-bsd* )
1020 machine=gould-np1 opsys=bsd4-3
1021 ;;
1022
1023 ## Harris Night Hawk machines running CX/UX (a 5000 looks just like a 4000
1024 ## as far as Emacs is concerned).
1025 m88k-harris-cxux* )
1026 # Build needs to be different on 7.0 and later releases
1027 case "`uname -r`" in
1028 [56].[0-9] ) machine=nh4000 opsys=cxux ;;
1029 [7].[0-9] ) machine=nh4000 opsys=cxux7 ;;
1030 esac
1031 NON_GNU_CPP="/lib/cpp"
1032 ;;
1033 ## Harris ecx or gcx running CX/UX (Series 1200, Series 3000)
1034 m68k-harris-cxux* )
1035 machine=nh3000 opsys=cxux
1036 ;;
1037 ## Harris power pc NightHawk running Power UNIX (Series 6000)
1038 powerpc-harris-powerunix )
1039 machine=nh6000 opsys=powerunix
1040 NON_GNU_CPP="cc -Xo -E -P"
1041 ;;
1042 ## SR2001/SR2201 running HI-UX/MPP
1043 hppa1.1-hitachi-hiuxmpp* )
1044 machine=sr2k opsys=hiuxmpp
1045 ;;
1046 ## Honeywell XPS100
1047 xps*-honeywell-sysv* )
1048 machine=xps100 opsys=usg5-2
1049 ;;
1050
1051 ## HP 9000 series 200 or 300
1052 m68*-hp-bsd* )
1053 machine=hp9000s300 opsys=bsd4-3
1054 ;;
1055 ## HP/UX 7, 8, 9, and 10 are supported on these machines.
1056 m68*-hp-hpux* )
1057 case "`uname -r`" in
1058 ## Someone's system reports A.B8.05 for this.
1059 ## I wonder what other possibilities there are.
1060 *.B8.* ) machine=hp9000s300 opsys=hpux8 ;;
1061 *.08.* ) machine=hp9000s300 opsys=hpux8 ;;
1062 *.09.* ) machine=hp9000s300 opsys=hpux9 ;;
1063 *.1[0-9].* ) machine=hp9000s300 opsys=hpux9shr ;;
1064 *) machine=hp9000s300 opsys=hpux ;;
1065 esac
1066 ;;
1067
1068 ## HP 9000 series 700 and 800, running HP/UX
1069 hppa*-hp-hpux7* )
1070 machine=hp800 opsys=hpux
1071 ;;
1072 hppa*-hp-hpux8* )
1073 machine=hp800 opsys=hpux8
1074 ;;
1075 hppa*-hp-hpux9shr* )
1076 machine=hp800 opsys=hpux9shr
1077 ;;
1078 hppa*-hp-hpux9* )
1079 machine=hp800 opsys=hpux9
1080 ;;
1081 hppa*-hp-hpux1[0-9]* )
1082 machine=hp800 opsys=hpux10
1083 ;;
1084
1085 ## HP 9000 series 700 and 800, running HP/UX
1086 hppa*-hp-hpux* )
1087 ## Cross-compilation? Nah!
1088 case "`uname -r`" in
1089 ## Someone's system reports A.B8.05 for this.
1090 ## I wonder what other possibilities there are.
1091 *.B8.* ) machine=hp800 opsys=hpux8 ;;
1092 *.08.* ) machine=hp800 opsys=hpux8 ;;
1093 *.09.* ) machine=hp800 opsys=hpux9 ;;
1094 *) machine=hp800 opsys=hpux10 ;;
1095 esac
1096 ;;
1097 hppa*-*-nextstep* )
1098 machine=hp800 opsys=nextstep
1099 ;;
1100
1101 ## Orion machines
1102 orion-orion-bsd* )
1103 machine=orion opsys=bsd4-2
1104 ;;
1105 clipper-orion-bsd* )
1106 machine=orion105 opsys=bsd4-2
1107 ;;
1108
1109 ## IBM machines
1110 i[3456]86-ibm-aix1.1* )
1111 machine=ibmps2-aix opsys=usg5-2-2
1112 ;;
1113 i[3456]86-ibm-aix1.[23]* | i[3456]86-ibm-aix* )
1114 machine=ibmps2-aix opsys=usg5-3
1115 ;;
1116 i370-ibm-aix*)
1117 machine=ibm370aix opsys=usg5-3
1118 ;;
1119 rs6000-ibm-aix3.1* | powerpc-ibm-aix3.1* )
1120 machine=ibmrs6000 opsys=aix3-1
1121 ;;
1122 rs6000-ibm-aix3.2.5 | powerpc-ibm-aix3.2.5 )
1123 machine=ibmrs6000 opsys=aix3-2-5
1124 ;;
1125 rs6000-ibm-aix4.1* | powerpc-ibm-aix4.1* )
1126 machine=ibmrs6000 opsys=aix4-1
1127 ;;
1128 rs6000-ibm-aix4.2* | powerpc-ibm-aix4.2* )
1129 machine=ibmrs6000 opsys=aix4-2
1130 ;;
1131 rs6000-ibm-aix4.0* | powerpc-ibm-aix4.0* )
1132 machine=ibmrs6000 opsys=aix4
1133 ;;
1134 rs6000-ibm-aix4* | powerpc-ibm-aix4* )
1135 machine=ibmrs6000 opsys=aix4-1
1136 ;;
1137 rs6000-ibm-aix* | powerpc-ibm-aix* )
1138 machine=ibmrs6000 opsys=aix3-2
1139 ;;
1140 romp-ibm-bsd4.3* )
1141 machine=ibmrt opsys=bsd4-3
1142 ;;
1143 romp-ibm-bsd4.2* )
1144 machine=ibmrt opsys=bsd4-2
1145 ;;
1146 romp-ibm-aos4.3* )
1147 machine=ibmrt opsys=bsd4-3
1148 ;;
1149 romp-ibm-aos4.2* )
1150 machine=ibmrt opsys=bsd4-2
1151 ;;
1152 romp-ibm-aos* )
1153 machine=ibmrt opsys=bsd4-3
1154 ;;
1155 romp-ibm-bsd* )
1156 machine=ibmrt opsys=bsd4-3
1157 ;;
1158 romp-ibm-aix* )
1159 machine=ibmrt-aix opsys=usg5-2-2
1160 ;;
1161
1162 ## Integrated Solutions `Optimum V'
1163 m68*-isi-bsd4.2* )
1164 machine=isi-ov opsys=bsd4-2
1165 ;;
1166 m68*-isi-bsd4.3* )
1167 machine=isi-ov opsys=bsd4-3
1168 ;;
1169
1170 ## Intel 386 machines where we do care about the manufacturer
1171 i[3456]86-intsys-sysv* )
1172 machine=is386 opsys=usg5-2-2
1173 ;;
1174
1175 ## Prime EXL
1176 i[3456]86-prime-sysv* )
1177 machine=i386 opsys=usg5-3
1178 ;;
1179
1180 ## Sequent Symmetry running Dynix
1181 i[3456]86-sequent-bsd* )
1182 machine=symmetry opsys=bsd4-3
1183 ;;
1184
1185 ## Sequent Symmetry running ptx 4, which is a modified SVR4.
1186 i[3456]86-sequent-ptx4* | i[3456]86-sequent-sysv4* )
1187 machine=sequent-ptx opsys=ptx4
1188 NON_GNU_CPP=/lib/cpp
1189 ;;
1190
1191 ## Sequent Symmetry running DYNIX/ptx
1192 ## Use the old cpp rather than the newer ANSI one.
1193 i[3456]86-sequent-ptx* )
1194 machine=sequent-ptx opsys=ptx
1195 NON_GNU_CPP="/lib/cpp"
1196 ;;
1197
1198 ## ncr machine running svr4.3.
1199 i[3456]86-ncr-sysv4.3 )
1200 machine=ncr386 opsys=usg5-4-3
1201 ;;
1202
1203 ## Unspecified sysv on an ncr machine defaults to svr4.2.
1204 ## (Plain usg5-4 doesn't turn on POSIX signals, which we need.)
1205 i[3456]86-ncr-sysv* )
1206 machine=ncr386 opsys=usg5-4-2
1207 ;;
1208
1209 ## Intel Paragon OSF/1
1210 i860-intel-osf1* )
1211 machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp
1212 ;;
1213
1214 ## Intel 860
1215 i860-*-sysv4* )
1216 machine=i860 opsys=usg5-4
1217 NON_GNU_CC="/bin/cc" # Ie, not the one in /usr/ucb/cc.
1218 NON_GNU_CPP="/usr/ccs/lib/cpp" # cc -E tokenizes macro expansion.
1219 ;;
1220
1221 ## Masscomp machines
1222 m68*-masscomp-rtu* )
1223 machine=masscomp opsys=rtu
1224 ;;
1225
1226 ## Megatest machines
1227 m68*-megatest-bsd* )
1228 machine=mega68 opsys=bsd4-2
1229 ;;
1230
1231 ## Workstations sold by MIPS
1232 ## This is not necessarily all workstations using the MIPS processor -
1233 ## Irises are produced by SGI, and DECstations by DEC.
1234
1235 ## etc/MACHINES lists mips.h and mips4.h as possible machine files,
1236 ## and usg5-2-2 and bsd4-3 as possible OS files. The only guidance
1237 ## it gives for choosing between the alternatives seems to be "Use
1238 ## -machine=mips4 for RISCOS version 4; use -opsystem=bsd4-3 with
1239 ## the BSD world." I'll assume that these are instructions for
1240 ## handling two odd situations, and that every other situation
1241 ## should use mips.h and usg5-2-2, they being listed first.
1242 mips-mips-usg* )
1243 machine=mips4
1244 ## Fall through to the general code at the bottom to decide on the OS.
1245 ;;
1246 mips-mips-riscos4* )
1247 machine=mips4 opsys=bsd4-3
1248 NON_GNU_CC="cc -systype bsd43"
1249 NON_GNU_CPP="cc -systype bsd43 -E"
1250 ;;
1251 mips-mips-riscos5* )
1252 machine=mips4 opsys=riscos5
1253 NON_GNU_CC="cc -systype bsd43"
1254 NON_GNU_CPP="cc -systype bsd43 -E"
1255 ;;
1256 mips-mips-bsd* )
1257 machine=mips opsys=bsd4-3
1258 ;;
1259 mips-mips-* )
1260 machine=mips opsys=usg5-2-2
1261 ;;
1262
1263 ## NeXT
1264 m68*-next-* | m68k-*-nextstep* )
1265 machine=m68k opsys=nextstep
1266 ;;
1267
1268 ## The complete machine from National Semiconductor
1269 ns32k-ns-genix* )
1270 machine=ns32000 opsys=usg5-2
1271 ;;
1272
1273 ## NCR machines
1274 m68*-ncr-sysv2* | m68*-ncr-sysvr2* )
1275 machine=tower32 opsys=usg5-2-2
1276 ;;
1277 m68*-ncr-sysv3* | m68*-ncr-sysvr3* )
1278 machine=tower32v3 opsys=usg5-3
1279 ;;
1280
1281 ## NEC EWS4800
1282 mips-nec-sysv4*)
1283 machine=ews4800 opsys=ux4800
1284 ;;
1285
1286 ## Nixdorf Targon 31
1287 m68*-nixdorf-sysv* )
1288 machine=targon31 opsys=usg5-2-2
1289 ;;
1290
1291 ## Nu (TI or LMI)
1292 m68*-nu-sysv* )
1293 machine=nu opsys=usg5-2
1294 ;;
1295
1296 ## Plexus
1297 m68*-plexus-sysv* )
1298 machine=plexus opsys=usg5-2
1299 ;;
1300
1301 ## PowerPC reference platform
1302 powerpcle-*-solaris2* )
1303 machine=prep
1304 opsys=sol2-5
1305 ;;
1306
1307 ## Pyramid machines
1308 ## I don't really have any idea what sort of processor the Pyramid has,
1309 ## so I'm assuming it is its own architecture.
1310 pyramid-pyramid-bsd* )
1311 machine=pyramid opsys=bsd4-2
1312 ;;
1313
1314 ## Sequent Balance
1315 ns32k-sequent-bsd4.2* )
1316 machine=sequent opsys=bsd4-2
1317 ;;
1318 ns32k-sequent-bsd4.3* )
1319 machine=sequent opsys=bsd4-3
1320 ;;
1321
1322 ## Siemens Nixdorf
1323 mips-siemens-sysv* | mips-sni-sysv*)
1324 machine=mips-siemens opsys=usg5-4
1325 NON_GNU_CC=/usr/ccs/bin/cc
1326 NON_GNU_CPP=/usr/ccs/lib/cpp
1327 ;;
1328
1329 ## Silicon Graphics machines
1330 ## Iris 2500 and Iris 2500 Turbo (aka the Iris 3030)
1331 m68*-sgi-iris3.5* )
1332 machine=irist opsys=iris3-5
1333 ;;
1334 m68*-sgi-iris3.6* | m68*-sgi-iris*)
1335 machine=irist opsys=iris3-6
1336 ;;
1337 ## Iris 4D
1338 mips-sgi-irix3* )
1339 machine=iris4d opsys=irix3-3
1340 ;;
1341 mips-sgi-irix4* )
1342 machine=iris4d opsys=irix4-0
1343 ;;
1344 mips-sgi-irix6.5 )
1345 machine=iris4d opsys=irix6-5
1346 NON_GNU_CPP=/lib/cpp
1347 NON_GCC_TEST_OPTIONS="-n32 -G0"
1348 ;;
1349 mips-sgi-irix6* )
1350 machine=iris4d opsys=irix6-0
1351 NON_GNU_CPP=/lib/cpp
1352 NON_GCC_TEST_OPTIONS=-32
1353 ;;
1354 mips-sgi-irix5.[01]* )
1355 machine=iris4d opsys=irix5-0
1356 ;;
1357 mips-sgi-irix5* | mips-sgi-irix* )
1358 machine=iris4d opsys=irix5-2
1359 ;;
1360
1361 ## SONY machines
1362 m68*-sony-bsd4.2* )
1363 machine=news opsys=bsd4-2
1364 ;;
1365 m68*-sony-bsd4.3* )
1366 machine=news opsys=bsd4-3
1367 ;;
1368 m68*-sony-newsos3* | m68*-sony-news3*)
1369 machine=news opsys=bsd4-3
1370 ;;
1371 mips-sony-bsd* | mips-sony-newsos4* | mips-sony-news4*)
1372 machine=news-risc opsys=bsd4-3
1373 ;;
1374 mips-sony-newsos6* )
1375 machine=news-r6 opsys=newsos6
1376 ;;
1377 mips-sony-news* )
1378 machine=news-risc opsys=newsos5
1379 ;;
1380
1381 ## Stride
1382 m68*-stride-sysv* )
1383 machine=stride opsys=usg5-2
1384 ;;
1385
1386 ## Suns
1387 sparc-*-linux-gnu* | sparc64-*-linux-gnu* )
1388 machine=sparc opsys=gnu-linux
1389 ;;
1390
1391 *-sun-sunos* | *-sun-bsd* | *-sun-solaris* \
1392 | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* | powerpc*-*-solaris2* \
1393 | rs6000-*-solaris2*)
1394 case "${canonical}" in
1395 m68*-sunos1* ) machine=sun1 ;;
1396 m68*-sunos2* ) machine=sun2 ;;
1397 m68* ) machine=sun3 ;;
1398 i[3456]86-sun-sunos[34]* ) machine=sun386 ;;
1399 i[3456]86-*-* ) machine=intel386 ;;
1400 powerpcle* ) machine=powerpcle ;;
1401 powerpc* | rs6000* ) machine=ibmrs6000 ;;
1402 sparc* ) machine=sparc ;;
1403 * ) unported=yes ;;
1404 esac
1405 case "${canonical}" in
1406 ## The Sun386 didn't get past 4.0.
1407 i[3456]86-*-sunos4 ) opsys=sunos4-0 ;;
1408 *-sunos4.0* ) opsys=sunos4-0 ;;
1409 *-sunos4.1.[3-9]*noshare )
1410 ## This name is sunos413 instead of sunos4-1-3
1411 ## to avoid a file name conflict on MSDOS.
1412 opsys=sunos413
1413 NON_GNU_CPP=/usr/lib/cpp
1414 NON_GCC_TEST_OPTIONS=-Bstatic
1415 GCC_TEST_OPTIONS=-static
1416 ;;
1417 *-sunos4.1.[3-9]* | *-sunos4shr*)
1418 opsys=sunos4shr
1419 NON_GNU_CPP=/usr/lib/cpp
1420 ;;
1421 *-sunos4* | *-sunos )
1422 opsys=sunos4-1
1423 NON_GCC_TEST_OPTIONS=-Bstatic
1424 GCC_TEST_OPTIONS=-static
1425 ;;
1426 *-sunos5.3* | *-solaris2.3* )
1427 opsys=sol2-3
1428 NON_GNU_CPP=/usr/ccs/lib/cpp
1429 ;;
1430 *-sunos5.4* | *-solaris2.4* )
1431 opsys=sol2-4
1432 NON_GNU_CPP=/usr/ccs/lib/cpp
1433 RANLIB="ar -ts"
1434 ;;
1435 *-sunos5.5* | *-solaris2.5* )
1436 opsys=sol2-5
1437 NON_GNU_CPP=/usr/ccs/lib/cpp
1438 RANLIB="ar -ts"
1439 ;;
1440 *-sunos5* | *-solaris* )
1441 opsys=sol2-5
1442 NON_GNU_CPP=/usr/ccs/lib/cpp
1443 ;;
1444 * ) opsys=bsd4-2 ;;
1445 esac
1446 ## Watch out for a compiler that we know will not work.
1447 case "${canonical}" in
1448 *-solaris* | *-sunos5* )
1449 if [ "x$CC" = x/usr/ucb/cc ]; then
1450 ## /usr/ucb/cc doesn't work;
1451 ## we should find some other compiler that does work.
1452 unset CC
1453 fi
1454 ;;
1455 *) ;;
1456 esac
1457 ;;
1458 sparc-*-nextstep* )
1459 machine=sparc opsys=nextstep
1460 ;;
1461
1462 ## Tadpole 68k
1463 m68*-tadpole-sysv* )
1464 machine=tad68k opsys=usg5-3
1465 ;;
1466
1467 ## Tahoe machines
1468 tahoe-tahoe-bsd4.2* )
1469 machine=tahoe opsys=bsd4-2
1470 ;;
1471 tahoe-tahoe-bsd4.3* )
1472 machine=tahoe opsys=bsd4-3
1473 ;;
1474
1475 ## Tandem Integrity S2
1476 mips-tandem-sysv* )
1477 machine=tandem-s2 opsys=usg5-3
1478 ;;
1479
1480 ## Tektronix XD88
1481 m88k-tektronix-sysv3* )
1482 machine=tekxd88 opsys=usg5-3
1483 ;;
1484
1485 ## Tektronix 16000 box (6130?)
1486 ns16k-tektronix-bsd* )
1487 machine=ns16000 opsys=bsd4-2
1488 ;;
1489 ## Tektronix 4300
1490 ## src/m/tek4300.h hints that this is a m68k machine.
1491 m68*-tektronix-bsd* )
1492 machine=tek4300 opsys=bsd4-3
1493 ;;
1494
1495 ## Titan P2 or P3
1496 ## We seem to have lost the machine-description file titan.h!
1497 titan-titan-sysv* )
1498 machine=titan opsys=usg5-3
1499 ;;
1500
1501 ## Ustation E30 (SS5E)
1502 m68*-unisys-uniplus* )
1503 machine=ustation opsystem=unipl5-2
1504 ;;
1505
1506 ## Vaxen.
1507 vax-dec-* )
1508 machine=vax
1509 case "${canonical}" in
1510 *-bsd4.1* ) opsys=bsd4-1 ;;
1511 *-bsd4.2* | *-ultrix[0-3].* | *-ultrix4.0* ) opsys=bsd4-2 ;;
1512 *-bsd4.3* | *-ultrix* ) opsys=bsd4-3 ;;
1513 *-sysv[01]* | *-sysvr[01]* ) opsys=usg5-0 ;;
1514 *-sysv2* | *-sysvr2* ) opsys=usg5-2 ;;
1515 *-vms* ) opsys=vms ;;
1516 * ) unported=yes
1517 esac
1518 ;;
1519
1520 ## Whitechapel MG1
1521 ns16k-whitechapel-* )
1522 machine=mg1
1523 ## We don't know what sort of OS runs on these; we'll let the
1524 ## operating system guessing code below try.
1525 ;;
1526
1527 ## Wicat
1528 m68*-wicat-sysv* )
1529 machine=wicat opsys=usg5-2
1530 ;;
1531
1532 ## Intel 386 machines where we don't care about the manufacturer
1533 i[3456]86-*-* )
1534 machine=intel386
1535 case "${canonical}" in
1536 *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
1537 *-isc2.2* ) opsys=isc2-2 ;;
1538 *-isc4.0* ) opsys=isc4-0 ;;
1539 *-isc4.* ) opsys=isc4-1
1540 GCC_TEST_OPTIONS=-posix
1541 NON_GCC_TEST_OPTIONS=-Xp
1542 ;;
1543 *-isc* ) opsys=isc3-0 ;;
1544 *-esix5* ) opsys=esix5r4; NON_GNU_CPP=/usr/lib/cpp ;;
1545 *-esix* ) opsys=esix ;;
1546 *-xenix* ) opsys=xenix ;;
1547 *-linux-gnu* ) opsys=gnu-linux ;;
1548 *-sco3.2v4* ) opsys=sco4 ; NON_GNU_CPP=/lib/cpp ;;
1549 *-sco3.2v5* ) opsys=sco5
1550 NON_GNU_CPP=/lib/cpp
1551 # Prevent -belf from being passed to $CPP.
1552 # /lib/cpp does not accept it.
1553 OVERRIDE_CPPFLAGS=" "
1554 ;;
1555 *-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
1556 *-386bsd* ) opsys=386bsd ;;
1557 *-freebsd* ) opsys=freebsd ;;
1558 *-nextstep* ) opsys=nextstep ;;
1559 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
1560 esac
1561 ;;
1562
1563 ## m68k Linux-based GNU system
1564 m68k-*-linux-gnu* )
1565 machine=m68k opsys=gnu-linux
1566 ;;
1567
1568 ## Mips Linux-based GNU system
1569 mips-*-linux-gnu* )
1570 machine=mips opsys=gnu-linux
1571 ;;
1572
1573 ## UXP/DS
1574 sparc-fujitsu-sysv4* )
1575 machine=sparc opsys=uxpds
1576 NON_GNU_CPP=/usr/ccs/lib/cpp
1577 RANLIB="ar -ts"
1578 ;;
1579
1580 ## UXP/V
1581 f301-fujitsu-uxpv4.1)
1582 machine=f301 opsys=uxpv
1583 ;;
1584
1585 * )
1586 unported=yes
1587 ;;
1588esac
1589
1590### If the code above didn't choose an operating system, just choose
1591### an operating system based on the configuration name. You really
1592### only want to use this when you have no idea what the right
1593### operating system is; if you know what operating systems a machine
1594### runs, it's cleaner to make it explicit in the case statement
1595### above.
1596if test x"${opsys}" = x; then
1597 case "${canonical}" in
1598 *-gnu* ) opsys=gnu ;;
1599 *-bsd4.[01] ) opsys=bsd4-1 ;;
1600 *-bsd4.2 ) opsys=bsd4-2 ;;
1601 *-bsd4.3 ) opsys=bsd4-3 ;;
1602 *-sysv0 | *-sysvr0 ) opsys=usg5-0 ;;
1603 *-sysv2 | *-sysvr2 ) opsys=usg5-2 ;;
1604 *-sysv2.2 | *-sysvr2.2 ) opsys=usg5-2-2 ;;
1605 *-sysv3* | *-sysvr3* ) opsys=usg5-3 ;;
1606 *-sysv4.2uw* ) opsys=unixware ;;
1607 *-sysv4.1* | *-sysvr4.1* )
1608 NON_GNU_CPP=/usr/lib/cpp
1609 opsys=usg5-4 ;;
1610 *-sysv4.[2-9]* | *-sysvr4.[2-9]* )
1611 if [ x$NON_GNU_CPP = x ]; then
1612 if [ -f /usr/ccs/lib/cpp ]; then
1613 NON_GNU_CPP=/usr/ccs/lib/cpp
1614 else
1615 NON_GNU_CPP=/lib/cpp
1616 fi
1617 fi
1618 opsys=usg5-4-2 ;;
1619 *-sysv4* | *-sysvr4* ) opsys=usg5-4 ;;
1620 * )
1621 unported=yes
1622 ;;
1623 esac
1624fi
1625
1626if test "x$RANLIB" = x; then
1627 RANLIB=ranlib
1628fi
1629
1630
1631if test $unported = yes; then
1632 { echo "configure: error: Emacs hasn't been ported to \`${canonical}' systems.
1633Check \`etc/MACHINES' for recognized configuration names." 1>&2; exit 1; }
1634fi
1635
1636machfile="m/${machine}.h"
1637opsysfile="s/${opsys}.h"
1638
1639
1640#### Choose a compiler.
1641test -n "$CC" && cc_specified=yes
1642
1643# Save the value of CFLAGS that the user specified.
1644SPECIFIED_CFLAGS="$CFLAGS"
1645
1646case ${with_gcc} in
1647 "yes" ) CC="gcc" GCC=yes ;;
1648 "no" ) : ${CC=cc} ;;
1649 * ) # Extract the first word of "gcc", so it can be a program name with args.
1650set dummy gcc; ac_word=$2
1651echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
243cf185 1652echo "configure:1653: checking for $ac_word" >&5
ba4481b5
DL
1653if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1654 echo $ac_n "(cached) $ac_c" 1>&6
1655else
1656 if test -n "$CC"; then
1657 ac_cv_prog_CC="$CC" # Let the user override the test.
1658else
1659 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1660 ac_dummy="$PATH"
1661 for ac_dir in $ac_dummy; do
1662 test -z "$ac_dir" && ac_dir=.
1663 if test -f $ac_dir/$ac_word; then
1664 ac_cv_prog_CC="gcc"
1665 break
1666 fi
1667 done
1668 IFS="$ac_save_ifs"
1669fi
1670fi
1671CC="$ac_cv_prog_CC"
1672if test -n "$CC"; then
1673 echo "$ac_t""$CC" 1>&6
1674else
1675 echo "$ac_t""no" 1>&6
1676fi
1677
1678if test -z "$CC"; then
1679 # Extract the first word of "cc", so it can be a program name with args.
1680set dummy cc; ac_word=$2
1681echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
243cf185 1682echo "configure:1683: checking for $ac_word" >&5
ba4481b5
DL
1683if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1684 echo $ac_n "(cached) $ac_c" 1>&6
1685else
1686 if test -n "$CC"; then
1687 ac_cv_prog_CC="$CC" # Let the user override the test.
1688else
1689 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1690 ac_prog_rejected=no
1691 ac_dummy="$PATH"
1692 for ac_dir in $ac_dummy; do
1693 test -z "$ac_dir" && ac_dir=.
1694 if test -f $ac_dir/$ac_word; then
1695 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1696 ac_prog_rejected=yes
1697 continue
1698 fi
1699 ac_cv_prog_CC="cc"
1700 break
1701 fi
1702 done
1703 IFS="$ac_save_ifs"
1704if test $ac_prog_rejected = yes; then
1705 # We found a bogon in the path, so make sure we never use it.
1706 set dummy $ac_cv_prog_CC
1707 shift
1708 if test $# -gt 0; then
1709 # We chose a different compiler from the bogus one.
1710 # However, it has the same basename, so the bogon will be chosen
1711 # first if we set CC to just the basename; use the full file name.
1712 shift
1713 set dummy "$ac_dir/$ac_word" "$@"
1714 shift
1715 ac_cv_prog_CC="$@"
1716 fi
1717fi
1718fi
1719fi
1720CC="$ac_cv_prog_CC"
1721if test -n "$CC"; then
1722 echo "$ac_t""$CC" 1>&6
1723else
1724 echo "$ac_t""no" 1>&6
1725fi
1726
1727 if test -z "$CC"; then
1728 case "`uname -s`" in
1729 *win32* | *WIN32*)
1730 # Extract the first word of "cl", so it can be a program name with args.
1731set dummy cl; ac_word=$2
1732echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
243cf185 1733echo "configure:1734: checking for $ac_word" >&5
ba4481b5
DL
1734if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1735 echo $ac_n "(cached) $ac_c" 1>&6
1736else
1737 if test -n "$CC"; then
1738 ac_cv_prog_CC="$CC" # Let the user override the test.
1739else
1740 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1741 ac_dummy="$PATH"
1742 for ac_dir in $ac_dummy; do
1743 test -z "$ac_dir" && ac_dir=.
1744 if test -f $ac_dir/$ac_word; then
1745 ac_cv_prog_CC="cl"
1746 break
1747 fi
1748 done
1749 IFS="$ac_save_ifs"
1750fi
1751fi
1752CC="$ac_cv_prog_CC"
1753if test -n "$CC"; then
1754 echo "$ac_t""$CC" 1>&6
1755else
1756 echo "$ac_t""no" 1>&6
1757fi
1758 ;;
1759 esac
1760 fi
1761 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1762fi
1763
1764echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
243cf185 1765echo "configure:1766: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ba4481b5
DL
1766
1767ac_ext=c
1768# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1769ac_cpp='$CPP $CPPFLAGS'
1770ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1771ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1772cross_compiling=$ac_cv_prog_cc_cross
1773
1774cat > conftest.$ac_ext << EOF
1775
243cf185 1776#line 1777 "configure"
ba4481b5
DL
1777#include "confdefs.h"
1778
1779main(){return(0);}
1780EOF
243cf185 1781if { (eval echo configure:1782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ba4481b5
DL
1782 ac_cv_prog_cc_works=yes
1783 # If we can't run a trivial program, we are probably using a cross compiler.
1784 if (./conftest; exit) 2>/dev/null; then
1785 ac_cv_prog_cc_cross=no
1786 else
1787 ac_cv_prog_cc_cross=yes
1788 fi
1789else
1790 echo "configure: failed program was:" >&5
1791 cat conftest.$ac_ext >&5
1792 ac_cv_prog_cc_works=no
1793fi
1794rm -fr conftest*
1795ac_ext=c
1796# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1797ac_cpp='$CPP $CPPFLAGS'
1798ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1799ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1800cross_compiling=$ac_cv_prog_cc_cross
1801
1802echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1803if test $ac_cv_prog_cc_works = no; then
1804 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1805fi
1806echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
243cf185 1807echo "configure:1808: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
ba4481b5
DL
1808echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1809cross_compiling=$ac_cv_prog_cc_cross
1810
1811echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
243cf185 1812echo "configure:1813: checking whether we are using GNU C" >&5
ba4481b5
DL
1813if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1814 echo $ac_n "(cached) $ac_c" 1>&6
1815else
1816 cat > conftest.c <<EOF
1817#ifdef __GNUC__
1818 yes;
1819#endif
1820EOF
243cf185 1821if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1822: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ba4481b5
DL
1822 ac_cv_prog_gcc=yes
1823else
1824 ac_cv_prog_gcc=no
1825fi
1826fi
1827
1828echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1829
1830if test $ac_cv_prog_gcc = yes; then
1831 GCC=yes
1832else
1833 GCC=
1834fi
1835
1836ac_test_CFLAGS="${CFLAGS+set}"
1837ac_save_CFLAGS="$CFLAGS"
1838CFLAGS=
1839echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
243cf185 1840echo "configure:1841: checking whether ${CC-cc} accepts -g" >&5
ba4481b5
DL
1841if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1842 echo $ac_n "(cached) $ac_c" 1>&6
1843else
1844 echo 'void f(){}' > conftest.c
1845if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1846 ac_cv_prog_cc_g=yes
1847else
1848 ac_cv_prog_cc_g=no
1849fi
1850rm -f conftest*
1851
1852fi
1853
1854echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1855if test "$ac_test_CFLAGS" = set; then
1856 CFLAGS="$ac_save_CFLAGS"
1857elif test $ac_cv_prog_cc_g = yes; then
1858 if test "$GCC" = yes; then
1859 CFLAGS="-g -O2"
1860 else
1861 CFLAGS="-g"
1862 fi
1863else
1864 if test "$GCC" = yes; then
1865 CFLAGS="-O2"
1866 else
1867 CFLAGS=
1868 fi
1869fi
1870
1871esac
1872
1873# On Suns, sometimes $CPP names a directory.
1874if test -n "$CPP" && test -d "$CPP"; then
1875 CPP=
1876fi
1877
1878#### Some systems specify a CPP to use unless we are using GCC.
1879#### Now that we know whether we are using GCC, we can decide whether
1880#### to use that one.
1881if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x
1882then
1883 CPP="$NON_GNU_CPP"
1884fi
1885
1886#### Some systems specify a CC to use unless we are using GCC.
1887#### Now that we know whether we are using GCC, we can decide whether
1888#### to use that one.
1889if test "x$NON_GNU_CC" != x && test x$GCC != xyes &&
1890 test x$cc_specified != xyes
1891then
1892 CC="$NON_GNU_CC"
1893fi
1894
1895if test x$GCC = xyes && test "x$GCC_TEST_OPTIONS" != x
1896then
1897 CC="$CC $GCC_TEST_OPTIONS"
1898fi
1899
1900if test x$GCC = x && test "x$NON_GCC_TEST_OPTIONS" != x
1901then
1902 CC="$CC $NON_GCC_TEST_OPTIONS"
1903fi
1904
1905if test x$GCC = xyes && test "x$GCC_LINK_TEST_OPTIONS" != x
1906then
1907 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
1908fi
1909
1910if test x$GCC = x && test "x$NON_GCC_LINK_TEST_OPTIONS" != x
1911then
1912 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
1913fi
1914
1915#### Some other nice autoconf tests. If you add a test here which
1916#### should make an entry in src/config.h, don't forget to add an
1917#### #undef clause to src/config.h.in for autoconf to modify.
1918
1919echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
243cf185 1920echo "configure:1921: checking whether ln -s works" >&5
ba4481b5
DL
1921if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1922 echo $ac_n "(cached) $ac_c" 1>&6
1923else
1924 rm -f conftestdata
1925if ln -s X conftestdata 2>/dev/null
1926then
1927 rm -f conftestdata
1928 ac_cv_prog_LN_S="ln -s"
1929else
1930 ac_cv_prog_LN_S=ln
1931fi
1932fi
1933LN_S="$ac_cv_prog_LN_S"
1934if test "$ac_cv_prog_LN_S" = "ln -s"; then
1935 echo "$ac_t""yes" 1>&6
1936else
1937 echo "$ac_t""no" 1>&6
1938fi
1939
1940echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
243cf185 1941echo "configure:1942: checking how to run the C preprocessor" >&5
ba4481b5
DL
1942# On Suns, sometimes $CPP names a directory.
1943if test -n "$CPP" && test -d "$CPP"; then
1944 CPP=
1945fi
1946if test -z "$CPP"; then
1947if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1948 echo $ac_n "(cached) $ac_c" 1>&6
1949else
1950 # This must be in double quotes, not single quotes, because CPP may get
1951 # substituted into the Makefile and "${CC-cc}" will confuse make.
1952 CPP="${CC-cc} -E"
1953 # On the NeXT, cc -E runs the code through the compiler's parser,
1954 # not just through cpp.
1955 cat > conftest.$ac_ext <<EOF
243cf185 1956#line 1957 "configure"
ba4481b5
DL
1957#include "confdefs.h"
1958#include <assert.h>
1959Syntax Error
1960EOF
1961ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
243cf185 1962{ (eval echo configure:1963: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ba4481b5
DL
1963ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1964if test -z "$ac_err"; then
1965 :
1966else
1967 echo "$ac_err" >&5
1968 echo "configure: failed program was:" >&5
1969 cat conftest.$ac_ext >&5
1970 rm -rf conftest*
1971 CPP="${CC-cc} -E -traditional-cpp"
1972 cat > conftest.$ac_ext <<EOF
243cf185 1973#line 1974 "configure"
ba4481b5
DL
1974#include "confdefs.h"
1975#include <assert.h>
1976Syntax Error
1977EOF
1978ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
243cf185 1979{ (eval echo configure:1980: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ba4481b5
DL
1980ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1981if test -z "$ac_err"; then
1982 :
1983else
1984 echo "$ac_err" >&5
1985 echo "configure: failed program was:" >&5
1986 cat conftest.$ac_ext >&5
1987 rm -rf conftest*
1988 CPP="${CC-cc} -nologo -E"
1989 cat > conftest.$ac_ext <<EOF
243cf185 1990#line 1991 "configure"
ba4481b5
DL
1991#include "confdefs.h"
1992#include <assert.h>
1993Syntax Error
1994EOF
1995ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
243cf185 1996{ (eval echo configure:1997: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ba4481b5
DL
1997ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1998if test -z "$ac_err"; then
1999 :
2000else
2001 echo "$ac_err" >&5
2002 echo "configure: failed program was:" >&5
2003 cat conftest.$ac_ext >&5
2004 rm -rf conftest*
2005 CPP=/lib/cpp
2006fi
2007rm -f conftest*
2008fi
2009rm -f conftest*
2010fi
2011rm -f conftest*
2012 ac_cv_prog_CPP="$CPP"
2013fi
2014 CPP="$ac_cv_prog_CPP"
2015else
2016 ac_cv_prog_CPP="$CPP"
2017fi
2018echo "$ac_t""$CPP" 1>&6
2019
2020# Find a good install program. We prefer a C program (faster),
2021# so one script is as good as another. But avoid the broken or
2022# incompatible versions:
2023# SysV /etc/install, /usr/sbin/install
2024# SunOS /usr/etc/install
2025# IRIX /sbin/install
2026# AIX /bin/install
2027# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2028# AFS /usr/afsws/bin/install, which mishandles nonexistent args
2029# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2030# ./install, which can be erroneously created by make from ./install.sh.
2031echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
243cf185 2032echo "configure:2033: checking for a BSD compatible install" >&5
ba4481b5
DL
2033if test -z "$INSTALL"; then
2034if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
2035 echo $ac_n "(cached) $ac_c" 1>&6
2036else
2037 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
2038 for ac_dir in $PATH; do
2039 # Account for people who put trailing slashes in PATH elements.
2040 case "$ac_dir/" in
2041 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2042 *)
2043 # OSF1 and SCO ODT 3.0 have their own names for install.
2044 # Don't use installbsd from OSF since it installs stuff as root
2045 # by default.
2046 for ac_prog in ginstall scoinst install; do
2047 if test -f $ac_dir/$ac_prog; then
2048 if test $ac_prog = install &&
2049 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2050 # AIX install. It has an incompatible calling convention.
2051 :
2052 else
2053 ac_cv_path_install="$ac_dir/$ac_prog -c"
2054 break 2
2055 fi
2056 fi
2057 done
2058 ;;
2059 esac
2060 done
2061 IFS="$ac_save_IFS"
2062
2063fi
2064 if test "${ac_cv_path_install+set}" = set; then
2065 INSTALL="$ac_cv_path_install"
2066 else
2067 # As a last resort, use the slow shell script. We don't cache a
2068 # path for INSTALL within a source directory, because that will
2069 # break other packages using the cache if that directory is
2070 # removed, or if the path is relative.
2071 INSTALL="$ac_install_sh"
2072 fi
2073fi
2074echo "$ac_t""$INSTALL" 1>&6
2075
2076# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2077# It thinks the first close brace ends the variable substitution.
2078test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2079
2080test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
2081
2082test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2083
2084for ac_prog in 'bison -y' byacc
2085do
2086# Extract the first word of "$ac_prog", so it can be a program name with args.
2087set dummy $ac_prog; ac_word=$2
2088echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
243cf185 2089echo "configure:2090: checking for $ac_word" >&5
ba4481b5
DL
2090if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
2091 echo $ac_n "(cached) $ac_c" 1>&6
2092else
2093 if test -n "$YACC"; then
2094 ac_cv_prog_YACC="$YACC" # Let the user override the test.
2095else
2096 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2097 ac_dummy="$PATH"
2098 for ac_dir in $ac_dummy; do
2099 test -z "$ac_dir" && ac_dir=.
2100 if test -f $ac_dir/$ac_word; then
2101 ac_cv_prog_YACC="$ac_prog"
2102 break
2103 fi
2104 done
2105 IFS="$ac_save_ifs"
2106fi
2107fi
2108YACC="$ac_cv_prog_YACC"
2109if test -n "$YACC"; then
2110 echo "$ac_t""$YACC" 1>&6
2111else
2112 echo "$ac_t""no" 1>&6
2113fi
2114
2115test -n "$YACC" && break
2116done
2117test -n "$YACC" || YACC="yacc"
2118
2119
2120echo $ac_n "checking for AIX""... $ac_c" 1>&6
243cf185 2121echo "configure:2122: checking for AIX" >&5
ba4481b5 2122cat > conftest.$ac_ext <<EOF
243cf185 2123#line 2124 "configure"
ba4481b5
DL
2124#include "confdefs.h"
2125#ifdef _AIX
2126 yes
2127#endif
2128
2129EOF
2130if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2131 egrep "yes" >/dev/null 2>&1; then
2132 rm -rf conftest*
2133 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
2134#define _ALL_SOURCE 1
2135EOF
2136
2137else
2138 rm -rf conftest*
2139 echo "$ac_t""no" 1>&6
2140fi
2141rm -f conftest*
2142
2143
2144
2145# Sound support for GNU/Linux and the free BSDs.
2146for ac_hdr in machine/soundcard.h sys/soundcard.h
2147do
2148ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2149echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
243cf185 2150echo "configure:2151: checking for $ac_hdr" >&5
ba4481b5
DL
2151if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2152 echo $ac_n "(cached) $ac_c" 1>&6
2153else
2154 cat > conftest.$ac_ext <<EOF
243cf185 2155#line 2156 "configure"
ba4481b5
DL
2156#include "confdefs.h"
2157#include <$ac_hdr>
2158EOF
2159ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
243cf185 2160{ (eval echo configure:2161: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ba4481b5
DL
2161ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2162if test -z "$ac_err"; then
2163 rm -rf conftest*
2164 eval "ac_cv_header_$ac_safe=yes"
2165else
2166 echo "$ac_err" >&5
2167 echo "configure: failed program was:" >&5
2168 cat conftest.$ac_ext >&5
2169 rm -rf conftest*
2170 eval "ac_cv_header_$ac_safe=no"
2171fi
2172rm -f conftest*
2173fi
2174if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2175 echo "$ac_t""yes" 1>&6
2176 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2177 cat >> confdefs.h <<EOF
2178#define $ac_tr_hdr 1
2179EOF
2180
2181else
2182 echo "$ac_t""no" 1>&6
2183fi
2184done
2185
2186
2187for ac_hdr in sys/select.h sys/timeb.h sys/time.h unistd.h utime.h linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h termcap.h
2188do
2189ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2190echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
243cf185 2191echo "configure:2192: checking for $ac_hdr" >&5
ba4481b5
DL
2192if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2193 echo $ac_n "(cached) $ac_c" 1>&6
2194else
2195 cat > conftest.$ac_ext <<EOF
243cf185 2196#line 2197 "configure"
ba4481b5
DL
2197#include "confdefs.h"
2198#include <$ac_hdr>
2199EOF
2200ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
243cf185 2201{ (eval echo configure:2202: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ba4481b5
DL
2202ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2203if test -z "$ac_err"; then
2204 rm -rf conftest*
2205 eval "ac_cv_header_$ac_safe=yes"
2206else
2207 echo "$ac_err" >&5
2208 echo "configure: failed program was:" >&5
2209 cat conftest.$ac_ext >&5
2210 rm -rf conftest*
2211 eval "ac_cv_header_$ac_safe=no"
2212fi
2213rm -f conftest*
2214fi
2215if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2216 echo "$ac_t""yes" 1>&6
2217 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2218 cat >> confdefs.h <<EOF
2219#define $ac_tr_hdr 1
2220EOF
2221
2222else
2223 echo "$ac_t""no" 1>&6
2224fi
2225done
2226
2227echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
243cf185 2228echo "configure:2229: checking for ANSI C header files" >&5
ba4481b5
DL
2229if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2230 echo $ac_n "(cached) $ac_c" 1>&6
2231else
2232 cat > conftest.$ac_ext <<EOF
243cf185 2233#line 2234 "configure"
ba4481b5
DL
2234#include "confdefs.h"
2235#include <stdlib.h>
2236#include <stdarg.h>
2237#include <string.h>
2238#include <float.h>
2239EOF
2240ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
243cf185 2241{ (eval echo configure:2242: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ba4481b5
DL
2242ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2243if test -z "$ac_err"; then
2244 rm -rf conftest*
2245 ac_cv_header_stdc=yes
2246else
2247 echo "$ac_err" >&5
2248 echo "configure: failed program was:" >&5
2249 cat conftest.$ac_ext >&5
2250 rm -rf conftest*
2251 ac_cv_header_stdc=no
2252fi
2253rm -f conftest*
2254
2255if test $ac_cv_header_stdc = yes; then
2256 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2257cat > conftest.$ac_ext <<EOF
243cf185 2258#line 2259 "configure"
ba4481b5
DL
2259#include "confdefs.h"
2260#include <string.h>
2261EOF
2262if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2263 egrep "memchr" >/dev/null 2>&1; then
2264 :
2265else
2266 rm -rf conftest*
2267 ac_cv_header_stdc=no
2268fi
2269rm -f conftest*
2270
2271fi
2272
2273if test $ac_cv_header_stdc = yes; then
2274 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2275cat > conftest.$ac_ext <<EOF
243cf185 2276#line 2277 "configure"
ba4481b5
DL
2277#include "confdefs.h"
2278#include <stdlib.h>
2279EOF
2280if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2281 egrep "free" >/dev/null 2>&1; then
2282 :
2283else
2284 rm -rf conftest*
2285 ac_cv_header_stdc=no
2286fi
2287rm -f conftest*
2288
2289fi
2290
2291if test $ac_cv_header_stdc = yes; then
2292 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2293if test "$cross_compiling" = yes; then
2294 :
2295else
2296 cat > conftest.$ac_ext <<EOF
243cf185 2297#line 2298 "configure"
ba4481b5
DL
2298#include "confdefs.h"
2299#include <ctype.h>
2300#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2301#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2302#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2303int main () { int i; for (i = 0; i < 256; i++)
2304if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2305exit (0); }
2306
2307EOF
243cf185 2308if { (eval echo configure:2309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
ba4481b5
DL
2309then
2310 :
2311else
2312 echo "configure: failed program was:" >&5
2313 cat conftest.$ac_ext >&5
2314 rm -fr conftest*
2315 ac_cv_header_stdc=no
2316fi
2317rm -fr conftest*
2318fi
2319
2320fi
2321fi
2322
2323echo "$ac_t""$ac_cv_header_stdc" 1>&6
2324if test $ac_cv_header_stdc = yes; then
2325 cat >> confdefs.h <<\EOF
2326#define STDC_HEADERS 1
2327EOF
2328
2329fi
2330
2331echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
243cf185 2332echo "configure:2333: checking whether time.h and sys/time.h may both be included" >&5
ba4481b5
DL
2333if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2334 echo $ac_n "(cached) $ac_c" 1>&6
2335else
2336 cat > conftest.$ac_ext <<EOF
243cf185 2337#line 2338 "configure"
ba4481b5
DL
2338#include "confdefs.h"
2339#include <sys/types.h>
2340#include <sys/time.h>
2341#include <time.h>
2342int main() {
2343struct tm *tp;
2344; return 0; }
2345EOF
243cf185 2346if { (eval echo configure:2347: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
ba4481b5
DL
2347 rm -rf conftest*
2348 ac_cv_header_time=yes
2349else
2350 echo "configure: failed program was:" >&5
2351 cat conftest.$ac_ext >&5
2352 rm -rf conftest*
2353 ac_cv_header_time=no
2354fi
2355rm -f conftest*
2356fi
2357
2358echo "$ac_t""$ac_cv_header_time" 1>&6
2359if test $ac_cv_header_time = yes; then
2360 cat >> confdefs.h <<\EOF
2361#define TIME_WITH_SYS_TIME 1
2362EOF
2363
2364fi
2365
2366echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
243cf185 2367echo "configure:2368: checking for sys_siglist declaration in signal.h or unistd.h" >&5
ba4481b5
DL
2368if eval "test \"`echo '$''{'ac_cv_decl_sys_siglist'+set}'`\" = set"; then
2369 echo $ac_n "(cached) $ac_c" 1>&6
2370else
2371 cat > conftest.$ac_ext <<EOF
243cf185 2372#line 2373 "configure"
ba4481b5
DL
2373#include "confdefs.h"
2374#include <sys/types.h>
2375#include <signal.h>
2376/* NetBSD declares sys_siglist in unistd.h. */
2377#ifdef HAVE_UNISTD_H
2378#include <unistd.h>
2379#endif
2380int main() {
2381char *msg = *(sys_siglist + 1);
2382; return 0; }
2383EOF
243cf185 2384if { (eval echo configure:2385: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
ba4481b5
DL
2385 rm -rf conftest*
2386 ac_cv_decl_sys_siglist=yes
2387else
2388 echo "configure: failed program was:" >&5
2389 cat conftest.$ac_ext >&5
2390 rm -rf conftest*
2391 ac_cv_decl_sys_siglist=no
2392fi
2393rm -f conftest*
2394fi
2395
2396echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
2397if test $ac_cv_decl_sys_siglist = yes; then
2398 cat >> confdefs.h <<\EOF
2399#define SYS_SIGLIST_DECLARED 1
2400EOF
2401
2402fi
2403
2404
2405echo $ac_n "checking for struct utimbuf""... $ac_c" 1>&6
243cf185 2406echo "configure:2407: checking for struct utimbuf" >&5
ba4481b5
DL
2407if eval "test \"`echo '$''{'emacs_cv_struct_utimbuf'+set}'`\" = set"; then
2408 echo $ac_n "(cached) $ac_c" 1>&6
2409else
2410 cat > conftest.$ac_ext <<EOF
243cf185 2411#line 2412 "configure"
ba4481b5
DL
2412#include "confdefs.h"
2413#ifdef TIME_WITH_SYS_TIME
2414#include <sys/time.h>
2415#include <time.h>
2416#else
2417#ifdef HAVE_SYS_TIME_H
2418#include <sys/time.h>
2419#else
2420#include <time.h>
2421#endif
2422#endif
2423#ifdef HAVE_UTIME_H
2424#include <utime.h>
2425#endif
2426int main() {
2427static struct utimbuf x; x.actime = x.modtime;
2428; return 0; }
2429EOF
243cf185 2430if { (eval echo configure:2431: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
ba4481b5
DL
2431 rm -rf conftest*
2432 emacs_cv_struct_utimbuf=yes
2433else
2434 echo "configure: failed program was:" >&5
2435 cat conftest.$ac_ext >&5
2436 rm -rf conftest*
2437 emacs_cv_struct_utimbuf=no
2438fi
2439rm -f conftest*
2440fi
2441
2442echo "$ac_t""$emacs_cv_struct_utimbuf" 1>&6
2443if test $emacs_cv_struct_utimbuf = yes; then
2444 cat >> confdefs.h <<\EOF
2445#define HAVE_STRUCT_UTIMBUF 1
2446EOF
2447
2448fi
2449
2450echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
243cf185 2451echo "configure:2452: checking return type of signal handlers" >&5
ba4481b5
DL
2452if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2453 echo $ac_n "(cached) $ac_c" 1>&6
2454else
2455 cat > conftest.$ac_ext <<EOF
243cf185 2456#line 2457 "configure"
ba4481b5
DL
2457#include "confdefs.h"
2458#include <sys/types.h>
2459#include <signal.h>
2460#ifdef signal
2461#undef signal
2462#endif
2463#ifdef __cplusplus
2464extern "C" void (*signal (int, void (*)(int)))(int);
2465#else
2466void (*signal ()) ();
2467#endif
2468
2469int main() {
2470int i;
2471; return 0; }
2472EOF
243cf185 2473if { (eval echo configure:2474: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
ba4481b5
DL
2474 rm -rf conftest*
2475 ac_cv_type_signal=void
2476else
2477 echo "configure: failed program was:" >&5
2478 cat conftest.$ac_ext >&5
2479 rm -rf conftest*
2480 ac_cv_type_signal=int
2481fi
2482rm -f conftest*
2483fi
2484
2485echo "$ac_t""$ac_cv_type_signal" 1>&6
2486cat >> confdefs.h <<EOF
2487#define RETSIGTYPE $ac_cv_type_signal
2488EOF
2489
2490
2491
2492echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
243cf185 2493echo "configure:2494: checking for struct timeval" >&5
ba4481b5
DL
2494if eval "test \"`echo '$''{'emacs_cv_struct_timeval'+set}'`\" = set"; then
2495 echo $ac_n "(cached) $ac_c" 1>&6
2496else
2497 cat > conftest.$ac_ext <<EOF
243cf185 2498#line 2499 "configure"
ba4481b5
DL
2499#include "confdefs.h"
2500#ifdef TIME_WITH_SYS_TIME
2501#include <sys/time.h>
2502#include <time.h>
2503#else
2504#ifdef HAVE_SYS_TIME_H
2505#include <sys/time.h>
2506#else
2507#include <time.h>
2508#endif
2509#endif
2510int main() {
2511static struct timeval x; x.tv_sec = x.tv_usec;
2512; return 0; }
2513EOF
243cf185 2514if { (eval echo configure:2515: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
ba4481b5
DL
2515 rm -rf conftest*
2516 emacs_cv_struct_timeval=yes
2517else
2518 echo "configure: failed program was:" >&5
2519 cat conftest.$ac_ext >&5
2520 rm -rf conftest*
2521 emacs_cv_struct_timeval=no
2522fi
2523rm -f conftest*
2524fi
2525
2526echo "$ac_t""$emacs_cv_struct_timeval" 1>&6
2527HAVE_TIMEVAL=$emacs_cv_struct_timeval
2528if test $emacs_cv_struct_timeval = yes; then
2529 cat >> confdefs.h <<\EOF
2530#define HAVE_TIMEVAL 1
2531EOF
2532
2533fi
2534
2535echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
243cf185 2536echo "configure:2537: checking whether struct tm is in sys/time.h or time.h" >&5
ba4481b5
DL
2537if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
2538 echo $ac_n "(cached) $ac_c" 1>&6
2539else
2540 cat > conftest.$ac_ext <<EOF
243cf185 2541#line 2542 "configure"
ba4481b5
DL
2542#include "confdefs.h"
2543#include <sys/types.h>
2544#include <time.h>
2545int main() {
2546struct tm *tp; tp->tm_sec;
2547; return 0; }
2548EOF
243cf185 2549if { (eval echo configure:2550: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
ba4481b5
DL
2550 rm -rf conftest*
2551 ac_cv_struct_tm=time.h
2552else
2553 echo "configure: failed program was:" >&5
2554 cat conftest.$ac_ext >&5
2555 rm -rf conftest*
2556 ac_cv_struct_tm=sys/time.h
2557fi
2558rm -f conftest*
2559fi
2560
2561echo "$ac_t""$ac_cv_struct_tm" 1>&6
2562if test $ac_cv_struct_tm = sys/time.h; then
2563 cat >> confdefs.h <<\EOF
2564#define TM_IN_SYS_TIME 1
2565EOF
2566
2567fi
2568
2569echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
243cf185 2570echo "configure:2571: checking for tm_zone in struct tm" >&5
ba4481b5
DL
2571if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
2572 echo $ac_n "(cached) $ac_c" 1>&6
2573else
2574 cat > conftest.$ac_ext <<EOF
243cf185 2575#line 2576 "configure"
ba4481b5
DL
2576#include "confdefs.h"
2577#include <sys/types.h>
2578#include <$ac_cv_struct_tm>
2579int main() {
2580struct tm tm; tm.tm_zone;
2581; return 0; }
2582EOF
243cf185 2583if { (eval echo configure:2584: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
ba4481b5
DL
2584 rm -rf conftest*
2585 ac_cv_struct_tm_zone=yes
2586else
2587 echo "configure: failed program was:" >&5
2588 cat conftest.$ac_ext >&5
2589 rm -rf conftest*
2590 ac_cv_struct_tm_zone=no
2591fi
2592rm -f conftest*
2593fi
2594
2595echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
2596if test "$ac_cv_struct_tm_zone" = yes; then
2597 cat >> confdefs.h <<\EOF
2598#define HAVE_TM_ZONE 1
2599EOF
2600
2601else
2602 echo $ac_n "checking for tzname""... $ac_c" 1>&6
243cf185 2603echo "configure:2604: checking for tzname" >&5
ba4481b5
DL
2604if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
2605 echo $ac_n "(cached) $ac_c" 1>&6
2606else
2607 cat > conftest.$ac_ext <<EOF
243cf185 2608#line 2609 "configure"
ba4481b5
DL
2609#include "confdefs.h"
2610#include <time.h>
2611#ifndef tzname /* For SGI. */
2612extern char *tzname[]; /* RS6000 and others reject char **tzname. */
2613#endif
2614int main() {
2615atoi(*tzname);
2616; return 0; }
2617EOF
243cf185 2618if { (eval echo configure:2619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ba4481b5
DL
2619 rm -rf conftest*
2620 ac_cv_var_tzname=yes
2621else
2622 echo "configure: failed program was:" >&5
2623 cat conftest.$ac_ext >&5
2624 rm -rf conftest*
2625 ac_cv_var_tzname=no
2626fi
2627rm -f conftest*
2628fi
2629
2630echo "$ac_t""$ac_cv_var_tzname" 1>&6
2631 if test $ac_cv_var_tzname = yes; then
2632 cat >> confdefs.h <<\EOF
2633#define HAVE_TZNAME 1
2634EOF
2635
2636 fi
2637fi
2638
2639
2640echo $ac_n "checking for working const""... $ac_c" 1>&6
243cf185 2641echo "configure:2642: checking for working const" >&5
ba4481b5
DL
2642if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2643 echo $ac_n "(cached) $ac_c" 1>&6
2644else
2645 cat > conftest.$ac_ext <<EOF
243cf185 2646#line 2647 "configure"
ba4481b5
DL
2647#include "confdefs.h"
2648
2649int main() {
2650
2651/* Ultrix mips cc rejects this. */
2652typedef int charset[2]; const charset x;
2653/* SunOS 4.1.1 cc rejects this. */
2654char const *const *ccp;
2655char **p;
2656/* NEC SVR4.0.2 mips cc rejects this. */
2657struct point {int x, y;};
2658static struct point const zero = {0,0};
2659/* AIX XL C 1.02.0.0 rejects this.
2660 It does not let you subtract one const X* pointer from another in an arm
2661 of an if-expression whose if-part is not a constant expression */
2662const char *g = "string";
2663ccp = &g + (g ? g-g : 0);
2664/* HPUX 7.0 cc rejects these. */
2665++ccp;
2666p = (char**) ccp;
2667ccp = (char const *const *) p;
2668{ /* SCO 3.2v4 cc rejects this. */
2669 char *t;
2670 char const *s = 0 ? (char *) 0 : (char const *) 0;
2671
2672 *t++ = 0;
2673}
2674{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
2675 int x[] = {25, 17};
2676 const int *foo = &x[0];
2677 ++foo;
2678}
2679{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2680 typedef const int *iptr;
2681 iptr p = 0;
2682 ++p;
2683}
2684{ /* AIX XL C 1.02.0.0 rejects this saying
2685 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2686 struct s { int j; const int *ap[3]; };
2687 struct s *b; b->j = 5;
2688}
2689{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2690 const int foo = 10;
2691}
2692
2693; return 0; }
2694EOF
243cf185 2695if { (eval echo configure:2696: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
ba4481b5
DL
2696 rm -rf conftest*
2697 ac_cv_c_const=yes
2698else
2699 echo "configure: failed program was:" >&5
2700 cat conftest.$ac_ext >&5
2701 rm -rf conftest*
2702 ac_cv_c_const=no
2703fi
2704rm -f conftest*
2705fi
2706
2707echo "$ac_t""$ac_cv_c_const" 1>&6
2708if test $ac_cv_c_const = no; then
2709 cat >> confdefs.h <<\EOF
2710#define const
2711EOF
2712
2713fi
2714
2715
2716echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
243cf185 2717echo "configure:2718: checking whether ${MAKE-make} sets \${MAKE}" >&5
ba4481b5
DL
2718set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
2719if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
2720 echo $ac_n "(cached) $ac_c" 1>&6
2721else
2722 cat > conftestmake <<\EOF
2723all:
2724 @echo 'ac_maketemp="${MAKE}"'
2725EOF
2726# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2727eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
2728if test -n "$ac_maketemp"; then
2729 eval ac_cv_prog_make_${ac_make}_set=yes
2730else
2731 eval ac_cv_prog_make_${ac_make}_set=no
2732fi
2733rm -f conftestmake
2734fi
2735if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
2736 echo "$ac_t""yes" 1>&6
2737 SET_MAKE=
2738else
2739 echo "$ac_t""no" 1>&6
2740 SET_MAKE="MAKE=${MAKE-make}"
2741fi
2742
2743
2744echo $ac_n "checking for long file names""... $ac_c" 1>&6
243cf185 2745echo "configure:2746: checking for long file names" >&5
ba4481b5
DL
2746if eval "test \"`echo '$''{'ac_cv_sys_long_file_names'+set}'`\" = set"; then
2747 echo $ac_n "(cached) $ac_c" 1>&6
2748else
2749 ac_cv_sys_long_file_names=yes
2750# Test for long file names in all the places we know might matter:
2751# . the current directory, where building will happen
2752# $prefix/lib where we will be installing things
2753# $exec_prefix/lib likewise
2754# eval it to expand exec_prefix.
2755# $TMPDIR if set, where it might want to write temporary files
2756# if $TMPDIR is not set:
2757# /tmp where it might want to write temporary files
2758# /var/tmp likewise
2759# /usr/tmp likewise
2760if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
2761 ac_tmpdirs="$TMPDIR"
2762else
2763 ac_tmpdirs='/tmp /var/tmp /usr/tmp'
2764fi
2765for ac_dir in . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
2766 test -d $ac_dir || continue
2767 test -w $ac_dir || continue # It is less confusing to not echo anything here.
2768 (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
2769 (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
2770 val=`cat $ac_dir/conftest9012345 2>/dev/null`
2771 if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
2772 ac_cv_sys_long_file_names=no
2773 rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
2774 break
2775 fi
2776 rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
2777done
2778fi
2779
2780echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
2781if test $ac_cv_sys_long_file_names = yes; then
2782 cat >> confdefs.h <<\EOF
2783#define HAVE_LONG_FILE_NAMES 1
2784EOF
2785
2786fi
2787
2788
2789#### Choose a window system.
2790
2791# If we find X, set shell vars x_includes and x_libraries to the
2792# paths, otherwise set no_x=yes.
2793# Uses ac_ vars as temps to allow command line to override cache and checks.
2794# --without-x overrides everything else, but does not touch the cache.
2795echo $ac_n "checking for X""... $ac_c" 1>&6
243cf185 2796echo "configure:2797: checking for X" >&5
ba4481b5
DL
2797
2798# Check whether --with-x or --without-x was given.
2799if test "${with_x+set}" = set; then
2800 withval="$with_x"
2801 :
2802fi
2803
2804# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
2805if test "x$with_x" = xno; then
2806 # The user explicitly disabled X.
2807 have_x=disabled
2808else
2809 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
2810 # Both variables are already set.
2811 have_x=yes
2812 else
2813if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
2814 echo $ac_n "(cached) $ac_c" 1>&6
2815else
2816 # One or both of the vars are not set, and there is no cached value.
2817ac_x_includes=NO ac_x_libraries=NO
2818rm -fr conftestdir
2819if mkdir conftestdir; then
2820 cd conftestdir
2821 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
2822 cat > Imakefile <<'EOF'
2823acfindx:
2824 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
2825EOF
2826 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
2827 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2828 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
2829 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
2830 for ac_extension in a so sl; do
2831 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
2832 test -f $ac_im_libdir/libX11.$ac_extension; then
2833 ac_im_usrlibdir=$ac_im_libdir; break
2834 fi
2835 done
2836 # Screen out bogus values from the imake configuration. They are
2837 # bogus both because they are the default anyway, and because
2838 # using them would break gcc on systems where it needs fixed includes.
2839 case "$ac_im_incroot" in
2840 /usr/include) ;;
2841 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
2842 esac
2843 case "$ac_im_usrlibdir" in
2844 /usr/lib | /lib) ;;
2845 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
2846 esac
2847 fi
2848 cd ..
2849 rm -fr conftestdir
2850fi
2851
2852if test "$ac_x_includes" = NO; then
2853 # Guess where to find include files, by looking for this one X11 .h file.
2854 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
2855
2856 # First, try using that file with no special directory specified.
2857cat > conftest.$ac_ext <<EOF
243cf185 2858#line 2859 "configure"
ba4481b5
DL
2859#include "confdefs.h"
2860#include <$x_direct_test_include>
2861EOF
2862ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
243cf185 2863{ (eval echo configure:2864: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ba4481b5
DL
2864ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2865if test -z "$ac_err"; then
2866 rm -rf conftest*
2867 # We can compile using X headers with no special include directory.
2868ac_x_includes=
2869else
2870 echo "$ac_err" >&5
2871 echo "configure: failed program was:" >&5
2872 cat conftest.$ac_ext >&5
2873 rm -rf conftest*
2874 # Look for the header file in a standard set of common directories.
2875# Check X11 before X11Rn because it is often a symlink to the current release.
2876 for ac_dir in \
2877 /usr/X11/include \
2878 /usr/X11R6/include \
2879 /usr/X11R5/include \
2880 /usr/X11R4/include \
2881 \
2882 /usr/include/X11 \
2883 /usr/include/X11R6 \
2884 /usr/include/X11R5 \
2885 /usr/include/X11R4 \
2886 \
2887 /usr/local/X11/include \
2888 /usr/local/X11R6/include \
2889 /usr/local/X11R5/include \
2890 /usr/local/X11R4/include \
2891 \
2892 /usr/local/include/X11 \
2893 /usr/local/include/X11R6 \
2894 /usr/local/include/X11R5 \
2895 /usr/local/include/X11R4 \
2896 \
2897 /usr/X386/include \
2898 /usr/x386/include \
2899 /usr/XFree86/include/X11 \
2900 \
2901 /usr/include \
2902 /usr/local/include \
2903 /usr/unsupported/include \
2904 /usr/athena/include \
2905 /usr/local/x11r5/include \
2906 /usr/lpp/Xamples/include \
2907 \
2908 /usr/openwin/include \
2909 /usr/openwin/share/include \
2910 ; \
2911 do
2912 if test -r "$ac_dir/$x_direct_test_include"; then
2913 ac_x_includes=$ac_dir
2914 break
2915 fi
2916 done
2917fi
2918rm -f conftest*
2919fi # $ac_x_includes = NO
2920
2921if test "$ac_x_libraries" = NO; then
2922 # Check for the libraries.
2923
2924 test -z "$x_direct_test_library" && x_direct_test_library=Xt
2925 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
2926
2927 # See if we find them without any special options.
2928 # Don't add to $LIBS permanently.
2929 ac_save_LIBS="$LIBS"
2930 LIBS="-l$x_direct_test_library $LIBS"
2931cat > conftest.$ac_ext <<EOF
243cf185 2932#line 2933 "configure"
ba4481b5
DL
2933#include "confdefs.h"
2934
2935int main() {
2936${x_direct_test_function}()
2937; return 0; }
2938EOF
243cf185 2939if { (eval echo configure:2940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ba4481b5
DL
2940 rm -rf conftest*
2941 LIBS="$ac_save_LIBS"
2942# We can link X programs with no special library path.
2943ac_x_libraries=
2944else
2945 echo "configure: failed program was:" >&5
2946 cat conftest.$ac_ext >&5
2947 rm -rf conftest*
2948 LIBS="$ac_save_LIBS"
2949# First see if replacing the include by lib works.
2950# Check X11 before X11Rn because it is often a symlink to the current release.
2951for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
2952 /usr/X11/lib \
2953 /usr/X11R6/lib \
2954 /usr/X11R5/lib \
2955 /usr/X11R4/lib \
2956 \
2957 /usr/lib/X11 \
2958 /usr/lib/X11R6 \
2959 /usr/lib/X11R5 \
2960 /usr/lib/X11R4 \
2961 \
2962 /usr/local/X11/lib \
2963 /usr/local/X11R6/lib \
2964 /usr/local/X11R5/lib \
2965 /usr/local/X11R4/lib \
2966 \
2967 /usr/local/lib/X11 \
2968 /usr/local/lib/X11R6 \
2969 /usr/local/lib/X11R5 \
2970 /usr/local/lib/X11R4 \
2971 \
2972 /usr/X386/lib \
2973 /usr/x386/lib \
2974 /usr/XFree86/lib/X11 \
2975 \
2976 /usr/lib \
2977 /usr/local/lib \
2978 /usr/unsupported/lib \
2979 /usr/athena/lib \
2980 /usr/local/x11r5/lib \
2981 /usr/lpp/Xamples/lib \
2982 /lib/usr/lib/X11 \
2983 \
2984 /usr/openwin/lib \
2985 /usr/openwin/share/lib \
2986 ; \
2987do
2988 for ac_extension in a so sl; do
2989 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
2990 ac_x_libraries=$ac_dir
2991 break 2
2992 fi
2993 done
2994done
2995fi
2996rm -f conftest*
2997fi # $ac_x_libraries = NO
2998
2999if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
3000 # Didn't find X anywhere. Cache the known absence of X.
3001 ac_cv_have_x="have_x=no"
3002else
3003 # Record where we found X for the cache.
3004 ac_cv_have_x="have_x=yes \
3005 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
3006fi
3007fi
3008 fi
3009 eval "$ac_cv_have_x"
3010fi # $with_x != no
3011
3012if test "$have_x" != yes; then
3013 echo "$ac_t""$have_x" 1>&6
3014 no_x=yes
3015else
3016 # If each of the values was on the command line, it overrides each guess.
3017 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
3018 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
3019 # Update the cache value to reflect the command line values.
3020 ac_cv_have_x="have_x=yes \
3021 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
3022 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
3023fi
3024
3025if test "$no_x" = yes; then
3026 window_system=none
3027else
3028 window_system=x11
3029fi
3030
3031if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
3032 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
3033 LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"`
3034 x_default_search_path=""
3035 for x_library in `echo ${x_libraries} | sed -e "s/:/ /g"`; do
3036 x_search_path="${x_library}/X11/%L/%T/%N%C%S:\
3037${x_library}/X11/%L/%T/%N%C%S:${x_libary}/X11/%l/%T/%N%C%S:\
3038${x_library}/X11/%T/%N%C%S:${x_library}/X11/%L/%T/%N%S:\
3039${x_library}/X11/%l/%T/%N%S:${x_library}/X11/%T/%N%S"
3040 if test x"${x_default_search_path}" = x; then
3041 x_default_search_path=${x_search_path}
3042 else
3043 x_default_search_path="${x_search_path}:${x_default_search_path}"
3044 fi
3045 done
3046fi
3047if test "${x_includes}" != NONE && test -n "${x_includes}"; then
3048 C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"`
3049fi
3050
3051if test x"${x_includes}" = x; then
3052 bitmapdir=/usr/include/X11/bitmaps
3053else
3054 # accumulate include directories that have X11 bitmap subdirectories
3055 bmd_acc="dummyval"
3056 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
3057 if test -d "${bmd}/X11/bitmaps"; then
3058 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
3059 elif test -d "${bmd}/bitmaps"; then
3060 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
3061 fi
3062 done
3063 if test ${bmd_acc} != "dummyval"; then
3064 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
3065 fi
3066fi
3067
3068case "${window_system}" in
3069 x11 )
3070 HAVE_X_WINDOWS=yes
3071 HAVE_X11=yes
3072 case "${with_x_toolkit}" in
3073 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
3074 motif ) USE_X_TOOLKIT=MOTIF ;;
3075 no ) USE_X_TOOLKIT=none ;;
3076 * ) USE_X_TOOLKIT=maybe ;;
3077 esac
3078 ;;
3079 none )
3080 HAVE_X_WINDOWS=no
3081 HAVE_X11=no
3082 USE_X_TOOLKIT=none
3083 ;;
3084esac
3085
3086### If we're using X11, we should use the X menu package.
3087HAVE_MENUS=no
3088case ${HAVE_X11} in
3089 yes ) HAVE_MENUS=yes ;;
3090esac
3091
3092if test "${opsys}" = "hpux9"; then
3093 case "${x_libraries}" in
3094 *X11R4* )
3095 opsysfile="s/hpux9-x11r4.h"
3096 ;;
3097 esac
3098fi
3099
3100if test "${opsys}" = "hpux9shr"; then
3101 case "${x_libraries}" in
3102 *X11R4* )
3103 opsysfile="s/hpux9shxr4.h"
3104 ;;
3105 esac
3106fi
3107
3108#### Extract some information from the operating system and machine files.
3109
3110echo "checking the machine- and system-dependent files to find out
3111 - which libraries the lib-src programs will want, and
3112 - whether the GNU malloc routines are usable" 1>&6
243cf185 3113echo "configure:3114: checking the machine- and system-dependent files to find out
ba4481b5
DL
3114 - which libraries the lib-src programs will want, and
3115 - whether the GNU malloc routines are usable" >&5
3116
3117### First figure out CFLAGS (which we use for running the compiler here)
3118### and REAL_CFLAGS (which we use for real compilation).
3119### The two are the same except on a few systems, where they are made
3120### different to work around various lossages. For example,
3121### GCC 2.5 on GNU/Linux needs them to be different because it treats -g
3122### as implying static linking.
3123
3124### If the CFLAGS env var is specified, we use that value
3125### instead of the default.
3126
3127### It's not important that this name contain the PID; you can't run
3128### two configures in the same directory and have anything work
3129### anyway.
3130tempcname="conftest.c"
3131
3132echo '
3133#include "'${srcdir}'/src/'${opsysfile}'"
3134#include "'${srcdir}'/src/'${machfile}'"
3135#ifndef LIBS_MACHINE
3136#define LIBS_MACHINE
3137#endif
3138#ifndef LIBS_SYSTEM
3139#define LIBS_SYSTEM
3140#endif
3141#ifndef C_SWITCH_SYSTEM
3142#define C_SWITCH_SYSTEM
3143#endif
3144#ifndef C_SWITCH_MACHINE
3145#define C_SWITCH_MACHINE
3146#endif
3147configure___ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM
3148configure___ c_switch_system=C_SWITCH_SYSTEM
3149configure___ c_switch_machine=C_SWITCH_MACHINE
3150
3151#ifndef LIB_X11_LIB
3152#define LIB_X11_LIB -lX11
3153#endif
3154
3155#ifndef LIBX11_MACHINE
3156#define LIBX11_MACHINE
3157#endif
3158
3159#ifndef LIBX11_SYSTEM
3160#define LIBX11_SYSTEM
3161#endif
3162configure___ LIBX=LIB_X11_LIB LIBX11_MACHINE LIBX11_SYSTEM
3163
3164#ifdef UNEXEC
3165configure___ unexec=UNEXEC
3166#else
3167configure___ unexec=unexec.o
3168#endif
3169
3170#ifdef SYSTEM_MALLOC
3171configure___ system_malloc=yes
3172#else
3173configure___ system_malloc=no
3174#endif
3175
3176#ifndef C_DEBUG_SWITCH
3177#define C_DEBUG_SWITCH -g
3178#endif
3179
3180#ifndef C_OPTIMIZE_SWITCH
3181#define C_OPTIMIZE_SWITCH -O
3182#endif
3183
3184#ifndef LD_SWITCH_MACHINE
3185#define LD_SWITCH_MACHINE
3186#endif
3187
3188#ifndef LD_SWITCH_SYSTEM
3189#define LD_SWITCH_SYSTEM
3190#endif
3191
3192#ifndef LD_SWITCH_X_SITE_AUX
3193#define LD_SWITCH_X_SITE_AUX
3194#endif
3195
3196configure___ ld_switch_system=LD_SWITCH_SYSTEM
3197configure___ ld_switch_machine=LD_SWITCH_MACHINE
3198
3199#ifdef THIS_IS_CONFIGURE
3200
3201/* Get the CFLAGS for tests in configure. */
3202#ifdef __GNUC__
3203configure___ CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
3204#else
3205configure___ CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
3206#endif
3207
3208#else /* not THIS_IS_CONFIGURE */
3209
3210/* Get the CFLAGS for real compilation. */
3211#ifdef __GNUC__
3212configure___ REAL_CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
3213#else
3214configure___ REAL_CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
3215#endif
3216
3217#endif /* not THIS_IS_CONFIGURE */
3218' > ${tempcname}
3219
3220# The value of CPP is a quoted variable reference, so we need to do this
3221# to get its actual value...
3222CPP=`eval "echo $CPP"`
3223eval `${CPP} -Isrc ${tempcname} \
3224 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
3225if test "x$SPECIFIED_CFLAGS" = x; then
3226 eval `${CPP} -Isrc -DTHIS_IS_CONFIGURE ${tempcname} \
3227 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
3228else
3229 REAL_CFLAGS="$CFLAGS"
3230fi
3231rm ${tempcname}
3232
3233ac_link="$ac_link $ld_switch_machine $ld_switch_system"
3234
3235### Compute the unexec source name from the object name.
3236UNEXEC_SRC="`echo ${unexec} | sed 's/\.o/.c/'`"
3237
3238# Do the opsystem or machine files prohibit the use of the GNU malloc?
3239# Assume not, until told otherwise.
3240GNU_MALLOC=yes
3241doug_lea_malloc=yes
3242echo $ac_n "checking for malloc_get_state""... $ac_c" 1>&6
243cf185 3243echo "configure:3244: checking for malloc_get_state" >&5
ba4481b5
DL
3244if eval "test \"`echo '$''{'ac_cv_func_malloc_get_state'+set}'`\" = set"; then
3245 echo $ac_n "(cached) $ac_c" 1>&6
3246else
3247 cat > conftest.$ac_ext <<EOF
243cf185 3248#line 3249 "configure"
ba4481b5
DL
3249#include "confdefs.h"
3250/* System header to define __stub macros and hopefully few prototypes,
3251 which can conflict with char malloc_get_state(); below. */
3252#include <assert.h>
3253/* Override any gcc2 internal prototype to avoid an error. */
3254/* We use char because int might match the return type of a gcc2
3255 builtin and then its argument prototype would still apply. */
3256char malloc_get_state();
3257
3258int main() {
3259
3260/* The GNU C library defines this for functions which it implements
3261 to always fail with ENOSYS. Some functions are actually named
3262 something starting with __ and the normal name is an alias. */
3263#if defined (__stub_malloc_get_state) || defined (__stub___malloc_get_state)
3264choke me
3265#else
3266malloc_get_state();
3267#endif
3268
3269; return 0; }
3270EOF
243cf185 3271if { (eval echo configure:3272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ba4481b5
DL
3272 rm -rf conftest*
3273 eval "ac_cv_func_malloc_get_state=yes"
3274else
3275 echo "configure: failed program was:" >&5
3276 cat conftest.$ac_ext >&5
3277 rm -rf conftest*
3278 eval "ac_cv_func_malloc_get_state=no"
3279fi
3280rm -f conftest*
3281fi
3282
3283if eval "test \"`echo '$ac_cv_func_'malloc_get_state`\" = yes"; then
3284 echo "$ac_t""yes" 1>&6
3285 :
3286else
3287 echo "$ac_t""no" 1>&6
3288doug_lea_malloc=no
3289fi
3290
3291echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6
243cf185 3292echo "configure:3293: checking for malloc_set_state" >&5
ba4481b5
DL
3293if eval "test \"`echo '$''{'ac_cv_func_malloc_set_state'+set}'`\" = set"; then
3294 echo $ac_n "(cached) $ac_c" 1>&6
3295else
3296 cat > conftest.$ac_ext <<EOF
243cf185 3297#line 3298 "configure"
ba4481b5
DL
3298#include "confdefs.h"
3299/* System header to define __stub macros and hopefully few prototypes,
3300 which can conflict with char malloc_set_state(); below. */
3301#include <assert.h>
3302/* Override any gcc2 internal prototype to avoid an error. */
3303/* We use char because int might match the return type of a gcc2
3304 builtin and then its argument prototype would still apply. */
3305char malloc_set_state();
3306
3307int main() {
3308
3309/* The GNU C library defines this for functions which it implements
3310 to always fail with ENOSYS. Some functions are actually named
3311 something starting with __ and the normal name is an alias. */
3312#if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
3313choke me
3314#else
3315malloc_set_state();
3316#endif
3317
3318; return 0; }
3319EOF
243cf185 3320if { (eval echo configure:3321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ba4481b5
DL
3321 rm -rf conftest*
3322 eval "ac_cv_func_malloc_set_state=yes"
3323else
3324 echo "configure: failed program was:" >&5
3325 cat conftest.$ac_ext >&5
3326 rm -rf conftest*
3327 eval "ac_cv_func_malloc_set_state=no"
3328fi
3329rm -f conftest*
3330fi
3331
3332if eval "test \"`echo '$ac_cv_func_'malloc_set_state`\" = yes"; then
3333 echo "$ac_t""yes" 1>&6
3334 :
3335else
3336 echo "$ac_t""no" 1>&6
3337doug_lea_malloc=no
3338fi
3339
3340echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6
243cf185 3341echo "configure:3342: checking whether __after_morecore_hook exists" >&5
ba4481b5
DL
3342if eval "test \"`echo '$''{'emacs_cv_var___after_morecore_hook'+set}'`\" = set"; then
3343 echo $ac_n "(cached) $ac_c" 1>&6
3344else
3345 cat > conftest.$ac_ext <<EOF
243cf185 3346#line 3347 "configure"
ba4481b5
DL
3347#include "confdefs.h"
3348extern void (* __after_morecore_hook)();
3349int main() {
3350__after_morecore_hook = 0
3351; return 0; }
3352EOF
243cf185 3353if { (eval echo configure:3354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ba4481b5
DL
3354 rm -rf conftest*
3355 emacs_cv_var___after_morecore_hook=yes
3356else
3357 echo "configure: failed program was:" >&5
3358 cat conftest.$ac_ext >&5
3359 rm -rf conftest*
3360 emacs_cv_var___after_morecore_hook=no
3361fi
3362rm -f conftest*
3363fi
3364
3365echo "$ac_t""$emacs_cv_var___after_morecore_hook" 1>&6
3366if test $emacs_cv_var___after_morecore_hook = no; then
3367 doug_lea_malloc=no
3368fi
3369if test "${system_malloc}" = "yes"; then
3370 GNU_MALLOC=no
3371 GNU_MALLOC_reason="
3372 (The GNU allocators don't work with this system configuration.)"
3373fi
3374if test "$doug_lea_malloc" = "yes" ; then
3375 if test "$GNU_MALLOC" = yes ; then
3376 GNU_MALLOC_reason="
3377 (Using Doug Lea's new malloc from the GNU C Library.)"
3378 fi
3379 cat >> confdefs.h <<\EOF
3380#define DOUG_LEA_MALLOC 1
3381EOF
3382
3383fi
3384
3385if test x"${REL_ALLOC}" = x; then
3386 REL_ALLOC=${GNU_MALLOC}
3387fi
3388
3389LISP_FLOAT_TYPE=yes
3390
3391
3392#### Add the libraries to LIBS and check for some functions.
3393
3394if test x"${OVERRIDE_CPPFLAGS}" != x; then
3395 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
3396else
3397 CPPFLAGS="$c_switch_system $c_switch_machine $CPPFLAGS"
3398fi
3399
3400LIBS="$libsrc_libs $LIBS"
3401
3402echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
243cf185 3403echo "configure:3404: checking for dnet_ntoa in -ldnet" >&5
ba4481b5
DL
3404ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
3405if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3406 echo $ac_n "(cached) $ac_c" 1>&6
3407else
3408 ac_save_LIBS="$LIBS"
3409LIBS="-ldnet $LIBS"
3410cat > conftest.$ac_ext <<EOF
243cf185 3411#line 3412 "configure"
ba4481b5
DL
3412#include "confdefs.h"
3413/* Override any gcc2 internal prototype to avoid an error. */
3414/* We use char because int might match the return type of a gcc2
3415 builtin and then its argument prototype would still apply. */
3416char dnet_ntoa();
3417
3418int main() {
3419dnet_ntoa()
3420; return 0; }
3421EOF
243cf185 3422if { (eval echo configure:3423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ba4481b5
DL
3423 rm -rf conftest*
3424 eval "ac_cv_lib_$ac_lib_var=yes"
3425else
3426 echo "configure: failed program was:" >&5
3427 cat conftest.$ac_ext >&5
3428 rm -rf conftest*
3429 eval "ac_cv_lib_$ac_lib_var=no"
3430fi
3431rm -f conftest*
3432LIBS="$ac_save_LIBS"
3433
3434fi
3435if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3436 echo "$ac_t""yes" 1>&6
3437 ac_tr_lib=HAVE_LIB`echo dnet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3438 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3439 cat >> confdefs.h <<EOF
3440#define $ac_tr_lib 1
3441EOF
3442
3443 LIBS="-ldnet $LIBS"
3444
3445else
3446 echo "$ac_t""no" 1>&6
3447fi
3448
3449
3450echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
243cf185 3451echo "configure:3452: checking for main in -lXbsd" >&5
ba4481b5
DL
3452ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
3453if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3454 echo $ac_n "(cached) $ac_c" 1>&6
3455else
3456 ac_save_LIBS="$LIBS"
3457LIBS="-lXbsd $LIBS"
3458cat > conftest.$ac_ext <<EOF
243cf185 3459#line 3460 "configure"
ba4481b5
DL
3460#include "confdefs.h"
3461
3462int main() {
3463main()
3464; return 0; }
3465EOF
243cf185 3466if { (eval echo configure:3467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ba4481b5
DL
3467 rm -rf conftest*
3468 eval "ac_cv_lib_$ac_lib_var=yes"
3469else
3470 echo "configure: failed program was:" >&5
3471 cat conftest.$ac_ext >&5
3472 rm -rf conftest*
3473 eval "ac_cv_lib_$ac_lib_var=no"
3474fi
3475rm -f conftest*
3476LIBS="$ac_save_LIBS"
3477
3478fi
3479if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3480 echo "$ac_t""yes" 1>&6
3481 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
3482else
3483 echo "$ac_t""no" 1>&6
3484fi
3485
3486
3487echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6
243cf185 3488echo "configure:3489: checking for cma_open in -lpthreads" >&5
ba4481b5
DL
3489ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'`
3490if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3491 echo $ac_n "(cached) $ac_c" 1>&6
3492else
3493 ac_save_LIBS="$LIBS"
3494LIBS="-lpthreads $LIBS"
3495cat > conftest.$ac_ext <<EOF
243cf185 3496#line 3497 "configure"
ba4481b5
DL
3497#include "confdefs.h"
3498/* Override any gcc2 internal prototype to avoid an error. */
3499/* We use char because int might match the return type of a gcc2
3500 builtin and then its argument prototype would still apply. */
3501char cma_open();
3502
3503int main() {
3504cma_open()
3505; return 0; }
3506EOF
243cf185 3507if { (eval echo configure:3508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ba4481b5
DL
3508 rm -rf conftest*
3509 eval "ac_cv_lib_$ac_lib_var=yes"
3510else
3511 echo "configure: failed program was:" >&5
3512 cat conftest.$ac_ext >&5
3513 rm -rf conftest*
3514 eval "ac_cv_lib_$ac_lib_var=no"
3515fi
3516rm -f conftest*
3517LIBS="$ac_save_LIBS"
3518
3519fi
3520if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3521 echo "$ac_t""yes" 1>&6
3522 ac_tr_lib=HAVE_LIB`echo pthreads | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3523 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3524 cat >> confdefs.h <<EOF
3525#define $ac_tr_lib 1
3526EOF
3527
3528 LIBS="-lpthreads $LIBS"
3529
3530else
3531 echo "$ac_t""no" 1>&6
3532fi
3533
3534
3535echo $ac_n "checking for XFree86 in /usr/X386""... $ac_c" 1>&6
243cf185 3536echo "configure:3537: checking for XFree86 in /usr/X386" >&5
ba4481b5
DL
3537if test -d /usr/X386/include; then
3538 HAVE_XFREE386=yes
3539 : ${C_SWITCH_X_SITE="-I/usr/X386/include"}
3540else
3541 HAVE_XFREE386=no
3542fi
3543echo "$ac_t""$HAVE_XFREE386" 1>&6
3544
3545# Change CFLAGS temporarily so that C_SWITCH_X_SITE gets used
3546# for the tests that follow. We set it back to REAL_CFLAGS later on.
3547
3548if test "${HAVE_X11}" = "yes"; then
3549 DEFS="$C_SWITCH_X_SITE $DEFS"
3550 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
3551 LIBS="$LIBX $LIBS"
3552 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
3553
3554 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
3555 # This is handled by LD_SWITCH_X_SITE_AUX during the real build,
3556 # but it's more convenient here to set LD_RUN_PATH
3557 # since this also works on hosts that don't understand LD_SWITCH_X_SITE_AUX.
3558 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
3559 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
3560 export LD_RUN_PATH
3561 fi
3562
3563 if test "${opsys}" = "gnu-linux"; then
3564 echo $ac_n "checking whether X on GNU/Linux needs -b to link""... $ac_c" 1>&6
243cf185 3565echo "configure:3566: checking whether X on GNU/Linux needs -b to link" >&5
ba4481b5 3566 cat > conftest.$ac_ext <<EOF
243cf185 3567#line 3568 "configure"
ba4481b5
DL
3568#include "confdefs.h"
3569
3570int main() {
3571XOpenDisplay ("foo");
3572; return 0; }
3573EOF
243cf185 3574if { (eval echo configure:3575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ba4481b5
DL
3575 rm -rf conftest*
3576 xlinux_first_failure=no
3577else
3578 echo "configure: failed program was:" >&5
3579 cat conftest.$ac_ext >&5
3580 rm -rf conftest*
3581 xlinux_first_failure=yes
3582fi
3583rm -f conftest*
3584 if test "${xlinux_first_failure}" = "yes"; then
3585 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
3586 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
3587 OLD_CPPFLAGS="$CPPFLAGS"
3588 OLD_LIBS="$LIBS"
3589 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
3590 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
3591 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
3592 LIBS="$LIBS -b i486-linuxaout"
3593 cat > conftest.$ac_ext <<EOF
243cf185 3594#line 3595 "configure"
ba4481b5
DL
3595#include "confdefs.h"
3596
3597int main() {
3598XOpenDisplay ("foo");
3599; return 0; }
3600EOF
243cf185 3601if { (eval echo configure:3602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ba4481b5
DL
3602 rm -rf conftest*
3603 xlinux_second_failure=no
3604else
3605 echo "configure: failed program was:" >&5
3606 cat conftest.$ac_ext >&5
3607 rm -rf conftest*
3608 xlinux_second_failure=yes
3609fi
3610rm -f conftest*
3611 if test "${xlinux_second_failure}" = "yes"; then
3612 # If we get the same failure with -b, there is no use adding -b.
3613 # So take it out. This plays safe.
3614 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
3615 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
3616 CPPFLAGS="$OLD_CPPFLAGS"
3617 LIBS="$OLD_LIBS"
3618 echo "$ac_t""no" 1>&6
3619 else
3620 echo "$ac_t""yes" 1>&6
3621 fi
3622 else
3623 echo "$ac_t""no" 1>&6
3624 fi
3625 fi
3626
3627 for ac_func in XrmSetDatabase XScreenResourceString \
3628XScreenNumberOfScreen XSetWMProtocols
3629do
3630echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
243cf185 3631echo "configure:3632: checking for $ac_func" >&5
ba4481b5
DL
3632if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3633 echo $ac_n "(cached) $ac_c" 1>&6
3634else
3635 cat > conftest.$ac_ext <<EOF
243cf185 3636#line 3637 "configure"
ba4481b5
DL
3637#include "confdefs.h"
3638/* System header to define __stub macros and hopefully few prototypes,
3639 which can conflict with char $ac_func(); below. */
3640#include <assert.h>
3641/* Override any gcc2 internal prototype to avoid an error. */
3642/* We use char because int might match the return type of a gcc2
3643 builtin and then its argument prototype would still apply. */
3644char $ac_func();
3645
3646int main() {
3647
3648/* The GNU C library defines this for functions which it implements
3649 to always fail with ENOSYS. Some functions are actually named
3650 something starting with __ and the normal name is an alias. */
3651#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3652choke me
3653#else
3654$ac_func();
3655#endif
3656
3657; return 0; }
3658EOF
243cf185 3659if { (eval echo configure:3660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ba4481b5
DL
3660 rm -rf conftest*
3661 eval "ac_cv_func_$ac_func=yes"
3662else
3663 echo "configure: failed program was:" >&5
3664 cat conftest.$ac_ext >&5
3665 rm -rf conftest*
3666 eval "ac_cv_func_$ac_func=no"
3667fi
3668rm -f conftest*
3669fi
3670
3671if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3672 echo "$ac_t""yes" 1>&6
3673 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3674 cat >> confdefs.h <<EOF
3675#define $ac_tr_func 1
3676EOF
3677
3678else
3679 echo "$ac_t""no" 1>&6
3680fi
3681done
3682
3683fi
3684
3685if test "${window_system}" = "x11"; then
3686 echo $ac_n "checking X11 version 6""... $ac_c" 1>&6
243cf185 3687echo "configure:3688: checking X11 version 6" >&5
ba4481b5
DL
3688 if eval "test \"`echo '$''{'emacs_cv_x11_version_6'+set}'`\" = set"; then
3689 echo $ac_n "(cached) $ac_c" 1>&6
3690else
3691 cat > conftest.$ac_ext <<EOF
243cf185 3692#line 3693 "configure"
ba4481b5
DL
3693#include "confdefs.h"
3694#include <X11/Xlib.h>
3695int main() {
3696#if XlibSpecificationRelease < 6
3697fail;
3698#endif
3699
3700; return 0; }
3701EOF
243cf185 3702if { (eval echo configure:3703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ba4481b5
DL
3703 rm -rf conftest*
3704 emacs_cv_x11_version_6=yes
3705else
3706 echo "configure: failed program was:" >&5
3707 cat conftest.$ac_ext >&5
3708 rm -rf conftest*
3709 emacs_cv_x11_version_6=no
3710fi
3711rm -f conftest*
3712fi
3713
3714 if test $emacs_cv_x11_version_6 = yes; then
3715 echo "$ac_t""6 or newer" 1>&6
3716 cat >> confdefs.h <<\EOF
3717#define HAVE_X11R6 1
3718EOF
3719
3720 else
3721 echo "$ac_t""before 6" 1>&6
3722 fi
3723fi
3724
3725if test "${window_system}" = "x11"; then
3726 echo $ac_n "checking X11 version 5""... $ac_c" 1>&6
243cf185 3727echo "configure:3728: checking X11 version 5" >&5
ba4481b5
DL
3728 if eval "test \"`echo '$''{'emacs_cv_x11_version_5'+set}'`\" = set"; then
3729 echo $ac_n "(cached) $ac_c" 1>&6
3730else
3731 cat > conftest.$ac_ext <<EOF
243cf185 3732#line 3733 "configure"
ba4481b5
DL
3733#include "confdefs.h"
3734#include <X11/Xlib.h>
3735int main() {
3736#if XlibSpecificationRelease < 5
3737fail;
3738#endif
3739
3740; return 0; }
3741EOF
243cf185 3742if { (eval echo configure:3743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ba4481b5
DL
3743 rm -rf conftest*
3744 emacs_cv_x11_version_5=yes
3745else
3746 echo "configure: failed program was:" >&5
3747 cat conftest.$ac_ext >&5
3748 rm -rf conftest*
3749 emacs_cv_x11_version_5=no
3750fi
3751rm -f conftest*
3752fi
3753
3754 if test $emacs_cv_x11_version_5 = yes; then
3755 echo "$ac_t""5 or newer" 1>&6
3756 HAVE_X11R5=yes
3757 cat >> confdefs.h <<\EOF
3758#define HAVE_X11R5 1
3759EOF
3760
3761 else
3762 HAVE_X11R5=no
3763 echo "$ac_t""before 5" 1>&6
3764 fi
3765fi
3766
3767if test x"${USE_X_TOOLKIT}" = xmaybe; then
3768 if test x"${HAVE_X11R5}" = xyes; then
3769 echo $ac_n "checking X11 version 5 with Xaw""... $ac_c" 1>&6
243cf185 3770echo "configure:3771: checking X11 version 5 with Xaw" >&5
ba4481b5
DL
3771 if eval "test \"`echo '$''{'emacs_cv_x11_version_5_with_xaw'+set}'`\" = set"; then
3772 echo $ac_n "(cached) $ac_c" 1>&6
3773else
3774 cat > conftest.$ac_ext <<EOF
243cf185 3775#line 3776 "configure"
ba4481b5
DL
3776#include "confdefs.h"
3777
3778#include <X11/Intrinsic.h>
3779#include <X11/Xaw/Simple.h>
3780int main() {
3781
3782; return 0; }
3783EOF
243cf185 3784if { (eval echo configure:3785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ba4481b5
DL
3785 rm -rf conftest*
3786 emacs_cv_x11_version_5_with_xaw=yes
3787else
3788 echo "configure: failed program was:" >&5
3789 cat conftest.$ac_ext >&5
3790 rm -rf conftest*
3791 emacs_cv_x11_version_5_with_xaw=no
3792fi
3793rm -f conftest*
3794fi
3795
3796 if test $emacs_cv_x11_version_5_with_xaw = yes; then
3797 echo "$ac_t""5 or newer, with Xaw; use toolkit by default" 1>&6
3798 USE_X_TOOLKIT=LUCID
3799 else
3800 echo "$ac_t""before 5 or no Xaw; do not use toolkit by default" 1>&6
3801 USE_X_TOOLKIT=none
3802 fi
3803 else
3804 USE_X_TOOLKIT=none
3805 fi
3806fi
3807
3808X_TOOLKIT_TYPE=$USE_X_TOOLKIT
3809
3810if test "${USE_X_TOOLKIT}" != "none"; then
3811 echo $ac_n "checking X11 toolkit version""... $ac_c" 1>&6
243cf185 3812echo "configure:3813: checking X11 toolkit version" >&5
ba4481b5
DL
3813 if eval "test \"`echo '$''{'emacs_cv_x11_toolkit_version_6'+set}'`\" = set"; then
3814 echo $ac_n "(cached) $ac_c" 1>&6
3815else
3816 cat > conftest.$ac_ext <<EOF
243cf185 3817#line 3818 "configure"
ba4481b5
DL
3818#include "confdefs.h"
3819#include <X11/Intrinsic.h>
3820int main() {
3821#if XtSpecificationRelease < 6
3822fail;
3823#endif
3824
3825; return 0; }
3826EOF
243cf185 3827if { (eval echo configure:3828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ba4481b5
DL
3828 rm -rf conftest*
3829 emacs_cv_x11_toolkit_version_6=yes
3830else
3831 echo "configure: failed program was:" >&5
3832 cat conftest.$ac_ext >&5
3833 rm -rf conftest*
3834 emacs_cv_x11_toolkit_version_6=no
3835fi
3836rm -f conftest*
3837fi
3838
3839 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
3840 if test $emacs_cv_x11_toolkit_version_6 = yes; then
3841 echo "$ac_t""6 or newer" 1>&6
3842 cat >> confdefs.h <<\EOF
3843#define HAVE_X11XTR6 1
3844EOF
3845
3846 else
3847 echo "$ac_t""before 6" 1>&6
3848 fi
3849
3850 OLDLIBS="$LIBS"
3851 if test x$HAVE_X11XTR6 = xyes; then
3852 LIBS="-lXt -lSM -lICE $LIBS"
3853 else
3854 LIBS="-lXt $LIBS"
3855 fi
3856 echo $ac_n "checking for XmuConvertStandardSelection in -lXmu""... $ac_c" 1>&6
243cf185 3857echo "configure:3858: checking for XmuConvertStandardSelection in -lXmu" >&5
ba4481b5
DL
3858ac_lib_var=`echo Xmu'_'XmuConvertStandardSelection | sed 'y%./+-%__p_%'`
3859if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3860 echo $ac_n "(cached) $ac_c" 1>&6
3861else
3862 ac_save_LIBS="$LIBS"
3863LIBS="-lXmu $LIBS"
3864cat > conftest.$ac_ext <<EOF
243cf185 3865#line 3866 "configure"
ba4481b5
DL
3866#include "confdefs.h"
3867/* Override any gcc2 internal prototype to avoid an error. */
3868/* We use char because int might match the return type of a gcc2
3869 builtin and then its argument prototype would still apply. */
3870char XmuConvertStandardSelection();
3871
3872int main() {
3873XmuConvertStandardSelection()
3874; return 0; }
3875EOF
243cf185 3876if { (eval echo configure:3877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ba4481b5
DL
3877 rm -rf conftest*
3878 eval "ac_cv_lib_$ac_lib_var=yes"
3879else
3880 echo "configure: failed program was:" >&5
3881 cat conftest.$ac_ext >&5
3882 rm -rf conftest*
3883 eval "ac_cv_lib_$ac_lib_var=no"
3884fi
3885rm -f conftest*
3886LIBS="$ac_save_LIBS"
3887
3888fi
3889if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3890 echo "$ac_t""yes" 1>&6
3891 ac_tr_lib=HAVE_LIB`echo Xmu | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3892 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3893 cat >> confdefs.h <<EOF
3894#define $ac_tr_lib 1
3895EOF
3896
3897 LIBS="-lXmu $LIBS"
3898
3899else
3900 echo "$ac_t""no" 1>&6
3901fi
3902
3903 LIBS="$OLDLIBS"
3904fi
3905
3906if test "${USE_X_TOOLKIT}" = "MOTIF"; then
3907 echo $ac_n "checking for Motif version 2.1""... $ac_c" 1>&6
243cf185 3908echo "configure:3909: checking for Motif version 2.1" >&5
ba4481b5
DL
3909if eval "test \"`echo '$''{'emacs_cv_motif_version_2_1'+set}'`\" = set"; then
3910 echo $ac_n "(cached) $ac_c" 1>&6
3911else
3912 cat > conftest.$ac_ext <<EOF
243cf185 3913#line 3914 "configure"
ba4481b5
DL
3914#include "confdefs.h"
3915#include <Xm/Xm.h>
3916int main() {
3917#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
3918int x = 5;
3919#else
3920Motif version prior to 2.1.
3921#endif
3922; return 0; }
3923EOF
243cf185 3924if { (eval echo configure:3925: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
ba4481b5
DL
3925 rm -rf conftest*
3926 emacs_cv_motif_version_2_1=yes
3927else
3928 echo "configure: failed program was:" >&5
3929 cat conftest.$ac_ext >&5
3930 rm -rf conftest*
3931 emacs_cv_motif_version_2_1=no
3932fi
3933rm -f conftest*
3934fi
3935
3936echo "$ac_t""$emacs_cv_motif_version_2_1" 1>&6
3937 HAVE_MOTIF_2_1=$emacs_cv_motif_version_2_1
3938 if test $emacs_cv_motif_version_2_1 = yes; then
3939 cat >> confdefs.h <<\EOF
3940#define HAVE_MOTIF_2_1 1
3941EOF
3942
3943 echo $ac_n "checking for XpCreateContext in -lXp""... $ac_c" 1>&6
243cf185 3944echo "configure:3945: checking for XpCreateContext in -lXp" >&5
ba4481b5
DL
3945ac_lib_var=`echo Xp'_'XpCreateContext | sed 'y%./+-%__p_%'`
3946if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3947 echo $ac_n "(cached) $ac_c" 1>&6
3948else
3949 ac_save_LIBS="$LIBS"
3950LIBS="-lXp $LIBS"
3951cat > conftest.$ac_ext <<EOF
243cf185 3952#line 3953 "configure"
ba4481b5
DL
3953#include "confdefs.h"
3954/* Override any gcc2 internal prototype to avoid an error. */
3955/* We use char because int might match the return type of a gcc2
3956 builtin and then its argument prototype would still apply. */
3957char XpCreateContext();
3958
3959int main() {
3960XpCreateContext()
3961; return 0; }
3962EOF
243cf185 3963if { (eval echo configure:3964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ba4481b5
DL
3964 rm -rf conftest*
3965 eval "ac_cv_lib_$ac_lib_var=yes"
3966else
3967 echo "configure: failed program was:" >&5
3968 cat conftest.$ac_ext >&5
3969 rm -rf conftest*
3970 eval "ac_cv_lib_$ac_lib_var=no"
3971fi
3972rm -f conftest*
3973LIBS="$ac_save_LIBS"
3974
3975fi
3976if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3977 echo "$ac_t""yes" 1>&6
3978 ac_tr_lib=HAVE_LIB`echo Xp | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3979 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3980 cat >> confdefs.h <<EOF
3981#define $ac_tr_lib 1
3982EOF
3983
3984 LIBS="-lXp $LIBS"
3985
3986else
3987 echo "$ac_t""no" 1>&6
3988fi
3989
3990 fi
3991fi
3992
3993### Is -lXaw3d available?
3994HAVE_XAW3D=no
3995if test "${HAVE_X11}" = "yes"; then
3996 if test "${USE_X_TOOLKIT}" != "none"; then
3997 old_c_flags="${CFLAGS}"
3998 CFLAGS="${LD_SWITCH_X_SITE}"
3999 ac_safe=`echo "X11/Xaw3d/Scrollbar.h" | sed 'y%./+-%__p_%'`
4000echo $ac_n "checking for X11/Xaw3d/Scrollbar.h""... $ac_c" 1>&6
243cf185 4001echo "configure:4002: checking for X11/Xaw3d/Scrollbar.h" >&5
ba4481b5
DL
4002if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4003 echo $ac_n "(cached) $ac_c" 1>&6
4004else
4005 cat > conftest.$ac_ext <<EOF
243cf185 4006#line 4007 "configure"
ba4481b5
DL
4007#include "confdefs.h"
4008#include <X11/Xaw3d/Scrollbar.h>
4009EOF
4010ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
243cf185 4011{ (eval echo configure:4012: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ba4481b5
DL
4012ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4013if test -z "$ac_err"; then
4014 rm -rf conftest*
4015 eval "ac_cv_header_$ac_safe=yes"
4016else
4017 echo "$ac_err" >&5
4018 echo "configure: failed program was:" >&5
4019 cat conftest.$ac_ext >&5
4020 rm -rf conftest*
4021 eval "ac_cv_header_$ac_safe=no"
4022fi
4023rm -f conftest*
4024fi
4025if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4026 echo "$ac_t""yes" 1>&6
4027 echo $ac_n "checking for XawScrollbarSetThumb in -lXaw3d""... $ac_c" 1>&6
243cf185 4028echo "configure:4029: checking for XawScrollbarSetThumb in -lXaw3d" >&5
ba4481b5
DL
4029ac_lib_var=`echo Xaw3d'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'`
4030if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4031 echo $ac_n "(cached) $ac_c" 1>&6
4032else
4033 ac_save_LIBS="$LIBS"
4034LIBS="-lXaw3d -lX11 $LIBS"
4035cat > conftest.$ac_ext <<EOF
243cf185 4036#line 4037 "configure"
ba4481b5
DL
4037#include "confdefs.h"
4038/* Override any gcc2 internal prototype to avoid an error. */
4039/* We use char because int might match the return type of a gcc2
4040 builtin and then its argument prototype would still apply. */
4041char XawScrollbarSetThumb();
4042
4043int main() {
4044XawScrollbarSetThumb()
4045; return 0; }
4046EOF
243cf185 4047if { (eval echo configure:4048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ba4481b5
DL
4048 rm -rf conftest*
4049 eval "ac_cv_lib_$ac_lib_var=yes"
4050else
4051 echo "configure: failed program was:" >&5
4052 cat conftest.$ac_ext >&5
4053 rm -rf conftest*
4054 eval "ac_cv_lib_$ac_lib_var=no"
4055fi
4056rm -f conftest*
4057LIBS="$ac_save_LIBS"
4058
4059fi
4060if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4061 echo "$ac_t""yes" 1>&6
4062 HAVE_XAW3D=yes
4063else
4064 echo "$ac_t""no" 1>&6
4065fi
4066
4067else
4068 echo "$ac_t""no" 1>&6
4069fi
4070
4071 CFLAGS="${old_c_flags}"
4072
4073 if test "${HAVE_XAW3D}" = "yes"; then
4074 cat >> confdefs.h <<\EOF
4075#define HAVE_XAW3D 1
4076EOF
4077
4078 fi
4079 fi
4080fi
4081
4082
4083USE_TOOLKIT_SCROLL_BARS=no
4084if test "${with_toolkit_scroll_bars}" != "no"; then
4085 if test "${USE_X_TOOLKIT}" != "none"; then
4086 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
4087 cat >> confdefs.h <<\EOF
4088#define USE_TOOLKIT_SCROLL_BARS 1
4089EOF
4090
4091 HAVE_XAW3D=no
4092 USE_TOOLKIT_SCROLL_BARS=yes
4093 elif test "${HAVE_XAW3D}" = "yes"; then
4094 cat >> confdefs.h <<\EOF
4095#define USE_TOOLKIT_SCROLL_BARS 1
4096EOF
4097
4098 USE_TOOLKIT_SCROLL_BARS=yes
4099 fi
4100 fi
4101fi
4102
4103### Use -lXpm if available, unless `--with-xpm=no'.
4104HAVE_XPM=no
4105if test "${HAVE_X11}" = "yes"; then
4106 if test "${with_xpm}" != "no"; then
4107 old_c_flags="${CFLAGS}"
4108 CFLAGS="${LD_SWITCH_X_SITE}"
4109 ac_safe=`echo "X11/xpm.h" | sed 'y%./+-%__p_%'`
4110echo $ac_n "checking for X11/xpm.h""... $ac_c" 1>&6
243cf185 4111echo "configure:4112: checking for X11/xpm.h" >&5
ba4481b5
DL
4112if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4113 echo $ac_n "(cached) $ac_c" 1>&6
4114else
4115 cat > conftest.$ac_ext <<EOF
243cf185 4116#line 4117 "configure"
ba4481b5
DL
4117#include "confdefs.h"
4118#include <X11/xpm.h>
4119EOF
4120ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
243cf185 4121{ (eval echo configure:4122: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ba4481b5
DL
4122ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4123if test -z "$ac_err"; then
4124 rm -rf conftest*
4125 eval "ac_cv_header_$ac_safe=yes"
4126else
4127 echo "$ac_err" >&5
4128 echo "configure: failed program was:" >&5
4129 cat conftest.$ac_ext >&5
4130 rm -rf conftest*
4131 eval "ac_cv_header_$ac_safe=no"
4132fi
4133rm -f conftest*
4134fi
4135if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4136 echo "$ac_t""yes" 1>&6
4137 echo $ac_n "checking for XpmReadFileToPixmap in -lXpm""... $ac_c" 1>&6
243cf185 4138echo "configure:4139: checking for XpmReadFileToPixmap in -lXpm" >&5
ba4481b5
DL
4139ac_lib_var=`echo Xpm'_'XpmReadFileToPixmap | sed 'y%./+-%__p_%'`
4140if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4141 echo $ac_n "(cached) $ac_c" 1>&6
4142else
4143 ac_save_LIBS="$LIBS"
4144LIBS="-lXpm -lX11 $LIBS"
4145cat > conftest.$ac_ext <<EOF
243cf185 4146#line 4147 "configure"
ba4481b5
DL
4147#include "confdefs.h"
4148/* Override any gcc2 internal prototype to avoid an error. */
4149/* We use char because int might match the return type of a gcc2
4150 builtin and then its argument prototype would still apply. */
4151char XpmReadFileToPixmap();
4152
4153int main() {
4154XpmReadFileToPixmap()
4155; return 0; }
4156EOF
243cf185 4157if { (eval echo configure:4158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ba4481b5
DL
4158 rm -rf conftest*
4159 eval "ac_cv_lib_$ac_lib_var=yes"
4160else
4161 echo "configure: failed program was:" >&5
4162 cat conftest.$ac_ext >&5
4163 rm -rf conftest*
4164 eval "ac_cv_lib_$ac_lib_var=no"
4165fi
4166rm -f conftest*
4167LIBS="$ac_save_LIBS"
4168
4169fi
4170if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4171 echo "$ac_t""yes" 1>&6
4172 HAVE_XPM=yes
4173else
4174 echo "$ac_t""no" 1>&6
4175fi
4176
4177else
4178 echo "$ac_t""no" 1>&6
4179fi
4180
4181 CFLAGS="${old_c_flags}"
4182 fi
4183
4184 if test "${HAVE_XPM}" = "yes"; then
4185 cat >> confdefs.h <<\EOF
4186#define HAVE_XPM 1
4187EOF
4188
4189 fi
4190fi
4191
4192### Use -ljpeg if available, unless `--with-jpeg=no'.
4193HAVE_JPEG=no
4194if test "${HAVE_X11}" = "yes"; then
4195 if test "${with_jpeg}" != "no"; then
4196 old_c_flags="${CFLAGS}"
4197 CFLAGS="${LD_SWITCH_X_SITE} ${CFLAGS}"
4198 echo $ac_n "checking for jpeg_destroy_compress in -ljpeg""... $ac_c" 1>&6
243cf185 4199echo "configure:4200: checking for jpeg_destroy_compress in -ljpeg" >&5
ba4481b5
DL
4200ac_lib_var=`echo jpeg'_'jpeg_destroy_compress | sed 'y%./+-%__p_%'`
4201if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4202 echo $ac_n "(cached) $ac_c" 1>&6
4203else
4204 ac_save_LIBS="$LIBS"
4205LIBS="-ljpeg -lX11 $LIBS"
4206cat > conftest.$ac_ext <<EOF
243cf185 4207#line 4208 "configure"
ba4481b5
DL
4208#include "confdefs.h"
4209/* Override any gcc2 internal prototype to avoid an error. */
4210/* We use char because int might match the return type of a gcc2
4211 builtin and then its argument prototype would still apply. */
4212char jpeg_destroy_compress();
4213
4214int main() {
4215jpeg_destroy_compress()
4216; return 0; }
4217EOF
243cf185 4218if { (eval echo configure:4219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ba4481b5
DL
4219 rm -rf conftest*
4220 eval "ac_cv_lib_$ac_lib_var=yes"
4221else
4222 echo "configure: failed program was:" >&5
4223 cat conftest.$ac_ext >&5
4224 rm -rf conftest*
4225 eval "ac_cv_lib_$ac_lib_var=no"
4226fi
4227rm -f conftest*
4228LIBS="$ac_save_LIBS"
4229
4230fi
4231if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4232 echo "$ac_t""yes" 1>&6
4233 HAVE_JPEG=yes
4234else
4235 echo "$ac_t""no" 1>&6
4236fi
4237
4238 CFLAGS="${old_c_flags}"
4239 fi
4240
4241 if test "${HAVE_JPEG}" = "yes"; then
4242 cat >> confdefs.h <<\EOF
4243#define HAVE_JPEG 1
4244EOF
4245
4246 fi
4247fi
4248
4249### Use -lpng if available, unless `--with-png=no'.
4250HAVE_PNG=no
4251if test "${HAVE_X11}" = "yes"; then
4252 if test "${with_png}" != "no"; then
4253 old_c_flags="${CFLAGS}"
4254 CFLAGS="${LD_SWITCH_X_SITE} ${CFLAGS}"
4255 ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'`
4256echo $ac_n "checking for png.h""... $ac_c" 1>&6
243cf185 4257echo "configure:4258: checking for png.h" >&5
ba4481b5
DL
4258if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4259 echo $ac_n "(cached) $ac_c" 1>&6
4260else
4261 cat > conftest.$ac_ext <<EOF
243cf185 4262#line 4263 "configure"
ba4481b5
DL
4263#include "confdefs.h"
4264#include <png.h>
4265EOF
4266ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
243cf185 4267{ (eval echo configure:4268: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ba4481b5
DL
4268ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4269if test -z "$ac_err"; then
4270 rm -rf conftest*
4271 eval "ac_cv_header_$ac_safe=yes"
4272else
4273 echo "$ac_err" >&5
4274 echo "configure: failed program was:" >&5
4275 cat conftest.$ac_ext >&5
4276 rm -rf conftest*
4277 eval "ac_cv_header_$ac_safe=no"
4278fi
4279rm -f conftest*
4280fi
4281if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4282 echo "$ac_t""yes" 1>&6
4283 echo $ac_n "checking for png_set_expand in -lpng""... $ac_c" 1>&6
243cf185 4284echo "configure:4285: checking for png_set_expand in -lpng" >&5
ba4481b5
DL
4285ac_lib_var=`echo png'_'png_set_expand | sed 'y%./+-%__p_%'`
4286if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4287 echo $ac_n "(cached) $ac_c" 1>&6
4288else
4289 ac_save_LIBS="$LIBS"
4290LIBS="-lpng -lX11 -lz -lm $LIBS"
4291cat > conftest.$ac_ext <<EOF
243cf185 4292#line 4293 "configure"
ba4481b5
DL
4293#include "confdefs.h"
4294/* Override any gcc2 internal prototype to avoid an error. */
4295/* We use char because int might match the return type of a gcc2
4296 builtin and then its argument prototype would still apply. */
4297char png_set_expand();
4298
4299int main() {
4300png_set_expand()
4301; return 0; }
4302EOF
243cf185 4303if { (eval echo configure:4304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ba4481b5
DL
4304 rm -rf conftest*
4305 eval "ac_cv_lib_$ac_lib_var=yes"
4306else
4307 echo "configure: failed program was:" >&5
4308 cat conftest.$ac_ext >&5
4309 rm -rf conftest*
4310 eval "ac_cv_lib_$ac_lib_var=no"
4311fi
4312rm -f conftest*
4313LIBS="$ac_save_LIBS"
4314
4315fi
4316if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4317 echo "$ac_t""yes" 1>&6
4318 HAVE_PNG=yes
4319else
4320 echo "$ac_t""no" 1>&6
4321fi
4322
4323else
4324 echo "$ac_t""no" 1>&6
4325fi
4326
4327 CFLAGS="${old_c_flags}"
4328 fi
4329
4330 if test "${HAVE_PNG}" = "yes"; then
4331 cat >> confdefs.h <<\EOF
4332#define HAVE_PNG 1
4333EOF
4334
4335 fi
4336fi
4337
4338### Use -ltiff if available, unless `--with-tiff=no'.
4339HAVE_TIFF=no
4340if test "${HAVE_X11}" = "yes"; then
4341 if test "${with_tiff}" != "no"; then
4342 old_c_flags="${CFLAGS}"
4343 CFLAGS="${LD_SWITCH_X_SITE} ${CFLAGS}"
4344 ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'`
4345echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6
243cf185 4346echo "configure:4347: checking for tiffio.h" >&5
ba4481b5
DL
4347if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4348 echo $ac_n "(cached) $ac_c" 1>&6
4349else
4350 cat > conftest.$ac_ext <<EOF
243cf185 4351#line 4352 "configure"
ba4481b5
DL
4352#include "confdefs.h"
4353#include <tiffio.h>
4354EOF
4355ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
243cf185 4356{ (eval echo configure:4357: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ba4481b5
DL
4357ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4358if test -z "$ac_err"; then
4359 rm -rf conftest*
4360 eval "ac_cv_header_$ac_safe=yes"
4361else
4362 echo "$ac_err" >&5
4363 echo "configure: failed program was:" >&5
4364 cat conftest.$ac_ext >&5
4365 rm -rf conftest*
4366 eval "ac_cv_header_$ac_safe=no"
4367fi
4368rm -f conftest*
4369fi
4370if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4371 echo "$ac_t""yes" 1>&6
4372 echo $ac_n "checking for TIFFGetVersion in -ltiff""... $ac_c" 1>&6
243cf185 4373echo "configure:4374: checking for TIFFGetVersion in -ltiff" >&5
ba4481b5
DL
4374ac_lib_var=`echo tiff'_'TIFFGetVersion | sed 'y%./+-%__p_%'`
4375if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4376 echo $ac_n "(cached) $ac_c" 1>&6
4377else
4378 ac_save_LIBS="$LIBS"
4379LIBS="-ltiff -lX11 -lm $LIBS"
4380cat > conftest.$ac_ext <<EOF
243cf185 4381#line 4382 "configure"
ba4481b5
DL
4382#include "confdefs.h"
4383/* Override any gcc2 internal prototype to avoid an error. */
4384/* We use char because int might match the return type of a gcc2
4385 builtin and then its argument prototype would still apply. */
4386char TIFFGetVersion();
4387
4388int main() {
4389TIFFGetVersion()
4390; return 0; }
4391EOF
243cf185 4392if { (eval echo configure:4393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ba4481b5
DL
4393 rm -rf conftest*
4394 eval "ac_cv_lib_$ac_lib_var=yes"
4395else
4396 echo "configure: failed program was:" >&5
4397 cat conftest.$ac_ext >&5
4398 rm -rf conftest*
4399 eval "ac_cv_lib_$ac_lib_var=no"
4400fi
4401rm -f conftest*
4402LIBS="$ac_save_LIBS"
4403
4404fi
4405if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4406 echo "$ac_t""yes" 1>&6
4407 HAVE_TIFF=yes
4408else
4409 echo "$ac_t""no" 1>&6
4410fi
4411
4412else
4413 echo "$ac_t""no" 1>&6
4414fi
4415
4416 CFLAGS="${old_c_flags}"
4417 fi
4418
4419 if test "${HAVE_TIFF}" = "yes"; then
4420 cat >> confdefs.h <<\EOF
4421#define HAVE_TIFF 1
4422EOF
4423
4424 fi
4425fi
4426
4427### Use -lgif if available, unless `--with-gif=no'.
4428HAVE_GIF=no
4429if test "${HAVE_X11}" = "yes"; then
4430 if test "${with_gif}" != "no"; then
4431 old_c_flags="${CFLAGS}"
4432 CFLAGS="${LD_SWITCH_X_SITE} ${CFLAGS}"
4433 ac_safe=`echo "gif_lib.h" | sed 'y%./+-%__p_%'`
4434echo $ac_n "checking for gif_lib.h""... $ac_c" 1>&6
243cf185 4435echo "configure:4436: checking for gif_lib.h" >&5
ba4481b5
DL
4436if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4437 echo $ac_n "(cached) $ac_c" 1>&6
4438else
4439 cat > conftest.$ac_ext <<EOF
243cf185 4440#line 4441 "configure"
ba4481b5
DL
4441#include "confdefs.h"
4442#include <gif_lib.h>
4443EOF
4444ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
243cf185 4445{ (eval echo configure:4446: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ba4481b5
DL
4446ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4447if test -z "$ac_err"; then
4448 rm -rf conftest*
4449 eval "ac_cv_header_$ac_safe=yes"
4450else
4451 echo "$ac_err" >&5
4452 echo "configure: failed program was:" >&5
4453 cat conftest.$ac_ext >&5
4454 rm -rf conftest*
4455 eval "ac_cv_header_$ac_safe=no"
4456fi
4457rm -f conftest*
4458fi
4459if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4460 echo "$ac_t""yes" 1>&6
4461 echo $ac_n "checking for DGifOpenFileName in -lungif""... $ac_c" 1>&6
243cf185 4462echo "configure:4463: checking for DGifOpenFileName in -lungif" >&5
ba4481b5
DL
4463ac_lib_var=`echo ungif'_'DGifOpenFileName | sed 'y%./+-%__p_%'`
4464if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4465 echo $ac_n "(cached) $ac_c" 1>&6
4466else
4467 ac_save_LIBS="$LIBS"
4468LIBS="-lungif -lX11 $LIBS"
4469cat > conftest.$ac_ext <<EOF
243cf185 4470#line 4471 "configure"
ba4481b5
DL
4471#include "confdefs.h"
4472/* Override any gcc2 internal prototype to avoid an error. */
4473/* We use char because int might match the return type of a gcc2
4474 builtin and then its argument prototype would still apply. */
4475char DGifOpenFileName();
4476
4477int main() {
4478DGifOpenFileName()
4479; return 0; }
4480EOF
243cf185 4481if { (eval echo configure:4482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ba4481b5
DL
4482 rm -rf conftest*
4483 eval "ac_cv_lib_$ac_lib_var=yes"
4484else
4485 echo "configure: failed program was:" >&5
4486 cat conftest.$ac_ext >&5
4487 rm -rf conftest*
4488 eval "ac_cv_lib_$ac_lib_var=no"
4489fi
4490rm -f conftest*
4491LIBS="$ac_save_LIBS"
4492
4493fi
4494if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4495 echo "$ac_t""yes" 1>&6
4496 HAVE_GIF=yes
4497else
4498 echo "$ac_t""no" 1>&6
4499fi
4500
4501else
4502 echo "$ac_t""no" 1>&6
4503fi
4504
4505 CFLAGS="${old_c_flags}"
4506 fi
4507
4508 if test "${HAVE_GIF}" = "yes"; then
4509 cat >> confdefs.h <<\EOF
4510#define HAVE_GIF 1
4511EOF
4512
4513 fi
4514fi
4515
4516# If netdb.h doesn't declare h_errno, we must declare it by hand.
4517echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
243cf185 4518echo "configure:4519: checking whether netdb declares h_errno" >&5
ba4481b5
DL
4519if eval "test \"`echo '$''{'emacs_cv_netdb_declares_h_errno'+set}'`\" = set"; then
4520 echo $ac_n "(cached) $ac_c" 1>&6
4521else
4522 cat > conftest.$ac_ext <<EOF
243cf185 4523#line 4524 "configure"
ba4481b5
DL
4524#include "confdefs.h"
4525#include <netdb.h>
4526int main() {
4527return h_errno;
4528; return 0; }
4529EOF
243cf185 4530if { (eval echo configure:4531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ba4481b5
DL
4531 rm -rf conftest*
4532 emacs_cv_netdb_declares_h_errno=yes
4533else
4534 echo "configure: failed program was:" >&5
4535 cat conftest.$ac_ext >&5
4536 rm -rf conftest*
4537 emacs_cv_netdb_declares_h_errno=no
4538fi
4539rm -f conftest*
4540fi
4541
4542echo "$ac_t""$emacs_cv_netdb_declares_h_errno" 1>&6
4543if test $emacs_cv_netdb_declares_h_errno = yes; then
4544 cat >> confdefs.h <<\EOF
4545#define HAVE_H_ERRNO 1
4546EOF
4547
4548fi
4549
4550# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
4551# for constant arguments. Useless!
4552echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
243cf185 4553echo "configure:4554: checking for working alloca.h" >&5
ba4481b5
DL
4554if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
4555 echo $ac_n "(cached) $ac_c" 1>&6
4556else
4557 cat > conftest.$ac_ext <<EOF
243cf185 4558#line 4559 "configure"
ba4481b5
DL
4559#include "confdefs.h"
4560#include <alloca.h>
4561int main() {
4562char *p = alloca(2 * sizeof(int));
4563; return 0; }
4564EOF
243cf185 4565if { (eval echo configure:4566: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ba4481b5
DL
4566 rm -rf conftest*
4567 ac_cv_header_alloca_h=yes
4568else
4569 echo "configure: failed program was:" >&5
4570 cat conftest.$ac_ext >&5
4571 rm -rf conftest*
4572 ac_cv_header_alloca_h=no
4573fi
4574rm -f conftest*
4575fi
4576
4577echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
4578if test $ac_cv_header_alloca_h = yes; then
4579 cat >> confdefs.h <<\EOF
4580#define HAVE_ALLOCA_H 1
4581EOF
4582
4583fi
4584
4585echo $ac_n "checking for alloca""... $ac_c" 1>&6
243cf185 4586echo "configure:4587: checking for alloca" >&5
ba4481b5
DL
4587if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
4588 echo $ac_n "(cached) $ac_c" 1>&6
4589else
4590 cat > conftest.$ac_ext <<EOF
243cf185 4591#line 4592 "configure"
ba4481b5
DL
4592#include "confdefs.h"
4593
4594#ifdef __GNUC__
4595# define alloca __builtin_alloca
4596#else
4597# ifdef _MSC_VER
4598# include <malloc.h>
4599# define alloca _alloca
4600# else
4601# if HAVE_ALLOCA_H
4602# include <alloca.h>
4603# else
4604# ifdef _AIX
4605 #pragma alloca
4606# else
4607# ifndef alloca /* predefined by HP cc +Olibcalls */
4608char *alloca ();
4609# endif
4610# endif
4611# endif
4612# endif
4613#endif
4614
4615int main() {
4616char *p = (char *) alloca(1);
4617; return 0; }
4618EOF
243cf185 4619if { (eval echo configure:4620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ba4481b5
DL
4620 rm -rf conftest*
4621 ac_cv_func_alloca_works=yes
4622else
4623 echo "configure: failed program was:" >&5
4624 cat conftest.$ac_ext >&5
4625 rm -rf conftest*
4626 ac_cv_func_alloca_works=no
4627fi
4628rm -f conftest*
4629fi
4630
4631echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
4632if test $ac_cv_func_alloca_works = yes; then
4633 cat >> confdefs.h <<\EOF
4634#define HAVE_ALLOCA 1
4635EOF
4636
4637fi
4638
4639if test $ac_cv_func_alloca_works = no; then
4640 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
4641 # that cause trouble. Some versions do not even contain alloca or
4642 # contain a buggy version. If you still want to use their alloca,
4643 # use ar to extract alloca.o from them instead of compiling alloca.c.
4644 ALLOCA=alloca.${ac_objext}
4645 cat >> confdefs.h <<\EOF
4646#define C_ALLOCA 1
4647EOF
4648
4649
4650echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
243cf185 4651echo "configure:4652: checking whether alloca needs Cray hooks" >&5
ba4481b5
DL
4652if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
4653 echo $ac_n "(cached) $ac_c" 1>&6
4654else
4655 cat > conftest.$ac_ext <<EOF
243cf185 4656#line 4657 "configure"
ba4481b5
DL
4657#include "confdefs.h"
4658#if defined(CRAY) && ! defined(CRAY2)
4659webecray
4660#else
4661wenotbecray
4662#endif
4663
4664EOF
4665if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4666 egrep "webecray" >/dev/null 2>&1; then
4667 rm -rf conftest*
4668 ac_cv_os_cray=yes
4669else
4670 rm -rf conftest*
4671 ac_cv_os_cray=no
4672fi
4673rm -f conftest*
4674
4675fi
4676
4677echo "$ac_t""$ac_cv_os_cray" 1>&6
4678if test $ac_cv_os_cray = yes; then
4679for ac_func in _getb67 GETB67 getb67; do
4680 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
243cf185 4681echo "configure:4682: checking for $ac_func" >&5
ba4481b5
DL
4682if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4683 echo $ac_n "(cached) $ac_c" 1>&6
4684else
4685 cat > conftest.$ac_ext <<EOF
243cf185 4686#line 4687 "configure"
ba4481b5
DL
4687#include "confdefs.h"
4688/* System header to define __stub macros and hopefully few prototypes,
4689 which can conflict with char $ac_func(); below. */
4690#include <assert.h>
4691/* Override any gcc2 internal prototype to avoid an error. */
4692/* We use char because int might match the return type of a gcc2
4693 builtin and then its argument prototype would still apply. */
4694char $ac_func();
4695
4696int main() {
4697
4698/* The GNU C library defines this for functions which it implements
4699 to always fail with ENOSYS. Some functions are actually named
4700 something starting with __ and the normal name is an alias. */
4701#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4702choke me
4703#else
4704$ac_func();
4705#endif
4706
4707; return 0; }
4708EOF
243cf185 4709if { (eval echo configure:4710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ba4481b5
DL
4710 rm -rf conftest*
4711 eval "ac_cv_func_$ac_func=yes"
4712else
4713 echo "configure: failed program was:" >&5
4714 cat conftest.$ac_ext >&5
4715 rm -rf conftest*
4716 eval "ac_cv_func_$ac_func=no"
4717fi
4718rm -f conftest*
4719fi
4720
4721if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4722 echo "$ac_t""yes" 1>&6
4723 cat >> confdefs.h <<EOF
4724#define CRAY_STACKSEG_END $ac_func
4725EOF
4726
4727 break
4728else
4729 echo "$ac_t""no" 1>&6
4730fi
4731
4732done
4733fi
4734
4735echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
243cf185 4736echo "configure:4737: checking stack direction for C alloca" >&5
ba4481b5
DL
4737if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
4738 echo $ac_n "(cached) $ac_c" 1>&6
4739else
4740 if test "$cross_compiling" = yes; then
4741 ac_cv_c_stack_direction=0
4742else
4743 cat > conftest.$ac_ext <<EOF
243cf185 4744#line 4745 "configure"
ba4481b5
DL
4745#include "confdefs.h"
4746find_stack_direction ()
4747{
4748 static char *addr = 0;
4749 auto char dummy;
4750 if (addr == 0)
4751 {
4752 addr = &dummy;
4753 return find_stack_direction ();
4754 }
4755 else
4756 return (&dummy > addr) ? 1 : -1;
4757}
4758main ()
4759{
4760 exit (find_stack_direction() < 0);
4761}
4762EOF
243cf185 4763if { (eval echo configure:4764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
ba4481b5
DL
4764then
4765 ac_cv_c_stack_direction=1
4766else
4767 echo "configure: failed program was:" >&5
4768 cat conftest.$ac_ext >&5
4769 rm -fr conftest*
4770 ac_cv_c_stack_direction=-1
4771fi
4772rm -fr conftest*
4773fi
4774
4775fi
4776
4777echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
4778cat >> confdefs.h <<EOF
4779#define STACK_DIRECTION $ac_cv_c_stack_direction
4780EOF
4781
4782fi
4783
4784
4785# fmod, logb, and frexp are found in -lm on most systems.
4786# On HPUX 9.01, -lm does not contain logb, so check for sqrt.
4787echo $ac_n "checking for sqrt in -lm""... $ac_c" 1>&6
243cf185 4788echo "configure:4789: checking for sqrt in -lm" >&5
ba4481b5
DL
4789ac_lib_var=`echo m'_'sqrt | sed 'y%./+-%__p_%'`
4790if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4791 echo $ac_n "(cached) $ac_c" 1>&6
4792else
4793 ac_save_LIBS="$LIBS"
4794LIBS="-lm $LIBS"
4795cat > conftest.$ac_ext <<EOF
243cf185 4796#line 4797 "configure"
ba4481b5
DL
4797#include "confdefs.h"
4798/* Override any gcc2 internal prototype to avoid an error. */
4799/* We use char because int might match the return type of a gcc2
4800 builtin and then its argument prototype would still apply. */
4801char sqrt();
4802
4803int main() {
4804sqrt()
4805; return 0; }
4806EOF
243cf185 4807if { (eval echo configure:4808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ba4481b5
DL
4808 rm -rf conftest*
4809 eval "ac_cv_lib_$ac_lib_var=yes"
4810else
4811 echo "configure: failed program was:" >&5
4812 cat conftest.$ac_ext >&5
4813 rm -rf conftest*
4814 eval "ac_cv_lib_$ac_lib_var=no"
4815fi
4816rm -f conftest*
4817LIBS="$ac_save_LIBS"
4818
4819fi
4820if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4821 echo "$ac_t""yes" 1>&6
4822 ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4823 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4824 cat >> confdefs.h <<EOF
4825#define $ac_tr_lib 1
4826EOF
4827
4828 LIBS="-lm $LIBS"
4829
4830else
4831 echo "$ac_t""no" 1>&6
4832fi
4833
4834
4835# Check for mail-locking functions in a "mail" library
4836echo $ac_n "checking for maillock in -lmail""... $ac_c" 1>&6
243cf185 4837echo "configure:4838: checking for maillock in -lmail" >&5
ba4481b5
DL
4838ac_lib_var=`echo mail'_'maillock | sed 'y%./+-%__p_%'`
4839if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4840 echo $ac_n "(cached) $ac_c" 1>&6
4841else
4842 ac_save_LIBS="$LIBS"
4843LIBS="-lmail $LIBS"
4844cat > conftest.$ac_ext <<EOF
243cf185 4845#line 4846 "configure"
ba4481b5
DL
4846#include "confdefs.h"
4847/* Override any gcc2 internal prototype to avoid an error. */
4848/* We use char because int might match the return type of a gcc2
4849 builtin and then its argument prototype would still apply. */
4850char maillock();
4851
4852int main() {
4853maillock()
4854; return 0; }
4855EOF
243cf185 4856if { (eval echo configure:4857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ba4481b5
DL
4857 rm -rf conftest*
4858 eval "ac_cv_lib_$ac_lib_var=yes"
4859else
4860 echo "configure: failed program was:" >&5
4861 cat conftest.$ac_ext >&5
4862 rm -rf conftest*
4863 eval "ac_cv_lib_$ac_lib_var=no"
4864fi
4865rm -f conftest*
4866LIBS="$ac_save_LIBS"
4867
4868fi
4869if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4870 echo "$ac_t""yes" 1>&6
4871 ac_tr_lib=HAVE_LIB`echo mail | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4872 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4873 cat >> confdefs.h <<EOF
4874#define $ac_tr_lib 1
4875EOF
4876
4877 LIBS="-lmail $LIBS"
4878
4879else
4880 echo "$ac_t""no" 1>&6
4881fi
4882
4883echo $ac_n "checking for maillock in -llockfile""... $ac_c" 1>&6
243cf185 4884echo "configure:4885: checking for maillock in -llockfile" >&5
ba4481b5
DL
4885ac_lib_var=`echo lockfile'_'maillock | sed 'y%./+-%__p_%'`
4886if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4887 echo $ac_n "(cached) $ac_c" 1>&6
4888else
4889 ac_save_LIBS="$LIBS"
4890LIBS="-llockfile $LIBS"
4891cat > conftest.$ac_ext <<EOF
243cf185 4892#line 4893 "configure"
ba4481b5
DL
4893#include "confdefs.h"
4894/* Override any gcc2 internal prototype to avoid an error. */
4895/* We use char because int might match the return type of a gcc2
4896 builtin and then its argument prototype would still apply. */
4897char maillock();
4898
4899int main() {
4900maillock()
4901; return 0; }
4902EOF
243cf185 4903if { (eval echo configure:4904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ba4481b5
DL
4904 rm -rf conftest*
4905 eval "ac_cv_lib_$ac_lib_var=yes"
4906else
4907 echo "configure: failed program was:" >&5
4908 cat conftest.$ac_ext >&5
4909 rm -rf conftest*
4910 eval "ac_cv_lib_$ac_lib_var=no"
4911fi
4912rm -f conftest*
4913LIBS="$ac_save_LIBS"
4914
4915fi
4916if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4917 echo "$ac_t""yes" 1>&6
4918 ac_tr_lib=HAVE_LIB`echo lockfile | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4919 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4920 cat >> confdefs.h <<EOF
4921#define $ac_tr_lib 1
4922EOF
4923
4924 LIBS="-llockfile $LIBS"
4925
4926else
4927 echo "$ac_t""no" 1>&6
4928fi
4929
4930# If we have the shared liblockfile, assume we must use it for mail
4931# locking (e.g. Debian). If we couldn't link against liblockfile
4932# (no liblockfile.a installed), ensure that we don't need to.
4933if test "$ac_cv_lib_lockfile_maillock" = no; then
4934 # Extract the first word of "liblockfile.so", so it can be a program name with args.
4935set dummy liblockfile.so; ac_word=$2
4936echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
243cf185 4937echo "configure:4938: checking for $ac_word" >&5
ba4481b5
DL
4938if eval "test \"`echo '$''{'ac_cv_prog_liblockfile'+set}'`\" = set"; then
4939 echo $ac_n "(cached) $ac_c" 1>&6
4940else
4941 if test -n "$liblockfile"; then
4942 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
4943else
4944 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4945 ac_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
4946 for ac_dir in $ac_dummy; do
4947 test -z "$ac_dir" && ac_dir=.
4948 if test -f $ac_dir/$ac_word; then
4949 ac_cv_prog_liblockfile="yes"
4950 break
4951 fi
4952 done
4953 IFS="$ac_save_ifs"
4954 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
4955fi
4956fi
4957liblockfile="$ac_cv_prog_liblockfile"
4958if test -n "$liblockfile"; then
4959 echo "$ac_t""$liblockfile" 1>&6
4960else
4961 echo "$ac_t""no" 1>&6
4962fi
4963
4964 if test $ac_cv_prog_liblockfile = yes; then
4965 { echo "configure: error: Shared liblockfile found but can't link against it.
4966This probably means that movemail could lose mail.
4967There may be a \`development' package to install containing liblockfile." 1>&2; exit 1; }
4968 else cat >> confdefs.h <<\EOF
4969#define LIBMAIL -llockfile
4970EOF
4971
4972 fi
4973 else :
4974fi
4975for ac_func in touchlock
4976do
4977echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
243cf185 4978echo "configure:4979: checking for $ac_func" >&5
ba4481b5
DL
4979if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4980 echo $ac_n "(cached) $ac_c" 1>&6
4981else
4982 cat > conftest.$ac_ext <<EOF
243cf185 4983#line 4984 "configure"
ba4481b5
DL
4984#include "confdefs.h"
4985/* System header to define __stub macros and hopefully few prototypes,
4986 which can conflict with char $ac_func(); below. */
4987#include <assert.h>
4988/* Override any gcc2 internal prototype to avoid an error. */
4989/* We use char because int might match the return type of a gcc2
4990 builtin and then its argument prototype would still apply. */
4991char $ac_func();
4992
4993int main() {
4994
4995/* The GNU C library defines this for functions which it implements
4996 to always fail with ENOSYS. Some functions are actually named
4997 something starting with __ and the normal name is an alias. */
4998#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4999choke me
5000#else
5001$ac_func();
5002#endif
5003
5004; return 0; }
5005EOF
243cf185 5006if { (eval echo configure:5007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ba4481b5
DL
5007 rm -rf conftest*
5008 eval "ac_cv_func_$ac_func=yes"
5009else
5010 echo "configure: failed program was:" >&5
5011 cat conftest.$ac_ext >&5
5012 rm -rf conftest*
5013 eval "ac_cv_func_$ac_func=no"
5014fi
5015rm -f conftest*
5016fi
5017
5018if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5019 echo "$ac_t""yes" 1>&6
5020 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5021 cat >> confdefs.h <<EOF
5022#define $ac_tr_func 1
5023EOF
5024
5025else
5026 echo "$ac_t""no" 1>&6
5027fi
5028done
5029
5030for ac_hdr in maillock.h
5031do
5032ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5033echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
243cf185 5034echo "configure:5035: checking for $ac_hdr" >&5
ba4481b5
DL
5035if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5036 echo $ac_n "(cached) $ac_c" 1>&6
5037else
5038 cat > conftest.$ac_ext <<EOF
243cf185 5039#line 5040 "configure"
ba4481b5
DL
5040#include "confdefs.h"
5041#include <$ac_hdr>
5042EOF
5043ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
243cf185 5044{ (eval echo configure:5045: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ba4481b5
DL
5045ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5046if test -z "$ac_err"; then
5047 rm -rf conftest*
5048 eval "ac_cv_header_$ac_safe=yes"
5049else
5050 echo "$ac_err" >&5
5051 echo "configure: failed program was:" >&5
5052 cat conftest.$ac_ext >&5
5053 rm -rf conftest*
5054 eval "ac_cv_header_$ac_safe=no"
5055fi
5056rm -f conftest*
5057fi
5058if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5059 echo "$ac_t""yes" 1>&6
5060 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5061 cat >> confdefs.h <<EOF
5062#define $ac_tr_hdr 1
5063EOF
5064
5065else
5066 echo "$ac_t""no" 1>&6
5067fi
5068done
5069
5070
5071for ac_func in gettimeofday gethostname getdomainname dup2 \
5072rename closedir mkdir rmdir sysinfo \
5073random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime res_init setsid \
5074strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \
5075utimes setrlimit setpgid getcwd shutdown strftime getaddrinfo
5076do
5077echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
243cf185 5078echo "configure:5079: checking for $ac_func" >&5
ba4481b5
DL
5079if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5080 echo $ac_n "(cached) $ac_c" 1>&6
5081else
5082 cat > conftest.$ac_ext <<EOF
243cf185 5083#line 5084 "configure"
ba4481b5
DL
5084#include "confdefs.h"
5085/* System header to define __stub macros and hopefully few prototypes,
5086 which can conflict with char $ac_func(); below. */
5087#include <assert.h>
5088/* Override any gcc2 internal prototype to avoid an error. */
5089/* We use char because int might match the return type of a gcc2
5090 builtin and then its argument prototype would still apply. */
5091char $ac_func();
5092
5093int main() {
5094
5095/* The GNU C library defines this for functions which it implements
5096 to always fail with ENOSYS. Some functions are actually named
5097 something starting with __ and the normal name is an alias. */
5098#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5099choke me
5100#else
5101$ac_func();
5102#endif
5103
5104; return 0; }
5105EOF
243cf185 5106if { (eval echo configure:5107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ba4481b5
DL
5107 rm -rf conftest*
5108 eval "ac_cv_func_$ac_func=yes"
5109else
5110 echo "configure: failed program was:" >&5
5111 cat conftest.$ac_ext >&5
5112 rm -rf conftest*
5113 eval "ac_cv_func_$ac_func=no"
5114fi
5115rm -f conftest*
5116fi
5117
5118if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5119 echo "$ac_t""yes" 1>&6
5120 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5121 cat >> confdefs.h <<EOF
5122#define $ac_tr_func 1
5123EOF
5124
5125else
5126 echo "$ac_t""no" 1>&6
5127fi
5128done
5129
5130
5131# Check this now, so that we will NOT find the above functions in ncurses.
5132# That is because we have not set up to link ncurses in lib-src.
5133# It's better to believe a function is not available
5134# than to expect to find it in ncurses.
5135echo $ac_n "checking for tparm in -lncurses""... $ac_c" 1>&6
243cf185 5136echo "configure:5137: checking for tparm in -lncurses" >&5
ba4481b5
DL
5137ac_lib_var=`echo ncurses'_'tparm | sed 'y%./+-%__p_%'`
5138if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5139 echo $ac_n "(cached) $ac_c" 1>&6
5140else
5141 ac_save_LIBS="$LIBS"
5142LIBS="-lncurses $LIBS"
5143cat > conftest.$ac_ext <<EOF
243cf185 5144#line 5145 "configure"
ba4481b5
DL
5145#include "confdefs.h"
5146/* Override any gcc2 internal prototype to avoid an error. */
5147/* We use char because int might match the return type of a gcc2
5148 builtin and then its argument prototype would still apply. */
5149char tparm();
5150
5151int main() {
5152tparm()
5153; return 0; }
5154EOF
243cf185 5155if { (eval echo configure:5156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ba4481b5
DL
5156 rm -rf conftest*
5157 eval "ac_cv_lib_$ac_lib_var=yes"
5158else
5159 echo "configure: failed program was:" >&5
5160 cat conftest.$ac_ext >&5
5161 rm -rf conftest*
5162 eval "ac_cv_lib_$ac_lib_var=no"
5163fi
5164rm -f conftest*
5165LIBS="$ac_save_LIBS"
5166
5167fi
5168if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5169 echo "$ac_t""yes" 1>&6
5170 ac_tr_lib=HAVE_LIB`echo ncurses | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5171 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5172 cat >> confdefs.h <<EOF
5173#define $ac_tr_lib 1
5174EOF
5175
5176 LIBS="-lncurses $LIBS"
5177
5178else
5179 echo "$ac_t""no" 1>&6
5180fi
5181
5182
5183# Solaris requires -lintl if you want strerror (which calls dgettext)
5184# to return localized messages.
5185echo $ac_n "checking for dgettext in -lintl""... $ac_c" 1>&6
243cf185 5186echo "configure:5187: checking for dgettext in -lintl" >&5
ba4481b5
DL
5187ac_lib_var=`echo intl'_'dgettext | sed 'y%./+-%__p_%'`
5188if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5189 echo $ac_n "(cached) $ac_c" 1>&6
5190else
5191 ac_save_LIBS="$LIBS"
5192LIBS="-lintl $LIBS"
5193cat > conftest.$ac_ext <<EOF
243cf185 5194#line 5195 "configure"
ba4481b5
DL
5195#include "confdefs.h"
5196/* Override any gcc2 internal prototype to avoid an error. */
5197/* We use char because int might match the return type of a gcc2
5198 builtin and then its argument prototype would still apply. */
5199char dgettext();
5200
5201int main() {
5202dgettext()
5203; return 0; }
5204EOF
243cf185 5205if { (eval echo configure:5206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ba4481b5
DL
5206 rm -rf conftest*
5207 eval "ac_cv_lib_$ac_lib_var=yes"
5208else
5209 echo "configure: failed program was:" >&5
5210 cat conftest.$ac_ext >&5
5211 rm -rf conftest*
5212 eval "ac_cv_lib_$ac_lib_var=no"
5213fi
5214rm -f conftest*
5215LIBS="$ac_save_LIBS"
5216
5217fi
5218if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5219 echo "$ac_t""yes" 1>&6
5220 ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5221 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5222 cat >> confdefs.h <<EOF
5223#define $ac_tr_lib 1
5224EOF
5225
5226 LIBS="-lintl $LIBS"
5227
5228else
5229 echo "$ac_t""no" 1>&6
5230fi
5231
5232
5233echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
243cf185 5234echo "configure:5235: checking whether localtime caches TZ" >&5
ba4481b5
DL
5235if eval "test \"`echo '$''{'emacs_cv_localtime_cache'+set}'`\" = set"; then
5236 echo $ac_n "(cached) $ac_c" 1>&6
5237else
5238 if test x$ac_cv_func_tzset = xyes; then
5239if test "$cross_compiling" = yes; then
5240 # If we have tzset, assume the worst when cross-compiling.
5241emacs_cv_localtime_cache=yes
5242else
5243 cat > conftest.$ac_ext <<EOF
243cf185 5244#line 5245 "configure"
ba4481b5
DL
5245#include "confdefs.h"
5246#include <time.h>
5247#if STDC_HEADERS
5248# include <stdlib.h>
5249#endif
5250extern char **environ;
5251unset_TZ ()
5252{
5253 char **from, **to;
5254 for (to = from = environ; (*to = *from); from++)
5255 if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
5256 to++;
5257}
5258char TZ_GMT0[] = "TZ=GMT0";
5259char TZ_PST8[] = "TZ=PST8";
5260main()
5261{
5262 time_t now = time ((time_t *) 0);
5263 int hour_GMT0, hour_unset;
5264 if (putenv (TZ_GMT0) != 0)
5265 exit (1);
5266 hour_GMT0 = localtime (&now)->tm_hour;
5267 unset_TZ ();
5268 hour_unset = localtime (&now)->tm_hour;
5269 if (putenv (TZ_PST8) != 0)
5270 exit (1);
5271 if (localtime (&now)->tm_hour == hour_GMT0)
5272 exit (1);
5273 unset_TZ ();
5274 if (localtime (&now)->tm_hour != hour_unset)
5275 exit (1);
5276 exit (0);
5277}
5278EOF
243cf185 5279if { (eval echo configure:5280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
ba4481b5
DL
5280then
5281 emacs_cv_localtime_cache=no
5282else
5283 echo "configure: failed program was:" >&5
5284 cat conftest.$ac_ext >&5
5285 rm -fr conftest*
5286 emacs_cv_localtime_cache=yes
5287fi
5288rm -fr conftest*
5289fi
5290
5291else
5292 # If we lack tzset, report that localtime does not cache TZ,
5293 # since we can't invalidate the cache if we don't have tzset.
5294 emacs_cv_localtime_cache=no
5295fi
5296fi
5297echo "$ac_t""$emacs_cv_localtime_cache" 1>&6
5298if test $emacs_cv_localtime_cache = yes; then
5299 cat >> confdefs.h <<\EOF
5300#define LOCALTIME_CACHE 1
5301EOF
5302
5303fi
5304
5305if test "x$HAVE_TIMEVAL" = xyes; then
5306echo $ac_n "checking whether gettimeofday can accept two arguments""... $ac_c" 1>&6
243cf185 5307echo "configure:5308: checking whether gettimeofday can accept two arguments" >&5
ba4481b5
DL
5308if eval "test \"`echo '$''{'emacs_cv_gettimeofday_two_arguments'+set}'`\" = set"; then
5309 echo $ac_n "(cached) $ac_c" 1>&6
5310else
5311 cat > conftest.$ac_ext <<EOF
243cf185 5312#line 5313 "configure"
ba4481b5
DL
5313#include "confdefs.h"
5314
5315#ifdef TIME_WITH_SYS_TIME
5316#include <sys/time.h>
5317#include <time.h>
5318#else
5319#ifdef HAVE_SYS_TIME_H
5320#include <sys/time.h>
5321#else
5322#include <time.h>
5323#endif
5324#endif
5325
5326int main() {
5327
5328 struct timeval time;
5329 struct timezone dummy;
5330 gettimeofday (&time, &dummy);
5331
5332; return 0; }
5333EOF
243cf185 5334if { (eval echo configure:5335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ba4481b5
DL
5335 rm -rf conftest*
5336 emacs_cv_gettimeofday_two_arguments=yes
5337else
5338 echo "configure: failed program was:" >&5
5339 cat conftest.$ac_ext >&5
5340 rm -rf conftest*
5341 emacs_cv_gettimeofday_two_arguments=no
5342fi
5343rm -f conftest*
5344fi
5345
5346echo "$ac_t""$emacs_cv_gettimeofday_two_arguments" 1>&6
5347 if test $emacs_cv_gettimeofday_two_arguments = no; then
5348 cat >> confdefs.h <<\EOF
5349#define GETTIMEOFDAY_ONE_ARGUMENT 1
5350EOF
5351
5352 fi
5353fi
5354
5355ok_so_far=yes
5356echo $ac_n "checking for socket""... $ac_c" 1>&6
243cf185 5357echo "configure:5358: checking for socket" >&5
ba4481b5
DL
5358if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then
5359 echo $ac_n "(cached) $ac_c" 1>&6
5360else
5361 cat > conftest.$ac_ext <<EOF
243cf185 5362#line 5363 "configure"
ba4481b5
DL
5363#include "confdefs.h"
5364/* System header to define __stub macros and hopefully few prototypes,
5365 which can conflict with char socket(); below. */
5366#include <assert.h>
5367/* Override any gcc2 internal prototype to avoid an error. */
5368/* We use char because int might match the return type of a gcc2
5369 builtin and then its argument prototype would still apply. */
5370char socket();
5371
5372int main() {
5373
5374/* The GNU C library defines this for functions which it implements
5375 to always fail with ENOSYS. Some functions are actually named
5376 something starting with __ and the normal name is an alias. */
5377#if defined (__stub_socket) || defined (__stub___socket)
5378choke me
5379#else
5380socket();
5381#endif
5382
5383; return 0; }
5384EOF
243cf185 5385if { (eval echo configure:5386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ba4481b5
DL
5386 rm -rf conftest*
5387 eval "ac_cv_func_socket=yes"
5388else
5389 echo "configure: failed program was:" >&5
5390 cat conftest.$ac_ext >&5
5391 rm -rf conftest*
5392 eval "ac_cv_func_socket=no"
5393fi
5394rm -f conftest*
5395fi
5396
5397if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
5398 echo "$ac_t""yes" 1>&6
5399 :
5400else
5401 echo "$ac_t""no" 1>&6
5402ok_so_far=no
5403fi
5404
5405if test $ok_so_far = yes; then
5406 ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'`
5407echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6
243cf185 5408echo "configure:5409: checking for netinet/in.h" >&5
ba4481b5
DL
5409if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5410 echo $ac_n "(cached) $ac_c" 1>&6
5411else
5412 cat > conftest.$ac_ext <<EOF
243cf185 5413#line 5414 "configure"
ba4481b5
DL
5414#include "confdefs.h"
5415#include <netinet/in.h>
5416EOF
5417ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
243cf185 5418{ (eval echo configure:5419: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ba4481b5
DL
5419ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5420if test -z "$ac_err"; then
5421 rm -rf conftest*
5422 eval "ac_cv_header_$ac_safe=yes"
5423else
5424 echo "$ac_err" >&5
5425 echo "configure: failed program was:" >&5
5426 cat conftest.$ac_ext >&5
5427 rm -rf conftest*
5428 eval "ac_cv_header_$ac_safe=no"
5429fi
5430rm -f conftest*
5431fi
5432if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5433 echo "$ac_t""yes" 1>&6
5434 :
5435else
5436 echo "$ac_t""no" 1>&6
5437ok_so_far=no
5438fi
5439
5440fi
5441if test $ok_so_far = yes; then
5442 ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'`
5443echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6
243cf185 5444echo "configure:5445: checking for arpa/inet.h" >&5
ba4481b5
DL
5445if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5446 echo $ac_n "(cached) $ac_c" 1>&6
5447else
5448 cat > conftest.$ac_ext <<EOF
243cf185 5449#line 5450 "configure"
ba4481b5
DL
5450#include "confdefs.h"
5451#include <arpa/inet.h>
5452EOF
5453ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
243cf185 5454{ (eval echo configure:5455: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ba4481b5
DL
5455ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5456if test -z "$ac_err"; then
5457 rm -rf conftest*
5458 eval "ac_cv_header_$ac_safe=yes"
5459else
5460 echo "$ac_err" >&5
5461 echo "configure: failed program was:" >&5
5462 cat conftest.$ac_ext >&5
5463 rm -rf conftest*
5464 eval "ac_cv_header_$ac_safe=no"
5465fi
5466rm -f conftest*
5467fi
5468if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5469 echo "$ac_t""yes" 1>&6
5470 :
5471else
5472 echo "$ac_t""no" 1>&6
5473ok_so_far=no
5474fi
5475
5476fi
5477if test $ok_so_far = yes; then
5478 cat >> confdefs.h <<\EOF
5479#define HAVE_INET_SOCKETS 1
5480EOF
5481
5482fi
5483
5484if test -f /usr/lpp/X11/bin/smt.exp; then
5485 cat >> confdefs.h <<\EOF
5486#define HAVE_AIX_SMT_EXP 1
5487EOF
5488
5489fi
5490
5491# Set up the CFLAGS for real compilation, so we can substitute it.
5492CFLAGS="$REAL_CFLAGS"
5493
5494#### Find out which version of Emacs this is.
5495version=`grep 'defconst[ ]*emacs-version' ${srcdir}/lisp/version.el \
5496 | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`
5497if test x"${version}" = x; then
5498 { echo "configure: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." 1>&2; exit 1; }
5499fi
5500
5501### Specify what sort of things we'll be editing into Makefile and config.h.
5502### Use configuration here uncanonicalized to avoid exceeding size limits.
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534cat >> confdefs.h <<EOF
5535#define EMACS_CONFIGURATION "${canonical}"
5536EOF
5537
5538cat >> confdefs.h <<EOF
5539#define EMACS_CONFIG_OPTIONS "${ac_configure_args}"
5540EOF
5541
5542cat >> confdefs.h <<EOF
5543#define config_machfile "${machfile}"
5544EOF
5545
5546cat >> confdefs.h <<EOF
5547#define config_opsysfile "${opsysfile}"
5548EOF
5549
5550cat >> confdefs.h <<EOF
5551#define LD_SWITCH_X_SITE ${LD_SWITCH_X_SITE}
5552EOF
5553
5554cat >> confdefs.h <<EOF
5555#define LD_SWITCH_X_SITE_AUX ${LD_SWITCH_X_SITE_AUX}
5556EOF
5557
5558cat >> confdefs.h <<EOF
5559#define C_SWITCH_X_SITE ${C_SWITCH_X_SITE}
5560EOF
5561
5562cat >> confdefs.h <<EOF
5563#define UNEXEC_SRC ${UNEXEC_SRC}
5564EOF
5565
5566
5567if test "${HAVE_X_WINDOWS}" = "yes" ; then
5568 cat >> confdefs.h <<\EOF
5569#define HAVE_X_WINDOWS 1
5570EOF
5571
5572fi
5573if test "${USE_X_TOOLKIT}" != "none" ; then
5574 cat >> confdefs.h <<\EOF
5575#define USE_X_TOOLKIT 1
5576EOF
5577
5578fi
5579if test "${HAVE_X11}" = "yes" ; then
5580 cat >> confdefs.h <<\EOF
5581#define HAVE_X11 1
5582EOF
5583
5584fi
5585if test "${HAVE_XFREE386}" = "yes" ; then
5586 cat >> confdefs.h <<\EOF
5587#define HAVE_XFREE386 1
5588EOF
5589
5590fi
5591if test "${HAVE_MENUS}" = "yes" ; then
5592 cat >> confdefs.h <<\EOF
5593#define HAVE_MENUS 1
5594EOF
5595
5596fi
5597if test "${GNU_MALLOC}" = "yes" ; then
5598 cat >> confdefs.h <<\EOF
5599#define GNU_MALLOC 1
5600EOF
5601
5602fi
5603if test "${REL_ALLOC}" = "yes" ; then
5604 cat >> confdefs.h <<\EOF
5605#define REL_ALLOC 1
5606EOF
5607
5608fi
5609if test "${LISP_FLOAT_TYPE}" = "yes" ; then
5610 cat >> confdefs.h <<\EOF
5611#define LISP_FLOAT_TYPE 1
5612EOF
5613
5614fi
5615
5616#### Report on what we decided to do.
5617echo "
5618Configured for \`${canonical}'.
5619
5620 Where should the build process find the source code? ${srcdir}
5621 What operating system and machine description files should Emacs use?
5622 \`${opsysfile}' and \`${machfile}'
5623 What compiler should emacs be built with? ${CC} ${CFLAGS}
5624 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
5625 Should Emacs use the relocating allocator for buffers? ${REL_ALLOC}
5626 What window system should Emacs use? ${window_system}
5627 What toolkit should Emacs use? ${USE_X_TOOLKIT}"
5628
5629if test -n "${x_includes}"; then
5630echo " Where do we find X Windows header files? ${x_includes}"
5631else
5632echo " Where do we find X Windows header files? Standard dirs"
5633fi
5634if test -n "${x_libraries}"; then
5635echo " Where do we find X Windows libraries? ${x_libraries}"
5636else
5637echo " Where do we find X Windows libraries? Standard dirs"
5638fi
5639
5640echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}"
5641echo " Does Emacs use -lXpm? ${HAVE_XPM}"
5642echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
5643echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
5644echo " Does Emacs use -lungif? ${HAVE_GIF}"
5645echo " Does Emacs use -lpng? ${HAVE_PNG}"
5646echo " Does Emacs use X toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}"
5647echo
5648
5649# Remove any trailing slashes in these variables.
5650test "${prefix}" != NONE &&
5651 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
5652test "${exec_prefix}" != NONE &&
5653 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
5654
5655trap '' 1 2 15
5656cat > confcache <<\EOF
5657# This file is a shell script that caches the results of configure
5658# tests run on this system so they can be shared between configure
5659# scripts and configure runs. It is not useful on other systems.
5660# If it contains results you don't want to keep, you may remove or edit it.
5661#
5662# By default, configure uses ./config.cache as the cache file,
5663# creating it if it does not exist already. You can give configure
5664# the --cache-file=FILE option to use a different cache file; that is
5665# what configure does when it calls configure scripts in
5666# subdirectories, so they share the cache.
5667# Giving --cache-file=/dev/null disables caching, for debugging configure.
5668# config.status only pays attention to the cache file if you give it the
5669# --recheck option to rerun configure.
5670#
5671EOF
5672# The following way of writing the cache mishandles newlines in values,
5673# but we know of no workaround that is simple, portable, and efficient.
5674# So, don't put newlines in cache variables' values.
5675# Ultrix sh set writes to stderr and can't be redirected directly,
5676# and sets the high bit in the cache file unless we assign to the vars.
5677(set) 2>&1 |
5678 case `(ac_space=' '; set | grep ac_space) 2>&1` in
5679 *ac_space=\ *)
5680 # `set' does not quote correctly, so add quotes (double-quote substitution
5681 # turns \\\\ into \\, and sed turns \\ into \).
5682 sed -n \
5683 -e "s/'/'\\\\''/g" \
5684 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
5685 ;;
5686 *)
5687 # `set' quotes correctly as required by POSIX, so do not add quotes.
5688 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
5689 ;;
5690 esac >> confcache
5691if cmp -s $cache_file confcache; then
5692 :
5693else
5694 if test -w $cache_file; then
5695 echo "updating cache $cache_file"
5696 cat confcache > $cache_file
5697 else
5698 echo "not updating unwritable cache $cache_file"
5699 fi
5700fi
5701rm -f confcache
5702
5703trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
5704
5705test "x$prefix" = xNONE && prefix=$ac_default_prefix
5706# Let make expand exec_prefix.
5707test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5708
5709# Any assignment to VPATH causes Sun make to only execute
5710# the first set of double-colon rules, so remove it if not needed.
5711# If there is a colon in the path, we need to keep it.
5712if test "x$srcdir" = x.; then
5713 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
5714fi
5715
5716trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
5717
5718DEFS=-DHAVE_CONFIG_H
5719
5720# Without the "./", some shells look in PATH for config.status.
5721: ${CONFIG_STATUS=./config.status}
5722
5723echo creating $CONFIG_STATUS
5724rm -f $CONFIG_STATUS
5725cat > $CONFIG_STATUS <<EOF
5726#! /bin/sh
5727# Generated automatically by configure.
5728# Run this file to recreate the current configuration.
5729# This directory was configured as follows,
5730# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
5731#
5732# $0 $ac_configure_args
5733#
5734# Compiler output produced by configure, useful for debugging
5735# configure, is in ./config.log if it exists.
5736
5737ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
5738for ac_option
5739do
5740 case "\$ac_option" in
5741 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
5742 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
5743 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
5744 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
5745 echo "$CONFIG_STATUS generated by autoconf version 2.13"
5746 exit 0 ;;
5747 -help | --help | --hel | --he | --h)
5748 echo "\$ac_cs_usage"; exit 0 ;;
5749 *) echo "\$ac_cs_usage"; exit 1 ;;
5750 esac
5751done
5752
5753ac_given_srcdir=$srcdir
5754ac_given_INSTALL="$INSTALL"
5755
5756trap 'rm -fr `echo "Makefile lib-src/Makefile.c:lib-src/Makefile.in oldXMenu/Makefile \
5757 man/Makefile lwlib/Makefile src/Makefile.c:src/Makefile.in \
5758 leim/Makefile src/config.h:src/config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
5759EOF
5760cat >> $CONFIG_STATUS <<EOF
5761
5762# Protect against being on the right side of a sed subst in config.status.
5763sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
5764 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
5765$ac_vpsub
5766$extrasub
5767s%@SHELL@%$SHELL%g
5768s%@CFLAGS@%$CFLAGS%g
5769s%@CPPFLAGS@%$CPPFLAGS%g
5770s%@CXXFLAGS@%$CXXFLAGS%g
5771s%@FFLAGS@%$FFLAGS%g
5772s%@DEFS@%$DEFS%g
5773s%@LDFLAGS@%$LDFLAGS%g
5774s%@LIBS@%$LIBS%g
5775s%@exec_prefix@%$exec_prefix%g
5776s%@prefix@%$prefix%g
5777s%@program_transform_name@%$program_transform_name%g
5778s%@bindir@%$bindir%g
5779s%@sbindir@%$sbindir%g
5780s%@libexecdir@%$libexecdir%g
5781s%@datadir@%$datadir%g
5782s%@sysconfdir@%$sysconfdir%g
5783s%@sharedstatedir@%$sharedstatedir%g
5784s%@localstatedir@%$localstatedir%g
5785s%@libdir@%$libdir%g
5786s%@includedir@%$includedir%g
5787s%@oldincludedir@%$oldincludedir%g
5788s%@infodir@%$infodir%g
5789s%@mandir@%$mandir%g
5790s%@host@%$host%g
5791s%@host_alias@%$host_alias%g
5792s%@host_cpu@%$host_cpu%g
5793s%@host_vendor@%$host_vendor%g
5794s%@host_os@%$host_os%g
5795s%@CC@%$CC%g
5796s%@LN_S@%$LN_S%g
5797s%@CPP@%$CPP%g
5798s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
5799s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
5800s%@INSTALL_DATA@%$INSTALL_DATA%g
5801s%@YACC@%$YACC%g
5802s%@SET_MAKE@%$SET_MAKE%g
5803s%@ALLOCA@%$ALLOCA%g
5804s%@liblockfile@%$liblockfile%g
5805s%@version@%$version%g
5806s%@configuration@%$configuration%g
5807s%@canonical@%$canonical%g
5808s%@srcdir@%$srcdir%g
5809s%@lispdir@%$lispdir%g
5810s%@locallisppath@%$locallisppath%g
5811s%@lisppath@%$lisppath%g
5812s%@x_default_search_path@%$x_default_search_path%g
5813s%@etcdir@%$etcdir%g
5814s%@archlibdir@%$archlibdir%g
5815s%@docdir@%$docdir%g
5816s%@bitmapdir@%$bitmapdir%g
5817s%@c_switch_system@%$c_switch_system%g
5818s%@c_switch_machine@%$c_switch_machine%g
5819s%@LD_SWITCH_X_SITE@%$LD_SWITCH_X_SITE%g
5820s%@LD_SWITCH_X_SITE_AUX@%$LD_SWITCH_X_SITE_AUX%g
5821s%@C_SWITCH_X_SITE@%$C_SWITCH_X_SITE%g
5822s%@X_TOOLKIT_TYPE@%$X_TOOLKIT_TYPE%g
5823s%@machfile@%$machfile%g
5824s%@opsysfile@%$opsysfile%g
5825s%@RANLIB@%$RANLIB%g
5826
5827CEOF
5828EOF
5829
5830cat >> $CONFIG_STATUS <<\EOF
5831
5832# Split the substitutions into bite-sized pieces for seds with
5833# small command number limits, like on Digital OSF/1 and HP-UX.
5834ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
5835ac_file=1 # Number of current file.
5836ac_beg=1 # First line for current file.
5837ac_end=$ac_max_sed_cmds # Line after last line for current file.
5838ac_more_lines=:
5839ac_sed_cmds=""
5840while $ac_more_lines; do
5841 if test $ac_beg -gt 1; then
5842 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
5843 else
5844 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
5845 fi
5846 if test ! -s conftest.s$ac_file; then
5847 ac_more_lines=false
5848 rm -f conftest.s$ac_file
5849 else
5850 if test -z "$ac_sed_cmds"; then
5851 ac_sed_cmds="sed -f conftest.s$ac_file"
5852 else
5853 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
5854 fi
5855 ac_file=`expr $ac_file + 1`
5856 ac_beg=$ac_end
5857 ac_end=`expr $ac_end + $ac_max_sed_cmds`
5858 fi
5859done
5860if test -z "$ac_sed_cmds"; then
5861 ac_sed_cmds=cat
5862fi
5863EOF
5864
5865cat >> $CONFIG_STATUS <<EOF
5866
5867CONFIG_FILES=\${CONFIG_FILES-"Makefile lib-src/Makefile.c:lib-src/Makefile.in oldXMenu/Makefile \
5868 man/Makefile lwlib/Makefile src/Makefile.c:src/Makefile.in \
5869 leim/Makefile"}
5870EOF
5871cat >> $CONFIG_STATUS <<\EOF
5872for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
5873 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5874 case "$ac_file" in
5875 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5876 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5877 *) ac_file_in="${ac_file}.in" ;;
5878 esac
5879
5880 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
5881
5882 # Remove last slash and all that follows it. Not all systems have dirname.
5883 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5884 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5885 # The file is in a subdirectory.
5886 test ! -d "$ac_dir" && mkdir "$ac_dir"
5887 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
5888 # A "../" for each directory in $ac_dir_suffix.
5889 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
5890 else
5891 ac_dir_suffix= ac_dots=
5892 fi
5893
5894 case "$ac_given_srcdir" in
5895 .) srcdir=.
5896 if test -z "$ac_dots"; then top_srcdir=.
5897 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
5898 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
5899 *) # Relative path.
5900 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
5901 top_srcdir="$ac_dots$ac_given_srcdir" ;;
5902 esac
5903
5904 case "$ac_given_INSTALL" in
5905 [/$]*) INSTALL="$ac_given_INSTALL" ;;
5906 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
5907 esac
5908
5909 echo creating "$ac_file"
5910 rm -f "$ac_file"
5911 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
5912 case "$ac_file" in
5913 *Makefile*) ac_comsub="1i\\
5914# $configure_input" ;;
5915 *) ac_comsub= ;;
5916 esac
5917
5918 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5919 sed -e "$ac_comsub
5920s%@configure_input@%$configure_input%g
5921s%@srcdir@%$srcdir%g
5922s%@top_srcdir@%$top_srcdir%g
5923s%@INSTALL@%$INSTALL%g
5924" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
5925fi; done
5926rm -f conftest.s*
5927
5928# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
5929# NAME is the cpp macro being defined and VALUE is the value it is being given.
5930#
5931# ac_d sets the value in "#define NAME VALUE" lines.
5932ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
5933ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
5934ac_dC='\3'
5935ac_dD='%g'
5936# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
5937ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
5938ac_uB='\([ ]\)%\1#\2define\3'
5939ac_uC=' '
5940ac_uD='\4%g'
5941# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
5942ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
5943ac_eB='$%\1#\2define\3'
5944ac_eC=' '
5945ac_eD='%g'
5946
5947if test "${CONFIG_HEADERS+set}" != set; then
5948EOF
5949cat >> $CONFIG_STATUS <<EOF
5950 CONFIG_HEADERS="src/config.h:src/config.in"
5951EOF
5952cat >> $CONFIG_STATUS <<\EOF
5953fi
5954for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
5955 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5956 case "$ac_file" in
5957 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5958 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5959 *) ac_file_in="${ac_file}.in" ;;
5960 esac
5961
5962 echo creating $ac_file
5963
5964 rm -f conftest.frag conftest.in conftest.out
5965 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5966 cat $ac_file_inputs > conftest.in
5967
5968EOF
5969
5970# Transform confdefs.h into a sed script conftest.vals that substitutes
5971# the proper values into config.h.in to produce config.h. And first:
5972# Protect against being on the right side of a sed subst in config.status.
5973# Protect against being in an unquoted here document in config.status.
5974rm -f conftest.vals
5975cat > conftest.hdr <<\EOF
5976s/[\\&%]/\\&/g
5977s%[\\$`]%\\&%g
5978s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
5979s%ac_d%ac_u%gp
5980s%ac_u%ac_e%gp
5981EOF
5982sed -n -f conftest.hdr confdefs.h > conftest.vals
5983rm -f conftest.hdr
5984
5985# This sed command replaces #undef with comments. This is necessary, for
5986# example, in the case of _POSIX_SOURCE, which is predefined and required
5987# on some systems where configure will not decide to define it.
5988cat >> conftest.vals <<\EOF
5989s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
5990EOF
5991
5992# Break up conftest.vals because some shells have a limit on
5993# the size of here documents, and old seds have small limits too.
5994
5995rm -f conftest.tail
5996while :
5997do
5998 ac_lines=`grep -c . conftest.vals`
5999 # grep -c gives empty output for an empty file on some AIX systems.
6000 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
6001 # Write a limited-size here document to conftest.frag.
6002 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
6003 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
6004 echo 'CEOF
6005 sed -f conftest.frag conftest.in > conftest.out
6006 rm -f conftest.in
6007 mv conftest.out conftest.in
6008' >> $CONFIG_STATUS
6009 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
6010 rm -f conftest.vals
6011 mv conftest.tail conftest.vals
6012done
6013rm -f conftest.vals
6014
6015cat >> $CONFIG_STATUS <<\EOF
6016 rm -f conftest.frag conftest.h
6017 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
6018 cat conftest.in >> conftest.h
6019 rm -f conftest.in
6020 if cmp -s $ac_file conftest.h 2>/dev/null; then
6021 echo "$ac_file is unchanged"
6022 rm -f conftest.h
6023 else
6024 # Remove last slash and all that follows it. Not all systems have dirname.
6025 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6026 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6027 # The file is in a subdirectory.
6028 test ! -d "$ac_dir" && mkdir "$ac_dir"
6029 fi
6030 rm -f $ac_file
6031 mv conftest.h $ac_file
6032 fi
6033fi; done
6034
6035EOF
6036cat >> $CONFIG_STATUS <<EOF
6037CPP="$CPP" CPPFLAGS="$CPPFLAGS"
6038EOF
6039cat >> $CONFIG_STATUS <<\EOF
6040
6041
6042### Make the necessary directories, if they don't exist.
6043for dir in etc lisp ; do
6044 test -d ${dir} || mkdir ${dir}
6045done
6046
6047# Build src/Makefile from ${srcdir}/src/Makefile.c
6048# and lib-src/Makefile from ${srcdir}/lib-src/Makefile.c
6049# This must be done after src/config.h is built, since we rely on that file.
6050
6051# Now get this: Some word that is part of the ${srcdir} directory name
6052# or the ${configuration} value might, just might, happen to be an
6053# identifier like `sun4' or `i386' or something, and be predefined by
6054# the C preprocessor to some helpful value like 1, or maybe the empty
6055# string. Needless to say consequent macro substitutions are less
6056# than conducive to the makefile finding the correct directory.
6057undefs="`echo $top_srcdir $configuration $canonical |
6058sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/ *$//' \
6059 -e 's/ */ -U/g' -e 's/-U[0-9][^ ]*//g' \
6060`"
6061
6062echo creating src/epaths.h
6063make epaths-force
6064
6065echo creating lib-src/Makefile
6066( cd lib-src
6067 rm -f junk.c junk1.c junk2.c
6068 sed -e '/start of cpp stuff/q' \
6069 < Makefile.c > junk1.c
6070 sed -e '1,/start of cpp stuff/d'\
6071 -e 's@/\*\*/#\(.*\)$@/* \1 */@' \
6072 < Makefile.c > junk.c
6073 $CPP $undefs -I. -I$top_srcdir/src $CPPFLAGS junk.c | \
6074 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
6075 cat junk1.c junk2.c > Makefile.new
6076 rm -f junk.c junk1.c junk2.c
6077 chmod 444 Makefile.new
6078 mv -f Makefile.new Makefile
6079)
6080
6081echo creating src/Makefile
6082( cd src
6083 rm -f junk.c junk1.c junk2.c
6084 sed -e '/start of cpp stuff/q' \
6085 < Makefile.c > junk1.c
6086 sed -e '1,/start of cpp stuff/d'\
6087 -e 's@/\*\*/#\(.*\)$@/* \1 */@' \
6088 < Makefile.c > junk.c
6089 $CPP $undefs -I. -I$top_srcdir/src $CPPFLAGS junk.c | \
6090 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
6091 cat junk1.c junk2.c > Makefile.new
6092 rm -f junk.c junk1.c junk2.c
6093 chmod 444 Makefile.new
6094 mv -f Makefile.new Makefile
6095)
6096
6097if test ! -f src/.gdbinit && test -f $top_srcdir/src/.gdbinit; then
6098 echo creating src/.gdbinit
6099 echo source $top_srcdir/src/.gdbinit > src/.gdbinit
6100fi
6101
6102# This is how we know whether to re-run configure in certain cases.
6103touch src/config.stamp
6104
6105
6106exit 0
6107EOF
6108chmod +x $CONFIG_STATUS
6109rm -fr confdefs* $ac_clean_files
6110test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
6111