(w32_read_socket): Handle WM_MENUSELECT message.
[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
ba4481b5
DL
1684
1685if test $unported = yes; then
1686 { echo "configure: error: Emacs hasn't been ported to \`${canonical}' systems.
1687Check \`etc/MACHINES' for recognized configuration names." 1>&2; exit 1; }
1688fi
1689
1690machfile="m/${machine}.h"
1691opsysfile="s/${opsys}.h"
1692
1693
1694#### Choose a compiler.
1695test -n "$CC" && cc_specified=yes
1696
1697# Save the value of CFLAGS that the user specified.
1698SPECIFIED_CFLAGS="$CFLAGS"
1699
1700case ${with_gcc} in
1701 "yes" ) CC="gcc" GCC=yes ;;
1702 "no" ) : ${CC=cc} ;;
1703 * ) # Extract the first word of "gcc", so it can be a program name with args.
1704set dummy gcc; ac_word=$2
1705echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7397acc4 1706echo "configure:1707: checking for $ac_word" >&5
ba4481b5
DL
1707if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1708 echo $ac_n "(cached) $ac_c" 1>&6
1709else
1710 if test -n "$CC"; then
1711 ac_cv_prog_CC="$CC" # Let the user override the test.
1712else
c4bb2108
DL
1713 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1714 ac_dummy="$PATH"
1715 for ac_dir in $ac_dummy; do
ba4481b5
DL
1716 test -z "$ac_dir" && ac_dir=.
1717 if test -f $ac_dir/$ac_word; then
1718 ac_cv_prog_CC="gcc"
1719 break
1720 fi
1721 done
1722 IFS="$ac_save_ifs"
1723fi
1724fi
1725CC="$ac_cv_prog_CC"
1726if test -n "$CC"; then
1727 echo "$ac_t""$CC" 1>&6
1728else
1729 echo "$ac_t""no" 1>&6
1730fi
1731
1732if test -z "$CC"; then
1733 # Extract the first word of "cc", so it can be a program name with args.
1734set dummy cc; ac_word=$2
1735echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7397acc4 1736echo "configure:1737: checking for $ac_word" >&5
ba4481b5
DL
1737if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1738 echo $ac_n "(cached) $ac_c" 1>&6
1739else
1740 if test -n "$CC"; then
1741 ac_cv_prog_CC="$CC" # Let the user override the test.
1742else
c4bb2108 1743 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ba4481b5 1744 ac_prog_rejected=no
c4bb2108
DL
1745 ac_dummy="$PATH"
1746 for ac_dir in $ac_dummy; do
ba4481b5
DL
1747 test -z "$ac_dir" && ac_dir=.
1748 if test -f $ac_dir/$ac_word; then
1749 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1750 ac_prog_rejected=yes
1751 continue
1752 fi
1753 ac_cv_prog_CC="cc"
1754 break
1755 fi
1756 done
1757 IFS="$ac_save_ifs"
1758if test $ac_prog_rejected = yes; then
1759 # We found a bogon in the path, so make sure we never use it.
1760 set dummy $ac_cv_prog_CC
1761 shift
1762 if test $# -gt 0; then
1763 # We chose a different compiler from the bogus one.
1764 # However, it has the same basename, so the bogon will be chosen
1765 # first if we set CC to just the basename; use the full file name.
1766 shift
1767 set dummy "$ac_dir/$ac_word" "$@"
1768 shift
1769 ac_cv_prog_CC="$@"
1770 fi
1771fi
1772fi
1773fi
1774CC="$ac_cv_prog_CC"
1775if test -n "$CC"; then
1776 echo "$ac_t""$CC" 1>&6
1777else
1778 echo "$ac_t""no" 1>&6
1779fi
1780
c4bb2108
DL
1781 if test -z "$CC"; then
1782 case "`uname -s`" in
1783 *win32* | *WIN32*)
1784 # Extract the first word of "cl", so it can be a program name with args.
1785set dummy cl; ac_word=$2
1786echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7397acc4 1787echo "configure:1788: checking for $ac_word" >&5
c4bb2108
DL
1788if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1789 echo $ac_n "(cached) $ac_c" 1>&6
1790else
1791 if test -n "$CC"; then
1792 ac_cv_prog_CC="$CC" # Let the user override the test.
1793else
1794 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1795 ac_dummy="$PATH"
1796 for ac_dir in $ac_dummy; do
1797 test -z "$ac_dir" && ac_dir=.
1798 if test -f $ac_dir/$ac_word; then
1799 ac_cv_prog_CC="cl"
1800 break
1801 fi
1802 done
1803 IFS="$ac_save_ifs"
1804fi
1805fi
1806CC="$ac_cv_prog_CC"
1807if test -n "$CC"; then
1808 echo "$ac_t""$CC" 1>&6
1809else
1810 echo "$ac_t""no" 1>&6
1811fi
1812 ;;
1813 esac
1814 fi
ba4481b5
DL
1815 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1816fi
1817
1818echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
7397acc4 1819echo "configure:1820: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ba4481b5
DL
1820
1821ac_ext=c
1822# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1823ac_cpp='$CPP $CPPFLAGS'
1824ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
c4bb2108 1825ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
ba4481b5
DL
1826cross_compiling=$ac_cv_prog_cc_cross
1827
c4bb2108
DL
1828cat > conftest.$ac_ext << EOF
1829
7397acc4 1830#line 1831 "configure"
ba4481b5 1831#include "confdefs.h"
c4bb2108 1832
ba4481b5
DL
1833main(){return(0);}
1834EOF
7397acc4 1835if { (eval echo configure:1836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ba4481b5
DL
1836 ac_cv_prog_cc_works=yes
1837 # If we can't run a trivial program, we are probably using a cross compiler.
1838 if (./conftest; exit) 2>/dev/null; then
1839 ac_cv_prog_cc_cross=no
1840 else
1841 ac_cv_prog_cc_cross=yes
1842 fi
1843else
1844 echo "configure: failed program was:" >&5
1845 cat conftest.$ac_ext >&5
1846 ac_cv_prog_cc_works=no
1847fi
1848rm -fr conftest*
c4bb2108
DL
1849ac_ext=c
1850# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1851ac_cpp='$CPP $CPPFLAGS'
1852ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1853ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1854cross_compiling=$ac_cv_prog_cc_cross
ba4481b5
DL
1855
1856echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1857if test $ac_cv_prog_cc_works = no; then
1858 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1859fi
1860echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
7397acc4 1861echo "configure:1862: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
ba4481b5
DL
1862echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1863cross_compiling=$ac_cv_prog_cc_cross
1864
1865echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
7397acc4 1866echo "configure:1867: checking whether we are using GNU C" >&5
ba4481b5
DL
1867if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1868 echo $ac_n "(cached) $ac_c" 1>&6
1869else
1870 cat > conftest.c <<EOF
1871#ifdef __GNUC__
1872 yes;
1873#endif
1874EOF
7397acc4 1875if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1876: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ba4481b5
DL
1876 ac_cv_prog_gcc=yes
1877else
1878 ac_cv_prog_gcc=no
1879fi
1880fi
1881
1882echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1883
1884if test $ac_cv_prog_gcc = yes; then
1885 GCC=yes
c4bb2108
DL
1886else
1887 GCC=
1888fi
1889
1890ac_test_CFLAGS="${CFLAGS+set}"
1891ac_save_CFLAGS="$CFLAGS"
1892CFLAGS=
1893echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
7397acc4 1894echo "configure:1895: checking whether ${CC-cc} accepts -g" >&5
ba4481b5
DL
1895if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1896 echo $ac_n "(cached) $ac_c" 1>&6
1897else
1898 echo 'void f(){}' > conftest.c
1899if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1900 ac_cv_prog_cc_g=yes
1901else
1902 ac_cv_prog_cc_g=no
1903fi
1904rm -f conftest*
1905
1906fi
1907
1908echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
c4bb2108
DL
1909if test "$ac_test_CFLAGS" = set; then
1910 CFLAGS="$ac_save_CFLAGS"
1911elif test $ac_cv_prog_cc_g = yes; then
1912 if test "$GCC" = yes; then
ba4481b5
DL
1913 CFLAGS="-g -O2"
1914 else
c4bb2108 1915 CFLAGS="-g"
ba4481b5 1916 fi
22afa6e8 1917else
c4bb2108
DL
1918 if test "$GCC" = yes; then
1919 CFLAGS="-O2"
1920 else
1921 CFLAGS=
1922 fi
ba4481b5
DL
1923fi
1924
1925esac
1926
1927# On Suns, sometimes $CPP names a directory.
1928if test -n "$CPP" && test -d "$CPP"; then
1929 CPP=
1930fi
1931
1932#### Some systems specify a CPP to use unless we are using GCC.
1933#### Now that we know whether we are using GCC, we can decide whether
1934#### to use that one.
1935if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x
1936then
1937 CPP="$NON_GNU_CPP"
1938fi
1939
1940#### Some systems specify a CC to use unless we are using GCC.
1941#### Now that we know whether we are using GCC, we can decide whether
1942#### to use that one.
1943if test "x$NON_GNU_CC" != x && test x$GCC != xyes &&
1944 test x$cc_specified != xyes
1945then
1946 CC="$NON_GNU_CC"
1947fi
1948
1949if test x$GCC = xyes && test "x$GCC_TEST_OPTIONS" != x
1950then
1951 CC="$CC $GCC_TEST_OPTIONS"
1952fi
1953
1954if test x$GCC = x && test "x$NON_GCC_TEST_OPTIONS" != x
1955then
1956 CC="$CC $NON_GCC_TEST_OPTIONS"
1957fi
1958
1959if test x$GCC = xyes && test "x$GCC_LINK_TEST_OPTIONS" != x
1960then
1961 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
1962fi
1963
1964if test x$GCC = x && test "x$NON_GCC_LINK_TEST_OPTIONS" != x
1965then
1966 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
1967fi
1968
1969#### Some other nice autoconf tests. If you add a test here which
1970#### should make an entry in src/config.h, don't forget to add an
1971#### #undef clause to src/config.h.in for autoconf to modify.
1972
1973echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
7397acc4 1974echo "configure:1975: checking whether ln -s works" >&5
ba4481b5
DL
1975if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1976 echo $ac_n "(cached) $ac_c" 1>&6
1977else
1978 rm -f conftestdata
1979if ln -s X conftestdata 2>/dev/null
1980then
1981 rm -f conftestdata
1982 ac_cv_prog_LN_S="ln -s"
1983else
1984 ac_cv_prog_LN_S=ln
1985fi
1986fi
1987LN_S="$ac_cv_prog_LN_S"
1988if test "$ac_cv_prog_LN_S" = "ln -s"; then
1989 echo "$ac_t""yes" 1>&6
1990else
1991 echo "$ac_t""no" 1>&6
1992fi
1993
1994echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
7397acc4 1995echo "configure:1996: checking how to run the C preprocessor" >&5
ba4481b5
DL
1996# On Suns, sometimes $CPP names a directory.
1997if test -n "$CPP" && test -d "$CPP"; then
1998 CPP=
1999fi
2000if test -z "$CPP"; then
2001if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
2002 echo $ac_n "(cached) $ac_c" 1>&6
2003else
2004 # This must be in double quotes, not single quotes, because CPP may get
2005 # substituted into the Makefile and "${CC-cc}" will confuse make.
2006 CPP="${CC-cc} -E"
2007 # On the NeXT, cc -E runs the code through the compiler's parser,
2008 # not just through cpp.
2009 cat > conftest.$ac_ext <<EOF
7397acc4 2010#line 2011 "configure"
ba4481b5
DL
2011#include "confdefs.h"
2012#include <assert.h>
2013Syntax Error
2014EOF
2015ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7397acc4 2016{ (eval echo configure:2017: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c4bb2108 2017ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
ba4481b5
DL
2018if test -z "$ac_err"; then
2019 :
2020else
2021 echo "$ac_err" >&5
2022 echo "configure: failed program was:" >&5
2023 cat conftest.$ac_ext >&5
2024 rm -rf conftest*
2025 CPP="${CC-cc} -E -traditional-cpp"
2026 cat > conftest.$ac_ext <<EOF
7397acc4 2027#line 2028 "configure"
ba4481b5
DL
2028#include "confdefs.h"
2029#include <assert.h>
2030Syntax Error
2031EOF
2032ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7397acc4 2033{ (eval echo configure:2034: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c4bb2108
DL
2034ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2035if test -z "$ac_err"; then
2036 :
2037else
2038 echo "$ac_err" >&5
2039 echo "configure: failed program was:" >&5
2040 cat conftest.$ac_ext >&5
2041 rm -rf conftest*
2042 CPP="${CC-cc} -nologo -E"
2043 cat > conftest.$ac_ext <<EOF
7397acc4 2044#line 2045 "configure"
c4bb2108
DL
2045#include "confdefs.h"
2046#include <assert.h>
2047Syntax Error
2048EOF
2049ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7397acc4 2050{ (eval echo configure:2051: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c4bb2108 2051ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
ba4481b5
DL
2052if test -z "$ac_err"; then
2053 :
2054else
2055 echo "$ac_err" >&5
2056 echo "configure: failed program was:" >&5
2057 cat conftest.$ac_ext >&5
2058 rm -rf conftest*
2059 CPP=/lib/cpp
2060fi
2061rm -f conftest*
2062fi
c4bb2108
DL
2063rm -f conftest*
2064fi
ba4481b5
DL
2065rm -f conftest*
2066 ac_cv_prog_CPP="$CPP"
2067fi
2068 CPP="$ac_cv_prog_CPP"
2069else
2070 ac_cv_prog_CPP="$CPP"
2071fi
2072echo "$ac_t""$CPP" 1>&6
2073
2074# Find a good install program. We prefer a C program (faster),
2075# so one script is as good as another. But avoid the broken or
2076# incompatible versions:
2077# SysV /etc/install, /usr/sbin/install
2078# SunOS /usr/etc/install
2079# IRIX /sbin/install
2080# AIX /bin/install
c4bb2108 2081# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
ba4481b5
DL
2082# AFS /usr/afsws/bin/install, which mishandles nonexistent args
2083# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2084# ./install, which can be erroneously created by make from ./install.sh.
2085echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
7397acc4 2086echo "configure:2087: checking for a BSD compatible install" >&5
ba4481b5
DL
2087if test -z "$INSTALL"; then
2088if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
2089 echo $ac_n "(cached) $ac_c" 1>&6
2090else
c4bb2108 2091 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
ba4481b5
DL
2092 for ac_dir in $PATH; do
2093 # Account for people who put trailing slashes in PATH elements.
2094 case "$ac_dir/" in
2095 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2096 *)
2097 # OSF1 and SCO ODT 3.0 have their own names for install.
c4bb2108
DL
2098 # Don't use installbsd from OSF since it installs stuff as root
2099 # by default.
2100 for ac_prog in ginstall scoinst install; do
ba4481b5
DL
2101 if test -f $ac_dir/$ac_prog; then
2102 if test $ac_prog = install &&
2103 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2104 # AIX install. It has an incompatible calling convention.
2105 :
2106 else
2107 ac_cv_path_install="$ac_dir/$ac_prog -c"
2108 break 2
2109 fi
2110 fi
2111 done
2112 ;;
2113 esac
2114 done
2115 IFS="$ac_save_IFS"
2116
2117fi
2118 if test "${ac_cv_path_install+set}" = set; then
2119 INSTALL="$ac_cv_path_install"
2120 else
2121 # As a last resort, use the slow shell script. We don't cache a
2122 # path for INSTALL within a source directory, because that will
2123 # break other packages using the cache if that directory is
2124 # removed, or if the path is relative.
2125 INSTALL="$ac_install_sh"
2126 fi
2127fi
2128echo "$ac_t""$INSTALL" 1>&6
2129
2130# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2131# It thinks the first close brace ends the variable substitution.
2132test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2133
c4bb2108
DL
2134test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
2135
ba4481b5
DL
2136test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2137
2138for ac_prog in 'bison -y' byacc
2139do
2140# Extract the first word of "$ac_prog", so it can be a program name with args.
2141set dummy $ac_prog; ac_word=$2
2142echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7397acc4 2143echo "configure:2144: checking for $ac_word" >&5
ba4481b5
DL
2144if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
2145 echo $ac_n "(cached) $ac_c" 1>&6
2146else
2147 if test -n "$YACC"; then
2148 ac_cv_prog_YACC="$YACC" # Let the user override the test.
2149else
c4bb2108
DL
2150 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2151 ac_dummy="$PATH"
2152 for ac_dir in $ac_dummy; do
ba4481b5
DL
2153 test -z "$ac_dir" && ac_dir=.
2154 if test -f $ac_dir/$ac_word; then
2155 ac_cv_prog_YACC="$ac_prog"
2156 break
2157 fi
2158 done
2159 IFS="$ac_save_ifs"
2160fi
2161fi
2162YACC="$ac_cv_prog_YACC"
2163if test -n "$YACC"; then
2164 echo "$ac_t""$YACC" 1>&6
2165else
2166 echo "$ac_t""no" 1>&6
2167fi
2168
2169test -n "$YACC" && break
2170done
2171test -n "$YACC" || YACC="yacc"
2172
7397acc4
DL
2173if test "x$RANLIB" = x; then
2174 # Extract the first word of "ranlib", so it can be a program name with args.
2175set dummy ranlib; ac_word=$2
2176echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2177echo "configure:2178: checking for $ac_word" >&5
2178if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2179 echo $ac_n "(cached) $ac_c" 1>&6
2180else
2181 if test -n "$RANLIB"; then
2182 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2183else
2184 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2185 ac_dummy="$PATH"
2186 for ac_dir in $ac_dummy; do
2187 test -z "$ac_dir" && ac_dir=.
2188 if test -f $ac_dir/$ac_word; then
2189 ac_cv_prog_RANLIB="ranlib"
2190 break
2191 fi
2192 done
2193 IFS="$ac_save_ifs"
2194 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2195fi
2196fi
2197RANLIB="$ac_cv_prog_RANLIB"
2198if test -n "$RANLIB"; then
2199 echo "$ac_t""$RANLIB" 1>&6
2200else
2201 echo "$ac_t""no" 1>&6
2202fi
2203
2204fi
ba4481b5
DL
2205
2206echo $ac_n "checking for AIX""... $ac_c" 1>&6
7397acc4 2207echo "configure:2208: checking for AIX" >&5
ba4481b5 2208cat > conftest.$ac_ext <<EOF
7397acc4 2209#line 2210 "configure"
ba4481b5
DL
2210#include "confdefs.h"
2211#ifdef _AIX
2212 yes
2213#endif
2214
2215EOF
2216if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2217 egrep "yes" >/dev/null 2>&1; then
2218 rm -rf conftest*
2219 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
2220#define _ALL_SOURCE 1
2221EOF
2222
2223else
2224 rm -rf conftest*
2225 echo "$ac_t""no" 1>&6
2226fi
2227rm -f conftest*
2228
2229
2230
2231# Sound support for GNU/Linux and the free BSDs.
2232for ac_hdr in machine/soundcard.h sys/soundcard.h
2233do
2234ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2235echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7397acc4 2236echo "configure:2237: checking for $ac_hdr" >&5
ba4481b5
DL
2237if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2238 echo $ac_n "(cached) $ac_c" 1>&6
2239else
2240 cat > conftest.$ac_ext <<EOF
7397acc4 2241#line 2242 "configure"
ba4481b5
DL
2242#include "confdefs.h"
2243#include <$ac_hdr>
2244EOF
2245ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7397acc4 2246{ (eval echo configure:2247: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c4bb2108 2247ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
ba4481b5
DL
2248if test -z "$ac_err"; then
2249 rm -rf conftest*
2250 eval "ac_cv_header_$ac_safe=yes"
2251else
2252 echo "$ac_err" >&5
2253 echo "configure: failed program was:" >&5
2254 cat conftest.$ac_ext >&5
2255 rm -rf conftest*
2256 eval "ac_cv_header_$ac_safe=no"
2257fi
2258rm -f conftest*
2259fi
2260if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2261 echo "$ac_t""yes" 1>&6
2262 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2263 cat >> confdefs.h <<EOF
2264#define $ac_tr_hdr 1
2265EOF
2266
2267else
2268 echo "$ac_t""no" 1>&6
2269fi
2270done
2271
2272
1113b624
PE
2273for ac_hdr in sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \
2274 linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \
2275 termcap.h stdio_ext.h
ba4481b5
DL
2276do
2277ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2278echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7397acc4 2279echo "configure:2280: checking for $ac_hdr" >&5
ba4481b5
DL
2280if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2281 echo $ac_n "(cached) $ac_c" 1>&6
2282else
2283 cat > conftest.$ac_ext <<EOF
7397acc4 2284#line 2285 "configure"
ba4481b5
DL
2285#include "confdefs.h"
2286#include <$ac_hdr>
2287EOF
2288ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7397acc4 2289{ (eval echo configure:2290: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c4bb2108 2290ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
ba4481b5
DL
2291if test -z "$ac_err"; then
2292 rm -rf conftest*
2293 eval "ac_cv_header_$ac_safe=yes"
2294else
2295 echo "$ac_err" >&5
2296 echo "configure: failed program was:" >&5
2297 cat conftest.$ac_ext >&5
2298 rm -rf conftest*
2299 eval "ac_cv_header_$ac_safe=no"
2300fi
2301rm -f conftest*
2302fi
2303if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2304 echo "$ac_t""yes" 1>&6
2305 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2306 cat >> confdefs.h <<EOF
2307#define $ac_tr_hdr 1
2308EOF
2309
2310else
2311 echo "$ac_t""no" 1>&6
2312fi
2313done
2314
2315echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
7397acc4 2316echo "configure:2317: checking for ANSI C header files" >&5
ba4481b5
DL
2317if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2318 echo $ac_n "(cached) $ac_c" 1>&6
2319else
2320 cat > conftest.$ac_ext <<EOF
7397acc4 2321#line 2322 "configure"
ba4481b5
DL
2322#include "confdefs.h"
2323#include <stdlib.h>
2324#include <stdarg.h>
2325#include <string.h>
2326#include <float.h>
2327EOF
2328ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7397acc4 2329{ (eval echo configure:2330: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c4bb2108 2330ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
ba4481b5
DL
2331if test -z "$ac_err"; then
2332 rm -rf conftest*
2333 ac_cv_header_stdc=yes
2334else
2335 echo "$ac_err" >&5
2336 echo "configure: failed program was:" >&5
2337 cat conftest.$ac_ext >&5
2338 rm -rf conftest*
2339 ac_cv_header_stdc=no
2340fi
2341rm -f conftest*
2342
2343if test $ac_cv_header_stdc = yes; then
2344 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2345cat > conftest.$ac_ext <<EOF
7397acc4 2346#line 2347 "configure"
ba4481b5
DL
2347#include "confdefs.h"
2348#include <string.h>
2349EOF
2350if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2351 egrep "memchr" >/dev/null 2>&1; then
2352 :
2353else
2354 rm -rf conftest*
2355 ac_cv_header_stdc=no
2356fi
2357rm -f conftest*
2358
2359fi
2360
2361if test $ac_cv_header_stdc = yes; then
2362 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2363cat > conftest.$ac_ext <<EOF
7397acc4 2364#line 2365 "configure"
ba4481b5
DL
2365#include "confdefs.h"
2366#include <stdlib.h>
2367EOF
2368if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2369 egrep "free" >/dev/null 2>&1; then
2370 :
2371else
2372 rm -rf conftest*
2373 ac_cv_header_stdc=no
2374fi
2375rm -f conftest*
2376
2377fi
2378
2379if test $ac_cv_header_stdc = yes; then
2380 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2381if test "$cross_compiling" = yes; then
2382 :
2383else
2384 cat > conftest.$ac_ext <<EOF
7397acc4 2385#line 2386 "configure"
ba4481b5
DL
2386#include "confdefs.h"
2387#include <ctype.h>
2388#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2389#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2390#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2391int main () { int i; for (i = 0; i < 256; i++)
2392if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2393exit (0); }
2394
2395EOF
7397acc4 2396if { (eval echo configure:2397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
ba4481b5
DL
2397then
2398 :
2399else
2400 echo "configure: failed program was:" >&5
2401 cat conftest.$ac_ext >&5
2402 rm -fr conftest*
2403 ac_cv_header_stdc=no
2404fi
2405rm -fr conftest*
2406fi
2407
2408fi
2409fi
2410
2411echo "$ac_t""$ac_cv_header_stdc" 1>&6
2412if test $ac_cv_header_stdc = yes; then
2413 cat >> confdefs.h <<\EOF
2414#define STDC_HEADERS 1
2415EOF
2416
2417fi
2418
2419echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
7397acc4 2420echo "configure:2421: checking whether time.h and sys/time.h may both be included" >&5
ba4481b5
DL
2421if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2422 echo $ac_n "(cached) $ac_c" 1>&6
2423else
2424 cat > conftest.$ac_ext <<EOF
7397acc4 2425#line 2426 "configure"
ba4481b5
DL
2426#include "confdefs.h"
2427#include <sys/types.h>
2428#include <sys/time.h>
2429#include <time.h>
2430int main() {
2431struct tm *tp;
2432; return 0; }
2433EOF
7397acc4 2434if { (eval echo configure:2435: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
ba4481b5
DL
2435 rm -rf conftest*
2436 ac_cv_header_time=yes
2437else
2438 echo "configure: failed program was:" >&5
2439 cat conftest.$ac_ext >&5
2440 rm -rf conftest*
2441 ac_cv_header_time=no
2442fi
2443rm -f conftest*
2444fi
2445
2446echo "$ac_t""$ac_cv_header_time" 1>&6
2447if test $ac_cv_header_time = yes; then
2448 cat >> confdefs.h <<\EOF
2449#define TIME_WITH_SYS_TIME 1
2450EOF
2451
2452fi
2453
2454echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
7397acc4 2455echo "configure:2456: checking for sys_siglist declaration in signal.h or unistd.h" >&5
ba4481b5
DL
2456if eval "test \"`echo '$''{'ac_cv_decl_sys_siglist'+set}'`\" = set"; then
2457 echo $ac_n "(cached) $ac_c" 1>&6
2458else
2459 cat > conftest.$ac_ext <<EOF
7397acc4 2460#line 2461 "configure"
ba4481b5
DL
2461#include "confdefs.h"
2462#include <sys/types.h>
2463#include <signal.h>
2464/* NetBSD declares sys_siglist in unistd.h. */
2465#ifdef HAVE_UNISTD_H
2466#include <unistd.h>
2467#endif
2468int main() {
2469char *msg = *(sys_siglist + 1);
2470; return 0; }
2471EOF
7397acc4 2472if { (eval echo configure:2473: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
ba4481b5
DL
2473 rm -rf conftest*
2474 ac_cv_decl_sys_siglist=yes
2475else
2476 echo "configure: failed program was:" >&5
2477 cat conftest.$ac_ext >&5
2478 rm -rf conftest*
2479 ac_cv_decl_sys_siglist=no
2480fi
2481rm -f conftest*
2482fi
2483
2484echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
2485if test $ac_cv_decl_sys_siglist = yes; then
2486 cat >> confdefs.h <<\EOF
2487#define SYS_SIGLIST_DECLARED 1
2488EOF
2489
2490fi
2491
2492
2493echo $ac_n "checking for struct utimbuf""... $ac_c" 1>&6
7397acc4 2494echo "configure:2495: checking for struct utimbuf" >&5
ba4481b5
DL
2495if eval "test \"`echo '$''{'emacs_cv_struct_utimbuf'+set}'`\" = set"; then
2496 echo $ac_n "(cached) $ac_c" 1>&6
2497else
2498 cat > conftest.$ac_ext <<EOF
7397acc4 2499#line 2500 "configure"
ba4481b5
DL
2500#include "confdefs.h"
2501#ifdef TIME_WITH_SYS_TIME
2502#include <sys/time.h>
2503#include <time.h>
2504#else
2505#ifdef HAVE_SYS_TIME_H
2506#include <sys/time.h>
2507#else
2508#include <time.h>
2509#endif
2510#endif
2511#ifdef HAVE_UTIME_H
2512#include <utime.h>
2513#endif
2514int main() {
2515static struct utimbuf x; x.actime = x.modtime;
2516; return 0; }
2517EOF
7397acc4 2518if { (eval echo configure:2519: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
ba4481b5
DL
2519 rm -rf conftest*
2520 emacs_cv_struct_utimbuf=yes
2521else
2522 echo "configure: failed program was:" >&5
2523 cat conftest.$ac_ext >&5
2524 rm -rf conftest*
2525 emacs_cv_struct_utimbuf=no
2526fi
2527rm -f conftest*
2528fi
2529
2530echo "$ac_t""$emacs_cv_struct_utimbuf" 1>&6
2531if test $emacs_cv_struct_utimbuf = yes; then
2532 cat >> confdefs.h <<\EOF
2533#define HAVE_STRUCT_UTIMBUF 1
2534EOF
2535
2536fi
2537
2538echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
7397acc4 2539echo "configure:2540: checking return type of signal handlers" >&5
ba4481b5
DL
2540if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2541 echo $ac_n "(cached) $ac_c" 1>&6
2542else
2543 cat > conftest.$ac_ext <<EOF
7397acc4 2544#line 2545 "configure"
ba4481b5
DL
2545#include "confdefs.h"
2546#include <sys/types.h>
2547#include <signal.h>
2548#ifdef signal
2549#undef signal
2550#endif
2551#ifdef __cplusplus
2552extern "C" void (*signal (int, void (*)(int)))(int);
2553#else
2554void (*signal ()) ();
2555#endif
2556
2557int main() {
2558int i;
2559; return 0; }
2560EOF
7397acc4 2561if { (eval echo configure:2562: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
ba4481b5
DL
2562 rm -rf conftest*
2563 ac_cv_type_signal=void
2564else
2565 echo "configure: failed program was:" >&5
2566 cat conftest.$ac_ext >&5
2567 rm -rf conftest*
2568 ac_cv_type_signal=int
2569fi
2570rm -f conftest*
2571fi
2572
2573echo "$ac_t""$ac_cv_type_signal" 1>&6
2574cat >> confdefs.h <<EOF
2575#define RETSIGTYPE $ac_cv_type_signal
2576EOF
2577
2578
2579
2580echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
7397acc4 2581echo "configure:2582: checking for struct timeval" >&5
ba4481b5
DL
2582if eval "test \"`echo '$''{'emacs_cv_struct_timeval'+set}'`\" = set"; then
2583 echo $ac_n "(cached) $ac_c" 1>&6
2584else
2585 cat > conftest.$ac_ext <<EOF
7397acc4 2586#line 2587 "configure"
ba4481b5
DL
2587#include "confdefs.h"
2588#ifdef TIME_WITH_SYS_TIME
2589#include <sys/time.h>
2590#include <time.h>
2591#else
2592#ifdef HAVE_SYS_TIME_H
2593#include <sys/time.h>
2594#else
2595#include <time.h>
2596#endif
2597#endif
2598int main() {
2599static struct timeval x; x.tv_sec = x.tv_usec;
2600; return 0; }
2601EOF
7397acc4 2602if { (eval echo configure:2603: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
ba4481b5
DL
2603 rm -rf conftest*
2604 emacs_cv_struct_timeval=yes
2605else
2606 echo "configure: failed program was:" >&5
2607 cat conftest.$ac_ext >&5
2608 rm -rf conftest*
2609 emacs_cv_struct_timeval=no
2610fi
2611rm -f conftest*
2612fi
2613
2614echo "$ac_t""$emacs_cv_struct_timeval" 1>&6
2615HAVE_TIMEVAL=$emacs_cv_struct_timeval
2616if test $emacs_cv_struct_timeval = yes; then
2617 cat >> confdefs.h <<\EOF
2618#define HAVE_TIMEVAL 1
2619EOF
2620
2621fi
2622
2623echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
7397acc4 2624echo "configure:2625: checking whether struct tm is in sys/time.h or time.h" >&5
ba4481b5
DL
2625if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
2626 echo $ac_n "(cached) $ac_c" 1>&6
2627else
2628 cat > conftest.$ac_ext <<EOF
7397acc4 2629#line 2630 "configure"
ba4481b5
DL
2630#include "confdefs.h"
2631#include <sys/types.h>
2632#include <time.h>
2633int main() {
2634struct tm *tp; tp->tm_sec;
2635; return 0; }
2636EOF
7397acc4 2637if { (eval echo configure:2638: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
ba4481b5
DL
2638 rm -rf conftest*
2639 ac_cv_struct_tm=time.h
2640else
2641 echo "configure: failed program was:" >&5
2642 cat conftest.$ac_ext >&5
2643 rm -rf conftest*
2644 ac_cv_struct_tm=sys/time.h
2645fi
2646rm -f conftest*
2647fi
2648
2649echo "$ac_t""$ac_cv_struct_tm" 1>&6
2650if test $ac_cv_struct_tm = sys/time.h; then
2651 cat >> confdefs.h <<\EOF
2652#define TM_IN_SYS_TIME 1
2653EOF
2654
2655fi
2656
2657echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
7397acc4 2658echo "configure:2659: checking for tm_zone in struct tm" >&5
ba4481b5
DL
2659if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
2660 echo $ac_n "(cached) $ac_c" 1>&6
2661else
2662 cat > conftest.$ac_ext <<EOF
7397acc4 2663#line 2664 "configure"
ba4481b5
DL
2664#include "confdefs.h"
2665#include <sys/types.h>
2666#include <$ac_cv_struct_tm>
2667int main() {
2668struct tm tm; tm.tm_zone;
2669; return 0; }
2670EOF
7397acc4 2671if { (eval echo configure:2672: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
ba4481b5
DL
2672 rm -rf conftest*
2673 ac_cv_struct_tm_zone=yes
2674else
2675 echo "configure: failed program was:" >&5
2676 cat conftest.$ac_ext >&5
2677 rm -rf conftest*
2678 ac_cv_struct_tm_zone=no
2679fi
2680rm -f conftest*
2681fi
2682
2683echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
2684if test "$ac_cv_struct_tm_zone" = yes; then
2685 cat >> confdefs.h <<\EOF
2686#define HAVE_TM_ZONE 1
2687EOF
2688
2689else
2690 echo $ac_n "checking for tzname""... $ac_c" 1>&6
7397acc4 2691echo "configure:2692: checking for tzname" >&5
ba4481b5
DL
2692if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
2693 echo $ac_n "(cached) $ac_c" 1>&6
2694else
2695 cat > conftest.$ac_ext <<EOF
7397acc4 2696#line 2697 "configure"
ba4481b5
DL
2697#include "confdefs.h"
2698#include <time.h>
2699#ifndef tzname /* For SGI. */
2700extern char *tzname[]; /* RS6000 and others reject char **tzname. */
2701#endif
2702int main() {
2703atoi(*tzname);
2704; return 0; }
2705EOF
7397acc4 2706if { (eval echo configure:2707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ba4481b5
DL
2707 rm -rf conftest*
2708 ac_cv_var_tzname=yes
2709else
2710 echo "configure: failed program was:" >&5
2711 cat conftest.$ac_ext >&5
2712 rm -rf conftest*
2713 ac_cv_var_tzname=no
2714fi
2715rm -f conftest*
2716fi
2717
2718echo "$ac_t""$ac_cv_var_tzname" 1>&6
2719 if test $ac_cv_var_tzname = yes; then
2720 cat >> confdefs.h <<\EOF
2721#define HAVE_TZNAME 1
2722EOF
2723
2724 fi
2725fi
2726
1113b624 2727echo $ac_n "checking for tm_gmtoff in struct tm""... $ac_c" 1>&6
7397acc4 2728echo "configure:2729: checking for tm_gmtoff in struct tm" >&5
1113b624
PE
2729if eval "test \"`echo '$''{'emacs_cv_tm_gmtoff'+set}'`\" = set"; then
2730 echo $ac_n "(cached) $ac_c" 1>&6
2731else
2732 cat > conftest.$ac_ext <<EOF
7397acc4 2733#line 2734 "configure"
1113b624
PE
2734#include "confdefs.h"
2735#include <time.h>
2736int main() {
2737struct tm t; t.tm_gmtoff = 0
2738; return 0; }
2739EOF
7397acc4 2740if { (eval echo configure:2741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1113b624
PE
2741 rm -rf conftest*
2742 emacs_cv_tm_gmtoff=yes
2743else
2744 echo "configure: failed program was:" >&5
2745 cat conftest.$ac_ext >&5
2746 rm -rf conftest*
2747 emacs_cv_tm_gmtoff=no
2748fi
2749rm -f conftest*
2750fi
2751
2752echo "$ac_t""$emacs_cv_tm_gmtoff" 1>&6
2753if test $emacs_cv_tm_gmtoff = yes; then
2754 cat >> confdefs.h <<\EOF
2755#define HAVE_TM_GMTOFF 1
2756EOF
2757
2758fi
ba4481b5 2759
7397acc4
DL
2760
2761echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
2762echo "configure:2763: checking for ${CC-cc} option to accept ANSI C" >&5
2763if eval "test \"`echo '$''{'ac_cv_prog_cc_stdc'+set}'`\" = set"; then
2764 echo $ac_n "(cached) $ac_c" 1>&6
2765else
2766 ac_cv_prog_cc_stdc=no
2767ac_save_CC="$CC"
2768# Don't try gcc -ansi; that turns off useful extensions and
2769# breaks some systems' header files.
2770# AIX -qlanglvl=ansi
2771# Ultrix and OSF/1 -std1
2772# HP-UX 10.20 and later -Ae
2773# HP-UX older versions -Aa -D_HPUX_SOURCE
2774# SVR4 -Xc -D__EXTENSIONS__
2775for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2776do
2777 CC="$ac_save_CC $ac_arg"
2778 cat > conftest.$ac_ext <<EOF
2779#line 2780 "configure"
2780#include "confdefs.h"
2781#include <stdarg.h>
2782#include <stdio.h>
2783#include <sys/types.h>
2784#include <sys/stat.h>
2785/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2786struct buf { int x; };
2787FILE * (*rcsopen) (struct buf *, struct stat *, int);
2788static char *e (p, i)
2789 char **p;
2790 int i;
2791{
2792 return p[i];
2793}
2794static char *f (char * (*g) (char **, int), char **p, ...)
2795{
2796 char *s;
2797 va_list v;
2798 va_start (v,p);
2799 s = g (p, va_arg (v,int));
2800 va_end (v);
2801 return s;
2802}
2803int test (int i, double x);
2804struct s1 {int (*f) (int a);};
2805struct s2 {int (*f) (double a);};
2806int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2807int argc;
2808char **argv;
2809int main() {
2810return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2811; return 0; }
2812EOF
2813if { (eval echo configure:2814: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2814 rm -rf conftest*
2815 ac_cv_prog_cc_stdc="$ac_arg"; break
2816else
2817 echo "configure: failed program was:" >&5
2818 cat conftest.$ac_ext >&5
2819fi
2820rm -f conftest*
2821done
2822CC="$ac_save_CC"
2823
2824fi
2825
2826case "x$ac_cv_prog_cc_stdc" in
2827 x|xno)
2828 echo "$ac_t""none needed" 1>&6 ;;
2829 *)
2830 echo "$ac_t""$ac_cv_prog_cc_stdc" 1>&6
2831 CC="$CC $ac_cv_prog_cc_stdc" ;;
2832esac
2833
2834echo $ac_n "checking for function prototypes""... $ac_c" 1>&6
2835echo "configure:2836: checking for function prototypes" >&5
2836if test "$ac_cv_prog_cc_stdc" != no; then
2837 echo "$ac_t""yes" 1>&6
2838 cat >> confdefs.h <<\EOF
2839#define PROTOTYPES 1
2840EOF
2841
2842else
2843 echo "$ac_t""no" 1>&6
2844fi
2845
2846echo $ac_n "checking for working volatile""... $ac_c" 1>&6
2847echo "configure:2848: checking for working volatile" >&5
2848if eval "test \"`echo '$''{'ac_cv_c_volatile'+set}'`\" = set"; then
2849 echo $ac_n "(cached) $ac_c" 1>&6
2850else
2851 cat > conftest.$ac_ext <<EOF
2852#line 2853 "configure"
2853#include "confdefs.h"
2854
2855int main() {
2856
2857volatile int x;
2858int * volatile y;
2859; return 0; }
2860EOF
2861if { (eval echo configure:2862: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2862 rm -rf conftest*
2863 ac_cv_c_volatile=yes
2864else
2865 echo "configure: failed program was:" >&5
2866 cat conftest.$ac_ext >&5
2867 rm -rf conftest*
2868 ac_cv_c_volatile=no
2869fi
2870rm -f conftest*
2871fi
2872
2873echo "$ac_t""$ac_cv_c_volatile" 1>&6
2874if test $ac_cv_c_volatile = no; then
2875 cat >> confdefs.h <<\EOF
2876#define volatile
2877EOF
2878
2879fi
2880
ba4481b5 2881echo $ac_n "checking for working const""... $ac_c" 1>&6
7397acc4 2882echo "configure:2883: checking for working const" >&5
ba4481b5
DL
2883if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2884 echo $ac_n "(cached) $ac_c" 1>&6
2885else
2886 cat > conftest.$ac_ext <<EOF
7397acc4 2887#line 2888 "configure"
ba4481b5
DL
2888#include "confdefs.h"
2889
2890int main() {
2891
2892/* Ultrix mips cc rejects this. */
7397acc4 2893typedef int charset[2]; const charset x = {0,0};
ba4481b5
DL
2894/* SunOS 4.1.1 cc rejects this. */
2895char const *const *ccp;
2896char **p;
2897/* NEC SVR4.0.2 mips cc rejects this. */
2898struct point {int x, y;};
2899static struct point const zero = {0,0};
2900/* AIX XL C 1.02.0.0 rejects this.
2901 It does not let you subtract one const X* pointer from another in an arm
2902 of an if-expression whose if-part is not a constant expression */
2903const char *g = "string";
2904ccp = &g + (g ? g-g : 0);
2905/* HPUX 7.0 cc rejects these. */
2906++ccp;
2907p = (char**) ccp;
2908ccp = (char const *const *) p;
2909{ /* SCO 3.2v4 cc rejects this. */
2910 char *t;
2911 char const *s = 0 ? (char *) 0 : (char const *) 0;
2912
2913 *t++ = 0;
2914}
2915{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
2916 int x[] = {25, 17};
2917 const int *foo = &x[0];
2918 ++foo;
2919}
2920{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2921 typedef const int *iptr;
2922 iptr p = 0;
2923 ++p;
2924}
2925{ /* AIX XL C 1.02.0.0 rejects this saying
2926 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2927 struct s { int j; const int *ap[3]; };
2928 struct s *b; b->j = 5;
2929}
2930{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2931 const int foo = 10;
2932}
2933
2934; return 0; }
2935EOF
7397acc4 2936if { (eval echo configure:2937: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
ba4481b5
DL
2937 rm -rf conftest*
2938 ac_cv_c_const=yes
2939else
2940 echo "configure: failed program was:" >&5
2941 cat conftest.$ac_ext >&5
2942 rm -rf conftest*
2943 ac_cv_c_const=no
2944fi
2945rm -f conftest*
2946fi
2947
2948echo "$ac_t""$ac_cv_c_const" 1>&6
2949if test $ac_cv_c_const = no; then
2950 cat >> confdefs.h <<\EOF
2951#define const
2952EOF
2953
2954fi
2955
7397acc4
DL
2956echo $ac_n "checking for inline""... $ac_c" 1>&6
2957echo "configure:2958: checking for inline" >&5
2958if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
2959 echo $ac_n "(cached) $ac_c" 1>&6
2960else
2961 ac_cv_c_inline=no
2962for ac_kw in inline __inline__ __inline; do
2963 cat > conftest.$ac_ext <<EOF
2964#line 2965 "configure"
2965#include "confdefs.h"
2966
2967int main() {
2968} int $ac_kw foo() {
2969; return 0; }
2970EOF
2971if { (eval echo configure:2972: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2972 rm -rf conftest*
2973 ac_cv_c_inline=$ac_kw; break
2974else
2975 echo "configure: failed program was:" >&5
2976 cat conftest.$ac_ext >&5
2977fi
2978rm -f conftest*
2979done
2980
2981fi
2982
2983echo "$ac_t""$ac_cv_c_inline" 1>&6
2984case "$ac_cv_c_inline" in
2985 inline | yes) ;;
2986 no) cat >> confdefs.h <<\EOF
2987#define inline
2988EOF
2989 ;;
2990 *) cat >> confdefs.h <<EOF
2991#define inline $ac_cv_c_inline
2992EOF
2993 ;;
2994esac
2995
2996echo $ac_n "checking for void * support""... $ac_c" 1>&6
2997echo "configure:2998: checking for void * support" >&5
2998if eval "test \"`echo '$''{'emacs_cv_void_star'+set}'`\" = set"; then
2999 echo $ac_n "(cached) $ac_c" 1>&6
3000else
3001 cat > conftest.$ac_ext <<EOF
3002#line 3003 "configure"
3003#include "confdefs.h"
3004
3005int main() {
3006void * foo;
3007; return 0; }
3008EOF
3009if { (eval echo configure:3010: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3010 rm -rf conftest*
3011 emacs_cv_void_star=yes
3012else
3013 echo "configure: failed program was:" >&5
3014 cat conftest.$ac_ext >&5
3015 rm -rf conftest*
3016 emacs_cv_void_star=no
3017fi
3018rm -f conftest*
3019fi
3020
3021echo "$ac_t""$emacs_cv_void_star" 1>&6
3022if test $emacs_cv_void_star = yes; then
3023 cat >> confdefs.h <<\EOF
3024#define POINTER_TYPE void
3025EOF
3026
3027else
3028 cat >> confdefs.h <<\EOF
3029#define POINTER_TYPE char
3030EOF
3031
3032fi
ba4481b5
DL
3033
3034echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
7397acc4 3035echo "configure:3036: checking whether ${MAKE-make} sets \${MAKE}" >&5
ba4481b5
DL
3036set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
3037if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
3038 echo $ac_n "(cached) $ac_c" 1>&6
3039else
3040 cat > conftestmake <<\EOF
3041all:
3042 @echo 'ac_maketemp="${MAKE}"'
3043EOF
3044# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3045eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
3046if test -n "$ac_maketemp"; then
3047 eval ac_cv_prog_make_${ac_make}_set=yes
3048else
3049 eval ac_cv_prog_make_${ac_make}_set=no
3050fi
3051rm -f conftestmake
3052fi
3053if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3054 echo "$ac_t""yes" 1>&6
3055 SET_MAKE=
3056else
3057 echo "$ac_t""no" 1>&6
3058 SET_MAKE="MAKE=${MAKE-make}"
3059fi
3060
3061
3062echo $ac_n "checking for long file names""... $ac_c" 1>&6
7397acc4 3063echo "configure:3064: checking for long file names" >&5
ba4481b5
DL
3064if eval "test \"`echo '$''{'ac_cv_sys_long_file_names'+set}'`\" = set"; then
3065 echo $ac_n "(cached) $ac_c" 1>&6
3066else
3067 ac_cv_sys_long_file_names=yes
3068# Test for long file names in all the places we know might matter:
3069# . the current directory, where building will happen
3070# $prefix/lib where we will be installing things
3071# $exec_prefix/lib likewise
3072# eval it to expand exec_prefix.
3073# $TMPDIR if set, where it might want to write temporary files
3074# if $TMPDIR is not set:
3075# /tmp where it might want to write temporary files
3076# /var/tmp likewise
3077# /usr/tmp likewise
3078if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3079 ac_tmpdirs="$TMPDIR"
3080else
3081 ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3082fi
3083for ac_dir in . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3084 test -d $ac_dir || continue
3085 test -w $ac_dir || continue # It is less confusing to not echo anything here.
3086 (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
3087 (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
3088 val=`cat $ac_dir/conftest9012345 2>/dev/null`
3089 if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
3090 ac_cv_sys_long_file_names=no
3091 rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
3092 break
3093 fi
3094 rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
3095done
3096fi
3097
3098echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
3099if test $ac_cv_sys_long_file_names = yes; then
3100 cat >> confdefs.h <<\EOF
3101#define HAVE_LONG_FILE_NAMES 1
3102EOF
3103
3104fi
3105
3106
3107#### Choose a window system.
3108
3109# If we find X, set shell vars x_includes and x_libraries to the
3110# paths, otherwise set no_x=yes.
3111# Uses ac_ vars as temps to allow command line to override cache and checks.
3112# --without-x overrides everything else, but does not touch the cache.
3113echo $ac_n "checking for X""... $ac_c" 1>&6
7397acc4 3114echo "configure:3115: checking for X" >&5
ba4481b5
DL
3115
3116# Check whether --with-x or --without-x was given.
3117if test "${with_x+set}" = set; then
3118 withval="$with_x"
3119 :
3120fi
3121
3122# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
3123if test "x$with_x" = xno; then
3124 # The user explicitly disabled X.
3125 have_x=disabled
3126else
3127 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
3128 # Both variables are already set.
3129 have_x=yes
3130 else
3131if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
3132 echo $ac_n "(cached) $ac_c" 1>&6
3133else
3134 # One or both of the vars are not set, and there is no cached value.
3135ac_x_includes=NO ac_x_libraries=NO
3136rm -fr conftestdir
3137if mkdir conftestdir; then
3138 cd conftestdir
3139 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
3140 cat > Imakefile <<'EOF'
3141acfindx:
3142 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
3143EOF
3144 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
3145 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3146 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
3147 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
3148 for ac_extension in a so sl; do
3149 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
3150 test -f $ac_im_libdir/libX11.$ac_extension; then
3151 ac_im_usrlibdir=$ac_im_libdir; break
3152 fi
3153 done
3154 # Screen out bogus values from the imake configuration. They are
3155 # bogus both because they are the default anyway, and because
3156 # using them would break gcc on systems where it needs fixed includes.
3157 case "$ac_im_incroot" in
3158 /usr/include) ;;
3159 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
3160 esac
3161 case "$ac_im_usrlibdir" in
3162 /usr/lib | /lib) ;;
3163 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
3164 esac
3165 fi
3166 cd ..
3167 rm -fr conftestdir
3168fi
3169
3170if test "$ac_x_includes" = NO; then
3171 # Guess where to find include files, by looking for this one X11 .h file.
3172 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
3173
3174 # First, try using that file with no special directory specified.
3175cat > conftest.$ac_ext <<EOF
7397acc4 3176#line 3177 "configure"
ba4481b5
DL
3177#include "confdefs.h"
3178#include <$x_direct_test_include>
3179EOF
3180ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7397acc4 3181{ (eval echo configure:3182: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c4bb2108 3182ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
ba4481b5
DL
3183if test -z "$ac_err"; then
3184 rm -rf conftest*
3185 # We can compile using X headers with no special include directory.
3186ac_x_includes=
3187else
3188 echo "$ac_err" >&5
3189 echo "configure: failed program was:" >&5
3190 cat conftest.$ac_ext >&5
3191 rm -rf conftest*
3192 # Look for the header file in a standard set of common directories.
3193# Check X11 before X11Rn because it is often a symlink to the current release.
3194 for ac_dir in \
3195 /usr/X11/include \
3196 /usr/X11R6/include \
3197 /usr/X11R5/include \
3198 /usr/X11R4/include \
3199 \
3200 /usr/include/X11 \
3201 /usr/include/X11R6 \
3202 /usr/include/X11R5 \
3203 /usr/include/X11R4 \
3204 \
3205 /usr/local/X11/include \
3206 /usr/local/X11R6/include \
3207 /usr/local/X11R5/include \
3208 /usr/local/X11R4/include \
3209 \
3210 /usr/local/include/X11 \
3211 /usr/local/include/X11R6 \
3212 /usr/local/include/X11R5 \
3213 /usr/local/include/X11R4 \
3214 \
3215 /usr/X386/include \
3216 /usr/x386/include \
3217 /usr/XFree86/include/X11 \
3218 \
3219 /usr/include \
3220 /usr/local/include \
3221 /usr/unsupported/include \
3222 /usr/athena/include \
3223 /usr/local/x11r5/include \
3224 /usr/lpp/Xamples/include \
3225 \
3226 /usr/openwin/include \
3227 /usr/openwin/share/include \
3228 ; \
3229 do
3230 if test -r "$ac_dir/$x_direct_test_include"; then
3231 ac_x_includes=$ac_dir
3232 break
3233 fi
3234 done
3235fi
3236rm -f conftest*
3237fi # $ac_x_includes = NO
3238
3239if test "$ac_x_libraries" = NO; then
3240 # Check for the libraries.
3241
3242 test -z "$x_direct_test_library" && x_direct_test_library=Xt
3243 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
3244
3245 # See if we find them without any special options.
3246 # Don't add to $LIBS permanently.
3247 ac_save_LIBS="$LIBS"
3248 LIBS="-l$x_direct_test_library $LIBS"
3249cat > conftest.$ac_ext <<EOF
7397acc4 3250#line 3251 "configure"
ba4481b5
DL
3251#include "confdefs.h"
3252
3253int main() {
3254${x_direct_test_function}()
3255; return 0; }
3256EOF
7397acc4 3257if { (eval echo configure:3258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ba4481b5
DL
3258 rm -rf conftest*
3259 LIBS="$ac_save_LIBS"
3260# We can link X programs with no special library path.
3261ac_x_libraries=
3262else
3263 echo "configure: failed program was:" >&5
3264 cat conftest.$ac_ext >&5
3265 rm -rf conftest*
3266 LIBS="$ac_save_LIBS"
3267# First see if replacing the include by lib works.
3268# Check X11 before X11Rn because it is often a symlink to the current release.
3269for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
3270 /usr/X11/lib \
3271 /usr/X11R6/lib \
3272 /usr/X11R5/lib \
3273 /usr/X11R4/lib \
3274 \
3275 /usr/lib/X11 \
3276 /usr/lib/X11R6 \
3277 /usr/lib/X11R5 \
3278 /usr/lib/X11R4 \
3279 \
3280 /usr/local/X11/lib \
3281 /usr/local/X11R6/lib \
3282 /usr/local/X11R5/lib \
3283 /usr/local/X11R4/lib \
3284 \
3285 /usr/local/lib/X11 \
3286 /usr/local/lib/X11R6 \
3287 /usr/local/lib/X11R5 \
3288 /usr/local/lib/X11R4 \
3289 \
3290 /usr/X386/lib \
3291 /usr/x386/lib \
3292 /usr/XFree86/lib/X11 \
3293 \
3294 /usr/lib \
3295 /usr/local/lib \
3296 /usr/unsupported/lib \
3297 /usr/athena/lib \
3298 /usr/local/x11r5/lib \
3299 /usr/lpp/Xamples/lib \
3300 /lib/usr/lib/X11 \
3301 \
3302 /usr/openwin/lib \
3303 /usr/openwin/share/lib \
3304 ; \
3305do
3306 for ac_extension in a so sl; do
3307 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
3308 ac_x_libraries=$ac_dir
3309 break 2
3310 fi
3311 done
3312done
3313fi
3314rm -f conftest*
3315fi # $ac_x_libraries = NO
3316
3317if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
3318 # Didn't find X anywhere. Cache the known absence of X.
3319 ac_cv_have_x="have_x=no"
3320else
3321 # Record where we found X for the cache.
3322 ac_cv_have_x="have_x=yes \
3323 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
3324fi
3325fi
3326 fi
3327 eval "$ac_cv_have_x"
3328fi # $with_x != no
3329
3330if test "$have_x" != yes; then
3331 echo "$ac_t""$have_x" 1>&6
3332 no_x=yes
3333else
3334 # If each of the values was on the command line, it overrides each guess.
3335 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
3336 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
3337 # Update the cache value to reflect the command line values.
3338 ac_cv_have_x="have_x=yes \
3339 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
3340 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
3341fi
3342
3343if test "$no_x" = yes; then
3344 window_system=none
3345else
3346 window_system=x11
3347fi
3348
3349if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
3350 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
3351 LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"`
3352 x_default_search_path=""
3353 for x_library in `echo ${x_libraries} | sed -e "s/:/ /g"`; do
3354 x_search_path="${x_library}/X11/%L/%T/%N%C%S:\
3355${x_library}/X11/%L/%T/%N%C%S:${x_libary}/X11/%l/%T/%N%C%S:\
3356${x_library}/X11/%T/%N%C%S:${x_library}/X11/%L/%T/%N%S:\
3357${x_library}/X11/%l/%T/%N%S:${x_library}/X11/%T/%N%S"
3358 if test x"${x_default_search_path}" = x; then
3359 x_default_search_path=${x_search_path}
3360 else
3361 x_default_search_path="${x_search_path}:${x_default_search_path}"
3362 fi
3363 done
3364fi
3365if test "${x_includes}" != NONE && test -n "${x_includes}"; then
3366 C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"`
3367fi
3368
3369if test x"${x_includes}" = x; then
3370 bitmapdir=/usr/include/X11/bitmaps
3371else
3372 # accumulate include directories that have X11 bitmap subdirectories
3373 bmd_acc="dummyval"
3374 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
3375 if test -d "${bmd}/X11/bitmaps"; then
3376 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
946173ad
DL
3377 fi
3378 if test -d "${bmd}/bitmaps"; then
ba4481b5
DL
3379 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
3380 fi
3381 done
3382 if test ${bmd_acc} != "dummyval"; then
3383 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
3384 fi
3385fi
3386
3387case "${window_system}" in
3388 x11 )
3389 HAVE_X_WINDOWS=yes
3390 HAVE_X11=yes
3391 case "${with_x_toolkit}" in
3392 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
3393 motif ) USE_X_TOOLKIT=MOTIF ;;
3394 no ) USE_X_TOOLKIT=none ;;
3395 * ) USE_X_TOOLKIT=maybe ;;
3396 esac
3397 ;;
3398 none )
3399 HAVE_X_WINDOWS=no
3400 HAVE_X11=no
3401 USE_X_TOOLKIT=none
3402 ;;
3403esac
3404
3405### If we're using X11, we should use the X menu package.
3406HAVE_MENUS=no
3407case ${HAVE_X11} in
3408 yes ) HAVE_MENUS=yes ;;
3409esac
3410
3411if test "${opsys}" = "hpux9"; then
3412 case "${x_libraries}" in
3413 *X11R4* )
3414 opsysfile="s/hpux9-x11r4.h"
3415 ;;
3416 esac
3417fi
3418
3419if test "${opsys}" = "hpux9shr"; then
3420 case "${x_libraries}" in
3421 *X11R4* )
3422 opsysfile="s/hpux9shxr4.h"
3423 ;;
3424 esac
3425fi
3426
3427#### Extract some information from the operating system and machine files.
3428
3429echo "checking the machine- and system-dependent files to find out
3430 - which libraries the lib-src programs will want, and
3431 - whether the GNU malloc routines are usable" 1>&6
7397acc4 3432echo "configure:3433: checking the machine- and system-dependent files to find out
ba4481b5
DL
3433 - which libraries the lib-src programs will want, and
3434 - whether the GNU malloc routines are usable" >&5
3435
3436### First figure out CFLAGS (which we use for running the compiler here)
3437### and REAL_CFLAGS (which we use for real compilation).
3438### The two are the same except on a few systems, where they are made
3439### different to work around various lossages. For example,
3440### GCC 2.5 on GNU/Linux needs them to be different because it treats -g
3441### as implying static linking.
3442
3443### If the CFLAGS env var is specified, we use that value
3444### instead of the default.
3445
3446### It's not important that this name contain the PID; you can't run
3447### two configures in the same directory and have anything work
3448### anyway.
3449tempcname="conftest.c"
3450
3451echo '
3452#include "'${srcdir}'/src/'${opsysfile}'"
3453#include "'${srcdir}'/src/'${machfile}'"
3454#ifndef LIBS_MACHINE
3455#define LIBS_MACHINE
3456#endif
3457#ifndef LIBS_SYSTEM
3458#define LIBS_SYSTEM
3459#endif
3460#ifndef C_SWITCH_SYSTEM
3461#define C_SWITCH_SYSTEM
3462#endif
3463#ifndef C_SWITCH_MACHINE
3464#define C_SWITCH_MACHINE
3465#endif
3466configure___ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM
3467configure___ c_switch_system=C_SWITCH_SYSTEM
3468configure___ c_switch_machine=C_SWITCH_MACHINE
3469
3470#ifndef LIB_X11_LIB
3471#define LIB_X11_LIB -lX11
3472#endif
3473
3474#ifndef LIBX11_MACHINE
3475#define LIBX11_MACHINE
3476#endif
3477
3478#ifndef LIBX11_SYSTEM
3479#define LIBX11_SYSTEM
3480#endif
3481configure___ LIBX=LIB_X11_LIB LIBX11_MACHINE LIBX11_SYSTEM
3482
3483#ifdef UNEXEC
3484configure___ unexec=UNEXEC
3485#else
3486configure___ unexec=unexec.o
3487#endif
3488
3489#ifdef SYSTEM_MALLOC
3490configure___ system_malloc=yes
3491#else
3492configure___ system_malloc=no
3493#endif
3494
3495#ifndef C_DEBUG_SWITCH
3496#define C_DEBUG_SWITCH -g
3497#endif
3498
3499#ifndef C_OPTIMIZE_SWITCH
ed4d0512
GM
3500#ifdef __GNUC__
3501#define C_OPTIMIZE_SWITCH -O2
3502#else
ba4481b5
DL
3503#define C_OPTIMIZE_SWITCH -O
3504#endif
ed4d0512 3505#endif
ba4481b5
DL
3506
3507#ifndef LD_SWITCH_MACHINE
3508#define LD_SWITCH_MACHINE
3509#endif
3510
3511#ifndef LD_SWITCH_SYSTEM
3512#define LD_SWITCH_SYSTEM
3513#endif
3514
3515#ifndef LD_SWITCH_X_SITE_AUX
3516#define LD_SWITCH_X_SITE_AUX
3517#endif
3518
3519configure___ ld_switch_system=LD_SWITCH_SYSTEM
3520configure___ ld_switch_machine=LD_SWITCH_MACHINE
3521
3522#ifdef THIS_IS_CONFIGURE
3523
3524/* Get the CFLAGS for tests in configure. */
3525#ifdef __GNUC__
3526configure___ CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
3527#else
3528configure___ CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
3529#endif
3530
3531#else /* not THIS_IS_CONFIGURE */
3532
3533/* Get the CFLAGS for real compilation. */
3534#ifdef __GNUC__
3535configure___ REAL_CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
3536#else
3537configure___ REAL_CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
3538#endif
3539
3540#endif /* not THIS_IS_CONFIGURE */
3541' > ${tempcname}
3542
3543# The value of CPP is a quoted variable reference, so we need to do this
3544# to get its actual value...
3545CPP=`eval "echo $CPP"`
3546eval `${CPP} -Isrc ${tempcname} \
3547 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
3548if test "x$SPECIFIED_CFLAGS" = x; then
3549 eval `${CPP} -Isrc -DTHIS_IS_CONFIGURE ${tempcname} \
3550 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
3551else
3552 REAL_CFLAGS="$CFLAGS"
3553fi
3554rm ${tempcname}
3555
3556ac_link="$ac_link $ld_switch_machine $ld_switch_system"
3557
3558### Compute the unexec source name from the object name.
3559UNEXEC_SRC="`echo ${unexec} | sed 's/\.o/.c/'`"
3560
3561# Do the opsystem or machine files prohibit the use of the GNU malloc?
3562# Assume not, until told otherwise.
3563GNU_MALLOC=yes
3564doug_lea_malloc=yes
3565echo $ac_n "checking for malloc_get_state""... $ac_c" 1>&6
7397acc4 3566echo "configure:3567: checking for malloc_get_state" >&5
ba4481b5
DL
3567if eval "test \"`echo '$''{'ac_cv_func_malloc_get_state'+set}'`\" = set"; then
3568 echo $ac_n "(cached) $ac_c" 1>&6
3569else
3570 cat > conftest.$ac_ext <<EOF
7397acc4 3571#line 3572 "configure"
ba4481b5
DL
3572#include "confdefs.h"
3573/* System header to define __stub macros and hopefully few prototypes,
3574 which can conflict with char malloc_get_state(); below. */
3575#include <assert.h>
3576/* Override any gcc2 internal prototype to avoid an error. */
3577/* We use char because int might match the return type of a gcc2
3578 builtin and then its argument prototype would still apply. */
3579char malloc_get_state();
3580
3581int main() {
3582
3583/* The GNU C library defines this for functions which it implements
3584 to always fail with ENOSYS. Some functions are actually named
3585 something starting with __ and the normal name is an alias. */
3586#if defined (__stub_malloc_get_state) || defined (__stub___malloc_get_state)
3587choke me
3588#else
a21616bd 3589malloc_get_state();
ba4481b5
DL
3590#endif
3591
3592; return 0; }
3593EOF
7397acc4 3594if { (eval echo configure:3595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ba4481b5
DL
3595 rm -rf conftest*
3596 eval "ac_cv_func_malloc_get_state=yes"
3597else
3598 echo "configure: failed program was:" >&5
3599 cat conftest.$ac_ext >&5
3600 rm -rf conftest*
3601 eval "ac_cv_func_malloc_get_state=no"
3602fi
3603rm -f conftest*
3604fi
3605
3606if eval "test \"`echo '$ac_cv_func_'malloc_get_state`\" = yes"; then
3607 echo "$ac_t""yes" 1>&6
3608 :
3609else
3610 echo "$ac_t""no" 1>&6
3611doug_lea_malloc=no
3612fi
3613
3614echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6
7397acc4 3615echo "configure:3616: checking for malloc_set_state" >&5
ba4481b5
DL
3616if eval "test \"`echo '$''{'ac_cv_func_malloc_set_state'+set}'`\" = set"; then
3617 echo $ac_n "(cached) $ac_c" 1>&6
3618else
3619 cat > conftest.$ac_ext <<EOF
7397acc4 3620#line 3621 "configure"
ba4481b5
DL
3621#include "confdefs.h"
3622/* System header to define __stub macros and hopefully few prototypes,
3623 which can conflict with char malloc_set_state(); below. */
3624#include <assert.h>
3625/* Override any gcc2 internal prototype to avoid an error. */
3626/* We use char because int might match the return type of a gcc2
3627 builtin and then its argument prototype would still apply. */
3628char malloc_set_state();
3629
3630int main() {
3631
3632/* The GNU C library defines this for functions which it implements
3633 to always fail with ENOSYS. Some functions are actually named
3634 something starting with __ and the normal name is an alias. */
3635#if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
3636choke me
3637#else
a21616bd 3638malloc_set_state();
ba4481b5
DL
3639#endif
3640
3641; return 0; }
3642EOF
7397acc4 3643if { (eval echo configure:3644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ba4481b5
DL
3644 rm -rf conftest*
3645 eval "ac_cv_func_malloc_set_state=yes"
3646else
3647 echo "configure: failed program was:" >&5
3648 cat conftest.$ac_ext >&5
3649 rm -rf conftest*
3650 eval "ac_cv_func_malloc_set_state=no"
3651fi
3652rm -f conftest*
3653fi
3654
3655if eval "test \"`echo '$ac_cv_func_'malloc_set_state`\" = yes"; then
3656 echo "$ac_t""yes" 1>&6
3657 :
3658else
3659 echo "$ac_t""no" 1>&6
3660doug_lea_malloc=no
3661fi
3662
3663echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6
7397acc4 3664echo "configure:3665: checking whether __after_morecore_hook exists" >&5
ba4481b5
DL
3665if eval "test \"`echo '$''{'emacs_cv_var___after_morecore_hook'+set}'`\" = set"; then
3666 echo $ac_n "(cached) $ac_c" 1>&6
3667else
3668 cat > conftest.$ac_ext <<EOF
7397acc4 3669#line 3670 "configure"
ba4481b5
DL
3670#include "confdefs.h"
3671extern void (* __after_morecore_hook)();
3672int main() {
3673__after_morecore_hook = 0
3674; return 0; }
3675EOF
7397acc4 3676if { (eval echo configure:3677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ba4481b5
DL
3677 rm -rf conftest*
3678 emacs_cv_var___after_morecore_hook=yes
3679else
3680 echo "configure: failed program was:" >&5
3681 cat conftest.$ac_ext >&5
3682 rm -rf conftest*
3683 emacs_cv_var___after_morecore_hook=no
3684fi
3685rm -f conftest*
3686fi
3687
3688echo "$ac_t""$emacs_cv_var___after_morecore_hook" 1>&6
3689if test $emacs_cv_var___after_morecore_hook = no; then
3690 doug_lea_malloc=no
3691fi
3692if test "${system_malloc}" = "yes"; then
3693 GNU_MALLOC=no
3694 GNU_MALLOC_reason="
3695 (The GNU allocators don't work with this system configuration.)"
3696fi
3697if test "$doug_lea_malloc" = "yes" ; then
3698 if test "$GNU_MALLOC" = yes ; then
3699 GNU_MALLOC_reason="
3700 (Using Doug Lea's new malloc from the GNU C Library.)"
3701 fi
3702 cat >> confdefs.h <<\EOF
3703#define DOUG_LEA_MALLOC 1
3704EOF
3705
3706fi
3707
3708if test x"${REL_ALLOC}" = x; then
3709 REL_ALLOC=${GNU_MALLOC}
3710fi
3711
ba4481b5
DL
3712#### Add the libraries to LIBS and check for some functions.
3713
3714if test x"${OVERRIDE_CPPFLAGS}" != x; then
3715 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
3716else
3717 CPPFLAGS="$c_switch_system $c_switch_machine $CPPFLAGS"
3718fi
3719
3720LIBS="$libsrc_libs $LIBS"
3721
3722echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
7397acc4 3723echo "configure:3724: checking for dnet_ntoa in -ldnet" >&5
ba4481b5
DL
3724ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
3725if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3726 echo $ac_n "(cached) $ac_c" 1>&6
3727else
3728 ac_save_LIBS="$LIBS"
3729LIBS="-ldnet $LIBS"
3730cat > conftest.$ac_ext <<EOF
7397acc4 3731#line 3732 "configure"
ba4481b5
DL
3732#include "confdefs.h"
3733/* Override any gcc2 internal prototype to avoid an error. */
3734/* We use char because int might match the return type of a gcc2
3735 builtin and then its argument prototype would still apply. */
3736char dnet_ntoa();
3737
3738int main() {
3739dnet_ntoa()
3740; return 0; }
3741EOF
7397acc4 3742if { (eval echo configure:3743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ba4481b5
DL
3743 rm -rf conftest*
3744 eval "ac_cv_lib_$ac_lib_var=yes"
3745else
3746 echo "configure: failed program was:" >&5
3747 cat conftest.$ac_ext >&5
3748 rm -rf conftest*
3749 eval "ac_cv_lib_$ac_lib_var=no"
3750fi
3751rm -f conftest*
3752LIBS="$ac_save_LIBS"
3753
3754fi
3755if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3756 echo "$ac_t""yes" 1>&6
3757 ac_tr_lib=HAVE_LIB`echo dnet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3758 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3759 cat >> confdefs.h <<EOF
3760#define $ac_tr_lib 1
3761EOF
3762
3763 LIBS="-ldnet $LIBS"
3764
3765else
3766 echo "$ac_t""no" 1>&6
3767fi
3768
3769
3770echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
7397acc4 3771echo "configure:3772: checking for main in -lXbsd" >&5
ba4481b5
DL
3772ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
3773if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3774 echo $ac_n "(cached) $ac_c" 1>&6
3775else
3776 ac_save_LIBS="$LIBS"
3777LIBS="-lXbsd $LIBS"
3778cat > conftest.$ac_ext <<EOF
7397acc4 3779#line 3780 "configure"
ba4481b5
DL
3780#include "confdefs.h"
3781
3782int main() {
3783main()
3784; return 0; }
3785EOF
7397acc4 3786if { (eval echo configure:3787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ba4481b5
DL
3787 rm -rf conftest*
3788 eval "ac_cv_lib_$ac_lib_var=yes"
3789else
3790 echo "configure: failed program was:" >&5
3791 cat conftest.$ac_ext >&5
3792 rm -rf conftest*
3793 eval "ac_cv_lib_$ac_lib_var=no"
3794fi
3795rm -f conftest*
3796LIBS="$ac_save_LIBS"
3797
3798fi
3799if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3800 echo "$ac_t""yes" 1>&6
3801 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
3802else
3803 echo "$ac_t""no" 1>&6
3804fi
3805
3806
3807echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6
7397acc4 3808echo "configure:3809: checking for cma_open in -lpthreads" >&5
ba4481b5
DL
3809ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'`
3810if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3811 echo $ac_n "(cached) $ac_c" 1>&6
3812else
3813 ac_save_LIBS="$LIBS"
3814LIBS="-lpthreads $LIBS"
3815cat > conftest.$ac_ext <<EOF
7397acc4 3816#line 3817 "configure"
ba4481b5
DL
3817#include "confdefs.h"
3818/* Override any gcc2 internal prototype to avoid an error. */
3819/* We use char because int might match the return type of a gcc2
3820 builtin and then its argument prototype would still apply. */
3821char cma_open();
3822
3823int main() {
3824cma_open()
3825; return 0; }
3826EOF
7397acc4 3827if { (eval echo configure:3828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ba4481b5
DL
3828 rm -rf conftest*
3829 eval "ac_cv_lib_$ac_lib_var=yes"
3830else
3831 echo "configure: failed program was:" >&5
3832 cat conftest.$ac_ext >&5
3833 rm -rf conftest*
3834 eval "ac_cv_lib_$ac_lib_var=no"
3835fi
3836rm -f conftest*
3837LIBS="$ac_save_LIBS"
3838
3839fi
3840if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3841 echo "$ac_t""yes" 1>&6
3842 ac_tr_lib=HAVE_LIB`echo pthreads | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3843 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3844 cat >> confdefs.h <<EOF
3845#define $ac_tr_lib 1
3846EOF
3847
3848 LIBS="-lpthreads $LIBS"
3849
3850else
3851 echo "$ac_t""no" 1>&6
3852fi
3853
3854
3855echo $ac_n "checking for XFree86 in /usr/X386""... $ac_c" 1>&6
7397acc4 3856echo "configure:3857: checking for XFree86 in /usr/X386" >&5
ba4481b5
DL
3857if test -d /usr/X386/include; then
3858 HAVE_XFREE386=yes
3859 : ${C_SWITCH_X_SITE="-I/usr/X386/include"}
3860else
3861 HAVE_XFREE386=no
3862fi
3863echo "$ac_t""$HAVE_XFREE386" 1>&6
3864
3865# Change CFLAGS temporarily so that C_SWITCH_X_SITE gets used
3866# for the tests that follow. We set it back to REAL_CFLAGS later on.
3867
3868if test "${HAVE_X11}" = "yes"; then
3869 DEFS="$C_SWITCH_X_SITE $DEFS"
3870 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
3871 LIBS="$LIBX $LIBS"
3872 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
3873
3874 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
3875 # This is handled by LD_SWITCH_X_SITE_AUX during the real build,
3876 # but it's more convenient here to set LD_RUN_PATH
3877 # since this also works on hosts that don't understand LD_SWITCH_X_SITE_AUX.
3878 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
3879 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
3880 export LD_RUN_PATH
3881 fi
3882
3883 if test "${opsys}" = "gnu-linux"; then
3884 echo $ac_n "checking whether X on GNU/Linux needs -b to link""... $ac_c" 1>&6
7397acc4 3885echo "configure:3886: checking whether X on GNU/Linux needs -b to link" >&5
ba4481b5 3886 cat > conftest.$ac_ext <<EOF
7397acc4 3887#line 3888 "configure"
ba4481b5
DL
3888#include "confdefs.h"
3889
3890int main() {
3891XOpenDisplay ("foo");
3892; return 0; }
3893EOF
7397acc4 3894if { (eval echo configure:3895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ba4481b5
DL
3895 rm -rf conftest*
3896 xlinux_first_failure=no
3897else
3898 echo "configure: failed program was:" >&5
3899 cat conftest.$ac_ext >&5
3900 rm -rf conftest*
3901 xlinux_first_failure=yes
3902fi
3903rm -f conftest*
3904 if test "${xlinux_first_failure}" = "yes"; then
3905 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
3906 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
3907 OLD_CPPFLAGS="$CPPFLAGS"
3908 OLD_LIBS="$LIBS"
3909 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
3910 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
3911 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
3912 LIBS="$LIBS -b i486-linuxaout"
3913 cat > conftest.$ac_ext <<EOF
7397acc4 3914#line 3915 "configure"
ba4481b5
DL
3915#include "confdefs.h"
3916
3917int main() {
3918XOpenDisplay ("foo");
3919; return 0; }
3920EOF
7397acc4 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 xlinux_second_failure=no
3924else
3925 echo "configure: failed program was:" >&5
3926 cat conftest.$ac_ext >&5
3927 rm -rf conftest*
3928 xlinux_second_failure=yes
3929fi
3930rm -f conftest*
3931 if test "${xlinux_second_failure}" = "yes"; then
3932 # If we get the same failure with -b, there is no use adding -b.
3933 # So take it out. This plays safe.
3934 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
3935 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
3936 CPPFLAGS="$OLD_CPPFLAGS"
3937 LIBS="$OLD_LIBS"
3938 echo "$ac_t""no" 1>&6
3939 else
3940 echo "$ac_t""yes" 1>&6
3941 fi
3942 else
3943 echo "$ac_t""no" 1>&6
3944 fi
3945 fi
3946
3947 for ac_func in XrmSetDatabase XScreenResourceString \
3948XScreenNumberOfScreen XSetWMProtocols
3949do
3950echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7397acc4 3951echo "configure:3952: checking for $ac_func" >&5
ba4481b5
DL
3952if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3953 echo $ac_n "(cached) $ac_c" 1>&6
3954else
3955 cat > conftest.$ac_ext <<EOF
7397acc4 3956#line 3957 "configure"
ba4481b5
DL
3957#include "confdefs.h"
3958/* System header to define __stub macros and hopefully few prototypes,
3959 which can conflict with char $ac_func(); below. */
3960#include <assert.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 $ac_func();
3965
3966int main() {
3967
3968/* The GNU C library defines this for functions which it implements
3969 to always fail with ENOSYS. Some functions are actually named
3970 something starting with __ and the normal name is an alias. */
3971#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3972choke me
3973#else
a21616bd 3974$ac_func();
ba4481b5
DL
3975#endif
3976
3977; return 0; }
3978EOF
7397acc4 3979if { (eval echo configure:3980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ba4481b5
DL
3980 rm -rf conftest*
3981 eval "ac_cv_func_$ac_func=yes"
3982else
3983 echo "configure: failed program was:" >&5
3984 cat conftest.$ac_ext >&5
3985 rm -rf conftest*
3986 eval "ac_cv_func_$ac_func=no"
3987fi
3988rm -f conftest*
3989fi
3990
3991if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3992 echo "$ac_t""yes" 1>&6
3993 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3994 cat >> confdefs.h <<EOF
3995#define $ac_tr_func 1
3996EOF
3997
3998else
3999 echo "$ac_t""no" 1>&6
4000fi
4001done
4002
4003fi
4004
4005if test "${window_system}" = "x11"; then
4006 echo $ac_n "checking X11 version 6""... $ac_c" 1>&6
7397acc4 4007echo "configure:4008: checking X11 version 6" >&5
ba4481b5
DL
4008 if eval "test \"`echo '$''{'emacs_cv_x11_version_6'+set}'`\" = set"; then
4009 echo $ac_n "(cached) $ac_c" 1>&6
4010else
4011 cat > conftest.$ac_ext <<EOF
7397acc4 4012#line 4013 "configure"
ba4481b5
DL
4013#include "confdefs.h"
4014#include <X11/Xlib.h>
4015int main() {
4016#if XlibSpecificationRelease < 6
4017fail;
4018#endif
4019
4020; return 0; }
4021EOF
7397acc4 4022if { (eval echo configure:4023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ba4481b5
DL
4023 rm -rf conftest*
4024 emacs_cv_x11_version_6=yes
4025else
4026 echo "configure: failed program was:" >&5
4027 cat conftest.$ac_ext >&5
4028 rm -rf conftest*
4029 emacs_cv_x11_version_6=no
4030fi
4031rm -f conftest*
4032fi
4033
4034 if test $emacs_cv_x11_version_6 = yes; then
4035 echo "$ac_t""6 or newer" 1>&6
4036 cat >> confdefs.h <<\EOF
4037#define HAVE_X11R6 1
4038EOF
4039
4040 else
4041 echo "$ac_t""before 6" 1>&6
4042 fi
4043fi
4044
4045if test "${window_system}" = "x11"; then
4046 echo $ac_n "checking X11 version 5""... $ac_c" 1>&6
7397acc4 4047echo "configure:4048: checking X11 version 5" >&5
ba4481b5
DL
4048 if eval "test \"`echo '$''{'emacs_cv_x11_version_5'+set}'`\" = set"; then
4049 echo $ac_n "(cached) $ac_c" 1>&6
4050else
4051 cat > conftest.$ac_ext <<EOF
7397acc4 4052#line 4053 "configure"
ba4481b5
DL
4053#include "confdefs.h"
4054#include <X11/Xlib.h>
4055int main() {
4056#if XlibSpecificationRelease < 5
4057fail;
4058#endif
4059
4060; return 0; }
4061EOF
7397acc4 4062if { (eval echo configure:4063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ba4481b5
DL
4063 rm -rf conftest*
4064 emacs_cv_x11_version_5=yes
4065else
4066 echo "configure: failed program was:" >&5
4067 cat conftest.$ac_ext >&5
4068 rm -rf conftest*
4069 emacs_cv_x11_version_5=no
4070fi
4071rm -f conftest*
4072fi
4073
4074 if test $emacs_cv_x11_version_5 = yes; then
4075 echo "$ac_t""5 or newer" 1>&6
4076 HAVE_X11R5=yes
4077 cat >> confdefs.h <<\EOF
4078#define HAVE_X11R5 1
4079EOF
4080
4081 else
4082 HAVE_X11R5=no
4083 echo "$ac_t""before 5" 1>&6
4084 fi
4085fi
4086
4087if test x"${USE_X_TOOLKIT}" = xmaybe; then
4088 if test x"${HAVE_X11R5}" = xyes; then
4089 echo $ac_n "checking X11 version 5 with Xaw""... $ac_c" 1>&6
7397acc4 4090echo "configure:4091: checking X11 version 5 with Xaw" >&5
ba4481b5
DL
4091 if eval "test \"`echo '$''{'emacs_cv_x11_version_5_with_xaw'+set}'`\" = set"; then
4092 echo $ac_n "(cached) $ac_c" 1>&6
4093else
4094 cat > conftest.$ac_ext <<EOF
7397acc4 4095#line 4096 "configure"
ba4481b5
DL
4096#include "confdefs.h"
4097
4098#include <X11/Intrinsic.h>
4099#include <X11/Xaw/Simple.h>
4100int main() {
4101
4102; return 0; }
4103EOF
7397acc4 4104if { (eval echo configure:4105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ba4481b5
DL
4105 rm -rf conftest*
4106 emacs_cv_x11_version_5_with_xaw=yes
4107else
4108 echo "configure: failed program was:" >&5
4109 cat conftest.$ac_ext >&5
4110 rm -rf conftest*
4111 emacs_cv_x11_version_5_with_xaw=no
4112fi
4113rm -f conftest*
4114fi
4115
4116 if test $emacs_cv_x11_version_5_with_xaw = yes; then
4117 echo "$ac_t""5 or newer, with Xaw; use toolkit by default" 1>&6
4118 USE_X_TOOLKIT=LUCID
4119 else
4120 echo "$ac_t""before 5 or no Xaw; do not use toolkit by default" 1>&6
4121 USE_X_TOOLKIT=none
4122 fi
4123 else
4124 USE_X_TOOLKIT=none
4125 fi
4126fi
4127
4128X_TOOLKIT_TYPE=$USE_X_TOOLKIT
4129
4130if test "${USE_X_TOOLKIT}" != "none"; then
4131 echo $ac_n "checking X11 toolkit version""... $ac_c" 1>&6
7397acc4 4132echo "configure:4133: checking X11 toolkit version" >&5
ba4481b5
DL
4133 if eval "test \"`echo '$''{'emacs_cv_x11_toolkit_version_6'+set}'`\" = set"; then
4134 echo $ac_n "(cached) $ac_c" 1>&6
4135else
4136 cat > conftest.$ac_ext <<EOF
7397acc4 4137#line 4138 "configure"
ba4481b5
DL
4138#include "confdefs.h"
4139#include <X11/Intrinsic.h>
4140int main() {
4141#if XtSpecificationRelease < 6
4142fail;
4143#endif
4144
4145; return 0; }
4146EOF
7397acc4 4147if { (eval echo configure:4148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ba4481b5
DL
4148 rm -rf conftest*
4149 emacs_cv_x11_toolkit_version_6=yes
4150else
4151 echo "configure: failed program was:" >&5
4152 cat conftest.$ac_ext >&5
4153 rm -rf conftest*
4154 emacs_cv_x11_toolkit_version_6=no
4155fi
4156rm -f conftest*
4157fi
4158
4159 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
4160 if test $emacs_cv_x11_toolkit_version_6 = yes; then
4161 echo "$ac_t""6 or newer" 1>&6
4162 cat >> confdefs.h <<\EOF
4163#define HAVE_X11XTR6 1
4164EOF
4165
4166 else
4167 echo "$ac_t""before 6" 1>&6
4168 fi
4169
4170 OLDLIBS="$LIBS"
4171 if test x$HAVE_X11XTR6 = xyes; then
4172 LIBS="-lXt -lSM -lICE $LIBS"
4173 else
4174 LIBS="-lXt $LIBS"
4175 fi
4176 echo $ac_n "checking for XmuConvertStandardSelection in -lXmu""... $ac_c" 1>&6
7397acc4 4177echo "configure:4178: checking for XmuConvertStandardSelection in -lXmu" >&5
ba4481b5
DL
4178ac_lib_var=`echo Xmu'_'XmuConvertStandardSelection | sed 'y%./+-%__p_%'`
4179if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4180 echo $ac_n "(cached) $ac_c" 1>&6
4181else
4182 ac_save_LIBS="$LIBS"
4183LIBS="-lXmu $LIBS"
4184cat > conftest.$ac_ext <<EOF
7397acc4 4185#line 4186 "configure"
ba4481b5
DL
4186#include "confdefs.h"
4187/* Override any gcc2 internal prototype to avoid an error. */
4188/* We use char because int might match the return type of a gcc2
4189 builtin and then its argument prototype would still apply. */
4190char XmuConvertStandardSelection();
4191
4192int main() {
4193XmuConvertStandardSelection()
4194; return 0; }
4195EOF
7397acc4 4196if { (eval echo configure:4197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ba4481b5
DL
4197 rm -rf conftest*
4198 eval "ac_cv_lib_$ac_lib_var=yes"
4199else
4200 echo "configure: failed program was:" >&5
4201 cat conftest.$ac_ext >&5
4202 rm -rf conftest*
4203 eval "ac_cv_lib_$ac_lib_var=no"
4204fi
4205rm -f conftest*
4206LIBS="$ac_save_LIBS"
4207
4208fi
4209if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4210 echo "$ac_t""yes" 1>&6
4211 ac_tr_lib=HAVE_LIB`echo Xmu | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4212 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4213 cat >> confdefs.h <<EOF
4214#define $ac_tr_lib 1
4215EOF
4216
4217 LIBS="-lXmu $LIBS"
4218
4219else
4220 echo "$ac_t""no" 1>&6
4221fi
4222
4223 LIBS="$OLDLIBS"
4224fi
4225
4226if test "${USE_X_TOOLKIT}" = "MOTIF"; then
4227 echo $ac_n "checking for Motif version 2.1""... $ac_c" 1>&6
7397acc4 4228echo "configure:4229: checking for Motif version 2.1" >&5
ba4481b5
DL
4229if eval "test \"`echo '$''{'emacs_cv_motif_version_2_1'+set}'`\" = set"; then
4230 echo $ac_n "(cached) $ac_c" 1>&6
4231else
4232 cat > conftest.$ac_ext <<EOF
7397acc4 4233#line 4234 "configure"
ba4481b5
DL
4234#include "confdefs.h"
4235#include <Xm/Xm.h>
4236int main() {
4237#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
4238int x = 5;
4239#else
4240Motif version prior to 2.1.
4241#endif
4242; return 0; }
4243EOF
7397acc4 4244if { (eval echo configure:4245: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
ba4481b5
DL
4245 rm -rf conftest*
4246 emacs_cv_motif_version_2_1=yes
4247else
4248 echo "configure: failed program was:" >&5
4249 cat conftest.$ac_ext >&5
4250 rm -rf conftest*
4251 emacs_cv_motif_version_2_1=no
4252fi
4253rm -f conftest*
4254fi
4255
4256echo "$ac_t""$emacs_cv_motif_version_2_1" 1>&6
4257 HAVE_MOTIF_2_1=$emacs_cv_motif_version_2_1
4258 if test $emacs_cv_motif_version_2_1 = yes; then
4259 cat >> confdefs.h <<\EOF
4260#define HAVE_MOTIF_2_1 1
4261EOF
4262
4263 echo $ac_n "checking for XpCreateContext in -lXp""... $ac_c" 1>&6
7397acc4 4264echo "configure:4265: checking for XpCreateContext in -lXp" >&5
ba4481b5
DL
4265ac_lib_var=`echo Xp'_'XpCreateContext | sed 'y%./+-%__p_%'`
4266if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4267 echo $ac_n "(cached) $ac_c" 1>&6
4268else
4269 ac_save_LIBS="$LIBS"
4270LIBS="-lXp $LIBS"
4271cat > conftest.$ac_ext <<EOF
7397acc4 4272#line 4273 "configure"
ba4481b5
DL
4273#include "confdefs.h"
4274/* Override any gcc2 internal prototype to avoid an error. */
4275/* We use char because int might match the return type of a gcc2
4276 builtin and then its argument prototype would still apply. */
4277char XpCreateContext();
4278
4279int main() {
4280XpCreateContext()
4281; return 0; }
4282EOF
7397acc4 4283if { (eval echo configure:4284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ba4481b5
DL
4284 rm -rf conftest*
4285 eval "ac_cv_lib_$ac_lib_var=yes"
4286else
4287 echo "configure: failed program was:" >&5
4288 cat conftest.$ac_ext >&5
4289 rm -rf conftest*
4290 eval "ac_cv_lib_$ac_lib_var=no"
4291fi
4292rm -f conftest*
4293LIBS="$ac_save_LIBS"
4294
4295fi
4296if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4297 echo "$ac_t""yes" 1>&6
4298 ac_tr_lib=HAVE_LIB`echo Xp | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4299 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4300 cat >> confdefs.h <<EOF
4301#define $ac_tr_lib 1
4302EOF
4303
4304 LIBS="-lXp $LIBS"
4305
4306else
4307 echo "$ac_t""no" 1>&6
4308fi
4309
4310 fi
4311fi
4312
4313### Is -lXaw3d available?
4314HAVE_XAW3D=no
4315if test "${HAVE_X11}" = "yes"; then
4316 if test "${USE_X_TOOLKIT}" != "none"; then
4317 old_c_flags="${CFLAGS}"
4318 CFLAGS="${LD_SWITCH_X_SITE}"
4319 ac_safe=`echo "X11/Xaw3d/Scrollbar.h" | sed 'y%./+-%__p_%'`
4320echo $ac_n "checking for X11/Xaw3d/Scrollbar.h""... $ac_c" 1>&6
7397acc4 4321echo "configure:4322: checking for X11/Xaw3d/Scrollbar.h" >&5
ba4481b5
DL
4322if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4323 echo $ac_n "(cached) $ac_c" 1>&6
4324else
4325 cat > conftest.$ac_ext <<EOF
7397acc4 4326#line 4327 "configure"
ba4481b5
DL
4327#include "confdefs.h"
4328#include <X11/Xaw3d/Scrollbar.h>
4329EOF
4330ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7397acc4 4331{ (eval echo configure:4332: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c4bb2108 4332ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
ba4481b5
DL
4333if test -z "$ac_err"; then
4334 rm -rf conftest*
4335 eval "ac_cv_header_$ac_safe=yes"
4336else
4337 echo "$ac_err" >&5
4338 echo "configure: failed program was:" >&5
4339 cat conftest.$ac_ext >&5
4340 rm -rf conftest*
4341 eval "ac_cv_header_$ac_safe=no"
4342fi
4343rm -f conftest*
4344fi
4345if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4346 echo "$ac_t""yes" 1>&6
4347 echo $ac_n "checking for XawScrollbarSetThumb in -lXaw3d""... $ac_c" 1>&6
7397acc4 4348echo "configure:4349: checking for XawScrollbarSetThumb in -lXaw3d" >&5
ba4481b5
DL
4349ac_lib_var=`echo Xaw3d'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'`
4350if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4351 echo $ac_n "(cached) $ac_c" 1>&6
4352else
4353 ac_save_LIBS="$LIBS"
4354LIBS="-lXaw3d -lX11 $LIBS"
4355cat > conftest.$ac_ext <<EOF
7397acc4 4356#line 4357 "configure"
ba4481b5
DL
4357#include "confdefs.h"
4358/* Override any gcc2 internal prototype to avoid an error. */
4359/* We use char because int might match the return type of a gcc2
4360 builtin and then its argument prototype would still apply. */
4361char XawScrollbarSetThumb();
4362
4363int main() {
4364XawScrollbarSetThumb()
4365; return 0; }
4366EOF
7397acc4 4367if { (eval echo configure:4368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ba4481b5
DL
4368 rm -rf conftest*
4369 eval "ac_cv_lib_$ac_lib_var=yes"
4370else
4371 echo "configure: failed program was:" >&5
4372 cat conftest.$ac_ext >&5
4373 rm -rf conftest*
4374 eval "ac_cv_lib_$ac_lib_var=no"
4375fi
4376rm -f conftest*
4377LIBS="$ac_save_LIBS"
4378
4379fi
4380if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4381 echo "$ac_t""yes" 1>&6
4382 HAVE_XAW3D=yes
4383else
4384 echo "$ac_t""no" 1>&6
4385fi
4386
4387else
4388 echo "$ac_t""no" 1>&6
4389fi
4390
4391 CFLAGS="${old_c_flags}"
4392
4393 if test "${HAVE_XAW3D}" = "yes"; then
4394 cat >> confdefs.h <<\EOF
4395#define HAVE_XAW3D 1
4396EOF
4397
4398 fi
4399 fi
4400fi
4401
4402
4403USE_TOOLKIT_SCROLL_BARS=no
4404if test "${with_toolkit_scroll_bars}" != "no"; then
4405 if test "${USE_X_TOOLKIT}" != "none"; then
4406 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
4407 cat >> confdefs.h <<\EOF
4408#define USE_TOOLKIT_SCROLL_BARS 1
4409EOF
4410
4411 HAVE_XAW3D=no
4412 USE_TOOLKIT_SCROLL_BARS=yes
4413 elif test "${HAVE_XAW3D}" = "yes"; then
4414 cat >> confdefs.h <<\EOF
4415#define USE_TOOLKIT_SCROLL_BARS 1
4416EOF
4417
4418 USE_TOOLKIT_SCROLL_BARS=yes
4419 fi
4420 fi
4421fi
4422
4423### Use -lXpm if available, unless `--with-xpm=no'.
4424HAVE_XPM=no
4425if test "${HAVE_X11}" = "yes"; then
4426 if test "${with_xpm}" != "no"; then
4427 old_c_flags="${CFLAGS}"
4428 CFLAGS="${LD_SWITCH_X_SITE}"
4429 ac_safe=`echo "X11/xpm.h" | sed 'y%./+-%__p_%'`
4430echo $ac_n "checking for X11/xpm.h""... $ac_c" 1>&6
7397acc4 4431echo "configure:4432: checking for X11/xpm.h" >&5
ba4481b5
DL
4432if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4433 echo $ac_n "(cached) $ac_c" 1>&6
4434else
4435 cat > conftest.$ac_ext <<EOF
7397acc4 4436#line 4437 "configure"
ba4481b5
DL
4437#include "confdefs.h"
4438#include <X11/xpm.h>
4439EOF
4440ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7397acc4 4441{ (eval echo configure:4442: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c4bb2108 4442ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
ba4481b5
DL
4443if test -z "$ac_err"; then
4444 rm -rf conftest*
4445 eval "ac_cv_header_$ac_safe=yes"
4446else
4447 echo "$ac_err" >&5
4448 echo "configure: failed program was:" >&5
4449 cat conftest.$ac_ext >&5
4450 rm -rf conftest*
4451 eval "ac_cv_header_$ac_safe=no"
4452fi
4453rm -f conftest*
4454fi
4455if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4456 echo "$ac_t""yes" 1>&6
4457 echo $ac_n "checking for XpmReadFileToPixmap in -lXpm""... $ac_c" 1>&6
7397acc4 4458echo "configure:4459: checking for XpmReadFileToPixmap in -lXpm" >&5
ba4481b5
DL
4459ac_lib_var=`echo Xpm'_'XpmReadFileToPixmap | sed 'y%./+-%__p_%'`
4460if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4461 echo $ac_n "(cached) $ac_c" 1>&6
4462else
4463 ac_save_LIBS="$LIBS"
4464LIBS="-lXpm -lX11 $LIBS"
4465cat > conftest.$ac_ext <<EOF
7397acc4 4466#line 4467 "configure"
ba4481b5
DL
4467#include "confdefs.h"
4468/* Override any gcc2 internal prototype to avoid an error. */
4469/* We use char because int might match the return type of a gcc2
4470 builtin and then its argument prototype would still apply. */
4471char XpmReadFileToPixmap();
4472
4473int main() {
4474XpmReadFileToPixmap()
4475; return 0; }
4476EOF
7397acc4 4477if { (eval echo configure:4478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ba4481b5
DL
4478 rm -rf conftest*
4479 eval "ac_cv_lib_$ac_lib_var=yes"
4480else
4481 echo "configure: failed program was:" >&5
4482 cat conftest.$ac_ext >&5
4483 rm -rf conftest*
4484 eval "ac_cv_lib_$ac_lib_var=no"
4485fi
4486rm -f conftest*
4487LIBS="$ac_save_LIBS"
4488
4489fi
4490if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4491 echo "$ac_t""yes" 1>&6
4492 HAVE_XPM=yes
4493else
4494 echo "$ac_t""no" 1>&6
4495fi
4496
4497else
4498 echo "$ac_t""no" 1>&6
4499fi
4500
4501 CFLAGS="${old_c_flags}"
4502 fi
4503
4504 if test "${HAVE_XPM}" = "yes"; then
4505 cat >> confdefs.h <<\EOF
4506#define HAVE_XPM 1
4507EOF
4508
4509 fi
4510fi
4511
4512### Use -ljpeg if available, unless `--with-jpeg=no'.
4513HAVE_JPEG=no
4514if test "${HAVE_X11}" = "yes"; then
4515 if test "${with_jpeg}" != "no"; then
4516 old_c_flags="${CFLAGS}"
4517 CFLAGS="${LD_SWITCH_X_SITE} ${CFLAGS}"
ffe36136
GM
4518 ac_safe=`echo "jerror.h" | sed 'y%./+-%__p_%'`
4519echo $ac_n "checking for jerror.h""... $ac_c" 1>&6
7397acc4 4520echo "configure:4521: checking for jerror.h" >&5
ffe36136
GM
4521if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4522 echo $ac_n "(cached) $ac_c" 1>&6
4523else
4524 cat > conftest.$ac_ext <<EOF
7397acc4 4525#line 4526 "configure"
ffe36136
GM
4526#include "confdefs.h"
4527#include <jerror.h>
4528EOF
4529ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7397acc4 4530{ (eval echo configure:4531: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ffe36136
GM
4531ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4532if test -z "$ac_err"; then
4533 rm -rf conftest*
4534 eval "ac_cv_header_$ac_safe=yes"
4535else
4536 echo "$ac_err" >&5
4537 echo "configure: failed program was:" >&5
4538 cat conftest.$ac_ext >&5
4539 rm -rf conftest*
4540 eval "ac_cv_header_$ac_safe=no"
4541fi
4542rm -f conftest*
4543fi
4544if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4545 echo "$ac_t""yes" 1>&6
4546 echo $ac_n "checking for jpeg_destroy_compress in -ljpeg""... $ac_c" 1>&6
7397acc4 4547echo "configure:4548: checking for jpeg_destroy_compress in -ljpeg" >&5
ba4481b5
DL
4548ac_lib_var=`echo jpeg'_'jpeg_destroy_compress | sed 'y%./+-%__p_%'`
4549if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4550 echo $ac_n "(cached) $ac_c" 1>&6
4551else
4552 ac_save_LIBS="$LIBS"
4553LIBS="-ljpeg -lX11 $LIBS"
4554cat > conftest.$ac_ext <<EOF
7397acc4 4555#line 4556 "configure"
ba4481b5
DL
4556#include "confdefs.h"
4557/* Override any gcc2 internal prototype to avoid an error. */
4558/* We use char because int might match the return type of a gcc2
4559 builtin and then its argument prototype would still apply. */
4560char jpeg_destroy_compress();
4561
4562int main() {
4563jpeg_destroy_compress()
4564; return 0; }
4565EOF
7397acc4 4566if { (eval echo configure:4567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ba4481b5
DL
4567 rm -rf conftest*
4568 eval "ac_cv_lib_$ac_lib_var=yes"
4569else
4570 echo "configure: failed program was:" >&5
4571 cat conftest.$ac_ext >&5
4572 rm -rf conftest*
4573 eval "ac_cv_lib_$ac_lib_var=no"
4574fi
4575rm -f conftest*
4576LIBS="$ac_save_LIBS"
4577
4578fi
4579if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4580 echo "$ac_t""yes" 1>&6
4581 HAVE_JPEG=yes
ffe36136
GM
4582else
4583 echo "$ac_t""no" 1>&6
4584fi
4585
ba4481b5
DL
4586else
4587 echo "$ac_t""no" 1>&6
4588fi
4589
4590 CFLAGS="${old_c_flags}"
4591 fi
4592
4593 if test "${HAVE_JPEG}" = "yes"; then
4594 cat >> confdefs.h <<\EOF
4595#define HAVE_JPEG 1
4596EOF
4597
4598 fi
4599fi
4600
4601### Use -lpng if available, unless `--with-png=no'.
4602HAVE_PNG=no
4603if test "${HAVE_X11}" = "yes"; then
4604 if test "${with_png}" != "no"; then
4605 old_c_flags="${CFLAGS}"
4606 CFLAGS="${LD_SWITCH_X_SITE} ${CFLAGS}"
4607 ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'`
4608echo $ac_n "checking for png.h""... $ac_c" 1>&6
7397acc4 4609echo "configure:4610: checking for png.h" >&5
ba4481b5
DL
4610if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4611 echo $ac_n "(cached) $ac_c" 1>&6
4612else
4613 cat > conftest.$ac_ext <<EOF
7397acc4 4614#line 4615 "configure"
ba4481b5
DL
4615#include "confdefs.h"
4616#include <png.h>
4617EOF
4618ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7397acc4 4619{ (eval echo configure:4620: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c4bb2108 4620ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
ba4481b5
DL
4621if test -z "$ac_err"; then
4622 rm -rf conftest*
4623 eval "ac_cv_header_$ac_safe=yes"
4624else
4625 echo "$ac_err" >&5
4626 echo "configure: failed program was:" >&5
4627 cat conftest.$ac_ext >&5
4628 rm -rf conftest*
4629 eval "ac_cv_header_$ac_safe=no"
4630fi
4631rm -f conftest*
4632fi
4633if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4634 echo "$ac_t""yes" 1>&6
4635 echo $ac_n "checking for png_set_expand in -lpng""... $ac_c" 1>&6
7397acc4 4636echo "configure:4637: checking for png_set_expand in -lpng" >&5
ba4481b5
DL
4637ac_lib_var=`echo png'_'png_set_expand | sed 'y%./+-%__p_%'`
4638if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4639 echo $ac_n "(cached) $ac_c" 1>&6
4640else
4641 ac_save_LIBS="$LIBS"
4642LIBS="-lpng -lX11 -lz -lm $LIBS"
4643cat > conftest.$ac_ext <<EOF
7397acc4 4644#line 4645 "configure"
ba4481b5
DL
4645#include "confdefs.h"
4646/* Override any gcc2 internal prototype to avoid an error. */
4647/* We use char because int might match the return type of a gcc2
4648 builtin and then its argument prototype would still apply. */
4649char png_set_expand();
4650
4651int main() {
4652png_set_expand()
4653; return 0; }
4654EOF
7397acc4 4655if { (eval echo configure:4656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ba4481b5
DL
4656 rm -rf conftest*
4657 eval "ac_cv_lib_$ac_lib_var=yes"
4658else
4659 echo "configure: failed program was:" >&5
4660 cat conftest.$ac_ext >&5
4661 rm -rf conftest*
4662 eval "ac_cv_lib_$ac_lib_var=no"
4663fi
4664rm -f conftest*
4665LIBS="$ac_save_LIBS"
4666
4667fi
4668if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4669 echo "$ac_t""yes" 1>&6
4670 HAVE_PNG=yes
4671else
4672 echo "$ac_t""no" 1>&6
4673fi
4674
4675else
4676 echo "$ac_t""no" 1>&6
4677fi
4678
4679 CFLAGS="${old_c_flags}"
4680 fi
4681
4682 if test "${HAVE_PNG}" = "yes"; then
4683 cat >> confdefs.h <<\EOF
4684#define HAVE_PNG 1
4685EOF
4686
4687 fi
4688fi
4689
4690### Use -ltiff if available, unless `--with-tiff=no'.
4691HAVE_TIFF=no
4692if test "${HAVE_X11}" = "yes"; then
4693 if test "${with_tiff}" != "no"; then
4694 old_c_flags="${CFLAGS}"
4695 CFLAGS="${LD_SWITCH_X_SITE} ${CFLAGS}"
4696 ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'`
4697echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6
7397acc4 4698echo "configure:4699: checking for tiffio.h" >&5
ba4481b5
DL
4699if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4700 echo $ac_n "(cached) $ac_c" 1>&6
4701else
4702 cat > conftest.$ac_ext <<EOF
7397acc4 4703#line 4704 "configure"
ba4481b5
DL
4704#include "confdefs.h"
4705#include <tiffio.h>
4706EOF
4707ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7397acc4 4708{ (eval echo configure:4709: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c4bb2108 4709ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
ba4481b5
DL
4710if test -z "$ac_err"; then
4711 rm -rf conftest*
4712 eval "ac_cv_header_$ac_safe=yes"
4713else
4714 echo "$ac_err" >&5
4715 echo "configure: failed program was:" >&5
4716 cat conftest.$ac_ext >&5
4717 rm -rf conftest*
4718 eval "ac_cv_header_$ac_safe=no"
4719fi
4720rm -f conftest*
4721fi
4722if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4723 echo "$ac_t""yes" 1>&6
3b3cc4a4
KR
4724 tifflibs="-lX11 -lz -lm"
4725 # At least one tiff package requires the jpeg library.
4726 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
4727 echo $ac_n "checking for TIFFGetVersion in -ltiff""... $ac_c" 1>&6
7397acc4 4728echo "configure:4729: checking for TIFFGetVersion in -ltiff" >&5
ba4481b5
DL
4729ac_lib_var=`echo tiff'_'TIFFGetVersion | sed 'y%./+-%__p_%'`
4730if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4731 echo $ac_n "(cached) $ac_c" 1>&6
4732else
4733 ac_save_LIBS="$LIBS"
3b3cc4a4 4734LIBS="-ltiff $tifflibs $LIBS"
ba4481b5 4735cat > conftest.$ac_ext <<EOF
7397acc4 4736#line 4737 "configure"
ba4481b5
DL
4737#include "confdefs.h"
4738/* Override any gcc2 internal prototype to avoid an error. */
4739/* We use char because int might match the return type of a gcc2
4740 builtin and then its argument prototype would still apply. */
4741char TIFFGetVersion();
4742
4743int main() {
4744TIFFGetVersion()
4745; return 0; }
4746EOF
7397acc4 4747if { (eval echo configure:4748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ba4481b5
DL
4748 rm -rf conftest*
4749 eval "ac_cv_lib_$ac_lib_var=yes"
4750else
4751 echo "configure: failed program was:" >&5
4752 cat conftest.$ac_ext >&5
4753 rm -rf conftest*
4754 eval "ac_cv_lib_$ac_lib_var=no"
4755fi
4756rm -f conftest*
4757LIBS="$ac_save_LIBS"
4758
4759fi
4760if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4761 echo "$ac_t""yes" 1>&6
4762 HAVE_TIFF=yes
4763else
4764 echo "$ac_t""no" 1>&6
4765fi
4766
4767else
4768 echo "$ac_t""no" 1>&6
4769fi
4770
4771 CFLAGS="${old_c_flags}"
4772 fi
4773
4774 if test "${HAVE_TIFF}" = "yes"; then
4775 cat >> confdefs.h <<\EOF
4776#define HAVE_TIFF 1
4777EOF
4778
4779 fi
4780fi
4781
4782### Use -lgif if available, unless `--with-gif=no'.
4783HAVE_GIF=no
4784if test "${HAVE_X11}" = "yes"; then
4785 if test "${with_gif}" != "no"; then
4786 old_c_flags="${CFLAGS}"
4787 CFLAGS="${LD_SWITCH_X_SITE} ${CFLAGS}"
4788 ac_safe=`echo "gif_lib.h" | sed 'y%./+-%__p_%'`
4789echo $ac_n "checking for gif_lib.h""... $ac_c" 1>&6
7397acc4 4790echo "configure:4791: checking for gif_lib.h" >&5
ba4481b5
DL
4791if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4792 echo $ac_n "(cached) $ac_c" 1>&6
4793else
4794 cat > conftest.$ac_ext <<EOF
7397acc4 4795#line 4796 "configure"
ba4481b5
DL
4796#include "confdefs.h"
4797#include <gif_lib.h>
4798EOF
4799ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7397acc4 4800{ (eval echo configure:4801: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c4bb2108 4801ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
ba4481b5
DL
4802if test -z "$ac_err"; then
4803 rm -rf conftest*
4804 eval "ac_cv_header_$ac_safe=yes"
4805else
4806 echo "$ac_err" >&5
4807 echo "configure: failed program was:" >&5
4808 cat conftest.$ac_ext >&5
4809 rm -rf conftest*
4810 eval "ac_cv_header_$ac_safe=no"
4811fi
4812rm -f conftest*
4813fi
4814if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4815 echo "$ac_t""yes" 1>&6
ffe36136 4816 echo $ac_n "checking for DGifOpen in -lungif""... $ac_c" 1>&6
7397acc4 4817echo "configure:4818: checking for DGifOpen in -lungif" >&5
ffe36136 4818ac_lib_var=`echo ungif'_'DGifOpen | sed 'y%./+-%__p_%'`
ba4481b5
DL
4819if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4820 echo $ac_n "(cached) $ac_c" 1>&6
4821else
4822 ac_save_LIBS="$LIBS"
4823LIBS="-lungif -lX11 $LIBS"
4824cat > conftest.$ac_ext <<EOF
7397acc4 4825#line 4826 "configure"
ba4481b5
DL
4826#include "confdefs.h"
4827/* Override any gcc2 internal prototype to avoid an error. */
4828/* We use char because int might match the return type of a gcc2
4829 builtin and then its argument prototype would still apply. */
ffe36136 4830char DGifOpen();
ba4481b5
DL
4831
4832int main() {
ffe36136 4833DGifOpen()
ba4481b5
DL
4834; return 0; }
4835EOF
7397acc4 4836if { (eval echo configure:4837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ba4481b5
DL
4837 rm -rf conftest*
4838 eval "ac_cv_lib_$ac_lib_var=yes"
4839else
4840 echo "configure: failed program was:" >&5
4841 cat conftest.$ac_ext >&5
4842 rm -rf conftest*
4843 eval "ac_cv_lib_$ac_lib_var=no"
4844fi
4845rm -f conftest*
4846LIBS="$ac_save_LIBS"
4847
4848fi
4849if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4850 echo "$ac_t""yes" 1>&6
4851 HAVE_GIF=yes
4852else
4853 echo "$ac_t""no" 1>&6
4854fi
4855
4856else
4857 echo "$ac_t""no" 1>&6
4858fi
4859
4860 CFLAGS="${old_c_flags}"
4861 fi
4862
4863 if test "${HAVE_GIF}" = "yes"; then
4864 cat >> confdefs.h <<\EOF
4865#define HAVE_GIF 1
4866EOF
4867
4868 fi
4869fi
4870
4871# If netdb.h doesn't declare h_errno, we must declare it by hand.
4872echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
7397acc4 4873echo "configure:4874: checking whether netdb declares h_errno" >&5
ba4481b5
DL
4874if eval "test \"`echo '$''{'emacs_cv_netdb_declares_h_errno'+set}'`\" = set"; then
4875 echo $ac_n "(cached) $ac_c" 1>&6
4876else
4877 cat > conftest.$ac_ext <<EOF
7397acc4 4878#line 4879 "configure"
ba4481b5
DL
4879#include "confdefs.h"
4880#include <netdb.h>
4881int main() {
4882return h_errno;
4883; return 0; }
4884EOF
7397acc4 4885if { (eval echo configure:4886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ba4481b5
DL
4886 rm -rf conftest*
4887 emacs_cv_netdb_declares_h_errno=yes
4888else
4889 echo "configure: failed program was:" >&5
4890 cat conftest.$ac_ext >&5
4891 rm -rf conftest*
4892 emacs_cv_netdb_declares_h_errno=no
4893fi
4894rm -f conftest*
4895fi
4896
4897echo "$ac_t""$emacs_cv_netdb_declares_h_errno" 1>&6
4898if test $emacs_cv_netdb_declares_h_errno = yes; then
4899 cat >> confdefs.h <<\EOF
4900#define HAVE_H_ERRNO 1
4901EOF
4902
4903fi
4904
4905# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
4906# for constant arguments. Useless!
4907echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
7397acc4 4908echo "configure:4909: checking for working alloca.h" >&5
ba4481b5
DL
4909if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
4910 echo $ac_n "(cached) $ac_c" 1>&6
4911else
4912 cat > conftest.$ac_ext <<EOF
7397acc4 4913#line 4914 "configure"
ba4481b5
DL
4914#include "confdefs.h"
4915#include <alloca.h>
4916int main() {
7397acc4 4917void *p = alloca(2 * sizeof(int));
ba4481b5
DL
4918; return 0; }
4919EOF
7397acc4 4920if { (eval echo configure:4921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ba4481b5
DL
4921 rm -rf conftest*
4922 ac_cv_header_alloca_h=yes
4923else
4924 echo "configure: failed program was:" >&5
4925 cat conftest.$ac_ext >&5
4926 rm -rf conftest*
4927 ac_cv_header_alloca_h=no
4928fi
4929rm -f conftest*
4930fi
4931
4932echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
4933if test $ac_cv_header_alloca_h = yes; then
4934 cat >> confdefs.h <<\EOF
4935#define HAVE_ALLOCA_H 1
4936EOF
4937
4938fi
4939
4940echo $ac_n "checking for alloca""... $ac_c" 1>&6
7397acc4 4941echo "configure:4942: checking for alloca" >&5
ba4481b5
DL
4942if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
4943 echo $ac_n "(cached) $ac_c" 1>&6
4944else
4945 cat > conftest.$ac_ext <<EOF
7397acc4 4946#line 4947 "configure"
ba4481b5
DL
4947#include "confdefs.h"
4948
4949#ifdef __GNUC__
4950# define alloca __builtin_alloca
4951#else
c4bb2108
DL
4952# ifdef _MSC_VER
4953# include <malloc.h>
4954# define alloca _alloca
ba4481b5 4955# else
c4bb2108
DL
4956# if HAVE_ALLOCA_H
4957# include <alloca.h>
22afa6e8 4958# else
c4bb2108
DL
4959# ifdef _AIX
4960 #pragma alloca
4961# else
4962# ifndef alloca /* predefined by HP cc +Olibcalls */
ba4481b5 4963char *alloca ();
c4bb2108 4964# endif
ba4481b5
DL
4965# endif
4966# endif
4967# endif
4968#endif
4969
4970int main() {
4971char *p = (char *) alloca(1);
4972; return 0; }
4973EOF
7397acc4 4974if { (eval echo configure:4975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ba4481b5
DL
4975 rm -rf conftest*
4976 ac_cv_func_alloca_works=yes
4977else
4978 echo "configure: failed program was:" >&5
4979 cat conftest.$ac_ext >&5
4980 rm -rf conftest*
4981 ac_cv_func_alloca_works=no
4982fi
4983rm -f conftest*
4984fi
4985
4986echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
4987if test $ac_cv_func_alloca_works = yes; then
4988 cat >> confdefs.h <<\EOF
4989#define HAVE_ALLOCA 1
4990EOF
4991
4992fi
4993
4994if test $ac_cv_func_alloca_works = no; then
4995 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
4996 # that cause trouble. Some versions do not even contain alloca or
4997 # contain a buggy version. If you still want to use their alloca,
4998 # use ar to extract alloca.o from them instead of compiling alloca.c.
c4bb2108 4999 ALLOCA=alloca.${ac_objext}
ba4481b5
DL
5000 cat >> confdefs.h <<\EOF
5001#define C_ALLOCA 1
5002EOF
5003
5004
5005echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
7397acc4 5006echo "configure:5007: checking whether alloca needs Cray hooks" >&5
ba4481b5
DL
5007if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
5008 echo $ac_n "(cached) $ac_c" 1>&6
5009else
5010 cat > conftest.$ac_ext <<EOF
7397acc4 5011#line 5012 "configure"
ba4481b5
DL
5012#include "confdefs.h"
5013#if defined(CRAY) && ! defined(CRAY2)
5014webecray
5015#else
5016wenotbecray
5017#endif
5018
5019EOF
5020if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5021 egrep "webecray" >/dev/null 2>&1; then
5022 rm -rf conftest*
5023 ac_cv_os_cray=yes
5024else
5025 rm -rf conftest*
5026 ac_cv_os_cray=no
5027fi
5028rm -f conftest*
5029
5030fi
5031
5032echo "$ac_t""$ac_cv_os_cray" 1>&6
5033if test $ac_cv_os_cray = yes; then
5034for ac_func in _getb67 GETB67 getb67; do
5035 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7397acc4 5036echo "configure:5037: checking for $ac_func" >&5
ba4481b5
DL
5037if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5038 echo $ac_n "(cached) $ac_c" 1>&6
5039else
5040 cat > conftest.$ac_ext <<EOF
7397acc4 5041#line 5042 "configure"
ba4481b5
DL
5042#include "confdefs.h"
5043/* System header to define __stub macros and hopefully few prototypes,
5044 which can conflict with char $ac_func(); below. */
5045#include <assert.h>
5046/* Override any gcc2 internal prototype to avoid an error. */
5047/* We use char because int might match the return type of a gcc2
5048 builtin and then its argument prototype would still apply. */
5049char $ac_func();
5050
5051int main() {
5052
5053/* The GNU C library defines this for functions which it implements
5054 to always fail with ENOSYS. Some functions are actually named
5055 something starting with __ and the normal name is an alias. */
5056#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5057choke me
5058#else
a21616bd 5059$ac_func();
ba4481b5
DL
5060#endif
5061
5062; return 0; }
5063EOF
7397acc4 5064if { (eval echo configure:5065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ba4481b5
DL
5065 rm -rf conftest*
5066 eval "ac_cv_func_$ac_func=yes"
5067else
5068 echo "configure: failed program was:" >&5
5069 cat conftest.$ac_ext >&5
5070 rm -rf conftest*
5071 eval "ac_cv_func_$ac_func=no"
5072fi
5073rm -f conftest*
5074fi
5075
5076if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5077 echo "$ac_t""yes" 1>&6
5078 cat >> confdefs.h <<EOF
5079#define CRAY_STACKSEG_END $ac_func
5080EOF
5081
5082 break
5083else
5084 echo "$ac_t""no" 1>&6
5085fi
5086
5087done
5088fi
5089
5090echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
7397acc4 5091echo "configure:5092: checking stack direction for C alloca" >&5
ba4481b5
DL
5092if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
5093 echo $ac_n "(cached) $ac_c" 1>&6
5094else
5095 if test "$cross_compiling" = yes; then
5096 ac_cv_c_stack_direction=0
5097else
5098 cat > conftest.$ac_ext <<EOF
7397acc4 5099#line 5100 "configure"
ba4481b5
DL
5100#include "confdefs.h"
5101find_stack_direction ()
5102{
5103 static char *addr = 0;
5104 auto char dummy;
5105 if (addr == 0)
5106 {
5107 addr = &dummy;
5108 return find_stack_direction ();
5109 }
5110 else
5111 return (&dummy > addr) ? 1 : -1;
5112}
5113main ()
5114{
5115 exit (find_stack_direction() < 0);
5116}
5117EOF
7397acc4 5118if { (eval echo configure:5119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
ba4481b5
DL
5119then
5120 ac_cv_c_stack_direction=1
5121else
5122 echo "configure: failed program was:" >&5
5123 cat conftest.$ac_ext >&5
5124 rm -fr conftest*
5125 ac_cv_c_stack_direction=-1
5126fi
5127rm -fr conftest*
5128fi
5129
5130fi
5131
5132echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
5133cat >> confdefs.h <<EOF
5134#define STACK_DIRECTION $ac_cv_c_stack_direction
5135EOF
5136
5137fi
5138
5139
5140# fmod, logb, and frexp are found in -lm on most systems.
5141# On HPUX 9.01, -lm does not contain logb, so check for sqrt.
5142echo $ac_n "checking for sqrt in -lm""... $ac_c" 1>&6
7397acc4 5143echo "configure:5144: checking for sqrt in -lm" >&5
ba4481b5
DL
5144ac_lib_var=`echo m'_'sqrt | sed 'y%./+-%__p_%'`
5145if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5146 echo $ac_n "(cached) $ac_c" 1>&6
5147else
5148 ac_save_LIBS="$LIBS"
5149LIBS="-lm $LIBS"
5150cat > conftest.$ac_ext <<EOF
7397acc4 5151#line 5152 "configure"
ba4481b5
DL
5152#include "confdefs.h"
5153/* Override any gcc2 internal prototype to avoid an error. */
5154/* We use char because int might match the return type of a gcc2
5155 builtin and then its argument prototype would still apply. */
5156char sqrt();
5157
5158int main() {
5159sqrt()
5160; return 0; }
5161EOF
7397acc4 5162if { (eval echo configure:5163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ba4481b5
DL
5163 rm -rf conftest*
5164 eval "ac_cv_lib_$ac_lib_var=yes"
5165else
5166 echo "configure: failed program was:" >&5
5167 cat conftest.$ac_ext >&5
5168 rm -rf conftest*
5169 eval "ac_cv_lib_$ac_lib_var=no"
5170fi
5171rm -f conftest*
5172LIBS="$ac_save_LIBS"
5173
5174fi
5175if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5176 echo "$ac_t""yes" 1>&6
5177 ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5178 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5179 cat >> confdefs.h <<EOF
5180#define $ac_tr_lib 1
5181EOF
5182
5183 LIBS="-lm $LIBS"
5184
5185else
5186 echo "$ac_t""no" 1>&6
5187fi
5188
5189
5190# Check for mail-locking functions in a "mail" library
5191echo $ac_n "checking for maillock in -lmail""... $ac_c" 1>&6
7397acc4 5192echo "configure:5193: checking for maillock in -lmail" >&5
ba4481b5
DL
5193ac_lib_var=`echo mail'_'maillock | sed 'y%./+-%__p_%'`
5194if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5195 echo $ac_n "(cached) $ac_c" 1>&6
5196else
5197 ac_save_LIBS="$LIBS"
5198LIBS="-lmail $LIBS"
5199cat > conftest.$ac_ext <<EOF
7397acc4 5200#line 5201 "configure"
ba4481b5
DL
5201#include "confdefs.h"
5202/* Override any gcc2 internal prototype to avoid an error. */
5203/* We use char because int might match the return type of a gcc2
5204 builtin and then its argument prototype would still apply. */
5205char maillock();
5206
5207int main() {
5208maillock()
5209; return 0; }
5210EOF
7397acc4 5211if { (eval echo configure:5212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ba4481b5
DL
5212 rm -rf conftest*
5213 eval "ac_cv_lib_$ac_lib_var=yes"
5214else
5215 echo "configure: failed program was:" >&5
5216 cat conftest.$ac_ext >&5
5217 rm -rf conftest*
5218 eval "ac_cv_lib_$ac_lib_var=no"
5219fi
5220rm -f conftest*
5221LIBS="$ac_save_LIBS"
5222
5223fi
5224if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5225 echo "$ac_t""yes" 1>&6
5226 ac_tr_lib=HAVE_LIB`echo mail | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5227 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5228 cat >> confdefs.h <<EOF
5229#define $ac_tr_lib 1
5230EOF
5231
5232 LIBS="-lmail $LIBS"
5233
5234else
5235 echo "$ac_t""no" 1>&6
5236fi
5237
5238echo $ac_n "checking for maillock in -llockfile""... $ac_c" 1>&6
7397acc4 5239echo "configure:5240: checking for maillock in -llockfile" >&5
ba4481b5
DL
5240ac_lib_var=`echo lockfile'_'maillock | sed 'y%./+-%__p_%'`
5241if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5242 echo $ac_n "(cached) $ac_c" 1>&6
5243else
5244 ac_save_LIBS="$LIBS"
5245LIBS="-llockfile $LIBS"
5246cat > conftest.$ac_ext <<EOF
7397acc4 5247#line 5248 "configure"
ba4481b5
DL
5248#include "confdefs.h"
5249/* Override any gcc2 internal prototype to avoid an error. */
5250/* We use char because int might match the return type of a gcc2
5251 builtin and then its argument prototype would still apply. */
5252char maillock();
5253
5254int main() {
5255maillock()
5256; return 0; }
5257EOF
7397acc4 5258if { (eval echo configure:5259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ba4481b5
DL
5259 rm -rf conftest*
5260 eval "ac_cv_lib_$ac_lib_var=yes"
5261else
5262 echo "configure: failed program was:" >&5
5263 cat conftest.$ac_ext >&5
5264 rm -rf conftest*
5265 eval "ac_cv_lib_$ac_lib_var=no"
5266fi
5267rm -f conftest*
5268LIBS="$ac_save_LIBS"
5269
5270fi
5271if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5272 echo "$ac_t""yes" 1>&6
5273 ac_tr_lib=HAVE_LIB`echo lockfile | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5274 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5275 cat >> confdefs.h <<EOF
5276#define $ac_tr_lib 1
5277EOF
5278
5279 LIBS="-llockfile $LIBS"
5280
5281else
5282 echo "$ac_t""no" 1>&6
5283fi
5284
5285# If we have the shared liblockfile, assume we must use it for mail
5286# locking (e.g. Debian). If we couldn't link against liblockfile
5287# (no liblockfile.a installed), ensure that we don't need to.
5288if test "$ac_cv_lib_lockfile_maillock" = no; then
5289 # Extract the first word of "liblockfile.so", so it can be a program name with args.
5290set dummy liblockfile.so; ac_word=$2
5291echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7397acc4 5292echo "configure:5293: checking for $ac_word" >&5
ba4481b5
DL
5293if eval "test \"`echo '$''{'ac_cv_prog_liblockfile'+set}'`\" = set"; then
5294 echo $ac_n "(cached) $ac_c" 1>&6
5295else
5296 if test -n "$liblockfile"; then
5297 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
5298else
c4bb2108
DL
5299 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5300 ac_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
5301 for ac_dir in $ac_dummy; do
ba4481b5
DL
5302 test -z "$ac_dir" && ac_dir=.
5303 if test -f $ac_dir/$ac_word; then
5304 ac_cv_prog_liblockfile="yes"
5305 break
5306 fi
5307 done
5308 IFS="$ac_save_ifs"
5309 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
5310fi
5311fi
5312liblockfile="$ac_cv_prog_liblockfile"
5313if test -n "$liblockfile"; then
5314 echo "$ac_t""$liblockfile" 1>&6
5315else
5316 echo "$ac_t""no" 1>&6
5317fi
5318
5319 if test $ac_cv_prog_liblockfile = yes; then
5320 { echo "configure: error: Shared liblockfile found but can't link against it.
5321This probably means that movemail could lose mail.
5322There may be a \`development' package to install containing liblockfile." 1>&2; exit 1; }
5323 else cat >> confdefs.h <<\EOF
5324#define LIBMAIL -llockfile
5325EOF
5326
5327 fi
5328 else :
5329fi
5330for ac_func in touchlock
5331do
5332echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7397acc4 5333echo "configure:5334: checking for $ac_func" >&5
ba4481b5
DL
5334if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5335 echo $ac_n "(cached) $ac_c" 1>&6
5336else
5337 cat > conftest.$ac_ext <<EOF
7397acc4 5338#line 5339 "configure"
ba4481b5
DL
5339#include "confdefs.h"
5340/* System header to define __stub macros and hopefully few prototypes,
5341 which can conflict with char $ac_func(); below. */
5342#include <assert.h>
5343/* Override any gcc2 internal prototype to avoid an error. */
5344/* We use char because int might match the return type of a gcc2
5345 builtin and then its argument prototype would still apply. */
5346char $ac_func();
5347
5348int main() {
5349
5350/* The GNU C library defines this for functions which it implements
5351 to always fail with ENOSYS. Some functions are actually named
5352 something starting with __ and the normal name is an alias. */
5353#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5354choke me
5355#else
a21616bd 5356$ac_func();
ba4481b5
DL
5357#endif
5358
5359; return 0; }
5360EOF
7397acc4 5361if { (eval echo configure:5362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ba4481b5
DL
5362 rm -rf conftest*
5363 eval "ac_cv_func_$ac_func=yes"
5364else
5365 echo "configure: failed program was:" >&5
5366 cat conftest.$ac_ext >&5
5367 rm -rf conftest*
5368 eval "ac_cv_func_$ac_func=no"
5369fi
5370rm -f conftest*
5371fi
5372
5373if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5374 echo "$ac_t""yes" 1>&6
5375 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5376 cat >> confdefs.h <<EOF
5377#define $ac_tr_func 1
5378EOF
5379
5380else
5381 echo "$ac_t""no" 1>&6
5382fi
5383done
5384
5385for ac_hdr in maillock.h
5386do
5387ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5388echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7397acc4 5389echo "configure:5390: checking for $ac_hdr" >&5
ba4481b5
DL
5390if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5391 echo $ac_n "(cached) $ac_c" 1>&6
5392else
5393 cat > conftest.$ac_ext <<EOF
7397acc4 5394#line 5395 "configure"
ba4481b5
DL
5395#include "confdefs.h"
5396#include <$ac_hdr>
5397EOF
5398ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7397acc4 5399{ (eval echo configure:5400: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c4bb2108 5400ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
ba4481b5
DL
5401if test -z "$ac_err"; then
5402 rm -rf conftest*
5403 eval "ac_cv_header_$ac_safe=yes"
5404else
5405 echo "$ac_err" >&5
5406 echo "configure: failed program was:" >&5
5407 cat conftest.$ac_ext >&5
5408 rm -rf conftest*
5409 eval "ac_cv_header_$ac_safe=no"
5410fi
5411rm -f conftest*
5412fi
5413if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5414 echo "$ac_t""yes" 1>&6
5415 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5416 cat >> confdefs.h <<EOF
5417#define $ac_tr_hdr 1
5418EOF
5419
5420else
5421 echo "$ac_t""no" 1>&6
5422fi
5423done
5424
5425
5426for ac_func in gettimeofday gethostname getdomainname dup2 \
5427rename closedir mkdir rmdir sysinfo \
5428random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime res_init setsid \
5429strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \
1113b624 5430utimes setrlimit setpgid getcwd shutdown strftime getaddrinfo \
22afa6e8 5431__fpending ftello getloadavg mblen mbrlen strsignal setitimer ualarm
ba4481b5
DL
5432do
5433echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7397acc4 5434echo "configure:5435: checking for $ac_func" >&5
ba4481b5
DL
5435if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5436 echo $ac_n "(cached) $ac_c" 1>&6
5437else
5438 cat > conftest.$ac_ext <<EOF
7397acc4 5439#line 5440 "configure"
ba4481b5
DL
5440#include "confdefs.h"
5441/* System header to define __stub macros and hopefully few prototypes,
5442 which can conflict with char $ac_func(); below. */
5443#include <assert.h>
5444/* Override any gcc2 internal prototype to avoid an error. */
5445/* We use char because int might match the return type of a gcc2
5446 builtin and then its argument prototype would still apply. */
5447char $ac_func();
5448
5449int main() {
5450
5451/* The GNU C library defines this for functions which it implements
5452 to always fail with ENOSYS. Some functions are actually named
5453 something starting with __ and the normal name is an alias. */
5454#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5455choke me
5456#else
a21616bd 5457$ac_func();
ba4481b5
DL
5458#endif
5459
5460; return 0; }
5461EOF
7397acc4 5462if { (eval echo configure:5463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ba4481b5
DL
5463 rm -rf conftest*
5464 eval "ac_cv_func_$ac_func=yes"
5465else
5466 echo "configure: failed program was:" >&5
5467 cat conftest.$ac_ext >&5
5468 rm -rf conftest*
5469 eval "ac_cv_func_$ac_func=no"
5470fi
5471rm -f conftest*
5472fi
5473
5474if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5475 echo "$ac_t""yes" 1>&6
5476 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5477 cat >> confdefs.h <<EOF
5478#define $ac_tr_func 1
5479EOF
5480
5481else
5482 echo "$ac_t""no" 1>&6
5483fi
5484done
5485
5486
5487# Check this now, so that we will NOT find the above functions in ncurses.
5488# That is because we have not set up to link ncurses in lib-src.
5489# It's better to believe a function is not available
5490# than to expect to find it in ncurses.
5491echo $ac_n "checking for tparm in -lncurses""... $ac_c" 1>&6
7397acc4 5492echo "configure:5493: checking for tparm in -lncurses" >&5
ba4481b5
DL
5493ac_lib_var=`echo ncurses'_'tparm | sed 'y%./+-%__p_%'`
5494if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5495 echo $ac_n "(cached) $ac_c" 1>&6
5496else
5497 ac_save_LIBS="$LIBS"
5498LIBS="-lncurses $LIBS"
5499cat > conftest.$ac_ext <<EOF
7397acc4 5500#line 5501 "configure"
ba4481b5
DL
5501#include "confdefs.h"
5502/* Override any gcc2 internal prototype to avoid an error. */
5503/* We use char because int might match the return type of a gcc2
5504 builtin and then its argument prototype would still apply. */
5505char tparm();
5506
5507int main() {
5508tparm()
5509; return 0; }
5510EOF
7397acc4 5511if { (eval echo configure:5512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ba4481b5
DL
5512 rm -rf conftest*
5513 eval "ac_cv_lib_$ac_lib_var=yes"
5514else
5515 echo "configure: failed program was:" >&5
5516 cat conftest.$ac_ext >&5
5517 rm -rf conftest*
5518 eval "ac_cv_lib_$ac_lib_var=no"
5519fi
5520rm -f conftest*
5521LIBS="$ac_save_LIBS"
5522
5523fi
5524if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5525 echo "$ac_t""yes" 1>&6
5526 ac_tr_lib=HAVE_LIB`echo ncurses | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5527 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5528 cat >> confdefs.h <<EOF
5529#define $ac_tr_lib 1
5530EOF
5531
5532 LIBS="-lncurses $LIBS"
5533
5534else
5535 echo "$ac_t""no" 1>&6
5536fi
5537
5538
a21616bd
KR
5539# These tell us which Kerberos-related libraries to use.
5540if test "${with_kerberos+set}" = set; then
5541 echo $ac_n "checking for com_err in -lcom_err""... $ac_c" 1>&6
7397acc4 5542echo "configure:5543: checking for com_err in -lcom_err" >&5
a21616bd
KR
5543ac_lib_var=`echo com_err'_'com_err | sed 'y%./+-%__p_%'`
5544if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5545 echo $ac_n "(cached) $ac_c" 1>&6
5546else
5547 ac_save_LIBS="$LIBS"
5548LIBS="-lcom_err $LIBS"
5549cat > conftest.$ac_ext <<EOF
7397acc4 5550#line 5551 "configure"
a21616bd
KR
5551#include "confdefs.h"
5552/* Override any gcc2 internal prototype to avoid an error. */
5553/* We use char because int might match the return type of a gcc2
5554 builtin and then its argument prototype would still apply. */
5555char com_err();
5556
5557int main() {
5558com_err()
5559; return 0; }
5560EOF
7397acc4 5561if { (eval echo configure:5562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
a21616bd
KR
5562 rm -rf conftest*
5563 eval "ac_cv_lib_$ac_lib_var=yes"
5564else
5565 echo "configure: failed program was:" >&5
5566 cat conftest.$ac_ext >&5
5567 rm -rf conftest*
5568 eval "ac_cv_lib_$ac_lib_var=no"
5569fi
5570rm -f conftest*
5571LIBS="$ac_save_LIBS"
5572
5573fi
5574if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5575 echo "$ac_t""yes" 1>&6
5576 ac_tr_lib=HAVE_LIB`echo com_err | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5577 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5578 cat >> confdefs.h <<EOF
5579#define $ac_tr_lib 1
5580EOF
5581
5582 LIBS="-lcom_err $LIBS"
5583
5584else
5585 echo "$ac_t""no" 1>&6
5586fi
5587
5588 echo $ac_n "checking for mit_des_cbc_encrypt in -lk5crypto""... $ac_c" 1>&6
7397acc4 5589echo "configure:5590: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
a21616bd
KR
5590ac_lib_var=`echo k5crypto'_'mit_des_cbc_encrypt | sed 'y%./+-%__p_%'`
5591if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5592 echo $ac_n "(cached) $ac_c" 1>&6
5593else
5594 ac_save_LIBS="$LIBS"
5595LIBS="-lk5crypto $LIBS"
5596cat > conftest.$ac_ext <<EOF
7397acc4 5597#line 5598 "configure"
a21616bd
KR
5598#include "confdefs.h"
5599/* Override any gcc2 internal prototype to avoid an error. */
5600/* We use char because int might match the return type of a gcc2
5601 builtin and then its argument prototype would still apply. */
5602char mit_des_cbc_encrypt();
5603
5604int main() {
5605mit_des_cbc_encrypt()
5606; return 0; }
5607EOF
7397acc4 5608if { (eval echo configure:5609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
a21616bd
KR
5609 rm -rf conftest*
5610 eval "ac_cv_lib_$ac_lib_var=yes"
5611else
5612 echo "configure: failed program was:" >&5
5613 cat conftest.$ac_ext >&5
5614 rm -rf conftest*
5615 eval "ac_cv_lib_$ac_lib_var=no"
5616fi
5617rm -f conftest*
5618LIBS="$ac_save_LIBS"
5619
5620fi
5621if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5622 echo "$ac_t""yes" 1>&6
5623 ac_tr_lib=HAVE_LIB`echo k5crypto | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5624 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5625 cat >> confdefs.h <<EOF
5626#define $ac_tr_lib 1
5627EOF
5628
5629 LIBS="-lk5crypto $LIBS"
5630
5631else
5632 echo "$ac_t""no" 1>&6
5633fi
5634
5635 echo $ac_n "checking for mit_des_cbc_encrypt in -lcrypto""... $ac_c" 1>&6
7397acc4 5636echo "configure:5637: checking for mit_des_cbc_encrypt in -lcrypto" >&5
a21616bd
KR
5637ac_lib_var=`echo crypto'_'mit_des_cbc_encrypt | sed 'y%./+-%__p_%'`
5638if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5639 echo $ac_n "(cached) $ac_c" 1>&6
5640else
5641 ac_save_LIBS="$LIBS"
5642LIBS="-lcrypto $LIBS"
5643cat > conftest.$ac_ext <<EOF
7397acc4 5644#line 5645 "configure"
a21616bd
KR
5645#include "confdefs.h"
5646/* Override any gcc2 internal prototype to avoid an error. */
5647/* We use char because int might match the return type of a gcc2
5648 builtin and then its argument prototype would still apply. */
5649char mit_des_cbc_encrypt();
5650
5651int main() {
5652mit_des_cbc_encrypt()
5653; return 0; }
5654EOF
7397acc4 5655if { (eval echo configure:5656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
a21616bd
KR
5656 rm -rf conftest*
5657 eval "ac_cv_lib_$ac_lib_var=yes"
5658else
5659 echo "configure: failed program was:" >&5
5660 cat conftest.$ac_ext >&5
5661 rm -rf conftest*
5662 eval "ac_cv_lib_$ac_lib_var=no"
5663fi
5664rm -f conftest*
5665LIBS="$ac_save_LIBS"
5666
5667fi
5668if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5669 echo "$ac_t""yes" 1>&6
5670 ac_tr_lib=HAVE_LIB`echo crypto | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5671 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5672 cat >> confdefs.h <<EOF
5673#define $ac_tr_lib 1
5674EOF
5675
5676 LIBS="-lcrypto $LIBS"
5677
5678else
5679 echo "$ac_t""no" 1>&6
5680fi
5681
5682 echo $ac_n "checking for krb5_init_context in -lkrb5""... $ac_c" 1>&6
7397acc4 5683echo "configure:5684: checking for krb5_init_context in -lkrb5" >&5
a21616bd
KR
5684ac_lib_var=`echo krb5'_'krb5_init_context | sed 'y%./+-%__p_%'`
5685if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5686 echo $ac_n "(cached) $ac_c" 1>&6
5687else
5688 ac_save_LIBS="$LIBS"
5689LIBS="-lkrb5 $LIBS"
5690cat > conftest.$ac_ext <<EOF
7397acc4 5691#line 5692 "configure"
a21616bd
KR
5692#include "confdefs.h"
5693/* Override any gcc2 internal prototype to avoid an error. */
5694/* We use char because int might match the return type of a gcc2
5695 builtin and then its argument prototype would still apply. */
5696char krb5_init_context();
5697
5698int main() {
5699krb5_init_context()
5700; return 0; }
5701EOF
7397acc4 5702if { (eval echo configure:5703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
a21616bd
KR
5703 rm -rf conftest*
5704 eval "ac_cv_lib_$ac_lib_var=yes"
5705else
5706 echo "configure: failed program was:" >&5
5707 cat conftest.$ac_ext >&5
5708 rm -rf conftest*
5709 eval "ac_cv_lib_$ac_lib_var=no"
5710fi
5711rm -f conftest*
5712LIBS="$ac_save_LIBS"
5713
5714fi
5715if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5716 echo "$ac_t""yes" 1>&6
5717 ac_tr_lib=HAVE_LIB`echo krb5 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5718 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5719 cat >> confdefs.h <<EOF
5720#define $ac_tr_lib 1
5721EOF
5722
5723 LIBS="-lkrb5 $LIBS"
5724
5725else
5726 echo "$ac_t""no" 1>&6
5727fi
5728
5729 if test "${with_kerberos5+set}" != set; then
5730 echo $ac_n "checking for des_cbc_encrypt in -ldes425""... $ac_c" 1>&6
7397acc4 5731echo "configure:5732: checking for des_cbc_encrypt in -ldes425" >&5
a21616bd
KR
5732ac_lib_var=`echo des425'_'des_cbc_encrypt | sed 'y%./+-%__p_%'`
5733if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5734 echo $ac_n "(cached) $ac_c" 1>&6
5735else
5736 ac_save_LIBS="$LIBS"
5737LIBS="-ldes425 $LIBS"
5738cat > conftest.$ac_ext <<EOF
7397acc4 5739#line 5740 "configure"
a21616bd
KR
5740#include "confdefs.h"
5741/* Override any gcc2 internal prototype to avoid an error. */
5742/* We use char because int might match the return type of a gcc2
5743 builtin and then its argument prototype would still apply. */
5744char des_cbc_encrypt();
5745
5746int main() {
5747des_cbc_encrypt()
5748; return 0; }
5749EOF
7397acc4 5750if { (eval echo configure:5751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
a21616bd
KR
5751 rm -rf conftest*
5752 eval "ac_cv_lib_$ac_lib_var=yes"
5753else
5754 echo "configure: failed program was:" >&5
5755 cat conftest.$ac_ext >&5
5756 rm -rf conftest*
5757 eval "ac_cv_lib_$ac_lib_var=no"
5758fi
5759rm -f conftest*
5760LIBS="$ac_save_LIBS"
5761
5762fi
5763if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5764 echo "$ac_t""yes" 1>&6
5765 ac_tr_lib=HAVE_LIB`echo des425 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5766 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5767 cat >> confdefs.h <<EOF
5768#define $ac_tr_lib 1
5769EOF
5770
5771 LIBS="-ldes425 $LIBS"
5772
5773else
5774 echo "$ac_t""no" 1>&6
5775echo $ac_n "checking for des_cbc_encrypt in -ldes""... $ac_c" 1>&6
7397acc4 5776echo "configure:5777: checking for des_cbc_encrypt in -ldes" >&5
a21616bd
KR
5777ac_lib_var=`echo des'_'des_cbc_encrypt | sed 'y%./+-%__p_%'`
5778if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5779 echo $ac_n "(cached) $ac_c" 1>&6
5780else
5781 ac_save_LIBS="$LIBS"
5782LIBS="-ldes $LIBS"
5783cat > conftest.$ac_ext <<EOF
7397acc4 5784#line 5785 "configure"
a21616bd
KR
5785#include "confdefs.h"
5786/* Override any gcc2 internal prototype to avoid an error. */
5787/* We use char because int might match the return type of a gcc2
5788 builtin and then its argument prototype would still apply. */
5789char des_cbc_encrypt();
5790
5791int main() {
5792des_cbc_encrypt()
5793; return 0; }
5794EOF
7397acc4 5795if { (eval echo configure:5796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
a21616bd
KR
5796 rm -rf conftest*
5797 eval "ac_cv_lib_$ac_lib_var=yes"
5798else
5799 echo "configure: failed program was:" >&5
5800 cat conftest.$ac_ext >&5
5801 rm -rf conftest*
5802 eval "ac_cv_lib_$ac_lib_var=no"
5803fi
5804rm -f conftest*
5805LIBS="$ac_save_LIBS"
5806
5807fi
5808if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5809 echo "$ac_t""yes" 1>&6
5810 ac_tr_lib=HAVE_LIB`echo des | sed -e 's/^a-zA-Z0-9_/_/g' \
5811 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5812 cat >> confdefs.h <<EOF
5813#define $ac_tr_lib 1
5814EOF
5815
5816 LIBS="-ldes $LIBS"
5817
5818else
5819 echo "$ac_t""no" 1>&6
5820fi
5821
5822fi
5823
5824 echo $ac_n "checking for krb_get_cred in -lkrb4""... $ac_c" 1>&6
7397acc4 5825echo "configure:5826: checking for krb_get_cred in -lkrb4" >&5
a21616bd
KR
5826ac_lib_var=`echo krb4'_'krb_get_cred | sed 'y%./+-%__p_%'`
5827if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5828 echo $ac_n "(cached) $ac_c" 1>&6
5829else
5830 ac_save_LIBS="$LIBS"
5831LIBS="-lkrb4 $LIBS"
5832cat > conftest.$ac_ext <<EOF
7397acc4 5833#line 5834 "configure"
a21616bd
KR
5834#include "confdefs.h"
5835/* Override any gcc2 internal prototype to avoid an error. */
5836/* We use char because int might match the return type of a gcc2
5837 builtin and then its argument prototype would still apply. */
5838char krb_get_cred();
5839
5840int main() {
5841krb_get_cred()
5842; return 0; }
5843EOF
7397acc4 5844if { (eval echo configure:5845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
a21616bd
KR
5845 rm -rf conftest*
5846 eval "ac_cv_lib_$ac_lib_var=yes"
5847else
5848 echo "configure: failed program was:" >&5
5849 cat conftest.$ac_ext >&5
5850 rm -rf conftest*
5851 eval "ac_cv_lib_$ac_lib_var=no"
5852fi
5853rm -f conftest*
5854LIBS="$ac_save_LIBS"
5855
5856fi
5857if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5858 echo "$ac_t""yes" 1>&6
5859 ac_tr_lib=HAVE_LIB`echo krb4 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5860 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5861 cat >> confdefs.h <<EOF
5862#define $ac_tr_lib 1
5863EOF
5864
5865 LIBS="-lkrb4 $LIBS"
5866
5867else
5868 echo "$ac_t""no" 1>&6
5869echo $ac_n "checking for krb_get_cred in -lkrb""... $ac_c" 1>&6
7397acc4 5870echo "configure:5871: checking for krb_get_cred in -lkrb" >&5
a21616bd
KR
5871ac_lib_var=`echo krb'_'krb_get_cred | sed 'y%./+-%__p_%'`
5872if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5873 echo $ac_n "(cached) $ac_c" 1>&6
5874else
5875 ac_save_LIBS="$LIBS"
5876LIBS="-lkrb $LIBS"
5877cat > conftest.$ac_ext <<EOF
7397acc4 5878#line 5879 "configure"
a21616bd
KR
5879#include "confdefs.h"
5880/* Override any gcc2 internal prototype to avoid an error. */
5881/* We use char because int might match the return type of a gcc2
5882 builtin and then its argument prototype would still apply. */
5883char krb_get_cred();
5884
5885int main() {
5886krb_get_cred()
5887; return 0; }
5888EOF
7397acc4 5889if { (eval echo configure:5890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
a21616bd
KR
5890 rm -rf conftest*
5891 eval "ac_cv_lib_$ac_lib_var=yes"
5892else
5893 echo "configure: failed program was:" >&5
5894 cat conftest.$ac_ext >&5
5895 rm -rf conftest*
5896 eval "ac_cv_lib_$ac_lib_var=no"
5897fi
5898rm -f conftest*
5899LIBS="$ac_save_LIBS"
5900
5901fi
5902if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5903 echo "$ac_t""yes" 1>&6
5904 ac_tr_lib=HAVE_LIB`echo krb | sed -e 's/^a-zA-Z0-9_/_/g' \
5905 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5906 cat >> confdefs.h <<EOF
5907#define $ac_tr_lib 1
5908EOF
5909
5910 LIBS="-lkrb $LIBS"
5911
5912else
5913 echo "$ac_t""no" 1>&6
5914fi
5915
5916fi
5917
5918 fi
5919
5920 if test "${with_kerberos5+set}" = set; then
5921 for ac_hdr in krb5.h
5922do
5923ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5924echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7397acc4 5925echo "configure:5926: checking for $ac_hdr" >&5
a21616bd
KR
5926if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5927 echo $ac_n "(cached) $ac_c" 1>&6
5928else
5929 cat > conftest.$ac_ext <<EOF
7397acc4 5930#line 5931 "configure"
a21616bd
KR
5931#include "confdefs.h"
5932#include <$ac_hdr>
5933EOF
5934ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7397acc4 5935{ (eval echo configure:5936: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c4bb2108 5936ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
a21616bd
KR
5937if test -z "$ac_err"; then
5938 rm -rf conftest*
5939 eval "ac_cv_header_$ac_safe=yes"
5940else
5941 echo "$ac_err" >&5
5942 echo "configure: failed program was:" >&5
5943 cat conftest.$ac_ext >&5
5944 rm -rf conftest*
5945 eval "ac_cv_header_$ac_safe=no"
5946fi
5947rm -f conftest*
5948fi
5949if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5950 echo "$ac_t""yes" 1>&6
5951 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5952 cat >> confdefs.h <<EOF
5953#define $ac_tr_hdr 1
5954EOF
5955
5956else
5957 echo "$ac_t""no" 1>&6
5958fi
5959done
5960
5961 else
5962 for ac_hdr in des.h
5963do
5964ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5965echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7397acc4 5966echo "configure:5967: checking for $ac_hdr" >&5
a21616bd
KR
5967if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5968 echo $ac_n "(cached) $ac_c" 1>&6
5969else
5970 cat > conftest.$ac_ext <<EOF
7397acc4 5971#line 5972 "configure"
a21616bd
KR
5972#include "confdefs.h"
5973#include <$ac_hdr>
5974EOF
5975ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7397acc4 5976{ (eval echo configure:5977: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c4bb2108 5977ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
a21616bd
KR
5978if test -z "$ac_err"; then
5979 rm -rf conftest*
5980 eval "ac_cv_header_$ac_safe=yes"
5981else
5982 echo "$ac_err" >&5
5983 echo "configure: failed program was:" >&5
5984 cat conftest.$ac_ext >&5
5985 rm -rf conftest*
5986 eval "ac_cv_header_$ac_safe=no"
5987fi
5988rm -f conftest*
5989fi
5990if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5991 echo "$ac_t""yes" 1>&6
5992 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5993 cat >> confdefs.h <<EOF
5994#define $ac_tr_hdr 1
5995EOF
5996
5997else
5998 echo "$ac_t""no" 1>&6
5999for ac_hdr in kerberosIV/des.h
6000do
6001ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6002echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7397acc4 6003echo "configure:6004: checking for $ac_hdr" >&5
a21616bd
KR
6004if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6005 echo $ac_n "(cached) $ac_c" 1>&6
6006else
6007 cat > conftest.$ac_ext <<EOF
7397acc4 6008#line 6009 "configure"
a21616bd
KR
6009#include "confdefs.h"
6010#include <$ac_hdr>
6011EOF
6012ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7397acc4 6013{ (eval echo configure:6014: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c4bb2108 6014ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
a21616bd
KR
6015if test -z "$ac_err"; then
6016 rm -rf conftest*
6017 eval "ac_cv_header_$ac_safe=yes"
6018else
6019 echo "$ac_err" >&5
6020 echo "configure: failed program was:" >&5
6021 cat conftest.$ac_ext >&5
6022 rm -rf conftest*
6023 eval "ac_cv_header_$ac_safe=no"
6024fi
6025rm -f conftest*
6026fi
6027if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6028 echo "$ac_t""yes" 1>&6
6029 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6030 cat >> confdefs.h <<EOF
6031#define $ac_tr_hdr 1
6032EOF
6033
6034else
6035 echo "$ac_t""no" 1>&6
6036for ac_hdr in kerberos/des.h
6037do
6038ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6039echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7397acc4 6040echo "configure:6041: checking for $ac_hdr" >&5
a21616bd
KR
6041if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6042 echo $ac_n "(cached) $ac_c" 1>&6
6043else
6044 cat > conftest.$ac_ext <<EOF
7397acc4 6045#line 6046 "configure"
a21616bd
KR
6046#include "confdefs.h"
6047#include <$ac_hdr>
6048EOF
6049ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7397acc4 6050{ (eval echo configure:6051: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c4bb2108 6051ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
a21616bd
KR
6052if test -z "$ac_err"; then
6053 rm -rf conftest*
6054 eval "ac_cv_header_$ac_safe=yes"
6055else
6056 echo "$ac_err" >&5
6057 echo "configure: failed program was:" >&5
6058 cat conftest.$ac_ext >&5
6059 rm -rf conftest*
6060 eval "ac_cv_header_$ac_safe=no"
6061fi
6062rm -f conftest*
6063fi
6064if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6065 echo "$ac_t""yes" 1>&6
6066 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6067 cat >> confdefs.h <<EOF
6068#define $ac_tr_hdr 1
6069EOF
6070
6071else
6072 echo "$ac_t""no" 1>&6
6073fi
6074done
6075
6076fi
6077done
6078
6079fi
6080done
6081
6082 for ac_hdr in krb.h
6083do
6084ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6085echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7397acc4 6086echo "configure:6087: checking for $ac_hdr" >&5
a21616bd
KR
6087if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6088 echo $ac_n "(cached) $ac_c" 1>&6
6089else
6090 cat > conftest.$ac_ext <<EOF
7397acc4 6091#line 6092 "configure"
a21616bd
KR
6092#include "confdefs.h"
6093#include <$ac_hdr>
6094EOF
6095ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7397acc4 6096{ (eval echo configure:6097: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c4bb2108 6097ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
a21616bd
KR
6098if test -z "$ac_err"; then
6099 rm -rf conftest*
6100 eval "ac_cv_header_$ac_safe=yes"
6101else
6102 echo "$ac_err" >&5
6103 echo "configure: failed program was:" >&5
6104 cat conftest.$ac_ext >&5
6105 rm -rf conftest*
6106 eval "ac_cv_header_$ac_safe=no"
6107fi
6108rm -f conftest*
6109fi
6110if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6111 echo "$ac_t""yes" 1>&6
6112 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6113 cat >> confdefs.h <<EOF
6114#define $ac_tr_hdr 1
6115EOF
6116
6117else
6118 echo "$ac_t""no" 1>&6
6119for ac_hdr in kerberosIV/krb.h
6120do
6121ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6122echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7397acc4 6123echo "configure:6124: checking for $ac_hdr" >&5
a21616bd
KR
6124if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6125 echo $ac_n "(cached) $ac_c" 1>&6
6126else
6127 cat > conftest.$ac_ext <<EOF
7397acc4 6128#line 6129 "configure"
a21616bd
KR
6129#include "confdefs.h"
6130#include <$ac_hdr>
6131EOF
6132ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7397acc4 6133{ (eval echo configure:6134: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c4bb2108 6134ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
a21616bd
KR
6135if test -z "$ac_err"; then
6136 rm -rf conftest*
6137 eval "ac_cv_header_$ac_safe=yes"
6138else
6139 echo "$ac_err" >&5
6140 echo "configure: failed program was:" >&5
6141 cat conftest.$ac_ext >&5
6142 rm -rf conftest*
6143 eval "ac_cv_header_$ac_safe=no"
6144fi
6145rm -f conftest*
6146fi
6147if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6148 echo "$ac_t""yes" 1>&6
6149 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6150 cat >> confdefs.h <<EOF
6151#define $ac_tr_hdr 1
6152EOF
6153
6154else
6155 echo "$ac_t""no" 1>&6
6156for ac_hdr in kerberos/krb.h
6157do
6158ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6159echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7397acc4 6160echo "configure:6161: checking for $ac_hdr" >&5
a21616bd
KR
6161if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6162 echo $ac_n "(cached) $ac_c" 1>&6
6163else
6164 cat > conftest.$ac_ext <<EOF
7397acc4 6165#line 6166 "configure"
a21616bd
KR
6166#include "confdefs.h"
6167#include <$ac_hdr>
6168EOF
6169ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7397acc4 6170{ (eval echo configure:6171: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c4bb2108 6171ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
a21616bd
KR
6172if test -z "$ac_err"; then
6173 rm -rf conftest*
6174 eval "ac_cv_header_$ac_safe=yes"
6175else
6176 echo "$ac_err" >&5
6177 echo "configure: failed program was:" >&5
6178 cat conftest.$ac_ext >&5
6179 rm -rf conftest*
6180 eval "ac_cv_header_$ac_safe=no"
6181fi
6182rm -f conftest*
6183fi
6184if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6185 echo "$ac_t""yes" 1>&6
6186 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6187 cat >> confdefs.h <<EOF
6188#define $ac_tr_hdr 1
6189EOF
6190
6191else
6192 echo "$ac_t""no" 1>&6
6193fi
6194done
6195
6196fi
6197done
6198
6199fi
6200done
6201
6202 fi
6203 for ac_hdr in com_err.h
6204do
6205ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6206echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7397acc4 6207echo "configure:6208: checking for $ac_hdr" >&5
a21616bd
KR
6208if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6209 echo $ac_n "(cached) $ac_c" 1>&6
6210else
6211 cat > conftest.$ac_ext <<EOF
7397acc4 6212#line 6213 "configure"
a21616bd
KR
6213#include "confdefs.h"
6214#include <$ac_hdr>
6215EOF
6216ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7397acc4 6217{ (eval echo configure:6218: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c4bb2108 6218ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
a21616bd
KR
6219if test -z "$ac_err"; then
6220 rm -rf conftest*
6221 eval "ac_cv_header_$ac_safe=yes"
6222else
6223 echo "$ac_err" >&5
6224 echo "configure: failed program was:" >&5
6225 cat conftest.$ac_ext >&5
6226 rm -rf conftest*
6227 eval "ac_cv_header_$ac_safe=no"
6228fi
6229rm -f conftest*
6230fi
6231if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6232 echo "$ac_t""yes" 1>&6
6233 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6234 cat >> confdefs.h <<EOF
6235#define $ac_tr_hdr 1
6236EOF
6237
6238else
6239 echo "$ac_t""no" 1>&6
6240fi
6241done
6242
6243fi
6244
ba4481b5
DL
6245# Solaris requires -lintl if you want strerror (which calls dgettext)
6246# to return localized messages.
6247echo $ac_n "checking for dgettext in -lintl""... $ac_c" 1>&6
7397acc4 6248echo "configure:6249: checking for dgettext in -lintl" >&5
ba4481b5
DL
6249ac_lib_var=`echo intl'_'dgettext | sed 'y%./+-%__p_%'`
6250if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6251 echo $ac_n "(cached) $ac_c" 1>&6
6252else
6253 ac_save_LIBS="$LIBS"
6254LIBS="-lintl $LIBS"
6255cat > conftest.$ac_ext <<EOF
7397acc4 6256#line 6257 "configure"
ba4481b5
DL
6257#include "confdefs.h"
6258/* Override any gcc2 internal prototype to avoid an error. */
6259/* We use char because int might match the return type of a gcc2
6260 builtin and then its argument prototype would still apply. */
6261char dgettext();
6262
6263int main() {
6264dgettext()
6265; return 0; }
6266EOF
7397acc4 6267if { (eval echo configure:6268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ba4481b5
DL
6268 rm -rf conftest*
6269 eval "ac_cv_lib_$ac_lib_var=yes"
6270else
6271 echo "configure: failed program was:" >&5
6272 cat conftest.$ac_ext >&5
6273 rm -rf conftest*
6274 eval "ac_cv_lib_$ac_lib_var=no"
6275fi
6276rm -f conftest*
6277LIBS="$ac_save_LIBS"
6278
6279fi
6280if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6281 echo "$ac_t""yes" 1>&6
6282 ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6283 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6284 cat >> confdefs.h <<EOF
6285#define $ac_tr_lib 1
6286EOF
6287
6288 LIBS="-lintl $LIBS"
6289
6290else
6291 echo "$ac_t""no" 1>&6
6292fi
6293
6294
6295echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
7397acc4 6296echo "configure:6297: checking whether localtime caches TZ" >&5
ba4481b5
DL
6297if eval "test \"`echo '$''{'emacs_cv_localtime_cache'+set}'`\" = set"; then
6298 echo $ac_n "(cached) $ac_c" 1>&6
6299else
6300 if test x$ac_cv_func_tzset = xyes; then
6301if test "$cross_compiling" = yes; then
6302 # If we have tzset, assume the worst when cross-compiling.
6303emacs_cv_localtime_cache=yes
6304else
6305 cat > conftest.$ac_ext <<EOF
7397acc4 6306#line 6307 "configure"
ba4481b5
DL
6307#include "confdefs.h"
6308#include <time.h>
ba4481b5
DL
6309extern char **environ;
6310unset_TZ ()
6311{
6312 char **from, **to;
6313 for (to = from = environ; (*to = *from); from++)
6314 if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
6315 to++;
6316}
6317char TZ_GMT0[] = "TZ=GMT0";
6318char TZ_PST8[] = "TZ=PST8";
6319main()
6320{
6321 time_t now = time ((time_t *) 0);
6322 int hour_GMT0, hour_unset;
6323 if (putenv (TZ_GMT0) != 0)
6324 exit (1);
6325 hour_GMT0 = localtime (&now)->tm_hour;
6326 unset_TZ ();
6327 hour_unset = localtime (&now)->tm_hour;
6328 if (putenv (TZ_PST8) != 0)
6329 exit (1);
6330 if (localtime (&now)->tm_hour == hour_GMT0)
6331 exit (1);
6332 unset_TZ ();
6333 if (localtime (&now)->tm_hour != hour_unset)
6334 exit (1);
6335 exit (0);
6336}
6337EOF
7397acc4 6338if { (eval echo configure:6339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
ba4481b5
DL
6339then
6340 emacs_cv_localtime_cache=no
6341else
6342 echo "configure: failed program was:" >&5
6343 cat conftest.$ac_ext >&5
6344 rm -fr conftest*
6345 emacs_cv_localtime_cache=yes
6346fi
6347rm -fr conftest*
6348fi
6349
6350else
6351 # If we lack tzset, report that localtime does not cache TZ,
6352 # since we can't invalidate the cache if we don't have tzset.
6353 emacs_cv_localtime_cache=no
6354fi
6355fi
6356echo "$ac_t""$emacs_cv_localtime_cache" 1>&6
6357if test $emacs_cv_localtime_cache = yes; then
6358 cat >> confdefs.h <<\EOF
6359#define LOCALTIME_CACHE 1
6360EOF
6361
6362fi
6363
6364if test "x$HAVE_TIMEVAL" = xyes; then
6365echo $ac_n "checking whether gettimeofday can accept two arguments""... $ac_c" 1>&6
7397acc4 6366echo "configure:6367: checking whether gettimeofday can accept two arguments" >&5
ba4481b5
DL
6367if eval "test \"`echo '$''{'emacs_cv_gettimeofday_two_arguments'+set}'`\" = set"; then
6368 echo $ac_n "(cached) $ac_c" 1>&6
6369else
6370 cat > conftest.$ac_ext <<EOF
7397acc4 6371#line 6372 "configure"
ba4481b5
DL
6372#include "confdefs.h"
6373
6374#ifdef TIME_WITH_SYS_TIME
6375#include <sys/time.h>
6376#include <time.h>
6377#else
6378#ifdef HAVE_SYS_TIME_H
6379#include <sys/time.h>
6380#else
6381#include <time.h>
6382#endif
6383#endif
6384
6385int main() {
6386
6387 struct timeval time;
6388 struct timezone dummy;
6389 gettimeofday (&time, &dummy);
6390
6391; return 0; }
6392EOF
7397acc4 6393if { (eval echo configure:6394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ba4481b5
DL
6394 rm -rf conftest*
6395 emacs_cv_gettimeofday_two_arguments=yes
6396else
6397 echo "configure: failed program was:" >&5
6398 cat conftest.$ac_ext >&5
6399 rm -rf conftest*
6400 emacs_cv_gettimeofday_two_arguments=no
6401fi
6402rm -f conftest*
6403fi
6404
6405echo "$ac_t""$emacs_cv_gettimeofday_two_arguments" 1>&6
6406 if test $emacs_cv_gettimeofday_two_arguments = no; then
6407 cat >> confdefs.h <<\EOF
6408#define GETTIMEOFDAY_ONE_ARGUMENT 1
6409EOF
6410
6411 fi
6412fi
6413
6414ok_so_far=yes
6415echo $ac_n "checking for socket""... $ac_c" 1>&6
7397acc4 6416echo "configure:6417: checking for socket" >&5
ba4481b5
DL
6417if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then
6418 echo $ac_n "(cached) $ac_c" 1>&6
6419else
6420 cat > conftest.$ac_ext <<EOF
7397acc4 6421#line 6422 "configure"
ba4481b5
DL
6422#include "confdefs.h"
6423/* System header to define __stub macros and hopefully few prototypes,
6424 which can conflict with char socket(); below. */
6425#include <assert.h>
6426/* Override any gcc2 internal prototype to avoid an error. */
6427/* We use char because int might match the return type of a gcc2
6428 builtin and then its argument prototype would still apply. */
6429char socket();
6430
6431int main() {
6432
6433/* The GNU C library defines this for functions which it implements
6434 to always fail with ENOSYS. Some functions are actually named
6435 something starting with __ and the normal name is an alias. */
6436#if defined (__stub_socket) || defined (__stub___socket)
6437choke me
6438#else
a21616bd 6439socket();
ba4481b5
DL
6440#endif
6441
6442; return 0; }
6443EOF
7397acc4 6444if { (eval echo configure:6445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ba4481b5
DL
6445 rm -rf conftest*
6446 eval "ac_cv_func_socket=yes"
6447else
6448 echo "configure: failed program was:" >&5
6449 cat conftest.$ac_ext >&5
6450 rm -rf conftest*
6451 eval "ac_cv_func_socket=no"
6452fi
6453rm -f conftest*
6454fi
6455
6456if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
6457 echo "$ac_t""yes" 1>&6
6458 :
6459else
6460 echo "$ac_t""no" 1>&6
6461ok_so_far=no
6462fi
6463
6464if test $ok_so_far = yes; then
6465 ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'`
6466echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6
7397acc4 6467echo "configure:6468: checking for netinet/in.h" >&5
ba4481b5
DL
6468if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6469 echo $ac_n "(cached) $ac_c" 1>&6
6470else
6471 cat > conftest.$ac_ext <<EOF
7397acc4 6472#line 6473 "configure"
ba4481b5
DL
6473#include "confdefs.h"
6474#include <netinet/in.h>
6475EOF
6476ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7397acc4 6477{ (eval echo configure:6478: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c4bb2108 6478ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
ba4481b5
DL
6479if test -z "$ac_err"; then
6480 rm -rf conftest*
6481 eval "ac_cv_header_$ac_safe=yes"
6482else
6483 echo "$ac_err" >&5
6484 echo "configure: failed program was:" >&5
6485 cat conftest.$ac_ext >&5
6486 rm -rf conftest*
6487 eval "ac_cv_header_$ac_safe=no"
6488fi
6489rm -f conftest*
6490fi
6491if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6492 echo "$ac_t""yes" 1>&6
6493 :
6494else
6495 echo "$ac_t""no" 1>&6
6496ok_so_far=no
6497fi
6498
6499fi
6500if test $ok_so_far = yes; then
6501 ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'`
6502echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6
7397acc4 6503echo "configure:6504: checking for arpa/inet.h" >&5
ba4481b5
DL
6504if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6505 echo $ac_n "(cached) $ac_c" 1>&6
6506else
6507 cat > conftest.$ac_ext <<EOF
7397acc4 6508#line 6509 "configure"
ba4481b5
DL
6509#include "confdefs.h"
6510#include <arpa/inet.h>
6511EOF
6512ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7397acc4 6513{ (eval echo configure:6514: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c4bb2108 6514ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
ba4481b5
DL
6515if test -z "$ac_err"; then
6516 rm -rf conftest*
6517 eval "ac_cv_header_$ac_safe=yes"
6518else
6519 echo "$ac_err" >&5
6520 echo "configure: failed program was:" >&5
6521 cat conftest.$ac_ext >&5
6522 rm -rf conftest*
6523 eval "ac_cv_header_$ac_safe=no"
6524fi
6525rm -f conftest*
6526fi
6527if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6528 echo "$ac_t""yes" 1>&6
6529 :
6530else
6531 echo "$ac_t""no" 1>&6
6532ok_so_far=no
6533fi
6534
6535fi
6536if test $ok_so_far = yes; then
6537 cat >> confdefs.h <<\EOF
6538#define HAVE_INET_SOCKETS 1
6539EOF
6540
6541fi
6542
6543if test -f /usr/lpp/X11/bin/smt.exp; then
6544 cat >> confdefs.h <<\EOF
6545#define HAVE_AIX_SMT_EXP 1
6546EOF
6547
6548fi
6549
3d9fec71 6550echo $ac_n "checking whether system supports dynamic ptys""... $ac_c" 1>&6
7397acc4 6551echo "configure:6552: checking whether system supports dynamic ptys" >&5
3d9fec71
DL
6552if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then
6553 echo "$ac_t""yes" 1>&6
6554 cat >> confdefs.h <<\EOF
6555#define HAVE_DEV_PTMX 1
6556EOF
6557
6558else
6559 echo "$ac_t""no" 1>&6
6560fi
6561
647847ea 6562echo $ac_n "checking for pid_t""... $ac_c" 1>&6
7397acc4 6563echo "configure:6564: checking for pid_t" >&5
647847ea
DL
6564if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
6565 echo $ac_n "(cached) $ac_c" 1>&6
6566else
6567 cat > conftest.$ac_ext <<EOF
7397acc4 6568#line 6569 "configure"
647847ea
DL
6569#include "confdefs.h"
6570#include <sys/types.h>
6571#if STDC_HEADERS
6572#include <stdlib.h>
6573#include <stddef.h>
6574#endif
6575EOF
6576if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6577 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6578 rm -rf conftest*
6579 ac_cv_type_pid_t=yes
6580else
6581 rm -rf conftest*
6582 ac_cv_type_pid_t=no
6583fi
6584rm -f conftest*
6585
6586fi
6587echo "$ac_t""$ac_cv_type_pid_t" 1>&6
6588if test $ac_cv_type_pid_t = no; then
6589 cat >> confdefs.h <<\EOF
6590#define pid_t int
6591EOF
6592
6593fi
6594
6595ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
6596echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
7397acc4 6597echo "configure:6598: checking for vfork.h" >&5
647847ea
DL
6598if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6599 echo $ac_n "(cached) $ac_c" 1>&6
6600else
6601 cat > conftest.$ac_ext <<EOF
7397acc4 6602#line 6603 "configure"
647847ea
DL
6603#include "confdefs.h"
6604#include <vfork.h>
6605EOF
6606ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7397acc4 6607{ (eval echo configure:6608: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
647847ea
DL
6608ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6609if test -z "$ac_err"; then
6610 rm -rf conftest*
6611 eval "ac_cv_header_$ac_safe=yes"
6612else
6613 echo "$ac_err" >&5
6614 echo "configure: failed program was:" >&5
6615 cat conftest.$ac_ext >&5
6616 rm -rf conftest*
6617 eval "ac_cv_header_$ac_safe=no"
6618fi
6619rm -f conftest*
6620fi
6621if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6622 echo "$ac_t""yes" 1>&6
6623 cat >> confdefs.h <<\EOF
6624#define HAVE_VFORK_H 1
6625EOF
6626
6627else
6628 echo "$ac_t""no" 1>&6
6629fi
6630
6631echo $ac_n "checking for working vfork""... $ac_c" 1>&6
7397acc4 6632echo "configure:6633: checking for working vfork" >&5
647847ea
DL
6633if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
6634 echo $ac_n "(cached) $ac_c" 1>&6
6635else
6636 if test "$cross_compiling" = yes; then
6637 echo $ac_n "checking for vfork""... $ac_c" 1>&6
7397acc4 6638echo "configure:6639: checking for vfork" >&5
647847ea
DL
6639if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
6640 echo $ac_n "(cached) $ac_c" 1>&6
6641else
6642 cat > conftest.$ac_ext <<EOF
7397acc4 6643#line 6644 "configure"
647847ea
DL
6644#include "confdefs.h"
6645/* System header to define __stub macros and hopefully few prototypes,
6646 which can conflict with char vfork(); below. */
6647#include <assert.h>
6648/* Override any gcc2 internal prototype to avoid an error. */
6649/* We use char because int might match the return type of a gcc2
6650 builtin and then its argument prototype would still apply. */
6651char vfork();
6652
6653int main() {
6654
6655/* The GNU C library defines this for functions which it implements
6656 to always fail with ENOSYS. Some functions are actually named
6657 something starting with __ and the normal name is an alias. */
6658#if defined (__stub_vfork) || defined (__stub___vfork)
6659choke me
6660#else
6661vfork();
6662#endif
6663
6664; return 0; }
6665EOF
7397acc4 6666if { (eval echo configure:6667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
647847ea
DL
6667 rm -rf conftest*
6668 eval "ac_cv_func_vfork=yes"
6669else
6670 echo "configure: failed program was:" >&5
6671 cat conftest.$ac_ext >&5
6672 rm -rf conftest*
6673 eval "ac_cv_func_vfork=no"
6674fi
6675rm -f conftest*
6676fi
6677
6678if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
6679 echo "$ac_t""yes" 1>&6
6680 :
6681else
6682 echo "$ac_t""no" 1>&6
6683fi
6684
6685ac_cv_func_vfork_works=$ac_cv_func_vfork
6686else
6687 cat > conftest.$ac_ext <<EOF
7397acc4 6688#line 6689 "configure"
647847ea
DL
6689#include "confdefs.h"
6690/* Thanks to Paul Eggert for this test. */
6691#include <stdio.h>
6692#include <sys/types.h>
6693#include <sys/stat.h>
6694#ifdef HAVE_UNISTD_H
6695#include <unistd.h>
6696#endif
6697#ifdef HAVE_VFORK_H
6698#include <vfork.h>
6699#endif
6700/* On some sparc systems, changes by the child to local and incoming
6701 argument registers are propagated back to the parent.
6702 The compiler is told about this with #include <vfork.h>,
6703 but some compilers (e.g. gcc -O) don't grok <vfork.h>.
6704 Test for this by using a static variable whose address
6705 is put into a register that is clobbered by the vfork. */
6706static
6707#ifdef __cplusplus
6708sparc_address_test (int arg)
6709#else
6710sparc_address_test (arg) int arg;
6711#endif
6712{
6713 static pid_t child;
6714 if (!child) {
6715 child = vfork ();
6716 if (child < 0) {
6717 perror ("vfork");
6718 _exit(2);
6719 }
6720 if (!child) {
6721 arg = getpid();
6722 write(-1, "", 0);
6723 _exit (arg);
6724 }
6725 }
6726}
6727main() {
6728 pid_t parent = getpid ();
6729 pid_t child;
6730
6731 sparc_address_test ();
6732
6733 child = vfork ();
6734
6735 if (child == 0) {
6736 /* Here is another test for sparc vfork register problems.
6737 This test uses lots of local variables, at least
6738 as many local variables as main has allocated so far
6739 including compiler temporaries. 4 locals are enough for
6740 gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
6741 A buggy compiler should reuse the register of parent
6742 for one of the local variables, since it will think that
6743 parent can't possibly be used any more in this routine.
6744 Assigning to the local variable will thus munge parent
6745 in the parent process. */
6746 pid_t
6747 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
6748 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
6749 /* Convince the compiler that p..p7 are live; otherwise, it might
6750 use the same hardware register for all 8 local variables. */
6751 if (p != p1 || p != p2 || p != p3 || p != p4
6752 || p != p5 || p != p6 || p != p7)
6753 _exit(1);
6754
6755 /* On some systems (e.g. IRIX 3.3),
6756 vfork doesn't separate parent from child file descriptors.
6757 If the child closes a descriptor before it execs or exits,
6758 this munges the parent's descriptor as well.
6759 Test for this by closing stdout in the child. */
6760 _exit(close(fileno(stdout)) != 0);
6761 } else {
6762 int status;
6763 struct stat st;
6764
6765 while (wait(&status) != child)
6766 ;
6767 exit(
6768 /* Was there some problem with vforking? */
6769 child < 0
6770
6771 /* Did the child fail? (This shouldn't happen.) */
6772 || status
6773
6774 /* Did the vfork/compiler bug occur? */
6775 || parent != getpid()
6776
6777 /* Did the file descriptor bug occur? */
6778 || fstat(fileno(stdout), &st) != 0
6779 );
6780 }
6781}
6782EOF
7397acc4 6783if { (eval echo configure:6784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
647847ea
DL
6784then
6785 ac_cv_func_vfork_works=yes
6786else
6787 echo "configure: failed program was:" >&5
6788 cat conftest.$ac_ext >&5
6789 rm -fr conftest*
6790 ac_cv_func_vfork_works=no
6791fi
6792rm -fr conftest*
6793fi
6794
6795fi
6796
6797echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
6798if test $ac_cv_func_vfork_works = no; then
6799 cat >> confdefs.h <<\EOF
6800#define vfork fork
6801EOF
6802
6803fi
6804
6805
ba4481b5
DL
6806# Set up the CFLAGS for real compilation, so we can substitute it.
6807CFLAGS="$REAL_CFLAGS"
6808
6809#### Find out which version of Emacs this is.
6810version=`grep 'defconst[ ]*emacs-version' ${srcdir}/lisp/version.el \
6811 | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`
6812if test x"${version}" = x; then
6813 { echo "configure: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." 1>&2; exit 1; }
6814fi
6815
6816### Specify what sort of things we'll be editing into Makefile and config.h.
6817### Use configuration here uncanonicalized to avoid exceeding size limits.
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845
ba4481b5
DL
6846
6847
6848cat >> confdefs.h <<EOF
6849#define EMACS_CONFIGURATION "${canonical}"
6850EOF
6851
6852cat >> confdefs.h <<EOF
6853#define EMACS_CONFIG_OPTIONS "${ac_configure_args}"
6854EOF
6855
6856cat >> confdefs.h <<EOF
6857#define config_machfile "${machfile}"
6858EOF
6859
6860cat >> confdefs.h <<EOF
6861#define config_opsysfile "${opsysfile}"
6862EOF
6863
6864cat >> confdefs.h <<EOF
6865#define LD_SWITCH_X_SITE ${LD_SWITCH_X_SITE}
6866EOF
6867
6868cat >> confdefs.h <<EOF
6869#define LD_SWITCH_X_SITE_AUX ${LD_SWITCH_X_SITE_AUX}
6870EOF
6871
6872cat >> confdefs.h <<EOF
6873#define C_SWITCH_X_SITE ${C_SWITCH_X_SITE}
6874EOF
6875
6876cat >> confdefs.h <<EOF
6877#define UNEXEC_SRC ${UNEXEC_SRC}
6878EOF
6879
6880
6881if test "${HAVE_X_WINDOWS}" = "yes" ; then
6882 cat >> confdefs.h <<\EOF
6883#define HAVE_X_WINDOWS 1
6884EOF
6885
6886fi
6887if test "${USE_X_TOOLKIT}" != "none" ; then
6888 cat >> confdefs.h <<\EOF
6889#define USE_X_TOOLKIT 1
6890EOF
6891
6892fi
6893if test "${HAVE_X11}" = "yes" ; then
6894 cat >> confdefs.h <<\EOF
6895#define HAVE_X11 1
6896EOF
6897
6898fi
6899if test "${HAVE_XFREE386}" = "yes" ; then
6900 cat >> confdefs.h <<\EOF
6901#define HAVE_XFREE386 1
6902EOF
6903
6904fi
6905if test "${HAVE_MENUS}" = "yes" ; then
6906 cat >> confdefs.h <<\EOF
6907#define HAVE_MENUS 1
6908EOF
6909
6910fi
6911if test "${GNU_MALLOC}" = "yes" ; then
6912 cat >> confdefs.h <<\EOF
6913#define GNU_MALLOC 1
6914EOF
6915
6916fi
6917if test "${REL_ALLOC}" = "yes" ; then
6918 cat >> confdefs.h <<\EOF
6919#define REL_ALLOC 1
6920EOF
6921
ba4481b5
DL
6922fi
6923
6924#### Report on what we decided to do.
6925echo "
6926Configured for \`${canonical}'.
6927
6928 Where should the build process find the source code? ${srcdir}
6929 What operating system and machine description files should Emacs use?
6930 \`${opsysfile}' and \`${machfile}'
6931 What compiler should emacs be built with? ${CC} ${CFLAGS}
6932 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
6933 Should Emacs use the relocating allocator for buffers? ${REL_ALLOC}
6934 What window system should Emacs use? ${window_system}
6935 What toolkit should Emacs use? ${USE_X_TOOLKIT}"
6936
6937if test -n "${x_includes}"; then
6938echo " Where do we find X Windows header files? ${x_includes}"
6939else
6940echo " Where do we find X Windows header files? Standard dirs"
6941fi
6942if test -n "${x_libraries}"; then
6943echo " Where do we find X Windows libraries? ${x_libraries}"
6944else
6945echo " Where do we find X Windows libraries? Standard dirs"
6946fi
6947
6948echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}"
6949echo " Does Emacs use -lXpm? ${HAVE_XPM}"
6950echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
6951echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
6952echo " Does Emacs use -lungif? ${HAVE_GIF}"
6953echo " Does Emacs use -lpng? ${HAVE_PNG}"
6954echo " Does Emacs use X toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}"
6955echo
6956
6957# Remove any trailing slashes in these variables.
6958test "${prefix}" != NONE &&
6959 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
6960test "${exec_prefix}" != NONE &&
6961 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
6962
6963trap '' 1 2 15
6964cat > confcache <<\EOF
6965# This file is a shell script that caches the results of configure
6966# tests run on this system so they can be shared between configure
6967# scripts and configure runs. It is not useful on other systems.
6968# If it contains results you don't want to keep, you may remove or edit it.
6969#
6970# By default, configure uses ./config.cache as the cache file,
6971# creating it if it does not exist already. You can give configure
6972# the --cache-file=FILE option to use a different cache file; that is
6973# what configure does when it calls configure scripts in
6974# subdirectories, so they share the cache.
6975# Giving --cache-file=/dev/null disables caching, for debugging configure.
6976# config.status only pays attention to the cache file if you give it the
6977# --recheck option to rerun configure.
6978#
6979EOF
6980# The following way of writing the cache mishandles newlines in values,
6981# but we know of no workaround that is simple, portable, and efficient.
6982# So, don't put newlines in cache variables' values.
6983# Ultrix sh set writes to stderr and can't be redirected directly,
6984# and sets the high bit in the cache file unless we assign to the vars.
6985(set) 2>&1 |
6986 case `(ac_space=' '; set | grep ac_space) 2>&1` in
6987 *ac_space=\ *)
6988 # `set' does not quote correctly, so add quotes (double-quote substitution
6989 # turns \\\\ into \\, and sed turns \\ into \).
6990 sed -n \
6991 -e "s/'/'\\\\''/g" \
6992 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
6993 ;;
6994 *)
6995 # `set' quotes correctly as required by POSIX, so do not add quotes.
6996 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
6997 ;;
6998 esac >> confcache
6999if cmp -s $cache_file confcache; then
7000 :
7001else
7002 if test -w $cache_file; then
7003 echo "updating cache $cache_file"
7004 cat confcache > $cache_file
7005 else
7006 echo "not updating unwritable cache $cache_file"
7007 fi
7008fi
7009rm -f confcache
7010
7011trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
7012
7013test "x$prefix" = xNONE && prefix=$ac_default_prefix
7014# Let make expand exec_prefix.
7015test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7016
7017# Any assignment to VPATH causes Sun make to only execute
7018# the first set of double-colon rules, so remove it if not needed.
7019# If there is a colon in the path, we need to keep it.
7020if test "x$srcdir" = x.; then
7021 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
7022fi
7023
7024trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
7025
7026DEFS=-DHAVE_CONFIG_H
7027
7028# Without the "./", some shells look in PATH for config.status.
7029: ${CONFIG_STATUS=./config.status}
7030
7031echo creating $CONFIG_STATUS
7032rm -f $CONFIG_STATUS
7033cat > $CONFIG_STATUS <<EOF
7034#! /bin/sh
7035# Generated automatically by configure.
7036# Run this file to recreate the current configuration.
7037# This directory was configured as follows,
7038# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7039#
7040# $0 $ac_configure_args
7041#
7042# Compiler output produced by configure, useful for debugging
7043# configure, is in ./config.log if it exists.
7044
7045ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
7046for ac_option
7047do
7048 case "\$ac_option" in
7049 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
7050 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
7051 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
7052 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
c4bb2108 7053 echo "$CONFIG_STATUS generated by autoconf version 2.13"
ba4481b5
DL
7054 exit 0 ;;
7055 -help | --help | --hel | --he | --h)
7056 echo "\$ac_cs_usage"; exit 0 ;;
7057 *) echo "\$ac_cs_usage"; exit 1 ;;
7058 esac
7059done
7060
7061ac_given_srcdir=$srcdir
7062ac_given_INSTALL="$INSTALL"
7063
7064trap 'rm -fr `echo "Makefile lib-src/Makefile.c:lib-src/Makefile.in oldXMenu/Makefile \
7065 man/Makefile lwlib/Makefile src/Makefile.c:src/Makefile.in \
7066 leim/Makefile src/config.h:src/config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
7067EOF
7068cat >> $CONFIG_STATUS <<EOF
7069
7070# Protect against being on the right side of a sed subst in config.status.
7071sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
7072 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
7073$ac_vpsub
7074$extrasub
c4bb2108 7075s%@SHELL@%$SHELL%g
ba4481b5
DL
7076s%@CFLAGS@%$CFLAGS%g
7077s%@CPPFLAGS@%$CPPFLAGS%g
7078s%@CXXFLAGS@%$CXXFLAGS%g
c4bb2108 7079s%@FFLAGS@%$FFLAGS%g
ba4481b5
DL
7080s%@DEFS@%$DEFS%g
7081s%@LDFLAGS@%$LDFLAGS%g
7082s%@LIBS@%$LIBS%g
7083s%@exec_prefix@%$exec_prefix%g
7084s%@prefix@%$prefix%g
7085s%@program_transform_name@%$program_transform_name%g
7086s%@bindir@%$bindir%g
7087s%@sbindir@%$sbindir%g
7088s%@libexecdir@%$libexecdir%g
7089s%@datadir@%$datadir%g
7090s%@sysconfdir@%$sysconfdir%g
7091s%@sharedstatedir@%$sharedstatedir%g
7092s%@localstatedir@%$localstatedir%g
7093s%@libdir@%$libdir%g
7094s%@includedir@%$includedir%g
7095s%@oldincludedir@%$oldincludedir%g
7096s%@infodir@%$infodir%g
7097s%@mandir@%$mandir%g
7098s%@host@%$host%g
7099s%@host_alias@%$host_alias%g
7100s%@host_cpu@%$host_cpu%g
7101s%@host_vendor@%$host_vendor%g
7102s%@host_os@%$host_os%g
7103s%@CC@%$CC%g
7104s%@LN_S@%$LN_S%g
7105s%@CPP@%$CPP%g
7106s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
c4bb2108 7107s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
ba4481b5
DL
7108s%@INSTALL_DATA@%$INSTALL_DATA%g
7109s%@YACC@%$YACC%g
7397acc4 7110s%@RANLIB@%$RANLIB%g
ba4481b5
DL
7111s%@SET_MAKE@%$SET_MAKE%g
7112s%@ALLOCA@%$ALLOCA%g
7113s%@liblockfile@%$liblockfile%g
7114s%@version@%$version%g
7115s%@configuration@%$configuration%g
7116s%@canonical@%$canonical%g
7117s%@srcdir@%$srcdir%g
7118s%@lispdir@%$lispdir%g
7119s%@locallisppath@%$locallisppath%g
7120s%@lisppath@%$lisppath%g
7121s%@x_default_search_path@%$x_default_search_path%g
7122s%@etcdir@%$etcdir%g
7123s%@archlibdir@%$archlibdir%g
7124s%@docdir@%$docdir%g
7125s%@bitmapdir@%$bitmapdir%g
7126s%@c_switch_system@%$c_switch_system%g
7127s%@c_switch_machine@%$c_switch_machine%g
7128s%@LD_SWITCH_X_SITE@%$LD_SWITCH_X_SITE%g
7129s%@LD_SWITCH_X_SITE_AUX@%$LD_SWITCH_X_SITE_AUX%g
7130s%@C_SWITCH_X_SITE@%$C_SWITCH_X_SITE%g
7131s%@X_TOOLKIT_TYPE@%$X_TOOLKIT_TYPE%g
7132s%@machfile@%$machfile%g
7133s%@opsysfile@%$opsysfile%g
ba4481b5
DL
7134
7135CEOF
7136EOF
7137
7138cat >> $CONFIG_STATUS <<\EOF
7139
7140# Split the substitutions into bite-sized pieces for seds with
7141# small command number limits, like on Digital OSF/1 and HP-UX.
7142ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
7143ac_file=1 # Number of current file.
7144ac_beg=1 # First line for current file.
7145ac_end=$ac_max_sed_cmds # Line after last line for current file.
7146ac_more_lines=:
7147ac_sed_cmds=""
7148while $ac_more_lines; do
7149 if test $ac_beg -gt 1; then
7150 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
7151 else
7152 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
7153 fi
7154 if test ! -s conftest.s$ac_file; then
7155 ac_more_lines=false
7156 rm -f conftest.s$ac_file
7157 else
7158 if test -z "$ac_sed_cmds"; then
7159 ac_sed_cmds="sed -f conftest.s$ac_file"
7160 else
7161 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
7162 fi
7163 ac_file=`expr $ac_file + 1`
7164 ac_beg=$ac_end
7165 ac_end=`expr $ac_end + $ac_max_sed_cmds`
7166 fi
7167done
7168if test -z "$ac_sed_cmds"; then
7169 ac_sed_cmds=cat
7170fi
7171EOF
7172
7173cat >> $CONFIG_STATUS <<EOF
7174
7175CONFIG_FILES=\${CONFIG_FILES-"Makefile lib-src/Makefile.c:lib-src/Makefile.in oldXMenu/Makefile \
7176 man/Makefile lwlib/Makefile src/Makefile.c:src/Makefile.in \
7177 leim/Makefile"}
7178EOF
7179cat >> $CONFIG_STATUS <<\EOF
7180for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
7181 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
7182 case "$ac_file" in
7183 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7184 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7185 *) ac_file_in="${ac_file}.in" ;;
7186 esac
7187
7188 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
7189
7190 # Remove last slash and all that follows it. Not all systems have dirname.
7191 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7192 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7193 # The file is in a subdirectory.
7194 test ! -d "$ac_dir" && mkdir "$ac_dir"
7195 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
7196 # A "../" for each directory in $ac_dir_suffix.
7197 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
7198 else
7199 ac_dir_suffix= ac_dots=
7200 fi
7201
7202 case "$ac_given_srcdir" in
7203 .) srcdir=.
7204 if test -z "$ac_dots"; then top_srcdir=.
7205 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
7206 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
7207 *) # Relative path.
7208 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
7209 top_srcdir="$ac_dots$ac_given_srcdir" ;;
7210 esac
7211
7212 case "$ac_given_INSTALL" in
7213 [/$]*) INSTALL="$ac_given_INSTALL" ;;
7214 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
7215 esac
7216
7217 echo creating "$ac_file"
7218 rm -f "$ac_file"
7219 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
7220 case "$ac_file" in
7221 *Makefile*) ac_comsub="1i\\
7222# $configure_input" ;;
7223 *) ac_comsub= ;;
7224 esac
7225
7226 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7227 sed -e "$ac_comsub
7228s%@configure_input@%$configure_input%g
7229s%@srcdir@%$srcdir%g
7230s%@top_srcdir@%$top_srcdir%g
7231s%@INSTALL@%$INSTALL%g
7232" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
7233fi; done
7234rm -f conftest.s*
7235
7236# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
7237# NAME is the cpp macro being defined and VALUE is the value it is being given.
7238#
7239# ac_d sets the value in "#define NAME VALUE" lines.
7240ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
7241ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
7242ac_dC='\3'
7243ac_dD='%g'
7244# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
7245ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
7246ac_uB='\([ ]\)%\1#\2define\3'
7247ac_uC=' '
7248ac_uD='\4%g'
7249# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
7250ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
7251ac_eB='$%\1#\2define\3'
7252ac_eC=' '
7253ac_eD='%g'
7254
7255if test "${CONFIG_HEADERS+set}" != set; then
7256EOF
7257cat >> $CONFIG_STATUS <<EOF
7258 CONFIG_HEADERS="src/config.h:src/config.in"
7259EOF
7260cat >> $CONFIG_STATUS <<\EOF
7261fi
7262for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
7263 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
7264 case "$ac_file" in
7265 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7266 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7267 *) ac_file_in="${ac_file}.in" ;;
7268 esac
7269
7270 echo creating $ac_file
7271
7272 rm -f conftest.frag conftest.in conftest.out
7273 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7274 cat $ac_file_inputs > conftest.in
7275
7276EOF
7277
7278# Transform confdefs.h into a sed script conftest.vals that substitutes
7279# the proper values into config.h.in to produce config.h. And first:
7280# Protect against being on the right side of a sed subst in config.status.
7281# Protect against being in an unquoted here document in config.status.
7282rm -f conftest.vals
7283cat > conftest.hdr <<\EOF
7284s/[\\&%]/\\&/g
7285s%[\\$`]%\\&%g
7286s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
7287s%ac_d%ac_u%gp
7288s%ac_u%ac_e%gp
7289EOF
7290sed -n -f conftest.hdr confdefs.h > conftest.vals
7291rm -f conftest.hdr
7292
7293# This sed command replaces #undef with comments. This is necessary, for
7294# example, in the case of _POSIX_SOURCE, which is predefined and required
7295# on some systems where configure will not decide to define it.
7296cat >> conftest.vals <<\EOF
7297s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
7298EOF
7299
7300# Break up conftest.vals because some shells have a limit on
7301# the size of here documents, and old seds have small limits too.
7302
7303rm -f conftest.tail
7304while :
7305do
7306 ac_lines=`grep -c . conftest.vals`
7307 # grep -c gives empty output for an empty file on some AIX systems.
7308 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
7309 # Write a limited-size here document to conftest.frag.
7310 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
7311 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
7312 echo 'CEOF
7313 sed -f conftest.frag conftest.in > conftest.out
7314 rm -f conftest.in
7315 mv conftest.out conftest.in
7316' >> $CONFIG_STATUS
7317 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
7318 rm -f conftest.vals
7319 mv conftest.tail conftest.vals
7320done
7321rm -f conftest.vals
7322
7323cat >> $CONFIG_STATUS <<\EOF
7324 rm -f conftest.frag conftest.h
7325 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
7326 cat conftest.in >> conftest.h
7327 rm -f conftest.in
7328 if cmp -s $ac_file conftest.h 2>/dev/null; then
7329 echo "$ac_file is unchanged"
7330 rm -f conftest.h
7331 else
7332 # Remove last slash and all that follows it. Not all systems have dirname.
7333 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7334 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7335 # The file is in a subdirectory.
7336 test ! -d "$ac_dir" && mkdir "$ac_dir"
7337 fi
7338 rm -f $ac_file
7339 mv conftest.h $ac_file
7340 fi
7341fi; done
7342
7343EOF
7344cat >> $CONFIG_STATUS <<EOF
7345CPP="$CPP" CPPFLAGS="$CPPFLAGS"
7346EOF
7347cat >> $CONFIG_STATUS <<\EOF
7348
7349
7350### Make the necessary directories, if they don't exist.
7351for dir in etc lisp ; do
7352 test -d ${dir} || mkdir ${dir}
7353done
7354
7355# Build src/Makefile from ${srcdir}/src/Makefile.c
7356# and lib-src/Makefile from ${srcdir}/lib-src/Makefile.c
7357# This must be done after src/config.h is built, since we rely on that file.
7358
7359# Now get this: Some word that is part of the ${srcdir} directory name
7360# or the ${configuration} value might, just might, happen to be an
7361# identifier like `sun4' or `i386' or something, and be predefined by
7362# the C preprocessor to some helpful value like 1, or maybe the empty
7363# string. Needless to say consequent macro substitutions are less
7364# than conducive to the makefile finding the correct directory.
7365undefs="`echo $top_srcdir $configuration $canonical |
7366sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/ *$//' \
7367 -e 's/ */ -U/g' -e 's/-U[0-9][^ ]*//g' \
7368`"
7369
7370echo creating src/epaths.h
7371make epaths-force
7372
7373echo creating lib-src/Makefile
7374( cd lib-src
7375 rm -f junk.c junk1.c junk2.c
7376 sed -e '/start of cpp stuff/q' \
7377 < Makefile.c > junk1.c
7378 sed -e '1,/start of cpp stuff/d'\
7379 -e 's@/\*\*/#\(.*\)$@/* \1 */@' \
7380 < Makefile.c > junk.c
7381 $CPP $undefs -I. -I$top_srcdir/src $CPPFLAGS junk.c | \
7382 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
7383 cat junk1.c junk2.c > Makefile.new
7384 rm -f junk.c junk1.c junk2.c
7385 chmod 444 Makefile.new
7386 mv -f Makefile.new Makefile
7387)
7388
7389echo creating src/Makefile
7390( cd src
7391 rm -f junk.c junk1.c junk2.c
7392 sed -e '/start of cpp stuff/q' \
7393 < Makefile.c > junk1.c
7394 sed -e '1,/start of cpp stuff/d'\
7395 -e 's@/\*\*/#\(.*\)$@/* \1 */@' \
7396 < Makefile.c > junk.c
7397 $CPP $undefs -I. -I$top_srcdir/src $CPPFLAGS junk.c | \
7398 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
7399 cat junk1.c junk2.c > Makefile.new
7400 rm -f junk.c junk1.c junk2.c
7401 chmod 444 Makefile.new
7402 mv -f Makefile.new Makefile
7403)
7404
7405if test ! -f src/.gdbinit && test -f $top_srcdir/src/.gdbinit; then
7406 echo creating src/.gdbinit
7407 echo source $top_srcdir/src/.gdbinit > src/.gdbinit
7408fi
7409
7410# This is how we know whether to re-run configure in certain cases.
7411touch src/config.stamp
7412
7413
7414exit 0
7415EOF
7416chmod +x $CONFIG_STATUS
7417rm -fr confdefs* $ac_clean_files
7418test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
7419