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