(info-xref-check): Use line-beginning-position.
[bpt/emacs.git] / configure
CommitLineData
ba4481b5 1#! /bin/sh
ba4481b5 2# Guess values for system-dependent variables and create Makefiles.
9e71690e 3# Generated by GNU Autoconf 2.57.
ba4481b5 4#
c0d27fcc 5# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
503d2be0 6# Free Software Foundation, Inc.
ba4481b5
DL
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
c0d27fcc
MR
9## --------------------- ##
10## M4sh Initialization. ##
11## --------------------- ##
503d2be0
AS
12
13# Be Bourne compatible
14if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
15 emulate sh
16 NULLCMD=:
6bae0ccf
DL
17 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
18 # is contrary to our usage. Disable this feature.
19 alias -g '${1+"$@"}'='"$@"'
503d2be0
AS
20elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
21 set -o posix
22fi
23
c0d27fcc
MR
24# Support unset when possible.
25if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
26 as_unset=unset
27else
28 as_unset=false
29fi
30
6bae0ccf
DL
31
32# Work around bugs in pre-3.0 UWIN ksh.
33$as_unset ENV MAIL MAILPATH
34PS1='$ '
35PS2='> '
36PS4='+ '
37
38# NLS nuisances.
cd958eb3
MB
39for as_var in \
40 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
41 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
42 LC_TELEPHONE LC_TIME
6bae0ccf
DL
43do
44 if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
45 eval $as_var=C; export $as_var
46 else
47 $as_unset $as_var
48 fi
49done
50
51# Required to use basename.
52if expr a : '\(a\)' >/dev/null 2>&1; then
53 as_expr=expr
54else
55 as_expr=false
56fi
57
58if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
59 as_basename=basename
60else
61 as_basename=false
62fi
c0d27fcc
MR
63
64
503d2be0 65# Name of the executable.
6bae0ccf 66as_me=`$as_basename "$0" ||
c0d27fcc
MR
67$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
68 X"$0" : 'X\(//\)$' \| \
69 X"$0" : 'X\(/\)$' \| \
70 . : '\(.\)' 2>/dev/null ||
71echo X/"$0" |
72 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
73 /^X\/\(\/\/\)$/{ s//\1/; q; }
74 /^X\/\(\/\).*/{ s//\1/; q; }
75 s/.*/./; q'`
76
6bae0ccf 77
c0d27fcc
MR
78# PATH needs CR, and LINENO needs CR and PATH.
79# Avoid depending upon Character Ranges.
80as_cr_letters='abcdefghijklmnopqrstuvwxyz'
81as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
82as_cr_Letters=$as_cr_letters$as_cr_LETTERS
83as_cr_digits='0123456789'
84as_cr_alnum=$as_cr_Letters$as_cr_digits
85
86# The user is always right.
87if test "${PATH_SEPARATOR+set}" != set; then
cd958eb3
MB
88 echo "#! /bin/sh" >conf$$.sh
89 echo "exit 0" >>conf$$.sh
90 chmod +x conf$$.sh
91 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
c0d27fcc
MR
92 PATH_SEPARATOR=';'
93 else
94 PATH_SEPARATOR=:
95 fi
cd958eb3 96 rm -f conf$$.sh
c0d27fcc
MR
97fi
98
99
100 as_lineno_1=$LINENO
101 as_lineno_2=$LINENO
102 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
103 test "x$as_lineno_1" != "x$as_lineno_2" &&
104 test "x$as_lineno_3" = "x$as_lineno_2" || {
105 # Find who we are. Look in the path if we contain no path at all
106 # relative or not.
107 case $0 in
108 *[\\/]* ) as_myself=$0 ;;
109 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
110for as_dir in $PATH
111do
112 IFS=$as_save_IFS
113 test -z "$as_dir" && as_dir=.
114 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
115done
116
117 ;;
118 esac
119 # We did not find ourselves, most probably we were run as `sh COMMAND'
120 # in which case we are not to be found in the path.
121 if test "x$as_myself" = x; then
122 as_myself=$0
123 fi
124 if test ! -f "$as_myself"; then
125 { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
126 { (exit 1); exit 1; }; }
127 fi
128 case $CONFIG_SHELL in
129 '')
130 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
131for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
132do
133 IFS=$as_save_IFS
134 test -z "$as_dir" && as_dir=.
135 for as_base in sh bash ksh sh5; do
136 case $as_dir in
137 /*)
138 if ("$as_dir/$as_base" -c '
139 as_lineno_1=$LINENO
140 as_lineno_2=$LINENO
141 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
142 test "x$as_lineno_1" != "x$as_lineno_2" &&
143 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
6bae0ccf
DL
144 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
145 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
c0d27fcc
MR
146 CONFIG_SHELL=$as_dir/$as_base
147 export CONFIG_SHELL
148 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
149 fi;;
150 esac
151 done
152done
153;;
154 esac
155
156 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
157 # uniformly replaced by the line number. The first 'sed' inserts a
158 # line-number line before each line; the second 'sed' does the real
159 # work. The second script uses 'N' to pair each line-number line
160 # with the numbered line, and appends trailing '-' during
161 # substitution so that $LINENO is not a special case at line end.
162 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
163 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
164 sed '=' <$as_myself |
165 sed '
166 N
167 s,$,-,
168 : loop
169 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
170 t loop
171 s,-$,,
172 s,^['$as_cr_digits']*\n,,
173 ' >$as_me.lineno &&
174 chmod +x $as_me.lineno ||
175 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
176 { (exit 1); exit 1; }; }
177
178 # Don't try to exec as it changes $[0], causing all sort of problems
179 # (the dirname of $[0] is not the place where we might find the
180 # original and so on. Autoconf is especially sensible to this).
181 . ./$as_me.lineno
182 # Exit status is that of the last command.
183 exit
184}
185
186
187case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
188 *c*,-n*) ECHO_N= ECHO_C='
189' ECHO_T=' ' ;;
190 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
191 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
192esac
503d2be0
AS
193
194if expr a : '\(a\)' >/dev/null 2>&1; then
195 as_expr=expr
196else
197 as_expr=false
198fi
199
200rm -f conf$$ conf$$.exe conf$$.file
201echo >conf$$.file
202if ln -s conf$$.file conf$$ 2>/dev/null; then
203 # We could just check for DJGPP; but this test a) works b) is more generic
204 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
205 if test -f conf$$.exe; then
206 # Don't use ln at all; we don't have any links
207 as_ln_s='cp -p'
208 else
209 as_ln_s='ln -s'
210 fi
211elif ln conf$$.file conf$$ 2>/dev/null; then
212 as_ln_s=ln
213else
214 as_ln_s='cp -p'
215fi
216rm -f conf$$ conf$$.exe conf$$.file
217
6bae0ccf
DL
218if mkdir -p . 2>/dev/null; then
219 as_mkdir_p=:
220else
221 as_mkdir_p=false
222fi
223
503d2be0
AS
224as_executable_p="test -f"
225
c0d27fcc
MR
226# Sed expression to map a string onto a valid CPP name.
227as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
228
229# Sed expression to map a string onto a valid variable name.
230as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
503d2be0 231
503d2be0
AS
232
233# IFS
234# We need space, tab and new line, in precisely that order.
235as_nl='
236'
237IFS=" $as_nl"
238
239# CDPATH.
6bae0ccf 240$as_unset CDPATH
c0d27fcc 241
503d2be0
AS
242
243# Name of the host.
244# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
245# so uname gets run too.
246ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
247
248exec 6>&1
249
250#
251# Initializations.
252#
ba4481b5 253ac_default_prefix=/usr/local
6bae0ccf 254ac_config_libobj_dir=.
503d2be0
AS
255cross_compiling=no
256subdirs=
c0d27fcc
MR
257MFLAGS=
258MAKEFLAGS=
503d2be0
AS
259SHELL=${CONFIG_SHELL-/bin/sh}
260
261# Maximum number of lines to put in a shell here document.
262# This variable seems obsolete. It should probably be removed, and
263# only ac_max_sed_lines should be used.
264: ${ac_max_here_lines=38}
265
c0d27fcc
MR
266# Identity of this package.
267PACKAGE_NAME=
268PACKAGE_TARNAME=
269PACKAGE_VERSION=
270PACKAGE_STRING=
271PACKAGE_BUGREPORT=
272
503d2be0 273ac_unique_file="src/lisp.h"
6bae0ccf 274ac_config_libobj_dir=src
503d2be0
AS
275# Factoring default headers for most tests.
276ac_includes_default="\
277#include <stdio.h>
278#if HAVE_SYS_TYPES_H
279# include <sys/types.h>
280#endif
281#if HAVE_SYS_STAT_H
282# include <sys/stat.h>
283#endif
284#if STDC_HEADERS
285# include <stdlib.h>
286# include <stddef.h>
287#else
288# if HAVE_STDLIB_H
289# include <stdlib.h>
290# endif
291#endif
292#if HAVE_STRING_H
293# if !STDC_HEADERS && HAVE_MEMORY_H
294# include <memory.h>
295# endif
296# include <string.h>
297#endif
298#if HAVE_STRINGS_H
299# include <strings.h>
300#endif
301#if HAVE_INTTYPES_H
302# include <inttypes.h>
303#else
304# if HAVE_STDINT_H
305# include <stdint.h>
306# endif
307#endif
308#if HAVE_UNISTD_H
309# include <unistd.h>
310#endif"
ba4481b5 311
488dd4c4 312ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT LN_S CPP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA RANLIB ac_ct_RANLIB INSTALL_INFO EGREP LIBSOUND SET_MAKE PKG_CONFIG GTK_CFLAGS GTK_LIBS ALLOCA liblockfile LIBOBJS NEED_SETGID KMEM_GROUP GETLOADAVG_LIBS version configuration canonical srcdir lispdir locallisppath lisppath x_default_search_path etcdir archlibdir docdir bitmapdir gamedir gameuser c_switch_system c_switch_machine LD_SWITCH_X_SITE LD_SWITCH_X_SITE_AUX C_SWITCH_X_SITE X_TOOLKIT_TYPE machfile opsysfile carbon_appdir LTLIBOBJS'
6bae0ccf 313ac_subst_files=''
c0d27fcc 314
ba4481b5 315# Initialize some variables set by options.
503d2be0
AS
316ac_init_help=
317ac_init_version=false
ba4481b5
DL
318# The variables have the same names as the options, with
319# dashes changed to underlines.
503d2be0 320cache_file=/dev/null
ba4481b5 321exec_prefix=NONE
ba4481b5 322no_create=
ba4481b5
DL
323no_recursion=
324prefix=NONE
325program_prefix=NONE
326program_suffix=NONE
327program_transform_name=s,x,x,
328silent=
329site=
330srcdir=
ba4481b5
DL
331verbose=
332x_includes=NONE
333x_libraries=NONE
503d2be0
AS
334
335# Installation directory options.
336# These are left unexpanded so users can "make install exec_prefix=/foo"
337# and all the variables that are supposed to be based on exec_prefix
338# by default will actually change.
339# Use braces instead of parens because sh, perl, etc. also accept them.
ba4481b5
DL
340bindir='${exec_prefix}/bin'
341sbindir='${exec_prefix}/sbin'
342libexecdir='${exec_prefix}/libexec'
343datadir='${prefix}/share'
344sysconfdir='${prefix}/etc'
345sharedstatedir='${prefix}/com'
346localstatedir='${prefix}/var'
347libdir='${exec_prefix}/lib'
348includedir='${prefix}/include'
349oldincludedir='/usr/include'
350infodir='${prefix}/info'
351mandir='${prefix}/man'
352
ba4481b5
DL
353ac_prev=
354for ac_option
355do
ba4481b5
DL
356 # If the previous option needs an argument, assign it.
357 if test -n "$ac_prev"; then
358 eval "$ac_prev=\$ac_option"
359 ac_prev=
360 continue
361 fi
362
503d2be0 363 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
ba4481b5
DL
364
365 # Accept the important Cygnus configure options, so we can diagnose typos.
366
503d2be0 367 case $ac_option in
ba4481b5
DL
368
369 -bindir | --bindir | --bindi | --bind | --bin | --bi)
370 ac_prev=bindir ;;
371 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
503d2be0 372 bindir=$ac_optarg ;;
ba4481b5
DL
373
374 -build | --build | --buil | --bui | --bu)
503d2be0 375 ac_prev=build_alias ;;
ba4481b5 376 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
503d2be0 377 build_alias=$ac_optarg ;;
ba4481b5
DL
378
379 -cache-file | --cache-file | --cache-fil | --cache-fi \
380 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
381 ac_prev=cache_file ;;
382 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
383 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
503d2be0
AS
384 cache_file=$ac_optarg ;;
385
386 --config-cache | -C)
387 cache_file=config.cache ;;
ba4481b5
DL
388
389 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
390 ac_prev=datadir ;;
391 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
392 | --da=*)
503d2be0 393 datadir=$ac_optarg ;;
ba4481b5
DL
394
395 -disable-* | --disable-*)
503d2be0 396 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
ba4481b5 397 # Reject names that are not valid shell variable names.
503d2be0
AS
398 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
399 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
400 { (exit 1); exit 1; }; }
401 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
402 eval "enable_$ac_feature=no" ;;
ba4481b5
DL
403
404 -enable-* | --enable-*)
503d2be0 405 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
ba4481b5 406 # Reject names that are not valid shell variable names.
503d2be0
AS
407 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
408 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
409 { (exit 1); exit 1; }; }
410 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
411 case $ac_option in
412 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
ba4481b5
DL
413 *) ac_optarg=yes ;;
414 esac
503d2be0 415 eval "enable_$ac_feature='$ac_optarg'" ;;
ba4481b5
DL
416
417 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
418 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
419 | --exec | --exe | --ex)
420 ac_prev=exec_prefix ;;
421 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
422 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
423 | --exec=* | --exe=* | --ex=*)
503d2be0 424 exec_prefix=$ac_optarg ;;
ba4481b5
DL
425
426 -gas | --gas | --ga | --g)
427 # Obsolete; use --with-gas.
428 with_gas=yes ;;
429
503d2be0
AS
430 -help | --help | --hel | --he | -h)
431 ac_init_help=long ;;
432 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
433 ac_init_help=recursive ;;
434 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
435 ac_init_help=short ;;
ba4481b5
DL
436
437 -host | --host | --hos | --ho)
503d2be0 438 ac_prev=host_alias ;;
ba4481b5 439 -host=* | --host=* | --hos=* | --ho=*)
503d2be0 440 host_alias=$ac_optarg ;;
ba4481b5
DL
441
442 -includedir | --includedir | --includedi | --included | --include \
443 | --includ | --inclu | --incl | --inc)
444 ac_prev=includedir ;;
445 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
446 | --includ=* | --inclu=* | --incl=* | --inc=*)
503d2be0 447 includedir=$ac_optarg ;;
ba4481b5
DL
448
449 -infodir | --infodir | --infodi | --infod | --info | --inf)
450 ac_prev=infodir ;;
451 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
503d2be0 452 infodir=$ac_optarg ;;
ba4481b5
DL
453
454 -libdir | --libdir | --libdi | --libd)
455 ac_prev=libdir ;;
456 -libdir=* | --libdir=* | --libdi=* | --libd=*)
503d2be0 457 libdir=$ac_optarg ;;
ba4481b5
DL
458
459 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
460 | --libexe | --libex | --libe)
461 ac_prev=libexecdir ;;
462 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
463 | --libexe=* | --libex=* | --libe=*)
503d2be0 464 libexecdir=$ac_optarg ;;
ba4481b5
DL
465
466 -localstatedir | --localstatedir | --localstatedi | --localstated \
467 | --localstate | --localstat | --localsta | --localst \
468 | --locals | --local | --loca | --loc | --lo)
469 ac_prev=localstatedir ;;
470 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
471 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
472 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
503d2be0 473 localstatedir=$ac_optarg ;;
ba4481b5
DL
474
475 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
476 ac_prev=mandir ;;
477 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
503d2be0 478 mandir=$ac_optarg ;;
ba4481b5
DL
479
480 -nfp | --nfp | --nf)
481 # Obsolete; use --without-fp.
482 with_fp=no ;;
483
484 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
c0d27fcc 485 | --no-cr | --no-c | -n)
ba4481b5
DL
486 no_create=yes ;;
487
488 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
489 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
490 no_recursion=yes ;;
491
492 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
493 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
494 | --oldin | --oldi | --old | --ol | --o)
495 ac_prev=oldincludedir ;;
496 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
497 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
498 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
503d2be0 499 oldincludedir=$ac_optarg ;;
ba4481b5
DL
500
501 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
502 ac_prev=prefix ;;
503 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
503d2be0 504 prefix=$ac_optarg ;;
ba4481b5
DL
505
506 -program-prefix | --program-prefix | --program-prefi | --program-pref \
507 | --program-pre | --program-pr | --program-p)
508 ac_prev=program_prefix ;;
509 -program-prefix=* | --program-prefix=* | --program-prefi=* \
510 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
503d2be0 511 program_prefix=$ac_optarg ;;
ba4481b5
DL
512
513 -program-suffix | --program-suffix | --program-suffi | --program-suff \
514 | --program-suf | --program-su | --program-s)
515 ac_prev=program_suffix ;;
516 -program-suffix=* | --program-suffix=* | --program-suffi=* \
517 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
503d2be0 518 program_suffix=$ac_optarg ;;
ba4481b5
DL
519
520 -program-transform-name | --program-transform-name \
521 | --program-transform-nam | --program-transform-na \
522 | --program-transform-n | --program-transform- \
523 | --program-transform | --program-transfor \
524 | --program-transfo | --program-transf \
525 | --program-trans | --program-tran \
526 | --progr-tra | --program-tr | --program-t)
527 ac_prev=program_transform_name ;;
528 -program-transform-name=* | --program-transform-name=* \
529 | --program-transform-nam=* | --program-transform-na=* \
530 | --program-transform-n=* | --program-transform-=* \
531 | --program-transform=* | --program-transfor=* \
532 | --program-transfo=* | --program-transf=* \
533 | --program-trans=* | --program-tran=* \
534 | --progr-tra=* | --program-tr=* | --program-t=*)
503d2be0 535 program_transform_name=$ac_optarg ;;
ba4481b5
DL
536
537 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
538 | -silent | --silent | --silen | --sile | --sil)
539 silent=yes ;;
540
541 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
542 ac_prev=sbindir ;;
543 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
544 | --sbi=* | --sb=*)
503d2be0 545 sbindir=$ac_optarg ;;
ba4481b5
DL
546
547 -sharedstatedir | --sharedstatedir | --sharedstatedi \
548 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
549 | --sharedst | --shareds | --shared | --share | --shar \
550 | --sha | --sh)
551 ac_prev=sharedstatedir ;;
552 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
553 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
554 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
555 | --sha=* | --sh=*)
503d2be0 556 sharedstatedir=$ac_optarg ;;
ba4481b5
DL
557
558 -site | --site | --sit)
559 ac_prev=site ;;
560 -site=* | --site=* | --sit=*)
503d2be0 561 site=$ac_optarg ;;
ba4481b5
DL
562
563 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
564 ac_prev=srcdir ;;
565 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
503d2be0 566 srcdir=$ac_optarg ;;
ba4481b5
DL
567
568 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
569 | --syscon | --sysco | --sysc | --sys | --sy)
570 ac_prev=sysconfdir ;;
571 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
572 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
503d2be0 573 sysconfdir=$ac_optarg ;;
ba4481b5
DL
574
575 -target | --target | --targe | --targ | --tar | --ta | --t)
503d2be0 576 ac_prev=target_alias ;;
ba4481b5 577 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
503d2be0 578 target_alias=$ac_optarg ;;
ba4481b5
DL
579
580 -v | -verbose | --verbose | --verbos | --verbo | --verb)
581 verbose=yes ;;
582
503d2be0
AS
583 -version | --version | --versio | --versi | --vers | -V)
584 ac_init_version=: ;;
ba4481b5
DL
585
586 -with-* | --with-*)
503d2be0 587 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
ba4481b5 588 # Reject names that are not valid shell variable names.
503d2be0
AS
589 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
590 { echo "$as_me: error: invalid package name: $ac_package" >&2
591 { (exit 1); exit 1; }; }
ba4481b5 592 ac_package=`echo $ac_package| sed 's/-/_/g'`
503d2be0
AS
593 case $ac_option in
594 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
ba4481b5
DL
595 *) ac_optarg=yes ;;
596 esac
503d2be0 597 eval "with_$ac_package='$ac_optarg'" ;;
ba4481b5
DL
598
599 -without-* | --without-*)
503d2be0 600 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
ba4481b5 601 # Reject names that are not valid shell variable names.
503d2be0
AS
602 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
603 { echo "$as_me: error: invalid package name: $ac_package" >&2
604 { (exit 1); exit 1; }; }
605 ac_package=`echo $ac_package | sed 's/-/_/g'`
606 eval "with_$ac_package=no" ;;
ba4481b5
DL
607
608 --x)
609 # Obsolete; use --with-x.
610 with_x=yes ;;
611
612 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
613 | --x-incl | --x-inc | --x-in | --x-i)
614 ac_prev=x_includes ;;
615 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
616 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
503d2be0 617 x_includes=$ac_optarg ;;
ba4481b5
DL
618
619 -x-libraries | --x-libraries | --x-librarie | --x-librari \
620 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
621 ac_prev=x_libraries ;;
622 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
623 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
503d2be0 624 x_libraries=$ac_optarg ;;
ba4481b5 625
503d2be0
AS
626 -*) { echo "$as_me: error: unrecognized option: $ac_option
627Try \`$0 --help' for more information." >&2
628 { (exit 1); exit 1; }; }
ba4481b5
DL
629 ;;
630
503d2be0
AS
631 *=*)
632 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
633 # Reject names that are not valid shell variable names.
634 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
635 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
636 { (exit 1); exit 1; }; }
637 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
638 eval "$ac_envvar='$ac_optarg'"
639 export $ac_envvar ;;
640
ba4481b5 641 *)
503d2be0
AS
642 # FIXME: should be removed in autoconf 3.0.
643 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
644 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
645 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
646 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
ba4481b5
DL
647 ;;
648
649 esac
650done
651
652if test -n "$ac_prev"; then
503d2be0
AS
653 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
654 { echo "$as_me: error: missing argument to $ac_option" >&2
655 { (exit 1); exit 1; }; }
ba4481b5 656fi
ba4481b5 657
503d2be0
AS
658# Be sure to have absolute paths.
659for ac_var in exec_prefix prefix
660do
661 eval ac_val=$`echo $ac_var`
662 case $ac_val in
663 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
c0d27fcc 664 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
503d2be0
AS
665 { (exit 1); exit 1; }; };;
666 esac
667done
ba4481b5 668
503d2be0
AS
669# Be sure to have absolute paths.
670for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
671 localstatedir libdir includedir oldincludedir infodir mandir
ba4481b5 672do
503d2be0
AS
673 eval ac_val=$`echo $ac_var`
674 case $ac_val in
675 [\\/$]* | ?:[\\/]* ) ;;
c0d27fcc 676 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
503d2be0 677 { (exit 1); exit 1; }; };;
ba4481b5
DL
678 esac
679done
680
503d2be0
AS
681# There might be people who depend on the old broken behavior: `$host'
682# used to hold the argument of --host etc.
c0d27fcc 683# FIXME: To remove some day.
503d2be0
AS
684build=$build_alias
685host=$host_alias
686target=$target_alias
687
c0d27fcc 688# FIXME: To remove some day.
503d2be0
AS
689if test "x$host_alias" != x; then
690 if test "x$build_alias" = x; then
691 cross_compiling=maybe
692 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
693 If a cross compiler is detected then cross compile mode will be used." >&2
694 elif test "x$build_alias" != "x$host_alias"; then
695 cross_compiling=yes
696 fi
697fi
ba4481b5 698
503d2be0
AS
699ac_tool_prefix=
700test -n "$host_alias" && ac_tool_prefix=$host_alias-
ba4481b5 701
503d2be0 702test "$silent" = yes && exec 6>/dev/null
ba4481b5 703
c0d27fcc 704
ba4481b5
DL
705# Find the source files, if location was not specified.
706if test -z "$srcdir"; then
707 ac_srcdir_defaulted=yes
708 # Try the directory containing this script, then its parent.
c0d27fcc
MR
709 ac_confdir=`(dirname "$0") 2>/dev/null ||
710$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
711 X"$0" : 'X\(//\)[^/]' \| \
712 X"$0" : 'X\(//\)$' \| \
713 X"$0" : 'X\(/\)' \| \
714 . : '\(.\)' 2>/dev/null ||
715echo X"$0" |
716 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
717 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
718 /^X\(\/\/\)$/{ s//\1/; q; }
719 /^X\(\/\).*/{ s//\1/; q; }
720 s/.*/./; q'`
ba4481b5
DL
721 srcdir=$ac_confdir
722 if test ! -r $srcdir/$ac_unique_file; then
723 srcdir=..
724 fi
725else
726 ac_srcdir_defaulted=no
727fi
728if test ! -r $srcdir/$ac_unique_file; then
729 if test "$ac_srcdir_defaulted" = yes; then
c0d27fcc 730 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
503d2be0 731 { (exit 1); exit 1; }; }
ba4481b5 732 else
c0d27fcc 733 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
503d2be0 734 { (exit 1); exit 1; }; }
ba4481b5
DL
735 fi
736fi
6bae0ccf
DL
737(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
738 { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
739 { (exit 1); exit 1; }; }
503d2be0
AS
740srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
741ac_env_build_alias_set=${build_alias+set}
742ac_env_build_alias_value=$build_alias
743ac_cv_env_build_alias_set=${build_alias+set}
744ac_cv_env_build_alias_value=$build_alias
745ac_env_host_alias_set=${host_alias+set}
746ac_env_host_alias_value=$host_alias
747ac_cv_env_host_alias_set=${host_alias+set}
748ac_cv_env_host_alias_value=$host_alias
749ac_env_target_alias_set=${target_alias+set}
750ac_env_target_alias_value=$target_alias
751ac_cv_env_target_alias_set=${target_alias+set}
752ac_cv_env_target_alias_value=$target_alias
753ac_env_CC_set=${CC+set}
754ac_env_CC_value=$CC
755ac_cv_env_CC_set=${CC+set}
756ac_cv_env_CC_value=$CC
757ac_env_CFLAGS_set=${CFLAGS+set}
758ac_env_CFLAGS_value=$CFLAGS
759ac_cv_env_CFLAGS_set=${CFLAGS+set}
760ac_cv_env_CFLAGS_value=$CFLAGS
761ac_env_LDFLAGS_set=${LDFLAGS+set}
762ac_env_LDFLAGS_value=$LDFLAGS
763ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
764ac_cv_env_LDFLAGS_value=$LDFLAGS
765ac_env_CPPFLAGS_set=${CPPFLAGS+set}
766ac_env_CPPFLAGS_value=$CPPFLAGS
767ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
768ac_cv_env_CPPFLAGS_value=$CPPFLAGS
769ac_env_CPP_set=${CPP+set}
770ac_env_CPP_value=$CPP
771ac_cv_env_CPP_set=${CPP+set}
772ac_cv_env_CPP_value=$CPP
773
774#
775# Report the --help message.
776#
777if test "$ac_init_help" = "long"; then
778 # Omit some internal or obsolete options to make the list less imposing.
779 # This message is too long to be a string in the A/UX 3.1 sh.
c0d27fcc 780 cat <<_ACEOF
503d2be0
AS
781\`configure' configures this package to adapt to many kinds of systems.
782
783Usage: $0 [OPTION]... [VAR=VALUE]...
784
785To assign environment variables (e.g., CC, CFLAGS...), specify them as
786VAR=VALUE. See below for descriptions of some of the useful variables.
787
788Defaults for the options are specified in brackets.
789
790Configuration:
791 -h, --help display this help and exit
792 --help=short display options specific to this package
793 --help=recursive display the short help of all the included packages
794 -V, --version display version information and exit
795 -q, --quiet, --silent do not print \`checking...' messages
796 --cache-file=FILE cache test results in FILE [disabled]
797 -C, --config-cache alias for \`--cache-file=config.cache'
798 -n, --no-create do not create output files
799 --srcdir=DIR find the sources in DIR [configure dir or \`..']
800
c0d27fcc 801_ACEOF
503d2be0 802
c0d27fcc 803 cat <<_ACEOF
503d2be0
AS
804Installation directories:
805 --prefix=PREFIX install architecture-independent files in PREFIX
806 [$ac_default_prefix]
807 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
808 [PREFIX]
809
810By default, \`make install' will install all the files in
811\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
812an installation prefix other than \`$ac_default_prefix' using \`--prefix',
813for instance \`--prefix=\$HOME'.
814
815For better control, use the options below.
816
817Fine tuning of the installation directories:
818 --bindir=DIR user executables [EPREFIX/bin]
819 --sbindir=DIR system admin executables [EPREFIX/sbin]
820 --libexecdir=DIR program executables [EPREFIX/libexec]
821 --datadir=DIR read-only architecture-independent data [PREFIX/share]
822 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
823 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
824 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
825 --libdir=DIR object code libraries [EPREFIX/lib]
826 --includedir=DIR C header files [PREFIX/include]
827 --oldincludedir=DIR C header files for non-gcc [/usr/include]
828 --infodir=DIR info documentation [PREFIX/info]
829 --mandir=DIR man documentation [PREFIX/man]
c0d27fcc 830_ACEOF
503d2be0 831
c0d27fcc 832 cat <<\_ACEOF
503d2be0 833
ba5da88a
PJ
834Program names:
835 --program-prefix=PREFIX prepend PREFIX to installed program names
836 --program-suffix=SUFFIX append SUFFIX to installed program names
837 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
838
503d2be0
AS
839X features:
840 --x-includes=DIR X include files are in DIR
841 --x-libraries=DIR X library files are in DIR
842
843System types:
844 --build=BUILD configure for building on BUILD [guessed]
c0d27fcc
MR
845 --host=HOST cross-compile to build programs to run on HOST [BUILD]
846_ACEOF
503d2be0
AS
847fi
848
849if test -n "$ac_init_help"; then
850
c0d27fcc 851 cat <<\_ACEOF
503d2be0
AS
852
853Optional Features:
854 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
855 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
6a3a24fa
JD
856 --enable-carbon-app[=DIR] [DIR=/Application]
857 specify install directory for Emacs.app on Mac OS X
503d2be0
AS
858 --disable-largefile omit support for large files
859
860Optional Packages:
861 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
862 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
863 --without-gcc don't use GCC to compile Emacs if GCC is found
864 --without-pop don't support POP mail retrieval with movemail
865 --with-kerberos support Kerberos-authenticated POP
866 --with-kerberos5 support Kerberos version 5 authenticated POP
867 --with-hesiod support Hesiod to get the POP server host
2c9dccc9 868 --without-sound don't compile with sound support
488dd4c4
JD
869 --with-x-toolkit=KIT use an X toolkit
870 (KIT = yes/lucid/athena/motif/gtk/no)
503d2be0
AS
871 --with-xpm use -lXpm for displaying XPM images
872 --with-jpeg use -ljpeg for displaying JPEG images
873 --with-tiff use -ltiff for displaying TIFF images
874 --with-gif use -lungif for displaying GIF images
875 --with-png use -lpng for displaying PNG images
488dd4c4
JD
876 --with-gtk use GTK (same as --with-x-toolkit=gtk)
877 --with-pkg-config-prog Path to pkg-config to use for finding GTK
503d2be0 878 --without-toolkit-scroll-bars
cc227489
MB
879 don't use Motif or Xaw3d scroll bars
880 --without-xim don't use X11 XIM
e0f712ba 881 --without-carbon don't use Carbon GUI on Mac OS X
503d2be0
AS
882 --with-x use the X Window System
883
884Some influential environment variables:
885 CC C compiler command
886 CFLAGS C compiler flags
887 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
888 nonstandard directory <lib dir>
889 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
890 headers in a nonstandard directory <include dir>
891 CPP C preprocessor
892
893Use these variables to override the choices made by `configure' or to help
894it to find libraries and programs with nonstandard names/locations.
895
c0d27fcc 896_ACEOF
503d2be0
AS
897fi
898
899if test "$ac_init_help" = "recursive"; then
900 # If there are subdirs, report their specific --help.
901 ac_popdir=`pwd`
c0d27fcc
MR
902 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
903 test -d $ac_dir || continue
904 ac_builddir=.
905
906if test "$ac_dir" != .; then
907 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
908 # A "../" for each directory in $ac_dir_suffix.
909 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
910else
911 ac_dir_suffix= ac_top_builddir=
912fi
503d2be0 913
c0d27fcc
MR
914case $srcdir in
915 .) # No --srcdir option. We are building in place.
916 ac_srcdir=.
917 if test -z "$ac_top_builddir"; then
918 ac_top_srcdir=.
919 else
920 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
921 fi ;;
922 [\\/]* | ?:[\\/]* ) # Absolute path.
923 ac_srcdir=$srcdir$ac_dir_suffix;
924 ac_top_srcdir=$srcdir ;;
925 *) # Relative path.
926 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
927 ac_top_srcdir=$ac_top_builddir$srcdir ;;
928esac
929# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
930# absolute.
931ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
6bae0ccf 932ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
c0d27fcc
MR
933ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
934ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
935
936 cd $ac_dir
503d2be0 937 # Check for guested configure; otherwise get Cygnus style configure.
c0d27fcc 938 if test -f $ac_srcdir/configure.gnu; then
503d2be0 939 echo
c0d27fcc
MR
940 $SHELL $ac_srcdir/configure.gnu --help=recursive
941 elif test -f $ac_srcdir/configure; then
503d2be0 942 echo
c0d27fcc
MR
943 $SHELL $ac_srcdir/configure --help=recursive
944 elif test -f $ac_srcdir/configure.ac ||
945 test -f $ac_srcdir/configure.in; then
503d2be0
AS
946 echo
947 $ac_configure --help
948 else
c0d27fcc 949 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
503d2be0
AS
950 fi
951 cd $ac_popdir
952 done
953fi
954
955test -n "$ac_init_help" && exit 0
956if $ac_init_version; then
c0d27fcc 957 cat <<\_ACEOF
503d2be0 958
c0d27fcc 959Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
503d2be0
AS
960Free Software Foundation, Inc.
961This configure script is free software; the Free Software Foundation
962gives unlimited permission to copy, distribute and modify it.
c0d27fcc 963_ACEOF
503d2be0
AS
964 exit 0
965fi
966exec 5>config.log
c0d27fcc 967cat >&5 <<_ACEOF
503d2be0
AS
968This file contains any messages produced by compilers while
969running configure, to aid debugging if configure makes a mistake.
970
971It was created by $as_me, which was
9e71690e 972generated by GNU Autoconf 2.57. Invocation command line was
503d2be0
AS
973
974 $ $0 $@
975
c0d27fcc 976_ACEOF
503d2be0
AS
977{
978cat <<_ASUNAME
c0d27fcc
MR
979## --------- ##
980## Platform. ##
981## --------- ##
503d2be0
AS
982
983hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
984uname -m = `(uname -m) 2>/dev/null || echo unknown`
985uname -r = `(uname -r) 2>/dev/null || echo unknown`
986uname -s = `(uname -s) 2>/dev/null || echo unknown`
987uname -v = `(uname -v) 2>/dev/null || echo unknown`
988
989/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
990/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
991
992/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
993/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
994/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
995hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
996/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
997/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
998/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
999
925c2f3f 1000_ASUNAME
c0d27fcc
MR
1001
1002as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1003for as_dir in $PATH
1004do
1005 IFS=$as_save_IFS
1006 test -z "$as_dir" && as_dir=.
1007 echo "PATH: $as_dir"
1008done
1009
503d2be0
AS
1010} >&5
1011
c0d27fcc
MR
1012cat >&5 <<_ACEOF
1013
1014
1015## ----------- ##
1016## Core tests. ##
1017## ----------- ##
1018
1019_ACEOF
503d2be0 1020
503d2be0
AS
1021
1022# Keep a trace of the command line.
1023# Strip out --no-create and --no-recursion so they do not pile up.
cd958eb3 1024# Strip out --silent because we don't want to record it for future runs.
503d2be0 1025# Also quote any args containing shell meta-characters.
cd958eb3 1026# Make two passes to allow for proper duplicate-argument suppression.
503d2be0 1027ac_configure_args=
cd958eb3
MB
1028ac_configure_args0=
1029ac_configure_args1=
503d2be0 1030ac_sep=
cd958eb3
MB
1031ac_must_keep_next=false
1032for ac_pass in 1 2
503d2be0 1033do
cd958eb3
MB
1034 for ac_arg
1035 do
1036 case $ac_arg in
1037 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1038 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1039 | -silent | --silent | --silen | --sile | --sil)
1040 continue ;;
1041 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1042 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1043 esac
1044 case $ac_pass in
1045 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1046 2)
1047 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1048 if test $ac_must_keep_next = true; then
1049 ac_must_keep_next=false # Got value, back to normal.
1050 else
1051 case $ac_arg in
1052 *=* | --config-cache | -C | -disable-* | --disable-* \
1053 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1054 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1055 | -with-* | --with-* | -without-* | --without-* | --x)
1056 case "$ac_configure_args0 " in
1057 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1058 esac
1059 ;;
1060 -* ) ac_must_keep_next=true ;;
1061 esac
1062 fi
1063 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1064 # Get rid of the leading space.
1065 ac_sep=" "
1066 ;;
1067 esac
1068 done
503d2be0 1069done
cd958eb3
MB
1070$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1071$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
503d2be0
AS
1072
1073# When interrupted or exit'd, cleanup temporary files, and complete
1074# config.log. We remove comments because anyway the quotes in there
1075# would cause problems or look ugly.
c0d27fcc
MR
1076# WARNING: Be sure not to use single quotes in there, as some shells,
1077# such as our DU 5.0 friend, will then `close' the trap.
503d2be0
AS
1078trap 'exit_status=$?
1079 # Save into config.log some information that might help in debugging.
c0d27fcc
MR
1080 {
1081 echo
6bae0ccf 1082
c0d27fcc
MR
1083 cat <<\_ASBOX
1084## ---------------- ##
1085## Cache variables. ##
1086## ---------------- ##
1087_ASBOX
1088 echo
1089 # The following way of writing the cache mishandles newlines in values,
503d2be0
AS
1090{
1091 (set) 2>&1 |
1092 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1093 *ac_space=\ *)
1094 sed -n \
1095 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1096 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1097 ;;
1098 *)
1099 sed -n \
1100 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1101 ;;
1102 esac;
c0d27fcc
MR
1103}
1104 echo
6bae0ccf
DL
1105
1106 cat <<\_ASBOX
1107## ----------------- ##
1108## Output variables. ##
1109## ----------------- ##
1110_ASBOX
1111 echo
1112 for ac_var in $ac_subst_vars
1113 do
1114 eval ac_val=$`echo $ac_var`
1115 echo "$ac_var='"'"'$ac_val'"'"'"
1116 done | sort
1117 echo
1118
1119 if test -n "$ac_subst_files"; then
1120 cat <<\_ASBOX
1121## ------------- ##
1122## Output files. ##
1123## ------------- ##
1124_ASBOX
1125 echo
1126 for ac_var in $ac_subst_files
1127 do
1128 eval ac_val=$`echo $ac_var`
1129 echo "$ac_var='"'"'$ac_val'"'"'"
1130 done | sort
1131 echo
1132 fi
1133
c0d27fcc
MR
1134 if test -s confdefs.h; then
1135 cat <<\_ASBOX
1136## ----------- ##
1137## confdefs.h. ##
1138## ----------- ##
1139_ASBOX
1140 echo
6bae0ccf 1141 sed "/^$/d" confdefs.h | sort
c0d27fcc
MR
1142 echo
1143 fi
1144 test "$ac_signal" != 0 &&
1145 echo "$as_me: caught signal $ac_signal"
1146 echo "$as_me: exit $exit_status"
1147 } >&5
1148 rm -f core core.* *.core &&
1149 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
503d2be0
AS
1150 exit $exit_status
1151 ' 0
1152for ac_signal in 1 2 13 15; do
1153 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1154done
1155ac_signal=0
1156
1157# confdefs.h avoids OS command line length limits that DEFS can exceed.
1158rm -rf conftest* confdefs.h
1159# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1160echo >confdefs.h
ba4481b5 1161
c0d27fcc
MR
1162# Predefined preprocessor variables.
1163
1164cat >>confdefs.h <<_ACEOF
1165#define PACKAGE_NAME "$PACKAGE_NAME"
1166_ACEOF
1167
1168
1169cat >>confdefs.h <<_ACEOF
1170#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1171_ACEOF
1172
1173
1174cat >>confdefs.h <<_ACEOF
1175#define PACKAGE_VERSION "$PACKAGE_VERSION"
1176_ACEOF
1177
1178
1179cat >>confdefs.h <<_ACEOF
1180#define PACKAGE_STRING "$PACKAGE_STRING"
1181_ACEOF
1182
1183
1184cat >>confdefs.h <<_ACEOF
1185#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1186_ACEOF
1187
1188
503d2be0 1189# Let the site file select an alternate cache file if it wants to.
ba4481b5
DL
1190# Prefer explicitly selected file to automatically selected ones.
1191if test -z "$CONFIG_SITE"; then
1192 if test "x$prefix" != xNONE; then
1193 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1194 else
1195 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1196 fi
1197fi
1198for ac_site_file in $CONFIG_SITE; do
1199 if test -r "$ac_site_file"; then
c0d27fcc 1200 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
503d2be0 1201echo "$as_me: loading site script $ac_site_file" >&6;}
c0d27fcc 1202 sed 's/^/| /' "$ac_site_file" >&5
ba4481b5
DL
1203 . "$ac_site_file"
1204 fi
1205done
1206
1207if test -r "$cache_file"; then
503d2be0
AS
1208 # Some versions of bash will fail to source /dev/null (special
1209 # files actually), so we avoid doing that.
1210 if test -f "$cache_file"; then
c0d27fcc 1211 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
503d2be0
AS
1212echo "$as_me: loading cache $cache_file" >&6;}
1213 case $cache_file in
1214 [\\/]* | ?:[\\/]* ) . $cache_file;;
1215 *) . ./$cache_file;;
1216 esac
1217 fi
ba4481b5 1218else
c0d27fcc 1219 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
503d2be0
AS
1220echo "$as_me: creating cache $cache_file" >&6;}
1221 >$cache_file
1222fi
1223
1224# Check that the precious variables saved in the cache have kept the same
1225# value.
1226ac_cache_corrupted=false
1227for ac_var in `(set) 2>&1 |
1228 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1229 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1230 eval ac_new_set=\$ac_env_${ac_var}_set
1231 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1232 eval ac_new_val="\$ac_env_${ac_var}_value"
1233 case $ac_old_set,$ac_new_set in
1234 set,)
c0d27fcc 1235 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
503d2be0
AS
1236echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1237 ac_cache_corrupted=: ;;
1238 ,set)
c0d27fcc 1239 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
503d2be0
AS
1240echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1241 ac_cache_corrupted=: ;;
1242 ,);;
1243 *)
1244 if test "x$ac_old_val" != "x$ac_new_val"; then
c0d27fcc 1245 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
503d2be0 1246echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
c0d27fcc 1247 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
503d2be0 1248echo "$as_me: former value: $ac_old_val" >&2;}
c0d27fcc 1249 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
503d2be0
AS
1250echo "$as_me: current value: $ac_new_val" >&2;}
1251 ac_cache_corrupted=:
1252 fi;;
1253 esac
c0d27fcc 1254 # Pass precious variables to config.status.
503d2be0
AS
1255 if test "$ac_new_set" = set; then
1256 case $ac_new_val in
1257 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
c0d27fcc
MR
1258 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1259 *) ac_arg=$ac_var=$ac_new_val ;;
1260 esac
1261 case " $ac_configure_args " in
1262 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1263 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
503d2be0
AS
1264 esac
1265 fi
1266done
1267if $ac_cache_corrupted; then
c0d27fcc 1268 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
503d2be0 1269echo "$as_me: error: changes in the environment can compromise the build" >&2;}
c0d27fcc 1270 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
503d2be0
AS
1271echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1272 { (exit 1); exit 1; }; }
ba4481b5
DL
1273fi
1274
1275ac_ext=c
ba4481b5 1276ac_cpp='$CPP $CPPFLAGS'
503d2be0
AS
1277ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1278ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1279ac_compiler_gnu=$ac_cv_c_compiler_gnu
1280
c0d27fcc
MR
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
ba4481b5 1297
6bae0ccf
DL
1298
1299 ac_config_headers="$ac_config_headers src/config.h:src/config.in"
ba4481b5 1300
c0d27fcc 1301
ba5da88a
PJ
1302test "$program_prefix" != NONE &&
1303 program_transform_name="s,^,$program_prefix,;$program_transform_name"
1304# Use a double $ so make ignores it.
1305test "$program_suffix" != NONE &&
1306 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1307# Double any \ or $. echo might interpret backslashes.
1308# By default was `s,x,x', remove it if useless.
1309cat <<\_ACEOF >conftest.sed
1310s/[\\$]/&&/g;s/;s,x,x,$//
1311_ACEOF
1312program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1313rm conftest.sed
1314
c0d27fcc 1315
ba4481b5
DL
1316lispdir='${datadir}/emacs/${version}/lisp'
1317locallisppath='${datadir}/emacs/${version}/site-lisp:'\
1318'${datadir}/emacs/site-lisp:${datadir}/emacs/${version}/leim'
1319lisppath='${locallisppath}:${lispdir}'
1320etcdir='${datadir}/emacs/${version}/etc'
1321archlibdir='${libexecdir}/emacs/${version}/${configuration}'
1322docdir='${datadir}/emacs/${version}/etc'
24b01ec4 1323gamedir='${localstatedir}/games/emacs'
98418dba
CW
1324
1325gameuser=games
1326
c0d27fcc 1327
ba4481b5
DL
1328# Check whether --with-gcc or --without-gcc was given.
1329if test "${with_gcc+set}" = set; then
1330 withval="$with_gcc"
503d2be0
AS
1331
1332fi;
ba4481b5
DL
1333
1334# Check whether --with-pop or --without-pop was given.
1335if test "${with_pop+set}" = set; then
1336 withval="$with_pop"
243cf185 1337 if test "$withval" = yes; then
c0d27fcc 1338 cat >>confdefs.h <<\_ACEOF
ba4481b5 1339#define MAIL_USE_POP 1
c0d27fcc 1340_ACEOF
ba4481b5 1341
243cf185
DL
1342else :
1343fi
3d9fec71 1344else
c0d27fcc 1345 cat >>confdefs.h <<\_ACEOF
3d9fec71 1346#define MAIL_USE_POP 1
c0d27fcc 1347_ACEOF
3d9fec71 1348
503d2be0 1349fi;
ba4481b5 1350
c0d27fcc 1351
a21616bd
KR
1352# Check whether --with-kerberos or --without-kerberos was given.
1353if test "${with_kerberos+set}" = set; then
1354 withval="$with_kerberos"
c0d27fcc 1355 cat >>confdefs.h <<\_ACEOF
a21616bd 1356#define KERBEROS 1
c0d27fcc 1357_ACEOF
a21616bd 1358
503d2be0 1359fi;
a21616bd 1360
c0d27fcc 1361
a21616bd
KR
1362# Check whether --with-kerberos5 or --without-kerberos5 was given.
1363if test "${with_kerberos5+set}" = set; then
1364 withval="$with_kerberos5"
1365 if test "${with_kerberos5+set}" = set; then
1366 if test "${with_kerberos+set}" != set; then
1367 with_kerberos=yes
c0d27fcc 1368 cat >>confdefs.h <<\_ACEOF
a21616bd 1369#define KERBEROS 1
c0d27fcc 1370_ACEOF
a21616bd
KR
1371
1372 fi
1373fi
b936fae4 1374
c0d27fcc 1375cat >>confdefs.h <<\_ACEOF
a21616bd 1376#define KERBEROS5 1
c0d27fcc 1377_ACEOF
a21616bd 1378
503d2be0 1379fi;
a21616bd 1380
ba4481b5
DL
1381# Check whether --with-hesiod or --without-hesiod was given.
1382if test "${with_hesiod+set}" = set; then
1383 withval="$with_hesiod"
b936fae4 1384
c0d27fcc 1385cat >>confdefs.h <<\_ACEOF
ba4481b5 1386#define HESIOD 1
c0d27fcc 1387_ACEOF
ba4481b5 1388
503d2be0 1389fi;
ba4481b5 1390
c0d27fcc 1391
2c9dccc9
PJ
1392# Check whether --with-sound or --without-sound was given.
1393if test "${with_sound+set}" = set; then
1394 withval="$with_sound"
1395
1396fi;
1397
c0d27fcc 1398
ba4481b5
DL
1399# Check whether --with-x-toolkit or --without-x-toolkit was given.
1400if test "${with_x_toolkit+set}" = set; then
1401 withval="$with_x_toolkit"
1402 case "${withval}" in
1403 y | ye | yes ) val=athena ;;
1404 n | no ) val=no ;;
1405 l | lu | luc | luci | lucid ) val=lucid ;;
1406 a | at | ath | athe | athen | athena ) val=athena ;;
1407 m | mo | mot | moti | motif ) val=motif ;;
488dd4c4 1408 g | gt | gtk ) val=gtk ;;
ba4481b5 1409 * )
c0d27fcc 1410{ { echo "$as_me:$LINENO: error: \`--with-x-toolkit=$withval' is invalid\;
488dd4c4 1411this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif' or \`gtk'.
503d2be0
AS
1412Currently, \`yes', \`athena' and \`lucid' are synonyms." >&5
1413echo "$as_me: error: \`--with-x-toolkit=$withval' is invalid\;
488dd4c4 1414this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif' or \`gtk'.
503d2be0
AS
1415Currently, \`yes', \`athena' and \`lucid' are synonyms." >&2;}
1416 { (exit 1); exit 1; }; }
ba4481b5
DL
1417 ;;
1418 esac
1419 with_x_toolkit=$val
1420
503d2be0 1421fi;
ba4481b5
DL
1422
1423# Check whether --with-xpm or --without-xpm was given.
1424if test "${with_xpm+set}" = set; then
1425 withval="$with_xpm"
503d2be0
AS
1426
1427fi;
ba4481b5
DL
1428
1429# Check whether --with-jpeg or --without-jpeg was given.
1430if test "${with_jpeg+set}" = set; then
1431 withval="$with_jpeg"
503d2be0
AS
1432
1433fi;
ba4481b5
DL
1434
1435# Check whether --with-tiff or --without-tiff was given.
1436if test "${with_tiff+set}" = set; then
1437 withval="$with_tiff"
503d2be0
AS
1438
1439fi;
ba4481b5
DL
1440
1441# Check whether --with-gif or --without-gif was given.
1442if test "${with_gif+set}" = set; then
1443 withval="$with_gif"
503d2be0
AS
1444
1445fi;
ba4481b5
DL
1446
1447# Check whether --with-png or --without-png was given.
1448if test "${with_png+set}" = set; then
1449 withval="$with_png"
503d2be0
AS
1450
1451fi;
ba4481b5 1452
488dd4c4
JD
1453# Check whether --with-gtk or --without-gtk was given.
1454if test "${with_gtk+set}" = set; then
1455 withval="$with_gtk"
1456
1457fi;
1458
1459# Check whether --with-pkg-config-prog or --without-pkg-config-prog was given.
1460if test "${with_pkg_config_prog+set}" = set; then
1461 withval="$with_pkg_config_prog"
1462
1463fi;
1464
ba4481b5
DL
1465# Check whether --with-toolkit-scroll-bars or --without-toolkit-scroll-bars was given.
1466if test "${with_toolkit_scroll_bars+set}" = set; then
1467 withval="$with_toolkit_scroll_bars"
503d2be0
AS
1468
1469fi;
ba4481b5 1470
1d36487c
GM
1471# Check whether --with-xim or --without-xim was given.
1472if test "${with_xim+set}" = set; then
1473 withval="$with_xim"
1d36487c 1474
503d2be0 1475fi;
ba4481b5 1476
e0f712ba
AC
1477# Check whether --with-carbon or --without-carbon was given.
1478if test "${with_carbon+set}" = set; then
1479 withval="$with_carbon"
1480
1481fi;
6a3a24fa
JD
1482# Check whether --enable-carbon-app or --disable-carbon-app was given.
1483if test "${enable_carbon_app+set}" = set; then
1484 enableval="$enable_carbon_app"
1485 carbon_appdir_x=${enableval}
1486fi;
e0f712ba 1487
ba4481b5 1488#### Make srcdir absolute, if it isn't already. It's important to
17494071 1489#### avoid running the path through pwd unnecessarily, since pwd can
ba4481b5
DL
1490#### give you automounter prefixes, which can go away. We do all this
1491#### so Emacs can find its files when run uninstalled.
17494071
GM
1492## Make sure CDPATH doesn't affect cd (in case PWD is relative).
1493unset CDPATH
ba4481b5
DL
1494case "${srcdir}" in
1495 /* ) ;;
1496 . )
1497 ## We may be able to use the $PWD environment variable to make this
1498 ## absolute. But sometimes PWD is inaccurate.
df645f7c
AS
1499 ## Note: we used to use ${PWD} at the end instead of `pwd`,
1500 ## but that tested only for a well-formed and valid PWD,
1501 ## it did not object when PWD was well-formed and valid but just wrong.
1502 if test ".${PWD}" != "." && test ".`(cd ${PWD} ; sh -c pwd)`" = ".`pwd`" ;
ba4481b5
DL
1503 then
1504 srcdir="$PWD"
1505 else
1506 srcdir="`(cd ${srcdir}; pwd)`"
1507 fi
1508 ;;
1509 * ) srcdir="`(cd ${srcdir}; pwd)`" ;;
1510esac
1511
1512#### Check if the source directory already has a configured system in it.
1513if test `pwd` != `(cd ${srcdir} && pwd)` \
1514 && test -f "${srcdir}/src/config.h" ; then
c0d27fcc 1515 { echo "$as_me:$LINENO: WARNING: The directory tree \`${srcdir}' is being used
503d2be0
AS
1516 as a build directory right now; it has been configured in its own
1517 right. To configure in another directory as well, you MUST
1518 use GNU make. If you do not have GNU make, then you must
1519 now do \`make distclean' in ${srcdir},
1520 and then run $0 again." >&5
1521echo "$as_me: WARNING: The directory tree \`${srcdir}' is being used
ba4481b5
DL
1522 as a build directory right now; it has been configured in its own
1523 right. To configure in another directory as well, you MUST
1524 use GNU make. If you do not have GNU make, then you must
1525 now do \`make distclean' in ${srcdir},
503d2be0 1526 and then run $0 again." >&2;}
ba4481b5 1527
22044edf 1528extrasub='/^VPATH[ ]*=/c\
ba4481b5
DL
1529vpath %.c $(srcdir)\
1530vpath %.h $(srcdir)\
1531vpath %.y $(srcdir)\
1532vpath %.l $(srcdir)\
1533vpath %.s $(srcdir)\
1534vpath %.in $(srcdir)\
1535vpath %.texi $(srcdir)'
1536fi
1537
1538#### Given the configuration name, set machfile and opsysfile to the
1539#### names of the m/*.h and s/*.h files we should use.
1540
1541### Canonicalize the configuration name.
1542
1543ac_aux_dir=
1544for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1545 if test -f $ac_dir/install-sh; then
1546 ac_aux_dir=$ac_dir
1547 ac_install_sh="$ac_aux_dir/install-sh -c"
1548 break
1549 elif test -f $ac_dir/install.sh; then
1550 ac_aux_dir=$ac_dir
1551 ac_install_sh="$ac_aux_dir/install.sh -c"
1552 break
503d2be0
AS
1553 elif test -f $ac_dir/shtool; then
1554 ac_aux_dir=$ac_dir
1555 ac_install_sh="$ac_aux_dir/shtool install -c"
1556 break
ba4481b5
DL
1557 fi
1558done
1559if test -z "$ac_aux_dir"; then
c0d27fcc 1560 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
503d2be0
AS
1561echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1562 { (exit 1); exit 1; }; }
ba4481b5 1563fi
503d2be0
AS
1564ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1565ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1566ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
ba4481b5
DL
1567
1568# Make sure we can run config.sub.
503d2be0 1569$ac_config_sub sun4 >/dev/null 2>&1 ||
c0d27fcc 1570 { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
503d2be0
AS
1571echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1572 { (exit 1); exit 1; }; }
1573
c0d27fcc 1574echo "$as_me:$LINENO: checking build system type" >&5
503d2be0
AS
1575echo $ECHO_N "checking build system type... $ECHO_C" >&6
1576if test "${ac_cv_build+set}" = set; then
1577 echo $ECHO_N "(cached) $ECHO_C" >&6
1578else
1579 ac_cv_build_alias=$build_alias
1580test -z "$ac_cv_build_alias" &&
1581 ac_cv_build_alias=`$ac_config_guess`
1582test -z "$ac_cv_build_alias" &&
c0d27fcc 1583 { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
503d2be0
AS
1584echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1585 { (exit 1); exit 1; }; }
1586ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
c0d27fcc
MR
1587 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
1588echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
503d2be0
AS
1589 { (exit 1); exit 1; }; }
1590
1591fi
c0d27fcc 1592echo "$as_me:$LINENO: result: $ac_cv_build" >&5
503d2be0
AS
1593echo "${ECHO_T}$ac_cv_build" >&6
1594build=$ac_cv_build
1595build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1596build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1597build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1598
c0d27fcc
MR
1599
1600echo "$as_me:$LINENO: checking host system type" >&5
503d2be0
AS
1601echo $ECHO_N "checking host system type... $ECHO_C" >&6
1602if test "${ac_cv_host+set}" = set; then
1603 echo $ECHO_N "(cached) $ECHO_C" >&6
1604else
1605 ac_cv_host_alias=$host_alias
1606test -z "$ac_cv_host_alias" &&
1607 ac_cv_host_alias=$ac_cv_build_alias
1608ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
c0d27fcc 1609 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
503d2be0
AS
1610echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1611 { (exit 1); exit 1; }; }
1612
1613fi
c0d27fcc 1614echo "$as_me:$LINENO: result: $ac_cv_host" >&5
503d2be0
AS
1615echo "${ECHO_T}$ac_cv_host" >&6
1616host=$ac_cv_host
1617host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1618host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1619host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
ba4481b5 1620
c0d27fcc 1621
ba4481b5 1622canonical=$host
531a3336 1623configuration=${host_alias-$host}
ba4481b5 1624
c0d27fcc 1625
22044edf 1626
ba4481b5
DL
1627### If you add support for a new configuration, add code to this
1628### switch statement to recognize your configuration name and select
1629### the appropriate operating system and machine description files.
1630
1631### You would hope that you could choose an m/*.h file pretty much
1632### based on the machine portion of the configuration name, and an s-
1633### file based on the operating system portion. However, it turns out
1634### that each m/*.h file is pretty manufacturer-specific - for
1635### example, apollo.h, hp9000s300.h, mega68k, news.h, and tad68k are
1636### all 68000 machines; mips.h, pmax.h, and news-risc are all MIPS
1637### machines. So we basically have to have a special case for each
1638### configuration name.
1639###
1640### As far as handling version numbers on operating systems is
1641### concerned, make sure things will fail in a fixable way. If
1642### /etc/MACHINES doesn't say anything about version numbers, be
1643### prepared to handle anything reasonably. If version numbers
1644### matter, be sure /etc/MACHINES says something about it.
1645###
1646### Eric Raymond says we should accept strings like "sysvr4" to mean
1647### "System V Release 4"; he writes, "The old convention encouraged
1648### confusion between `system' and `release' levels'."
1649
1650machine='' opsys='' unported=no
1651case "${canonical}" in
1652
1096bcc0
GM
1653 ## FreeBSD ports
1654 *-*-freebsd* )
1655 opsys=freebsd
1656 case "${canonical}" in
1657 alpha*-*-freebsd*) machine=alpha ;;
1658 i[3456]86-*-freebsd*) machine=intel386 ;;
1659 esac
1660 ;;
1661
ba4481b5
DL
1662 ## NetBSD ports
1663 *-*-netbsd* )
1664 opsys=netbsd
1665 case "${canonical}" in
1666 alpha*-*-netbsd*) machine=alpha ;;
1667 i[3456]86-*-netbsd*) machine=intel386 ;;
1668 m68k-*-netbsd*)
1669 # This is somewhat bogus.
1670 machine=hp9000s300 ;;
1671 powerpc-apple-netbsd*) machine=macppc ;;
1672 mips-*-netbsd*) machine=pmax ;;
2df636f4 1673 mipsel-*-netbsd*) machine=pmax ;;
97836269 1674 mipseb-*-netbsd*) machine=pmax ;;
ba4481b5 1675 ns32k-*-netbsd*) machine=ns32000 ;;
3a64eef5 1676 powerpc-*-netbsd*) machine=macppc ;;
71c9ec51 1677 sparc*-*-netbsd*) machine=sparc ;;
ba4481b5 1678 vax-*-netbsd*) machine=vax ;;
2df636f4 1679 arm-*-netbsd*) machine=arm ;;
ba4481b5
DL
1680 esac
1681 ;;
1682
1683 ## OpenBSD ports
1684 *-*-openbsd* )
1685 opsys=openbsd
1686 case "${canonical}" in
1687 alpha*-*-openbsd*) machine=alpha ;;
1688 i386-*-openbsd*) machine=intel386 ;;
1689 m68k-*-openbsd*) machine=hp9000s300 ;;
1690 mipsel-*-openbsd*) machine=pmax ;;
1691 ns32k-*-openbsd*) machine=ns32000 ;;
1692 sparc-*-openbsd*) machine=sparc ;;
1693 vax-*-openbsd*) machine=vax ;;
1694 esac
1695 ;;
1696
1697 ## Acorn RISCiX:
1698 arm-acorn-riscix1.1* )
1699 machine=acorn opsys=riscix1-1
1700 ;;
1701 arm-acorn-riscix1.2* | arm-acorn-riscix )
1702 ## This name is riscix12 instead of riscix1.2
1703 ## to avoid a file name conflict on MSDOS.
1704 machine=acorn opsys=riscix12
1705 ;;
1706
1707 ## BSDI ports
1708 *-*-bsdi* )
1709 opsys=bsdi
1710 case "${canonical}" in
1711 i[345]86-*-bsdi*) machine=intel386 ;;
1712 sparc-*-bsdi*) machine=sparc ;;
3aeecf97 1713 powerpc-*-bsdi*) machine=macppc ;;
ba4481b5
DL
1714 esac
1715 case "${canonical}" in
1716 *-*-bsd386* | *-*-bsdi1* ) opsys=bsd386 ;;
1717 *-*-bsdi2.0* ) opsys=bsdos2 ;;
1718 *-*-bsdi2* ) opsys=bsdos2-1 ;;
1719 *-*-bsdi3* ) opsys=bsdos3 ;;
1d06fc82 1720 *-*-bsdi[45]* ) opsys=bsdos4 ;;
ba4481b5
DL
1721 esac
1722 ;;
1723
1724 ## Alliant machines
1725 ## Strictly speaking, we need the version of the alliant operating
1726 ## system to choose the right machine file, but currently the
1727 ## configuration name doesn't tell us enough to choose the right
1728 ## one; we need to give alliants their own operating system name to
1729 ## do this right. When someone cares, they can help us.
1730 fx80-alliant-* )
1731 machine=alliant4 opsys=bsd4-2
1732 ;;
1733 i860-alliant-* )
1734 machine=alliant-2800 opsys=bsd4-3
1735 ;;
1736
1737 ## Alpha (DEC) machines.
1738 alpha*-dec-osf* )
1739 machine=alpha opsys=osf1
1740 # This is needed to find X11R6.1 libraries for certain tests.
1741 NON_GCC_LINK_TEST_OPTIONS=-Wl,-rpath,/usr/X11R6/lib
1742 GCC_LINK_TEST_OPTIONS=-Wl,-rpath,/usr/X11R6/lib
34979055
DL
1743 # NON_GNU_CPP is necessary on 5.0 to avoid mangling src/Makefile
1744 # due to non-traditional preprocessing with the current compiler
1745 # defaults. OSF 4 can also have that compiler version, and there
1746 # seems always to have been a usable /usr/bin/cpp.
1747 NON_GNU_CPP=/usr/bin/cpp
ca512671 1748 case "${canonical}" in
a55b799a 1749 alpha*-dec-osf[5-9]*)
bb17930d 1750 opsys=osf5-0 ;;
ca512671 1751 esac
ba4481b5
DL
1752 ;;
1753
1754 alpha*-*-linux-gnu* )
1755 machine=alpha opsys=gnu-linux
1756 ;;
1757
c4bb2108
DL
1758 arm*-*-linux-gnu* )
1759 machine=arm opsys=gnu-linux
1760 ;;
1761
1762 ppc-*-linux | \
1763 powerpc-*-linux* )
3aeecf97 1764 machine=macppc opsys=gnu-linux
c4bb2108
DL
1765 ;;
1766
ba4481b5
DL
1767 ## Altos 3068
1768 m68*-altos-sysv* )
1769 machine=altos opsys=usg5-2
1770 ;;
1771
1772 ## Amdahl UTS
1773 580-amdahl-sysv* )
1774 machine=amdahl opsys=usg5-2-2
1775 ;;
1776
1777 ## Apollo, Domain/OS
1778 m68*-apollo-* )
1779 machine=apollo opsys=bsd4-3
1780 ;;
1781
1782 ## AT&T 3b2, 3b5, 3b15, 3b20
1783 we32k-att-sysv* )
1784 machine=att3b opsys=usg5-2-2
1785 ;;
1786
1787 ## AT&T 3b1 - The Mighty Unix PC!
1788 m68*-att-sysv* )
1789 machine=7300 opsys=usg5-2-2
1790 ;;
1791
1792 ## Bull dpx20
1793 rs6000-bull-bosx* )
1794 machine=ibmrs6000 opsys=aix3-2
1795 ;;
1796
1797 ## Bull dpx2
1798 m68*-bull-sysv3* )
1799 machine=dpx2 opsys=usg5-3
1800 ;;
1801
1802 ## Bull sps7
1803 m68*-bull-sysv2* )
1804 machine=sps7 opsys=usg5-2
1805 ;;
1806
1807 ## CCI 5/32, 6/32 -- see "Tahoe".
1808
1809 ## Celerity
1810 ## I don't know what configuration name to use for this; config.sub
1811 ## doesn't seem to know anything about it. Hey, Celerity users, get
1812 ## in touch with us!
1813 celerity-celerity-bsd* )
1814 machine=celerity opsys=bsd4-2
1815 ;;
1816
1817 ## Clipper
1818 ## What operating systems does this chip run that Emacs has been
1819 ## tested on?
1820 clipper-* )
1821 machine=clipper
1822 ## We'll use the catch-all code at the bottom to guess the
1823 ## operating system.
1824 ;;
1825
df645f7c
AS
1826 ## Compaq Nonstop
1827 mips-compaq-nonstopux* )
1828 machine=nonstopux opsys=nonstopux
1829 ;;
1830
ba4481b5
DL
1831 ## Convex
1832 *-convex-bsd* | *-convex-convexos* )
1833 machine=convex opsys=bsd4-3
1834 ## Prevents spurious white space in makefiles - d.m.cooke@larc.nasa.gov
1835 NON_GNU_CPP="cc -E -P"
1836 ;;
1837
1838 ## Cubix QBx/386
1839 i[3456]86-cubix-sysv* )
1840 machine=intel386 opsys=usg5-3
1841 ;;
1842
1843 ## Cydra 5
1844 cydra*-cydrome-sysv* )
1845 machine=cydra5 opsys=usg5-3
1846 ;;
1847
1848 ## Data General AViiON Machines
1849 ## DG changed naming conventions with the release of 5.4.4.10, they
1850 ## dropped the initial 5.4 but left the intervening R. Because of the
1851 ## R this shouldn't conflict with older versions of the OS (which I
1852 ## think were named like dgux4.*). In addition, DG new AViiONs series
1853 ## uses either Motorola M88k or Intel Pentium CPUs.
1854 m88k-dg-dguxR4.* | m88k-dg-dgux4* )
1855 machine=aviion opsys=dgux4
1856 ;;
1857 m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* )
1858 ## This name is dgux5-4-3 instead of dgux5-4r3
1859 ## to avoid a file name conflict on MSDOS.
1860 machine=aviion opsys=dgux5-4-3
1861 ;;
1862 m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* )
1863 machine=aviion opsys=dgux5-4r2
1864 ;;
1865 m88k-dg-dgux* )
1866 machine=aviion opsys=dgux
1867 ;;
1868
1869 ## Data General AViiON Intel (x86) Machines
1870 ## Exists from 5.4.3 (current i586-dg-dguxR4.11)
1871 ## Ehud Karni, 1998-may-30, ehud@unix.simonwiesel.co.il
1872 i[345]86-dg-dguxR4* )
1873 machine=aviion-intel opsys=dgux4
1874 ;;
1875
1876 ## DECstations
1877 mips-dec-ultrix[0-3].* | mips-dec-ultrix4.0* | mips-dec-bsd4.2* )
1878 machine=pmax opsys=bsd4-2
1879 ;;
1880 mips-dec-ultrix4.[12]* | mips-dec-bsd* )
1881 machine=pmax opsys=bsd4-3
1882 ;;
1883 mips-dec-ultrix* )
1884 machine=pmax opsys=ultrix4-3
1885 ;;
1886 mips-dec-osf* )
1887 machine=pmax opsys=osf1
1888 ;;
1889 mips-dec-mach_bsd4.3* )
1890 machine=pmax opsys=mach-bsd4-3
1891 ;;
1892
cd890796
JD
1893 ## Motorola Delta machines
1894 m68k-motorola-sysv* | m68000-motorola-sysv* )
1895 machine=delta opsys=usg5-3
1896 if test -z "`type gnucc | grep 'not found'`"
1897 then
1898 if test -s /etc/167config
1899 then CC="gnucc -m68040"
1900 else CC="gnucc -m68881"
1901 fi
1902 else
1903 if test -z "`type gcc | grep 'not found'`"
1904 then CC=gcc
1905 else CC=cc
1906 fi
1907 fi
1908 ;;
ba4481b5
DL
1909 m88k-motorola-sysv4* )
1910 # jbotte@bnr.ca says that UNIX_System_V <hostName> 4.0 R40V4.3 m88k mc88110
1911 # needs POSIX_SIGNALS and therefore needs usg5-4-2.
1912 # I hope there are not other 4.0 versions for this machine
1913 # which really need usg5-4 instead.
1914 machine=delta88k opsys=usg5-4-2
1915 ;;
1916 m88k-motorola-sysv* | m88k-motorola-m88kbcs* )
1917 machine=delta88k opsys=usg5-3
1918 ;;
1919
1920 ## Dual machines
1921 m68*-dual-sysv* )
1922 machine=dual opsys=usg5-2
1923 ;;
1924 m68*-dual-uniplus* )
1925 machine=dual opsys=unipl5-2
1926 ;;
1927
1928 ## Elxsi 6400
1929 elxsi-elxsi-sysv* )
1930 machine=elxsi opsys=usg5-2
1931 ;;
1932
1933 ## Encore machines
1934 ns16k-encore-bsd* )
1935 machine=ns16000 opsys=umax
1936 ;;
1937
65171e3a
DL
1938 ## The GEC 63 - apparently, this port isn't really finished yet.
1939 # I'm sure we finished off the last of the machines, though. -- fx
ba4481b5
DL
1940
1941 ## Gould Power Node and NP1
1942 pn-gould-bsd4.2* )
1943 machine=gould opsys=bsd4-2
1944 ;;
1945 pn-gould-bsd4.3* )
1946 machine=gould opsys=bsd4-3
1947 ;;
1948 np1-gould-bsd* )
1949 machine=gould-np1 opsys=bsd4-3
1950 ;;
1951
1952 ## Harris Night Hawk machines running CX/UX (a 5000 looks just like a 4000
1953 ## as far as Emacs is concerned).
1954 m88k-harris-cxux* )
1955 # Build needs to be different on 7.0 and later releases
1956 case "`uname -r`" in
1957 [56].[0-9] ) machine=nh4000 opsys=cxux ;;
1958 [7].[0-9] ) machine=nh4000 opsys=cxux7 ;;
1959 esac
1960 NON_GNU_CPP="/lib/cpp"
1961 ;;
1962 ## Harris ecx or gcx running CX/UX (Series 1200, Series 3000)
1963 m68k-harris-cxux* )
1964 machine=nh3000 opsys=cxux
1965 ;;
1966 ## Harris power pc NightHawk running Power UNIX (Series 6000)
1967 powerpc-harris-powerunix )
1968 machine=nh6000 opsys=powerunix
1969 NON_GNU_CPP="cc -Xo -E -P"
1970 ;;
1971 ## SR2001/SR2201 running HI-UX/MPP
1972 hppa1.1-hitachi-hiuxmpp* )
1973 machine=sr2k opsys=hiuxmpp
1974 ;;
89a336fa
GM
1975 hppa1.1-hitachi-hiuxwe2* )
1976 machine=sr2k opsys=hiuxwe2
1977 ;;
ba4481b5
DL
1978 ## Honeywell XPS100
1979 xps*-honeywell-sysv* )
1980 machine=xps100 opsys=usg5-2
1981 ;;
1982
1983 ## HP 9000 series 200 or 300
1984 m68*-hp-bsd* )
1985 machine=hp9000s300 opsys=bsd4-3
1986 ;;
1987 ## HP/UX 7, 8, 9, and 10 are supported on these machines.
1988 m68*-hp-hpux* )
1989 case "`uname -r`" in
1990 ## Someone's system reports A.B8.05 for this.
1991 ## I wonder what other possibilities there are.
1992 *.B8.* ) machine=hp9000s300 opsys=hpux8 ;;
1993 *.08.* ) machine=hp9000s300 opsys=hpux8 ;;
1994 *.09.* ) machine=hp9000s300 opsys=hpux9 ;;
1995 *.1[0-9].* ) machine=hp9000s300 opsys=hpux9shr ;;
1996 *) machine=hp9000s300 opsys=hpux ;;
1997 esac
1998 ;;
1999
2000 ## HP 9000 series 700 and 800, running HP/UX
2001 hppa*-hp-hpux7* )
2002 machine=hp800 opsys=hpux
2003 ;;
2004 hppa*-hp-hpux8* )
2005 machine=hp800 opsys=hpux8
2006 ;;
2007 hppa*-hp-hpux9shr* )
2008 machine=hp800 opsys=hpux9shr
2009 ;;
2010 hppa*-hp-hpux9* )
2011 machine=hp800 opsys=hpux9
2012 ;;
cc227489 2013 hppa*-hp-hpux10* )
ba4481b5
DL
2014 machine=hp800 opsys=hpux10
2015 ;;
cc227489
MB
2016 hppa*-hp-hpux1[1-9]* )
2017 machine=hp800 opsys=hpux11
2018 ;;
ba4481b5 2019
409d9577
GM
2020 hppa*-*-linux-gnu* )
2021 machine=hp800 opsys=gnu-linux
2022 ;;
2023
ba4481b5
DL
2024 ## HP 9000 series 700 and 800, running HP/UX
2025 hppa*-hp-hpux* )
2026 ## Cross-compilation? Nah!
2027 case "`uname -r`" in
2028 ## Someone's system reports A.B8.05 for this.
2029 ## I wonder what other possibilities there are.
2030 *.B8.* ) machine=hp800 opsys=hpux8 ;;
2031 *.08.* ) machine=hp800 opsys=hpux8 ;;
2032 *.09.* ) machine=hp800 opsys=hpux9 ;;
2033 *) machine=hp800 opsys=hpux10 ;;
2034 esac
2035 ;;
2036 hppa*-*-nextstep* )
2037 machine=hp800 opsys=nextstep
2038 ;;
2039
2040 ## Orion machines
2041 orion-orion-bsd* )
2042 machine=orion opsys=bsd4-2
2043 ;;
2044 clipper-orion-bsd* )
2045 machine=orion105 opsys=bsd4-2
2046 ;;
2047
2048 ## IBM machines
2049 i[3456]86-ibm-aix1.1* )
2050 machine=ibmps2-aix opsys=usg5-2-2
2051 ;;
2052 i[3456]86-ibm-aix1.[23]* | i[3456]86-ibm-aix* )
2053 machine=ibmps2-aix opsys=usg5-3
2054 ;;
2055 i370-ibm-aix*)
2056 machine=ibm370aix opsys=usg5-3
2057 ;;
138f0859
GM
2058 s390-*-linux-gnu)
2059 machine=ibms390 opsys=gnu-linux
2060 ;;
ba4481b5
DL
2061 rs6000-ibm-aix3.1* | powerpc-ibm-aix3.1* )
2062 machine=ibmrs6000 opsys=aix3-1
2063 ;;
2064 rs6000-ibm-aix3.2.5 | powerpc-ibm-aix3.2.5 )
2065 machine=ibmrs6000 opsys=aix3-2-5
2066 ;;
2067 rs6000-ibm-aix4.1* | powerpc-ibm-aix4.1* )
2068 machine=ibmrs6000 opsys=aix4-1
2069 ;;
2070 rs6000-ibm-aix4.2* | powerpc-ibm-aix4.2* )
2071 machine=ibmrs6000 opsys=aix4-2
2072 ;;
d6b82250
EZ
2073 rs6000-ibm-aix5.1* | powerpc-ibm-aix5.1* )
2074 machine=ibmrs6000 opsys=aix4-2
2075 ;;
ba4481b5
DL
2076 rs6000-ibm-aix4.0* | powerpc-ibm-aix4.0* )
2077 machine=ibmrs6000 opsys=aix4
2078 ;;
2079 rs6000-ibm-aix4* | powerpc-ibm-aix4* )
2080 machine=ibmrs6000 opsys=aix4-1
2081 ;;
2082 rs6000-ibm-aix* | powerpc-ibm-aix* )
2083 machine=ibmrs6000 opsys=aix3-2
2084 ;;
2085 romp-ibm-bsd4.3* )
2086 machine=ibmrt opsys=bsd4-3
2087 ;;
2088 romp-ibm-bsd4.2* )
2089 machine=ibmrt opsys=bsd4-2
2090 ;;
2091 romp-ibm-aos4.3* )
2092 machine=ibmrt opsys=bsd4-3
2093 ;;
2094 romp-ibm-aos4.2* )
2095 machine=ibmrt opsys=bsd4-2
2096 ;;
2097 romp-ibm-aos* )
2098 machine=ibmrt opsys=bsd4-3
2099 ;;
2100 romp-ibm-bsd* )
2101 machine=ibmrt opsys=bsd4-3
2102 ;;
2103 romp-ibm-aix* )
2104 machine=ibmrt-aix opsys=usg5-2-2
2105 ;;
2106
2107 ## Integrated Solutions `Optimum V'
2108 m68*-isi-bsd4.2* )
2109 machine=isi-ov opsys=bsd4-2
2110 ;;
2111 m68*-isi-bsd4.3* )
2112 machine=isi-ov opsys=bsd4-3
2113 ;;
2114
2115 ## Intel 386 machines where we do care about the manufacturer
2116 i[3456]86-intsys-sysv* )
2117 machine=is386 opsys=usg5-2-2
2118 ;;
2119
2120 ## Prime EXL
2121 i[3456]86-prime-sysv* )
2122 machine=i386 opsys=usg5-3
2123 ;;
2124
2125 ## Sequent Symmetry running Dynix
2126 i[3456]86-sequent-bsd* )
2127 machine=symmetry opsys=bsd4-3
2128 ;;
2129
2130 ## Sequent Symmetry running ptx 4, which is a modified SVR4.
2131 i[3456]86-sequent-ptx4* | i[3456]86-sequent-sysv4* )
2132 machine=sequent-ptx opsys=ptx4
2133 NON_GNU_CPP=/lib/cpp
2134 ;;
2135
2136 ## Sequent Symmetry running DYNIX/ptx
2137 ## Use the old cpp rather than the newer ANSI one.
2138 i[3456]86-sequent-ptx* )
2139 machine=sequent-ptx opsys=ptx
2140 NON_GNU_CPP="/lib/cpp"
2141 ;;
2142
2143 ## ncr machine running svr4.3.
2144 i[3456]86-ncr-sysv4.3 )
2145 machine=ncr386 opsys=usg5-4-3
2146 ;;
2147
2148 ## Unspecified sysv on an ncr machine defaults to svr4.2.
2149 ## (Plain usg5-4 doesn't turn on POSIX signals, which we need.)
2150 i[3456]86-ncr-sysv* )
2151 machine=ncr386 opsys=usg5-4-2
2152 ;;
2153
2154 ## Intel Paragon OSF/1
2155 i860-intel-osf1* )
2156 machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp
2157 ;;
2158
2159 ## Intel 860
2160 i860-*-sysv4* )
2161 machine=i860 opsys=usg5-4
2162 NON_GNU_CC="/bin/cc" # Ie, not the one in /usr/ucb/cc.
2163 NON_GNU_CPP="/usr/ccs/lib/cpp" # cc -E tokenizes macro expansion.
2164 ;;
2165
c76e04a8
GM
2166 ## Macintosh PowerPC
2167 powerpc*-*-linux-gnu* )
2168 machine=macppc opsys=gnu-linux
2169 ;;
2170
ba4481b5
DL
2171 ## Masscomp machines
2172 m68*-masscomp-rtu* )
2173 machine=masscomp opsys=rtu
2174 ;;
2175
2176 ## Megatest machines
2177 m68*-megatest-bsd* )
2178 machine=mega68 opsys=bsd4-2
2179 ;;
2180
2181 ## Workstations sold by MIPS
2182 ## This is not necessarily all workstations using the MIPS processor -
2183 ## Irises are produced by SGI, and DECstations by DEC.
2184
2185 ## etc/MACHINES lists mips.h and mips4.h as possible machine files,
2186 ## and usg5-2-2 and bsd4-3 as possible OS files. The only guidance
2187 ## it gives for choosing between the alternatives seems to be "Use
2188 ## -machine=mips4 for RISCOS version 4; use -opsystem=bsd4-3 with
2189 ## the BSD world." I'll assume that these are instructions for
2190 ## handling two odd situations, and that every other situation
2191 ## should use mips.h and usg5-2-2, they being listed first.
2192 mips-mips-usg* )
2193 machine=mips4
2194 ## Fall through to the general code at the bottom to decide on the OS.
2195 ;;
2196 mips-mips-riscos4* )
2197 machine=mips4 opsys=bsd4-3
2198 NON_GNU_CC="cc -systype bsd43"
2199 NON_GNU_CPP="cc -systype bsd43 -E"
2200 ;;
2201 mips-mips-riscos5* )
2202 machine=mips4 opsys=riscos5
2203 NON_GNU_CC="cc -systype bsd43"
2204 NON_GNU_CPP="cc -systype bsd43 -E"
2205 ;;
2206 mips-mips-bsd* )
2207 machine=mips opsys=bsd4-3
2208 ;;
2209 mips-mips-* )
2210 machine=mips opsys=usg5-2-2
2211 ;;
2212
2213 ## NeXT
2214 m68*-next-* | m68k-*-nextstep* )
2215 machine=m68k opsys=nextstep
2216 ;;
2217
2218 ## The complete machine from National Semiconductor
2219 ns32k-ns-genix* )
2220 machine=ns32000 opsys=usg5-2
2221 ;;
2222
2223 ## NCR machines
2224 m68*-ncr-sysv2* | m68*-ncr-sysvr2* )
2225 machine=tower32 opsys=usg5-2-2
2226 ;;
2227 m68*-ncr-sysv3* | m68*-ncr-sysvr3* )
2228 machine=tower32v3 opsys=usg5-3
2229 ;;
2230
2231 ## NEC EWS4800
2232 mips-nec-sysv4*)
2233 machine=ews4800 opsys=ux4800
2234 ;;
2235
2236 ## Nixdorf Targon 31
2237 m68*-nixdorf-sysv* )
2238 machine=targon31 opsys=usg5-2-2
2239 ;;
2240
2241 ## Nu (TI or LMI)
2242 m68*-nu-sysv* )
2243 machine=nu opsys=usg5-2
2244 ;;
2245
2246 ## Plexus
2247 m68*-plexus-sysv* )
2248 machine=plexus opsys=usg5-2
2249 ;;
2250
ba4481b5
DL
2251 ## Pyramid machines
2252 ## I don't really have any idea what sort of processor the Pyramid has,
2253 ## so I'm assuming it is its own architecture.
2254 pyramid-pyramid-bsd* )
2255 machine=pyramid opsys=bsd4-2
2256 ;;
2257
2258 ## Sequent Balance
2259 ns32k-sequent-bsd4.2* )
2260 machine=sequent opsys=bsd4-2
2261 ;;
2262 ns32k-sequent-bsd4.3* )
2263 machine=sequent opsys=bsd4-3
2264 ;;
2265
2266 ## Siemens Nixdorf
2267 mips-siemens-sysv* | mips-sni-sysv*)
2268 machine=mips-siemens opsys=usg5-4
2269 NON_GNU_CC=/usr/ccs/bin/cc
2270 NON_GNU_CPP=/usr/ccs/lib/cpp
2271 ;;
2272
2273 ## Silicon Graphics machines
2274 ## Iris 2500 and Iris 2500 Turbo (aka the Iris 3030)
2275 m68*-sgi-iris3.5* )
2276 machine=irist opsys=iris3-5
2277 ;;
2278 m68*-sgi-iris3.6* | m68*-sgi-iris*)
2279 machine=irist opsys=iris3-6
2280 ;;
2281 ## Iris 4D
2282 mips-sgi-irix3* )
2283 machine=iris4d opsys=irix3-3
2284 ;;
2285 mips-sgi-irix4* )
2286 machine=iris4d opsys=irix4-0
2287 ;;
2288 mips-sgi-irix6.5 )
2289 machine=iris4d opsys=irix6-5
946173ad
DL
2290 # Without defining _LANGUAGE_C, things get masked out in the headers
2291 # so that, for instance, grepping for `free' in stdlib.h fails and
2292 # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
2293 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
d42122a3 2294 NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C"
ba4481b5
DL
2295 ;;
2296 mips-sgi-irix6* )
2297 machine=iris4d opsys=irix6-0
c4bb2108 2298 # It's not clear whether -D_LANGUAGE_C is necessary as it is for 6.5,
946173ad
DL
2299 # but presumably it does no harm.
2300 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
d42122a3 2301 # -32 probably isn't necessary in later v.6s -- anyone know which?
ba4481b5
DL
2302 NON_GCC_TEST_OPTIONS=-32
2303 ;;
2304 mips-sgi-irix5.[01]* )
2305 machine=iris4d opsys=irix5-0
2306 ;;
2307 mips-sgi-irix5* | mips-sgi-irix* )
2308 machine=iris4d opsys=irix5-2
2309 ;;
2310
2311 ## SONY machines
2312 m68*-sony-bsd4.2* )
2313 machine=news opsys=bsd4-2
2314 ;;
2315 m68*-sony-bsd4.3* )
2316 machine=news opsys=bsd4-3
2317 ;;
2318 m68*-sony-newsos3* | m68*-sony-news3*)
2319 machine=news opsys=bsd4-3
2320 ;;
2321 mips-sony-bsd* | mips-sony-newsos4* | mips-sony-news4*)
2322 machine=news-risc opsys=bsd4-3
2323 ;;
2324 mips-sony-newsos6* )
2325 machine=news-r6 opsys=newsos6
2326 ;;
2327 mips-sony-news* )
2328 machine=news-risc opsys=newsos5
2329 ;;
2330
2331 ## Stride
2332 m68*-stride-sysv* )
2333 machine=stride opsys=usg5-2
2334 ;;
2335
2336 ## Suns
2337 sparc-*-linux-gnu* | sparc64-*-linux-gnu* )
2338 machine=sparc opsys=gnu-linux
2339 ;;
2340
d054101f 2341 *-auspex-sunos* | *-sun-sunos* | *-sun-bsd* | *-sun-solaris* \
ba4481b5
DL
2342 | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* | powerpc*-*-solaris2* \
2343 | rs6000-*-solaris2*)
2344 case "${canonical}" in
2345 m68*-sunos1* ) machine=sun1 ;;
2346 m68*-sunos2* ) machine=sun2 ;;
2347 m68* ) machine=sun3 ;;
2348 i[3456]86-sun-sunos[34]* ) machine=sun386 ;;
2349 i[3456]86-*-* ) machine=intel386 ;;
2350 powerpcle* ) machine=powerpcle ;;
2351 powerpc* | rs6000* ) machine=ibmrs6000 ;;
2352 sparc* ) machine=sparc ;;
2353 * ) unported=yes ;;
2354 esac
2355 case "${canonical}" in
2356 ## The Sun386 didn't get past 4.0.
2357 i[3456]86-*-sunos4 ) opsys=sunos4-0 ;;
2358 *-sunos4.0* ) opsys=sunos4-0 ;;
2359 *-sunos4.1.[3-9]*noshare )
2360 ## This name is sunos413 instead of sunos4-1-3
2361 ## to avoid a file name conflict on MSDOS.
2362 opsys=sunos413
2363 NON_GNU_CPP=/usr/lib/cpp
2364 NON_GCC_TEST_OPTIONS=-Bstatic
2365 GCC_TEST_OPTIONS=-static
2366 ;;
2367 *-sunos4.1.[3-9]* | *-sunos4shr*)
2368 opsys=sunos4shr
2369 NON_GNU_CPP=/usr/lib/cpp
2370 ;;
2371 *-sunos4* | *-sunos )
2372 opsys=sunos4-1
2373 NON_GCC_TEST_OPTIONS=-Bstatic
2374 GCC_TEST_OPTIONS=-static
2375 ;;
2376 *-sunos5.3* | *-solaris2.3* )
2377 opsys=sol2-3
2378 NON_GNU_CPP=/usr/ccs/lib/cpp
2379 ;;
2380 *-sunos5.4* | *-solaris2.4* )
2381 opsys=sol2-4
2382 NON_GNU_CPP=/usr/ccs/lib/cpp
2383 RANLIB="ar -ts"
2384 ;;
2385 *-sunos5.5* | *-solaris2.5* )
2386 opsys=sol2-5
2387 NON_GNU_CPP=/usr/ccs/lib/cpp
2388 RANLIB="ar -ts"
2389 ;;
8e967cf7
MR
2390 *-sunos5.6* | *-solaris2.6* )
2391 opsys=sol2-6
2392 NON_GNU_CPP=/usr/ccs/lib/cpp
2393 RANLIB="ar -ts"
2394 ;;
ba4481b5 2395 *-sunos5* | *-solaris* )
9e71690e 2396 opsys=sol2-6
ba4481b5
DL
2397 NON_GNU_CPP=/usr/ccs/lib/cpp
2398 ;;
2399 * ) opsys=bsd4-2 ;;
2400 esac
2401 ## Watch out for a compiler that we know will not work.
2402 case "${canonical}" in
2403 *-solaris* | *-sunos5* )
2404 if [ "x$CC" = x/usr/ucb/cc ]; then
2405 ## /usr/ucb/cc doesn't work;
2406 ## we should find some other compiler that does work.
2407 unset CC
2408 fi
2409 ;;
2410 *) ;;
2411 esac
2412 ;;
2413 sparc-*-nextstep* )
2414 machine=sparc opsys=nextstep
2415 ;;
2416
2417 ## Tadpole 68k
2418 m68*-tadpole-sysv* )
2419 machine=tad68k opsys=usg5-3
2420 ;;
2421
2422 ## Tahoe machines
2423 tahoe-tahoe-bsd4.2* )
2424 machine=tahoe opsys=bsd4-2
2425 ;;
2426 tahoe-tahoe-bsd4.3* )
2427 machine=tahoe opsys=bsd4-3
2428 ;;
2429
2430 ## Tandem Integrity S2
2431 mips-tandem-sysv* )
2432 machine=tandem-s2 opsys=usg5-3
2433 ;;
2434
2435 ## Tektronix XD88
2436 m88k-tektronix-sysv3* )
2437 machine=tekxd88 opsys=usg5-3
2438 ;;
2439
2440 ## Tektronix 16000 box (6130?)
2441 ns16k-tektronix-bsd* )
2442 machine=ns16000 opsys=bsd4-2
2443 ;;
2444 ## Tektronix 4300
2445 ## src/m/tek4300.h hints that this is a m68k machine.
2446 m68*-tektronix-bsd* )
2447 machine=tek4300 opsys=bsd4-3
2448 ;;
2449
2450 ## Titan P2 or P3
2451 ## We seem to have lost the machine-description file titan.h!
2452 titan-titan-sysv* )
2453 machine=titan opsys=usg5-3
2454 ;;
2455
2456 ## Ustation E30 (SS5E)
2457 m68*-unisys-uniplus* )
2458 machine=ustation opsystem=unipl5-2
2459 ;;
2460
2461 ## Vaxen.
2462 vax-dec-* )
2463 machine=vax
2464 case "${canonical}" in
2465 *-bsd4.1* ) opsys=bsd4-1 ;;
2466 *-bsd4.2* | *-ultrix[0-3].* | *-ultrix4.0* ) opsys=bsd4-2 ;;
2467 *-bsd4.3* | *-ultrix* ) opsys=bsd4-3 ;;
2468 *-sysv[01]* | *-sysvr[01]* ) opsys=usg5-0 ;;
2469 *-sysv2* | *-sysvr2* ) opsys=usg5-2 ;;
2470 *-vms* ) opsys=vms ;;
2471 * ) unported=yes
2472 esac
2473 ;;
2474
2475 ## Whitechapel MG1
2476 ns16k-whitechapel-* )
2477 machine=mg1
2478 ## We don't know what sort of OS runs on these; we'll let the
2479 ## operating system guessing code below try.
2480 ;;
2481
2482 ## Wicat
2483 m68*-wicat-sysv* )
2484 machine=wicat opsys=usg5-2
2485 ;;
2486
f4988be7
GM
2487 ## IA-64
2488 ia64*-*-linux* )
2489 machine=ia64 opsys=gnu-linux
2490 ;;
2491
ba4481b5
DL
2492 ## Intel 386 machines where we don't care about the manufacturer
2493 i[3456]86-*-* )
2494 machine=intel386
2495 case "${canonical}" in
c60ee5e7 2496 *-cygwin ) opsys=cygwin ;;
9f817ea4 2497 *-lynxos* ) opsys=lynxos ;;
ba4481b5
DL
2498 *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
2499 *-isc2.2* ) opsys=isc2-2 ;;
2500 *-isc4.0* ) opsys=isc4-0 ;;
2501 *-isc4.* ) opsys=isc4-1
2502 GCC_TEST_OPTIONS=-posix
2503 NON_GCC_TEST_OPTIONS=-Xp
2504 ;;
2505 *-isc* ) opsys=isc3-0 ;;
2506 *-esix5* ) opsys=esix5r4; NON_GNU_CPP=/usr/lib/cpp ;;
2507 *-esix* ) opsys=esix ;;
2508 *-xenix* ) opsys=xenix ;;
2509 *-linux-gnu* ) opsys=gnu-linux ;;
2510 *-sco3.2v4* ) opsys=sco4 ; NON_GNU_CPP=/lib/cpp ;;
503d2be0 2511 *-sco3.2v5* ) opsys=sco5
ba4481b5
DL
2512 NON_GNU_CPP=/lib/cpp
2513 # Prevent -belf from being passed to $CPP.
2514 # /lib/cpp does not accept it.
2515 OVERRIDE_CPPFLAGS=" "
2516 ;;
2517 *-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
2518 *-386bsd* ) opsys=386bsd ;;
ba4481b5
DL
2519 *-nextstep* ) opsys=nextstep ;;
2520 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
2521 esac
2522 ;;
2523
2524 ## m68k Linux-based GNU system
2525 m68k-*-linux-gnu* )
2526 machine=m68k opsys=gnu-linux
2527 ;;
2528
2529 ## Mips Linux-based GNU system
cd958eb3 2530 mips-*-linux-gnu* | mipsel-*-linux-gnu* )
ba4481b5
DL
2531 machine=mips opsys=gnu-linux
2532 ;;
2533
2534 ## UXP/DS
2535 sparc-fujitsu-sysv4* )
2536 machine=sparc opsys=uxpds
2537 NON_GNU_CPP=/usr/ccs/lib/cpp
2538 RANLIB="ar -ts"
2539 ;;
2540
2541 ## UXP/V
2542 f301-fujitsu-uxpv4.1)
2543 machine=f301 opsys=uxpv
2544 ;;
2545
e0f712ba
AC
2546 ## Darwin / Mac OS X
2547 powerpc-apple-darwin* )
2548 machine=powermac opsys=darwin
2549 # Define CPP as follows to make autoconf work correctly.
2550 CPP="cc -E -traditional-cpp"
2551 ;;
2552
598a2813
AS
2553 ## AMD x86-64 Linux-based GNU system
2554 x86_64-*-linux-gnu* )
24b01ec4 2555 machine=amdx86-64 opsys=gnu-linux
598a2813
AS
2556 ;;
2557
ba4481b5
DL
2558 * )
2559 unported=yes
2560 ;;
2561esac
2562
2563### If the code above didn't choose an operating system, just choose
2564### an operating system based on the configuration name. You really
2565### only want to use this when you have no idea what the right
2566### operating system is; if you know what operating systems a machine
2567### runs, it's cleaner to make it explicit in the case statement
2568### above.
2569if test x"${opsys}" = x; then
2570 case "${canonical}" in
2571 *-gnu* ) opsys=gnu ;;
2572 *-bsd4.[01] ) opsys=bsd4-1 ;;
2573 *-bsd4.2 ) opsys=bsd4-2 ;;
2574 *-bsd4.3 ) opsys=bsd4-3 ;;
2575 *-sysv0 | *-sysvr0 ) opsys=usg5-0 ;;
2576 *-sysv2 | *-sysvr2 ) opsys=usg5-2 ;;
2577 *-sysv2.2 | *-sysvr2.2 ) opsys=usg5-2-2 ;;
2578 *-sysv3* | *-sysvr3* ) opsys=usg5-3 ;;
2579 *-sysv4.2uw* ) opsys=unixware ;;
2580 *-sysv4.1* | *-sysvr4.1* )
2581 NON_GNU_CPP=/usr/lib/cpp
2582 opsys=usg5-4 ;;
2583 *-sysv4.[2-9]* | *-sysvr4.[2-9]* )
2584 if [ x$NON_GNU_CPP = x ]; then
2585 if [ -f /usr/ccs/lib/cpp ]; then
2586 NON_GNU_CPP=/usr/ccs/lib/cpp
2587 else
2588 NON_GNU_CPP=/lib/cpp
2589 fi
2590 fi
2591 opsys=usg5-4-2 ;;
2592 *-sysv4* | *-sysvr4* ) opsys=usg5-4 ;;
2593 * )
2594 unported=yes
2595 ;;
2596 esac
2597fi
2598
c0d27fcc 2599
22044edf 2600
ba4481b5 2601if test $unported = yes; then
c0d27fcc 2602 { { echo "$as_me:$LINENO: error: Emacs hasn't been ported to \`${canonical}' systems.
503d2be0
AS
2603Check \`etc/MACHINES' for recognized configuration names." >&5
2604echo "$as_me: error: Emacs hasn't been ported to \`${canonical}' systems.
2605Check \`etc/MACHINES' for recognized configuration names." >&2;}
2606 { (exit 1); exit 1; }; }
ba4481b5
DL
2607fi
2608
2609machfile="m/${machine}.h"
2610opsysfile="s/${opsys}.h"
2611
c0d27fcc 2612
ba4481b5
DL
2613#### Choose a compiler.
2614test -n "$CC" && cc_specified=yes
2615
2616# Save the value of CFLAGS that the user specified.
2617SPECIFIED_CFLAGS="$CFLAGS"
2618
2619case ${with_gcc} in
2620 "yes" ) CC="gcc" GCC=yes ;;
2621 "no" ) : ${CC=cc} ;;
503d2be0
AS
2622 * )
2623esac
2624ac_ext=c
2625ac_cpp='$CPP $CPPFLAGS'
2626ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2627ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2628ac_compiler_gnu=$ac_cv_c_compiler_gnu
2629if test -n "$ac_tool_prefix"; then
2630 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2631set dummy ${ac_tool_prefix}gcc; ac_word=$2
c0d27fcc 2632echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2633echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2634if test "${ac_cv_prog_CC+set}" = set; then
2635 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
2636else
2637 if test -n "$CC"; then
2638 ac_cv_prog_CC="$CC" # Let the user override the test.
2639else
c0d27fcc
MR
2640as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2641for as_dir in $PATH
2642do
2643 IFS=$as_save_IFS
2644 test -z "$as_dir" && as_dir=.
2645 for ac_exec_ext in '' $ac_executable_extensions; do
2646 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2647 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2648 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2649 break 2
2650 fi
2651done
503d2be0
AS
2652done
2653
ba4481b5
DL
2654fi
2655fi
503d2be0 2656CC=$ac_cv_prog_CC
ba4481b5 2657if test -n "$CC"; then
c0d27fcc 2658 echo "$as_me:$LINENO: result: $CC" >&5
503d2be0
AS
2659echo "${ECHO_T}$CC" >&6
2660else
c0d27fcc 2661 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
2662echo "${ECHO_T}no" >&6
2663fi
2664
2665fi
2666if test -z "$ac_cv_prog_CC"; then
2667 ac_ct_CC=$CC
2668 # Extract the first word of "gcc", so it can be a program name with args.
2669set dummy gcc; ac_word=$2
c0d27fcc 2670echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2671echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2672if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2673 echo $ECHO_N "(cached) $ECHO_C" >&6
2674else
2675 if test -n "$ac_ct_CC"; then
2676 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2677else
c0d27fcc
MR
2678as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2679for as_dir in $PATH
2680do
2681 IFS=$as_save_IFS
2682 test -z "$as_dir" && as_dir=.
2683 for ac_exec_ext in '' $ac_executable_extensions; do
2684 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2685 ac_cv_prog_ac_ct_CC="gcc"
2686 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2687 break 2
2688 fi
2689done
503d2be0
AS
2690done
2691
2692fi
2693fi
2694ac_ct_CC=$ac_cv_prog_ac_ct_CC
2695if test -n "$ac_ct_CC"; then
c0d27fcc 2696 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
503d2be0 2697echo "${ECHO_T}$ac_ct_CC" >&6
ba4481b5 2698else
c0d27fcc 2699 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
2700echo "${ECHO_T}no" >&6
2701fi
2702
2703 CC=$ac_ct_CC
2704else
2705 CC="$ac_cv_prog_CC"
ba4481b5
DL
2706fi
2707
2708if test -z "$CC"; then
503d2be0
AS
2709 if test -n "$ac_tool_prefix"; then
2710 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2711set dummy ${ac_tool_prefix}cc; ac_word=$2
c0d27fcc 2712echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2713echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2714if test "${ac_cv_prog_CC+set}" = set; then
2715 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
2716else
2717 if test -n "$CC"; then
2718 ac_cv_prog_CC="$CC" # Let the user override the test.
2719else
c0d27fcc
MR
2720as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2721for as_dir in $PATH
2722do
2723 IFS=$as_save_IFS
2724 test -z "$as_dir" && as_dir=.
2725 for ac_exec_ext in '' $ac_executable_extensions; do
2726 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2727 ac_cv_prog_CC="${ac_tool_prefix}cc"
2728 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2729 break 2
2730 fi
2731done
503d2be0
AS
2732done
2733
2734fi
2735fi
2736CC=$ac_cv_prog_CC
2737if test -n "$CC"; then
c0d27fcc 2738 echo "$as_me:$LINENO: result: $CC" >&5
503d2be0
AS
2739echo "${ECHO_T}$CC" >&6
2740else
c0d27fcc 2741 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
2742echo "${ECHO_T}no" >&6
2743fi
2744
2745fi
2746if test -z "$ac_cv_prog_CC"; then
2747 ac_ct_CC=$CC
2748 # Extract the first word of "cc", so it can be a program name with args.
2749set dummy cc; ac_word=$2
c0d27fcc 2750echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2751echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2752if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2753 echo $ECHO_N "(cached) $ECHO_C" >&6
2754else
2755 if test -n "$ac_ct_CC"; then
2756 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2757else
c0d27fcc
MR
2758as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2759for as_dir in $PATH
2760do
2761 IFS=$as_save_IFS
2762 test -z "$as_dir" && as_dir=.
2763 for ac_exec_ext in '' $ac_executable_extensions; do
2764 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2765 ac_cv_prog_ac_ct_CC="cc"
2766 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2767 break 2
2768 fi
2769done
503d2be0
AS
2770done
2771
2772fi
2773fi
2774ac_ct_CC=$ac_cv_prog_ac_ct_CC
2775if test -n "$ac_ct_CC"; then
c0d27fcc 2776 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
503d2be0
AS
2777echo "${ECHO_T}$ac_ct_CC" >&6
2778else
c0d27fcc 2779 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
2780echo "${ECHO_T}no" >&6
2781fi
2782
2783 CC=$ac_ct_CC
2784else
2785 CC="$ac_cv_prog_CC"
2786fi
2787
2788fi
2789if test -z "$CC"; then
2790 # Extract the first word of "cc", so it can be a program name with args.
2791set dummy cc; ac_word=$2
c0d27fcc 2792echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2793echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2794if test "${ac_cv_prog_CC+set}" = set; then
2795 echo $ECHO_N "(cached) $ECHO_C" >&6
2796else
2797 if test -n "$CC"; then
2798 ac_cv_prog_CC="$CC" # Let the user override the test.
2799else
2800 ac_prog_rejected=no
c0d27fcc
MR
2801as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2802for as_dir in $PATH
2803do
2804 IFS=$as_save_IFS
2805 test -z "$as_dir" && as_dir=.
2806 for ac_exec_ext in '' $ac_executable_extensions; do
2807 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2808 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2809 ac_prog_rejected=yes
2810 continue
2811 fi
2812 ac_cv_prog_CC="cc"
2813 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2814 break 2
2815 fi
2816done
503d2be0
AS
2817done
2818
ba4481b5
DL
2819if test $ac_prog_rejected = yes; then
2820 # We found a bogon in the path, so make sure we never use it.
2821 set dummy $ac_cv_prog_CC
2822 shift
503d2be0 2823 if test $# != 0; then
ba4481b5
DL
2824 # We chose a different compiler from the bogus one.
2825 # However, it has the same basename, so the bogon will be chosen
2826 # first if we set CC to just the basename; use the full file name.
2827 shift
6bae0ccf 2828 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
ba4481b5
DL
2829 fi
2830fi
2831fi
2832fi
503d2be0 2833CC=$ac_cv_prog_CC
ba4481b5 2834if test -n "$CC"; then
c0d27fcc 2835 echo "$as_me:$LINENO: result: $CC" >&5
503d2be0 2836echo "${ECHO_T}$CC" >&6
ba4481b5 2837else
c0d27fcc 2838 echo "$as_me:$LINENO: result: no" >&5
503d2be0 2839echo "${ECHO_T}no" >&6
ba4481b5
DL
2840fi
2841
503d2be0
AS
2842fi
2843if test -z "$CC"; then
2844 if test -n "$ac_tool_prefix"; then
2845 for ac_prog in cl
2846 do
2847 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2848set dummy $ac_tool_prefix$ac_prog; ac_word=$2
c0d27fcc 2849echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2850echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2851if test "${ac_cv_prog_CC+set}" = set; then
2852 echo $ECHO_N "(cached) $ECHO_C" >&6
c4bb2108
DL
2853else
2854 if test -n "$CC"; then
2855 ac_cv_prog_CC="$CC" # Let the user override the test.
2856else
c0d27fcc
MR
2857as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2858for as_dir in $PATH
2859do
2860 IFS=$as_save_IFS
2861 test -z "$as_dir" && as_dir=.
2862 for ac_exec_ext in '' $ac_executable_extensions; do
2863 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2864 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2865 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2866 break 2
2867 fi
2868done
503d2be0
AS
2869done
2870
c4bb2108
DL
2871fi
2872fi
503d2be0 2873CC=$ac_cv_prog_CC
c4bb2108 2874if test -n "$CC"; then
c0d27fcc 2875 echo "$as_me:$LINENO: result: $CC" >&5
503d2be0 2876echo "${ECHO_T}$CC" >&6
c4bb2108 2877else
c0d27fcc 2878 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
2879echo "${ECHO_T}no" >&6
2880fi
2881
2882 test -n "$CC" && break
2883 done
2884fi
2885if test -z "$CC"; then
2886 ac_ct_CC=$CC
2887 for ac_prog in cl
2888do
2889 # Extract the first word of "$ac_prog", so it can be a program name with args.
2890set dummy $ac_prog; ac_word=$2
c0d27fcc 2891echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2892echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2893if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2894 echo $ECHO_N "(cached) $ECHO_C" >&6
2895else
2896 if test -n "$ac_ct_CC"; then
2897 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2898else
c0d27fcc
MR
2899as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2900for as_dir in $PATH
2901do
2902 IFS=$as_save_IFS
2903 test -z "$as_dir" && as_dir=.
2904 for ac_exec_ext in '' $ac_executable_extensions; do
2905 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2906 ac_cv_prog_ac_ct_CC="$ac_prog"
2907 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2908 break 2
2909 fi
2910done
503d2be0
AS
2911done
2912
c4bb2108 2913fi
503d2be0
AS
2914fi
2915ac_ct_CC=$ac_cv_prog_ac_ct_CC
2916if test -n "$ac_ct_CC"; then
c0d27fcc 2917 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
503d2be0
AS
2918echo "${ECHO_T}$ac_ct_CC" >&6
2919else
c0d27fcc 2920 echo "$as_me:$LINENO: result: no" >&5
503d2be0 2921echo "${ECHO_T}no" >&6
ba4481b5
DL
2922fi
2923
503d2be0
AS
2924 test -n "$ac_ct_CC" && break
2925done
ba4481b5 2926
503d2be0
AS
2927 CC=$ac_ct_CC
2928fi
2929
2930fi
ba4481b5 2931
c0d27fcc 2932
cd958eb3
MB
2933test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2934See \`config.log' for more details." >&5
2935echo "$as_me: error: no acceptable C compiler found in \$PATH
2936See \`config.log' for more details." >&2;}
503d2be0 2937 { (exit 1); exit 1; }; }
c4bb2108 2938
503d2be0 2939# Provide some information about the compiler.
c0d27fcc 2940echo "$as_me:$LINENO:" \
503d2be0
AS
2941 "checking for C compiler version" >&5
2942ac_compiler=`set X $ac_compile; echo $2`
c0d27fcc 2943{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
503d2be0
AS
2944 (eval $ac_compiler --version </dev/null >&5) 2>&5
2945 ac_status=$?
c0d27fcc 2946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 2947 (exit $ac_status); }
c0d27fcc 2948{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
503d2be0
AS
2949 (eval $ac_compiler -v </dev/null >&5) 2>&5
2950 ac_status=$?
c0d27fcc 2951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 2952 (exit $ac_status); }
c0d27fcc 2953{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
503d2be0
AS
2954 (eval $ac_compiler -V </dev/null >&5) 2>&5
2955 ac_status=$?
c0d27fcc 2956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
2957 (exit $ac_status); }
2958
2959cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 2960#line $LINENO "configure"
cd958eb3
MB
2961/* confdefs.h. */
2962_ACEOF
2963cat confdefs.h >>conftest.$ac_ext
2964cat >>conftest.$ac_ext <<_ACEOF
2965/* end confdefs.h. */
c4bb2108 2966
503d2be0
AS
2967int
2968main ()
2969{
2970
2971 ;
2972 return 0;
2973}
2974_ACEOF
2975ac_clean_files_save=$ac_clean_files
cd958eb3 2976ac_clean_files="$ac_clean_files a.out a.exe b.out"
503d2be0
AS
2977# Try to create an executable without -o first, disregard a.out.
2978# It will help us diagnose broken compilers, and finding out an intuition
2979# of exeext.
c0d27fcc 2980echo "$as_me:$LINENO: checking for C compiler default output" >&5
503d2be0
AS
2981echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
2982ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
c0d27fcc 2983if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
503d2be0
AS
2984 (eval $ac_link_default) 2>&5
2985 ac_status=$?
c0d27fcc 2986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
2987 (exit $ac_status); }; then
2988 # Find the output, starting from the most likely. This scheme is
2989# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2990# resort.
c0d27fcc
MR
2991
2992# Be careful to initialize this variable, since it used to be cached.
2993# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2994ac_cv_exeext=
cd958eb3
MB
2995# b.out is created by i960 compilers.
2996for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
2997do
6bae0ccf 2998 test -f "$ac_file" || continue
503d2be0 2999 case $ac_file in
cd958eb3
MB
3000 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
3001 ;;
3002 conftest.$ac_ext )
3003 # This is the source file.
3004 ;;
3005 [ab].out )
3006 # We found the default executable, but exeext='' is most
3007 # certainly right.
3008 break;;
3009 *.* )
3010 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3011 # FIXME: I believe we export ac_cv_exeext for Libtool,
3012 # but it would be cool to find out if it's true. Does anybody
3013 # maintain Libtool? --akim.
3014 export ac_cv_exeext
3015 break;;
3016 * )
3017 break;;
503d2be0
AS
3018 esac
3019done
3020else
3021 echo "$as_me: failed program was:" >&5
cd958eb3
MB
3022sed 's/^/| /' conftest.$ac_ext >&5
3023
6bae0ccf 3024{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
cd958eb3 3025See \`config.log' for more details." >&5
6bae0ccf 3026echo "$as_me: error: C compiler cannot create executables
cd958eb3 3027See \`config.log' for more details." >&2;}
503d2be0
AS
3028 { (exit 77); exit 77; }; }
3029fi
3030
3031ac_exeext=$ac_cv_exeext
c0d27fcc 3032echo "$as_me:$LINENO: result: $ac_file" >&5
503d2be0
AS
3033echo "${ECHO_T}$ac_file" >&6
3034
3035# Check the compiler produces executables we can run. If not, either
3036# the compiler is broken, or we cross compile.
c0d27fcc 3037echo "$as_me:$LINENO: checking whether the C compiler works" >&5
503d2be0
AS
3038echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
3039# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
3040# If not cross compiling, check that we can run a simple program.
3041if test "$cross_compiling" != yes; then
3042 if { ac_try='./$ac_file'
c0d27fcc 3043 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3044 (eval $ac_try) 2>&5
3045 ac_status=$?
c0d27fcc 3046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3047 (exit $ac_status); }; }; then
3048 cross_compiling=no
ba4481b5 3049 else
503d2be0
AS
3050 if test "$cross_compiling" = maybe; then
3051 cross_compiling=yes
3052 else
c0d27fcc 3053 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
cd958eb3
MB
3054If you meant to cross compile, use \`--host'.
3055See \`config.log' for more details." >&5
503d2be0 3056echo "$as_me: error: cannot run C compiled programs.
cd958eb3
MB
3057If you meant to cross compile, use \`--host'.
3058See \`config.log' for more details." >&2;}
503d2be0
AS
3059 { (exit 1); exit 1; }; }
3060 fi
ba4481b5 3061 fi
503d2be0 3062fi
c0d27fcc 3063echo "$as_me:$LINENO: result: yes" >&5
503d2be0
AS
3064echo "${ECHO_T}yes" >&6
3065
cd958eb3 3066rm -f a.out a.exe conftest$ac_cv_exeext b.out
503d2be0
AS
3067ac_clean_files=$ac_clean_files_save
3068# Check the compiler produces executables we can run. If not, either
3069# the compiler is broken, or we cross compile.
c0d27fcc 3070echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
503d2be0 3071echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
c0d27fcc 3072echo "$as_me:$LINENO: result: $cross_compiling" >&5
503d2be0
AS
3073echo "${ECHO_T}$cross_compiling" >&6
3074
c0d27fcc
MR
3075echo "$as_me:$LINENO: checking for suffix of executables" >&5
3076echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
3077if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
3078 (eval $ac_link) 2>&5
3079 ac_status=$?
c0d27fcc 3080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3081 (exit $ac_status); }; then
3082 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3083# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3084# work properly (i.e., refer to `conftest.exe'), while it won't with
3085# `rm'.
6bae0ccf
DL
3086for ac_file in conftest.exe conftest conftest.*; do
3087 test -f "$ac_file" || continue
503d2be0 3088 case $ac_file in
6bae0ccf 3089 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
503d2be0
AS
3090 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3091 export ac_cv_exeext
3092 break;;
3093 * ) break;;
3094 esac
3095done
ba4481b5 3096else
cd958eb3
MB
3097 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
3098See \`config.log' for more details." >&5
3099echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
3100See \`config.log' for more details." >&2;}
503d2be0 3101 { (exit 1); exit 1; }; }
ba4481b5 3102fi
ba4481b5 3103
503d2be0 3104rm -f conftest$ac_cv_exeext
c0d27fcc 3105echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
503d2be0 3106echo "${ECHO_T}$ac_cv_exeext" >&6
ba4481b5 3107
503d2be0
AS
3108rm -f conftest.$ac_ext
3109EXEEXT=$ac_cv_exeext
3110ac_exeext=$EXEEXT
c0d27fcc
MR
3111echo "$as_me:$LINENO: checking for suffix of object files" >&5
3112echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
503d2be0
AS
3113if test "${ac_cv_objext+set}" = set; then
3114 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3115else
503d2be0 3116 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 3117#line $LINENO "configure"
cd958eb3
MB
3118/* confdefs.h. */
3119_ACEOF
3120cat confdefs.h >>conftest.$ac_ext
3121cat >>conftest.$ac_ext <<_ACEOF
3122/* end confdefs.h. */
ba4481b5 3123
503d2be0
AS
3124int
3125main ()
3126{
ba4481b5 3127
503d2be0
AS
3128 ;
3129 return 0;
3130}
3131_ACEOF
3132rm -f conftest.o conftest.obj
c0d27fcc 3133if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
3134 (eval $ac_compile) 2>&5
3135 ac_status=$?
c0d27fcc 3136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3137 (exit $ac_status); }; then
3138 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
3139 case $ac_file in
6bae0ccf 3140 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
503d2be0
AS
3141 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3142 break;;
3143 esac
3144done
c4bb2108 3145else
503d2be0 3146 echo "$as_me: failed program was:" >&5
cd958eb3
MB
3147sed 's/^/| /' conftest.$ac_ext >&5
3148
3149{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
3150See \`config.log' for more details." >&5
3151echo "$as_me: error: cannot compute suffix of object files: cannot compile
3152See \`config.log' for more details." >&2;}
503d2be0 3153 { (exit 1); exit 1; }; }
c4bb2108
DL
3154fi
3155
503d2be0
AS
3156rm -f conftest.$ac_cv_objext conftest.$ac_ext
3157fi
c0d27fcc 3158echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
503d2be0
AS
3159echo "${ECHO_T}$ac_cv_objext" >&6
3160OBJEXT=$ac_cv_objext
3161ac_objext=$OBJEXT
c0d27fcc 3162echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
503d2be0
AS
3163echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
3164if test "${ac_cv_c_compiler_gnu+set}" = set; then
3165 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3166else
503d2be0 3167 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 3168#line $LINENO "configure"
cd958eb3
MB
3169/* confdefs.h. */
3170_ACEOF
3171cat confdefs.h >>conftest.$ac_ext
3172cat >>conftest.$ac_ext <<_ACEOF
3173/* end confdefs.h. */
503d2be0
AS
3174
3175int
3176main ()
3177{
3178#ifndef __GNUC__
3179 choke me
3180#endif
3181
3182 ;
3183 return 0;
3184}
3185_ACEOF
3186rm -f conftest.$ac_objext
c0d27fcc 3187if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
3188 (eval $ac_compile) 2>&5
3189 ac_status=$?
c0d27fcc 3190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3191 (exit $ac_status); } &&
3192 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 3193 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3194 (eval $ac_try) 2>&5
3195 ac_status=$?
c0d27fcc 3196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3197 (exit $ac_status); }; }; then
3198 ac_compiler_gnu=yes
3199else
3200 echo "$as_me: failed program was:" >&5
cd958eb3
MB
3201sed 's/^/| /' conftest.$ac_ext >&5
3202
503d2be0
AS
3203ac_compiler_gnu=no
3204fi
3205rm -f conftest.$ac_objext conftest.$ac_ext
3206ac_cv_c_compiler_gnu=$ac_compiler_gnu
3207
3208fi
c0d27fcc 3209echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
503d2be0
AS
3210echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
3211GCC=`test $ac_compiler_gnu = yes && echo yes`
3212ac_test_CFLAGS=${CFLAGS+set}
3213ac_save_CFLAGS=$CFLAGS
3214CFLAGS="-g"
c0d27fcc 3215echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
503d2be0
AS
3216echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
3217if test "${ac_cv_prog_cc_g+set}" = set; then
3218 echo $ECHO_N "(cached) $ECHO_C" >&6
3219else
3220 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 3221#line $LINENO "configure"
cd958eb3
MB
3222/* confdefs.h. */
3223_ACEOF
3224cat confdefs.h >>conftest.$ac_ext
3225cat >>conftest.$ac_ext <<_ACEOF
3226/* end confdefs.h. */
503d2be0
AS
3227
3228int
3229main ()
3230{
3231
3232 ;
3233 return 0;
3234}
3235_ACEOF
3236rm -f conftest.$ac_objext
c0d27fcc 3237if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
3238 (eval $ac_compile) 2>&5
3239 ac_status=$?
c0d27fcc 3240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3241 (exit $ac_status); } &&
3242 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 3243 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3244 (eval $ac_try) 2>&5
3245 ac_status=$?
c0d27fcc 3246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3247 (exit $ac_status); }; }; then
ba4481b5
DL
3248 ac_cv_prog_cc_g=yes
3249else
503d2be0 3250 echo "$as_me: failed program was:" >&5
cd958eb3
MB
3251sed 's/^/| /' conftest.$ac_ext >&5
3252
503d2be0 3253ac_cv_prog_cc_g=no
ba4481b5 3254fi
503d2be0 3255rm -f conftest.$ac_objext conftest.$ac_ext
ba4481b5 3256fi
c0d27fcc 3257echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
503d2be0 3258echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
c4bb2108 3259if test "$ac_test_CFLAGS" = set; then
503d2be0 3260 CFLAGS=$ac_save_CFLAGS
c4bb2108
DL
3261elif test $ac_cv_prog_cc_g = yes; then
3262 if test "$GCC" = yes; then
ba4481b5
DL
3263 CFLAGS="-g -O2"
3264 else
c4bb2108 3265 CFLAGS="-g"
ba4481b5 3266 fi
22afa6e8 3267else
c4bb2108
DL
3268 if test "$GCC" = yes; then
3269 CFLAGS="-O2"
3270 else
3271 CFLAGS=
3272 fi
ba4481b5 3273fi
6bae0ccf
DL
3274echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
3275echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
3276if test "${ac_cv_prog_cc_stdc+set}" = set; then
3277 echo $ECHO_N "(cached) $ECHO_C" >&6
3278else
3279 ac_cv_prog_cc_stdc=no
3280ac_save_CC=$CC
3281cat >conftest.$ac_ext <<_ACEOF
3282#line $LINENO "configure"
cd958eb3
MB
3283/* confdefs.h. */
3284_ACEOF
3285cat confdefs.h >>conftest.$ac_ext
3286cat >>conftest.$ac_ext <<_ACEOF
3287/* end confdefs.h. */
6bae0ccf
DL
3288#include <stdarg.h>
3289#include <stdio.h>
3290#include <sys/types.h>
3291#include <sys/stat.h>
3292/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3293struct buf { int x; };
3294FILE * (*rcsopen) (struct buf *, struct stat *, int);
3295static char *e (p, i)
3296 char **p;
3297 int i;
3298{
3299 return p[i];
3300}
3301static char *f (char * (*g) (char **, int), char **p, ...)
3302{
3303 char *s;
3304 va_list v;
3305 va_start (v,p);
3306 s = g (p, va_arg (v,int));
3307 va_end (v);
3308 return s;
3309}
3310int test (int i, double x);
3311struct s1 {int (*f) (int a);};
3312struct s2 {int (*f) (double a);};
3313int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3314int argc;
3315char **argv;
3316int
3317main ()
3318{
3319return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3320 ;
3321 return 0;
3322}
3323_ACEOF
3324# Don't try gcc -ansi; that turns off useful extensions and
3325# breaks some systems' header files.
3326# AIX -qlanglvl=ansi
3327# Ultrix and OSF/1 -std1
3328# HP-UX 10.20 and later -Ae
3329# HP-UX older versions -Aa -D_HPUX_SOURCE
3330# SVR4 -Xc -D__EXTENSIONS__
3331for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3332do
3333 CC="$ac_save_CC $ac_arg"
3334 rm -f conftest.$ac_objext
3335if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3336 (eval $ac_compile) 2>&5
3337 ac_status=$?
3338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3339 (exit $ac_status); } &&
3340 { ac_try='test -s conftest.$ac_objext'
3341 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3342 (eval $ac_try) 2>&5
3343 ac_status=$?
3344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3345 (exit $ac_status); }; }; then
3346 ac_cv_prog_cc_stdc=$ac_arg
3347break
3348else
3349 echo "$as_me: failed program was:" >&5
cd958eb3
MB
3350sed 's/^/| /' conftest.$ac_ext >&5
3351
6bae0ccf
DL
3352fi
3353rm -f conftest.$ac_objext
3354done
3355rm -f conftest.$ac_ext conftest.$ac_objext
3356CC=$ac_save_CC
3357
3358fi
3359
3360case "x$ac_cv_prog_cc_stdc" in
3361 x|xno)
3362 echo "$as_me:$LINENO: result: none needed" >&5
3363echo "${ECHO_T}none needed" >&6 ;;
3364 *)
3365 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
3366echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
3367 CC="$CC $ac_cv_prog_cc_stdc" ;;
3368esac
3369
503d2be0
AS
3370# Some people use a C++ compiler to compile C. Since we use `exit',
3371# in C++ we need to declare it. In case someone uses the same compiler
3372# for both compiling C and C++ we need to have the C++ compiler decide
3373# the declaration of exit, since it's the most demanding environment.
3374cat >conftest.$ac_ext <<_ACEOF
3375#ifndef __cplusplus
3376 choke me
3377#endif
3378_ACEOF
3379rm -f conftest.$ac_objext
c0d27fcc 3380if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
3381 (eval $ac_compile) 2>&5
3382 ac_status=$?
c0d27fcc 3383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3384 (exit $ac_status); } &&
3385 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 3386 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3387 (eval $ac_try) 2>&5
3388 ac_status=$?
c0d27fcc 3389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3390 (exit $ac_status); }; }; then
3391 for ac_declaration in \
3392 ''\
3393 '#include <stdlib.h>' \
3394 'extern "C" void std::exit (int) throw (); using std::exit;' \
3395 'extern "C" void std::exit (int); using std::exit;' \
3396 'extern "C" void exit (int) throw ();' \
3397 'extern "C" void exit (int);' \
3398 'void exit (int);'
3399do
3400 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 3401#line $LINENO "configure"
cd958eb3
MB
3402/* confdefs.h. */
3403_ACEOF
3404cat confdefs.h >>conftest.$ac_ext
3405cat >>conftest.$ac_ext <<_ACEOF
3406/* end confdefs.h. */
503d2be0
AS
3407#include <stdlib.h>
3408$ac_declaration
3409int
3410main ()
3411{
3412exit (42);
3413 ;
3414 return 0;
3415}
3416_ACEOF
3417rm -f conftest.$ac_objext
c0d27fcc 3418if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
3419 (eval $ac_compile) 2>&5
3420 ac_status=$?
c0d27fcc 3421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3422 (exit $ac_status); } &&
3423 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 3424 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3425 (eval $ac_try) 2>&5
3426 ac_status=$?
c0d27fcc 3427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3428 (exit $ac_status); }; }; then
3429 :
3430else
3431 echo "$as_me: failed program was:" >&5
cd958eb3
MB
3432sed 's/^/| /' conftest.$ac_ext >&5
3433
503d2be0
AS
3434continue
3435fi
3436rm -f conftest.$ac_objext conftest.$ac_ext
3437 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 3438#line $LINENO "configure"
cd958eb3
MB
3439/* confdefs.h. */
3440_ACEOF
3441cat confdefs.h >>conftest.$ac_ext
3442cat >>conftest.$ac_ext <<_ACEOF
3443/* end confdefs.h. */
503d2be0
AS
3444$ac_declaration
3445int
3446main ()
3447{
3448exit (42);
3449 ;
3450 return 0;
3451}
3452_ACEOF
3453rm -f conftest.$ac_objext
c0d27fcc 3454if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
3455 (eval $ac_compile) 2>&5
3456 ac_status=$?
c0d27fcc 3457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3458 (exit $ac_status); } &&
3459 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 3460 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3461 (eval $ac_try) 2>&5
3462 ac_status=$?
c0d27fcc 3463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3464 (exit $ac_status); }; }; then
3465 break
3466else
3467 echo "$as_me: failed program was:" >&5
cd958eb3
MB
3468sed 's/^/| /' conftest.$ac_ext >&5
3469
503d2be0
AS
3470fi
3471rm -f conftest.$ac_objext conftest.$ac_ext
3472done
3473rm -f conftest*
3474if test -n "$ac_declaration"; then
3475 echo '#ifdef __cplusplus' >>confdefs.h
3476 echo $ac_declaration >>confdefs.h
3477 echo '#endif' >>confdefs.h
3478fi
ba4481b5 3479
503d2be0
AS
3480else
3481 echo "$as_me: failed program was:" >&5
cd958eb3
MB
3482sed 's/^/| /' conftest.$ac_ext >&5
3483
503d2be0
AS
3484fi
3485rm -f conftest.$ac_objext conftest.$ac_ext
3486ac_ext=c
3487ac_cpp='$CPP $CPPFLAGS'
3488ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3489ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3490ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5 3491
c0d27fcc 3492
ba4481b5
DL
3493# On Suns, sometimes $CPP names a directory.
3494if test -n "$CPP" && test -d "$CPP"; then
3495 CPP=
3496fi
3497
3498#### Some systems specify a CPP to use unless we are using GCC.
3499#### Now that we know whether we are using GCC, we can decide whether
3500#### to use that one.
3501if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x
3502then
3503 CPP="$NON_GNU_CPP"
3504fi
3505
3506#### Some systems specify a CC to use unless we are using GCC.
3507#### Now that we know whether we are using GCC, we can decide whether
3508#### to use that one.
3509if test "x$NON_GNU_CC" != x && test x$GCC != xyes &&
3510 test x$cc_specified != xyes
3511then
3512 CC="$NON_GNU_CC"
3513fi
3514
3515if test x$GCC = xyes && test "x$GCC_TEST_OPTIONS" != x
3516then
3517 CC="$CC $GCC_TEST_OPTIONS"
3518fi
3519
3520if test x$GCC = x && test "x$NON_GCC_TEST_OPTIONS" != x
3521then
3522 CC="$CC $NON_GCC_TEST_OPTIONS"
3523fi
3524
6a3a24fa 3525#### Some other nice autoconf tests.
ba4481b5 3526
c0d27fcc 3527echo "$as_me:$LINENO: checking whether ln -s works" >&5
503d2be0
AS
3528echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3529LN_S=$as_ln_s
3530if test "$LN_S" = "ln -s"; then
c0d27fcc 3531 echo "$as_me:$LINENO: result: yes" >&5
503d2be0 3532echo "${ECHO_T}yes" >&6
ba4481b5 3533else
c0d27fcc 3534 echo "$as_me:$LINENO: result: no, using $LN_S" >&5
503d2be0 3535echo "${ECHO_T}no, using $LN_S" >&6
ba4481b5
DL
3536fi
3537
503d2be0
AS
3538ac_ext=c
3539ac_cpp='$CPP $CPPFLAGS'
3540ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3541ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3542ac_compiler_gnu=$ac_cv_c_compiler_gnu
c0d27fcc 3543echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
503d2be0 3544echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
ba4481b5
DL
3545# On Suns, sometimes $CPP names a directory.
3546if test -n "$CPP" && test -d "$CPP"; then
3547 CPP=
3548fi
3549if test -z "$CPP"; then
503d2be0
AS
3550 if test "${ac_cv_prog_CPP+set}" = set; then
3551 echo $ECHO_N "(cached) $ECHO_C" >&6
3552else
3553 # Double quotes because CPP needs to be expanded
3554 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3555 do
3556 ac_preproc_ok=false
3557for ac_c_preproc_warn_flag in '' yes
3558do
3559 # Use a header file that comes with gcc, so configuring glibc
3560 # with a fresh cross-compiler works.
9e71690e
DK
3561 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3562 # <limits.h> exists even on freestanding compilers.
ba4481b5 3563 # On the NeXT, cc -E runs the code through the compiler's parser,
503d2be0
AS
3564 # not just through cpp. "Syntax error" is here to catch this case.
3565 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 3566#line $LINENO "configure"
cd958eb3
MB
3567/* confdefs.h. */
3568_ACEOF
3569cat confdefs.h >>conftest.$ac_ext
3570cat >>conftest.$ac_ext <<_ACEOF
3571/* end confdefs.h. */
9e71690e
DK
3572#ifdef __STDC__
3573# include <limits.h>
3574#else
3575# include <assert.h>
3576#endif
503d2be0
AS
3577 Syntax error
3578_ACEOF
c0d27fcc 3579if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
3580 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3581 ac_status=$?
6bae0ccf 3582 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
3583 rm -f conftest.er1
3584 cat conftest.err >&5
c0d27fcc 3585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3586 (exit $ac_status); } >/dev/null; then
3587 if test -s conftest.err; then
3588 ac_cpp_err=$ac_c_preproc_warn_flag
3589 else
3590 ac_cpp_err=
3591 fi
3592else
3593 ac_cpp_err=yes
3594fi
3595if test -z "$ac_cpp_err"; then
ba4481b5
DL
3596 :
3597else
503d2be0 3598 echo "$as_me: failed program was:" >&5
cd958eb3
MB
3599sed 's/^/| /' conftest.$ac_ext >&5
3600
503d2be0
AS
3601 # Broken: fails on valid input.
3602continue
3603fi
3604rm -f conftest.err conftest.$ac_ext
3605
3606 # OK, works on sane cases. Now check whether non-existent headers
3607 # can be detected and how.
3608 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 3609#line $LINENO "configure"
cd958eb3
MB
3610/* confdefs.h. */
3611_ACEOF
3612cat confdefs.h >>conftest.$ac_ext
3613cat >>conftest.$ac_ext <<_ACEOF
3614/* end confdefs.h. */
503d2be0
AS
3615#include <ac_nonexistent.h>
3616_ACEOF
c0d27fcc 3617if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
3618 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3619 ac_status=$?
6bae0ccf 3620 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
3621 rm -f conftest.er1
3622 cat conftest.err >&5
c0d27fcc 3623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3624 (exit $ac_status); } >/dev/null; then
3625 if test -s conftest.err; then
3626 ac_cpp_err=$ac_c_preproc_warn_flag
3627 else
3628 ac_cpp_err=
3629 fi
3630else
3631 ac_cpp_err=yes
3632fi
3633if test -z "$ac_cpp_err"; then
3634 # Broken: success on invalid input.
3635continue
c4bb2108 3636else
503d2be0 3637 echo "$as_me: failed program was:" >&5
cd958eb3
MB
3638sed 's/^/| /' conftest.$ac_ext >&5
3639
503d2be0
AS
3640 # Passes both tests.
3641ac_preproc_ok=:
3642break
3643fi
3644rm -f conftest.err conftest.$ac_ext
3645
3646done
3647# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3648rm -f conftest.err conftest.$ac_ext
3649if $ac_preproc_ok; then
3650 break
3651fi
3652
3653 done
3654 ac_cv_prog_CPP=$CPP
3655
3656fi
3657 CPP=$ac_cv_prog_CPP
3658else
3659 ac_cv_prog_CPP=$CPP
3660fi
c0d27fcc 3661echo "$as_me:$LINENO: result: $CPP" >&5
503d2be0
AS
3662echo "${ECHO_T}$CPP" >&6
3663ac_preproc_ok=false
3664for ac_c_preproc_warn_flag in '' yes
3665do
3666 # Use a header file that comes with gcc, so configuring glibc
3667 # with a fresh cross-compiler works.
9e71690e
DK
3668 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3669 # <limits.h> exists even on freestanding compilers.
503d2be0
AS
3670 # On the NeXT, cc -E runs the code through the compiler's parser,
3671 # not just through cpp. "Syntax error" is here to catch this case.
3672 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 3673#line $LINENO "configure"
cd958eb3
MB
3674/* confdefs.h. */
3675_ACEOF
3676cat confdefs.h >>conftest.$ac_ext
3677cat >>conftest.$ac_ext <<_ACEOF
3678/* end confdefs.h. */
9e71690e
DK
3679#ifdef __STDC__
3680# include <limits.h>
3681#else
3682# include <assert.h>
3683#endif
503d2be0
AS
3684 Syntax error
3685_ACEOF
c0d27fcc 3686if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
3687 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3688 ac_status=$?
6bae0ccf 3689 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
3690 rm -f conftest.er1
3691 cat conftest.err >&5
c0d27fcc 3692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3693 (exit $ac_status); } >/dev/null; then
3694 if test -s conftest.err; then
3695 ac_cpp_err=$ac_c_preproc_warn_flag
3696 else
3697 ac_cpp_err=
3698 fi
3699else
3700 ac_cpp_err=yes
3701fi
3702if test -z "$ac_cpp_err"; then
ba4481b5
DL
3703 :
3704else
503d2be0 3705 echo "$as_me: failed program was:" >&5
cd958eb3
MB
3706sed 's/^/| /' conftest.$ac_ext >&5
3707
503d2be0
AS
3708 # Broken: fails on valid input.
3709continue
3710fi
3711rm -f conftest.err conftest.$ac_ext
3712
3713 # OK, works on sane cases. Now check whether non-existent headers
3714 # can be detected and how.
3715 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 3716#line $LINENO "configure"
cd958eb3
MB
3717/* confdefs.h. */
3718_ACEOF
3719cat confdefs.h >>conftest.$ac_ext
3720cat >>conftest.$ac_ext <<_ACEOF
3721/* end confdefs.h. */
503d2be0
AS
3722#include <ac_nonexistent.h>
3723_ACEOF
c0d27fcc 3724if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
3725 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3726 ac_status=$?
6bae0ccf 3727 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
3728 rm -f conftest.er1
3729 cat conftest.err >&5
c0d27fcc 3730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3731 (exit $ac_status); } >/dev/null; then
3732 if test -s conftest.err; then
3733 ac_cpp_err=$ac_c_preproc_warn_flag
3734 else
3735 ac_cpp_err=
3736 fi
3737else
3738 ac_cpp_err=yes
c4bb2108 3739fi
503d2be0
AS
3740if test -z "$ac_cpp_err"; then
3741 # Broken: success on invalid input.
3742continue
3743else
3744 echo "$as_me: failed program was:" >&5
cd958eb3
MB
3745sed 's/^/| /' conftest.$ac_ext >&5
3746
503d2be0
AS
3747 # Passes both tests.
3748ac_preproc_ok=:
3749break
ba4481b5 3750fi
503d2be0
AS
3751rm -f conftest.err conftest.$ac_ext
3752
3753done
3754# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3755rm -f conftest.err conftest.$ac_ext
3756if $ac_preproc_ok; then
3757 :
ba4481b5 3758else
cd958eb3
MB
3759 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3760See \`config.log' for more details." >&5
3761echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3762See \`config.log' for more details." >&2;}
503d2be0 3763 { (exit 1); exit 1; }; }
ba4481b5 3764fi
503d2be0
AS
3765
3766ac_ext=c
3767ac_cpp='$CPP $CPPFLAGS'
3768ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3769ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3770ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5
DL
3771
3772# Find a good install program. We prefer a C program (faster),
3773# so one script is as good as another. But avoid the broken or
3774# incompatible versions:
3775# SysV /etc/install, /usr/sbin/install
3776# SunOS /usr/etc/install
3777# IRIX /sbin/install
3778# AIX /bin/install
503d2be0 3779# AmigaOS /C/install, which installs bootblocks on floppy discs
c4bb2108 3780# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
ba4481b5
DL
3781# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3782# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3783# ./install, which can be erroneously created by make from ./install.sh.
c0d27fcc
MR
3784echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3785echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
ba4481b5 3786if test -z "$INSTALL"; then
503d2be0
AS
3787if test "${ac_cv_path_install+set}" = set; then
3788 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3789else
c0d27fcc
MR
3790 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3791for as_dir in $PATH
3792do
3793 IFS=$as_save_IFS
3794 test -z "$as_dir" && as_dir=.
3795 # Account for people who put trailing slashes in PATH elements.
3796case $as_dir/ in
3797 ./ | .// | /cC/* | \
3798 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3799 /usr/ucb/* ) ;;
3800 *)
3801 # OSF1 and SCO ODT 3.0 have their own names for install.
3802 # Don't use installbsd from OSF since it installs stuff as root
3803 # by default.
3804 for ac_prog in ginstall scoinst install; do
3805 for ac_exec_ext in '' $ac_executable_extensions; do
3806 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3807 if test $ac_prog = install &&
3808 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3809 # AIX install. It has an incompatible calling convention.
3810 :
3811 elif test $ac_prog = install &&
3812 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3813 # program-specific install script used by HP pwplus--don't use.
3814 :
3815 else
3816 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3817 break 3
3818 fi
3819 fi
ba4481b5 3820 done
c0d27fcc
MR
3821 done
3822 ;;
3823esac
3824done
3825
ba4481b5
DL
3826
3827fi
3828 if test "${ac_cv_path_install+set}" = set; then
503d2be0 3829 INSTALL=$ac_cv_path_install
ba4481b5
DL
3830 else
3831 # As a last resort, use the slow shell script. We don't cache a
3832 # path for INSTALL within a source directory, because that will
3833 # break other packages using the cache if that directory is
3834 # removed, or if the path is relative.
503d2be0 3835 INSTALL=$ac_install_sh
ba4481b5
DL
3836 fi
3837fi
c0d27fcc 3838echo "$as_me:$LINENO: result: $INSTALL" >&5
503d2be0 3839echo "${ECHO_T}$INSTALL" >&6
ba4481b5
DL
3840
3841# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3842# It thinks the first close brace ends the variable substitution.
3843test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3844
503d2be0 3845test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
c4bb2108 3846
ba4481b5
DL
3847test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3848
c0d27fcc
MR
3849if test "x$RANLIB" = x; then
3850 if test -n "$ac_tool_prefix"; then
3851 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3852set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3853echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0 3854echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
c0d27fcc 3855if test "${ac_cv_prog_RANLIB+set}" = set; then
503d2be0 3856 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4
DL
3857else
3858 if test -n "$RANLIB"; then
3859 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3860else
c0d27fcc
MR
3861as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3862for as_dir in $PATH
3863do
3864 IFS=$as_save_IFS
3865 test -z "$as_dir" && as_dir=.
3866 for ac_exec_ext in '' $ac_executable_extensions; do
3867 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3868 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3869 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3870 break 2
3871 fi
3872done
503d2be0
AS
3873done
3874
7397acc4
DL
3875fi
3876fi
503d2be0 3877RANLIB=$ac_cv_prog_RANLIB
7397acc4 3878if test -n "$RANLIB"; then
c0d27fcc 3879 echo "$as_me:$LINENO: result: $RANLIB" >&5
503d2be0
AS
3880echo "${ECHO_T}$RANLIB" >&6
3881else
c0d27fcc 3882 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
3883echo "${ECHO_T}no" >&6
3884fi
3885
3886fi
3887if test -z "$ac_cv_prog_RANLIB"; then
3888 ac_ct_RANLIB=$RANLIB
3889 # Extract the first word of "ranlib", so it can be a program name with args.
3890set dummy ranlib; ac_word=$2
c0d27fcc 3891echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
3892echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3893if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3894 echo $ECHO_N "(cached) $ECHO_C" >&6
3895else
3896 if test -n "$ac_ct_RANLIB"; then
3897 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3898else
c0d27fcc
MR
3899as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3900for as_dir in $PATH
3901do
3902 IFS=$as_save_IFS
3903 test -z "$as_dir" && as_dir=.
3904 for ac_exec_ext in '' $ac_executable_extensions; do
3905 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3906 ac_cv_prog_ac_ct_RANLIB="ranlib"
3907 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3908 break 2
3909 fi
3910done
503d2be0
AS
3911done
3912
3913 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3914fi
3915fi
3916ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3917if test -n "$ac_ct_RANLIB"; then
c0d27fcc 3918 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
503d2be0
AS
3919echo "${ECHO_T}$ac_ct_RANLIB" >&6
3920else
c0d27fcc 3921 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
3922echo "${ECHO_T}no" >&6
3923fi
3924
3925 RANLIB=$ac_ct_RANLIB
7397acc4 3926else
503d2be0 3927 RANLIB="$ac_cv_prog_RANLIB"
7397acc4
DL
3928fi
3929
3930fi
9e71690e
DK
3931# Extract the first word of "install-info", so it can be a program name with args.
3932set dummy install-info; ac_word=$2
3933echo "$as_me:$LINENO: checking for $ac_word" >&5
3934echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3935if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
3936 echo $ECHO_N "(cached) $ECHO_C" >&6
3937else
3938 case $INSTALL_INFO in
3939 [\\/]* | ?:[\\/]*)
3940 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
3941 ;;
3942 *)
3943 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3944for as_dir in $PATH
3945do
3946 IFS=$as_save_IFS
3947 test -z "$as_dir" && as_dir=.
3948 for ac_exec_ext in '' $ac_executable_extensions; do
3949 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3950 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
3951 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3952 break 2
3953 fi
3954done
3955done
3956
3957 ;;
3958esac
3959fi
3960INSTALL_INFO=$ac_cv_path_INSTALL_INFO
3961
3962if test -n "$INSTALL_INFO"; then
3963 echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
3964echo "${ECHO_T}$INSTALL_INFO" >&6
3965else
3966 echo "$as_me:$LINENO: result: no" >&5
3967echo "${ECHO_T}no" >&6
3968fi
3969
3970# Extract the first word of "install-info", so it can be a program name with args.
3971set dummy install-info; ac_word=$2
3972echo "$as_me:$LINENO: checking for $ac_word" >&5
3973echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3974if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
3975 echo $ECHO_N "(cached) $ECHO_C" >&6
3976else
3977 case $INSTALL_INFO in
3978 [\\/]* | ?:[\\/]*)
3979 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
3980 ;;
3981 *)
3982 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3983for as_dir in /usr/sbin
3984do
3985 IFS=$as_save_IFS
3986 test -z "$as_dir" && as_dir=.
3987 for ac_exec_ext in '' $ac_executable_extensions; do
3988 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3989 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
3990 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3991 break 2
3992 fi
3993done
3994done
3995
3996 ;;
3997esac
3998fi
3999INSTALL_INFO=$ac_cv_path_INSTALL_INFO
4000
4001if test -n "$INSTALL_INFO"; then
4002 echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
4003echo "${ECHO_T}$INSTALL_INFO" >&6
4004else
4005 echo "$as_me:$LINENO: result: no" >&5
4006echo "${ECHO_T}no" >&6
4007fi
4008
4009# Extract the first word of "install-info", so it can be a program name with args.
4010set dummy install-info; ac_word=$2
4011echo "$as_me:$LINENO: checking for $ac_word" >&5
4012echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4013if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
4014 echo $ECHO_N "(cached) $ECHO_C" >&6
4015else
4016 case $INSTALL_INFO in
4017 [\\/]* | ?:[\\/]*)
4018 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
4019 ;;
4020 *)
4021 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4022for as_dir in /sbin
4023do
4024 IFS=$as_save_IFS
4025 test -z "$as_dir" && as_dir=.
4026 for ac_exec_ext in '' $ac_executable_extensions; do
4027 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4028 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
4029 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4030 break 2
4031 fi
4032done
4033done
4034
4035 test -z "$ac_cv_path_INSTALL_INFO" && ac_cv_path_INSTALL_INFO=":"
4036 ;;
4037esac
4038fi
4039INSTALL_INFO=$ac_cv_path_INSTALL_INFO
4040
4041if test -n "$INSTALL_INFO"; then
4042 echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
4043echo "${ECHO_T}$INSTALL_INFO" >&6
4044else
4045 echo "$as_me:$LINENO: result: no" >&5
4046echo "${ECHO_T}no" >&6
4047fi
4048
ba4481b5 4049
c0d27fcc 4050
8e967cf7
MR
4051if test x$GCC = xyes && test "x$GCC_LINK_TEST_OPTIONS" != x
4052then
4053 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
4054fi
4055
4056if test x$GCC = x && test "x$NON_GCC_LINK_TEST_OPTIONS" != x
4057then
4058 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
4059fi
4060
c0d27fcc
MR
4061
4062
6bae0ccf
DL
4063echo "$as_me:$LINENO: checking for egrep" >&5
4064echo $ECHO_N "checking for egrep... $ECHO_C" >&6
4065if test "${ac_cv_prog_egrep+set}" = set; then
4066 echo $ECHO_N "(cached) $ECHO_C" >&6
4067else
4068 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
4069 then ac_cv_prog_egrep='grep -E'
4070 else ac_cv_prog_egrep='egrep'
4071 fi
4072fi
4073echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
4074echo "${ECHO_T}$ac_cv_prog_egrep" >&6
4075 EGREP=$ac_cv_prog_egrep
4076
4077
c0d27fcc
MR
4078
4079echo "$as_me:$LINENO: checking for AIX" >&5
503d2be0
AS
4080echo $ECHO_N "checking for AIX... $ECHO_C" >&6
4081cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 4082#line $LINENO "configure"
cd958eb3
MB
4083/* confdefs.h. */
4084_ACEOF
4085cat confdefs.h >>conftest.$ac_ext
4086cat >>conftest.$ac_ext <<_ACEOF
4087/* end confdefs.h. */
ba4481b5
DL
4088#ifdef _AIX
4089 yes
4090#endif
4091
503d2be0 4092_ACEOF
ba4481b5 4093if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 4094 $EGREP "yes" >/dev/null 2>&1; then
c0d27fcc 4095 echo "$as_me:$LINENO: result: yes" >&5
503d2be0 4096echo "${ECHO_T}yes" >&6
c0d27fcc 4097cat >>confdefs.h <<\_ACEOF
ba4481b5 4098#define _ALL_SOURCE 1
c0d27fcc 4099_ACEOF
ba4481b5
DL
4100
4101else
c0d27fcc 4102 echo "$as_me:$LINENO: result: no" >&5
503d2be0 4103echo "${ECHO_T}no" >&6
ba4481b5
DL
4104fi
4105rm -f conftest*
4106
c0d27fcc
MR
4107
4108
3b33a005
DL
4109#### Extract some information from the operating system and machine files.
4110
c0d27fcc 4111{ echo "$as_me:$LINENO: checking the machine- and system-dependent files to find out
3b33a005 4112 - which libraries the lib-src programs will want, and
503d2be0
AS
4113 - whether the GNU malloc routines are usable..." >&5
4114echo "$as_me: checking the machine- and system-dependent files to find out
3b33a005 4115 - which libraries the lib-src programs will want, and
503d2be0 4116 - whether the GNU malloc routines are usable..." >&6;}
3b33a005
DL
4117
4118### First figure out CFLAGS (which we use for running the compiler here)
4119### and REAL_CFLAGS (which we use for real compilation).
4120### The two are the same except on a few systems, where they are made
4121### different to work around various lossages. For example,
4122### GCC 2.5 on GNU/Linux needs them to be different because it treats -g
4123### as implying static linking.
4124
4125### If the CFLAGS env var is specified, we use that value
4126### instead of the default.
4127
4128### It's not important that this name contain the PID; you can't run
4129### two configures in the same directory and have anything work
4130### anyway.
4131tempcname="conftest.c"
4132
4133echo '
4134#include "'${srcdir}'/src/'${opsysfile}'"
4135#include "'${srcdir}'/src/'${machfile}'"
4136#ifndef LIBS_MACHINE
4137#define LIBS_MACHINE
4138#endif
4139#ifndef LIBS_SYSTEM
4140#define LIBS_SYSTEM
4141#endif
4142#ifndef C_SWITCH_SYSTEM
4143#define C_SWITCH_SYSTEM
4144#endif
4145#ifndef C_SWITCH_MACHINE
4146#define C_SWITCH_MACHINE
4147#endif
4148configure___ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM
4149configure___ c_switch_system=C_SWITCH_SYSTEM
4150configure___ c_switch_machine=C_SWITCH_MACHINE
4151
4152#ifndef LIB_X11_LIB
4153#define LIB_X11_LIB -lX11
4154#endif
4155
4156#ifndef LIBX11_MACHINE
4157#define LIBX11_MACHINE
4158#endif
4159
4160#ifndef LIBX11_SYSTEM
4161#define LIBX11_SYSTEM
4162#endif
4163configure___ LIBX=LIB_X11_LIB LIBX11_MACHINE LIBX11_SYSTEM
4164
4165#ifdef UNEXEC
4166configure___ unexec=UNEXEC
4167#else
4168configure___ unexec=unexec.o
4169#endif
4170
4171#ifdef SYSTEM_MALLOC
4172configure___ system_malloc=yes
4173#else
4174configure___ system_malloc=no
4175#endif
4176
ef9e4345
GM
4177#ifdef USE_MMAP_FOR_BUFFERS
4178configure___ use_mmap_for_buffers=yes
73b77ee5 4179#else
ef9e4345 4180configure___ use_mmap_for_buffers=no
73b77ee5
GM
4181#endif
4182
3b33a005
DL
4183#ifndef C_DEBUG_SWITCH
4184#define C_DEBUG_SWITCH -g
4185#endif
4186
4187#ifndef C_OPTIMIZE_SWITCH
4188#ifdef __GNUC__
4189#define C_OPTIMIZE_SWITCH -O2
4190#else
4191#define C_OPTIMIZE_SWITCH -O
4192#endif
4193#endif
4194
4195#ifndef LD_SWITCH_MACHINE
4196#define LD_SWITCH_MACHINE
4197#endif
4198
4199#ifndef LD_SWITCH_SYSTEM
4200#define LD_SWITCH_SYSTEM
4201#endif
4202
4203#ifndef LD_SWITCH_X_SITE_AUX
4204#define LD_SWITCH_X_SITE_AUX
503d2be0 4205#endif
3b33a005
DL
4206
4207configure___ ld_switch_system=LD_SWITCH_SYSTEM
4208configure___ ld_switch_machine=LD_SWITCH_MACHINE
4209
4210#ifdef THIS_IS_CONFIGURE
4211
4212/* Get the CFLAGS for tests in configure. */
4213#ifdef __GNUC__
4214configure___ CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
4215#else
4216configure___ CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
4217#endif
4218
4219#else /* not THIS_IS_CONFIGURE */
4220
4221/* Get the CFLAGS for real compilation. */
4222#ifdef __GNUC__
4223configure___ REAL_CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
4224#else
4225configure___ REAL_CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
4226#endif
4227
4228#endif /* not THIS_IS_CONFIGURE */
4229' > ${tempcname}
4230
4231# The value of CPP is a quoted variable reference, so we need to do this
4232# to get its actual value...
4233CPP=`eval "echo $CPP"`
4234eval `${CPP} -Isrc ${tempcname} \
4235 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
4236if test "x$SPECIFIED_CFLAGS" = x; then
4237 eval `${CPP} -Isrc -DTHIS_IS_CONFIGURE ${tempcname} \
4238 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
4239else
4240 REAL_CFLAGS="$CFLAGS"
4241fi
4242rm ${tempcname}
4243
4244ac_link="$ac_link $ld_switch_machine $ld_switch_system"
4245
4246### Make sure subsequent tests use flags consistent with the build flags.
4247
4248if test x"${OVERRIDE_CPPFLAGS}" != x; then
4249 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
4250else
4251 CPPFLAGS="$c_switch_system $c_switch_machine $CPPFLAGS"
4252fi
4253
6bae0ccf
DL
4254
4255
22044edf
DL
4256
4257cat >>confdefs.h <<\_ACEOF
4258#define _GNU_SOURCE 1
4259_ACEOF
4260
4261
4262
503d2be0 4263# Check whether --enable-largefile or --disable-largefile was given.
f4988be7
GM
4264if test "${enable_largefile+set}" = set; then
4265 enableval="$enable_largefile"
f4988be7 4266
503d2be0
AS
4267fi;
4268if test "$enable_largefile" != no; then
f4988be7 4269
c0d27fcc 4270 echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
503d2be0
AS
4271echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
4272if test "${ac_cv_sys_largefile_CC+set}" = set; then
4273 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4274else
f4988be7 4275 ac_cv_sys_largefile_CC=no
503d2be0
AS
4276 if test "$GCC" != yes; then
4277 ac_save_CC=$CC
4278 while :; do
4279 # IRIX 6.2 and later do not support large files by default,
4280 # so use the C compiler's -n32 option if that helps.
4281 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 4282#line $LINENO "configure"
cd958eb3
MB
4283/* confdefs.h. */
4284_ACEOF
4285cat confdefs.h >>conftest.$ac_ext
4286cat >>conftest.$ac_ext <<_ACEOF
4287/* end confdefs.h. */
f4988be7 4288#include <sys/types.h>
503d2be0
AS
4289 /* Check that off_t can represent 2**63 - 1 correctly.
4290 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4291 since some C++ compilers masquerading as C compilers
4292 incorrectly reject 9223372036854775807. */
4293#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4294 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4295 && LARGE_OFF_T % 2147483647 == 1)
4296 ? 1 : -1];
4297int
4298main ()
4299{
f4988be7 4300
503d2be0
AS
4301 ;
4302 return 0;
4303}
4304_ACEOF
4305 rm -f conftest.$ac_objext
c0d27fcc 4306if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
4307 (eval $ac_compile) 2>&5
4308 ac_status=$?
c0d27fcc 4309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4310 (exit $ac_status); } &&
4311 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 4312 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
4313 (eval $ac_try) 2>&5
4314 ac_status=$?
c0d27fcc 4315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4316 (exit $ac_status); }; }; then
4317 break
b192d653 4318else
503d2be0 4319 echo "$as_me: failed program was:" >&5
cd958eb3
MB
4320sed 's/^/| /' conftest.$ac_ext >&5
4321
503d2be0
AS
4322fi
4323rm -f conftest.$ac_objext
4324 CC="$CC -n32"
4325 rm -f conftest.$ac_objext
c0d27fcc 4326if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
4327 (eval $ac_compile) 2>&5
4328 ac_status=$?
c0d27fcc 4329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4330 (exit $ac_status); } &&
4331 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 4332 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
4333 (eval $ac_try) 2>&5
4334 ac_status=$?
c0d27fcc 4335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4336 (exit $ac_status); }; }; then
4337 ac_cv_sys_largefile_CC=' -n32'; break
4338else
4339 echo "$as_me: failed program was:" >&5
cd958eb3
MB
4340sed 's/^/| /' conftest.$ac_ext >&5
4341
503d2be0
AS
4342fi
4343rm -f conftest.$ac_objext
4344 break
4345 done
4346 CC=$ac_save_CC
4347 rm -f conftest.$ac_ext
4348 fi
b192d653 4349fi
c0d27fcc 4350echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
503d2be0
AS
4351echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
4352 if test "$ac_cv_sys_largefile_CC" != no; then
4353 CC=$CC$ac_cv_sys_largefile_CC
4354 fi
b192d653 4355
c0d27fcc 4356 echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
503d2be0
AS
4357echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
4358if test "${ac_cv_sys_file_offset_bits+set}" = set; then
4359 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4360else
503d2be0 4361 while :; do
f4988be7 4362 ac_cv_sys_file_offset_bits=no
503d2be0 4363 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 4364#line $LINENO "configure"
cd958eb3
MB
4365/* confdefs.h. */
4366_ACEOF
4367cat confdefs.h >>conftest.$ac_ext
4368cat >>conftest.$ac_ext <<_ACEOF
4369/* end confdefs.h. */
f4988be7 4370#include <sys/types.h>
503d2be0
AS
4371 /* Check that off_t can represent 2**63 - 1 correctly.
4372 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4373 since some C++ compilers masquerading as C compilers
4374 incorrectly reject 9223372036854775807. */
4375#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4376 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4377 && LARGE_OFF_T % 2147483647 == 1)
4378 ? 1 : -1];
4379int
4380main ()
4381{
f4988be7 4382
503d2be0
AS
4383 ;
4384 return 0;
4385}
4386_ACEOF
4387rm -f conftest.$ac_objext
c0d27fcc 4388if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
4389 (eval $ac_compile) 2>&5
4390 ac_status=$?
c0d27fcc 4391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4392 (exit $ac_status); } &&
4393 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 4394 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
4395 (eval $ac_try) 2>&5
4396 ac_status=$?
c0d27fcc 4397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4398 (exit $ac_status); }; }; then
4399 break
f4988be7 4400else
503d2be0 4401 echo "$as_me: failed program was:" >&5
cd958eb3
MB
4402sed 's/^/| /' conftest.$ac_ext >&5
4403
503d2be0
AS
4404fi
4405rm -f conftest.$ac_objext conftest.$ac_ext
4406 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 4407#line $LINENO "configure"
cd958eb3
MB
4408/* confdefs.h. */
4409_ACEOF
4410cat confdefs.h >>conftest.$ac_ext
4411cat >>conftest.$ac_ext <<_ACEOF
4412/* end confdefs.h. */
f4988be7
GM
4413#define _FILE_OFFSET_BITS 64
4414#include <sys/types.h>
503d2be0
AS
4415 /* Check that off_t can represent 2**63 - 1 correctly.
4416 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4417 since some C++ compilers masquerading as C compilers
4418 incorrectly reject 9223372036854775807. */
4419#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4420 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4421 && LARGE_OFF_T % 2147483647 == 1)
4422 ? 1 : -1];
4423int
4424main ()
4425{
4426
4427 ;
4428 return 0;
4429}
4430_ACEOF
4431rm -f conftest.$ac_objext
c0d27fcc 4432if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
4433 (eval $ac_compile) 2>&5
4434 ac_status=$?
c0d27fcc 4435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4436 (exit $ac_status); } &&
4437 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 4438 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
4439 (eval $ac_try) 2>&5
4440 ac_status=$?
c0d27fcc 4441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4442 (exit $ac_status); }; }; then
4443 ac_cv_sys_file_offset_bits=64; break
4444else
4445 echo "$as_me: failed program was:" >&5
cd958eb3
MB
4446sed 's/^/| /' conftest.$ac_ext >&5
4447
503d2be0
AS
4448fi
4449rm -f conftest.$ac_objext conftest.$ac_ext
4450 break
4451done
ba4481b5 4452fi
c0d27fcc 4453echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
503d2be0
AS
4454echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
4455if test "$ac_cv_sys_file_offset_bits" != no; then
ba4481b5 4456
c0d27fcc 4457cat >>confdefs.h <<_ACEOF
f4988be7 4458#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
c0d27fcc 4459_ACEOF
f4988be7 4460
503d2be0
AS
4461fi
4462rm -f conftest*
c0d27fcc 4463 echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
503d2be0
AS
4464echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
4465if test "${ac_cv_sys_large_files+set}" = set; then
4466 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4467else
503d2be0 4468 while :; do
f4988be7 4469 ac_cv_sys_large_files=no
503d2be0 4470 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 4471#line $LINENO "configure"
cd958eb3
MB
4472/* confdefs.h. */
4473_ACEOF
4474cat confdefs.h >>conftest.$ac_ext
4475cat >>conftest.$ac_ext <<_ACEOF
4476/* end confdefs.h. */
503d2be0
AS
4477#include <sys/types.h>
4478 /* Check that off_t can represent 2**63 - 1 correctly.
4479 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4480 since some C++ compilers masquerading as C compilers
4481 incorrectly reject 9223372036854775807. */
4482#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4483 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4484 && LARGE_OFF_T % 2147483647 == 1)
4485 ? 1 : -1];
4486int
4487main ()
4488{
ba4481b5 4489
503d2be0
AS
4490 ;
4491 return 0;
4492}
4493_ACEOF
4494rm -f conftest.$ac_objext
c0d27fcc 4495if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
4496 (eval $ac_compile) 2>&5
4497 ac_status=$?
c0d27fcc 4498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4499 (exit $ac_status); } &&
4500 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 4501 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
4502 (eval $ac_try) 2>&5
4503 ac_status=$?
c0d27fcc 4504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4505 (exit $ac_status); }; }; then
4506 break
ba4481b5 4507else
503d2be0 4508 echo "$as_me: failed program was:" >&5
cd958eb3
MB
4509sed 's/^/| /' conftest.$ac_ext >&5
4510
503d2be0
AS
4511fi
4512rm -f conftest.$ac_objext conftest.$ac_ext
4513 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 4514#line $LINENO "configure"
cd958eb3
MB
4515/* confdefs.h. */
4516_ACEOF
4517cat confdefs.h >>conftest.$ac_ext
4518cat >>conftest.$ac_ext <<_ACEOF
4519/* end confdefs.h. */
f4988be7 4520#define _LARGE_FILES 1
503d2be0
AS
4521#include <sys/types.h>
4522 /* Check that off_t can represent 2**63 - 1 correctly.
4523 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4524 since some C++ compilers masquerading as C compilers
4525 incorrectly reject 9223372036854775807. */
4526#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4527 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4528 && LARGE_OFF_T % 2147483647 == 1)
4529 ? 1 : -1];
4530int
4531main ()
4532{
f4988be7 4533
503d2be0
AS
4534 ;
4535 return 0;
4536}
4537_ACEOF
4538rm -f conftest.$ac_objext
c0d27fcc 4539if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
4540 (eval $ac_compile) 2>&5
4541 ac_status=$?
c0d27fcc 4542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4543 (exit $ac_status); } &&
4544 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 4545 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
4546 (eval $ac_try) 2>&5
4547 ac_status=$?
c0d27fcc 4548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4549 (exit $ac_status); }; }; then
4550 ac_cv_sys_large_files=1; break
4551else
4552 echo "$as_me: failed program was:" >&5
cd958eb3
MB
4553sed 's/^/| /' conftest.$ac_ext >&5
4554
503d2be0
AS
4555fi
4556rm -f conftest.$ac_objext conftest.$ac_ext
4557 break
4558done
ba4481b5 4559fi
c0d27fcc 4560echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
503d2be0
AS
4561echo "${ECHO_T}$ac_cv_sys_large_files" >&6
4562if test "$ac_cv_sys_large_files" != no; then
ba4481b5 4563
c0d27fcc 4564cat >>confdefs.h <<_ACEOF
f4988be7 4565#define _LARGE_FILES $ac_cv_sys_large_files
c0d27fcc 4566_ACEOF
ba4481b5 4567
503d2be0
AS
4568fi
4569rm -f conftest*
4570fi
ba4481b5 4571
c0d27fcc 4572
2c9dccc9
PJ
4573if test "${with_sound}" != "no"; then
4574 # Sound support for GNU/Linux and the free BSDs.
c0d27fcc
MR
4575 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4576echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
4577if test "${ac_cv_header_stdc+set}" = set; then
4578 echo $ECHO_N "(cached) $ECHO_C" >&6
4579else
4580 cat >conftest.$ac_ext <<_ACEOF
4581#line $LINENO "configure"
cd958eb3
MB
4582/* confdefs.h. */
4583_ACEOF
4584cat confdefs.h >>conftest.$ac_ext
4585cat >>conftest.$ac_ext <<_ACEOF
4586/* end confdefs.h. */
c0d27fcc
MR
4587#include <stdlib.h>
4588#include <stdarg.h>
4589#include <string.h>
4590#include <float.h>
98418dba 4591
cd958eb3
MB
4592int
4593main ()
4594{
4595
4596 ;
4597 return 0;
4598}
c0d27fcc 4599_ACEOF
cd958eb3
MB
4600rm -f conftest.$ac_objext
4601if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4602 (eval $ac_compile) 2>&5
c0d27fcc 4603 ac_status=$?
c0d27fcc 4604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
cd958eb3
MB
4605 (exit $ac_status); } &&
4606 { ac_try='test -s conftest.$ac_objext'
4607 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4608 (eval $ac_try) 2>&5
4609 ac_status=$?
4610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4611 (exit $ac_status); }; }; then
c0d27fcc
MR
4612 ac_cv_header_stdc=yes
4613else
4614 echo "$as_me: failed program was:" >&5
cd958eb3
MB
4615sed 's/^/| /' conftest.$ac_ext >&5
4616
4617ac_cv_header_stdc=no
c0d27fcc 4618fi
cd958eb3 4619rm -f conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
4620
4621if test $ac_cv_header_stdc = yes; then
4622 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4623 cat >conftest.$ac_ext <<_ACEOF
4624#line $LINENO "configure"
cd958eb3
MB
4625/* confdefs.h. */
4626_ACEOF
4627cat confdefs.h >>conftest.$ac_ext
4628cat >>conftest.$ac_ext <<_ACEOF
4629/* end confdefs.h. */
c0d27fcc
MR
4630#include <string.h>
4631
4632_ACEOF
4633if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 4634 $EGREP "memchr" >/dev/null 2>&1; then
c0d27fcc
MR
4635 :
4636else
4637 ac_cv_header_stdc=no
4638fi
4639rm -f conftest*
4640
4641fi
4642
4643if test $ac_cv_header_stdc = yes; then
4644 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4645 cat >conftest.$ac_ext <<_ACEOF
4646#line $LINENO "configure"
cd958eb3
MB
4647/* confdefs.h. */
4648_ACEOF
4649cat confdefs.h >>conftest.$ac_ext
4650cat >>conftest.$ac_ext <<_ACEOF
4651/* end confdefs.h. */
c0d27fcc
MR
4652#include <stdlib.h>
4653
4654_ACEOF
4655if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 4656 $EGREP "free" >/dev/null 2>&1; then
c0d27fcc
MR
4657 :
4658else
4659 ac_cv_header_stdc=no
4660fi
4661rm -f conftest*
4662
4663fi
4664
4665if test $ac_cv_header_stdc = yes; then
4666 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4667 if test "$cross_compiling" = yes; then
4668 :
4669else
4670 cat >conftest.$ac_ext <<_ACEOF
4671#line $LINENO "configure"
cd958eb3
MB
4672/* confdefs.h. */
4673_ACEOF
4674cat confdefs.h >>conftest.$ac_ext
4675cat >>conftest.$ac_ext <<_ACEOF
4676/* end confdefs.h. */
c0d27fcc
MR
4677#include <ctype.h>
4678#if ((' ' & 0x0FF) == 0x020)
4679# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4680# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4681#else
cd958eb3
MB
4682# define ISLOWER(c) \
4683 (('a' <= (c) && (c) <= 'i') \
c0d27fcc
MR
4684 || ('j' <= (c) && (c) <= 'r') \
4685 || ('s' <= (c) && (c) <= 'z'))
4686# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4687#endif
4688
4689#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4690int
4691main ()
4692{
4693 int i;
4694 for (i = 0; i < 256; i++)
4695 if (XOR (islower (i), ISLOWER (i))
4696 || toupper (i) != TOUPPER (i))
4697 exit(2);
4698 exit (0);
4699}
4700_ACEOF
4701rm -f conftest$ac_exeext
4702if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4703 (eval $ac_link) 2>&5
4704 ac_status=$?
4705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4706 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4707 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4708 (eval $ac_try) 2>&5
4709 ac_status=$?
4710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4711 (exit $ac_status); }; }; then
4712 :
4713else
4714 echo "$as_me: program exited with status $ac_status" >&5
4715echo "$as_me: failed program was:" >&5
cd958eb3
MB
4716sed 's/^/| /' conftest.$ac_ext >&5
4717
c0d27fcc
MR
4718( exit $ac_status )
4719ac_cv_header_stdc=no
4720fi
6bae0ccf 4721rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
4722fi
4723fi
4724fi
4725echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4726echo "${ECHO_T}$ac_cv_header_stdc" >&6
4727if test $ac_cv_header_stdc = yes; then
4728
4729cat >>confdefs.h <<\_ACEOF
4730#define STDC_HEADERS 1
4731_ACEOF
4732
4733fi
4734
4735# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4746 inttypes.h stdint.h unistd.h
98418dba
CW
4747do
4748as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc 4749echo "$as_me:$LINENO: checking for $ac_header" >&5
98418dba
CW
4750echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4751if eval "test \"\${$as_ac_Header+set}\" = set"; then
503d2be0 4752 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 4753else
925c2f3f 4754 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 4755#line $LINENO "configure"
cd958eb3
MB
4756/* confdefs.h. */
4757_ACEOF
4758cat confdefs.h >>conftest.$ac_ext
4759cat >>conftest.$ac_ext <<_ACEOF
4760/* end confdefs.h. */
c0d27fcc
MR
4761$ac_includes_default
4762
4763#include <$ac_header>
4764_ACEOF
4765rm -f conftest.$ac_objext
4766if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4767 (eval $ac_compile) 2>&5
4768 ac_status=$?
4769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4770 (exit $ac_status); } &&
4771 { ac_try='test -s conftest.$ac_objext'
4772 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4773 (eval $ac_try) 2>&5
4774 ac_status=$?
4775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4776 (exit $ac_status); }; }; then
4777 eval "$as_ac_Header=yes"
4778else
4779 echo "$as_me: failed program was:" >&5
cd958eb3
MB
4780sed 's/^/| /' conftest.$ac_ext >&5
4781
c0d27fcc
MR
4782eval "$as_ac_Header=no"
4783fi
4784rm -f conftest.$ac_objext conftest.$ac_ext
4785fi
4786echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4787echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4788if test `eval echo '${'$as_ac_Header'}'` = yes; then
4789 cat >>confdefs.h <<_ACEOF
4790#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4791_ACEOF
4792
4793fi
4794
4795done
4796
4797
4798
4799
4800
4801for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h
4802do
4803as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4804if eval "test \"\${$as_ac_Header+set}\" = set"; then
4805 echo "$as_me:$LINENO: checking for $ac_header" >&5
4806echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4807if eval "test \"\${$as_ac_Header+set}\" = set"; then
4808 echo $ECHO_N "(cached) $ECHO_C" >&6
4809fi
4810echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4811echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4812else
4813 # Is the header compilable?
4814echo "$as_me:$LINENO: checking $ac_header usability" >&5
4815echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4816cat >conftest.$ac_ext <<_ACEOF
4817#line $LINENO "configure"
cd958eb3
MB
4818/* confdefs.h. */
4819_ACEOF
4820cat confdefs.h >>conftest.$ac_ext
4821cat >>conftest.$ac_ext <<_ACEOF
4822/* end confdefs.h. */
c0d27fcc 4823$ac_includes_default
98418dba 4824#include <$ac_header>
503d2be0 4825_ACEOF
c0d27fcc
MR
4826rm -f conftest.$ac_objext
4827if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4828 (eval $ac_compile) 2>&5
4829 ac_status=$?
4830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4831 (exit $ac_status); } &&
4832 { ac_try='test -s conftest.$ac_objext'
4833 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4834 (eval $ac_try) 2>&5
4835 ac_status=$?
4836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4837 (exit $ac_status); }; }; then
4838 ac_header_compiler=yes
4839else
4840 echo "$as_me: failed program was:" >&5
cd958eb3
MB
4841sed 's/^/| /' conftest.$ac_ext >&5
4842
c0d27fcc
MR
4843ac_header_compiler=no
4844fi
4845rm -f conftest.$ac_objext conftest.$ac_ext
4846echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4847echo "${ECHO_T}$ac_header_compiler" >&6
4848
4849# Is the header present?
4850echo "$as_me:$LINENO: checking $ac_header presence" >&5
4851echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4852cat >conftest.$ac_ext <<_ACEOF
4853#line $LINENO "configure"
cd958eb3
MB
4854/* confdefs.h. */
4855_ACEOF
4856cat confdefs.h >>conftest.$ac_ext
4857cat >>conftest.$ac_ext <<_ACEOF
4858/* end confdefs.h. */
c0d27fcc
MR
4859#include <$ac_header>
4860_ACEOF
4861if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba 4862 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
503d2be0 4863 ac_status=$?
6bae0ccf 4864 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
4865 rm -f conftest.er1
4866 cat conftest.err >&5
c0d27fcc 4867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
4868 (exit $ac_status); } >/dev/null; then
4869 if test -s conftest.err; then
4870 ac_cpp_err=$ac_c_preproc_warn_flag
4871 else
4872 ac_cpp_err=
4873 fi
4874else
4875 ac_cpp_err=yes
4876fi
4877if test -z "$ac_cpp_err"; then
c0d27fcc 4878 ac_header_preproc=yes
f4988be7 4879else
503d2be0 4880 echo "$as_me: failed program was:" >&5
cd958eb3
MB
4881sed 's/^/| /' conftest.$ac_ext >&5
4882
c0d27fcc 4883 ac_header_preproc=no
f4988be7 4884fi
98418dba 4885rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
4886echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4887echo "${ECHO_T}$ac_header_preproc" >&6
4888
4889# So? What about this header?
4890case $ac_header_compiler:$ac_header_preproc in
4891 yes:no )
4892 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4893echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4894 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
4895echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4896 (
4897 cat <<\_ASBOX
4898## ------------------------------------ ##
4899## Report this to bug-autoconf@gnu.org. ##
4900## ------------------------------------ ##
4901_ASBOX
4902 ) |
4903 sed "s/^/$as_me: WARNING: /" >&2
4904 ;;
c0d27fcc
MR
4905 no:yes )
4906 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4907echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4908 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4909echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4910 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
4911echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4912 (
4913 cat <<\_ASBOX
4914## ------------------------------------ ##
4915## Report this to bug-autoconf@gnu.org. ##
4916## ------------------------------------ ##
4917_ASBOX
4918 ) |
4919 sed "s/^/$as_me: WARNING: /" >&2
4920 ;;
c0d27fcc
MR
4921esac
4922echo "$as_me:$LINENO: checking for $ac_header" >&5
4923echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4924if eval "test \"\${$as_ac_Header+set}\" = set"; then
4925 echo $ECHO_N "(cached) $ECHO_C" >&6
4926else
4927 eval "$as_ac_Header=$ac_header_preproc"
f4988be7 4928fi
c0d27fcc 4929echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 4930echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
4931
4932fi
98418dba 4933if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 4934 cat >>confdefs.h <<_ACEOF
98418dba 4935#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 4936_ACEOF
f4988be7
GM
4937
4938fi
c0d27fcc 4939
98418dba
CW
4940done
4941
4942 # Emulation library used on NetBSD.
c0d27fcc 4943 echo "$as_me:$LINENO: checking for _oss_ioctl in -lossaudio" >&5
98418dba
CW
4944echo $ECHO_N "checking for _oss_ioctl in -lossaudio... $ECHO_C" >&6
4945if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then
503d2be0 4946 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 4947else
98418dba
CW
4948 ac_check_lib_save_LIBS=$LIBS
4949LIBS="-lossaudio $LIBS"
4950cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 4951#line $LINENO "configure"
cd958eb3
MB
4952/* confdefs.h. */
4953_ACEOF
4954cat confdefs.h >>conftest.$ac_ext
4955cat >>conftest.$ac_ext <<_ACEOF
4956/* end confdefs.h. */
98418dba
CW
4957
4958/* Override any gcc2 internal prototype to avoid an error. */
4959#ifdef __cplusplus
4960extern "C"
f4988be7 4961#endif
98418dba
CW
4962/* We use char because int might match the return type of a gcc2
4963 builtin and then its argument prototype would still apply. */
4964char _oss_ioctl ();
503d2be0
AS
4965int
4966main ()
4967{
98418dba 4968_oss_ioctl ();
503d2be0
AS
4969 ;
4970 return 0;
4971}
4972_ACEOF
98418dba 4973rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 4974if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba 4975 (eval $ac_link) 2>&5
503d2be0 4976 ac_status=$?
c0d27fcc 4977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 4978 (exit $ac_status); } &&
98418dba 4979 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 4980 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
4981 (eval $ac_try) 2>&5
4982 ac_status=$?
c0d27fcc 4983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 4984 (exit $ac_status); }; }; then
98418dba 4985 ac_cv_lib_ossaudio__oss_ioctl=yes
f4988be7 4986else
503d2be0 4987 echo "$as_me: failed program was:" >&5
cd958eb3
MB
4988sed 's/^/| /' conftest.$ac_ext >&5
4989
98418dba 4990ac_cv_lib_ossaudio__oss_ioctl=no
f4988be7 4991fi
98418dba
CW
4992rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4993LIBS=$ac_check_lib_save_LIBS
f4988be7 4994fi
c0d27fcc 4995echo "$as_me:$LINENO: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5
98418dba
CW
4996echo "${ECHO_T}$ac_cv_lib_ossaudio__oss_ioctl" >&6
4997if test $ac_cv_lib_ossaudio__oss_ioctl = yes; then
4998 LIBSOUND=-lossaudio
4999else
5000 LIBSOUND=
5001fi
5002
c0d27fcc 5003
f4988be7 5004fi
c0d27fcc
MR
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
22044edf
DL
5023
5024
c0d27fcc
MR
5025
5026
f4988be7 5027
98418dba
CW
5028for ac_header in sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \
5029 linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \
c0d27fcc 5030 termcap.h stdio_ext.h fcntl.h term.h strings.h coff.h pty.h sys/mman.h \
22044edf 5031 sys/param.h sys/vlimit.h sys/resource.h
98418dba
CW
5032do
5033as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
5034if eval "test \"\${$as_ac_Header+set}\" = set"; then
5035 echo "$as_me:$LINENO: checking for $ac_header" >&5
98418dba
CW
5036echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5037if eval "test \"\${$as_ac_Header+set}\" = set"; then
503d2be0 5038 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
5039fi
5040echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5041echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
f4988be7 5042else
c0d27fcc
MR
5043 # Is the header compilable?
5044echo "$as_me:$LINENO: checking $ac_header usability" >&5
5045echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
5046cat >conftest.$ac_ext <<_ACEOF
5047#line $LINENO "configure"
cd958eb3
MB
5048/* confdefs.h. */
5049_ACEOF
5050cat confdefs.h >>conftest.$ac_ext
5051cat >>conftest.$ac_ext <<_ACEOF
5052/* end confdefs.h. */
c0d27fcc
MR
5053$ac_includes_default
5054#include <$ac_header>
5055_ACEOF
5056rm -f conftest.$ac_objext
5057if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5058 (eval $ac_compile) 2>&5
5059 ac_status=$?
5060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5061 (exit $ac_status); } &&
5062 { ac_try='test -s conftest.$ac_objext'
5063 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5064 (eval $ac_try) 2>&5
5065 ac_status=$?
5066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5067 (exit $ac_status); }; }; then
5068 ac_header_compiler=yes
5069else
5070 echo "$as_me: failed program was:" >&5
cd958eb3
MB
5071sed 's/^/| /' conftest.$ac_ext >&5
5072
c0d27fcc
MR
5073ac_header_compiler=no
5074fi
5075rm -f conftest.$ac_objext conftest.$ac_ext
5076echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5077echo "${ECHO_T}$ac_header_compiler" >&6
5078
5079# Is the header present?
5080echo "$as_me:$LINENO: checking $ac_header presence" >&5
5081echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
5082cat >conftest.$ac_ext <<_ACEOF
5083#line $LINENO "configure"
cd958eb3
MB
5084/* confdefs.h. */
5085_ACEOF
5086cat confdefs.h >>conftest.$ac_ext
5087cat >>conftest.$ac_ext <<_ACEOF
5088/* end confdefs.h. */
98418dba 5089#include <$ac_header>
503d2be0 5090_ACEOF
c0d27fcc 5091if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba 5092 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
503d2be0 5093 ac_status=$?
6bae0ccf 5094 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
5095 rm -f conftest.er1
5096 cat conftest.err >&5
c0d27fcc 5097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
5098 (exit $ac_status); } >/dev/null; then
5099 if test -s conftest.err; then
5100 ac_cpp_err=$ac_c_preproc_warn_flag
5101 else
5102 ac_cpp_err=
5103 fi
5104else
5105 ac_cpp_err=yes
5106fi
5107if test -z "$ac_cpp_err"; then
c0d27fcc 5108 ac_header_preproc=yes
34ec9ebe 5109else
503d2be0 5110 echo "$as_me: failed program was:" >&5
cd958eb3
MB
5111sed 's/^/| /' conftest.$ac_ext >&5
5112
c0d27fcc 5113 ac_header_preproc=no
34ec9ebe 5114fi
98418dba 5115rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
5116echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5117echo "${ECHO_T}$ac_header_preproc" >&6
5118
5119# So? What about this header?
5120case $ac_header_compiler:$ac_header_preproc in
5121 yes:no )
5122 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5123echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5124 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
5125echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5126 (
5127 cat <<\_ASBOX
5128## ------------------------------------ ##
5129## Report this to bug-autoconf@gnu.org. ##
5130## ------------------------------------ ##
5131_ASBOX
5132 ) |
5133 sed "s/^/$as_me: WARNING: /" >&2
5134 ;;
c0d27fcc
MR
5135 no:yes )
5136 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5137echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5138 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5139echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5140 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
5141echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5142 (
5143 cat <<\_ASBOX
5144## ------------------------------------ ##
5145## Report this to bug-autoconf@gnu.org. ##
5146## ------------------------------------ ##
5147_ASBOX
5148 ) |
5149 sed "s/^/$as_me: WARNING: /" >&2
5150 ;;
c0d27fcc
MR
5151esac
5152echo "$as_me:$LINENO: checking for $ac_header" >&5
5153echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5154if eval "test \"\${$as_ac_Header+set}\" = set"; then
5155 echo $ECHO_N "(cached) $ECHO_C" >&6
5156else
5157 eval "$as_ac_Header=$ac_header_preproc"
34ec9ebe 5158fi
c0d27fcc 5159echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 5160echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
5161
5162fi
98418dba 5163if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 5164 cat >>confdefs.h <<_ACEOF
98418dba 5165#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 5166_ACEOF
34ec9ebe 5167
98418dba 5168fi
c0d27fcc 5169
98418dba
CW
5170done
5171
22044edf
DL
5172
5173for ac_header in term.h
5174do
5175as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5176echo "$as_me:$LINENO: checking for $ac_header" >&5
5177echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5178if eval "test \"\${$as_ac_Header+set}\" = set"; then
5179 echo $ECHO_N "(cached) $ECHO_C" >&6
5180else
5181 cat >conftest.$ac_ext <<_ACEOF
5182#line $LINENO "configure"
cd958eb3
MB
5183/* confdefs.h. */
5184_ACEOF
5185cat confdefs.h >>conftest.$ac_ext
5186cat >>conftest.$ac_ext <<_ACEOF
5187/* end confdefs.h. */
22044edf
DL
5188#include <$ac_header>
5189_ACEOF
5190if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5191 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5192 ac_status=$?
5193 grep -v '^ *+' conftest.er1 >conftest.err
5194 rm -f conftest.er1
5195 cat conftest.err >&5
5196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5197 (exit $ac_status); } >/dev/null; then
5198 if test -s conftest.err; then
5199 ac_cpp_err=$ac_c_preproc_warn_flag
5200 else
5201 ac_cpp_err=
5202 fi
5203else
5204 ac_cpp_err=yes
5205fi
5206if test -z "$ac_cpp_err"; then
5207 eval "$as_ac_Header=yes"
5208else
5209 echo "$as_me: failed program was:" >&5
cd958eb3
MB
5210sed 's/^/| /' conftest.$ac_ext >&5
5211
22044edf
DL
5212 eval "$as_ac_Header=no"
5213fi
5214rm -f conftest.err conftest.$ac_ext
5215fi
5216echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5217echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5218if test `eval echo '${'$as_ac_Header'}'` = yes; then
5219 cat >>confdefs.h <<_ACEOF
5220#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5221_ACEOF
5222
5223fi
5224
5225done
5226
c0d27fcc 5227echo "$as_me:$LINENO: checking for ANSI C header files" >&5
98418dba
CW
5228echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
5229if test "${ac_cv_header_stdc+set}" = set; then
503d2be0 5230 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5231else
503d2be0 5232 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 5233#line $LINENO "configure"
cd958eb3
MB
5234/* confdefs.h. */
5235_ACEOF
5236cat confdefs.h >>conftest.$ac_ext
5237cat >>conftest.$ac_ext <<_ACEOF
5238/* end confdefs.h. */
98418dba
CW
5239#include <stdlib.h>
5240#include <stdarg.h>
5241#include <string.h>
5242#include <float.h>
5243
cd958eb3
MB
5244int
5245main ()
5246{
5247
5248 ;
5249 return 0;
5250}
98418dba 5251_ACEOF
cd958eb3
MB
5252rm -f conftest.$ac_objext
5253if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5254 (eval $ac_compile) 2>&5
503d2be0 5255 ac_status=$?
c0d27fcc 5256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
cd958eb3
MB
5257 (exit $ac_status); } &&
5258 { ac_try='test -s conftest.$ac_objext'
5259 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5260 (eval $ac_try) 2>&5
5261 ac_status=$?
5262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5263 (exit $ac_status); }; }; then
98418dba 5264 ac_cv_header_stdc=yes
ba4481b5 5265else
503d2be0 5266 echo "$as_me: failed program was:" >&5
cd958eb3
MB
5267sed 's/^/| /' conftest.$ac_ext >&5
5268
5269ac_cv_header_stdc=no
ba4481b5 5270fi
cd958eb3 5271rm -f conftest.$ac_objext conftest.$ac_ext
98418dba
CW
5272
5273if test $ac_cv_header_stdc = yes; then
5274 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5275 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 5276#line $LINENO "configure"
cd958eb3
MB
5277/* confdefs.h. */
5278_ACEOF
5279cat confdefs.h >>conftest.$ac_ext
5280cat >>conftest.$ac_ext <<_ACEOF
5281/* end confdefs.h. */
98418dba
CW
5282#include <string.h>
5283
5284_ACEOF
5285if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 5286 $EGREP "memchr" >/dev/null 2>&1; then
98418dba
CW
5287 :
5288else
5289 ac_cv_header_stdc=no
ba4481b5 5290fi
98418dba 5291rm -f conftest*
ba4481b5
DL
5292
5293fi
5294
98418dba
CW
5295if test $ac_cv_header_stdc = yes; then
5296 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5297 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 5298#line $LINENO "configure"
cd958eb3
MB
5299/* confdefs.h. */
5300_ACEOF
5301cat confdefs.h >>conftest.$ac_ext
5302cat >>conftest.$ac_ext <<_ACEOF
5303/* end confdefs.h. */
98418dba
CW
5304#include <stdlib.h>
5305
5306_ACEOF
5307if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 5308 $EGREP "free" >/dev/null 2>&1; then
98418dba
CW
5309 :
5310else
5311 ac_cv_header_stdc=no
5312fi
5313rm -f conftest*
5314
5315fi
5316
5317if test $ac_cv_header_stdc = yes; then
5318 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5319 if test "$cross_compiling" = yes; then
5320 :
d42122a3 5321else
503d2be0 5322 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 5323#line $LINENO "configure"
cd958eb3
MB
5324/* confdefs.h. */
5325_ACEOF
5326cat confdefs.h >>conftest.$ac_ext
5327cat >>conftest.$ac_ext <<_ACEOF
5328/* end confdefs.h. */
98418dba
CW
5329#include <ctype.h>
5330#if ((' ' & 0x0FF) == 0x020)
5331# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5332# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5333#else
cd958eb3
MB
5334# define ISLOWER(c) \
5335 (('a' <= (c) && (c) <= 'i') \
98418dba
CW
5336 || ('j' <= (c) && (c) <= 'r') \
5337 || ('s' <= (c) && (c) <= 'z'))
5338# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5339#endif
5340
5341#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
503d2be0
AS
5342int
5343main ()
5344{
98418dba
CW
5345 int i;
5346 for (i = 0; i < 256; i++)
5347 if (XOR (islower (i), ISLOWER (i))
5348 || toupper (i) != TOUPPER (i))
5349 exit(2);
5350 exit (0);
503d2be0
AS
5351}
5352_ACEOF
98418dba 5353rm -f conftest$ac_exeext
c0d27fcc 5354if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba 5355 (eval $ac_link) 2>&5
503d2be0 5356 ac_status=$?
c0d27fcc 5357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 5358 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 5359 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5360 (eval $ac_try) 2>&5
5361 ac_status=$?
c0d27fcc 5362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5363 (exit $ac_status); }; }; then
98418dba 5364 :
d42122a3 5365else
98418dba
CW
5366 echo "$as_me: program exited with status $ac_status" >&5
5367echo "$as_me: failed program was:" >&5
cd958eb3
MB
5368sed 's/^/| /' conftest.$ac_ext >&5
5369
c0d27fcc 5370( exit $ac_status )
98418dba 5371ac_cv_header_stdc=no
d42122a3 5372fi
6bae0ccf 5373rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
d42122a3 5374fi
98418dba
CW
5375fi
5376fi
c0d27fcc 5377echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
98418dba
CW
5378echo "${ECHO_T}$ac_cv_header_stdc" >&6
5379if test $ac_cv_header_stdc = yes; then
5380
c0d27fcc 5381cat >>confdefs.h <<\_ACEOF
98418dba 5382#define STDC_HEADERS 1
c0d27fcc 5383_ACEOF
d42122a3
DL
5384
5385fi
5386
c0d27fcc 5387echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
98418dba
CW
5388echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
5389if test "${ac_cv_header_time+set}" = set; then
503d2be0 5390 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5391else
503d2be0 5392 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 5393#line $LINENO "configure"
cd958eb3
MB
5394/* confdefs.h. */
5395_ACEOF
5396cat confdefs.h >>conftest.$ac_ext
5397cat >>conftest.$ac_ext <<_ACEOF
5398/* end confdefs.h. */
ba4481b5 5399#include <sys/types.h>
98418dba 5400#include <sys/time.h>
ba4481b5 5401#include <time.h>
503d2be0
AS
5402
5403int
5404main ()
5405{
98418dba
CW
5406if ((struct tm *) 0)
5407return 0;
503d2be0
AS
5408 ;
5409 return 0;
5410}
5411_ACEOF
5412rm -f conftest.$ac_objext
c0d27fcc 5413if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
5414 (eval $ac_compile) 2>&5
5415 ac_status=$?
c0d27fcc 5416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
5417 (exit $ac_status); } &&
5418 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 5419 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5420 (eval $ac_try) 2>&5
5421 ac_status=$?
c0d27fcc 5422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5423 (exit $ac_status); }; }; then
98418dba 5424 ac_cv_header_time=yes
ba4481b5 5425else
503d2be0 5426 echo "$as_me: failed program was:" >&5
cd958eb3
MB
5427sed 's/^/| /' conftest.$ac_ext >&5
5428
98418dba 5429ac_cv_header_time=no
ba4481b5 5430fi
503d2be0 5431rm -f conftest.$ac_objext conftest.$ac_ext
ba4481b5 5432fi
c0d27fcc 5433echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
98418dba
CW
5434echo "${ECHO_T}$ac_cv_header_time" >&6
5435if test $ac_cv_header_time = yes; then
503d2be0 5436
c0d27fcc 5437cat >>confdefs.h <<\_ACEOF
98418dba 5438#define TIME_WITH_SYS_TIME 1
c0d27fcc 5439_ACEOF
ba4481b5
DL
5440
5441fi
5442
cd958eb3
MB
5443echo "$as_me:$LINENO: checking whether sys_siglist is declared" >&5
5444echo $ECHO_N "checking whether sys_siglist is declared... $ECHO_C" >&6
5445if test "${ac_cv_have_decl_sys_siglist+set}" = set; then
503d2be0 5446 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5447else
503d2be0 5448 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 5449#line $LINENO "configure"
cd958eb3
MB
5450/* confdefs.h. */
5451_ACEOF
5452cat confdefs.h >>conftest.$ac_ext
5453cat >>conftest.$ac_ext <<_ACEOF
5454/* end confdefs.h. */
5455$ac_includes_default
5456int
5457main ()
5458{
5459#ifndef sys_siglist
5460 char *p = (char *) sys_siglist;
98418dba 5461#endif
503d2be0 5462
cd958eb3
MB
5463 ;
5464 return 0;
5465}
5466_ACEOF
5467rm -f conftest.$ac_objext
5468if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5469 (eval $ac_compile) 2>&5
5470 ac_status=$?
5471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5472 (exit $ac_status); } &&
5473 { ac_try='test -s conftest.$ac_objext'
5474 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5475 (eval $ac_try) 2>&5
5476 ac_status=$?
5477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5478 (exit $ac_status); }; }; then
5479 ac_cv_have_decl_sys_siglist=yes
5480else
5481 echo "$as_me: failed program was:" >&5
5482sed 's/^/| /' conftest.$ac_ext >&5
5483
5484ac_cv_have_decl_sys_siglist=no
5485fi
5486rm -f conftest.$ac_objext conftest.$ac_ext
5487fi
5488echo "$as_me:$LINENO: result: $ac_cv_have_decl_sys_siglist" >&5
5489echo "${ECHO_T}$ac_cv_have_decl_sys_siglist" >&6
5490if test $ac_cv_have_decl_sys_siglist = yes; then
5491
5492cat >>confdefs.h <<_ACEOF
5493#define HAVE_DECL_SYS_SIGLIST 1
5494_ACEOF
5495
5496
5497else
5498 cat >>confdefs.h <<_ACEOF
5499#define HAVE_DECL_SYS_SIGLIST 0
5500_ACEOF
5501
5502
5503fi
5504
5505
5506if test $ac_cv_have_decl_sys_siglist != yes; then
5507 # For Tru64, at least:
5508 echo "$as_me:$LINENO: checking whether __sys_siglist is declared" >&5
5509echo $ECHO_N "checking whether __sys_siglist is declared... $ECHO_C" >&6
5510if test "${ac_cv_have_decl___sys_siglist+set}" = set; then
5511 echo $ECHO_N "(cached) $ECHO_C" >&6
5512else
5513 cat >conftest.$ac_ext <<_ACEOF
5514#line $LINENO "configure"
5515/* confdefs.h. */
5516_ACEOF
5517cat confdefs.h >>conftest.$ac_ext
5518cat >>conftest.$ac_ext <<_ACEOF
5519/* end confdefs.h. */
5520$ac_includes_default
503d2be0
AS
5521int
5522main ()
5523{
cd958eb3
MB
5524#ifndef __sys_siglist
5525 char *p = (char *) __sys_siglist;
5526#endif
5527
503d2be0
AS
5528 ;
5529 return 0;
5530}
5531_ACEOF
5532rm -f conftest.$ac_objext
c0d27fcc 5533if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
5534 (eval $ac_compile) 2>&5
5535 ac_status=$?
c0d27fcc 5536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
5537 (exit $ac_status); } &&
5538 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 5539 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5540 (eval $ac_try) 2>&5
5541 ac_status=$?
c0d27fcc 5542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5543 (exit $ac_status); }; }; then
cd958eb3 5544 ac_cv_have_decl___sys_siglist=yes
ba4481b5 5545else
503d2be0 5546 echo "$as_me: failed program was:" >&5
cd958eb3
MB
5547sed 's/^/| /' conftest.$ac_ext >&5
5548
5549ac_cv_have_decl___sys_siglist=no
ba4481b5 5550fi
503d2be0
AS
5551rm -f conftest.$ac_objext conftest.$ac_ext
5552fi
cd958eb3
MB
5553echo "$as_me:$LINENO: result: $ac_cv_have_decl___sys_siglist" >&5
5554echo "${ECHO_T}$ac_cv_have_decl___sys_siglist" >&6
5555if test $ac_cv_have_decl___sys_siglist = yes; then
503d2be0 5556
cd958eb3
MB
5557cat >>confdefs.h <<_ACEOF
5558#define HAVE_DECL___SYS_SIGLIST 1
5559_ACEOF
5560
5561
5562else
5563 cat >>confdefs.h <<_ACEOF
5564#define HAVE_DECL___SYS_SIGLIST 0
c0d27fcc 5565_ACEOF
503d2be0 5566
cd958eb3 5567
ba4481b5
DL
5568fi
5569
cd958eb3
MB
5570
5571 if test $ac_cv_have_decl___sys_siglist = yes; then
5572
5573cat >>confdefs.h <<\_ACEOF
5574#define sys_siglist __sys_siglist
5575_ACEOF
5576
5577 fi
5578fi
c0d27fcc 5579echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
98418dba
CW
5580echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
5581if test "${ac_cv_header_sys_wait_h+set}" = set; then
503d2be0 5582 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5583else
503d2be0 5584 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 5585#line $LINENO "configure"
cd958eb3
MB
5586/* confdefs.h. */
5587_ACEOF
5588cat confdefs.h >>conftest.$ac_ext
5589cat >>conftest.$ac_ext <<_ACEOF
5590/* end confdefs.h. */
98418dba
CW
5591#include <sys/types.h>
5592#include <sys/wait.h>
5593#ifndef WEXITSTATUS
5594# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
5595#endif
5596#ifndef WIFEXITED
5597# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
ba4481b5 5598#endif
503d2be0
AS
5599
5600int
5601main ()
5602{
98418dba
CW
5603 int s;
5604 wait (&s);
5605 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
503d2be0
AS
5606 ;
5607 return 0;
5608}
5609_ACEOF
98418dba 5610rm -f conftest.$ac_objext
c0d27fcc 5611if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
98418dba 5612 (eval $ac_compile) 2>&5
503d2be0 5613 ac_status=$?
c0d27fcc 5614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5615 (exit $ac_status); } &&
98418dba 5616 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 5617 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5618 (eval $ac_try) 2>&5
5619 ac_status=$?
c0d27fcc 5620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5621 (exit $ac_status); }; }; then
98418dba 5622 ac_cv_header_sys_wait_h=yes
ba4481b5 5623else
503d2be0 5624 echo "$as_me: failed program was:" >&5
cd958eb3
MB
5625sed 's/^/| /' conftest.$ac_ext >&5
5626
98418dba 5627ac_cv_header_sys_wait_h=no
ba4481b5 5628fi
98418dba 5629rm -f conftest.$ac_objext conftest.$ac_ext
ba4481b5 5630fi
c0d27fcc 5631echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
98418dba
CW
5632echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
5633if test $ac_cv_header_sys_wait_h = yes; then
503d2be0 5634
c0d27fcc 5635cat >>confdefs.h <<\_ACEOF
98418dba 5636#define HAVE_SYS_WAIT_H 1
c0d27fcc 5637_ACEOF
ba4481b5 5638
ba4481b5
DL
5639fi
5640
c0d27fcc
MR
5641
5642echo "$as_me:$LINENO: checking for struct utimbuf" >&5
98418dba
CW
5643echo $ECHO_N "checking for struct utimbuf... $ECHO_C" >&6
5644if test "${emacs_cv_struct_utimbuf+set}" = set; then
503d2be0 5645 echo $ECHO_N "(cached) $ECHO_C" >&6
1113b624 5646else
503d2be0 5647 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 5648#line $LINENO "configure"
cd958eb3
MB
5649/* confdefs.h. */
5650_ACEOF
5651cat confdefs.h >>conftest.$ac_ext
5652cat >>conftest.$ac_ext <<_ACEOF
5653/* end confdefs.h. */
98418dba
CW
5654#ifdef TIME_WITH_SYS_TIME
5655#include <sys/time.h>
5656#include <time.h>
5657#else
5658#ifdef HAVE_SYS_TIME_H
5659#include <sys/time.h>
5660#else
1113b624 5661#include <time.h>
98418dba
CW
5662#endif
5663#endif
5664#ifdef HAVE_UTIME_H
5665#include <utime.h>
5666#endif
503d2be0
AS
5667int
5668main ()
5669{
98418dba 5670static struct utimbuf x; x.actime = x.modtime;
503d2be0
AS
5671 ;
5672 return 0;
5673}
5674_ACEOF
98418dba 5675rm -f conftest.$ac_objext
c0d27fcc 5676if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
98418dba 5677 (eval $ac_compile) 2>&5
503d2be0 5678 ac_status=$?
c0d27fcc 5679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5680 (exit $ac_status); } &&
98418dba 5681 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 5682 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5683 (eval $ac_try) 2>&5
5684 ac_status=$?
c0d27fcc 5685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5686 (exit $ac_status); }; }; then
98418dba 5687 emacs_cv_struct_utimbuf=yes
1113b624 5688else
503d2be0 5689 echo "$as_me: failed program was:" >&5
cd958eb3
MB
5690sed 's/^/| /' conftest.$ac_ext >&5
5691
98418dba 5692emacs_cv_struct_utimbuf=no
1113b624 5693fi
98418dba 5694rm -f conftest.$ac_objext conftest.$ac_ext
1113b624 5695fi
c0d27fcc 5696echo "$as_me:$LINENO: result: $emacs_cv_struct_utimbuf" >&5
98418dba
CW
5697echo "${ECHO_T}$emacs_cv_struct_utimbuf" >&6
5698if test $emacs_cv_struct_utimbuf = yes; then
b936fae4 5699
c0d27fcc 5700cat >>confdefs.h <<\_ACEOF
98418dba 5701#define HAVE_STRUCT_UTIMBUF 1
c0d27fcc 5702_ACEOF
1113b624
PE
5703
5704fi
ba4481b5 5705
c0d27fcc 5706echo "$as_me:$LINENO: checking return type of signal handlers" >&5
98418dba
CW
5707echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
5708if test "${ac_cv_type_signal+set}" = set; then
503d2be0 5709 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 5710else
98418dba 5711 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 5712#line $LINENO "configure"
cd958eb3
MB
5713/* confdefs.h. */
5714_ACEOF
5715cat confdefs.h >>conftest.$ac_ext
5716cat >>conftest.$ac_ext <<_ACEOF
5717/* end confdefs.h. */
7397acc4 5718#include <sys/types.h>
98418dba
CW
5719#include <signal.h>
5720#ifdef signal
5721# undef signal
5722#endif
5723#ifdef __cplusplus
5724extern "C" void (*signal (int, void (*)(int)))(int);
5725#else
5726void (*signal ()) ();
5727#endif
5728
503d2be0
AS
5729int
5730main ()
5731{
98418dba 5732int i;
503d2be0
AS
5733 ;
5734 return 0;
5735}
5736_ACEOF
98418dba 5737rm -f conftest.$ac_objext
c0d27fcc 5738if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
5739 (eval $ac_compile) 2>&5
5740 ac_status=$?
c0d27fcc 5741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
5742 (exit $ac_status); } &&
5743 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 5744 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5745 (eval $ac_try) 2>&5
5746 ac_status=$?
c0d27fcc 5747 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5748 (exit $ac_status); }; }; then
98418dba 5749 ac_cv_type_signal=void
503d2be0
AS
5750else
5751 echo "$as_me: failed program was:" >&5
cd958eb3
MB
5752sed 's/^/| /' conftest.$ac_ext >&5
5753
98418dba 5754ac_cv_type_signal=int
503d2be0 5755fi
98418dba 5756rm -f conftest.$ac_objext conftest.$ac_ext
7397acc4 5757fi
c0d27fcc 5758echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
98418dba 5759echo "${ECHO_T}$ac_cv_type_signal" >&6
7397acc4 5760
c0d27fcc 5761cat >>confdefs.h <<_ACEOF
98418dba 5762#define RETSIGTYPE $ac_cv_type_signal
c0d27fcc
MR
5763_ACEOF
5764
503d2be0 5765
c0d27fcc
MR
5766
5767echo "$as_me:$LINENO: checking for speed_t" >&5
98418dba
CW
5768echo $ECHO_N "checking for speed_t... $ECHO_C" >&6
5769if test "${emacs_cv_speed_t+set}" = set; then
5770 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 5771else
98418dba 5772 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 5773#line $LINENO "configure"
cd958eb3
MB
5774/* confdefs.h. */
5775_ACEOF
5776cat confdefs.h >>conftest.$ac_ext
5777cat >>conftest.$ac_ext <<_ACEOF
5778/* end confdefs.h. */
98418dba 5779#include <termios.h>
98418dba
CW
5780int
5781main ()
5782{
5783speed_t x = 1;
5784 ;
5785 return 0;
5786}
5787_ACEOF
5788rm -f conftest.$ac_objext
c0d27fcc 5789if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
98418dba
CW
5790 (eval $ac_compile) 2>&5
5791 ac_status=$?
c0d27fcc 5792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
5793 (exit $ac_status); } &&
5794 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 5795 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
5796 (eval $ac_try) 2>&5
5797 ac_status=$?
c0d27fcc 5798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
5799 (exit $ac_status); }; }; then
5800 emacs_cv_speed_t=yes
5801else
5802 echo "$as_me: failed program was:" >&5
cd958eb3
MB
5803sed 's/^/| /' conftest.$ac_ext >&5
5804
98418dba
CW
5805emacs_cv_speed_t=no
5806fi
5807rm -f conftest.$ac_objext conftest.$ac_ext
5808fi
c0d27fcc 5809echo "$as_me:$LINENO: result: $emacs_cv_speed_t" >&5
98418dba
CW
5810echo "${ECHO_T}$emacs_cv_speed_t" >&6
5811if test $emacs_cv_speed_t = yes; then
b936fae4 5812
c0d27fcc 5813cat >>confdefs.h <<\_ACEOF
98418dba 5814#define HAVE_SPEED_T 1
c0d27fcc 5815_ACEOF
98418dba 5816
7397acc4
DL
5817fi
5818
c0d27fcc 5819echo "$as_me:$LINENO: checking for struct timeval" >&5
98418dba
CW
5820echo $ECHO_N "checking for struct timeval... $ECHO_C" >&6
5821if test "${emacs_cv_struct_timeval+set}" = set; then
503d2be0 5822 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 5823else
503d2be0 5824 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 5825#line $LINENO "configure"
cd958eb3
MB
5826/* confdefs.h. */
5827_ACEOF
5828cat confdefs.h >>conftest.$ac_ext
5829cat >>conftest.$ac_ext <<_ACEOF
5830/* end confdefs.h. */
98418dba
CW
5831#ifdef TIME_WITH_SYS_TIME
5832#include <sys/time.h>
5833#include <time.h>
5834#else
5835#ifdef HAVE_SYS_TIME_H
5836#include <sys/time.h>
5837#else
5838#include <time.h>
5839#endif
5840#endif
503d2be0
AS
5841int
5842main ()
5843{
98418dba 5844static struct timeval x; x.tv_sec = x.tv_usec;
503d2be0
AS
5845 ;
5846 return 0;
5847}
5848_ACEOF
5849rm -f conftest.$ac_objext
c0d27fcc 5850if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
5851 (eval $ac_compile) 2>&5
5852 ac_status=$?
c0d27fcc 5853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
5854 (exit $ac_status); } &&
5855 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 5856 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5857 (eval $ac_try) 2>&5
5858 ac_status=$?
c0d27fcc 5859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5860 (exit $ac_status); }; }; then
98418dba 5861 emacs_cv_struct_timeval=yes
7397acc4 5862else
503d2be0 5863 echo "$as_me: failed program was:" >&5
cd958eb3
MB
5864sed 's/^/| /' conftest.$ac_ext >&5
5865
98418dba 5866emacs_cv_struct_timeval=no
7397acc4 5867fi
503d2be0 5868rm -f conftest.$ac_objext conftest.$ac_ext
7397acc4 5869fi
c0d27fcc 5870echo "$as_me:$LINENO: result: $emacs_cv_struct_timeval" >&5
98418dba
CW
5871echo "${ECHO_T}$emacs_cv_struct_timeval" >&6
5872HAVE_TIMEVAL=$emacs_cv_struct_timeval
5873if test $emacs_cv_struct_timeval = yes; then
b936fae4 5874
c0d27fcc 5875cat >>confdefs.h <<\_ACEOF
98418dba 5876#define HAVE_TIMEVAL 1
c0d27fcc 5877_ACEOF
7397acc4
DL
5878
5879fi
5880
c0d27fcc 5881echo "$as_me:$LINENO: checking for struct exception" >&5
98418dba
CW
5882echo $ECHO_N "checking for struct exception... $ECHO_C" >&6
5883if test "${emacs_cv_struct_exception+set}" = set; then
503d2be0 5884 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5885else
503d2be0 5886 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 5887#line $LINENO "configure"
cd958eb3
MB
5888/* confdefs.h. */
5889_ACEOF
5890cat confdefs.h >>conftest.$ac_ext
5891cat >>conftest.$ac_ext <<_ACEOF
5892/* end confdefs.h. */
98418dba 5893#include <math.h>
503d2be0
AS
5894int
5895main ()
5896{
98418dba 5897static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1;
503d2be0
AS
5898 ;
5899 return 0;
ba4481b5 5900}
503d2be0
AS
5901_ACEOF
5902rm -f conftest.$ac_objext
c0d27fcc 5903if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
5904 (eval $ac_compile) 2>&5
5905 ac_status=$?
c0d27fcc 5906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
5907 (exit $ac_status); } &&
5908 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 5909 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5910 (eval $ac_try) 2>&5
5911 ac_status=$?
c0d27fcc 5912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5913 (exit $ac_status); }; }; then
98418dba 5914 emacs_cv_struct_exception=yes
ba4481b5 5915else
503d2be0 5916 echo "$as_me: failed program was:" >&5
cd958eb3
MB
5917sed 's/^/| /' conftest.$ac_ext >&5
5918
98418dba 5919emacs_cv_struct_exception=no
ba4481b5 5920fi
503d2be0 5921rm -f conftest.$ac_objext conftest.$ac_ext
ba4481b5 5922fi
c0d27fcc 5923echo "$as_me:$LINENO: result: $emacs_cv_struct_exception" >&5
98418dba
CW
5924echo "${ECHO_T}$emacs_cv_struct_exception" >&6
5925HAVE_EXCEPTION=$emacs_cv_struct_exception
5926if test $emacs_cv_struct_exception != yes; then
b936fae4 5927
c0d27fcc 5928cat >>confdefs.h <<\_ACEOF
98418dba 5929#define NO_MATHERR 1
c0d27fcc 5930_ACEOF
ba4481b5
DL
5931
5932fi
5933
c0d27fcc 5934echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
98418dba
CW
5935echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
5936if test "${ac_cv_struct_tm+set}" = set; then
503d2be0 5937 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 5938else
503d2be0 5939 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 5940#line $LINENO "configure"
cd958eb3
MB
5941/* confdefs.h. */
5942_ACEOF
5943cat confdefs.h >>conftest.$ac_ext
5944cat >>conftest.$ac_ext <<_ACEOF
5945/* end confdefs.h. */
98418dba
CW
5946#include <sys/types.h>
5947#include <time.h>
7397acc4 5948
503d2be0
AS
5949int
5950main ()
5951{
98418dba 5952struct tm *tp; tp->tm_sec;
503d2be0
AS
5953 ;
5954 return 0;
5955}
5956_ACEOF
5957rm -f conftest.$ac_objext
c0d27fcc 5958if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
5959 (eval $ac_compile) 2>&5
5960 ac_status=$?
c0d27fcc 5961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
5962 (exit $ac_status); } &&
5963 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 5964 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5965 (eval $ac_try) 2>&5
5966 ac_status=$?
c0d27fcc 5967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5968 (exit $ac_status); }; }; then
98418dba 5969 ac_cv_struct_tm=time.h
7397acc4 5970else
503d2be0 5971 echo "$as_me: failed program was:" >&5
cd958eb3
MB
5972sed 's/^/| /' conftest.$ac_ext >&5
5973
98418dba 5974ac_cv_struct_tm=sys/time.h
7397acc4 5975fi
503d2be0 5976rm -f conftest.$ac_objext conftest.$ac_ext
7397acc4 5977fi
c0d27fcc 5978echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
98418dba
CW
5979echo "${ECHO_T}$ac_cv_struct_tm" >&6
5980if test $ac_cv_struct_tm = sys/time.h; then
7397acc4 5981
c0d27fcc 5982cat >>confdefs.h <<\_ACEOF
98418dba 5983#define TM_IN_SYS_TIME 1
c0d27fcc 5984_ACEOF
7397acc4
DL
5985
5986fi
ba4481b5 5987
c0d27fcc 5988echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
98418dba
CW
5989echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
5990if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
503d2be0 5991 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5992else
98418dba 5993 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 5994#line $LINENO "configure"
cd958eb3
MB
5995/* confdefs.h. */
5996_ACEOF
5997cat confdefs.h >>conftest.$ac_ext
5998cat >>conftest.$ac_ext <<_ACEOF
5999/* end confdefs.h. */
98418dba
CW
6000#include <sys/types.h>
6001#include <$ac_cv_struct_tm>
ba4481b5 6002
c0d27fcc 6003
98418dba
CW
6004int
6005main ()
6006{
6007static struct tm ac_aggr;
6008if (ac_aggr.tm_zone)
6009return 0;
6010 ;
6011 return 0;
6012}
6013_ACEOF
6014rm -f conftest.$ac_objext
c0d27fcc 6015if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
98418dba
CW
6016 (eval $ac_compile) 2>&5
6017 ac_status=$?
c0d27fcc 6018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
6019 (exit $ac_status); } &&
6020 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6021 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
6022 (eval $ac_try) 2>&5
6023 ac_status=$?
c0d27fcc 6024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
6025 (exit $ac_status); }; }; then
6026 ac_cv_member_struct_tm_tm_zone=yes
ba4481b5 6027else
98418dba 6028 echo "$as_me: failed program was:" >&5
cd958eb3
MB
6029sed 's/^/| /' conftest.$ac_ext >&5
6030
6bae0ccf
DL
6031cat >conftest.$ac_ext <<_ACEOF
6032#line $LINENO "configure"
cd958eb3
MB
6033/* confdefs.h. */
6034_ACEOF
6035cat confdefs.h >>conftest.$ac_ext
6036cat >>conftest.$ac_ext <<_ACEOF
6037/* end confdefs.h. */
6bae0ccf
DL
6038#include <sys/types.h>
6039#include <$ac_cv_struct_tm>
6040
6041
6042int
6043main ()
6044{
6045static struct tm ac_aggr;
6046if (sizeof ac_aggr.tm_zone)
6047return 0;
6048 ;
6049 return 0;
6050}
6051_ACEOF
6052rm -f conftest.$ac_objext
6053if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6054 (eval $ac_compile) 2>&5
6055 ac_status=$?
6056 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6057 (exit $ac_status); } &&
6058 { ac_try='test -s conftest.$ac_objext'
6059 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6060 (eval $ac_try) 2>&5
6061 ac_status=$?
6062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6063 (exit $ac_status); }; }; then
6064 ac_cv_member_struct_tm_tm_zone=yes
6065else
6066 echo "$as_me: failed program was:" >&5
cd958eb3
MB
6067sed 's/^/| /' conftest.$ac_ext >&5
6068
98418dba 6069ac_cv_member_struct_tm_tm_zone=no
ba4481b5 6070fi
98418dba 6071rm -f conftest.$ac_objext conftest.$ac_ext
ba4481b5 6072fi
6bae0ccf
DL
6073rm -f conftest.$ac_objext conftest.$ac_ext
6074fi
c0d27fcc 6075echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
98418dba
CW
6076echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
6077if test $ac_cv_member_struct_tm_tm_zone = yes; then
503d2be0 6078
c0d27fcc 6079cat >>confdefs.h <<_ACEOF
98418dba 6080#define HAVE_STRUCT_TM_TM_ZONE 1
c0d27fcc
MR
6081_ACEOF
6082
ba4481b5 6083
98418dba 6084fi
ba4481b5 6085
98418dba 6086if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
ba4481b5 6087
c0d27fcc 6088cat >>confdefs.h <<\_ACEOF
98418dba 6089#define HAVE_TM_ZONE 1
c0d27fcc 6090_ACEOF
ba4481b5 6091
ba4481b5 6092else
c0d27fcc 6093 echo "$as_me:$LINENO: checking for tzname" >&5
98418dba
CW
6094echo $ECHO_N "checking for tzname... $ECHO_C" >&6
6095if test "${ac_cv_var_tzname+set}" = set; then
503d2be0 6096 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6097else
98418dba 6098 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 6099#line $LINENO "configure"
cd958eb3
MB
6100/* confdefs.h. */
6101_ACEOF
6102cat confdefs.h >>conftest.$ac_ext
6103cat >>conftest.$ac_ext <<_ACEOF
6104/* end confdefs.h. */
98418dba
CW
6105#include <time.h>
6106#ifndef tzname /* For SGI. */
6107extern char *tzname[]; /* RS6000 and others reject char **tzname. */
6108#endif
6109
98418dba
CW
6110int
6111main ()
6112{
6113atoi(*tzname);
6114 ;
6115 return 0;
6116}
6117_ACEOF
6118rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 6119if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
6120 (eval $ac_link) 2>&5
6121 ac_status=$?
c0d27fcc 6122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
6123 (exit $ac_status); } &&
6124 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 6125 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
6126 (eval $ac_try) 2>&5
6127 ac_status=$?
c0d27fcc 6128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
6129 (exit $ac_status); }; }; then
6130 ac_cv_var_tzname=yes
6131else
6132 echo "$as_me: failed program was:" >&5
cd958eb3
MB
6133sed 's/^/| /' conftest.$ac_ext >&5
6134
98418dba 6135ac_cv_var_tzname=no
ba4481b5 6136fi
98418dba
CW
6137rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6138fi
c0d27fcc 6139echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
98418dba
CW
6140echo "${ECHO_T}$ac_cv_var_tzname" >&6
6141 if test $ac_cv_var_tzname = yes; then
ba4481b5 6142
c0d27fcc 6143cat >>confdefs.h <<\_ACEOF
98418dba 6144#define HAVE_TZNAME 1
c0d27fcc 6145_ACEOF
503d2be0 6146
98418dba
CW
6147 fi
6148fi
503d2be0 6149
c0d27fcc 6150echo "$as_me:$LINENO: checking for struct tm.tm_gmtoff" >&5
b936fae4
AS
6151echo $ECHO_N "checking for struct tm.tm_gmtoff... $ECHO_C" >&6
6152if test "${ac_cv_member_struct_tm_tm_gmtoff+set}" = set; then
98418dba
CW
6153 echo $ECHO_N "(cached) $ECHO_C" >&6
6154else
6155 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 6156#line $LINENO "configure"
cd958eb3
MB
6157/* confdefs.h. */
6158_ACEOF
6159cat confdefs.h >>conftest.$ac_ext
6160cat >>conftest.$ac_ext <<_ACEOF
6161/* end confdefs.h. */
98418dba 6162#include <time.h>
b936fae4 6163
98418dba
CW
6164int
6165main ()
6166{
b936fae4
AS
6167static struct tm ac_aggr;
6168if (ac_aggr.tm_gmtoff)
6169return 0;
98418dba
CW
6170 ;
6171 return 0;
6172}
6173_ACEOF
b936fae4 6174rm -f conftest.$ac_objext
c0d27fcc 6175if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
b936fae4 6176 (eval $ac_compile) 2>&5
98418dba 6177 ac_status=$?
c0d27fcc 6178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 6179 (exit $ac_status); } &&
b936fae4 6180 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6181 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
6182 (eval $ac_try) 2>&5
6183 ac_status=$?
c0d27fcc 6184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 6185 (exit $ac_status); }; }; then
b936fae4 6186 ac_cv_member_struct_tm_tm_gmtoff=yes
98418dba
CW
6187else
6188 echo "$as_me: failed program was:" >&5
cd958eb3
MB
6189sed 's/^/| /' conftest.$ac_ext >&5
6190
8799b3e4 6191cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 6192#line $LINENO "configure"
cd958eb3
MB
6193/* confdefs.h. */
6194_ACEOF
6195cat confdefs.h >>conftest.$ac_ext
6196cat >>conftest.$ac_ext <<_ACEOF
6197/* end confdefs.h. */
6bae0ccf
DL
6198#include <time.h>
6199
8799b3e4
CW
6200int
6201main ()
6202{
6bae0ccf
DL
6203static struct tm ac_aggr;
6204if (sizeof ac_aggr.tm_gmtoff)
6205return 0;
8799b3e4
CW
6206 ;
6207 return 0;
6208}
6209_ACEOF
6bae0ccf 6210rm -f conftest.$ac_objext
c0d27fcc 6211if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8799b3e4
CW
6212 (eval $ac_compile) 2>&5
6213 ac_status=$?
c0d27fcc 6214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8799b3e4
CW
6215 (exit $ac_status); } &&
6216 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6217 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8799b3e4
CW
6218 (eval $ac_try) 2>&5
6219 ac_status=$?
c0d27fcc 6220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8799b3e4 6221 (exit $ac_status); }; }; then
6bae0ccf 6222 ac_cv_member_struct_tm_tm_gmtoff=yes
8799b3e4
CW
6223else
6224 echo "$as_me: failed program was:" >&5
cd958eb3
MB
6225sed 's/^/| /' conftest.$ac_ext >&5
6226
6bae0ccf 6227ac_cv_member_struct_tm_tm_gmtoff=no
8799b3e4 6228fi
6bae0ccf
DL
6229rm -f conftest.$ac_objext conftest.$ac_ext
6230fi
6231rm -f conftest.$ac_objext conftest.$ac_ext
8799b3e4 6232fi
6bae0ccf
DL
6233echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_gmtoff" >&5
6234echo "${ECHO_T}$ac_cv_member_struct_tm_tm_gmtoff" >&6
6235if test $ac_cv_member_struct_tm_tm_gmtoff = yes; then
6236
6237cat >>confdefs.h <<\_ACEOF
6238#define HAVE_TM_GMTOFF 1
6239_ACEOF
6240
6241fi
6242
8799b3e4 6243
8799b3e4 6244
c0d27fcc 6245echo "$as_me:$LINENO: checking for function prototypes" >&5
98418dba
CW
6246echo $ECHO_N "checking for function prototypes... $ECHO_C" >&6
6247if test "$ac_cv_prog_cc_stdc" != no; then
c0d27fcc 6248 echo "$as_me:$LINENO: result: yes" >&5
98418dba
CW
6249echo "${ECHO_T}yes" >&6
6250
c0d27fcc 6251cat >>confdefs.h <<\_ACEOF
98418dba 6252#define PROTOTYPES 1
c0d27fcc
MR
6253_ACEOF
6254
6255
6256cat >>confdefs.h <<\_ACEOF
6257#define __PROTOTYPES 1
6258_ACEOF
98418dba
CW
6259
6260else
c0d27fcc 6261 echo "$as_me:$LINENO: result: no" >&5
98418dba
CW
6262echo "${ECHO_T}no" >&6
6263fi
6264
c0d27fcc 6265echo "$as_me:$LINENO: checking for working volatile" >&5
98418dba
CW
6266echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
6267if test "${ac_cv_c_volatile+set}" = set; then
6268 echo $ECHO_N "(cached) $ECHO_C" >&6
6269else
6270 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 6271#line $LINENO "configure"
cd958eb3
MB
6272/* confdefs.h. */
6273_ACEOF
6274cat confdefs.h >>conftest.$ac_ext
6275cat >>conftest.$ac_ext <<_ACEOF
6276/* end confdefs.h. */
98418dba 6277
98418dba
CW
6278int
6279main ()
6280{
6281
6282volatile int x;
6283int * volatile y;
6284 ;
6285 return 0;
6286}
6287_ACEOF
6288rm -f conftest.$ac_objext
c0d27fcc 6289if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
98418dba
CW
6290 (eval $ac_compile) 2>&5
6291 ac_status=$?
c0d27fcc 6292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
6293 (exit $ac_status); } &&
6294 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6295 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
6296 (eval $ac_try) 2>&5
6297 ac_status=$?
c0d27fcc 6298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
6299 (exit $ac_status); }; }; then
6300 ac_cv_c_volatile=yes
6301else
6302 echo "$as_me: failed program was:" >&5
cd958eb3
MB
6303sed 's/^/| /' conftest.$ac_ext >&5
6304
98418dba
CW
6305ac_cv_c_volatile=no
6306fi
6307rm -f conftest.$ac_objext conftest.$ac_ext
6308fi
c0d27fcc 6309echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5
98418dba
CW
6310echo "${ECHO_T}$ac_cv_c_volatile" >&6
6311if test $ac_cv_c_volatile = no; then
6312
c0d27fcc 6313cat >>confdefs.h <<\_ACEOF
98418dba 6314#define volatile
c0d27fcc 6315_ACEOF
98418dba
CW
6316
6317fi
6318
c0d27fcc 6319echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
98418dba
CW
6320echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
6321if test "${ac_cv_c_const+set}" = set; then
6322 echo $ECHO_N "(cached) $ECHO_C" >&6
6323else
6324 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 6325#line $LINENO "configure"
cd958eb3
MB
6326/* confdefs.h. */
6327_ACEOF
6328cat confdefs.h >>conftest.$ac_ext
6329cat >>conftest.$ac_ext <<_ACEOF
6330/* end confdefs.h. */
98418dba 6331
98418dba
CW
6332int
6333main ()
6334{
6335/* FIXME: Include the comments suggested by Paul. */
6336#ifndef __cplusplus
6337 /* Ultrix mips cc rejects this. */
6338 typedef int charset[2];
6339 const charset x;
6340 /* SunOS 4.1.1 cc rejects this. */
6341 char const *const *ccp;
6342 char **p;
6343 /* NEC SVR4.0.2 mips cc rejects this. */
6344 struct point {int x, y;};
6345 static struct point const zero = {0,0};
6346 /* AIX XL C 1.02.0.0 rejects this.
6347 It does not let you subtract one const X* pointer from another in
6348 an arm of an if-expression whose if-part is not a constant
6349 expression */
6350 const char *g = "string";
6351 ccp = &g + (g ? g-g : 0);
6352 /* HPUX 7.0 cc rejects these. */
6353 ++ccp;
6354 p = (char**) ccp;
6355 ccp = (char const *const *) p;
6356 { /* SCO 3.2v4 cc rejects this. */
6357 char *t;
6358 char const *s = 0 ? (char *) 0 : (char const *) 0;
6359
6360 *t++ = 0;
6361 }
6362 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
6363 int x[] = {25, 17};
6364 const int *foo = &x[0];
6365 ++foo;
6366 }
6367 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
6368 typedef const int *iptr;
6369 iptr p = 0;
6370 ++p;
6371 }
6372 { /* AIX XL C 1.02.0.0 rejects this saying
6373 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
6374 struct s { int j; const int *ap[3]; };
6375 struct s *b; b->j = 5;
6376 }
6377 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
6378 const int foo = 10;
6379 }
6380#endif
6381
6382 ;
6383 return 0;
6384}
6385_ACEOF
6386rm -f conftest.$ac_objext
c0d27fcc 6387if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
98418dba
CW
6388 (eval $ac_compile) 2>&5
6389 ac_status=$?
c0d27fcc 6390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
6391 (exit $ac_status); } &&
6392 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6393 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
6394 (eval $ac_try) 2>&5
6395 ac_status=$?
c0d27fcc 6396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
6397 (exit $ac_status); }; }; then
6398 ac_cv_c_const=yes
6399else
6400 echo "$as_me: failed program was:" >&5
cd958eb3
MB
6401sed 's/^/| /' conftest.$ac_ext >&5
6402
98418dba
CW
6403ac_cv_c_const=no
6404fi
6405rm -f conftest.$ac_objext conftest.$ac_ext
6406fi
c0d27fcc 6407echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
98418dba
CW
6408echo "${ECHO_T}$ac_cv_c_const" >&6
6409if test $ac_cv_c_const = no; then
6410
c0d27fcc 6411cat >>confdefs.h <<\_ACEOF
98418dba 6412#define const
c0d27fcc 6413_ACEOF
98418dba
CW
6414
6415fi
6416
c0d27fcc 6417echo "$as_me:$LINENO: checking for void * support" >&5
98418dba
CW
6418echo $ECHO_N "checking for void * support... $ECHO_C" >&6
6419if test "${emacs_cv_void_star+set}" = set; then
6420 echo $ECHO_N "(cached) $ECHO_C" >&6
6421else
6422 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 6423#line $LINENO "configure"
cd958eb3
MB
6424/* confdefs.h. */
6425_ACEOF
6426cat confdefs.h >>conftest.$ac_ext
6427cat >>conftest.$ac_ext <<_ACEOF
6428/* end confdefs.h. */
98418dba 6429
98418dba
CW
6430int
6431main ()
6432{
6433void * foo;
6434 ;
6435 return 0;
6436}
6437_ACEOF
6438rm -f conftest.$ac_objext
c0d27fcc 6439if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
98418dba
CW
6440 (eval $ac_compile) 2>&5
6441 ac_status=$?
c0d27fcc 6442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
6443 (exit $ac_status); } &&
6444 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6445 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
6446 (eval $ac_try) 2>&5
6447 ac_status=$?
c0d27fcc 6448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
6449 (exit $ac_status); }; }; then
6450 emacs_cv_void_star=yes
6451else
6452 echo "$as_me: failed program was:" >&5
cd958eb3
MB
6453sed 's/^/| /' conftest.$ac_ext >&5
6454
98418dba
CW
6455emacs_cv_void_star=no
6456fi
6457rm -f conftest.$ac_objext conftest.$ac_ext
6458fi
c0d27fcc 6459echo "$as_me:$LINENO: result: $emacs_cv_void_star" >&5
98418dba
CW
6460echo "${ECHO_T}$emacs_cv_void_star" >&6
6461if test $emacs_cv_void_star = yes; then
c0d27fcc 6462 cat >>confdefs.h <<\_ACEOF
98418dba 6463#define POINTER_TYPE void
c0d27fcc 6464_ACEOF
98418dba
CW
6465
6466else
c0d27fcc 6467 cat >>confdefs.h <<\_ACEOF
98418dba 6468#define POINTER_TYPE char
c0d27fcc 6469_ACEOF
98418dba
CW
6470
6471fi
6472
c0d27fcc 6473
cd958eb3
MB
6474
6475echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
6476echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
98418dba
CW
6477set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
6478if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
6479 echo $ECHO_N "(cached) $ECHO_C" >&6
6480else
c0d27fcc 6481 cat >conftest.make <<\_ACEOF
98418dba 6482all:
cd958eb3 6483 @echo 'ac_maketemp="$(MAKE)"'
c0d27fcc 6484_ACEOF
98418dba
CW
6485# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
6486eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
6487if test -n "$ac_maketemp"; then
6488 eval ac_cv_prog_make_${ac_make}_set=yes
6489else
6490 eval ac_cv_prog_make_${ac_make}_set=no
6491fi
6492rm -f conftest.make
6493fi
6494if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
c0d27fcc 6495 echo "$as_me:$LINENO: result: yes" >&5
98418dba
CW
6496echo "${ECHO_T}yes" >&6
6497 SET_MAKE=
6498else
c0d27fcc 6499 echo "$as_me:$LINENO: result: no" >&5
98418dba
CW
6500echo "${ECHO_T}no" >&6
6501 SET_MAKE="MAKE=${MAKE-make}"
6502fi
6503
c0d27fcc
MR
6504
6505echo "$as_me:$LINENO: checking for long file names" >&5
98418dba
CW
6506echo $ECHO_N "checking for long file names... $ECHO_C" >&6
6507if test "${ac_cv_sys_long_file_names+set}" = set; then
6508 echo $ECHO_N "(cached) $ECHO_C" >&6
6509else
6510 ac_cv_sys_long_file_names=yes
6511# Test for long file names in all the places we know might matter:
6512# . the current directory, where building will happen
6513# $prefix/lib where we will be installing things
6514# $exec_prefix/lib likewise
6515# eval it to expand exec_prefix.
6516# $TMPDIR if set, where it might want to write temporary files
6517# if $TMPDIR is not set:
6518# /tmp where it might want to write temporary files
6519# /var/tmp likewise
6520# /usr/tmp likewise
6521if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
6522 ac_tmpdirs=$TMPDIR
6523else
6524 ac_tmpdirs='/tmp /var/tmp /usr/tmp'
6525fi
6526for ac_dir in . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
6527 test -d $ac_dir || continue
6528 test -w $ac_dir || continue # It is less confusing to not echo anything here.
6529 ac_xdir=$ac_dir/cf$$
6530 (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
6531 ac_tf1=$ac_xdir/conftest9012345
6532 ac_tf2=$ac_xdir/conftest9012346
6533 (echo 1 >$ac_tf1) 2>/dev/null
6534 (echo 2 >$ac_tf2) 2>/dev/null
6535 ac_val=`cat $ac_tf1 2>/dev/null`
6536 if test ! -f $ac_tf1 || test "$ac_val" != 1; then
6537 ac_cv_sys_long_file_names=no
6538 rm -rf $ac_xdir 2>/dev/null
6539 break
6540 fi
6541 rm -rf $ac_xdir 2>/dev/null
6542done
6543fi
c0d27fcc 6544echo "$as_me:$LINENO: result: $ac_cv_sys_long_file_names" >&5
98418dba
CW
6545echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
6546if test $ac_cv_sys_long_file_names = yes; then
6547
c0d27fcc 6548cat >>confdefs.h <<\_ACEOF
98418dba 6549#define HAVE_LONG_FILE_NAMES 1
c0d27fcc 6550_ACEOF
98418dba
CW
6551
6552fi
6553
c0d27fcc 6554
98418dba
CW
6555#### Choose a window system.
6556
c0d27fcc 6557echo "$as_me:$LINENO: checking for X" >&5
98418dba
CW
6558echo $ECHO_N "checking for X... $ECHO_C" >&6
6559
c0d27fcc 6560
98418dba
CW
6561# Check whether --with-x or --without-x was given.
6562if test "${with_x+set}" = set; then
6563 withval="$with_x"
6564
6565fi;
6566# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
6567if test "x$with_x" = xno; then
6568 # The user explicitly disabled X.
6569 have_x=disabled
6570else
6571 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
6572 # Both variables are already set.
6573 have_x=yes
6574 else
6575 if test "${ac_cv_have_x+set}" = set; then
6576 echo $ECHO_N "(cached) $ECHO_C" >&6
6577else
6578 # One or both of the vars are not set, and there is no cached value.
6579ac_x_includes=no ac_x_libraries=no
6580rm -fr conftest.dir
6581if mkdir conftest.dir; then
6582 cd conftest.dir
6583 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
c0d27fcc 6584 cat >Imakefile <<'_ACEOF'
98418dba
CW
6585acfindx:
6586 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
c0d27fcc 6587_ACEOF
98418dba
CW
6588 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
6589 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
6590 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
6591 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
6592 for ac_extension in a so sl; do
6593 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
6594 test -f $ac_im_libdir/libX11.$ac_extension; then
6595 ac_im_usrlibdir=$ac_im_libdir; break
6596 fi
6597 done
6598 # Screen out bogus values from the imake configuration. They are
6599 # bogus both because they are the default anyway, and because
6600 # using them would break gcc on systems where it needs fixed includes.
6601 case $ac_im_incroot in
6602 /usr/include) ;;
6603 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
6604 esac
6605 case $ac_im_usrlibdir in
6606 /usr/lib | /lib) ;;
6607 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
6608 esac
6609 fi
6610 cd ..
6611 rm -fr conftest.dir
6612fi
6613
6614# Standard set of common directories for X headers.
6615# Check X11 before X11Rn because it is often a symlink to the current release.
6616ac_x_header_dirs='
6617/usr/X11/include
6618/usr/X11R6/include
6619/usr/X11R5/include
6620/usr/X11R4/include
6621
6622/usr/include/X11
6623/usr/include/X11R6
6624/usr/include/X11R5
6625/usr/include/X11R4
6626
6627/usr/local/X11/include
6628/usr/local/X11R6/include
6629/usr/local/X11R5/include
6630/usr/local/X11R4/include
6631
6632/usr/local/include/X11
6633/usr/local/include/X11R6
6634/usr/local/include/X11R5
6635/usr/local/include/X11R4
6636
6637/usr/X386/include
6638/usr/x386/include
6639/usr/XFree86/include/X11
6640
6641/usr/include
6642/usr/local/include
6643/usr/unsupported/include
6644/usr/athena/include
6645/usr/local/x11r5/include
6646/usr/lpp/Xamples/include
6647
6648/usr/openwin/include
6649/usr/openwin/share/include'
6650
6651if test "$ac_x_includes" = no; then
6652 # Guess where to find include files, by looking for Intrinsic.h.
6653 # First, try using that file with no special directory specified.
6654 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 6655#line $LINENO "configure"
cd958eb3
MB
6656/* confdefs.h. */
6657_ACEOF
6658cat confdefs.h >>conftest.$ac_ext
6659cat >>conftest.$ac_ext <<_ACEOF
6660/* end confdefs.h. */
98418dba
CW
6661#include <X11/Intrinsic.h>
6662_ACEOF
c0d27fcc 6663if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
6664 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6665 ac_status=$?
6bae0ccf 6666 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
6667 rm -f conftest.er1
6668 cat conftest.err >&5
c0d27fcc 6669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
6670 (exit $ac_status); } >/dev/null; then
6671 if test -s conftest.err; then
6672 ac_cpp_err=$ac_c_preproc_warn_flag
6673 else
6674 ac_cpp_err=
6675 fi
6676else
6677 ac_cpp_err=yes
6678fi
6679if test -z "$ac_cpp_err"; then
6680 # We can compile using X headers with no special include directory.
6681ac_x_includes=
6682else
6683 echo "$as_me: failed program was:" >&5
cd958eb3
MB
6684sed 's/^/| /' conftest.$ac_ext >&5
6685
98418dba
CW
6686 for ac_dir in $ac_x_header_dirs; do
6687 if test -r "$ac_dir/X11/Intrinsic.h"; then
6688 ac_x_includes=$ac_dir
6689 break
6690 fi
6691done
6692fi
6693rm -f conftest.err conftest.$ac_ext
6694fi # $ac_x_includes = no
6695
6696if test "$ac_x_libraries" = no; then
6697 # Check for the libraries.
6698 # See if we find them without any special options.
6699 # Don't add to $LIBS permanently.
6700 ac_save_LIBS=$LIBS
6701 LIBS="-lXt $LIBS"
6702 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 6703#line $LINENO "configure"
cd958eb3
MB
6704/* confdefs.h. */
6705_ACEOF
6706cat confdefs.h >>conftest.$ac_ext
6707cat >>conftest.$ac_ext <<_ACEOF
6708/* end confdefs.h. */
98418dba 6709#include <X11/Intrinsic.h>
98418dba
CW
6710int
6711main ()
6712{
6713XtMalloc (0)
6714 ;
6715 return 0;
6716}
6717_ACEOF
6718rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 6719if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
6720 (eval $ac_link) 2>&5
6721 ac_status=$?
c0d27fcc 6722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
6723 (exit $ac_status); } &&
6724 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 6725 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
6726 (eval $ac_try) 2>&5
6727 ac_status=$?
c0d27fcc 6728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
6729 (exit $ac_status); }; }; then
6730 LIBS=$ac_save_LIBS
6731# We can link X programs with no special library path.
6732ac_x_libraries=
6733else
6734 echo "$as_me: failed program was:" >&5
cd958eb3
MB
6735sed 's/^/| /' conftest.$ac_ext >&5
6736
98418dba
CW
6737LIBS=$ac_save_LIBS
6738for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
6739do
6740 # Don't even attempt the hair of trying to link an X program!
6741 for ac_extension in a so sl; do
6742 if test -r $ac_dir/libXt.$ac_extension; then
6743 ac_x_libraries=$ac_dir
6744 break 2
6745 fi
6746 done
6747done
6748fi
6749rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6750fi # $ac_x_libraries = no
6751
6752if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
6753 # Didn't find X anywhere. Cache the known absence of X.
6754 ac_cv_have_x="have_x=no"
6755else
6756 # Record where we found X for the cache.
6757 ac_cv_have_x="have_x=yes \
6758 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
6759fi
6760fi
6761
6762 fi
6763 eval "$ac_cv_have_x"
6764fi # $with_x != no
6765
6766if test "$have_x" != yes; then
c0d27fcc 6767 echo "$as_me:$LINENO: result: $have_x" >&5
98418dba
CW
6768echo "${ECHO_T}$have_x" >&6
6769 no_x=yes
6770else
6771 # If each of the values was on the command line, it overrides each guess.
6772 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
6773 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
6774 # Update the cache value to reflect the command line values.
6775 ac_cv_have_x="have_x=yes \
6776 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
c0d27fcc 6777 echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
98418dba
CW
6778echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
6779fi
6780
6781if test "$no_x" = yes; then
6782 window_system=none
6783else
6784 window_system=x11
6785fi
6786
6787if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
6788 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
6789 LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"`
6790 x_default_search_path=""
6791 for x_library in `echo ${x_libraries} | sed -e "s/:/ /g"`; do
6792 x_search_path="\
6793${x_library}/X11/%L/%T/%N%C%S:\
6794${x_library}/X11/%l/%T/%N%C%S:\
6795${x_library}/X11/%T/%N%C%S:\
6796${x_library}/X11/%L/%T/%N%S:\
6797${x_library}/X11/%l/%T/%N%S:\
6798${x_library}/X11/%T/%N%S"
6799 if test x"${x_default_search_path}" = x; then
6800 x_default_search_path=${x_search_path}
6801 else
6802 x_default_search_path="${x_search_path}:${x_default_search_path}"
6803 fi
6804 done
6805fi
6806if test "${x_includes}" != NONE && test -n "${x_includes}"; then
6807 C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"`
6808fi
6809
6810if test x"${x_includes}" = x; then
6811 bitmapdir=/usr/include/X11/bitmaps
6812else
6813 # accumulate include directories that have X11 bitmap subdirectories
6814 bmd_acc="dummyval"
6815 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
6816 if test -d "${bmd}/X11/bitmaps"; then
6817 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
6818 fi
6819 if test -d "${bmd}/bitmaps"; then
6820 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
6821 fi
6822 done
6823 if test ${bmd_acc} != "dummyval"; then
6824 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
6825 fi
6826fi
6827
6828case "${window_system}" in
6829 x11 )
6830 HAVE_X_WINDOWS=yes
6831 HAVE_X11=yes
6832 case "${with_x_toolkit}" in
6833 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
6834 motif ) USE_X_TOOLKIT=MOTIF ;;
488dd4c4
JD
6835 gtk ) with_gtk=yes
6836 USE_X_TOOLKIT=none ;;
98418dba
CW
6837 no ) USE_X_TOOLKIT=none ;;
6838 * ) USE_X_TOOLKIT=maybe ;;
6839 esac
6840 ;;
6841 none )
6842 HAVE_X_WINDOWS=no
6843 HAVE_X11=no
6844 USE_X_TOOLKIT=none
6845 ;;
6846esac
6847
6848### If we're using X11, we should use the X menu package.
6849HAVE_MENUS=no
6850case ${HAVE_X11} in
6851 yes ) HAVE_MENUS=yes ;;
6852esac
6853
6854if test "${opsys}" = "hpux9"; then
6855 case "${x_libraries}" in
6856 *X11R4* )
6857 opsysfile="s/hpux9-x11r4.h"
6858 ;;
6859 esac
6860fi
6861
6862if test "${opsys}" = "hpux9shr"; then
6863 case "${x_libraries}" in
6864 *X11R4* )
6865 opsysfile="s/hpux9shxr4.h"
6866 ;;
6867 esac
6868fi
6869
6870### Compute the unexec source name from the object name.
6871UNEXEC_SRC="`echo ${unexec} | sed 's/\.o/.c/'`"
6872
6873# Do the opsystem or machine files prohibit the use of the GNU malloc?
6874# Assume not, until told otherwise.
6875GNU_MALLOC=yes
6876doug_lea_malloc=yes
c0d27fcc 6877echo "$as_me:$LINENO: checking for malloc_get_state" >&5
98418dba
CW
6878echo $ECHO_N "checking for malloc_get_state... $ECHO_C" >&6
6879if test "${ac_cv_func_malloc_get_state+set}" = set; then
6880 echo $ECHO_N "(cached) $ECHO_C" >&6
6881else
6882 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 6883#line $LINENO "configure"
cd958eb3
MB
6884/* confdefs.h. */
6885_ACEOF
6886cat confdefs.h >>conftest.$ac_ext
6887cat >>conftest.$ac_ext <<_ACEOF
6888/* end confdefs.h. */
98418dba 6889/* System header to define __stub macros and hopefully few prototypes,
9e71690e
DK
6890 which can conflict with char malloc_get_state (); below.
6891 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6892 <limits.h> exists even on freestanding compilers. */
6893#ifdef __STDC__
6894# include <limits.h>
6895#else
6896# include <assert.h>
6897#endif
98418dba
CW
6898/* Override any gcc2 internal prototype to avoid an error. */
6899#ifdef __cplusplus
6900extern "C"
cd958eb3 6901{
98418dba
CW
6902#endif
6903/* We use char because int might match the return type of a gcc2
6904 builtin and then its argument prototype would still apply. */
6905char malloc_get_state ();
98418dba
CW
6906/* The GNU C library defines this for functions which it implements
6907 to always fail with ENOSYS. Some functions are actually named
6908 something starting with __ and the normal name is an alias. */
6909#if defined (__stub_malloc_get_state) || defined (__stub___malloc_get_state)
6910choke me
6911#else
cd958eb3
MB
6912char (*f) () = malloc_get_state;
6913#endif
6914#ifdef __cplusplus
6915}
98418dba
CW
6916#endif
6917
cd958eb3
MB
6918int
6919main ()
6920{
9e71690e 6921return f != malloc_get_state;
98418dba
CW
6922 ;
6923 return 0;
6924}
6925_ACEOF
6926rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 6927if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
6928 (eval $ac_link) 2>&5
6929 ac_status=$?
c0d27fcc 6930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
6931 (exit $ac_status); } &&
6932 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 6933 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
6934 (eval $ac_try) 2>&5
6935 ac_status=$?
c0d27fcc 6936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
6937 (exit $ac_status); }; }; then
6938 ac_cv_func_malloc_get_state=yes
6939else
6940 echo "$as_me: failed program was:" >&5
cd958eb3
MB
6941sed 's/^/| /' conftest.$ac_ext >&5
6942
98418dba
CW
6943ac_cv_func_malloc_get_state=no
6944fi
6945rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6946fi
c0d27fcc 6947echo "$as_me:$LINENO: result: $ac_cv_func_malloc_get_state" >&5
98418dba
CW
6948echo "${ECHO_T}$ac_cv_func_malloc_get_state" >&6
6949if test $ac_cv_func_malloc_get_state = yes; then
6950 :
6951else
6952 doug_lea_malloc=no
6953fi
6954
c0d27fcc 6955echo "$as_me:$LINENO: checking for malloc_set_state" >&5
98418dba
CW
6956echo $ECHO_N "checking for malloc_set_state... $ECHO_C" >&6
6957if test "${ac_cv_func_malloc_set_state+set}" = set; then
6958 echo $ECHO_N "(cached) $ECHO_C" >&6
6959else
6960 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 6961#line $LINENO "configure"
cd958eb3
MB
6962/* confdefs.h. */
6963_ACEOF
6964cat confdefs.h >>conftest.$ac_ext
6965cat >>conftest.$ac_ext <<_ACEOF
6966/* end confdefs.h. */
98418dba 6967/* System header to define __stub macros and hopefully few prototypes,
9e71690e
DK
6968 which can conflict with char malloc_set_state (); below.
6969 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6970 <limits.h> exists even on freestanding compilers. */
6971#ifdef __STDC__
6972# include <limits.h>
6973#else
6974# include <assert.h>
6975#endif
98418dba
CW
6976/* Override any gcc2 internal prototype to avoid an error. */
6977#ifdef __cplusplus
6978extern "C"
cd958eb3 6979{
98418dba
CW
6980#endif
6981/* We use char because int might match the return type of a gcc2
6982 builtin and then its argument prototype would still apply. */
6983char malloc_set_state ();
98418dba
CW
6984/* The GNU C library defines this for functions which it implements
6985 to always fail with ENOSYS. Some functions are actually named
6986 something starting with __ and the normal name is an alias. */
6987#if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
6988choke me
6989#else
cd958eb3
MB
6990char (*f) () = malloc_set_state;
6991#endif
6992#ifdef __cplusplus
6993}
98418dba
CW
6994#endif
6995
cd958eb3
MB
6996int
6997main ()
6998{
9e71690e 6999return f != malloc_set_state;
98418dba
CW
7000 ;
7001 return 0;
7002}
7003_ACEOF
7004rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 7005if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
7006 (eval $ac_link) 2>&5
7007 ac_status=$?
c0d27fcc 7008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7009 (exit $ac_status); } &&
7010 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 7011 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
7012 (eval $ac_try) 2>&5
7013 ac_status=$?
c0d27fcc 7014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7015 (exit $ac_status); }; }; then
7016 ac_cv_func_malloc_set_state=yes
7017else
7018 echo "$as_me: failed program was:" >&5
cd958eb3
MB
7019sed 's/^/| /' conftest.$ac_ext >&5
7020
98418dba
CW
7021ac_cv_func_malloc_set_state=no
7022fi
7023rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7024fi
c0d27fcc 7025echo "$as_me:$LINENO: result: $ac_cv_func_malloc_set_state" >&5
98418dba
CW
7026echo "${ECHO_T}$ac_cv_func_malloc_set_state" >&6
7027if test $ac_cv_func_malloc_set_state = yes; then
7028 :
7029else
7030 doug_lea_malloc=no
7031fi
7032
c0d27fcc 7033echo "$as_me:$LINENO: checking whether __after_morecore_hook exists" >&5
98418dba
CW
7034echo $ECHO_N "checking whether __after_morecore_hook exists... $ECHO_C" >&6
7035if test "${emacs_cv_var___after_morecore_hook+set}" = set; then
7036 echo $ECHO_N "(cached) $ECHO_C" >&6
7037else
7038 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 7039#line $LINENO "configure"
cd958eb3
MB
7040/* confdefs.h. */
7041_ACEOF
7042cat confdefs.h >>conftest.$ac_ext
7043cat >>conftest.$ac_ext <<_ACEOF
7044/* end confdefs.h. */
98418dba 7045extern void (* __after_morecore_hook)();
98418dba
CW
7046int
7047main ()
7048{
7049__after_morecore_hook = 0
7050 ;
7051 return 0;
7052}
7053_ACEOF
7054rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 7055if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
7056 (eval $ac_link) 2>&5
7057 ac_status=$?
c0d27fcc 7058 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7059 (exit $ac_status); } &&
7060 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 7061 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
7062 (eval $ac_try) 2>&5
7063 ac_status=$?
c0d27fcc 7064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7065 (exit $ac_status); }; }; then
7066 emacs_cv_var___after_morecore_hook=yes
7067else
7068 echo "$as_me: failed program was:" >&5
cd958eb3
MB
7069sed 's/^/| /' conftest.$ac_ext >&5
7070
98418dba
CW
7071emacs_cv_var___after_morecore_hook=no
7072fi
7073rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7074fi
c0d27fcc 7075echo "$as_me:$LINENO: result: $emacs_cv_var___after_morecore_hook" >&5
98418dba
CW
7076echo "${ECHO_T}$emacs_cv_var___after_morecore_hook" >&6
7077if test $emacs_cv_var___after_morecore_hook = no; then
7078 doug_lea_malloc=no
7079fi
7080if test "${system_malloc}" = "yes"; then
7081 GNU_MALLOC=no
7082 GNU_MALLOC_reason="
7083 (The GNU allocators don't work with this system configuration.)"
7084fi
7085if test "$doug_lea_malloc" = "yes" ; then
7086 if test "$GNU_MALLOC" = yes ; then
7087 GNU_MALLOC_reason="
7088 (Using Doug Lea's new malloc from the GNU C Library.)"
7089 fi
b936fae4 7090
c0d27fcc 7091cat >>confdefs.h <<\_ACEOF
98418dba 7092#define DOUG_LEA_MALLOC 1
c0d27fcc 7093_ACEOF
98418dba
CW
7094
7095fi
7096
7097if test x"${REL_ALLOC}" = x; then
7098 REL_ALLOC=${GNU_MALLOC}
7099fi
7100
7101
c0d27fcc
MR
7102
7103
7104for ac_header in stdlib.h unistd.h
98418dba
CW
7105do
7106as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
7107if eval "test \"\${$as_ac_Header+set}\" = set"; then
7108 echo "$as_me:$LINENO: checking for $ac_header" >&5
98418dba
CW
7109echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7110if eval "test \"\${$as_ac_Header+set}\" = set"; then
7111 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
7112fi
7113echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7114echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 7115else
c0d27fcc
MR
7116 # Is the header compilable?
7117echo "$as_me:$LINENO: checking $ac_header usability" >&5
7118echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
7119cat >conftest.$ac_ext <<_ACEOF
7120#line $LINENO "configure"
cd958eb3
MB
7121/* confdefs.h. */
7122_ACEOF
7123cat confdefs.h >>conftest.$ac_ext
7124cat >>conftest.$ac_ext <<_ACEOF
7125/* end confdefs.h. */
98418dba
CW
7126$ac_includes_default
7127#include <$ac_header>
7128_ACEOF
7129rm -f conftest.$ac_objext
c0d27fcc 7130if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
98418dba
CW
7131 (eval $ac_compile) 2>&5
7132 ac_status=$?
c0d27fcc 7133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7134 (exit $ac_status); } &&
7135 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 7136 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
7137 (eval $ac_try) 2>&5
7138 ac_status=$?
c0d27fcc 7139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 7140 (exit $ac_status); }; }; then
c0d27fcc 7141 ac_header_compiler=yes
98418dba
CW
7142else
7143 echo "$as_me: failed program was:" >&5
cd958eb3
MB
7144sed 's/^/| /' conftest.$ac_ext >&5
7145
c0d27fcc 7146ac_header_compiler=no
98418dba
CW
7147fi
7148rm -f conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
7149echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7150echo "${ECHO_T}$ac_header_compiler" >&6
98418dba 7151
c0d27fcc
MR
7152# Is the header present?
7153echo "$as_me:$LINENO: checking $ac_header presence" >&5
7154echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
7155cat >conftest.$ac_ext <<_ACEOF
7156#line $LINENO "configure"
cd958eb3
MB
7157/* confdefs.h. */
7158_ACEOF
7159cat confdefs.h >>conftest.$ac_ext
7160cat >>conftest.$ac_ext <<_ACEOF
7161/* end confdefs.h. */
98418dba
CW
7162#include <$ac_header>
7163_ACEOF
c0d27fcc 7164if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
7165 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7166 ac_status=$?
6bae0ccf 7167 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
7168 rm -f conftest.er1
7169 cat conftest.err >&5
c0d27fcc 7170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7171 (exit $ac_status); } >/dev/null; then
7172 if test -s conftest.err; then
7173 ac_cpp_err=$ac_c_preproc_warn_flag
7174 else
7175 ac_cpp_err=
7176 fi
7177else
7178 ac_cpp_err=yes
7179fi
7180if test -z "$ac_cpp_err"; then
c0d27fcc 7181 ac_header_preproc=yes
98418dba
CW
7182else
7183 echo "$as_me: failed program was:" >&5
cd958eb3
MB
7184sed 's/^/| /' conftest.$ac_ext >&5
7185
c0d27fcc 7186 ac_header_preproc=no
98418dba
CW
7187fi
7188rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
7189echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7190echo "${ECHO_T}$ac_header_preproc" >&6
7191
7192# So? What about this header?
7193case $ac_header_compiler:$ac_header_preproc in
7194 yes:no )
7195 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7196echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
7197 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
7198echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
7199 (
7200 cat <<\_ASBOX
7201## ------------------------------------ ##
7202## Report this to bug-autoconf@gnu.org. ##
7203## ------------------------------------ ##
7204_ASBOX
7205 ) |
7206 sed "s/^/$as_me: WARNING: /" >&2
7207 ;;
c0d27fcc
MR
7208 no:yes )
7209 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7210echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
7211 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
7212echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
7213 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
7214echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
7215 (
7216 cat <<\_ASBOX
7217## ------------------------------------ ##
7218## Report this to bug-autoconf@gnu.org. ##
7219## ------------------------------------ ##
7220_ASBOX
7221 ) |
7222 sed "s/^/$as_me: WARNING: /" >&2
7223 ;;
c0d27fcc
MR
7224esac
7225echo "$as_me:$LINENO: checking for $ac_header" >&5
7226echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7227if eval "test \"\${$as_ac_Header+set}\" = set"; then
7228 echo $ECHO_N "(cached) $ECHO_C" >&6
7229else
7230 eval "$as_ac_Header=$ac_header_preproc"
98418dba 7231fi
c0d27fcc 7232echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 7233echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
7234
7235fi
98418dba 7236if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 7237 cat >>confdefs.h <<_ACEOF
98418dba 7238#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 7239_ACEOF
98418dba
CW
7240
7241fi
c0d27fcc 7242
98418dba
CW
7243done
7244
c0d27fcc 7245
98418dba
CW
7246for ac_func in getpagesize
7247do
7248as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 7249echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
7250echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7251if eval "test \"\${$as_ac_var+set}\" = set"; then
7252 echo $ECHO_N "(cached) $ECHO_C" >&6
7253else
7254 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 7255#line $LINENO "configure"
cd958eb3
MB
7256/* confdefs.h. */
7257_ACEOF
7258cat confdefs.h >>conftest.$ac_ext
7259cat >>conftest.$ac_ext <<_ACEOF
7260/* end confdefs.h. */
98418dba 7261/* System header to define __stub macros and hopefully few prototypes,
9e71690e
DK
7262 which can conflict with char $ac_func (); below.
7263 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7264 <limits.h> exists even on freestanding compilers. */
7265#ifdef __STDC__
7266# include <limits.h>
7267#else
7268# include <assert.h>
7269#endif
98418dba
CW
7270/* Override any gcc2 internal prototype to avoid an error. */
7271#ifdef __cplusplus
7272extern "C"
cd958eb3 7273{
98418dba
CW
7274#endif
7275/* We use char because int might match the return type of a gcc2
7276 builtin and then its argument prototype would still apply. */
7277char $ac_func ();
98418dba
CW
7278/* The GNU C library defines this for functions which it implements
7279 to always fail with ENOSYS. Some functions are actually named
7280 something starting with __ and the normal name is an alias. */
7281#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7282choke me
7283#else
cd958eb3
MB
7284char (*f) () = $ac_func;
7285#endif
7286#ifdef __cplusplus
7287}
98418dba
CW
7288#endif
7289
cd958eb3
MB
7290int
7291main ()
7292{
9e71690e 7293return f != $ac_func;
98418dba
CW
7294 ;
7295 return 0;
7296}
7297_ACEOF
7298rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 7299if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
7300 (eval $ac_link) 2>&5
7301 ac_status=$?
c0d27fcc 7302 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7303 (exit $ac_status); } &&
7304 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 7305 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
7306 (eval $ac_try) 2>&5
7307 ac_status=$?
c0d27fcc 7308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7309 (exit $ac_status); }; }; then
7310 eval "$as_ac_var=yes"
7311else
7312 echo "$as_me: failed program was:" >&5
cd958eb3
MB
7313sed 's/^/| /' conftest.$ac_ext >&5
7314
98418dba
CW
7315eval "$as_ac_var=no"
7316fi
7317rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7318fi
c0d27fcc 7319echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
7320echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7321if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 7322 cat >>confdefs.h <<_ACEOF
98418dba 7323#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 7324_ACEOF
98418dba
CW
7325
7326fi
7327done
7328
c0d27fcc 7329echo "$as_me:$LINENO: checking for working mmap" >&5
98418dba
CW
7330echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
7331if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
7332 echo $ECHO_N "(cached) $ECHO_C" >&6
7333else
7334 if test "$cross_compiling" = yes; then
7335 ac_cv_func_mmap_fixed_mapped=no
7336else
7337 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 7338#line $LINENO "configure"
cd958eb3
MB
7339/* confdefs.h. */
7340_ACEOF
7341cat confdefs.h >>conftest.$ac_ext
7342cat >>conftest.$ac_ext <<_ACEOF
7343/* end confdefs.h. */
98418dba 7344$ac_includes_default
c0d27fcc
MR
7345/* malloc might have been renamed as rpl_malloc. */
7346#undef malloc
7347
98418dba
CW
7348/* Thanks to Mike Haertel and Jim Avera for this test.
7349 Here is a matrix of mmap possibilities:
7350 mmap private not fixed
7351 mmap private fixed at somewhere currently unmapped
7352 mmap private fixed at somewhere already mapped
7353 mmap shared not fixed
7354 mmap shared fixed at somewhere currently unmapped
7355 mmap shared fixed at somewhere already mapped
7356 For private mappings, we should verify that changes cannot be read()
7357 back from the file, nor mmap's back from the file at a different
7358 address. (There have been systems where private was not correctly
7359 implemented like the infamous i386 svr4.0, and systems where the
7360 VM page cache was not coherent with the file system buffer cache
7361 like early versions of FreeBSD and possibly contemporary NetBSD.)
7362 For shared mappings, we should conversely verify that changes get
c0d27fcc 7363 propagated back to all the places they're supposed to be.
98418dba
CW
7364
7365 Grep wants private fixed already mapped.
7366 The main things grep needs to know about mmap are:
7367 * does it exist and is it safe to write into the mmap'd area
7368 * how to use it (BSD variants) */
7369
7370#include <fcntl.h>
7371#include <sys/mman.h>
7372
7373#if !STDC_HEADERS && !HAVE_STDLIB_H
7374char *malloc ();
7375#endif
7376
7377/* This mess was copied from the GNU getpagesize.h. */
7378#if !HAVE_GETPAGESIZE
7379/* Assume that all systems that can run configure have sys/param.h. */
7380# if !HAVE_SYS_PARAM_H
7381# define HAVE_SYS_PARAM_H 1
7382# endif
7383
7384# ifdef _SC_PAGESIZE
7385# define getpagesize() sysconf(_SC_PAGESIZE)
7386# else /* no _SC_PAGESIZE */
7387# if HAVE_SYS_PARAM_H
7388# include <sys/param.h>
7389# ifdef EXEC_PAGESIZE
7390# define getpagesize() EXEC_PAGESIZE
7391# else /* no EXEC_PAGESIZE */
7392# ifdef NBPG
7393# define getpagesize() NBPG * CLSIZE
7394# ifndef CLSIZE
7395# define CLSIZE 1
7396# endif /* no CLSIZE */
7397# else /* no NBPG */
7398# ifdef NBPC
7399# define getpagesize() NBPC
7400# else /* no NBPC */
7401# ifdef PAGESIZE
7402# define getpagesize() PAGESIZE
7403# endif /* PAGESIZE */
7404# endif /* no NBPC */
7405# endif /* no NBPG */
7406# endif /* no EXEC_PAGESIZE */
7407# else /* no HAVE_SYS_PARAM_H */
7408# define getpagesize() 8192 /* punt totally */
7409# endif /* no HAVE_SYS_PARAM_H */
7410# endif /* no _SC_PAGESIZE */
7411
7412#endif /* no HAVE_GETPAGESIZE */
7413
7414int
7415main ()
7416{
7417 char *data, *data2, *data3;
7418 int i, pagesize;
7419 int fd;
7420
7421 pagesize = getpagesize ();
7422
7423 /* First, make a file with some known garbage in it. */
7424 data = (char *) malloc (pagesize);
7425 if (!data)
7426 exit (1);
7427 for (i = 0; i < pagesize; ++i)
7428 *(data + i) = rand ();
7429 umask (0);
7430 fd = creat ("conftest.mmap", 0600);
7431 if (fd < 0)
7432 exit (1);
7433 if (write (fd, data, pagesize) != pagesize)
7434 exit (1);
7435 close (fd);
7436
7437 /* Next, try to mmap the file at a fixed address which already has
7438 something else allocated at it. If we can, also make sure that
7439 we see the same garbage. */
7440 fd = open ("conftest.mmap", O_RDWR);
7441 if (fd < 0)
7442 exit (1);
7443 data2 = (char *) malloc (2 * pagesize);
7444 if (!data2)
7445 exit (1);
7446 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
7447 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
7448 MAP_PRIVATE | MAP_FIXED, fd, 0L))
7449 exit (1);
7450 for (i = 0; i < pagesize; ++i)
7451 if (*(data + i) != *(data2 + i))
7452 exit (1);
7453
7454 /* Finally, make sure that changes to the mapped area do not
7455 percolate back to the file as seen by read(). (This is a bug on
7456 some variants of i386 svr4.0.) */
7457 for (i = 0; i < pagesize; ++i)
7458 *(data2 + i) = *(data2 + i) + 1;
7459 data3 = (char *) malloc (pagesize);
7460 if (!data3)
7461 exit (1);
7462 if (read (fd, data3, pagesize) != pagesize)
7463 exit (1);
7464 for (i = 0; i < pagesize; ++i)
7465 if (*(data + i) != *(data3 + i))
7466 exit (1);
7467 close (fd);
7468 exit (0);
7469}
7470_ACEOF
7471rm -f conftest$ac_exeext
c0d27fcc 7472if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
7473 (eval $ac_link) 2>&5
7474 ac_status=$?
c0d27fcc 7475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 7476 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 7477 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
7478 (eval $ac_try) 2>&5
7479 ac_status=$?
c0d27fcc 7480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7481 (exit $ac_status); }; }; then
7482 ac_cv_func_mmap_fixed_mapped=yes
7483else
7484 echo "$as_me: program exited with status $ac_status" >&5
7485echo "$as_me: failed program was:" >&5
cd958eb3
MB
7486sed 's/^/| /' conftest.$ac_ext >&5
7487
c0d27fcc 7488( exit $ac_status )
98418dba
CW
7489ac_cv_func_mmap_fixed_mapped=no
7490fi
6bae0ccf 7491rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
98418dba
CW
7492fi
7493fi
c0d27fcc 7494echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
98418dba
CW
7495echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
7496if test $ac_cv_func_mmap_fixed_mapped = yes; then
7497
c0d27fcc 7498cat >>confdefs.h <<\_ACEOF
98418dba 7499#define HAVE_MMAP 1
c0d27fcc 7500_ACEOF
98418dba
CW
7501
7502fi
7503rm -f conftest.mmap
7504
7505if test $use_mmap_for_buffers = yes; then
7506 REL_ALLOC=no
7507fi
7508
7509LIBS="$libsrc_libs $LIBS"
7510
c0d27fcc
MR
7511
7512echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
98418dba
CW
7513echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
7514if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
7515 echo $ECHO_N "(cached) $ECHO_C" >&6
7516else
7517 ac_check_lib_save_LIBS=$LIBS
7518LIBS="-ldnet $LIBS"
7519cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 7520#line $LINENO "configure"
cd958eb3
MB
7521/* confdefs.h. */
7522_ACEOF
7523cat confdefs.h >>conftest.$ac_ext
7524cat >>conftest.$ac_ext <<_ACEOF
7525/* end confdefs.h. */
98418dba
CW
7526
7527/* Override any gcc2 internal prototype to avoid an error. */
7528#ifdef __cplusplus
7529extern "C"
7530#endif
7531/* We use char because int might match the return type of a gcc2
7532 builtin and then its argument prototype would still apply. */
7533char dnet_ntoa ();
98418dba
CW
7534int
7535main ()
7536{
7537dnet_ntoa ();
7538 ;
7539 return 0;
7540}
7541_ACEOF
7542rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 7543if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
7544 (eval $ac_link) 2>&5
7545 ac_status=$?
c0d27fcc 7546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7547 (exit $ac_status); } &&
7548 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 7549 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
7550 (eval $ac_try) 2>&5
7551 ac_status=$?
c0d27fcc 7552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7553 (exit $ac_status); }; }; then
7554 ac_cv_lib_dnet_dnet_ntoa=yes
7555else
7556 echo "$as_me: failed program was:" >&5
cd958eb3
MB
7557sed 's/^/| /' conftest.$ac_ext >&5
7558
98418dba
CW
7559ac_cv_lib_dnet_dnet_ntoa=no
7560fi
7561rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7562LIBS=$ac_check_lib_save_LIBS
7563fi
c0d27fcc 7564echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
98418dba
CW
7565echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
7566if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
c0d27fcc 7567 cat >>confdefs.h <<_ACEOF
98418dba 7568#define HAVE_LIBDNET 1
c0d27fcc 7569_ACEOF
98418dba
CW
7570
7571 LIBS="-ldnet $LIBS"
7572
7573fi
7574
c0d27fcc
MR
7575
7576echo "$as_me:$LINENO: checking for main in -lXbsd" >&5
98418dba
CW
7577echo $ECHO_N "checking for main in -lXbsd... $ECHO_C" >&6
7578if test "${ac_cv_lib_Xbsd_main+set}" = set; then
7579 echo $ECHO_N "(cached) $ECHO_C" >&6
7580else
7581 ac_check_lib_save_LIBS=$LIBS
7582LIBS="-lXbsd $LIBS"
7583cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 7584#line $LINENO "configure"
cd958eb3
MB
7585/* confdefs.h. */
7586_ACEOF
7587cat confdefs.h >>conftest.$ac_ext
7588cat >>conftest.$ac_ext <<_ACEOF
7589/* end confdefs.h. */
98418dba 7590
c0d27fcc 7591
98418dba
CW
7592int
7593main ()
7594{
7595main ();
7596 ;
7597 return 0;
7598}
7599_ACEOF
7600rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 7601if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
7602 (eval $ac_link) 2>&5
7603 ac_status=$?
c0d27fcc 7604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7605 (exit $ac_status); } &&
7606 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 7607 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
7608 (eval $ac_try) 2>&5
7609 ac_status=$?
c0d27fcc 7610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7611 (exit $ac_status); }; }; then
7612 ac_cv_lib_Xbsd_main=yes
7613else
7614 echo "$as_me: failed program was:" >&5
cd958eb3
MB
7615sed 's/^/| /' conftest.$ac_ext >&5
7616
98418dba
CW
7617ac_cv_lib_Xbsd_main=no
7618fi
7619rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7620LIBS=$ac_check_lib_save_LIBS
7621fi
c0d27fcc 7622echo "$as_me:$LINENO: result: $ac_cv_lib_Xbsd_main" >&5
98418dba
CW
7623echo "${ECHO_T}$ac_cv_lib_Xbsd_main" >&6
7624if test $ac_cv_lib_Xbsd_main = yes; then
7625 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
7626fi
7627
c0d27fcc
MR
7628
7629
7630echo "$as_me:$LINENO: checking for cma_open in -lpthreads" >&5
98418dba
CW
7631echo $ECHO_N "checking for cma_open in -lpthreads... $ECHO_C" >&6
7632if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then
7633 echo $ECHO_N "(cached) $ECHO_C" >&6
7634else
7635 ac_check_lib_save_LIBS=$LIBS
7636LIBS="-lpthreads $LIBS"
7637cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 7638#line $LINENO "configure"
cd958eb3
MB
7639/* confdefs.h. */
7640_ACEOF
7641cat confdefs.h >>conftest.$ac_ext
7642cat >>conftest.$ac_ext <<_ACEOF
7643/* end confdefs.h. */
98418dba
CW
7644
7645/* Override any gcc2 internal prototype to avoid an error. */
7646#ifdef __cplusplus
7647extern "C"
7648#endif
7649/* We use char because int might match the return type of a gcc2
7650 builtin and then its argument prototype would still apply. */
7651char cma_open ();
98418dba
CW
7652int
7653main ()
7654{
7655cma_open ();
7656 ;
7657 return 0;
7658}
7659_ACEOF
7660rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 7661if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
7662 (eval $ac_link) 2>&5
7663 ac_status=$?
c0d27fcc 7664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7665 (exit $ac_status); } &&
7666 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 7667 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
7668 (eval $ac_try) 2>&5
7669 ac_status=$?
c0d27fcc 7670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7671 (exit $ac_status); }; }; then
7672 ac_cv_lib_pthreads_cma_open=yes
7673else
7674 echo "$as_me: failed program was:" >&5
cd958eb3
MB
7675sed 's/^/| /' conftest.$ac_ext >&5
7676
98418dba
CW
7677ac_cv_lib_pthreads_cma_open=no
7678fi
7679rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7680LIBS=$ac_check_lib_save_LIBS
7681fi
c0d27fcc 7682echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_cma_open" >&5
98418dba
CW
7683echo "${ECHO_T}$ac_cv_lib_pthreads_cma_open" >&6
7684if test $ac_cv_lib_pthreads_cma_open = yes; then
c0d27fcc 7685 cat >>confdefs.h <<_ACEOF
98418dba 7686#define HAVE_LIBPTHREADS 1
c0d27fcc 7687_ACEOF
98418dba
CW
7688
7689 LIBS="-lpthreads $LIBS"
7690
7691fi
7692
c0d27fcc
MR
7693
7694echo "$as_me:$LINENO: checking for XFree86 in /usr/X386" >&5
98418dba
CW
7695echo $ECHO_N "checking for XFree86 in /usr/X386... $ECHO_C" >&6
7696if test -d /usr/X386/include; then
7697 HAVE_XFREE386=yes
7698 : ${C_SWITCH_X_SITE="-I/usr/X386/include"}
7699else
7700 HAVE_XFREE386=no
7701fi
c0d27fcc 7702echo "$as_me:$LINENO: result: $HAVE_XFREE386" >&5
98418dba
CW
7703echo "${ECHO_T}$HAVE_XFREE386" >&6
7704
ae1a998c
RS
7705# Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets
7706# used for the tests that follow. We set them back to REAL_CFLAGS and
7707# REAL_CPPFLAGS later on.
98418dba
CW
7708
7709REAL_CPPFLAGS="$CPPFLAGS"
7710
7711if test "${HAVE_X11}" = "yes"; then
7712 DEFS="$C_SWITCH_X_SITE $DEFS"
7713 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
7714 LIBS="$LIBX $LIBS"
7715 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
7716 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
7717
7718 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
7719 # This is handled by LD_SWITCH_X_SITE_AUX during the real build,
7720 # but it's more convenient here to set LD_RUN_PATH
7721 # since this also works on hosts that don't understand LD_SWITCH_X_SITE_AUX.
7722 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
7723 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
7724 export LD_RUN_PATH
7725 fi
7726
7727 if test "${opsys}" = "gnu-linux"; then
c0d27fcc 7728 echo "$as_me:$LINENO: checking whether X on GNU/Linux needs -b to link" >&5
98418dba
CW
7729echo $ECHO_N "checking whether X on GNU/Linux needs -b to link... $ECHO_C" >&6
7730 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 7731#line $LINENO "configure"
cd958eb3
MB
7732/* confdefs.h. */
7733_ACEOF
7734cat confdefs.h >>conftest.$ac_ext
7735cat >>conftest.$ac_ext <<_ACEOF
7736/* end confdefs.h. */
98418dba 7737
98418dba
CW
7738int
7739main ()
7740{
7741XOpenDisplay ("foo");
7742 ;
7743 return 0;
7744}
7745_ACEOF
7746rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 7747if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
7748 (eval $ac_link) 2>&5
7749 ac_status=$?
c0d27fcc 7750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7751 (exit $ac_status); } &&
7752 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 7753 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
7754 (eval $ac_try) 2>&5
7755 ac_status=$?
c0d27fcc 7756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7757 (exit $ac_status); }; }; then
7758 xlinux_first_failure=no
7759else
7760 echo "$as_me: failed program was:" >&5
cd958eb3
MB
7761sed 's/^/| /' conftest.$ac_ext >&5
7762
98418dba
CW
7763xlinux_first_failure=yes
7764fi
7765rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7766 if test "${xlinux_first_failure}" = "yes"; then
7767 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
7768 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
7769 OLD_CPPFLAGS="$CPPFLAGS"
7770 OLD_LIBS="$LIBS"
7771 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
7772 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
7773 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
7774 LIBS="$LIBS -b i486-linuxaout"
7775 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 7776#line $LINENO "configure"
cd958eb3
MB
7777/* confdefs.h. */
7778_ACEOF
7779cat confdefs.h >>conftest.$ac_ext
7780cat >>conftest.$ac_ext <<_ACEOF
7781/* end confdefs.h. */
98418dba 7782
98418dba
CW
7783int
7784main ()
7785{
7786XOpenDisplay ("foo");
7787 ;
7788 return 0;
7789}
7790_ACEOF
7791rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 7792if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
7793 (eval $ac_link) 2>&5
7794 ac_status=$?
c0d27fcc 7795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7796 (exit $ac_status); } &&
7797 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 7798 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
7799 (eval $ac_try) 2>&5
7800 ac_status=$?
c0d27fcc 7801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7802 (exit $ac_status); }; }; then
7803 xlinux_second_failure=no
7804else
7805 echo "$as_me: failed program was:" >&5
cd958eb3
MB
7806sed 's/^/| /' conftest.$ac_ext >&5
7807
98418dba
CW
7808xlinux_second_failure=yes
7809fi
7810rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7811 if test "${xlinux_second_failure}" = "yes"; then
7812 # If we get the same failure with -b, there is no use adding -b.
7813 # So take it out. This plays safe.
7814 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
7815 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
7816 CPPFLAGS="$OLD_CPPFLAGS"
7817 LIBS="$OLD_LIBS"
c0d27fcc 7818 echo "$as_me:$LINENO: result: no" >&5
98418dba
CW
7819echo "${ECHO_T}no" >&6
7820 else
c0d27fcc 7821 echo "$as_me:$LINENO: result: yes" >&5
98418dba
CW
7822echo "${ECHO_T}yes" >&6
7823 fi
7824 else
c0d27fcc 7825 echo "$as_me:$LINENO: result: no" >&5
98418dba
CW
7826echo "${ECHO_T}no" >&6
7827 fi
7828 fi
7829
7830 # Reportedly, some broken Solaris systems have XKBlib.h but are missing
7831 # header files included from there.
c0d27fcc 7832 echo "$as_me:$LINENO: checking for Xkb" >&5
98418dba
CW
7833echo $ECHO_N "checking for Xkb... $ECHO_C" >&6
7834 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 7835#line $LINENO "configure"
cd958eb3
MB
7836/* confdefs.h. */
7837_ACEOF
7838cat confdefs.h >>conftest.$ac_ext
7839cat >>conftest.$ac_ext <<_ACEOF
7840/* end confdefs.h. */
98418dba
CW
7841#include <X11/Xlib.h>
7842#include <X11/XKBlib.h>
98418dba
CW
7843int
7844main ()
7845{
7846XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);
7847 ;
7848 return 0;
7849}
7850_ACEOF
7851rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 7852if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
7853 (eval $ac_link) 2>&5
7854 ac_status=$?
c0d27fcc 7855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7856 (exit $ac_status); } &&
7857 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 7858 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
7859 (eval $ac_try) 2>&5
7860 ac_status=$?
c0d27fcc 7861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7862 (exit $ac_status); }; }; then
7863 emacs_xkb=yes
7864else
7865 echo "$as_me: failed program was:" >&5
cd958eb3
MB
7866sed 's/^/| /' conftest.$ac_ext >&5
7867
98418dba
CW
7868emacs_xkb=no
7869fi
7870rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
c0d27fcc 7871 echo "$as_me:$LINENO: result: $emacs_xkb" >&5
98418dba
CW
7872echo "${ECHO_T}$emacs_xkb" >&6
7873 if test $emacs_xkb = yes; then
b936fae4 7874
c0d27fcc 7875cat >>confdefs.h <<\_ACEOF
98418dba 7876#define HAVE_XKBGETKEYBOARD 1
c0d27fcc 7877_ACEOF
98418dba
CW
7878
7879 fi
7880
c0d27fcc
MR
7881
7882
7883
7884
98418dba
CW
7885for ac_func in XrmSetDatabase XScreenResourceString \
7886XScreenNumberOfScreen XSetWMProtocols
7887do
7888as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 7889echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
7890echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7891if eval "test \"\${$as_ac_var+set}\" = set"; then
7892 echo $ECHO_N "(cached) $ECHO_C" >&6
7893else
7894 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 7895#line $LINENO "configure"
cd958eb3
MB
7896/* confdefs.h. */
7897_ACEOF
7898cat confdefs.h >>conftest.$ac_ext
7899cat >>conftest.$ac_ext <<_ACEOF
7900/* end confdefs.h. */
98418dba 7901/* System header to define __stub macros and hopefully few prototypes,
9e71690e
DK
7902 which can conflict with char $ac_func (); below.
7903 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7904 <limits.h> exists even on freestanding compilers. */
7905#ifdef __STDC__
7906# include <limits.h>
7907#else
7908# include <assert.h>
7909#endif
98418dba
CW
7910/* Override any gcc2 internal prototype to avoid an error. */
7911#ifdef __cplusplus
7912extern "C"
cd958eb3 7913{
98418dba
CW
7914#endif
7915/* We use char because int might match the return type of a gcc2
7916 builtin and then its argument prototype would still apply. */
7917char $ac_func ();
98418dba
CW
7918/* The GNU C library defines this for functions which it implements
7919 to always fail with ENOSYS. Some functions are actually named
7920 something starting with __ and the normal name is an alias. */
7921#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7922choke me
7923#else
cd958eb3
MB
7924char (*f) () = $ac_func;
7925#endif
7926#ifdef __cplusplus
7927}
98418dba
CW
7928#endif
7929
cd958eb3
MB
7930int
7931main ()
7932{
9e71690e 7933return f != $ac_func;
98418dba
CW
7934 ;
7935 return 0;
7936}
7937_ACEOF
7938rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 7939if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
7940 (eval $ac_link) 2>&5
7941 ac_status=$?
c0d27fcc 7942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7943 (exit $ac_status); } &&
7944 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 7945 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
7946 (eval $ac_try) 2>&5
7947 ac_status=$?
c0d27fcc 7948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7949 (exit $ac_status); }; }; then
7950 eval "$as_ac_var=yes"
7951else
7952 echo "$as_me: failed program was:" >&5
cd958eb3
MB
7953sed 's/^/| /' conftest.$ac_ext >&5
7954
98418dba
CW
7955eval "$as_ac_var=no"
7956fi
7957rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7958fi
c0d27fcc 7959echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
7960echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7961if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 7962 cat >>confdefs.h <<_ACEOF
98418dba 7963#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 7964_ACEOF
98418dba
CW
7965
7966fi
7967done
7968
7969fi
7970
7971if test "${window_system}" = "x11"; then
c0d27fcc 7972 echo "$as_me:$LINENO: checking X11 version 6" >&5
98418dba
CW
7973echo $ECHO_N "checking X11 version 6... $ECHO_C" >&6
7974 if test "${emacs_cv_x11_version_6+set}" = set; then
7975 echo $ECHO_N "(cached) $ECHO_C" >&6
7976else
7977 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 7978#line $LINENO "configure"
cd958eb3
MB
7979/* confdefs.h. */
7980_ACEOF
7981cat confdefs.h >>conftest.$ac_ext
7982cat >>conftest.$ac_ext <<_ACEOF
7983/* end confdefs.h. */
98418dba 7984#include <X11/Xlib.h>
98418dba
CW
7985int
7986main ()
7987{
7988#if XlibSpecificationRelease < 6
7989fail;
7990#endif
7991
7992 ;
7993 return 0;
7994}
7995_ACEOF
7996rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 7997if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
7998 (eval $ac_link) 2>&5
7999 ac_status=$?
c0d27fcc 8000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8001 (exit $ac_status); } &&
8002 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8003 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8004 (eval $ac_try) 2>&5
8005 ac_status=$?
c0d27fcc 8006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8007 (exit $ac_status); }; }; then
8008 emacs_cv_x11_version_6=yes
8009else
8010 echo "$as_me: failed program was:" >&5
cd958eb3
MB
8011sed 's/^/| /' conftest.$ac_ext >&5
8012
98418dba
CW
8013emacs_cv_x11_version_6=no
8014fi
8015rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8016fi
8017
8018 if test $emacs_cv_x11_version_6 = yes; then
c0d27fcc 8019 echo "$as_me:$LINENO: result: 6 or newer" >&5
98418dba 8020echo "${ECHO_T}6 or newer" >&6
b936fae4 8021
c0d27fcc 8022cat >>confdefs.h <<\_ACEOF
98418dba 8023#define HAVE_X11R6 1
c0d27fcc 8024_ACEOF
98418dba
CW
8025
8026 else
c0d27fcc 8027 echo "$as_me:$LINENO: result: before 6" >&5
98418dba
CW
8028echo "${ECHO_T}before 6" >&6
8029 fi
8030fi
8031
8032if test "${window_system}" = "x11"; then
c0d27fcc 8033 echo "$as_me:$LINENO: checking X11 version 5" >&5
98418dba
CW
8034echo $ECHO_N "checking X11 version 5... $ECHO_C" >&6
8035 if test "${emacs_cv_x11_version_5+set}" = set; then
8036 echo $ECHO_N "(cached) $ECHO_C" >&6
8037else
8038 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 8039#line $LINENO "configure"
cd958eb3
MB
8040/* confdefs.h. */
8041_ACEOF
8042cat confdefs.h >>conftest.$ac_ext
8043cat >>conftest.$ac_ext <<_ACEOF
8044/* end confdefs.h. */
98418dba 8045#include <X11/Xlib.h>
98418dba
CW
8046int
8047main ()
8048{
8049#if XlibSpecificationRelease < 5
8050fail;
8051#endif
8052
8053 ;
8054 return 0;
8055}
8056_ACEOF
8057rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8058if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
8059 (eval $ac_link) 2>&5
8060 ac_status=$?
c0d27fcc 8061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8062 (exit $ac_status); } &&
8063 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8064 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8065 (eval $ac_try) 2>&5
8066 ac_status=$?
c0d27fcc 8067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8068 (exit $ac_status); }; }; then
8069 emacs_cv_x11_version_5=yes
8070else
8071 echo "$as_me: failed program was:" >&5
cd958eb3
MB
8072sed 's/^/| /' conftest.$ac_ext >&5
8073
98418dba
CW
8074emacs_cv_x11_version_5=no
8075fi
8076rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8077fi
8078
8079 if test $emacs_cv_x11_version_5 = yes; then
c0d27fcc 8080 echo "$as_me:$LINENO: result: 5 or newer" >&5
98418dba
CW
8081echo "${ECHO_T}5 or newer" >&6
8082 HAVE_X11R5=yes
b936fae4 8083
c0d27fcc 8084cat >>confdefs.h <<\_ACEOF
98418dba 8085#define HAVE_X11R5 1
c0d27fcc 8086_ACEOF
98418dba
CW
8087
8088 else
8089 HAVE_X11R5=no
c0d27fcc 8090 echo "$as_me:$LINENO: result: before 5" >&5
98418dba
CW
8091echo "${ECHO_T}before 5" >&6
8092 fi
8093fi
8094
488dd4c4
JD
8095
8096
8097HAVE_GTK=no
8098if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "gtk"; then
cd890796 8099 if test "$USE_X_TOOLKIT" != "none" && test "$USE_X_TOOLKIT" != "maybe"; then
488dd4c4
JD
8100 { { echo "$as_me:$LINENO: error: Conflicting options, --with-gtk is incompatible with --with-x-toolkit=${with_x_toolkit}" >&5
8101echo "$as_me: error: Conflicting options, --with-gtk is incompatible with --with-x-toolkit=${with_x_toolkit}" >&2;}
8102 { (exit 1); exit 1; }; };
8103 fi
8104 GLIB_REQUIRED=2.0.1
8105 GTK_REQUIRED=2.0.1
8106 GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
8107
8108 if test "X${with_pkg_config_prog}" != X; then
8109 PKG_CONFIG="${with_pkg_config_prog}"
8110 fi
8111
8112 succeeded=no
8113
8114 if test -z "$PKG_CONFIG"; then
8115 # Extract the first word of "pkg-config", so it can be a program name with args.
8116set dummy pkg-config; ac_word=$2
8117echo "$as_me:$LINENO: checking for $ac_word" >&5
8118echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8119if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
8120 echo $ECHO_N "(cached) $ECHO_C" >&6
8121else
8122 case $PKG_CONFIG in
8123 [\\/]* | ?:[\\/]*)
8124 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8125 ;;
8126 *)
8127 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8128for as_dir in $PATH
8129do
8130 IFS=$as_save_IFS
8131 test -z "$as_dir" && as_dir=.
8132 for ac_exec_ext in '' $ac_executable_extensions; do
8133 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8134 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8135 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8136 break 2
8137 fi
8138done
8139done
8140
8141 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
8142 ;;
8143esac
8144fi
8145PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8146
8147if test -n "$PKG_CONFIG"; then
8148 echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
8149echo "${ECHO_T}$PKG_CONFIG" >&6
8150else
8151 echo "$as_me:$LINENO: result: no" >&5
8152echo "${ECHO_T}no" >&6
8153fi
8154
8155 fi
8156
8157 if test "$PKG_CONFIG" = "no" ; then
8158 echo "*** The pkg-config script could not be found. Make sure it is"
8159 echo "*** in your path, or give the full path to pkg-config with"
8160 echo "*** the PKG_CONFIG environment variable or --with-pkg-config-prog."
8161 echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
8162 else
8163 PKG_CONFIG_MIN_VERSION=0.9.0
8164 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
8165 echo "$as_me:$LINENO: checking for $GTK_MODULES" >&5
8166echo $ECHO_N "checking for $GTK_MODULES... $ECHO_C" >&6
8167
8168 if $PKG_CONFIG --exists "$GTK_MODULES" ; then
8169 echo "$as_me:$LINENO: result: yes" >&5
8170echo "${ECHO_T}yes" >&6
8171 succeeded=yes
8172
8173 echo "$as_me:$LINENO: checking GTK_CFLAGS" >&5
8174echo $ECHO_N "checking GTK_CFLAGS... $ECHO_C" >&6
8175 GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES"`
8176 echo "$as_me:$LINENO: result: $GTK_CFLAGS" >&5
8177echo "${ECHO_T}$GTK_CFLAGS" >&6
8178
8179 echo "$as_me:$LINENO: checking GTK_LIBS" >&5
8180echo $ECHO_N "checking GTK_LIBS... $ECHO_C" >&6
8181 GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES"`
8182 echo "$as_me:$LINENO: result: $GTK_LIBS" >&5
8183echo "${ECHO_T}$GTK_LIBS" >&6
8184 else
8185 GTK_CFLAGS=""
8186 GTK_LIBS=""
8187 ## If we have a custom action on failure, don't print errors, but
8188 ## do set a variable so people can do so.
8189 GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"`
8190 echo $GTK_PKG_ERRORS
8191 fi
8192
8193
8194
8195 else
8196 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
8197 echo "*** See http://www.freedesktop.org/software/pkgconfig"
8198 fi
8199 fi
8200
8201 if test $succeeded = yes; then
8202 :
8203 else
8204 { { echo "$as_me:$LINENO: error: Library requirements ($GTK_MODULES) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5
8205echo "$as_me: error: Library requirements ($GTK_MODULES) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;}
8206 { (exit 1); exit 1; }; }
8207 fi
8208
8209
8210
8211 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS"
8212 HAVE_GTK=yes
8213
8214cat >>confdefs.h <<\_ACEOF
8215#define HAVE_GTK 1
8216_ACEOF
8217
8218 USE_X_TOOLKIT=none
8219
8220 with_toolkit_scroll_bars=yes
8221fi
8222
98418dba
CW
8223if test x"${USE_X_TOOLKIT}" = xmaybe; then
8224 if test x"${HAVE_X11R5}" = xyes; then
c0d27fcc 8225 echo "$as_me:$LINENO: checking X11 version 5 with Xaw" >&5
98418dba
CW
8226echo $ECHO_N "checking X11 version 5 with Xaw... $ECHO_C" >&6
8227 if test "${emacs_cv_x11_version_5_with_xaw+set}" = set; then
8228 echo $ECHO_N "(cached) $ECHO_C" >&6
8229else
8230 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 8231#line $LINENO "configure"
cd958eb3
MB
8232/* confdefs.h. */
8233_ACEOF
8234cat confdefs.h >>conftest.$ac_ext
8235cat >>conftest.$ac_ext <<_ACEOF
8236/* end confdefs.h. */
98418dba
CW
8237
8238#include <X11/Intrinsic.h>
8239#include <X11/Xaw/Simple.h>
98418dba
CW
8240int
8241main ()
8242{
8243
8244 ;
8245 return 0;
8246}
8247_ACEOF
8248rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8249if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
8250 (eval $ac_link) 2>&5
8251 ac_status=$?
c0d27fcc 8252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8253 (exit $ac_status); } &&
8254 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8255 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8256 (eval $ac_try) 2>&5
8257 ac_status=$?
c0d27fcc 8258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8259 (exit $ac_status); }; }; then
8260 emacs_cv_x11_version_5_with_xaw=yes
8261else
8262 echo "$as_me: failed program was:" >&5
cd958eb3
MB
8263sed 's/^/| /' conftest.$ac_ext >&5
8264
98418dba
CW
8265emacs_cv_x11_version_5_with_xaw=no
8266fi
8267rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8268fi
8269
8270 if test $emacs_cv_x11_version_5_with_xaw = yes; then
c0d27fcc 8271 echo "$as_me:$LINENO: result: 5 or newer, with Xaw; use toolkit by default" >&5
98418dba
CW
8272echo "${ECHO_T}5 or newer, with Xaw; use toolkit by default" >&6
8273 USE_X_TOOLKIT=LUCID
8274 else
c0d27fcc 8275 echo "$as_me:$LINENO: result: before 5 or no Xaw; do not use toolkit by default" >&5
98418dba
CW
8276echo "${ECHO_T}before 5 or no Xaw; do not use toolkit by default" >&6
8277 USE_X_TOOLKIT=none
8278 fi
8279 else
8280 USE_X_TOOLKIT=none
8281 fi
8282fi
8283
8284X_TOOLKIT_TYPE=$USE_X_TOOLKIT
8285
8286if test "${USE_X_TOOLKIT}" != "none"; then
c0d27fcc 8287 echo "$as_me:$LINENO: checking X11 toolkit version" >&5
98418dba
CW
8288echo $ECHO_N "checking X11 toolkit version... $ECHO_C" >&6
8289 if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then
8290 echo $ECHO_N "(cached) $ECHO_C" >&6
8291else
8292 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 8293#line $LINENO "configure"
cd958eb3
MB
8294/* confdefs.h. */
8295_ACEOF
8296cat confdefs.h >>conftest.$ac_ext
8297cat >>conftest.$ac_ext <<_ACEOF
8298/* end confdefs.h. */
98418dba 8299#include <X11/Intrinsic.h>
98418dba
CW
8300int
8301main ()
8302{
8303#if XtSpecificationRelease < 6
8304fail;
8305#endif
8306
8307 ;
8308 return 0;
8309}
8310_ACEOF
8311rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8312if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
8313 (eval $ac_link) 2>&5
8314 ac_status=$?
c0d27fcc 8315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8316 (exit $ac_status); } &&
8317 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8318 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8319 (eval $ac_try) 2>&5
8320 ac_status=$?
c0d27fcc 8321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8322 (exit $ac_status); }; }; then
8323 emacs_cv_x11_toolkit_version_6=yes
8324else
8325 echo "$as_me: failed program was:" >&5
cd958eb3
MB
8326sed 's/^/| /' conftest.$ac_ext >&5
8327
98418dba
CW
8328emacs_cv_x11_toolkit_version_6=no
8329fi
8330rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8331fi
8332
8333 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
8334 if test $emacs_cv_x11_toolkit_version_6 = yes; then
c0d27fcc 8335 echo "$as_me:$LINENO: result: 6 or newer" >&5
98418dba 8336echo "${ECHO_T}6 or newer" >&6
b936fae4 8337
c0d27fcc 8338cat >>confdefs.h <<\_ACEOF
98418dba 8339#define HAVE_X11XTR6 1
c0d27fcc 8340_ACEOF
98418dba
CW
8341
8342 else
c0d27fcc 8343 echo "$as_me:$LINENO: result: before 6" >&5
98418dba
CW
8344echo "${ECHO_T}before 6" >&6
8345 fi
8346
8347 OLDLIBS="$LIBS"
8348 if test x$HAVE_X11XTR6 = xyes; then
8349 LIBS="-lXt -lSM -lICE $LIBS"
8350 else
8351 LIBS="-lXt $LIBS"
8352 fi
8353
c0d27fcc 8354echo "$as_me:$LINENO: checking for XmuConvertStandardSelection in -lXmu" >&5
98418dba
CW
8355echo $ECHO_N "checking for XmuConvertStandardSelection in -lXmu... $ECHO_C" >&6
8356if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then
8357 echo $ECHO_N "(cached) $ECHO_C" >&6
8358else
8359 ac_check_lib_save_LIBS=$LIBS
8360LIBS="-lXmu $LIBS"
8361cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 8362#line $LINENO "configure"
cd958eb3
MB
8363/* confdefs.h. */
8364_ACEOF
8365cat confdefs.h >>conftest.$ac_ext
8366cat >>conftest.$ac_ext <<_ACEOF
8367/* end confdefs.h. */
98418dba
CW
8368
8369/* Override any gcc2 internal prototype to avoid an error. */
8370#ifdef __cplusplus
8371extern "C"
8372#endif
8373/* We use char because int might match the return type of a gcc2
8374 builtin and then its argument prototype would still apply. */
8375char XmuConvertStandardSelection ();
98418dba
CW
8376int
8377main ()
8378{
8379XmuConvertStandardSelection ();
8380 ;
8381 return 0;
8382}
8383_ACEOF
8384rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8385if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
8386 (eval $ac_link) 2>&5
8387 ac_status=$?
c0d27fcc 8388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8389 (exit $ac_status); } &&
8390 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8391 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8392 (eval $ac_try) 2>&5
8393 ac_status=$?
c0d27fcc 8394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8395 (exit $ac_status); }; }; then
8396 ac_cv_lib_Xmu_XmuConvertStandardSelection=yes
8397else
8398 echo "$as_me: failed program was:" >&5
cd958eb3
MB
8399sed 's/^/| /' conftest.$ac_ext >&5
8400
98418dba
CW
8401ac_cv_lib_Xmu_XmuConvertStandardSelection=no
8402fi
8403rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8404LIBS=$ac_check_lib_save_LIBS
8405fi
c0d27fcc 8406echo "$as_me:$LINENO: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5
98418dba
CW
8407echo "${ECHO_T}$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6
8408if test $ac_cv_lib_Xmu_XmuConvertStandardSelection = yes; then
c0d27fcc 8409 cat >>confdefs.h <<_ACEOF
98418dba 8410#define HAVE_LIBXMU 1
c0d27fcc 8411_ACEOF
98418dba
CW
8412
8413 LIBS="-lXmu $LIBS"
8414
8415fi
8416
8417 test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
8418fi
8419
8420# On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D.
8421if test "${HAVE_X11}" = "yes"; then
8422 if test "${USE_X_TOOLKIT}" != "none"; then
8423
c0d27fcc 8424echo "$as_me:$LINENO: checking for XShapeQueryExtension in -lXext" >&5
98418dba
CW
8425echo $ECHO_N "checking for XShapeQueryExtension in -lXext... $ECHO_C" >&6
8426if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then
8427 echo $ECHO_N "(cached) $ECHO_C" >&6
8428else
8429 ac_check_lib_save_LIBS=$LIBS
8430LIBS="-lXext $LIBS"
8431cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 8432#line $LINENO "configure"
cd958eb3
MB
8433/* confdefs.h. */
8434_ACEOF
8435cat confdefs.h >>conftest.$ac_ext
8436cat >>conftest.$ac_ext <<_ACEOF
8437/* end confdefs.h. */
98418dba
CW
8438
8439/* Override any gcc2 internal prototype to avoid an error. */
8440#ifdef __cplusplus
8441extern "C"
8442#endif
8443/* We use char because int might match the return type of a gcc2
8444 builtin and then its argument prototype would still apply. */
8445char XShapeQueryExtension ();
98418dba
CW
8446int
8447main ()
8448{
8449XShapeQueryExtension ();
8450 ;
8451 return 0;
8452}
8453_ACEOF
8454rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8455if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
8456 (eval $ac_link) 2>&5
8457 ac_status=$?
c0d27fcc 8458 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8459 (exit $ac_status); } &&
8460 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8461 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8462 (eval $ac_try) 2>&5
8463 ac_status=$?
c0d27fcc 8464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8465 (exit $ac_status); }; }; then
8466 ac_cv_lib_Xext_XShapeQueryExtension=yes
8467else
8468 echo "$as_me: failed program was:" >&5
cd958eb3
MB
8469sed 's/^/| /' conftest.$ac_ext >&5
8470
98418dba
CW
8471ac_cv_lib_Xext_XShapeQueryExtension=no
8472fi
8473rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8474LIBS=$ac_check_lib_save_LIBS
8475fi
c0d27fcc 8476echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
98418dba
CW
8477echo "${ECHO_T}$ac_cv_lib_Xext_XShapeQueryExtension" >&6
8478if test $ac_cv_lib_Xext_XShapeQueryExtension = yes; then
c0d27fcc 8479 cat >>confdefs.h <<_ACEOF
98418dba 8480#define HAVE_LIBXEXT 1
c0d27fcc 8481_ACEOF
98418dba
CW
8482
8483 LIBS="-lXext $LIBS"
8484
8485fi
8486
8487 fi
8488fi
8489
8490if test "${USE_X_TOOLKIT}" = "MOTIF"; then
c0d27fcc 8491 echo "$as_me:$LINENO: checking for LessTif where some systems put it" >&5
8e967cf7
MR
8492echo $ECHO_N "checking for LessTif where some systems put it... $ECHO_C" >&6
8493if test "${emacs_cv_lesstif+set}" = set; then
8494 echo $ECHO_N "(cached) $ECHO_C" >&6
8495else
ae1a998c
RS
8496 # We put this in CFLAGS temporarily to precede other -I options
8497 # that might be in CFLAGS temporarily.
8498 # We put this in CPPFLAGS where it precedes the other -I options.
8499 OLD_CPPFLAGS=$CPPFLAGS
8500 OLD_CFLAGS=$CFLAGS
8501 CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS"
8502 CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS"
8e967cf7 8503 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 8504#line $LINENO "configure"
cd958eb3
MB
8505/* confdefs.h. */
8506_ACEOF
8507cat confdefs.h >>conftest.$ac_ext
8508cat >>conftest.$ac_ext <<_ACEOF
8509/* end confdefs.h. */
8e967cf7
MR
8510#include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h>
8511int
8512main ()
8513{
8514int x = 5;
8515 ;
8516 return 0;
8517}
8518_ACEOF
8519rm -f conftest.$ac_objext
c0d27fcc 8520if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8e967cf7
MR
8521 (eval $ac_compile) 2>&5
8522 ac_status=$?
c0d27fcc 8523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8e967cf7
MR
8524 (exit $ac_status); } &&
8525 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 8526 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8e967cf7
MR
8527 (eval $ac_try) 2>&5
8528 ac_status=$?
c0d27fcc 8529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8e967cf7
MR
8530 (exit $ac_status); }; }; then
8531 emacs_cv_lesstif=yes
8532else
8533 echo "$as_me: failed program was:" >&5
cd958eb3
MB
8534sed 's/^/| /' conftest.$ac_ext >&5
8535
8e967cf7
MR
8536emacs_cv_lesstif=no
8537fi
8538rm -f conftest.$ac_objext conftest.$ac_ext
8539fi
c0d27fcc 8540echo "$as_me:$LINENO: result: $emacs_cv_lesstif" >&5
8e967cf7
MR
8541echo "${ECHO_T}$emacs_cv_lesstif" >&6
8542 if test $emacs_cv_lesstif = yes; then
ae1a998c
RS
8543 # Make sure this -I option remains in CPPFLAGS after it is set
8544 # back to REAL_CPPFLAGS.
8545 # There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not
8546 # have those other -I options anyway. Ultimately, having this
8547 # directory ultimately in CPPFLAGS will be enough.
8548 REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS"
8e967cf7 8549 LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS"
ae1a998c
RS
8550 else
8551 CFLAGS=$OLD_CFLAGS
8552 CPPFLAGS=$OLD_CPPFLAGS
8e967cf7 8553 fi
c0d27fcc 8554 echo "$as_me:$LINENO: checking for Motif version 2.1" >&5
98418dba
CW
8555echo $ECHO_N "checking for Motif version 2.1... $ECHO_C" >&6
8556if test "${emacs_cv_motif_version_2_1+set}" = set; then
8557 echo $ECHO_N "(cached) $ECHO_C" >&6
8558else
8559 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 8560#line $LINENO "configure"
cd958eb3
MB
8561/* confdefs.h. */
8562_ACEOF
8563cat confdefs.h >>conftest.$ac_ext
8564cat >>conftest.$ac_ext <<_ACEOF
8565/* end confdefs.h. */
98418dba 8566#include <Xm/Xm.h>
98418dba
CW
8567int
8568main ()
8569{
8570#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
8571int x = 5;
8572#else
8573Motif version prior to 2.1.
8574#endif
8575 ;
8576 return 0;
8577}
8578_ACEOF
8579rm -f conftest.$ac_objext
c0d27fcc 8580if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
98418dba
CW
8581 (eval $ac_compile) 2>&5
8582 ac_status=$?
c0d27fcc 8583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8584 (exit $ac_status); } &&
8585 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 8586 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8587 (eval $ac_try) 2>&5
8588 ac_status=$?
c0d27fcc 8589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8590 (exit $ac_status); }; }; then
8591 emacs_cv_motif_version_2_1=yes
8592else
8593 echo "$as_me: failed program was:" >&5
cd958eb3
MB
8594sed 's/^/| /' conftest.$ac_ext >&5
8595
98418dba
CW
8596emacs_cv_motif_version_2_1=no
8597fi
8598rm -f conftest.$ac_objext conftest.$ac_ext
8599fi
c0d27fcc 8600echo "$as_me:$LINENO: result: $emacs_cv_motif_version_2_1" >&5
98418dba
CW
8601echo "${ECHO_T}$emacs_cv_motif_version_2_1" >&6
8602 HAVE_MOTIF_2_1=$emacs_cv_motif_version_2_1
8603 if test $emacs_cv_motif_version_2_1 = yes; then
8604 HAVE_LIBXP=no
b936fae4 8605
c0d27fcc 8606cat >>confdefs.h <<\_ACEOF
98418dba 8607#define HAVE_MOTIF_2_1 1
c0d27fcc 8608_ACEOF
98418dba 8609
c0d27fcc 8610 echo "$as_me:$LINENO: checking for XpCreateContext in -lXp" >&5
98418dba
CW
8611echo $ECHO_N "checking for XpCreateContext in -lXp... $ECHO_C" >&6
8612if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then
8613 echo $ECHO_N "(cached) $ECHO_C" >&6
8614else
8615 ac_check_lib_save_LIBS=$LIBS
8616LIBS="-lXp $LIBS"
8617cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 8618#line $LINENO "configure"
cd958eb3
MB
8619/* confdefs.h. */
8620_ACEOF
8621cat confdefs.h >>conftest.$ac_ext
8622cat >>conftest.$ac_ext <<_ACEOF
8623/* end confdefs.h. */
98418dba
CW
8624
8625/* Override any gcc2 internal prototype to avoid an error. */
8626#ifdef __cplusplus
8627extern "C"
8628#endif
8629/* We use char because int might match the return type of a gcc2
8630 builtin and then its argument prototype would still apply. */
8631char XpCreateContext ();
98418dba
CW
8632int
8633main ()
8634{
8635XpCreateContext ();
8636 ;
8637 return 0;
8638}
8639_ACEOF
8640rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8641if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
8642 (eval $ac_link) 2>&5
8643 ac_status=$?
c0d27fcc 8644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8645 (exit $ac_status); } &&
8646 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8647 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8648 (eval $ac_try) 2>&5
8649 ac_status=$?
c0d27fcc 8650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8651 (exit $ac_status); }; }; then
8652 ac_cv_lib_Xp_XpCreateContext=yes
8653else
8654 echo "$as_me: failed program was:" >&5
cd958eb3
MB
8655sed 's/^/| /' conftest.$ac_ext >&5
8656
98418dba
CW
8657ac_cv_lib_Xp_XpCreateContext=no
8658fi
8659rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8660LIBS=$ac_check_lib_save_LIBS
8661fi
c0d27fcc 8662echo "$as_me:$LINENO: result: $ac_cv_lib_Xp_XpCreateContext" >&5
98418dba
CW
8663echo "${ECHO_T}$ac_cv_lib_Xp_XpCreateContext" >&6
8664if test $ac_cv_lib_Xp_XpCreateContext = yes; then
8665 HAVE_LIBXP=yes
8666fi
503d2be0 8667
98418dba 8668 if test ${HAVE_LIBXP} = yes; then
b936fae4 8669
c0d27fcc 8670cat >>confdefs.h <<\_ACEOF
98418dba 8671#define HAVE_LIBXP 1
c0d27fcc 8672_ACEOF
503d2be0 8673
98418dba
CW
8674 fi
8675 fi
8676fi
8677
8678### Is -lXaw3d available?
8679HAVE_XAW3D=no
8680if test "${HAVE_X11}" = "yes"; then
8681 if test "${USE_X_TOOLKIT}" != "none"; then
22044edf 8682 echo "$as_me:$LINENO: checking for X11/Xaw3d/Scrollbar.h" >&5
98418dba
CW
8683echo $ECHO_N "checking for X11/Xaw3d/Scrollbar.h... $ECHO_C" >&6
8684if test "${ac_cv_header_X11_Xaw3d_Scrollbar_h+set}" = set; then
8685 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba 8686else
22044edf 8687 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 8688#line $LINENO "configure"
cd958eb3
MB
8689/* confdefs.h. */
8690_ACEOF
8691cat confdefs.h >>conftest.$ac_ext
8692cat >>conftest.$ac_ext <<_ACEOF
8693/* end confdefs.h. */
98418dba 8694#include <X11/Xaw3d/Scrollbar.h>
503d2be0 8695_ACEOF
c0d27fcc 8696if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
8697 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8698 ac_status=$?
6bae0ccf 8699 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
8700 rm -f conftest.er1
8701 cat conftest.err >&5
c0d27fcc 8702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
8703 (exit $ac_status); } >/dev/null; then
8704 if test -s conftest.err; then
8705 ac_cpp_err=$ac_c_preproc_warn_flag
8706 else
8707 ac_cpp_err=
8708 fi
8709else
8710 ac_cpp_err=yes
8711fi
8712if test -z "$ac_cpp_err"; then
22044edf 8713 ac_cv_header_X11_Xaw3d_Scrollbar_h=yes
ba4481b5 8714else
503d2be0 8715 echo "$as_me: failed program was:" >&5
cd958eb3
MB
8716sed 's/^/| /' conftest.$ac_ext >&5
8717
22044edf 8718 ac_cv_header_X11_Xaw3d_Scrollbar_h=no
ba4481b5 8719fi
503d2be0 8720rm -f conftest.err conftest.$ac_ext
98418dba 8721fi
c0d27fcc 8722echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xaw3d_Scrollbar_h" >&5
98418dba 8723echo "${ECHO_T}$ac_cv_header_X11_Xaw3d_Scrollbar_h" >&6
98418dba 8724if test $ac_cv_header_X11_Xaw3d_Scrollbar_h = yes; then
c0d27fcc 8725 echo "$as_me:$LINENO: checking for XawScrollbarSetThumb in -lXaw3d" >&5
98418dba
CW
8726echo $ECHO_N "checking for XawScrollbarSetThumb in -lXaw3d... $ECHO_C" >&6
8727if test "${ac_cv_lib_Xaw3d_XawScrollbarSetThumb+set}" = set; then
8728 echo $ECHO_N "(cached) $ECHO_C" >&6
8729else
8730 ac_check_lib_save_LIBS=$LIBS
8731LIBS="-lXaw3d $LIBS"
8732cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 8733#line $LINENO "configure"
cd958eb3
MB
8734/* confdefs.h. */
8735_ACEOF
8736cat confdefs.h >>conftest.$ac_ext
8737cat >>conftest.$ac_ext <<_ACEOF
8738/* end confdefs.h. */
98418dba
CW
8739
8740/* Override any gcc2 internal prototype to avoid an error. */
8741#ifdef __cplusplus
8742extern "C"
8743#endif
8744/* We use char because int might match the return type of a gcc2
8745 builtin and then its argument prototype would still apply. */
8746char XawScrollbarSetThumb ();
503d2be0
AS
8747int
8748main ()
8749{
98418dba 8750XawScrollbarSetThumb ();
503d2be0
AS
8751 ;
8752 return 0;
8753}
8754_ACEOF
8755rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8756if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
8757 (eval $ac_link) 2>&5
8758 ac_status=$?
c0d27fcc 8759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
8760 (exit $ac_status); } &&
8761 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8762 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
8763 (eval $ac_try) 2>&5
8764 ac_status=$?
c0d27fcc 8765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 8766 (exit $ac_status); }; }; then
98418dba 8767 ac_cv_lib_Xaw3d_XawScrollbarSetThumb=yes
ba4481b5 8768else
503d2be0 8769 echo "$as_me: failed program was:" >&5
cd958eb3
MB
8770sed 's/^/| /' conftest.$ac_ext >&5
8771
98418dba 8772ac_cv_lib_Xaw3d_XawScrollbarSetThumb=no
ba4481b5 8773fi
503d2be0 8774rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
98418dba 8775LIBS=$ac_check_lib_save_LIBS
ba4481b5 8776fi
c0d27fcc 8777echo "$as_me:$LINENO: result: $ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&5
98418dba
CW
8778echo "${ECHO_T}$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&6
8779if test $ac_cv_lib_Xaw3d_XawScrollbarSetThumb = yes; then
8780 HAVE_XAW3D=yes
ba4481b5 8781fi
503d2be0 8782
ba4481b5
DL
8783fi
8784
c0d27fcc 8785
98418dba 8786 if test "${HAVE_XAW3D}" = "yes"; then
b936fae4 8787
c0d27fcc 8788cat >>confdefs.h <<\_ACEOF
98418dba 8789#define HAVE_XAW3D 1
c0d27fcc 8790_ACEOF
98418dba 8791
ba4481b5 8792 fi
98418dba 8793 fi
ba4481b5
DL
8794fi
8795
c0d27fcc
MR
8796
8797
98418dba
CW
8798USE_TOOLKIT_SCROLL_BARS=no
8799if test "${with_toolkit_scroll_bars}" != "no"; then
8800 if test "${USE_X_TOOLKIT}" != "none"; then
8801 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
c0d27fcc 8802 cat >>confdefs.h <<\_ACEOF
98418dba 8803#define USE_TOOLKIT_SCROLL_BARS 1
c0d27fcc 8804_ACEOF
98418dba
CW
8805
8806 HAVE_XAW3D=no
8807 USE_TOOLKIT_SCROLL_BARS=yes
8808 elif test "${HAVE_XAW3D}" = "yes"; then
c0d27fcc 8809 cat >>confdefs.h <<\_ACEOF
98418dba 8810#define USE_TOOLKIT_SCROLL_BARS 1
c0d27fcc 8811_ACEOF
98418dba
CW
8812
8813 USE_TOOLKIT_SCROLL_BARS=yes
ba4481b5 8814 fi
488dd4c4
JD
8815 elif test "${HAVE_GTK}" = "yes"; then
8816 cat >>confdefs.h <<\_ACEOF
8817#define USE_TOOLKIT_SCROLL_BARS 1
8818_ACEOF
8819
8820 USE_TOOLKIT_SCROLL_BARS=yes
ba4481b5
DL
8821 fi
8822fi
8823
c0d27fcc 8824
98418dba 8825if test "${with_xim}" != "no"; then
b936fae4 8826
c0d27fcc 8827cat >>confdefs.h <<\_ACEOF
98418dba 8828#define USE_XIM 1
c0d27fcc 8829_ACEOF
98418dba
CW
8830
8831fi
8832
8833### Use -lXpm if available, unless `--with-xpm=no'.
8834HAVE_XPM=no
8835if test "${HAVE_X11}" = "yes"; then
8836 if test "${with_xpm}" != "no"; then
c0d27fcc
MR
8837 if test "${ac_cv_header_X11_xpm_h+set}" = set; then
8838 echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
98418dba
CW
8839echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6
8840if test "${ac_cv_header_X11_xpm_h+set}" = set; then
8841 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
8842fi
8843echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
8844echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6
98418dba 8845else
c0d27fcc
MR
8846 # Is the header compilable?
8847echo "$as_me:$LINENO: checking X11/xpm.h usability" >&5
8848echo $ECHO_N "checking X11/xpm.h usability... $ECHO_C" >&6
8849cat >conftest.$ac_ext <<_ACEOF
8850#line $LINENO "configure"
cd958eb3
MB
8851/* confdefs.h. */
8852_ACEOF
8853cat confdefs.h >>conftest.$ac_ext
8854cat >>conftest.$ac_ext <<_ACEOF
8855/* end confdefs.h. */
c0d27fcc
MR
8856$ac_includes_default
8857#include <X11/xpm.h>
8858_ACEOF
8859rm -f conftest.$ac_objext
8860if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8861 (eval $ac_compile) 2>&5
8862 ac_status=$?
8863 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8864 (exit $ac_status); } &&
8865 { ac_try='test -s conftest.$ac_objext'
8866 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8867 (eval $ac_try) 2>&5
8868 ac_status=$?
8869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8870 (exit $ac_status); }; }; then
8871 ac_header_compiler=yes
8872else
8873 echo "$as_me: failed program was:" >&5
cd958eb3
MB
8874sed 's/^/| /' conftest.$ac_ext >&5
8875
c0d27fcc
MR
8876ac_header_compiler=no
8877fi
8878rm -f conftest.$ac_objext conftest.$ac_ext
8879echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8880echo "${ECHO_T}$ac_header_compiler" >&6
8881
8882# Is the header present?
8883echo "$as_me:$LINENO: checking X11/xpm.h presence" >&5
8884echo $ECHO_N "checking X11/xpm.h presence... $ECHO_C" >&6
8885cat >conftest.$ac_ext <<_ACEOF
8886#line $LINENO "configure"
cd958eb3
MB
8887/* confdefs.h. */
8888_ACEOF
8889cat confdefs.h >>conftest.$ac_ext
8890cat >>conftest.$ac_ext <<_ACEOF
8891/* end confdefs.h. */
98418dba
CW
8892#include <X11/xpm.h>
8893_ACEOF
c0d27fcc 8894if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
8895 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8896 ac_status=$?
6bae0ccf 8897 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
8898 rm -f conftest.er1
8899 cat conftest.err >&5
c0d27fcc 8900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8901 (exit $ac_status); } >/dev/null; then
8902 if test -s conftest.err; then
8903 ac_cpp_err=$ac_c_preproc_warn_flag
8904 else
8905 ac_cpp_err=
8906 fi
8907else
8908 ac_cpp_err=yes
8909fi
8910if test -z "$ac_cpp_err"; then
c0d27fcc 8911 ac_header_preproc=yes
98418dba
CW
8912else
8913 echo "$as_me: failed program was:" >&5
cd958eb3
MB
8914sed 's/^/| /' conftest.$ac_ext >&5
8915
c0d27fcc 8916 ac_header_preproc=no
98418dba
CW
8917fi
8918rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
8919echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8920echo "${ECHO_T}$ac_header_preproc" >&6
8921
8922# So? What about this header?
8923case $ac_header_compiler:$ac_header_preproc in
8924 yes:no )
8925 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: accepted by the compiler, rejected by the preprocessor!" >&5
8926echo "$as_me: WARNING: X11/xpm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
8927 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&5
cd958eb3
MB
8928echo "$as_me: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&2;}
8929 (
8930 cat <<\_ASBOX
8931## ------------------------------------ ##
8932## Report this to bug-autoconf@gnu.org. ##
8933## ------------------------------------ ##
8934_ASBOX
8935 ) |
8936 sed "s/^/$as_me: WARNING: /" >&2
8937 ;;
c0d27fcc
MR
8938 no:yes )
8939 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: present but cannot be compiled" >&5
8940echo "$as_me: WARNING: X11/xpm.h: present but cannot be compiled" >&2;}
8941 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: check for missing prerequisite headers?" >&5
8942echo "$as_me: WARNING: X11/xpm.h: check for missing prerequisite headers?" >&2;}
8943 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&5
cd958eb3
MB
8944echo "$as_me: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&2;}
8945 (
8946 cat <<\_ASBOX
8947## ------------------------------------ ##
8948## Report this to bug-autoconf@gnu.org. ##
8949## ------------------------------------ ##
8950_ASBOX
8951 ) |
8952 sed "s/^/$as_me: WARNING: /" >&2
8953 ;;
c0d27fcc
MR
8954esac
8955echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
8956echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6
8957if test "${ac_cv_header_X11_xpm_h+set}" = set; then
8958 echo $ECHO_N "(cached) $ECHO_C" >&6
8959else
8960 ac_cv_header_X11_xpm_h=$ac_header_preproc
ba4481b5 8961fi
c0d27fcc 8962echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
98418dba 8963echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6
c0d27fcc
MR
8964
8965fi
98418dba 8966if test $ac_cv_header_X11_xpm_h = yes; then
c0d27fcc 8967 echo "$as_me:$LINENO: checking for XpmReadFileToPixmap in -lXpm" >&5
98418dba
CW
8968echo $ECHO_N "checking for XpmReadFileToPixmap in -lXpm... $ECHO_C" >&6
8969if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then
503d2be0 8970 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 8971else
98418dba
CW
8972 ac_check_lib_save_LIBS=$LIBS
8973LIBS="-lXpm -lX11 $LIBS"
8974cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 8975#line $LINENO "configure"
cd958eb3
MB
8976/* confdefs.h. */
8977_ACEOF
8978cat confdefs.h >>conftest.$ac_ext
8979cat >>conftest.$ac_ext <<_ACEOF
8980/* end confdefs.h. */
98418dba 8981
ba4481b5 8982/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
8983#ifdef __cplusplus
8984extern "C"
8985#endif
ba4481b5 8986/* We use char because int might match the return type of a gcc2
503d2be0 8987 builtin and then its argument prototype would still apply. */
98418dba 8988char XpmReadFileToPixmap ();
503d2be0
AS
8989int
8990main ()
8991{
98418dba 8992XpmReadFileToPixmap ();
503d2be0
AS
8993 ;
8994 return 0;
8995}
8996_ACEOF
8997rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8998if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
8999 (eval $ac_link) 2>&5
9000 ac_status=$?
c0d27fcc 9001 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
9002 (exit $ac_status); } &&
9003 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9004 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
9005 (eval $ac_try) 2>&5
9006 ac_status=$?
c0d27fcc 9007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 9008 (exit $ac_status); }; }; then
98418dba 9009 ac_cv_lib_Xpm_XpmReadFileToPixmap=yes
503d2be0
AS
9010else
9011 echo "$as_me: failed program was:" >&5
cd958eb3
MB
9012sed 's/^/| /' conftest.$ac_ext >&5
9013
98418dba 9014ac_cv_lib_Xpm_XpmReadFileToPixmap=no
503d2be0
AS
9015fi
9016rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
98418dba 9017LIBS=$ac_check_lib_save_LIBS
503d2be0 9018fi
c0d27fcc 9019echo "$as_me:$LINENO: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5
98418dba
CW
9020echo "${ECHO_T}$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6
9021if test $ac_cv_lib_Xpm_XpmReadFileToPixmap = yes; then
9022 HAVE_XPM=yes
ba4481b5
DL
9023fi
9024
98418dba
CW
9025fi
9026
c0d27fcc 9027
98418dba 9028 if test "${HAVE_XPM}" = "yes"; then
c0d27fcc 9029 echo "$as_me:$LINENO: checking for XpmReturnAllocPixels preprocessor define" >&5
98418dba
CW
9030echo $ECHO_N "checking for XpmReturnAllocPixels preprocessor define... $ECHO_C" >&6
9031 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 9032#line $LINENO "configure"
cd958eb3
MB
9033/* confdefs.h. */
9034_ACEOF
9035cat confdefs.h >>conftest.$ac_ext
9036cat >>conftest.$ac_ext <<_ACEOF
9037/* end confdefs.h. */
98418dba
CW
9038#include "X11/xpm.h"
9039#ifndef XpmReturnAllocPixels
9040no_return_alloc_pixels
503d2be0 9041#endif
ba4481b5 9042
98418dba
CW
9043_ACEOF
9044if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 9045 $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then
98418dba
CW
9046 HAVE_XPM=no
9047else
9048 HAVE_XPM=yes
9049fi
9050rm -f conftest*
ba4481b5 9051
c0d27fcc 9052
98418dba 9053 if test "${HAVE_XPM}" = "yes"; then
c0d27fcc 9054 echo "$as_me:$LINENO: result: yes" >&5
98418dba
CW
9055echo "${ECHO_T}yes" >&6
9056 else
c0d27fcc 9057 echo "$as_me:$LINENO: result: no" >&5
98418dba
CW
9058echo "${ECHO_T}no" >&6
9059 fi
9060 fi
9061 fi
9062
9063 if test "${HAVE_XPM}" = "yes"; then
b936fae4 9064
c0d27fcc 9065cat >>confdefs.h <<\_ACEOF
98418dba 9066#define HAVE_XPM 1
c0d27fcc 9067_ACEOF
98418dba
CW
9068
9069 fi
9070fi
9071
9072### Use -ljpeg if available, unless `--with-jpeg=no'.
9073HAVE_JPEG=no
9074if test "${HAVE_X11}" = "yes"; then
9075 if test "${with_jpeg}" != "no"; then
c0d27fcc
MR
9076 if test "${ac_cv_header_jerror_h+set}" = set; then
9077 echo "$as_me:$LINENO: checking for jerror.h" >&5
98418dba
CW
9078echo $ECHO_N "checking for jerror.h... $ECHO_C" >&6
9079if test "${ac_cv_header_jerror_h+set}" = set; then
9080 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
9081fi
9082echo "$as_me:$LINENO: result: $ac_cv_header_jerror_h" >&5
9083echo "${ECHO_T}$ac_cv_header_jerror_h" >&6
503d2be0 9084else
c0d27fcc
MR
9085 # Is the header compilable?
9086echo "$as_me:$LINENO: checking jerror.h usability" >&5
9087echo $ECHO_N "checking jerror.h usability... $ECHO_C" >&6
9088cat >conftest.$ac_ext <<_ACEOF
9089#line $LINENO "configure"
cd958eb3
MB
9090/* confdefs.h. */
9091_ACEOF
9092cat confdefs.h >>conftest.$ac_ext
9093cat >>conftest.$ac_ext <<_ACEOF
9094/* end confdefs.h. */
c0d27fcc
MR
9095$ac_includes_default
9096#include <jerror.h>
9097_ACEOF
9098rm -f conftest.$ac_objext
9099if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9100 (eval $ac_compile) 2>&5
9101 ac_status=$?
9102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9103 (exit $ac_status); } &&
9104 { ac_try='test -s conftest.$ac_objext'
9105 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9106 (eval $ac_try) 2>&5
9107 ac_status=$?
9108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9109 (exit $ac_status); }; }; then
9110 ac_header_compiler=yes
9111else
9112 echo "$as_me: failed program was:" >&5
cd958eb3
MB
9113sed 's/^/| /' conftest.$ac_ext >&5
9114
c0d27fcc
MR
9115ac_header_compiler=no
9116fi
9117rm -f conftest.$ac_objext conftest.$ac_ext
9118echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9119echo "${ECHO_T}$ac_header_compiler" >&6
9120
9121# Is the header present?
9122echo "$as_me:$LINENO: checking jerror.h presence" >&5
9123echo $ECHO_N "checking jerror.h presence... $ECHO_C" >&6
9124cat >conftest.$ac_ext <<_ACEOF
9125#line $LINENO "configure"
cd958eb3
MB
9126/* confdefs.h. */
9127_ACEOF
9128cat confdefs.h >>conftest.$ac_ext
9129cat >>conftest.$ac_ext <<_ACEOF
9130/* end confdefs.h. */
98418dba
CW
9131#include <jerror.h>
9132_ACEOF
c0d27fcc 9133if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
9134 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9135 ac_status=$?
6bae0ccf 9136 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
9137 rm -f conftest.er1
9138 cat conftest.err >&5
c0d27fcc 9139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9140 (exit $ac_status); } >/dev/null; then
9141 if test -s conftest.err; then
9142 ac_cpp_err=$ac_c_preproc_warn_flag
9143 else
9144 ac_cpp_err=
9145 fi
9146else
9147 ac_cpp_err=yes
503d2be0 9148fi
98418dba 9149if test -z "$ac_cpp_err"; then
c0d27fcc 9150 ac_header_preproc=yes
ba4481b5 9151else
98418dba 9152 echo "$as_me: failed program was:" >&5
cd958eb3
MB
9153sed 's/^/| /' conftest.$ac_ext >&5
9154
c0d27fcc 9155 ac_header_preproc=no
98418dba
CW
9156fi
9157rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
9158echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9159echo "${ECHO_T}$ac_header_preproc" >&6
9160
9161# So? What about this header?
9162case $ac_header_compiler:$ac_header_preproc in
9163 yes:no )
9164 { echo "$as_me:$LINENO: WARNING: jerror.h: accepted by the compiler, rejected by the preprocessor!" >&5
9165echo "$as_me: WARNING: jerror.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9166 { echo "$as_me:$LINENO: WARNING: jerror.h: proceeding with the preprocessor's result" >&5
cd958eb3
MB
9167echo "$as_me: WARNING: jerror.h: proceeding with the preprocessor's result" >&2;}
9168 (
9169 cat <<\_ASBOX
9170## ------------------------------------ ##
9171## Report this to bug-autoconf@gnu.org. ##
9172## ------------------------------------ ##
9173_ASBOX
9174 ) |
9175 sed "s/^/$as_me: WARNING: /" >&2
9176 ;;
c0d27fcc
MR
9177 no:yes )
9178 { echo "$as_me:$LINENO: WARNING: jerror.h: present but cannot be compiled" >&5
9179echo "$as_me: WARNING: jerror.h: present but cannot be compiled" >&2;}
9180 { echo "$as_me:$LINENO: WARNING: jerror.h: check for missing prerequisite headers?" >&5
9181echo "$as_me: WARNING: jerror.h: check for missing prerequisite headers?" >&2;}
9182 { echo "$as_me:$LINENO: WARNING: jerror.h: proceeding with the preprocessor's result" >&5
cd958eb3
MB
9183echo "$as_me: WARNING: jerror.h: proceeding with the preprocessor's result" >&2;}
9184 (
9185 cat <<\_ASBOX
9186## ------------------------------------ ##
9187## Report this to bug-autoconf@gnu.org. ##
9188## ------------------------------------ ##
9189_ASBOX
9190 ) |
9191 sed "s/^/$as_me: WARNING: /" >&2
9192 ;;
c0d27fcc
MR
9193esac
9194echo "$as_me:$LINENO: checking for jerror.h" >&5
9195echo $ECHO_N "checking for jerror.h... $ECHO_C" >&6
9196if test "${ac_cv_header_jerror_h+set}" = set; then
9197 echo $ECHO_N "(cached) $ECHO_C" >&6
9198else
9199 ac_cv_header_jerror_h=$ac_header_preproc
ba4481b5 9200fi
c0d27fcc 9201echo "$as_me:$LINENO: result: $ac_cv_header_jerror_h" >&5
98418dba 9202echo "${ECHO_T}$ac_cv_header_jerror_h" >&6
c0d27fcc
MR
9203
9204fi
98418dba 9205if test $ac_cv_header_jerror_h = yes; then
c0d27fcc 9206 echo "$as_me:$LINENO: checking for jpeg_destroy_compress in -ljpeg" >&5
98418dba
CW
9207echo $ECHO_N "checking for jpeg_destroy_compress in -ljpeg... $ECHO_C" >&6
9208if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then
503d2be0 9209 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 9210else
98418dba
CW
9211 ac_check_lib_save_LIBS=$LIBS
9212LIBS="-ljpeg $LIBS"
9213cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 9214#line $LINENO "configure"
cd958eb3
MB
9215/* confdefs.h. */
9216_ACEOF
9217cat confdefs.h >>conftest.$ac_ext
9218cat >>conftest.$ac_ext <<_ACEOF
9219/* end confdefs.h. */
98418dba
CW
9220
9221/* Override any gcc2 internal prototype to avoid an error. */
9222#ifdef __cplusplus
9223extern "C"
9224#endif
9225/* We use char because int might match the return type of a gcc2
9226 builtin and then its argument prototype would still apply. */
9227char jpeg_destroy_compress ();
503d2be0
AS
9228int
9229main ()
9230{
98418dba 9231jpeg_destroy_compress ();
503d2be0
AS
9232 ;
9233 return 0;
9234}
9235_ACEOF
9236rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9237if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
9238 (eval $ac_link) 2>&5
9239 ac_status=$?
c0d27fcc 9240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
9241 (exit $ac_status); } &&
9242 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9243 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
9244 (eval $ac_try) 2>&5
9245 ac_status=$?
c0d27fcc 9246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 9247 (exit $ac_status); }; }; then
98418dba 9248 ac_cv_lib_jpeg_jpeg_destroy_compress=yes
ba4481b5 9249else
503d2be0 9250 echo "$as_me: failed program was:" >&5
cd958eb3
MB
9251sed 's/^/| /' conftest.$ac_ext >&5
9252
98418dba 9253ac_cv_lib_jpeg_jpeg_destroy_compress=no
ba4481b5 9254fi
503d2be0 9255rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
98418dba 9256LIBS=$ac_check_lib_save_LIBS
ba4481b5 9257fi
c0d27fcc 9258echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5
98418dba
CW
9259echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6
9260if test $ac_cv_lib_jpeg_jpeg_destroy_compress = yes; then
9261 HAVE_JPEG=yes
ba4481b5 9262fi
98418dba 9263
ba4481b5 9264fi
98418dba 9265
c0d27fcc 9266
ba4481b5 9267 fi
ba4481b5 9268
c0d27fcc 9269
98418dba 9270 if test "${HAVE_JPEG}" = "yes"; then
c0d27fcc 9271 cat >>confdefs.h <<\_ACEOF
98418dba 9272#define HAVE_JPEG 1
c0d27fcc 9273_ACEOF
98418dba
CW
9274
9275 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 9276#line $LINENO "configure"
cd958eb3
MB
9277/* confdefs.h. */
9278_ACEOF
9279cat confdefs.h >>conftest.$ac_ext
9280cat >>conftest.$ac_ext <<_ACEOF
9281/* end confdefs.h. */
22044edf 9282#include <jpeglib.h>
98418dba
CW
9283 version=JPEG_LIB_VERSION
9284
9285_ACEOF
9286if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 9287 $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then
c0d27fcc 9288 cat >>confdefs.h <<\_ACEOF
98418dba 9289#define HAVE_JPEG 1
c0d27fcc 9290_ACEOF
ba4481b5 9291
98418dba 9292else
c0d27fcc 9293 { echo "$as_me:$LINENO: WARNING: libjpeg found, but not version 6b or later" >&5
98418dba
CW
9294echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;}
9295 HAVE_JPEG=no
ba4481b5 9296fi
98418dba 9297rm -f conftest*
ba4481b5 9298
98418dba
CW
9299 fi
9300fi
503d2be0 9301
98418dba
CW
9302### Use -lpng if available, unless `--with-png=no'.
9303HAVE_PNG=no
9304if test "${HAVE_X11}" = "yes"; then
9305 if test "${with_png}" != "no"; then
c0d27fcc
MR
9306 if test "${ac_cv_header_png_h+set}" = set; then
9307 echo "$as_me:$LINENO: checking for png.h" >&5
98418dba
CW
9308echo $ECHO_N "checking for png.h... $ECHO_C" >&6
9309if test "${ac_cv_header_png_h+set}" = set; then
503d2be0 9310 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
9311fi
9312echo "$as_me:$LINENO: result: $ac_cv_header_png_h" >&5
9313echo "${ECHO_T}$ac_cv_header_png_h" >&6
503d2be0 9314else
c0d27fcc
MR
9315 # Is the header compilable?
9316echo "$as_me:$LINENO: checking png.h usability" >&5
9317echo $ECHO_N "checking png.h usability... $ECHO_C" >&6
9318cat >conftest.$ac_ext <<_ACEOF
9319#line $LINENO "configure"
cd958eb3
MB
9320/* confdefs.h. */
9321_ACEOF
9322cat confdefs.h >>conftest.$ac_ext
9323cat >>conftest.$ac_ext <<_ACEOF
9324/* end confdefs.h. */
c0d27fcc
MR
9325$ac_includes_default
9326#include <png.h>
9327_ACEOF
9328rm -f conftest.$ac_objext
9329if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9330 (eval $ac_compile) 2>&5
9331 ac_status=$?
9332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9333 (exit $ac_status); } &&
9334 { ac_try='test -s conftest.$ac_objext'
9335 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9336 (eval $ac_try) 2>&5
9337 ac_status=$?
9338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9339 (exit $ac_status); }; }; then
9340 ac_header_compiler=yes
9341else
9342 echo "$as_me: failed program was:" >&5
cd958eb3
MB
9343sed 's/^/| /' conftest.$ac_ext >&5
9344
c0d27fcc
MR
9345ac_header_compiler=no
9346fi
9347rm -f conftest.$ac_objext conftest.$ac_ext
9348echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9349echo "${ECHO_T}$ac_header_compiler" >&6
9350
9351# Is the header present?
9352echo "$as_me:$LINENO: checking png.h presence" >&5
9353echo $ECHO_N "checking png.h presence... $ECHO_C" >&6
9354cat >conftest.$ac_ext <<_ACEOF
9355#line $LINENO "configure"
cd958eb3
MB
9356/* confdefs.h. */
9357_ACEOF
9358cat confdefs.h >>conftest.$ac_ext
9359cat >>conftest.$ac_ext <<_ACEOF
9360/* end confdefs.h. */
98418dba 9361#include <png.h>
503d2be0 9362_ACEOF
c0d27fcc 9363if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
9364 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9365 ac_status=$?
6bae0ccf 9366 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
9367 rm -f conftest.er1
9368 cat conftest.err >&5
c0d27fcc 9369 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
9370 (exit $ac_status); } >/dev/null; then
9371 if test -s conftest.err; then
9372 ac_cpp_err=$ac_c_preproc_warn_flag
9373 else
9374 ac_cpp_err=
9375 fi
9376else
9377 ac_cpp_err=yes
9378fi
9379if test -z "$ac_cpp_err"; then
c0d27fcc 9380 ac_header_preproc=yes
503d2be0
AS
9381else
9382 echo "$as_me: failed program was:" >&5
cd958eb3
MB
9383sed 's/^/| /' conftest.$ac_ext >&5
9384
c0d27fcc 9385 ac_header_preproc=no
ba4481b5 9386fi
503d2be0 9387rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
9388echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9389echo "${ECHO_T}$ac_header_preproc" >&6
9390
9391# So? What about this header?
9392case $ac_header_compiler:$ac_header_preproc in
9393 yes:no )
9394 { echo "$as_me:$LINENO: WARNING: png.h: accepted by the compiler, rejected by the preprocessor!" >&5
9395echo "$as_me: WARNING: png.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9396 { echo "$as_me:$LINENO: WARNING: png.h: proceeding with the preprocessor's result" >&5
cd958eb3
MB
9397echo "$as_me: WARNING: png.h: proceeding with the preprocessor's result" >&2;}
9398 (
9399 cat <<\_ASBOX
9400## ------------------------------------ ##
9401## Report this to bug-autoconf@gnu.org. ##
9402## ------------------------------------ ##
9403_ASBOX
9404 ) |
9405 sed "s/^/$as_me: WARNING: /" >&2
9406 ;;
c0d27fcc
MR
9407 no:yes )
9408 { echo "$as_me:$LINENO: WARNING: png.h: present but cannot be compiled" >&5
9409echo "$as_me: WARNING: png.h: present but cannot be compiled" >&2;}
9410 { echo "$as_me:$LINENO: WARNING: png.h: check for missing prerequisite headers?" >&5
9411echo "$as_me: WARNING: png.h: check for missing prerequisite headers?" >&2;}
9412 { echo "$as_me:$LINENO: WARNING: png.h: proceeding with the preprocessor's result" >&5
cd958eb3
MB
9413echo "$as_me: WARNING: png.h: proceeding with the preprocessor's result" >&2;}
9414 (
9415 cat <<\_ASBOX
9416## ------------------------------------ ##
9417## Report this to bug-autoconf@gnu.org. ##
9418## ------------------------------------ ##
9419_ASBOX
9420 ) |
9421 sed "s/^/$as_me: WARNING: /" >&2
9422 ;;
c0d27fcc
MR
9423esac
9424echo "$as_me:$LINENO: checking for png.h" >&5
9425echo $ECHO_N "checking for png.h... $ECHO_C" >&6
9426if test "${ac_cv_header_png_h+set}" = set; then
9427 echo $ECHO_N "(cached) $ECHO_C" >&6
9428else
9429 ac_cv_header_png_h=$ac_header_preproc
ba4481b5 9430fi
c0d27fcc 9431echo "$as_me:$LINENO: result: $ac_cv_header_png_h" >&5
98418dba 9432echo "${ECHO_T}$ac_cv_header_png_h" >&6
c0d27fcc
MR
9433
9434fi
98418dba 9435if test $ac_cv_header_png_h = yes; then
c0d27fcc 9436 echo "$as_me:$LINENO: checking for png_get_channels in -lpng" >&5
98418dba
CW
9437echo $ECHO_N "checking for png_get_channels in -lpng... $ECHO_C" >&6
9438if test "${ac_cv_lib_png_png_get_channels+set}" = set; then
503d2be0 9439 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 9440else
98418dba
CW
9441 ac_check_lib_save_LIBS=$LIBS
9442LIBS="-lpng -lz -lm $LIBS"
9443cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 9444#line $LINENO "configure"
cd958eb3
MB
9445/* confdefs.h. */
9446_ACEOF
9447cat confdefs.h >>conftest.$ac_ext
9448cat >>conftest.$ac_ext <<_ACEOF
9449/* end confdefs.h. */
98418dba 9450
ba4481b5 9451/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
9452#ifdef __cplusplus
9453extern "C"
9454#endif
ba4481b5 9455/* We use char because int might match the return type of a gcc2
503d2be0 9456 builtin and then its argument prototype would still apply. */
98418dba 9457char png_get_channels ();
503d2be0
AS
9458int
9459main ()
9460{
98418dba 9461png_get_channels ();
503d2be0
AS
9462 ;
9463 return 0;
9464}
9465_ACEOF
9466rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9467if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
9468 (eval $ac_link) 2>&5
9469 ac_status=$?
c0d27fcc 9470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9471 (exit $ac_status); } &&
9472 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9473 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
9474 (eval $ac_try) 2>&5
9475 ac_status=$?
c0d27fcc 9476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 9477 (exit $ac_status); }; }; then
98418dba 9478 ac_cv_lib_png_png_get_channels=yes
73b77ee5 9479else
98418dba 9480 echo "$as_me: failed program was:" >&5
cd958eb3
MB
9481sed 's/^/| /' conftest.$ac_ext >&5
9482
98418dba 9483ac_cv_lib_png_png_get_channels=no
73b77ee5 9484fi
98418dba
CW
9485rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9486LIBS=$ac_check_lib_save_LIBS
73b77ee5 9487fi
c0d27fcc 9488echo "$as_me:$LINENO: result: $ac_cv_lib_png_png_get_channels" >&5
98418dba
CW
9489echo "${ECHO_T}$ac_cv_lib_png_png_get_channels" >&6
9490if test $ac_cv_lib_png_png_get_channels = yes; then
9491 HAVE_PNG=yes
73b77ee5 9492fi
503d2be0 9493
98418dba
CW
9494fi
9495
c0d27fcc 9496
98418dba
CW
9497 fi
9498
9499 if test "${HAVE_PNG}" = "yes"; then
b936fae4 9500
c0d27fcc 9501cat >>confdefs.h <<\_ACEOF
98418dba 9502#define HAVE_PNG 1
c0d27fcc 9503_ACEOF
73b77ee5 9504
98418dba 9505 fi
73b77ee5
GM
9506fi
9507
98418dba
CW
9508### Use -ltiff if available, unless `--with-tiff=no'.
9509HAVE_TIFF=no
9510if test "${HAVE_X11}" = "yes"; then
9511 if test "${with_tiff}" != "no"; then
c0d27fcc
MR
9512 if test "${ac_cv_header_tiffio_h+set}" = set; then
9513 echo "$as_me:$LINENO: checking for tiffio.h" >&5
98418dba
CW
9514echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6
9515if test "${ac_cv_header_tiffio_h+set}" = set; then
9516 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
9517fi
9518echo "$as_me:$LINENO: result: $ac_cv_header_tiffio_h" >&5
9519echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6
98418dba 9520else
c0d27fcc
MR
9521 # Is the header compilable?
9522echo "$as_me:$LINENO: checking tiffio.h usability" >&5
9523echo $ECHO_N "checking tiffio.h usability... $ECHO_C" >&6
9524cat >conftest.$ac_ext <<_ACEOF
9525#line $LINENO "configure"
cd958eb3
MB
9526/* confdefs.h. */
9527_ACEOF
9528cat confdefs.h >>conftest.$ac_ext
9529cat >>conftest.$ac_ext <<_ACEOF
9530/* end confdefs.h. */
c0d27fcc
MR
9531$ac_includes_default
9532#include <tiffio.h>
9533_ACEOF
9534rm -f conftest.$ac_objext
9535if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9536 (eval $ac_compile) 2>&5
9537 ac_status=$?
9538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9539 (exit $ac_status); } &&
9540 { ac_try='test -s conftest.$ac_objext'
9541 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9542 (eval $ac_try) 2>&5
9543 ac_status=$?
9544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9545 (exit $ac_status); }; }; then
9546 ac_header_compiler=yes
9547else
9548 echo "$as_me: failed program was:" >&5
cd958eb3
MB
9549sed 's/^/| /' conftest.$ac_ext >&5
9550
c0d27fcc
MR
9551ac_header_compiler=no
9552fi
9553rm -f conftest.$ac_objext conftest.$ac_ext
9554echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9555echo "${ECHO_T}$ac_header_compiler" >&6
9556
9557# Is the header present?
9558echo "$as_me:$LINENO: checking tiffio.h presence" >&5
9559echo $ECHO_N "checking tiffio.h presence... $ECHO_C" >&6
9560cat >conftest.$ac_ext <<_ACEOF
9561#line $LINENO "configure"
cd958eb3
MB
9562/* confdefs.h. */
9563_ACEOF
9564cat confdefs.h >>conftest.$ac_ext
9565cat >>conftest.$ac_ext <<_ACEOF
9566/* end confdefs.h. */
98418dba
CW
9567#include <tiffio.h>
9568_ACEOF
c0d27fcc 9569if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
9570 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9571 ac_status=$?
6bae0ccf 9572 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
9573 rm -f conftest.er1
9574 cat conftest.err >&5
c0d27fcc 9575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9576 (exit $ac_status); } >/dev/null; then
9577 if test -s conftest.err; then
9578 ac_cpp_err=$ac_c_preproc_warn_flag
9579 else
9580 ac_cpp_err=
9581 fi
9582else
9583 ac_cpp_err=yes
9584fi
9585if test -z "$ac_cpp_err"; then
c0d27fcc 9586 ac_header_preproc=yes
98418dba
CW
9587else
9588 echo "$as_me: failed program was:" >&5
cd958eb3
MB
9589sed 's/^/| /' conftest.$ac_ext >&5
9590
c0d27fcc 9591 ac_header_preproc=no
98418dba
CW
9592fi
9593rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
9594echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9595echo "${ECHO_T}$ac_header_preproc" >&6
9596
9597# So? What about this header?
9598case $ac_header_compiler:$ac_header_preproc in
9599 yes:no )
9600 { echo "$as_me:$LINENO: WARNING: tiffio.h: accepted by the compiler, rejected by the preprocessor!" >&5
9601echo "$as_me: WARNING: tiffio.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9602 { echo "$as_me:$LINENO: WARNING: tiffio.h: proceeding with the preprocessor's result" >&5
cd958eb3
MB
9603echo "$as_me: WARNING: tiffio.h: proceeding with the preprocessor's result" >&2;}
9604 (
9605 cat <<\_ASBOX
9606## ------------------------------------ ##
9607## Report this to bug-autoconf@gnu.org. ##
9608## ------------------------------------ ##
9609_ASBOX
9610 ) |
9611 sed "s/^/$as_me: WARNING: /" >&2
9612 ;;
c0d27fcc
MR
9613 no:yes )
9614 { echo "$as_me:$LINENO: WARNING: tiffio.h: present but cannot be compiled" >&5
9615echo "$as_me: WARNING: tiffio.h: present but cannot be compiled" >&2;}
9616 { echo "$as_me:$LINENO: WARNING: tiffio.h: check for missing prerequisite headers?" >&5
9617echo "$as_me: WARNING: tiffio.h: check for missing prerequisite headers?" >&2;}
9618 { echo "$as_me:$LINENO: WARNING: tiffio.h: proceeding with the preprocessor's result" >&5
cd958eb3
MB
9619echo "$as_me: WARNING: tiffio.h: proceeding with the preprocessor's result" >&2;}
9620 (
9621 cat <<\_ASBOX
9622## ------------------------------------ ##
9623## Report this to bug-autoconf@gnu.org. ##
9624## ------------------------------------ ##
9625_ASBOX
9626 ) |
9627 sed "s/^/$as_me: WARNING: /" >&2
9628 ;;
c0d27fcc
MR
9629esac
9630echo "$as_me:$LINENO: checking for tiffio.h" >&5
9631echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6
9632if test "${ac_cv_header_tiffio_h+set}" = set; then
9633 echo $ECHO_N "(cached) $ECHO_C" >&6
9634else
9635 ac_cv_header_tiffio_h=$ac_header_preproc
98418dba 9636fi
c0d27fcc 9637echo "$as_me:$LINENO: result: $ac_cv_header_tiffio_h" >&5
98418dba 9638echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6
c0d27fcc
MR
9639
9640fi
98418dba
CW
9641if test $ac_cv_header_tiffio_h = yes; then
9642 tifflibs="-lz -lm"
9643 # At least one tiff package requires the jpeg library.
9644 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
c0d27fcc 9645 echo "$as_me:$LINENO: checking for TIFFGetVersion in -ltiff" >&5
98418dba
CW
9646echo $ECHO_N "checking for TIFFGetVersion in -ltiff... $ECHO_C" >&6
9647if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then
503d2be0 9648 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 9649else
503d2be0 9650 ac_check_lib_save_LIBS=$LIBS
98418dba 9651LIBS="-ltiff $tifflibs $LIBS"
503d2be0 9652cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 9653#line $LINENO "configure"
cd958eb3
MB
9654/* confdefs.h. */
9655_ACEOF
9656cat confdefs.h >>conftest.$ac_ext
9657cat >>conftest.$ac_ext <<_ACEOF
9658/* end confdefs.h. */
503d2be0 9659
73b77ee5 9660/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
9661#ifdef __cplusplus
9662extern "C"
9663#endif
73b77ee5 9664/* We use char because int might match the return type of a gcc2
503d2be0 9665 builtin and then its argument prototype would still apply. */
98418dba 9666char TIFFGetVersion ();
503d2be0
AS
9667int
9668main ()
9669{
98418dba 9670TIFFGetVersion ();
503d2be0
AS
9671 ;
9672 return 0;
9673}
9674_ACEOF
9675rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9676if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
9677 (eval $ac_link) 2>&5
9678 ac_status=$?
c0d27fcc 9679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
9680 (exit $ac_status); } &&
9681 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9682 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
9683 (eval $ac_try) 2>&5
9684 ac_status=$?
c0d27fcc 9685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 9686 (exit $ac_status); }; }; then
98418dba 9687 ac_cv_lib_tiff_TIFFGetVersion=yes
503d2be0
AS
9688else
9689 echo "$as_me: failed program was:" >&5
cd958eb3
MB
9690sed 's/^/| /' conftest.$ac_ext >&5
9691
98418dba 9692ac_cv_lib_tiff_TIFFGetVersion=no
503d2be0
AS
9693fi
9694rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9695LIBS=$ac_check_lib_save_LIBS
9696fi
c0d27fcc 9697echo "$as_me:$LINENO: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5
98418dba
CW
9698echo "${ECHO_T}$ac_cv_lib_tiff_TIFFGetVersion" >&6
9699if test $ac_cv_lib_tiff_TIFFGetVersion = yes; then
9700 HAVE_TIFF=yes
9701fi
9702
9703fi
73b77ee5 9704
c0d27fcc 9705
98418dba
CW
9706 fi
9707
9708 if test "${HAVE_TIFF}" = "yes"; then
b936fae4 9709
c0d27fcc 9710cat >>confdefs.h <<\_ACEOF
98418dba 9711#define HAVE_TIFF 1
c0d27fcc 9712_ACEOF
98418dba
CW
9713
9714 fi
73b77ee5
GM
9715fi
9716
98418dba
CW
9717### Use -lgif if available, unless `--with-gif=no'.
9718HAVE_GIF=no
9719if test "${HAVE_X11}" = "yes"; then
9720 if test "${with_gif}" != "no"; then
c0d27fcc
MR
9721 if test "${ac_cv_header_gif_lib_h+set}" = set; then
9722 echo "$as_me:$LINENO: checking for gif_lib.h" >&5
98418dba
CW
9723echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6
9724if test "${ac_cv_header_gif_lib_h+set}" = set; then
9725 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
9726fi
9727echo "$as_me:$LINENO: result: $ac_cv_header_gif_lib_h" >&5
9728echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6
98418dba 9729else
c0d27fcc
MR
9730 # Is the header compilable?
9731echo "$as_me:$LINENO: checking gif_lib.h usability" >&5
9732echo $ECHO_N "checking gif_lib.h usability... $ECHO_C" >&6
9733cat >conftest.$ac_ext <<_ACEOF
9734#line $LINENO "configure"
cd958eb3
MB
9735/* confdefs.h. */
9736_ACEOF
9737cat confdefs.h >>conftest.$ac_ext
9738cat >>conftest.$ac_ext <<_ACEOF
9739/* end confdefs.h. */
c0d27fcc
MR
9740$ac_includes_default
9741#include <gif_lib.h>
9742_ACEOF
9743rm -f conftest.$ac_objext
9744if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9745 (eval $ac_compile) 2>&5
9746 ac_status=$?
9747 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9748 (exit $ac_status); } &&
9749 { ac_try='test -s conftest.$ac_objext'
9750 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9751 (eval $ac_try) 2>&5
9752 ac_status=$?
9753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9754 (exit $ac_status); }; }; then
9755 ac_header_compiler=yes
9756else
9757 echo "$as_me: failed program was:" >&5
cd958eb3
MB
9758sed 's/^/| /' conftest.$ac_ext >&5
9759
c0d27fcc
MR
9760ac_header_compiler=no
9761fi
9762rm -f conftest.$ac_objext conftest.$ac_ext
9763echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9764echo "${ECHO_T}$ac_header_compiler" >&6
9765
9766# Is the header present?
9767echo "$as_me:$LINENO: checking gif_lib.h presence" >&5
9768echo $ECHO_N "checking gif_lib.h presence... $ECHO_C" >&6
9769cat >conftest.$ac_ext <<_ACEOF
9770#line $LINENO "configure"
cd958eb3
MB
9771/* confdefs.h. */
9772_ACEOF
9773cat confdefs.h >>conftest.$ac_ext
9774cat >>conftest.$ac_ext <<_ACEOF
9775/* end confdefs.h. */
98418dba
CW
9776#include <gif_lib.h>
9777_ACEOF
c0d27fcc 9778if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
9779 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9780 ac_status=$?
6bae0ccf 9781 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
9782 rm -f conftest.er1
9783 cat conftest.err >&5
c0d27fcc 9784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9785 (exit $ac_status); } >/dev/null; then
9786 if test -s conftest.err; then
9787 ac_cpp_err=$ac_c_preproc_warn_flag
9788 else
9789 ac_cpp_err=
9790 fi
9791else
9792 ac_cpp_err=yes
9793fi
9794if test -z "$ac_cpp_err"; then
c0d27fcc 9795 ac_header_preproc=yes
98418dba
CW
9796else
9797 echo "$as_me: failed program was:" >&5
cd958eb3
MB
9798sed 's/^/| /' conftest.$ac_ext >&5
9799
c0d27fcc 9800 ac_header_preproc=no
98418dba
CW
9801fi
9802rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
9803echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9804echo "${ECHO_T}$ac_header_preproc" >&6
9805
9806# So? What about this header?
9807case $ac_header_compiler:$ac_header_preproc in
9808 yes:no )
9809 { echo "$as_me:$LINENO: WARNING: gif_lib.h: accepted by the compiler, rejected by the preprocessor!" >&5
9810echo "$as_me: WARNING: gif_lib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9811 { echo "$as_me:$LINENO: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&5
cd958eb3
MB
9812echo "$as_me: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&2;}
9813 (
9814 cat <<\_ASBOX
9815## ------------------------------------ ##
9816## Report this to bug-autoconf@gnu.org. ##
9817## ------------------------------------ ##
9818_ASBOX
9819 ) |
9820 sed "s/^/$as_me: WARNING: /" >&2
9821 ;;
c0d27fcc
MR
9822 no:yes )
9823 { echo "$as_me:$LINENO: WARNING: gif_lib.h: present but cannot be compiled" >&5
9824echo "$as_me: WARNING: gif_lib.h: present but cannot be compiled" >&2;}
9825 { echo "$as_me:$LINENO: WARNING: gif_lib.h: check for missing prerequisite headers?" >&5
9826echo "$as_me: WARNING: gif_lib.h: check for missing prerequisite headers?" >&2;}
9827 { echo "$as_me:$LINENO: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&5
cd958eb3
MB
9828echo "$as_me: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&2;}
9829 (
9830 cat <<\_ASBOX
9831## ------------------------------------ ##
9832## Report this to bug-autoconf@gnu.org. ##
9833## ------------------------------------ ##
9834_ASBOX
9835 ) |
9836 sed "s/^/$as_me: WARNING: /" >&2
9837 ;;
c0d27fcc
MR
9838esac
9839echo "$as_me:$LINENO: checking for gif_lib.h" >&5
9840echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6
9841if test "${ac_cv_header_gif_lib_h+set}" = set; then
9842 echo $ECHO_N "(cached) $ECHO_C" >&6
9843else
9844 ac_cv_header_gif_lib_h=$ac_header_preproc
98418dba 9845fi
c0d27fcc 9846echo "$as_me:$LINENO: result: $ac_cv_header_gif_lib_h" >&5
98418dba 9847echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6
c0d27fcc
MR
9848
9849fi
98418dba
CW
9850if test $ac_cv_header_gif_lib_h = yes; then
9851 # EGifPutExtensionLast only exists from version libungif-4.1.0b1.
9852# Earlier versions can crash Emacs.
c0d27fcc 9853 echo "$as_me:$LINENO: checking for EGifPutExtensionLast in -lungif" >&5
98418dba
CW
9854echo $ECHO_N "checking for EGifPutExtensionLast in -lungif... $ECHO_C" >&6
9855if test "${ac_cv_lib_ungif_EGifPutExtensionLast+set}" = set; then
503d2be0 9856 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 9857else
503d2be0 9858 ac_check_lib_save_LIBS=$LIBS
98418dba 9859LIBS="-lungif $LIBS"
503d2be0 9860cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 9861#line $LINENO "configure"
cd958eb3
MB
9862/* confdefs.h. */
9863_ACEOF
9864cat confdefs.h >>conftest.$ac_ext
9865cat >>conftest.$ac_ext <<_ACEOF
9866/* end confdefs.h. */
73b77ee5 9867
98418dba
CW
9868/* Override any gcc2 internal prototype to avoid an error. */
9869#ifdef __cplusplus
9870extern "C"
9871#endif
9872/* We use char because int might match the return type of a gcc2
9873 builtin and then its argument prototype would still apply. */
9874char EGifPutExtensionLast ();
503d2be0
AS
9875int
9876main ()
9877{
98418dba 9878EGifPutExtensionLast ();
503d2be0
AS
9879 ;
9880 return 0;
9881}
9882_ACEOF
9883rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9884if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
9885 (eval $ac_link) 2>&5
9886 ac_status=$?
c0d27fcc 9887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9888 (exit $ac_status); } &&
9889 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9890 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9891 (eval $ac_try) 2>&5
9892 ac_status=$?
c0d27fcc 9893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9894 (exit $ac_status); }; }; then
9895 ac_cv_lib_ungif_EGifPutExtensionLast=yes
9896else
9897 echo "$as_me: failed program was:" >&5
cd958eb3
MB
9898sed 's/^/| /' conftest.$ac_ext >&5
9899
98418dba
CW
9900ac_cv_lib_ungif_EGifPutExtensionLast=no
9901fi
9902rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9903LIBS=$ac_check_lib_save_LIBS
9904fi
c0d27fcc 9905echo "$as_me:$LINENO: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5
98418dba
CW
9906echo "${ECHO_T}$ac_cv_lib_ungif_EGifPutExtensionLast" >&6
9907if test $ac_cv_lib_ungif_EGifPutExtensionLast = yes; then
9908 HAVE_GIF=yes
9909fi
9910
9911fi
9912
c0d27fcc 9913
98418dba
CW
9914 fi
9915
9916 if test "${HAVE_GIF}" = "yes"; then
b936fae4 9917
c0d27fcc 9918cat >>confdefs.h <<\_ACEOF
98418dba 9919#define HAVE_GIF 1
c0d27fcc 9920_ACEOF
98418dba
CW
9921
9922 fi
9923fi
9924
c0d27fcc
MR
9925### Use Mac OS X Carbon API to implement GUI.
9926HAVE_CARBON=no
9927if test "${with_carbon}" != "no"; then
9928 if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
9929 echo "$as_me:$LINENO: checking for Carbon/Carbon.h" >&5
9930echo $ECHO_N "checking for Carbon/Carbon.h... $ECHO_C" >&6
9931if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
9932 echo $ECHO_N "(cached) $ECHO_C" >&6
9933fi
9934echo "$as_me:$LINENO: result: $ac_cv_header_Carbon_Carbon_h" >&5
9935echo "${ECHO_T}$ac_cv_header_Carbon_Carbon_h" >&6
9936else
9937 # Is the header compilable?
9938echo "$as_me:$LINENO: checking Carbon/Carbon.h usability" >&5
9939echo $ECHO_N "checking Carbon/Carbon.h usability... $ECHO_C" >&6
9940cat >conftest.$ac_ext <<_ACEOF
9941#line $LINENO "configure"
cd958eb3
MB
9942/* confdefs.h. */
9943_ACEOF
9944cat confdefs.h >>conftest.$ac_ext
9945cat >>conftest.$ac_ext <<_ACEOF
9946/* end confdefs.h. */
c0d27fcc
MR
9947$ac_includes_default
9948#include <Carbon/Carbon.h>
9949_ACEOF
9950rm -f conftest.$ac_objext
9951if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9952 (eval $ac_compile) 2>&5
9953 ac_status=$?
9954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9955 (exit $ac_status); } &&
9956 { ac_try='test -s conftest.$ac_objext'
9957 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9958 (eval $ac_try) 2>&5
9959 ac_status=$?
9960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9961 (exit $ac_status); }; }; then
9962 ac_header_compiler=yes
9963else
9964 echo "$as_me: failed program was:" >&5
cd958eb3
MB
9965sed 's/^/| /' conftest.$ac_ext >&5
9966
c0d27fcc
MR
9967ac_header_compiler=no
9968fi
9969rm -f conftest.$ac_objext conftest.$ac_ext
9970echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9971echo "${ECHO_T}$ac_header_compiler" >&6
9972
9973# Is the header present?
9974echo "$as_me:$LINENO: checking Carbon/Carbon.h presence" >&5
9975echo $ECHO_N "checking Carbon/Carbon.h presence... $ECHO_C" >&6
9976cat >conftest.$ac_ext <<_ACEOF
9977#line $LINENO "configure"
cd958eb3
MB
9978/* confdefs.h. */
9979_ACEOF
9980cat confdefs.h >>conftest.$ac_ext
9981cat >>conftest.$ac_ext <<_ACEOF
9982/* end confdefs.h. */
e0f712ba
AC
9983#include <Carbon/Carbon.h>
9984_ACEOF
c0d27fcc 9985if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
e0f712ba
AC
9986 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9987 ac_status=$?
6bae0ccf 9988 grep -v '^ *+' conftest.er1 >conftest.err
e0f712ba
AC
9989 rm -f conftest.er1
9990 cat conftest.err >&5
c0d27fcc 9991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
e0f712ba
AC
9992 (exit $ac_status); } >/dev/null; then
9993 if test -s conftest.err; then
9994 ac_cpp_err=$ac_c_preproc_warn_flag
9995 else
9996 ac_cpp_err=
9997 fi
9998else
9999 ac_cpp_err=yes
10000fi
10001if test -z "$ac_cpp_err"; then
c0d27fcc 10002 ac_header_preproc=yes
e0f712ba
AC
10003else
10004 echo "$as_me: failed program was:" >&5
cd958eb3
MB
10005sed 's/^/| /' conftest.$ac_ext >&5
10006
c0d27fcc 10007 ac_header_preproc=no
e0f712ba
AC
10008fi
10009rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
10010echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10011echo "${ECHO_T}$ac_header_preproc" >&6
10012
10013# So? What about this header?
10014case $ac_header_compiler:$ac_header_preproc in
10015 yes:no )
10016 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: accepted by the compiler, rejected by the preprocessor!" >&5
10017echo "$as_me: WARNING: Carbon/Carbon.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10018 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: proceeding with the preprocessor's result" >&5
cd958eb3
MB
10019echo "$as_me: WARNING: Carbon/Carbon.h: proceeding with the preprocessor's result" >&2;}
10020 (
10021 cat <<\_ASBOX
10022## ------------------------------------ ##
10023## Report this to bug-autoconf@gnu.org. ##
10024## ------------------------------------ ##
10025_ASBOX
10026 ) |
10027 sed "s/^/$as_me: WARNING: /" >&2
10028 ;;
c0d27fcc
MR
10029 no:yes )
10030 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: present but cannot be compiled" >&5
10031echo "$as_me: WARNING: Carbon/Carbon.h: present but cannot be compiled" >&2;}
10032 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: check for missing prerequisite headers?" >&5
10033echo "$as_me: WARNING: Carbon/Carbon.h: check for missing prerequisite headers?" >&2;}
10034 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: proceeding with the preprocessor's result" >&5
cd958eb3
MB
10035echo "$as_me: WARNING: Carbon/Carbon.h: proceeding with the preprocessor's result" >&2;}
10036 (
10037 cat <<\_ASBOX
10038## ------------------------------------ ##
10039## Report this to bug-autoconf@gnu.org. ##
10040## ------------------------------------ ##
10041_ASBOX
10042 ) |
10043 sed "s/^/$as_me: WARNING: /" >&2
10044 ;;
c0d27fcc
MR
10045esac
10046echo "$as_me:$LINENO: checking for Carbon/Carbon.h" >&5
10047echo $ECHO_N "checking for Carbon/Carbon.h... $ECHO_C" >&6
10048if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
10049 echo $ECHO_N "(cached) $ECHO_C" >&6
10050else
10051 ac_cv_header_Carbon_Carbon_h=$ac_header_preproc
e0f712ba 10052fi
c0d27fcc 10053echo "$as_me:$LINENO: result: $ac_cv_header_Carbon_Carbon_h" >&5
e0f712ba 10054echo "${ECHO_T}$ac_cv_header_Carbon_Carbon_h" >&6
c0d27fcc
MR
10055
10056fi
e0f712ba
AC
10057if test $ac_cv_header_Carbon_Carbon_h = yes; then
10058 HAVE_CARBON=yes
10059fi
10060
c0d27fcc 10061
e0f712ba
AC
10062fi
10063
10064if test "${HAVE_CARBON}" = "yes"; then
e3ba1015 10065
c0d27fcc 10066cat >>confdefs.h <<\_ACEOF
e0f712ba 10067#define HAVE_CARBON 1
c0d27fcc 10068_ACEOF
e0f712ba 10069
6a3a24fa
JD
10070 window_system=mac
10071 ## Specify the install directory
10072 carbon_appdir=
10073 if test "${carbon_appdir_x}" != ""; then
10074 case ${carbon_appdir_x} in
10075 y | ye | yes) carbon_appdir=/Applications ;;
10076 * ) carbon_appdir=${carbon_appdir_x} ;;
10077 esac
10078 fi
8f417b3b
AS
10079 # We also have mouse menus.
10080 HAVE_MENUS=yes
e0f712ba
AC
10081fi
10082
98418dba
CW
10083### Use session management (-lSM -lICE) if available
10084HAVE_X_SM=no
10085if test "${HAVE_X11}" = "yes"; then
c0d27fcc
MR
10086 if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
10087 echo "$as_me:$LINENO: checking for X11/SM/SMlib.h" >&5
98418dba
CW
10088echo $ECHO_N "checking for X11/SM/SMlib.h... $ECHO_C" >&6
10089if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
10090 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
10091fi
10092echo "$as_me:$LINENO: result: $ac_cv_header_X11_SM_SMlib_h" >&5
10093echo "${ECHO_T}$ac_cv_header_X11_SM_SMlib_h" >&6
503d2be0 10094else
c0d27fcc
MR
10095 # Is the header compilable?
10096echo "$as_me:$LINENO: checking X11/SM/SMlib.h usability" >&5
10097echo $ECHO_N "checking X11/SM/SMlib.h usability... $ECHO_C" >&6
10098cat >conftest.$ac_ext <<_ACEOF
10099#line $LINENO "configure"
cd958eb3
MB
10100/* confdefs.h. */
10101_ACEOF
10102cat confdefs.h >>conftest.$ac_ext
10103cat >>conftest.$ac_ext <<_ACEOF
10104/* end confdefs.h. */
c0d27fcc
MR
10105$ac_includes_default
10106#include <X11/SM/SMlib.h>
10107_ACEOF
10108rm -f conftest.$ac_objext
10109if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10110 (eval $ac_compile) 2>&5
10111 ac_status=$?
10112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10113 (exit $ac_status); } &&
10114 { ac_try='test -s conftest.$ac_objext'
10115 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10116 (eval $ac_try) 2>&5
10117 ac_status=$?
10118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10119 (exit $ac_status); }; }; then
10120 ac_header_compiler=yes
10121else
10122 echo "$as_me: failed program was:" >&5
cd958eb3
MB
10123sed 's/^/| /' conftest.$ac_ext >&5
10124
c0d27fcc
MR
10125ac_header_compiler=no
10126fi
10127rm -f conftest.$ac_objext conftest.$ac_ext
10128echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10129echo "${ECHO_T}$ac_header_compiler" >&6
10130
10131# Is the header present?
10132echo "$as_me:$LINENO: checking X11/SM/SMlib.h presence" >&5
10133echo $ECHO_N "checking X11/SM/SMlib.h presence... $ECHO_C" >&6
10134cat >conftest.$ac_ext <<_ACEOF
10135#line $LINENO "configure"
cd958eb3
MB
10136/* confdefs.h. */
10137_ACEOF
10138cat confdefs.h >>conftest.$ac_ext
10139cat >>conftest.$ac_ext <<_ACEOF
10140/* end confdefs.h. */
98418dba
CW
10141#include <X11/SM/SMlib.h>
10142_ACEOF
c0d27fcc 10143if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
10144 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10145 ac_status=$?
6bae0ccf 10146 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
10147 rm -f conftest.er1
10148 cat conftest.err >&5
c0d27fcc 10149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10150 (exit $ac_status); } >/dev/null; then
10151 if test -s conftest.err; then
10152 ac_cpp_err=$ac_c_preproc_warn_flag
10153 else
10154 ac_cpp_err=
10155 fi
10156else
10157 ac_cpp_err=yes
503d2be0 10158fi
98418dba 10159if test -z "$ac_cpp_err"; then
c0d27fcc 10160 ac_header_preproc=yes
98418dba
CW
10161else
10162 echo "$as_me: failed program was:" >&5
cd958eb3
MB
10163sed 's/^/| /' conftest.$ac_ext >&5
10164
c0d27fcc 10165 ac_header_preproc=no
98418dba
CW
10166fi
10167rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
10168echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10169echo "${ECHO_T}$ac_header_preproc" >&6
10170
10171# So? What about this header?
10172case $ac_header_compiler:$ac_header_preproc in
10173 yes:no )
10174 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
10175echo "$as_me: WARNING: X11/SM/SMlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10176 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&5
cd958eb3
MB
10177echo "$as_me: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&2;}
10178 (
10179 cat <<\_ASBOX
10180## ------------------------------------ ##
10181## Report this to bug-autoconf@gnu.org. ##
10182## ------------------------------------ ##
10183_ASBOX
10184 ) |
10185 sed "s/^/$as_me: WARNING: /" >&2
10186 ;;
c0d27fcc
MR
10187 no:yes )
10188 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: present but cannot be compiled" >&5
10189echo "$as_me: WARNING: X11/SM/SMlib.h: present but cannot be compiled" >&2;}
10190 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: check for missing prerequisite headers?" >&5
10191echo "$as_me: WARNING: X11/SM/SMlib.h: check for missing prerequisite headers?" >&2;}
10192 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&5
cd958eb3
MB
10193echo "$as_me: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&2;}
10194 (
10195 cat <<\_ASBOX
10196## ------------------------------------ ##
10197## Report this to bug-autoconf@gnu.org. ##
10198## ------------------------------------ ##
10199_ASBOX
10200 ) |
10201 sed "s/^/$as_me: WARNING: /" >&2
10202 ;;
c0d27fcc
MR
10203esac
10204echo "$as_me:$LINENO: checking for X11/SM/SMlib.h" >&5
10205echo $ECHO_N "checking for X11/SM/SMlib.h... $ECHO_C" >&6
10206if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
10207 echo $ECHO_N "(cached) $ECHO_C" >&6
10208else
10209 ac_cv_header_X11_SM_SMlib_h=$ac_header_preproc
73b77ee5 10210fi
c0d27fcc 10211echo "$as_me:$LINENO: result: $ac_cv_header_X11_SM_SMlib_h" >&5
98418dba 10212echo "${ECHO_T}$ac_cv_header_X11_SM_SMlib_h" >&6
c0d27fcc
MR
10213
10214fi
98418dba 10215if test $ac_cv_header_X11_SM_SMlib_h = yes; then
c0d27fcc 10216 echo "$as_me:$LINENO: checking for SmcOpenConnection in -lSM" >&5
98418dba
CW
10217echo $ECHO_N "checking for SmcOpenConnection in -lSM... $ECHO_C" >&6
10218if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then
503d2be0 10219 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 10220else
503d2be0 10221 ac_check_lib_save_LIBS=$LIBS
98418dba 10222LIBS="-lSM $LIBS"
503d2be0 10223cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 10224#line $LINENO "configure"
cd958eb3
MB
10225/* confdefs.h. */
10226_ACEOF
10227cat confdefs.h >>conftest.$ac_ext
10228cat >>conftest.$ac_ext <<_ACEOF
10229/* end confdefs.h. */
503d2be0 10230
73b77ee5 10231/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
10232#ifdef __cplusplus
10233extern "C"
10234#endif
73b77ee5 10235/* We use char because int might match the return type of a gcc2
503d2be0 10236 builtin and then its argument prototype would still apply. */
98418dba 10237char SmcOpenConnection ();
503d2be0
AS
10238int
10239main ()
10240{
98418dba 10241SmcOpenConnection ();
503d2be0
AS
10242 ;
10243 return 0;
10244}
10245_ACEOF
10246rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10247if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
10248 (eval $ac_link) 2>&5
10249 ac_status=$?
c0d27fcc 10250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
10251 (exit $ac_status); } &&
10252 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10253 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
10254 (eval $ac_try) 2>&5
10255 ac_status=$?
c0d27fcc 10256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 10257 (exit $ac_status); }; }; then
98418dba 10258 ac_cv_lib_SM_SmcOpenConnection=yes
503d2be0
AS
10259else
10260 echo "$as_me: failed program was:" >&5
cd958eb3
MB
10261sed 's/^/| /' conftest.$ac_ext >&5
10262
98418dba 10263ac_cv_lib_SM_SmcOpenConnection=no
503d2be0
AS
10264fi
10265rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10266LIBS=$ac_check_lib_save_LIBS
10267fi
c0d27fcc 10268echo "$as_me:$LINENO: result: $ac_cv_lib_SM_SmcOpenConnection" >&5
98418dba
CW
10269echo "${ECHO_T}$ac_cv_lib_SM_SmcOpenConnection" >&6
10270if test $ac_cv_lib_SM_SmcOpenConnection = yes; then
10271 HAVE_X_SM=yes
10272else
10273 -lICE
73b77ee5
GM
10274fi
10275
73b77ee5 10276fi
73b77ee5 10277
c0d27fcc
MR
10278
10279
98418dba 10280 if test "${HAVE_X_SM}" = "yes"; then
b936fae4 10281
c0d27fcc 10282cat >>confdefs.h <<\_ACEOF
98418dba 10283#define HAVE_X_SM 1
c0d27fcc 10284_ACEOF
73b77ee5 10285
98418dba
CW
10286 case "$LIBS" in
10287 *-lSM*) ;;
10288 *) LIBS="-lSM -lICE $LIBS" ;;
10289 esac
73b77ee5 10290 fi
98418dba 10291fi
73b77ee5 10292
98418dba 10293# If netdb.h doesn't declare h_errno, we must declare it by hand.
c0d27fcc 10294echo "$as_me:$LINENO: checking whether netdb declares h_errno" >&5
98418dba
CW
10295echo $ECHO_N "checking whether netdb declares h_errno... $ECHO_C" >&6
10296if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then
10297 echo $ECHO_N "(cached) $ECHO_C" >&6
10298else
10299 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 10300#line $LINENO "configure"
cd958eb3
MB
10301/* confdefs.h. */
10302_ACEOF
10303cat confdefs.h >>conftest.$ac_ext
10304cat >>conftest.$ac_ext <<_ACEOF
10305/* end confdefs.h. */
98418dba 10306#include <netdb.h>
503d2be0
AS
10307int
10308main ()
10309{
98418dba 10310return h_errno;
503d2be0
AS
10311 ;
10312 return 0;
10313}
10314_ACEOF
10315rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10316if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
10317 (eval $ac_link) 2>&5
10318 ac_status=$?
c0d27fcc 10319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
10320 (exit $ac_status); } &&
10321 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10322 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
10323 (eval $ac_try) 2>&5
10324 ac_status=$?
c0d27fcc 10325 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 10326 (exit $ac_status); }; }; then
98418dba 10327 emacs_cv_netdb_declares_h_errno=yes
73b77ee5 10328else
503d2be0 10329 echo "$as_me: failed program was:" >&5
cd958eb3
MB
10330sed 's/^/| /' conftest.$ac_ext >&5
10331
98418dba 10332emacs_cv_netdb_declares_h_errno=no
73b77ee5 10333fi
503d2be0 10334rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
98418dba 10335fi
c0d27fcc 10336echo "$as_me:$LINENO: result: $emacs_cv_netdb_declares_h_errno" >&5
98418dba
CW
10337echo "${ECHO_T}$emacs_cv_netdb_declares_h_errno" >&6
10338if test $emacs_cv_netdb_declares_h_errno = yes; then
b936fae4 10339
c0d27fcc 10340cat >>confdefs.h <<\_ACEOF
98418dba 10341#define HAVE_H_ERRNO 1
c0d27fcc 10342_ACEOF
73b77ee5 10343
98418dba
CW
10344fi
10345
10346# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
10347# for constant arguments. Useless!
c0d27fcc 10348echo "$as_me:$LINENO: checking for working alloca.h" >&5
98418dba
CW
10349echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
10350if test "${ac_cv_working_alloca_h+set}" = set; then
10351 echo $ECHO_N "(cached) $ECHO_C" >&6
10352else
10353 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 10354#line $LINENO "configure"
cd958eb3
MB
10355/* confdefs.h. */
10356_ACEOF
10357cat confdefs.h >>conftest.$ac_ext
10358cat >>conftest.$ac_ext <<_ACEOF
10359/* end confdefs.h. */
98418dba 10360#include <alloca.h>
503d2be0
AS
10361int
10362main ()
10363{
98418dba 10364char *p = (char *) alloca (2 * sizeof (int));
503d2be0
AS
10365 ;
10366 return 0;
10367}
10368_ACEOF
10369rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10370if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
10371 (eval $ac_link) 2>&5
10372 ac_status=$?
c0d27fcc 10373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
10374 (exit $ac_status); } &&
10375 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10376 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
10377 (eval $ac_try) 2>&5
10378 ac_status=$?
c0d27fcc 10379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 10380 (exit $ac_status); }; }; then
98418dba 10381 ac_cv_working_alloca_h=yes
73b77ee5 10382else
503d2be0 10383 echo "$as_me: failed program was:" >&5
cd958eb3
MB
10384sed 's/^/| /' conftest.$ac_ext >&5
10385
98418dba 10386ac_cv_working_alloca_h=no
73b77ee5 10387fi
503d2be0 10388rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
98418dba 10389fi
c0d27fcc 10390echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
98418dba
CW
10391echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
10392if test $ac_cv_working_alloca_h = yes; then
73b77ee5 10393
c0d27fcc 10394cat >>confdefs.h <<\_ACEOF
98418dba 10395#define HAVE_ALLOCA_H 1
c0d27fcc 10396_ACEOF
98418dba
CW
10397
10398fi
10399
c0d27fcc 10400echo "$as_me:$LINENO: checking for alloca" >&5
98418dba
CW
10401echo $ECHO_N "checking for alloca... $ECHO_C" >&6
10402if test "${ac_cv_func_alloca_works+set}" = set; then
10403 echo $ECHO_N "(cached) $ECHO_C" >&6
10404else
503d2be0 10405 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 10406#line $LINENO "configure"
cd958eb3
MB
10407/* confdefs.h. */
10408_ACEOF
10409cat confdefs.h >>conftest.$ac_ext
10410cat >>conftest.$ac_ext <<_ACEOF
10411/* end confdefs.h. */
98418dba
CW
10412#ifdef __GNUC__
10413# define alloca __builtin_alloca
10414#else
10415# ifdef _MSC_VER
10416# include <malloc.h>
10417# define alloca _alloca
10418# else
10419# if HAVE_ALLOCA_H
10420# include <alloca.h>
10421# else
10422# ifdef _AIX
10423 #pragma alloca
10424# else
10425# ifndef alloca /* predefined by HP cc +Olibcalls */
10426char *alloca ();
10427# endif
10428# endif
10429# endif
10430# endif
10431#endif
10432
503d2be0
AS
10433int
10434main ()
10435{
98418dba 10436char *p = (char *) alloca (1);
503d2be0
AS
10437 ;
10438 return 0;
10439}
10440_ACEOF
10441rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10442if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
10443 (eval $ac_link) 2>&5
10444 ac_status=$?
c0d27fcc 10445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
10446 (exit $ac_status); } &&
10447 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10448 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
10449 (eval $ac_try) 2>&5
10450 ac_status=$?
c0d27fcc 10451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 10452 (exit $ac_status); }; }; then
98418dba 10453 ac_cv_func_alloca_works=yes
ac95a621 10454else
503d2be0 10455 echo "$as_me: failed program was:" >&5
cd958eb3
MB
10456sed 's/^/| /' conftest.$ac_ext >&5
10457
98418dba 10458ac_cv_func_alloca_works=no
ac95a621 10459fi
503d2be0 10460rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
98418dba 10461fi
c0d27fcc 10462echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
98418dba 10463echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
ac95a621 10464
98418dba
CW
10465if test $ac_cv_func_alloca_works = yes; then
10466
c0d27fcc 10467cat >>confdefs.h <<\_ACEOF
98418dba 10468#define HAVE_ALLOCA 1
c0d27fcc 10469_ACEOF
98418dba
CW
10470
10471else
10472 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
10473# that cause trouble. Some versions do not even contain alloca or
10474# contain a buggy version. If you still want to use their alloca,
10475# use ar to extract alloca.o from them instead of compiling alloca.c.
10476
10477ALLOCA=alloca.$ac_objext
10478
c0d27fcc 10479cat >>confdefs.h <<\_ACEOF
98418dba 10480#define C_ALLOCA 1
c0d27fcc 10481_ACEOF
98418dba 10482
c0d27fcc
MR
10483
10484echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
98418dba
CW
10485echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
10486if test "${ac_cv_os_cray+set}" = set; then
10487 echo $ECHO_N "(cached) $ECHO_C" >&6
10488else
10489 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 10490#line $LINENO "configure"
cd958eb3
MB
10491/* confdefs.h. */
10492_ACEOF
10493cat confdefs.h >>conftest.$ac_ext
10494cat >>conftest.$ac_ext <<_ACEOF
10495/* end confdefs.h. */
98418dba
CW
10496#if defined(CRAY) && ! defined(CRAY2)
10497webecray
10498#else
10499wenotbecray
10500#endif
10501
10502_ACEOF
10503if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 10504 $EGREP "webecray" >/dev/null 2>&1; then
98418dba
CW
10505 ac_cv_os_cray=yes
10506else
10507 ac_cv_os_cray=no
10508fi
10509rm -f conftest*
ac95a621 10510
98418dba 10511fi
c0d27fcc 10512echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
98418dba
CW
10513echo "${ECHO_T}$ac_cv_os_cray" >&6
10514if test $ac_cv_os_cray = yes; then
10515 for ac_func in _getb67 GETB67 getb67; do
10516 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 10517echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
10518echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10519if eval "test \"\${$as_ac_var+set}\" = set"; then
10520 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 10521else
503d2be0 10522 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 10523#line $LINENO "configure"
cd958eb3
MB
10524/* confdefs.h. */
10525_ACEOF
10526cat confdefs.h >>conftest.$ac_ext
10527cat >>conftest.$ac_ext <<_ACEOF
10528/* end confdefs.h. */
73b77ee5 10529/* System header to define __stub macros and hopefully few prototypes,
9e71690e
DK
10530 which can conflict with char $ac_func (); below.
10531 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10532 <limits.h> exists even on freestanding compilers. */
10533#ifdef __STDC__
10534# include <limits.h>
10535#else
10536# include <assert.h>
10537#endif
73b77ee5 10538/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
10539#ifdef __cplusplus
10540extern "C"
cd958eb3 10541{
503d2be0 10542#endif
73b77ee5 10543/* We use char because int might match the return type of a gcc2
503d2be0
AS
10544 builtin and then its argument prototype would still apply. */
10545char $ac_func ();
73b77ee5
GM
10546/* The GNU C library defines this for functions which it implements
10547 to always fail with ENOSYS. Some functions are actually named
10548 something starting with __ and the normal name is an alias. */
10549#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10550choke me
10551#else
cd958eb3
MB
10552char (*f) () = $ac_func;
10553#endif
10554#ifdef __cplusplus
10555}
73b77ee5
GM
10556#endif
10557
cd958eb3
MB
10558int
10559main ()
10560{
9e71690e 10561return f != $ac_func;
503d2be0
AS
10562 ;
10563 return 0;
10564}
10565_ACEOF
10566rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10567if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
10568 (eval $ac_link) 2>&5
10569 ac_status=$?
c0d27fcc 10570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
10571 (exit $ac_status); } &&
10572 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10573 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
10574 (eval $ac_try) 2>&5
10575 ac_status=$?
c0d27fcc 10576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
10577 (exit $ac_status); }; }; then
10578 eval "$as_ac_var=yes"
10579else
10580 echo "$as_me: failed program was:" >&5
cd958eb3
MB
10581sed 's/^/| /' conftest.$ac_ext >&5
10582
503d2be0
AS
10583eval "$as_ac_var=no"
10584fi
10585rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10586fi
c0d27fcc 10587echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
10588echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10589if test `eval echo '${'$as_ac_var'}'` = yes; then
73b77ee5 10590
c0d27fcc 10591cat >>confdefs.h <<_ACEOF
98418dba 10592#define CRAY_STACKSEG_END $ac_func
c0d27fcc 10593_ACEOF
98418dba
CW
10594
10595 break
73b77ee5 10596fi
73b77ee5 10597
98418dba 10598 done
73b77ee5
GM
10599fi
10600
c0d27fcc 10601echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
98418dba
CW
10602echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
10603if test "${ac_cv_c_stack_direction+set}" = set; then
503d2be0 10604 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
10605else
10606 if test "$cross_compiling" = yes; then
10607 ac_cv_c_stack_direction=0
73b77ee5 10608else
503d2be0 10609 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 10610#line $LINENO "configure"
cd958eb3
MB
10611/* confdefs.h. */
10612_ACEOF
10613cat confdefs.h >>conftest.$ac_ext
10614cat >>conftest.$ac_ext <<_ACEOF
10615/* end confdefs.h. */
503d2be0 10616int
98418dba 10617find_stack_direction ()
503d2be0 10618{
98418dba
CW
10619 static char *addr = 0;
10620 auto char dummy;
10621 if (addr == 0)
10622 {
10623 addr = &dummy;
10624 return find_stack_direction ();
10625 }
73b77ee5 10626 else
98418dba
CW
10627 return (&dummy > addr) ? 1 : -1;
10628}
ba4481b5 10629
503d2be0
AS
10630int
10631main ()
10632{
98418dba 10633 exit (find_stack_direction () < 0);
503d2be0
AS
10634}
10635_ACEOF
98418dba 10636rm -f conftest$ac_exeext
c0d27fcc 10637if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
10638 (eval $ac_link) 2>&5
10639 ac_status=$?
c0d27fcc 10640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10641 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 10642 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
10643 (eval $ac_try) 2>&5
10644 ac_status=$?
c0d27fcc 10645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 10646 (exit $ac_status); }; }; then
98418dba 10647 ac_cv_c_stack_direction=1
ba4481b5 10648else
98418dba
CW
10649 echo "$as_me: program exited with status $ac_status" >&5
10650echo "$as_me: failed program was:" >&5
cd958eb3
MB
10651sed 's/^/| /' conftest.$ac_ext >&5
10652
c0d27fcc 10653( exit $ac_status )
98418dba 10654ac_cv_c_stack_direction=-1
ba4481b5 10655fi
6bae0ccf 10656rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 10657fi
98418dba 10658fi
c0d27fcc 10659echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
98418dba
CW
10660echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
10661
c0d27fcc 10662cat >>confdefs.h <<_ACEOF
98418dba 10663#define STACK_DIRECTION $ac_cv_c_stack_direction
c0d27fcc
MR
10664_ACEOF
10665
ba4481b5 10666
ba4481b5
DL
10667fi
10668
c0d27fcc 10669
98418dba
CW
10670# fmod, logb, and frexp are found in -lm on most systems.
10671# On HPUX 9.01, -lm does not contain logb, so check for sqrt.
10672
c0d27fcc 10673echo "$as_me:$LINENO: checking for sqrt in -lm" >&5
98418dba
CW
10674echo $ECHO_N "checking for sqrt in -lm... $ECHO_C" >&6
10675if test "${ac_cv_lib_m_sqrt+set}" = set; then
503d2be0 10676 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 10677else
98418dba
CW
10678 ac_check_lib_save_LIBS=$LIBS
10679LIBS="-lm $LIBS"
10680cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 10681#line $LINENO "configure"
cd958eb3
MB
10682/* confdefs.h. */
10683_ACEOF
10684cat confdefs.h >>conftest.$ac_ext
10685cat >>conftest.$ac_ext <<_ACEOF
10686/* end confdefs.h. */
ba4481b5 10687
98418dba
CW
10688/* Override any gcc2 internal prototype to avoid an error. */
10689#ifdef __cplusplus
10690extern "C"
10691#endif
10692/* We use char because int might match the return type of a gcc2
10693 builtin and then its argument prototype would still apply. */
10694char sqrt ();
503d2be0
AS
10695int
10696main ()
10697{
98418dba 10698sqrt ();
503d2be0
AS
10699 ;
10700 return 0;
10701}
10702_ACEOF
10703rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10704if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
10705 (eval $ac_link) 2>&5
10706 ac_status=$?
c0d27fcc 10707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
10708 (exit $ac_status); } &&
10709 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10710 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
10711 (eval $ac_try) 2>&5
10712 ac_status=$?
c0d27fcc 10713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 10714 (exit $ac_status); }; }; then
98418dba 10715 ac_cv_lib_m_sqrt=yes
ba4481b5 10716else
503d2be0 10717 echo "$as_me: failed program was:" >&5
cd958eb3
MB
10718sed 's/^/| /' conftest.$ac_ext >&5
10719
98418dba 10720ac_cv_lib_m_sqrt=no
ba4481b5 10721fi
503d2be0 10722rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
98418dba 10723LIBS=$ac_check_lib_save_LIBS
ba4481b5 10724fi
c0d27fcc 10725echo "$as_me:$LINENO: result: $ac_cv_lib_m_sqrt" >&5
98418dba
CW
10726echo "${ECHO_T}$ac_cv_lib_m_sqrt" >&6
10727if test $ac_cv_lib_m_sqrt = yes; then
c0d27fcc 10728 cat >>confdefs.h <<_ACEOF
98418dba 10729#define HAVE_LIBM 1
c0d27fcc 10730_ACEOF
98418dba
CW
10731
10732 LIBS="-lm $LIBS"
ba4481b5 10733
ba4481b5
DL
10734fi
10735
c0d27fcc 10736
98418dba
CW
10737# Check for mail-locking functions in a "mail" library
10738
c0d27fcc 10739echo "$as_me:$LINENO: checking for maillock in -lmail" >&5
98418dba
CW
10740echo $ECHO_N "checking for maillock in -lmail... $ECHO_C" >&6
10741if test "${ac_cv_lib_mail_maillock+set}" = set; then
503d2be0 10742 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 10743else
98418dba
CW
10744 ac_check_lib_save_LIBS=$LIBS
10745LIBS="-lmail $LIBS"
10746cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 10747#line $LINENO "configure"
cd958eb3
MB
10748/* confdefs.h. */
10749_ACEOF
10750cat confdefs.h >>conftest.$ac_ext
10751cat >>conftest.$ac_ext <<_ACEOF
10752/* end confdefs.h. */
98418dba
CW
10753
10754/* Override any gcc2 internal prototype to avoid an error. */
10755#ifdef __cplusplus
10756extern "C"
10757#endif
10758/* We use char because int might match the return type of a gcc2
10759 builtin and then its argument prototype would still apply. */
10760char maillock ();
503d2be0
AS
10761int
10762main ()
10763{
98418dba 10764maillock ();
503d2be0
AS
10765 ;
10766 return 0;
10767}
10768_ACEOF
10769rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10770if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
10771 (eval $ac_link) 2>&5
10772 ac_status=$?
c0d27fcc 10773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
10774 (exit $ac_status); } &&
10775 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10776 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
10777 (eval $ac_try) 2>&5
10778 ac_status=$?
c0d27fcc 10779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 10780 (exit $ac_status); }; }; then
98418dba 10781 ac_cv_lib_mail_maillock=yes
ba4481b5 10782else
503d2be0 10783 echo "$as_me: failed program was:" >&5
cd958eb3
MB
10784sed 's/^/| /' conftest.$ac_ext >&5
10785
98418dba 10786ac_cv_lib_mail_maillock=no
ba4481b5 10787fi
503d2be0 10788rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
98418dba 10789LIBS=$ac_check_lib_save_LIBS
ba4481b5 10790fi
c0d27fcc 10791echo "$as_me:$LINENO: result: $ac_cv_lib_mail_maillock" >&5
98418dba
CW
10792echo "${ECHO_T}$ac_cv_lib_mail_maillock" >&6
10793if test $ac_cv_lib_mail_maillock = yes; then
c0d27fcc 10794 cat >>confdefs.h <<_ACEOF
98418dba 10795#define HAVE_LIBMAIL 1
c0d27fcc 10796_ACEOF
ba4481b5 10797
98418dba 10798 LIBS="-lmail $LIBS"
ba4481b5 10799
98418dba 10800fi
ba4481b5 10801
c0d27fcc
MR
10802
10803echo "$as_me:$LINENO: checking for maillock in -llockfile" >&5
98418dba
CW
10804echo $ECHO_N "checking for maillock in -llockfile... $ECHO_C" >&6
10805if test "${ac_cv_lib_lockfile_maillock+set}" = set; then
503d2be0 10806 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 10807else
503d2be0 10808 ac_check_lib_save_LIBS=$LIBS
98418dba 10809LIBS="-llockfile $LIBS"
503d2be0 10810cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 10811#line $LINENO "configure"
cd958eb3
MB
10812/* confdefs.h. */
10813_ACEOF
10814cat confdefs.h >>conftest.$ac_ext
10815cat >>conftest.$ac_ext <<_ACEOF
10816/* end confdefs.h. */
503d2be0 10817
ba4481b5 10818/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
10819#ifdef __cplusplus
10820extern "C"
10821#endif
ba4481b5 10822/* We use char because int might match the return type of a gcc2
503d2be0 10823 builtin and then its argument prototype would still apply. */
98418dba 10824char maillock ();
503d2be0
AS
10825int
10826main ()
10827{
98418dba 10828maillock ();
503d2be0
AS
10829 ;
10830 return 0;
10831}
10832_ACEOF
10833rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10834if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
10835 (eval $ac_link) 2>&5
10836 ac_status=$?
c0d27fcc 10837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
10838 (exit $ac_status); } &&
10839 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10840 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
10841 (eval $ac_try) 2>&5
10842 ac_status=$?
c0d27fcc 10843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 10844 (exit $ac_status); }; }; then
98418dba 10845 ac_cv_lib_lockfile_maillock=yes
503d2be0
AS
10846else
10847 echo "$as_me: failed program was:" >&5
cd958eb3
MB
10848sed 's/^/| /' conftest.$ac_ext >&5
10849
98418dba
CW
10850ac_cv_lib_lockfile_maillock=no
10851fi
10852rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10853LIBS=$ac_check_lib_save_LIBS
10854fi
c0d27fcc 10855echo "$as_me:$LINENO: result: $ac_cv_lib_lockfile_maillock" >&5
98418dba
CW
10856echo "${ECHO_T}$ac_cv_lib_lockfile_maillock" >&6
10857if test $ac_cv_lib_lockfile_maillock = yes; then
c0d27fcc 10858 cat >>confdefs.h <<_ACEOF
98418dba 10859#define HAVE_LIBLOCKFILE 1
c0d27fcc 10860_ACEOF
98418dba
CW
10861
10862 LIBS="-llockfile $LIBS"
10863
10864fi
10865
10866# If we have the shared liblockfile, assume we must use it for mail
10867# locking (e.g. Debian). If we couldn't link against liblockfile
10868# (no liblockfile.a installed), ensure that we don't need to.
10869if test "$ac_cv_lib_lockfile_maillock" = no; then
10870 # Extract the first word of "liblockfile.so", so it can be a program name with args.
10871set dummy liblockfile.so; ac_word=$2
c0d27fcc 10872echo "$as_me:$LINENO: checking for $ac_word" >&5
98418dba
CW
10873echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10874if test "${ac_cv_prog_liblockfile+set}" = set; then
10875 echo $ECHO_N "(cached) $ECHO_C" >&6
10876else
10877 if test -n "$liblockfile"; then
10878 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
10879else
c0d27fcc 10880as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6bae0ccf
DL
10881as_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
10882for as_dir in $as_dummy
c0d27fcc
MR
10883do
10884 IFS=$as_save_IFS
10885 test -z "$as_dir" && as_dir=.
10886 for ac_exec_ext in '' $ac_executable_extensions; do
10887 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10888 ac_cv_prog_liblockfile="yes"
10889 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
10890 break 2
10891 fi
10892done
98418dba
CW
10893done
10894
10895 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
503d2be0 10896fi
503d2be0 10897fi
98418dba
CW
10898liblockfile=$ac_cv_prog_liblockfile
10899if test -n "$liblockfile"; then
c0d27fcc 10900 echo "$as_me:$LINENO: result: $liblockfile" >&5
98418dba
CW
10901echo "${ECHO_T}$liblockfile" >&6
10902else
c0d27fcc 10903 echo "$as_me:$LINENO: result: no" >&5
98418dba 10904echo "${ECHO_T}no" >&6
ba4481b5
DL
10905fi
10906
98418dba 10907 if test $ac_cv_prog_liblockfile = yes; then
c0d27fcc 10908 { { echo "$as_me:$LINENO: error: Shared liblockfile found but can't link against it.
98418dba
CW
10909This probably means that movemail could lose mail.
10910There may be a \`development' package to install containing liblockfile." >&5
10911echo "$as_me: error: Shared liblockfile found but can't link against it.
10912This probably means that movemail could lose mail.
10913There may be a \`development' package to install containing liblockfile." >&2;}
10914 { (exit 1); exit 1; }; }
b936fae4 10915 else
c0d27fcc 10916cat >>confdefs.h <<\_ACEOF
98418dba 10917#define LIBMAIL -llockfile
c0d27fcc 10918_ACEOF
457b792c 10919
98418dba
CW
10920 fi
10921 else :
10922fi
503d2be0 10923
98418dba
CW
10924for ac_func in touchlock
10925do
10926as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 10927echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
10928echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10929if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 10930 echo $ECHO_N "(cached) $ECHO_C" >&6
457b792c 10931else
98418dba 10932 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 10933#line $LINENO "configure"
cd958eb3
MB
10934/* confdefs.h. */
10935_ACEOF
10936cat confdefs.h >>conftest.$ac_ext
10937cat >>conftest.$ac_ext <<_ACEOF
10938/* end confdefs.h. */
98418dba 10939/* System header to define __stub macros and hopefully few prototypes,
9e71690e
DK
10940 which can conflict with char $ac_func (); below.
10941 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10942 <limits.h> exists even on freestanding compilers. */
10943#ifdef __STDC__
10944# include <limits.h>
10945#else
10946# include <assert.h>
10947#endif
457b792c 10948/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
10949#ifdef __cplusplus
10950extern "C"
cd958eb3 10951{
503d2be0 10952#endif
457b792c 10953/* We use char because int might match the return type of a gcc2
503d2be0 10954 builtin and then its argument prototype would still apply. */
98418dba 10955char $ac_func ();
98418dba
CW
10956/* The GNU C library defines this for functions which it implements
10957 to always fail with ENOSYS. Some functions are actually named
10958 something starting with __ and the normal name is an alias. */
10959#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10960choke me
10961#else
cd958eb3 10962char (*f) () = $ac_func;
98418dba 10963#endif
cd958eb3
MB
10964#ifdef __cplusplus
10965}
10966#endif
10967
10968int
10969main ()
10970{
9e71690e 10971return f != $ac_func;
503d2be0
AS
10972 ;
10973 return 0;
10974}
10975_ACEOF
10976rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10977if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
10978 (eval $ac_link) 2>&5
10979 ac_status=$?
c0d27fcc 10980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
10981 (exit $ac_status); } &&
10982 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10983 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
10984 (eval $ac_try) 2>&5
10985 ac_status=$?
c0d27fcc 10986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 10987 (exit $ac_status); }; }; then
98418dba 10988 eval "$as_ac_var=yes"
503d2be0
AS
10989else
10990 echo "$as_me: failed program was:" >&5
cd958eb3
MB
10991sed 's/^/| /' conftest.$ac_ext >&5
10992
98418dba 10993eval "$as_ac_var=no"
503d2be0
AS
10994fi
10995rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
503d2be0 10996fi
c0d27fcc 10997echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
10998echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10999if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 11000 cat >>confdefs.h <<_ACEOF
98418dba 11001#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 11002_ACEOF
457b792c 11003
457b792c 11004fi
98418dba 11005done
457b792c 11006
c0d27fcc 11007
98418dba
CW
11008for ac_header in maillock.h
11009do
11010as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
11011if eval "test \"\${$as_ac_Header+set}\" = set"; then
11012 echo "$as_me:$LINENO: checking for $ac_header" >&5
98418dba
CW
11013echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11014if eval "test \"\${$as_ac_Header+set}\" = set"; then
503d2be0 11015 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
11016fi
11017echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
11018echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
ba4481b5 11019else
c0d27fcc
MR
11020 # Is the header compilable?
11021echo "$as_me:$LINENO: checking $ac_header usability" >&5
11022echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
11023cat >conftest.$ac_ext <<_ACEOF
11024#line $LINENO "configure"
cd958eb3
MB
11025/* confdefs.h. */
11026_ACEOF
11027cat confdefs.h >>conftest.$ac_ext
11028cat >>conftest.$ac_ext <<_ACEOF
11029/* end confdefs.h. */
c0d27fcc
MR
11030$ac_includes_default
11031#include <$ac_header>
11032_ACEOF
11033rm -f conftest.$ac_objext
11034if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11035 (eval $ac_compile) 2>&5
11036 ac_status=$?
11037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11038 (exit $ac_status); } &&
11039 { ac_try='test -s conftest.$ac_objext'
11040 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11041 (eval $ac_try) 2>&5
11042 ac_status=$?
11043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11044 (exit $ac_status); }; }; then
11045 ac_header_compiler=yes
11046else
11047 echo "$as_me: failed program was:" >&5
cd958eb3
MB
11048sed 's/^/| /' conftest.$ac_ext >&5
11049
c0d27fcc
MR
11050ac_header_compiler=no
11051fi
11052rm -f conftest.$ac_objext conftest.$ac_ext
11053echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11054echo "${ECHO_T}$ac_header_compiler" >&6
11055
11056# Is the header present?
11057echo "$as_me:$LINENO: checking $ac_header presence" >&5
11058echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
11059cat >conftest.$ac_ext <<_ACEOF
11060#line $LINENO "configure"
cd958eb3
MB
11061/* confdefs.h. */
11062_ACEOF
11063cat confdefs.h >>conftest.$ac_ext
11064cat >>conftest.$ac_ext <<_ACEOF
11065/* end confdefs.h. */
98418dba 11066#include <$ac_header>
503d2be0 11067_ACEOF
c0d27fcc 11068if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba 11069 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
503d2be0 11070 ac_status=$?
6bae0ccf 11071 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
11072 rm -f conftest.er1
11073 cat conftest.err >&5
c0d27fcc 11074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
11075 (exit $ac_status); } >/dev/null; then
11076 if test -s conftest.err; then
11077 ac_cpp_err=$ac_c_preproc_warn_flag
11078 else
11079 ac_cpp_err=
11080 fi
503d2be0 11081else
98418dba 11082 ac_cpp_err=yes
503d2be0 11083fi
98418dba 11084if test -z "$ac_cpp_err"; then
c0d27fcc 11085 ac_header_preproc=yes
98418dba
CW
11086else
11087 echo "$as_me: failed program was:" >&5
cd958eb3
MB
11088sed 's/^/| /' conftest.$ac_ext >&5
11089
c0d27fcc 11090 ac_header_preproc=no
503d2be0 11091fi
98418dba 11092rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
11093echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11094echo "${ECHO_T}$ac_header_preproc" >&6
11095
11096# So? What about this header?
11097case $ac_header_compiler:$ac_header_preproc in
11098 yes:no )
11099 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11100echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
11101 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
11102echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
11103 (
11104 cat <<\_ASBOX
11105## ------------------------------------ ##
11106## Report this to bug-autoconf@gnu.org. ##
11107## ------------------------------------ ##
11108_ASBOX
11109 ) |
11110 sed "s/^/$as_me: WARNING: /" >&2
11111 ;;
c0d27fcc
MR
11112 no:yes )
11113 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
11114echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
11115 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
11116echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
11117 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
11118echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
11119 (
11120 cat <<\_ASBOX
11121## ------------------------------------ ##
11122## Report this to bug-autoconf@gnu.org. ##
11123## ------------------------------------ ##
11124_ASBOX
11125 ) |
11126 sed "s/^/$as_me: WARNING: /" >&2
11127 ;;
c0d27fcc
MR
11128esac
11129echo "$as_me:$LINENO: checking for $ac_header" >&5
11130echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11131if eval "test \"\${$as_ac_Header+set}\" = set"; then
11132 echo $ECHO_N "(cached) $ECHO_C" >&6
11133else
11134 eval "$as_ac_Header=$ac_header_preproc"
ba4481b5 11135fi
c0d27fcc 11136echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 11137echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
11138
11139fi
98418dba 11140if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 11141 cat >>confdefs.h <<_ACEOF
98418dba 11142#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 11143_ACEOF
48d4b120 11144
ba4481b5 11145fi
c0d27fcc 11146
98418dba
CW
11147done
11148
c0d27fcc
MR
11149
11150
11151
11152
11153
11154
11155
11156
11157
11158
11159
11160
11161
11162
11163
11164
11165
11166
11167
11168
11169
11170
11171
11172
11173
11174
11175
11176
11177
11178
11179
11180
11181
11182
11183
11184
11185
11186
11187
11188
11189
11190
11191
11192
11193
11194
11195
11196
11197
11198
11199
11200
11201
11202
11203
22044edf
DL
11204
11205
c0d27fcc 11206
cd958eb3 11207
c0d27fcc
MR
11208
11209
98418dba
CW
11210for ac_func in gethostname getdomainname dup2 \
11211rename closedir mkdir rmdir sysinfo \
11212random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime res_init setsid \
11213strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \
11214utimes setrlimit setpgid getcwd getwd shutdown strftime getaddrinfo \
11215__fpending mblen mbrlen mbsinit strsignal setitimer ualarm index rindex \
11216sendto recvfrom getsockopt setsockopt getsockname getpeername \
cd958eb3 11217gai_strerror mkstemp getline getdelim mremap memmove fsync bzero memset
98418dba
CW
11218do
11219as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 11220echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
11221echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11222if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 11223 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 11224else
503d2be0 11225 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 11226#line $LINENO "configure"
cd958eb3
MB
11227/* confdefs.h. */
11228_ACEOF
11229cat confdefs.h >>conftest.$ac_ext
11230cat >>conftest.$ac_ext <<_ACEOF
11231/* end confdefs.h. */
98418dba 11232/* System header to define __stub macros and hopefully few prototypes,
9e71690e
DK
11233 which can conflict with char $ac_func (); below.
11234 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11235 <limits.h> exists even on freestanding compilers. */
11236#ifdef __STDC__
11237# include <limits.h>
11238#else
11239# include <assert.h>
11240#endif
ba4481b5 11241/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
11242#ifdef __cplusplus
11243extern "C"
cd958eb3 11244{
503d2be0 11245#endif
ba4481b5 11246/* We use char because int might match the return type of a gcc2
503d2be0 11247 builtin and then its argument prototype would still apply. */
98418dba 11248char $ac_func ();
98418dba
CW
11249/* The GNU C library defines this for functions which it implements
11250 to always fail with ENOSYS. Some functions are actually named
11251 something starting with __ and the normal name is an alias. */
11252#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11253choke me
11254#else
cd958eb3
MB
11255char (*f) () = $ac_func;
11256#endif
11257#ifdef __cplusplus
11258}
98418dba
CW
11259#endif
11260
cd958eb3
MB
11261int
11262main ()
11263{
9e71690e 11264return f != $ac_func;
503d2be0
AS
11265 ;
11266 return 0;
11267}
11268_ACEOF
11269rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 11270if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
11271 (eval $ac_link) 2>&5
11272 ac_status=$?
c0d27fcc 11273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
11274 (exit $ac_status); } &&
11275 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 11276 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
11277 (eval $ac_try) 2>&5
11278 ac_status=$?
c0d27fcc 11279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 11280 (exit $ac_status); }; }; then
98418dba 11281 eval "$as_ac_var=yes"
503d2be0
AS
11282else
11283 echo "$as_me: failed program was:" >&5
cd958eb3
MB
11284sed 's/^/| /' conftest.$ac_ext >&5
11285
98418dba 11286eval "$as_ac_var=no"
503d2be0
AS
11287fi
11288rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
ba4481b5 11289fi
c0d27fcc 11290echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
11291echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11292if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 11293 cat >>confdefs.h <<_ACEOF
98418dba 11294#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 11295_ACEOF
ba4481b5 11296
ba4481b5 11297fi
98418dba 11298done
ba4481b5 11299
c0d27fcc
MR
11300
11301
98418dba
CW
11302for ac_header in sys/un.h
11303do
11304as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
11305if eval "test \"\${$as_ac_Header+set}\" = set"; then
11306 echo "$as_me:$LINENO: checking for $ac_header" >&5
98418dba
CW
11307echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11308if eval "test \"\${$as_ac_Header+set}\" = set"; then
11309 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
11310fi
11311echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
11312echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 11313else
c0d27fcc
MR
11314 # Is the header compilable?
11315echo "$as_me:$LINENO: checking $ac_header usability" >&5
11316echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
11317cat >conftest.$ac_ext <<_ACEOF
11318#line $LINENO "configure"
cd958eb3
MB
11319/* confdefs.h. */
11320_ACEOF
11321cat confdefs.h >>conftest.$ac_ext
11322cat >>conftest.$ac_ext <<_ACEOF
11323/* end confdefs.h. */
c0d27fcc
MR
11324$ac_includes_default
11325#include <$ac_header>
11326_ACEOF
11327rm -f conftest.$ac_objext
11328if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11329 (eval $ac_compile) 2>&5
11330 ac_status=$?
11331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11332 (exit $ac_status); } &&
11333 { ac_try='test -s conftest.$ac_objext'
11334 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11335 (eval $ac_try) 2>&5
11336 ac_status=$?
11337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11338 (exit $ac_status); }; }; then
11339 ac_header_compiler=yes
11340else
11341 echo "$as_me: failed program was:" >&5
cd958eb3
MB
11342sed 's/^/| /' conftest.$ac_ext >&5
11343
c0d27fcc
MR
11344ac_header_compiler=no
11345fi
11346rm -f conftest.$ac_objext conftest.$ac_ext
11347echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11348echo "${ECHO_T}$ac_header_compiler" >&6
11349
11350# Is the header present?
11351echo "$as_me:$LINENO: checking $ac_header presence" >&5
11352echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
11353cat >conftest.$ac_ext <<_ACEOF
11354#line $LINENO "configure"
cd958eb3
MB
11355/* confdefs.h. */
11356_ACEOF
11357cat confdefs.h >>conftest.$ac_ext
11358cat >>conftest.$ac_ext <<_ACEOF
11359/* end confdefs.h. */
98418dba 11360#include <$ac_header>
503d2be0 11361_ACEOF
c0d27fcc 11362if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
11363 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11364 ac_status=$?
6bae0ccf 11365 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
11366 rm -f conftest.er1
11367 cat conftest.err >&5
c0d27fcc 11368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
11369 (exit $ac_status); } >/dev/null; then
11370 if test -s conftest.err; then
11371 ac_cpp_err=$ac_c_preproc_warn_flag
11372 else
11373 ac_cpp_err=
11374 fi
11375else
11376 ac_cpp_err=yes
11377fi
11378if test -z "$ac_cpp_err"; then
c0d27fcc 11379 ac_header_preproc=yes
ba4481b5 11380else
503d2be0 11381 echo "$as_me: failed program was:" >&5
cd958eb3
MB
11382sed 's/^/| /' conftest.$ac_ext >&5
11383
c0d27fcc 11384 ac_header_preproc=no
ba4481b5 11385fi
503d2be0 11386rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
11387echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11388echo "${ECHO_T}$ac_header_preproc" >&6
11389
11390# So? What about this header?
11391case $ac_header_compiler:$ac_header_preproc in
11392 yes:no )
11393 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11394echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
11395 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
11396echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
11397 (
11398 cat <<\_ASBOX
11399## ------------------------------------ ##
11400## Report this to bug-autoconf@gnu.org. ##
11401## ------------------------------------ ##
11402_ASBOX
11403 ) |
11404 sed "s/^/$as_me: WARNING: /" >&2
11405 ;;
c0d27fcc
MR
11406 no:yes )
11407 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
11408echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
11409 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
11410echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
11411 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
11412echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
11413 (
11414 cat <<\_ASBOX
11415## ------------------------------------ ##
11416## Report this to bug-autoconf@gnu.org. ##
11417## ------------------------------------ ##
11418_ASBOX
11419 ) |
11420 sed "s/^/$as_me: WARNING: /" >&2
11421 ;;
c0d27fcc
MR
11422esac
11423echo "$as_me:$LINENO: checking for $ac_header" >&5
11424echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11425if eval "test \"\${$as_ac_Header+set}\" = set"; then
11426 echo $ECHO_N "(cached) $ECHO_C" >&6
11427else
11428 eval "$as_ac_Header=$ac_header_preproc"
ba4481b5 11429fi
c0d27fcc 11430echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
925c2f3f 11431echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
11432
11433fi
925c2f3f 11434if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 11435 cat >>confdefs.h <<_ACEOF
925c2f3f 11436#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 11437_ACEOF
503d2be0 11438
925c2f3f 11439fi
c0d27fcc 11440
925c2f3f
EZ
11441done
11442
c0d27fcc
MR
11443
11444
11445
925c2f3f
EZ
11446for ac_header in sys/time.h unistd.h
11447do
11448as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
11449if eval "test \"\${$as_ac_Header+set}\" = set"; then
11450 echo "$as_me:$LINENO: checking for $ac_header" >&5
925c2f3f
EZ
11451echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11452if eval "test \"\${$as_ac_Header+set}\" = set"; then
11453 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
11454fi
11455echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
11456echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
925c2f3f 11457else
c0d27fcc
MR
11458 # Is the header compilable?
11459echo "$as_me:$LINENO: checking $ac_header usability" >&5
11460echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
11461cat >conftest.$ac_ext <<_ACEOF
11462#line $LINENO "configure"
cd958eb3
MB
11463/* confdefs.h. */
11464_ACEOF
11465cat confdefs.h >>conftest.$ac_ext
11466cat >>conftest.$ac_ext <<_ACEOF
11467/* end confdefs.h. */
c0d27fcc
MR
11468$ac_includes_default
11469#include <$ac_header>
11470_ACEOF
11471rm -f conftest.$ac_objext
11472if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11473 (eval $ac_compile) 2>&5
11474 ac_status=$?
11475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11476 (exit $ac_status); } &&
11477 { ac_try='test -s conftest.$ac_objext'
11478 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11479 (eval $ac_try) 2>&5
11480 ac_status=$?
11481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11482 (exit $ac_status); }; }; then
11483 ac_header_compiler=yes
11484else
11485 echo "$as_me: failed program was:" >&5
cd958eb3
MB
11486sed 's/^/| /' conftest.$ac_ext >&5
11487
c0d27fcc
MR
11488ac_header_compiler=no
11489fi
11490rm -f conftest.$ac_objext conftest.$ac_ext
11491echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11492echo "${ECHO_T}$ac_header_compiler" >&6
11493
11494# Is the header present?
11495echo "$as_me:$LINENO: checking $ac_header presence" >&5
11496echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
11497cat >conftest.$ac_ext <<_ACEOF
11498#line $LINENO "configure"
cd958eb3
MB
11499/* confdefs.h. */
11500_ACEOF
11501cat confdefs.h >>conftest.$ac_ext
11502cat >>conftest.$ac_ext <<_ACEOF
11503/* end confdefs.h. */
98418dba 11504#include <$ac_header>
503d2be0 11505_ACEOF
c0d27fcc 11506if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
11507 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11508 ac_status=$?
6bae0ccf 11509 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
11510 rm -f conftest.er1
11511 cat conftest.err >&5
c0d27fcc 11512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
11513 (exit $ac_status); } >/dev/null; then
11514 if test -s conftest.err; then
11515 ac_cpp_err=$ac_c_preproc_warn_flag
11516 else
11517 ac_cpp_err=
11518 fi
11519else
11520 ac_cpp_err=yes
11521fi
11522if test -z "$ac_cpp_err"; then
c0d27fcc 11523 ac_header_preproc=yes
98418dba
CW
11524else
11525 echo "$as_me: failed program was:" >&5
cd958eb3
MB
11526sed 's/^/| /' conftest.$ac_ext >&5
11527
c0d27fcc 11528 ac_header_preproc=no
98418dba
CW
11529fi
11530rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
11531echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11532echo "${ECHO_T}$ac_header_preproc" >&6
11533
11534# So? What about this header?
11535case $ac_header_compiler:$ac_header_preproc in
11536 yes:no )
11537 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11538echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
11539 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
11540echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
11541 (
11542 cat <<\_ASBOX
11543## ------------------------------------ ##
11544## Report this to bug-autoconf@gnu.org. ##
11545## ------------------------------------ ##
11546_ASBOX
11547 ) |
11548 sed "s/^/$as_me: WARNING: /" >&2
11549 ;;
c0d27fcc
MR
11550 no:yes )
11551 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
11552echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
11553 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
11554echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
11555 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
11556echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
11557 (
11558 cat <<\_ASBOX
11559## ------------------------------------ ##
11560## Report this to bug-autoconf@gnu.org. ##
11561## ------------------------------------ ##
11562_ASBOX
11563 ) |
11564 sed "s/^/$as_me: WARNING: /" >&2
11565 ;;
c0d27fcc
MR
11566esac
11567echo "$as_me:$LINENO: checking for $ac_header" >&5
11568echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11569if eval "test \"\${$as_ac_Header+set}\" = set"; then
11570 echo $ECHO_N "(cached) $ECHO_C" >&6
11571else
11572 eval "$as_ac_Header=$ac_header_preproc"
ffe36136 11573fi
c0d27fcc 11574echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 11575echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
11576
11577fi
98418dba 11578if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 11579 cat >>confdefs.h <<_ACEOF
98418dba 11580#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 11581_ACEOF
98418dba
CW
11582
11583fi
c0d27fcc 11584
98418dba
CW
11585done
11586
c0d27fcc 11587
98418dba
CW
11588for ac_func in alarm
11589do
11590as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 11591echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
11592echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11593if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 11594 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 11595else
98418dba 11596 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 11597#line $LINENO "configure"
cd958eb3
MB
11598/* confdefs.h. */
11599_ACEOF
11600cat confdefs.h >>conftest.$ac_ext
11601cat >>conftest.$ac_ext <<_ACEOF
11602/* end confdefs.h. */
98418dba 11603/* System header to define __stub macros and hopefully few prototypes,
9e71690e
DK
11604 which can conflict with char $ac_func (); below.
11605 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11606 <limits.h> exists even on freestanding compilers. */
11607#ifdef __STDC__
11608# include <limits.h>
11609#else
11610# include <assert.h>
11611#endif
ba4481b5 11612/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
11613#ifdef __cplusplus
11614extern "C"
cd958eb3 11615{
503d2be0 11616#endif
ba4481b5 11617/* We use char because int might match the return type of a gcc2
503d2be0 11618 builtin and then its argument prototype would still apply. */
98418dba 11619char $ac_func ();
98418dba
CW
11620/* The GNU C library defines this for functions which it implements
11621 to always fail with ENOSYS. Some functions are actually named
11622 something starting with __ and the normal name is an alias. */
11623#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11624choke me
11625#else
cd958eb3
MB
11626char (*f) () = $ac_func;
11627#endif
11628#ifdef __cplusplus
11629}
98418dba
CW
11630#endif
11631
cd958eb3
MB
11632int
11633main ()
11634{
9e71690e 11635return f != $ac_func;
503d2be0
AS
11636 ;
11637 return 0;
11638}
11639_ACEOF
11640rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 11641if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
11642 (eval $ac_link) 2>&5
11643 ac_status=$?
c0d27fcc 11644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
11645 (exit $ac_status); } &&
11646 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 11647 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
11648 (eval $ac_try) 2>&5
11649 ac_status=$?
c0d27fcc 11650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 11651 (exit $ac_status); }; }; then
98418dba 11652 eval "$as_ac_var=yes"
503d2be0
AS
11653else
11654 echo "$as_me: failed program was:" >&5
cd958eb3
MB
11655sed 's/^/| /' conftest.$ac_ext >&5
11656
98418dba 11657eval "$as_ac_var=no"
503d2be0
AS
11658fi
11659rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
ffe36136 11660fi
c0d27fcc 11661echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
11662echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11663if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 11664 cat >>confdefs.h <<_ACEOF
98418dba 11665#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 11666_ACEOF
ffe36136 11667
ba4481b5 11668fi
98418dba 11669done
ba4481b5 11670
c0d27fcc 11671echo "$as_me:$LINENO: checking for working mktime" >&5
98418dba
CW
11672echo $ECHO_N "checking for working mktime... $ECHO_C" >&6
11673if test "${ac_cv_func_working_mktime+set}" = set; then
11674 echo $ECHO_N "(cached) $ECHO_C" >&6
11675else
11676 if test "$cross_compiling" = yes; then
11677 ac_cv_func_working_mktime=no
11678else
11679 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 11680#line $LINENO "configure"
cd958eb3
MB
11681/* confdefs.h. */
11682_ACEOF
11683cat confdefs.h >>conftest.$ac_ext
11684cat >>conftest.$ac_ext <<_ACEOF
11685/* end confdefs.h. */
98418dba
CW
11686/* Test program from Paul Eggert and Tony Leneis. */
11687#if TIME_WITH_SYS_TIME
11688# include <sys/time.h>
11689# include <time.h>
11690#else
11691# if HAVE_SYS_TIME_H
11692# include <sys/time.h>
11693# else
11694# include <time.h>
11695# endif
11696#endif
ba4481b5 11697
98418dba
CW
11698#if HAVE_UNISTD_H
11699# include <unistd.h>
11700#endif
ba4481b5 11701
98418dba
CW
11702#if !HAVE_ALARM
11703# define alarm(X) /* empty */
11704#endif
df645f7c 11705
98418dba
CW
11706/* Work around redefinition to rpl_putenv by other config tests. */
11707#undef putenv
df645f7c 11708
98418dba 11709static time_t time_t_max;
df645f7c 11710
98418dba
CW
11711/* Values we'll use to set the TZ environment variable. */
11712static const char *const tz_strings[] = {
11713 (const char *) 0, "TZ=GMT0", "TZ=JST-9",
11714 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
11715};
11716#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
503d2be0 11717
98418dba
CW
11718/* Fail if mktime fails to convert a date in the spring-forward gap.
11719 Based on a problem report from Andreas Jaeger. */
11720static void
11721spring_forward_gap ()
11722{
11723 /* glibc (up to about 1998-10-07) failed this test. */
11724 struct tm tm;
11725
11726 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
11727 instead of "TZ=America/Vancouver" in order to detect the bug even
11728 on systems that don't support the Olson extension, or don't have the
11729 full zoneinfo tables installed. */
11730 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
11731
11732 tm.tm_year = 98;
11733 tm.tm_mon = 3;
11734 tm.tm_mday = 5;
11735 tm.tm_hour = 2;
11736 tm.tm_min = 0;
11737 tm.tm_sec = 0;
11738 tm.tm_isdst = -1;
11739 if (mktime (&tm) == (time_t)-1)
11740 exit (1);
11741}
11742
11743static void
11744mktime_test (now)
11745 time_t now;
11746{
11747 struct tm *lt;
11748 if ((lt = localtime (&now)) && mktime (lt) != now)
11749 exit (1);
11750 now = time_t_max - now;
11751 if ((lt = localtime (&now)) && mktime (lt) != now)
11752 exit (1);
11753}
11754
11755static void
11756irix_6_4_bug ()
11757{
11758 /* Based on code from Ariel Faigon. */
11759 struct tm tm;
11760 tm.tm_year = 96;
11761 tm.tm_mon = 3;
11762 tm.tm_mday = 0;
11763 tm.tm_hour = 0;
11764 tm.tm_min = 0;
11765 tm.tm_sec = 0;
11766 tm.tm_isdst = -1;
11767 mktime (&tm);
11768 if (tm.tm_mon != 2 || tm.tm_mday != 31)
11769 exit (1);
11770}
11771
11772static void
11773bigtime_test (j)
11774 int j;
11775{
11776 struct tm tm;
11777 time_t now;
11778 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
11779 now = mktime (&tm);
11780 if (now != (time_t) -1)
11781 {
11782 struct tm *lt = localtime (&now);
11783 if (! (lt
11784 && lt->tm_year == tm.tm_year
11785 && lt->tm_mon == tm.tm_mon
11786 && lt->tm_mday == tm.tm_mday
11787 && lt->tm_hour == tm.tm_hour
11788 && lt->tm_min == tm.tm_min
11789 && lt->tm_sec == tm.tm_sec
11790 && lt->tm_yday == tm.tm_yday
11791 && lt->tm_wday == tm.tm_wday
11792 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
11793 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
11794 exit (1);
11795 }
11796}
11797
11798int
11799main ()
11800{
11801 time_t t, delta;
11802 int i, j;
11803
11804 /* This test makes some buggy mktime implementations loop.
11805 Give up after 60 seconds; a mktime slower than that
11806 isn't worth using anyway. */
11807 alarm (60);
11808
11809 for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2)
11810 continue;
11811 time_t_max--;
11812 delta = time_t_max / 997; /* a suitable prime number */
11813 for (i = 0; i < N_STRINGS; i++)
11814 {
11815 if (tz_strings[i])
11816 putenv (tz_strings[i]);
503d2be0 11817
98418dba
CW
11818 for (t = 0; t <= time_t_max - delta; t += delta)
11819 mktime_test (t);
11820 mktime_test ((time_t) 60 * 60);
11821 mktime_test ((time_t) 60 * 60 * 24);
11822
11823 for (j = 1; 0 < j; j *= 2)
11824 bigtime_test (j);
11825 bigtime_test (j - 1);
11826 }
11827 irix_6_4_bug ();
11828 spring_forward_gap ();
11829 exit (0);
503d2be0
AS
11830}
11831_ACEOF
98418dba 11832rm -f conftest$ac_exeext
c0d27fcc 11833if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
11834 (eval $ac_link) 2>&5
11835 ac_status=$?
c0d27fcc 11836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 11837 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 11838 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
11839 (eval $ac_try) 2>&5
11840 ac_status=$?
c0d27fcc 11841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 11842 (exit $ac_status); }; }; then
98418dba 11843 ac_cv_func_working_mktime=yes
503d2be0 11844else
98418dba
CW
11845 echo "$as_me: program exited with status $ac_status" >&5
11846echo "$as_me: failed program was:" >&5
cd958eb3
MB
11847sed 's/^/| /' conftest.$ac_ext >&5
11848
c0d27fcc 11849( exit $ac_status )
98418dba 11850ac_cv_func_working_mktime=no
503d2be0 11851fi
6bae0ccf 11852rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
503d2be0 11853fi
ba4481b5 11854fi
c0d27fcc 11855echo "$as_me:$LINENO: result: $ac_cv_func_working_mktime" >&5
98418dba
CW
11856echo "${ECHO_T}$ac_cv_func_working_mktime" >&6
11857if test $ac_cv_func_working_mktime = no; then
11858 LIBOBJS="$LIBOBJS mktime.$ac_objext"
ba4481b5
DL
11859fi
11860
98418dba 11861if test "$ac_cv_func_working_mktime" = no; then
b936fae4 11862
c0d27fcc 11863cat >>confdefs.h <<\_ACEOF
98418dba 11864#define BROKEN_MKTIME 1
c0d27fcc 11865_ACEOF
ba4481b5 11866
ba4481b5 11867fi
503d2be0 11868
98418dba
CW
11869ac_have_func=no # yes means we've found a way to get the load average.
11870
6bae0ccf
DL
11871# Make sure getloadavg.c is where it belongs, at configure-time.
11872test -f "$srcdir/$ac_config_libobj_dir/getloadavg.c" ||
11873 { { echo "$as_me:$LINENO: error: $srcdir/$ac_config_libobj_dir/getloadavg.c is missing" >&5
11874echo "$as_me: error: $srcdir/$ac_config_libobj_dir/getloadavg.c is missing" >&2;}
11875 { (exit 1); exit 1; }; }
11876
98418dba
CW
11877ac_save_LIBS=$LIBS
11878
11879# Check for getloadavg, but be sure not to touch the cache variable.
c0d27fcc 11880(echo "$as_me:$LINENO: checking for getloadavg" >&5
98418dba
CW
11881echo $ECHO_N "checking for getloadavg... $ECHO_C" >&6
11882if test "${ac_cv_func_getloadavg+set}" = set; then
503d2be0 11883 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 11884else
503d2be0 11885 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 11886#line $LINENO "configure"
cd958eb3
MB
11887/* confdefs.h. */
11888_ACEOF
11889cat confdefs.h >>conftest.$ac_ext
11890cat >>conftest.$ac_ext <<_ACEOF
11891/* end confdefs.h. */
98418dba 11892/* System header to define __stub macros and hopefully few prototypes,
9e71690e
DK
11893 which can conflict with char getloadavg (); below.
11894 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11895 <limits.h> exists even on freestanding compilers. */
11896#ifdef __STDC__
11897# include <limits.h>
11898#else
11899# include <assert.h>
11900#endif
ba4481b5 11901/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
11902#ifdef __cplusplus
11903extern "C"
cd958eb3 11904{
503d2be0 11905#endif
ba4481b5 11906/* We use char because int might match the return type of a gcc2
503d2be0 11907 builtin and then its argument prototype would still apply. */
98418dba 11908char getloadavg ();
98418dba
CW
11909/* The GNU C library defines this for functions which it implements
11910 to always fail with ENOSYS. Some functions are actually named
11911 something starting with __ and the normal name is an alias. */
11912#if defined (__stub_getloadavg) || defined (__stub___getloadavg)
11913choke me
11914#else
cd958eb3 11915char (*f) () = getloadavg;
98418dba 11916#endif
cd958eb3
MB
11917#ifdef __cplusplus
11918}
11919#endif
11920
11921int
11922main ()
11923{
9e71690e 11924return f != getloadavg;
503d2be0
AS
11925 ;
11926 return 0;
11927}
11928_ACEOF
11929rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 11930if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
11931 (eval $ac_link) 2>&5
11932 ac_status=$?
c0d27fcc 11933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
11934 (exit $ac_status); } &&
11935 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 11936 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
11937 (eval $ac_try) 2>&5
11938 ac_status=$?
c0d27fcc 11939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 11940 (exit $ac_status); }; }; then
98418dba 11941 ac_cv_func_getloadavg=yes
503d2be0
AS
11942else
11943 echo "$as_me: failed program was:" >&5
cd958eb3
MB
11944sed 's/^/| /' conftest.$ac_ext >&5
11945
98418dba 11946ac_cv_func_getloadavg=no
503d2be0
AS
11947fi
11948rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
ba4481b5 11949fi
c0d27fcc 11950echo "$as_me:$LINENO: result: $ac_cv_func_getloadavg" >&5
98418dba
CW
11951echo "${ECHO_T}$ac_cv_func_getloadavg" >&6
11952if test $ac_cv_func_getloadavg = yes; then
11953 exit 0
11954else
11955 exit 1
ba4481b5 11956fi
98418dba 11957) && ac_have_func=yes
ba4481b5 11958
98418dba 11959# On HPUX9, an unprivileged user can get load averages through this function.
503d2be0 11960
98418dba
CW
11961for ac_func in pstat_getdynamic
11962do
11963as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 11964echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
11965echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11966if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 11967 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 11968else
503d2be0 11969 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 11970#line $LINENO "configure"
cd958eb3
MB
11971/* confdefs.h. */
11972_ACEOF
11973cat confdefs.h >>conftest.$ac_ext
11974cat >>conftest.$ac_ext <<_ACEOF
11975/* end confdefs.h. */
98418dba 11976/* System header to define __stub macros and hopefully few prototypes,
9e71690e
DK
11977 which can conflict with char $ac_func (); below.
11978 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11979 <limits.h> exists even on freestanding compilers. */
11980#ifdef __STDC__
11981# include <limits.h>
11982#else
11983# include <assert.h>
11984#endif
ba4481b5 11985/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
11986#ifdef __cplusplus
11987extern "C"
cd958eb3 11988{
503d2be0 11989#endif
ba4481b5 11990/* We use char because int might match the return type of a gcc2
503d2be0 11991 builtin and then its argument prototype would still apply. */
98418dba 11992char $ac_func ();
98418dba
CW
11993/* The GNU C library defines this for functions which it implements
11994 to always fail with ENOSYS. Some functions are actually named
11995 something starting with __ and the normal name is an alias. */
11996#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11997choke me
11998#else
cd958eb3
MB
11999char (*f) () = $ac_func;
12000#endif
12001#ifdef __cplusplus
12002}
98418dba
CW
12003#endif
12004
cd958eb3
MB
12005int
12006main ()
12007{
9e71690e 12008return f != $ac_func;
98418dba
CW
12009 ;
12010 return 0;
12011}
f21fadcc 12012_ACEOF
98418dba 12013rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 12014if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba 12015 (eval $ac_link) 2>&5
f21fadcc 12016 ac_status=$?
c0d27fcc 12017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
12018 (exit $ac_status); } &&
12019 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 12020 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
12021 (eval $ac_try) 2>&5
12022 ac_status=$?
c0d27fcc 12023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
12024 (exit $ac_status); }; }; then
12025 eval "$as_ac_var=yes"
f21fadcc
JD
12026else
12027 echo "$as_me: failed program was:" >&5
cd958eb3
MB
12028sed 's/^/| /' conftest.$ac_ext >&5
12029
98418dba 12030eval "$as_ac_var=no"
f21fadcc 12031fi
98418dba 12032rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
f21fadcc 12033fi
c0d27fcc 12034echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
12035echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12036if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 12037 cat >>confdefs.h <<_ACEOF
98418dba 12038#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 12039_ACEOF
98418dba
CW
12040
12041fi
12042done
12043
c0d27fcc 12044
98418dba
CW
12045# Solaris has libkstat which does not require root.
12046
c0d27fcc 12047echo "$as_me:$LINENO: checking for kstat_open in -lkstat" >&5
98418dba
CW
12048echo $ECHO_N "checking for kstat_open in -lkstat... $ECHO_C" >&6
12049if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then
f21fadcc
JD
12050 echo $ECHO_N "(cached) $ECHO_C" >&6
12051else
12052 ac_check_lib_save_LIBS=$LIBS
98418dba 12053LIBS="-lkstat $LIBS"
f21fadcc 12054cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 12055#line $LINENO "configure"
cd958eb3
MB
12056/* confdefs.h. */
12057_ACEOF
12058cat confdefs.h >>conftest.$ac_ext
12059cat >>conftest.$ac_ext <<_ACEOF
12060/* end confdefs.h. */
f21fadcc
JD
12061
12062/* Override any gcc2 internal prototype to avoid an error. */
12063#ifdef __cplusplus
12064extern "C"
12065#endif
12066/* We use char because int might match the return type of a gcc2
12067 builtin and then its argument prototype would still apply. */
98418dba 12068char kstat_open ();
f21fadcc
JD
12069int
12070main ()
12071{
98418dba 12072kstat_open ();
f21fadcc
JD
12073 ;
12074 return 0;
12075}
12076_ACEOF
12077rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 12078if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
f21fadcc
JD
12079 (eval $ac_link) 2>&5
12080 ac_status=$?
c0d27fcc 12081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f21fadcc
JD
12082 (exit $ac_status); } &&
12083 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 12084 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
f21fadcc
JD
12085 (eval $ac_try) 2>&5
12086 ac_status=$?
c0d27fcc 12087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f21fadcc 12088 (exit $ac_status); }; }; then
98418dba 12089 ac_cv_lib_kstat_kstat_open=yes
f21fadcc
JD
12090else
12091 echo "$as_me: failed program was:" >&5
cd958eb3
MB
12092sed 's/^/| /' conftest.$ac_ext >&5
12093
98418dba 12094ac_cv_lib_kstat_kstat_open=no
f21fadcc
JD
12095fi
12096rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12097LIBS=$ac_check_lib_save_LIBS
12098fi
c0d27fcc 12099echo "$as_me:$LINENO: result: $ac_cv_lib_kstat_kstat_open" >&5
98418dba
CW
12100echo "${ECHO_T}$ac_cv_lib_kstat_kstat_open" >&6
12101if test $ac_cv_lib_kstat_kstat_open = yes; then
c0d27fcc 12102 cat >>confdefs.h <<_ACEOF
98418dba 12103#define HAVE_LIBKSTAT 1
c0d27fcc 12104_ACEOF
f21fadcc 12105
98418dba 12106 LIBS="-lkstat $LIBS"
f21fadcc 12107
f21fadcc
JD
12108fi
12109
98418dba
CW
12110test $ac_cv_lib_kstat_kstat_open = yes && ac_have_func=yes
12111
12112# Some systems with -lutil have (and need) -lkvm as well, some do not.
12113# On Solaris, -lkvm requires nlist from -lelf, so check that first
12114# to get the right answer into the cache.
12115# For kstat on solaris, we need libelf to force the definition of SVR4 below.
12116if test $ac_have_func = no; then
c0d27fcc 12117 echo "$as_me:$LINENO: checking for elf_begin in -lelf" >&5
98418dba
CW
12118echo $ECHO_N "checking for elf_begin in -lelf... $ECHO_C" >&6
12119if test "${ac_cv_lib_elf_elf_begin+set}" = set; then
503d2be0 12120 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 12121else
98418dba
CW
12122 ac_check_lib_save_LIBS=$LIBS
12123LIBS="-lelf $LIBS"
12124cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 12125#line $LINENO "configure"
cd958eb3
MB
12126/* confdefs.h. */
12127_ACEOF
12128cat confdefs.h >>conftest.$ac_ext
12129cat >>conftest.$ac_ext <<_ACEOF
12130/* end confdefs.h. */
98418dba
CW
12131
12132/* Override any gcc2 internal prototype to avoid an error. */
12133#ifdef __cplusplus
12134extern "C"
12135#endif
12136/* We use char because int might match the return type of a gcc2
12137 builtin and then its argument prototype would still apply. */
12138char elf_begin ();
503d2be0
AS
12139int
12140main ()
12141{
98418dba 12142elf_begin ();
503d2be0
AS
12143 ;
12144 return 0;
12145}
12146_ACEOF
12147rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 12148if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
12149 (eval $ac_link) 2>&5
12150 ac_status=$?
c0d27fcc 12151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
12152 (exit $ac_status); } &&
12153 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 12154 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
12155 (eval $ac_try) 2>&5
12156 ac_status=$?
c0d27fcc 12157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12158 (exit $ac_status); }; }; then
98418dba 12159 ac_cv_lib_elf_elf_begin=yes
ba4481b5 12160else
503d2be0 12161 echo "$as_me: failed program was:" >&5
cd958eb3
MB
12162sed 's/^/| /' conftest.$ac_ext >&5
12163
98418dba 12164ac_cv_lib_elf_elf_begin=no
ba4481b5 12165fi
503d2be0 12166rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
98418dba 12167LIBS=$ac_check_lib_save_LIBS
ba4481b5 12168fi
c0d27fcc 12169echo "$as_me:$LINENO: result: $ac_cv_lib_elf_elf_begin" >&5
98418dba
CW
12170echo "${ECHO_T}$ac_cv_lib_elf_elf_begin" >&6
12171if test $ac_cv_lib_elf_elf_begin = yes; then
12172 LIBS="-lelf $LIBS"
ba4481b5
DL
12173fi
12174
98418dba
CW
12175fi
12176if test $ac_have_func = no; then
c0d27fcc 12177 echo "$as_me:$LINENO: checking for kvm_open in -lkvm" >&5
98418dba
CW
12178echo $ECHO_N "checking for kvm_open in -lkvm... $ECHO_C" >&6
12179if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then
503d2be0 12180 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 12181else
98418dba
CW
12182 ac_check_lib_save_LIBS=$LIBS
12183LIBS="-lkvm $LIBS"
12184cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 12185#line $LINENO "configure"
cd958eb3
MB
12186/* confdefs.h. */
12187_ACEOF
12188cat confdefs.h >>conftest.$ac_ext
12189cat >>conftest.$ac_ext <<_ACEOF
12190/* end confdefs.h. */
98418dba
CW
12191
12192/* Override any gcc2 internal prototype to avoid an error. */
12193#ifdef __cplusplus
12194extern "C"
12195#endif
12196/* We use char because int might match the return type of a gcc2
12197 builtin and then its argument prototype would still apply. */
12198char kvm_open ();
503d2be0
AS
12199int
12200main ()
12201{
98418dba 12202kvm_open ();
503d2be0
AS
12203 ;
12204 return 0;
12205}
12206_ACEOF
12207rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 12208if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
12209 (eval $ac_link) 2>&5
12210 ac_status=$?
c0d27fcc 12211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
12212 (exit $ac_status); } &&
12213 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 12214 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
12215 (eval $ac_try) 2>&5
12216 ac_status=$?
c0d27fcc 12217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12218 (exit $ac_status); }; }; then
98418dba 12219 ac_cv_lib_kvm_kvm_open=yes
503d2be0
AS
12220else
12221 echo "$as_me: failed program was:" >&5
cd958eb3
MB
12222sed 's/^/| /' conftest.$ac_ext >&5
12223
98418dba 12224ac_cv_lib_kvm_kvm_open=no
503d2be0
AS
12225fi
12226rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
98418dba 12227LIBS=$ac_check_lib_save_LIBS
503d2be0 12228fi
c0d27fcc 12229echo "$as_me:$LINENO: result: $ac_cv_lib_kvm_kvm_open" >&5
98418dba
CW
12230echo "${ECHO_T}$ac_cv_lib_kvm_kvm_open" >&6
12231if test $ac_cv_lib_kvm_kvm_open = yes; then
12232 LIBS="-lkvm $LIBS"
ba4481b5
DL
12233fi
12234
98418dba 12235 # Check for the 4.4BSD definition of getloadavg.
c0d27fcc 12236 echo "$as_me:$LINENO: checking for getloadavg in -lutil" >&5
98418dba
CW
12237echo $ECHO_N "checking for getloadavg in -lutil... $ECHO_C" >&6
12238if test "${ac_cv_lib_util_getloadavg+set}" = set; then
503d2be0 12239 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 12240else
98418dba
CW
12241 ac_check_lib_save_LIBS=$LIBS
12242LIBS="-lutil $LIBS"
12243cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 12244#line $LINENO "configure"
cd958eb3
MB
12245/* confdefs.h. */
12246_ACEOF
12247cat confdefs.h >>conftest.$ac_ext
12248cat >>conftest.$ac_ext <<_ACEOF
12249/* end confdefs.h. */
98418dba
CW
12250
12251/* Override any gcc2 internal prototype to avoid an error. */
12252#ifdef __cplusplus
12253extern "C"
12254#endif
12255/* We use char because int might match the return type of a gcc2
12256 builtin and then its argument prototype would still apply. */
12257char getloadavg ();
503d2be0
AS
12258int
12259main ()
12260{
98418dba 12261getloadavg ();
503d2be0
AS
12262 ;
12263 return 0;
12264}
12265_ACEOF
12266rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 12267if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
12268 (eval $ac_link) 2>&5
12269 ac_status=$?
c0d27fcc 12270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
12271 (exit $ac_status); } &&
12272 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 12273 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
12274 (eval $ac_try) 2>&5
12275 ac_status=$?
c0d27fcc 12276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12277 (exit $ac_status); }; }; then
98418dba 12278 ac_cv_lib_util_getloadavg=yes
ba4481b5 12279else
503d2be0 12280 echo "$as_me: failed program was:" >&5
cd958eb3
MB
12281sed 's/^/| /' conftest.$ac_ext >&5
12282
98418dba 12283ac_cv_lib_util_getloadavg=no
ba4481b5 12284fi
503d2be0 12285rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12286LIBS=$ac_check_lib_save_LIBS
12287fi
c0d27fcc 12288echo "$as_me:$LINENO: result: $ac_cv_lib_util_getloadavg" >&5
98418dba
CW
12289echo "${ECHO_T}$ac_cv_lib_util_getloadavg" >&6
12290if test $ac_cv_lib_util_getloadavg = yes; then
12291 LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes
ba4481b5 12292fi
503d2be0 12293
98418dba 12294fi
ba4481b5 12295
98418dba
CW
12296if test $ac_have_func = no; then
12297 # There is a commonly available library for RS/6000 AIX.
12298 # Since it is not a standard part of AIX, it might be installed locally.
12299 ac_getloadavg_LIBS=$LIBS
12300 LIBS="-L/usr/local/lib $LIBS"
c0d27fcc 12301 echo "$as_me:$LINENO: checking for getloadavg in -lgetloadavg" >&5
98418dba
CW
12302echo $ECHO_N "checking for getloadavg in -lgetloadavg... $ECHO_C" >&6
12303if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then
503d2be0 12304 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 12305else
98418dba
CW
12306 ac_check_lib_save_LIBS=$LIBS
12307LIBS="-lgetloadavg $LIBS"
12308cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 12309#line $LINENO "configure"
cd958eb3
MB
12310/* confdefs.h. */
12311_ACEOF
12312cat confdefs.h >>conftest.$ac_ext
12313cat >>conftest.$ac_ext <<_ACEOF
12314/* end confdefs.h. */
ba4481b5 12315
98418dba
CW
12316/* Override any gcc2 internal prototype to avoid an error. */
12317#ifdef __cplusplus
12318extern "C"
12319#endif
12320/* We use char because int might match the return type of a gcc2
12321 builtin and then its argument prototype would still apply. */
12322char getloadavg ();
98418dba
CW
12323int
12324main ()
12325{
12326getloadavg ();
12327 ;
12328 return 0;
12329}
503d2be0 12330_ACEOF
98418dba 12331rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 12332if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
12333 (eval $ac_link) 2>&5
12334 ac_status=$?
c0d27fcc 12335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
12336 (exit $ac_status); } &&
12337 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 12338 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
12339 (eval $ac_try) 2>&5
12340 ac_status=$?
c0d27fcc 12341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
12342 (exit $ac_status); }; }; then
12343 ac_cv_lib_getloadavg_getloadavg=yes
ba4481b5 12344else
98418dba 12345 echo "$as_me: failed program was:" >&5
cd958eb3
MB
12346sed 's/^/| /' conftest.$ac_ext >&5
12347
98418dba
CW
12348ac_cv_lib_getloadavg_getloadavg=no
12349fi
12350rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12351LIBS=$ac_check_lib_save_LIBS
12352fi
c0d27fcc 12353echo "$as_me:$LINENO: result: $ac_cv_lib_getloadavg_getloadavg" >&5
98418dba
CW
12354echo "${ECHO_T}$ac_cv_lib_getloadavg_getloadavg" >&6
12355if test $ac_cv_lib_getloadavg_getloadavg = yes; then
12356 LIBS="-lgetloadavg $LIBS"
12357else
12358 LIBS=$ac_getloadavg_LIBS
ba4481b5 12359fi
ba4481b5
DL
12360
12361fi
98418dba
CW
12362
12363# Make sure it is really in the library, if we think we found it,
12364# otherwise set up the replacement function.
12365
12366for ac_func in getloadavg
12367do
12368as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 12369echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
12370echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12371if eval "test \"\${$as_ac_var+set}\" = set"; then
12372 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 12373else
503d2be0 12374 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 12375#line $LINENO "configure"
cd958eb3
MB
12376/* confdefs.h. */
12377_ACEOF
12378cat confdefs.h >>conftest.$ac_ext
12379cat >>conftest.$ac_ext <<_ACEOF
12380/* end confdefs.h. */
ba4481b5 12381/* System header to define __stub macros and hopefully few prototypes,
9e71690e
DK
12382 which can conflict with char $ac_func (); below.
12383 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
12384 <limits.h> exists even on freestanding compilers. */
12385#ifdef __STDC__
12386# include <limits.h>
12387#else
12388# include <assert.h>
12389#endif
ba4481b5 12390/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
12391#ifdef __cplusplus
12392extern "C"
cd958eb3 12393{
503d2be0 12394#endif
ba4481b5 12395/* We use char because int might match the return type of a gcc2
503d2be0
AS
12396 builtin and then its argument prototype would still apply. */
12397char $ac_func ();
ba4481b5
DL
12398/* The GNU C library defines this for functions which it implements
12399 to always fail with ENOSYS. Some functions are actually named
12400 something starting with __ and the normal name is an alias. */
12401#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12402choke me
12403#else
cd958eb3 12404char (*f) () = $ac_func;
ba4481b5 12405#endif
cd958eb3
MB
12406#ifdef __cplusplus
12407}
12408#endif
12409
12410int
12411main ()
12412{
9e71690e 12413return f != $ac_func;
503d2be0
AS
12414 ;
12415 return 0;
12416}
12417_ACEOF
12418rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 12419if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
12420 (eval $ac_link) 2>&5
12421 ac_status=$?
c0d27fcc 12422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
12423 (exit $ac_status); } &&
12424 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 12425 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
12426 (eval $ac_try) 2>&5
12427 ac_status=$?
c0d27fcc 12428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
12429 (exit $ac_status); }; }; then
12430 eval "$as_ac_var=yes"
12431else
12432 echo "$as_me: failed program was:" >&5
cd958eb3
MB
12433sed 's/^/| /' conftest.$ac_ext >&5
12434
503d2be0
AS
12435eval "$as_ac_var=no"
12436fi
12437rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12438fi
c0d27fcc 12439echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
12440echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12441if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 12442 cat >>confdefs.h <<_ACEOF
98418dba 12443#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 12444_ACEOF
503d2be0 12445
98418dba
CW
12446else
12447 LIBOBJS="$LIBOBJS getloadavg.$ac_objext"
ba4481b5 12448
c0d27fcc 12449cat >>confdefs.h <<\_ACEOF
98418dba 12450#define C_GETLOADAVG 1
c0d27fcc 12451_ACEOF
ba4481b5 12452
98418dba
CW
12453# Figure out what our getloadavg.c needs.
12454ac_have_func=no
c0d27fcc
MR
12455if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
12456 echo "$as_me:$LINENO: checking for sys/dg_sys_info.h" >&5
98418dba
CW
12457echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6
12458if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
503d2be0 12459 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
12460fi
12461echo "$as_me:$LINENO: result: $ac_cv_header_sys_dg_sys_info_h" >&5
12462echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6
ba4481b5 12463else
c0d27fcc
MR
12464 # Is the header compilable?
12465echo "$as_me:$LINENO: checking sys/dg_sys_info.h usability" >&5
12466echo $ECHO_N "checking sys/dg_sys_info.h usability... $ECHO_C" >&6
12467cat >conftest.$ac_ext <<_ACEOF
12468#line $LINENO "configure"
cd958eb3
MB
12469/* confdefs.h. */
12470_ACEOF
12471cat confdefs.h >>conftest.$ac_ext
12472cat >>conftest.$ac_ext <<_ACEOF
12473/* end confdefs.h. */
c0d27fcc
MR
12474$ac_includes_default
12475#include <sys/dg_sys_info.h>
12476_ACEOF
12477rm -f conftest.$ac_objext
12478if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12479 (eval $ac_compile) 2>&5
12480 ac_status=$?
12481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12482 (exit $ac_status); } &&
12483 { ac_try='test -s conftest.$ac_objext'
12484 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12485 (eval $ac_try) 2>&5
12486 ac_status=$?
12487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12488 (exit $ac_status); }; }; then
12489 ac_header_compiler=yes
12490else
12491 echo "$as_me: failed program was:" >&5
cd958eb3
MB
12492sed 's/^/| /' conftest.$ac_ext >&5
12493
c0d27fcc
MR
12494ac_header_compiler=no
12495fi
12496rm -f conftest.$ac_objext conftest.$ac_ext
12497echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12498echo "${ECHO_T}$ac_header_compiler" >&6
12499
12500# Is the header present?
12501echo "$as_me:$LINENO: checking sys/dg_sys_info.h presence" >&5
12502echo $ECHO_N "checking sys/dg_sys_info.h presence... $ECHO_C" >&6
12503cat >conftest.$ac_ext <<_ACEOF
12504#line $LINENO "configure"
cd958eb3
MB
12505/* confdefs.h. */
12506_ACEOF
12507cat confdefs.h >>conftest.$ac_ext
12508cat >>conftest.$ac_ext <<_ACEOF
12509/* end confdefs.h. */
98418dba
CW
12510#include <sys/dg_sys_info.h>
12511_ACEOF
c0d27fcc 12512if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
12513 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12514 ac_status=$?
6bae0ccf 12515 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
12516 rm -f conftest.er1
12517 cat conftest.err >&5
c0d27fcc 12518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
12519 (exit $ac_status); } >/dev/null; then
12520 if test -s conftest.err; then
12521 ac_cpp_err=$ac_c_preproc_warn_flag
12522 else
12523 ac_cpp_err=
12524 fi
12525else
12526 ac_cpp_err=yes
ba4481b5 12527fi
98418dba 12528if test -z "$ac_cpp_err"; then
c0d27fcc 12529 ac_header_preproc=yes
98418dba
CW
12530else
12531 echo "$as_me: failed program was:" >&5
cd958eb3
MB
12532sed 's/^/| /' conftest.$ac_ext >&5
12533
c0d27fcc 12534 ac_header_preproc=no
ba4481b5 12535fi
98418dba 12536rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
12537echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12538echo "${ECHO_T}$ac_header_preproc" >&6
12539
12540# So? What about this header?
12541case $ac_header_compiler:$ac_header_preproc in
12542 yes:no )
12543 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: accepted by the compiler, rejected by the preprocessor!" >&5
12544echo "$as_me: WARNING: sys/dg_sys_info.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
12545 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&5
cd958eb3
MB
12546echo "$as_me: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&2;}
12547 (
12548 cat <<\_ASBOX
12549## ------------------------------------ ##
12550## Report this to bug-autoconf@gnu.org. ##
12551## ------------------------------------ ##
12552_ASBOX
12553 ) |
12554 sed "s/^/$as_me: WARNING: /" >&2
12555 ;;
c0d27fcc
MR
12556 no:yes )
12557 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: present but cannot be compiled" >&5
12558echo "$as_me: WARNING: sys/dg_sys_info.h: present but cannot be compiled" >&2;}
12559 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: check for missing prerequisite headers?" >&5
12560echo "$as_me: WARNING: sys/dg_sys_info.h: check for missing prerequisite headers?" >&2;}
12561 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&5
cd958eb3
MB
12562echo "$as_me: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&2;}
12563 (
12564 cat <<\_ASBOX
12565## ------------------------------------ ##
12566## Report this to bug-autoconf@gnu.org. ##
12567## ------------------------------------ ##
12568_ASBOX
12569 ) |
12570 sed "s/^/$as_me: WARNING: /" >&2
12571 ;;
c0d27fcc
MR
12572esac
12573echo "$as_me:$LINENO: checking for sys/dg_sys_info.h" >&5
12574echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6
12575if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
12576 echo $ECHO_N "(cached) $ECHO_C" >&6
12577else
12578 ac_cv_header_sys_dg_sys_info_h=$ac_header_preproc
98418dba 12579fi
c0d27fcc 12580echo "$as_me:$LINENO: result: $ac_cv_header_sys_dg_sys_info_h" >&5
98418dba 12581echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6
c0d27fcc
MR
12582
12583fi
98418dba
CW
12584if test $ac_cv_header_sys_dg_sys_info_h = yes; then
12585 ac_have_func=yes
ba4481b5 12586
c0d27fcc 12587cat >>confdefs.h <<\_ACEOF
98418dba 12588#define DGUX 1
c0d27fcc
MR
12589_ACEOF
12590
503d2be0 12591
c0d27fcc 12592echo "$as_me:$LINENO: checking for dg_sys_info in -ldgc" >&5
98418dba
CW
12593echo $ECHO_N "checking for dg_sys_info in -ldgc... $ECHO_C" >&6
12594if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then
503d2be0 12595 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 12596else
503d2be0 12597 ac_check_lib_save_LIBS=$LIBS
98418dba 12598LIBS="-ldgc $LIBS"
503d2be0 12599cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 12600#line $LINENO "configure"
cd958eb3
MB
12601/* confdefs.h. */
12602_ACEOF
12603cat confdefs.h >>conftest.$ac_ext
12604cat >>conftest.$ac_ext <<_ACEOF
12605/* end confdefs.h. */
503d2be0 12606
ba4481b5 12607/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
12608#ifdef __cplusplus
12609extern "C"
12610#endif
ba4481b5 12611/* We use char because int might match the return type of a gcc2
503d2be0 12612 builtin and then its argument prototype would still apply. */
98418dba 12613char dg_sys_info ();
503d2be0
AS
12614int
12615main ()
12616{
98418dba 12617dg_sys_info ();
503d2be0
AS
12618 ;
12619 return 0;
12620}
12621_ACEOF
12622rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 12623if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
12624 (eval $ac_link) 2>&5
12625 ac_status=$?
c0d27fcc 12626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
12627 (exit $ac_status); } &&
12628 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 12629 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
12630 (eval $ac_try) 2>&5
12631 ac_status=$?
c0d27fcc 12632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12633 (exit $ac_status); }; }; then
98418dba 12634 ac_cv_lib_dgc_dg_sys_info=yes
503d2be0
AS
12635else
12636 echo "$as_me: failed program was:" >&5
cd958eb3
MB
12637sed 's/^/| /' conftest.$ac_ext >&5
12638
98418dba 12639ac_cv_lib_dgc_dg_sys_info=no
503d2be0
AS
12640fi
12641rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12642LIBS=$ac_check_lib_save_LIBS
12643fi
c0d27fcc 12644echo "$as_me:$LINENO: result: $ac_cv_lib_dgc_dg_sys_info" >&5
98418dba
CW
12645echo "${ECHO_T}$ac_cv_lib_dgc_dg_sys_info" >&6
12646if test $ac_cv_lib_dgc_dg_sys_info = yes; then
c0d27fcc 12647 cat >>confdefs.h <<_ACEOF
98418dba 12648#define HAVE_LIBDGC 1
c0d27fcc 12649_ACEOF
ba4481b5 12650
98418dba 12651 LIBS="-ldgc $LIBS"
ba4481b5 12652
ba4481b5
DL
12653fi
12654
98418dba 12655fi
503d2be0 12656
c0d27fcc
MR
12657
12658
12659if test "${ac_cv_header_locale_h+set}" = set; then
12660 echo "$as_me:$LINENO: checking for locale.h" >&5
98418dba
CW
12661echo $ECHO_N "checking for locale.h... $ECHO_C" >&6
12662if test "${ac_cv_header_locale_h+set}" = set; then
503d2be0 12663 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
12664fi
12665echo "$as_me:$LINENO: result: $ac_cv_header_locale_h" >&5
12666echo "${ECHO_T}$ac_cv_header_locale_h" >&6
503d2be0 12667else
c0d27fcc
MR
12668 # Is the header compilable?
12669echo "$as_me:$LINENO: checking locale.h usability" >&5
12670echo $ECHO_N "checking locale.h usability... $ECHO_C" >&6
12671cat >conftest.$ac_ext <<_ACEOF
12672#line $LINENO "configure"
cd958eb3
MB
12673/* confdefs.h. */
12674_ACEOF
12675cat confdefs.h >>conftest.$ac_ext
12676cat >>conftest.$ac_ext <<_ACEOF
12677/* end confdefs.h. */
c0d27fcc
MR
12678$ac_includes_default
12679#include <locale.h>
12680_ACEOF
12681rm -f conftest.$ac_objext
12682if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12683 (eval $ac_compile) 2>&5
12684 ac_status=$?
12685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12686 (exit $ac_status); } &&
12687 { ac_try='test -s conftest.$ac_objext'
12688 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12689 (eval $ac_try) 2>&5
12690 ac_status=$?
12691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12692 (exit $ac_status); }; }; then
12693 ac_header_compiler=yes
12694else
12695 echo "$as_me: failed program was:" >&5
cd958eb3
MB
12696sed 's/^/| /' conftest.$ac_ext >&5
12697
c0d27fcc
MR
12698ac_header_compiler=no
12699fi
12700rm -f conftest.$ac_objext conftest.$ac_ext
12701echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12702echo "${ECHO_T}$ac_header_compiler" >&6
12703
12704# Is the header present?
12705echo "$as_me:$LINENO: checking locale.h presence" >&5
12706echo $ECHO_N "checking locale.h presence... $ECHO_C" >&6
12707cat >conftest.$ac_ext <<_ACEOF
12708#line $LINENO "configure"
cd958eb3
MB
12709/* confdefs.h. */
12710_ACEOF
12711cat confdefs.h >>conftest.$ac_ext
12712cat >>conftest.$ac_ext <<_ACEOF
12713/* end confdefs.h. */
98418dba 12714#include <locale.h>
503d2be0 12715_ACEOF
c0d27fcc 12716if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba 12717 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
503d2be0 12718 ac_status=$?
6bae0ccf 12719 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
12720 rm -f conftest.er1
12721 cat conftest.err >&5
c0d27fcc 12722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
12723 (exit $ac_status); } >/dev/null; then
12724 if test -s conftest.err; then
12725 ac_cpp_err=$ac_c_preproc_warn_flag
12726 else
12727 ac_cpp_err=
12728 fi
503d2be0 12729else
98418dba 12730 ac_cpp_err=yes
503d2be0 12731fi
98418dba 12732if test -z "$ac_cpp_err"; then
c0d27fcc 12733 ac_header_preproc=yes
98418dba
CW
12734else
12735 echo "$as_me: failed program was:" >&5
cd958eb3
MB
12736sed 's/^/| /' conftest.$ac_ext >&5
12737
c0d27fcc 12738 ac_header_preproc=no
ba4481b5 12739fi
98418dba 12740rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
12741echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12742echo "${ECHO_T}$ac_header_preproc" >&6
12743
12744# So? What about this header?
12745case $ac_header_compiler:$ac_header_preproc in
12746 yes:no )
12747 { echo "$as_me:$LINENO: WARNING: locale.h: accepted by the compiler, rejected by the preprocessor!" >&5
12748echo "$as_me: WARNING: locale.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
12749 { echo "$as_me:$LINENO: WARNING: locale.h: proceeding with the preprocessor's result" >&5
cd958eb3
MB
12750echo "$as_me: WARNING: locale.h: proceeding with the preprocessor's result" >&2;}
12751 (
12752 cat <<\_ASBOX
12753## ------------------------------------ ##
12754## Report this to bug-autoconf@gnu.org. ##
12755## ------------------------------------ ##
12756_ASBOX
12757 ) |
12758 sed "s/^/$as_me: WARNING: /" >&2
12759 ;;
c0d27fcc
MR
12760 no:yes )
12761 { echo "$as_me:$LINENO: WARNING: locale.h: present but cannot be compiled" >&5
12762echo "$as_me: WARNING: locale.h: present but cannot be compiled" >&2;}
12763 { echo "$as_me:$LINENO: WARNING: locale.h: check for missing prerequisite headers?" >&5
12764echo "$as_me: WARNING: locale.h: check for missing prerequisite headers?" >&2;}
12765 { echo "$as_me:$LINENO: WARNING: locale.h: proceeding with the preprocessor's result" >&5
cd958eb3
MB
12766echo "$as_me: WARNING: locale.h: proceeding with the preprocessor's result" >&2;}
12767 (
12768 cat <<\_ASBOX
12769## ------------------------------------ ##
12770## Report this to bug-autoconf@gnu.org. ##
12771## ------------------------------------ ##
12772_ASBOX
12773 ) |
12774 sed "s/^/$as_me: WARNING: /" >&2
12775 ;;
c0d27fcc
MR
12776esac
12777echo "$as_me:$LINENO: checking for locale.h" >&5
12778echo $ECHO_N "checking for locale.h... $ECHO_C" >&6
12779if test "${ac_cv_header_locale_h+set}" = set; then
12780 echo $ECHO_N "(cached) $ECHO_C" >&6
12781else
12782 ac_cv_header_locale_h=$ac_header_preproc
ba4481b5 12783fi
c0d27fcc 12784echo "$as_me:$LINENO: result: $ac_cv_header_locale_h" >&5
98418dba
CW
12785echo "${ECHO_T}$ac_cv_header_locale_h" >&6
12786
c0d27fcc
MR
12787fi
12788
12789
12790
98418dba 12791for ac_func in setlocale
ba4481b5 12792do
503d2be0 12793as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 12794echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
12795echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12796if eval "test \"\${$as_ac_var+set}\" = set"; then
12797 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 12798else
503d2be0 12799 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 12800#line $LINENO "configure"
cd958eb3
MB
12801/* confdefs.h. */
12802_ACEOF
12803cat confdefs.h >>conftest.$ac_ext
12804cat >>conftest.$ac_ext <<_ACEOF
12805/* end confdefs.h. */
ba4481b5 12806/* System header to define __stub macros and hopefully few prototypes,
9e71690e
DK
12807 which can conflict with char $ac_func (); below.
12808 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
12809 <limits.h> exists even on freestanding compilers. */
12810#ifdef __STDC__
12811# include <limits.h>
12812#else
12813# include <assert.h>
12814#endif
ba4481b5 12815/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
12816#ifdef __cplusplus
12817extern "C"
cd958eb3 12818{
503d2be0 12819#endif
ba4481b5 12820/* We use char because int might match the return type of a gcc2
503d2be0
AS
12821 builtin and then its argument prototype would still apply. */
12822char $ac_func ();
ba4481b5
DL
12823/* The GNU C library defines this for functions which it implements
12824 to always fail with ENOSYS. Some functions are actually named
12825 something starting with __ and the normal name is an alias. */
12826#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12827choke me
12828#else
cd958eb3
MB
12829char (*f) () = $ac_func;
12830#endif
12831#ifdef __cplusplus
12832}
ba4481b5
DL
12833#endif
12834
cd958eb3
MB
12835int
12836main ()
12837{
9e71690e 12838return f != $ac_func;
503d2be0
AS
12839 ;
12840 return 0;
12841}
12842_ACEOF
12843rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 12844if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
12845 (eval $ac_link) 2>&5
12846 ac_status=$?
c0d27fcc 12847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
12848 (exit $ac_status); } &&
12849 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 12850 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
12851 (eval $ac_try) 2>&5
12852 ac_status=$?
c0d27fcc 12853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
12854 (exit $ac_status); }; }; then
12855 eval "$as_ac_var=yes"
12856else
12857 echo "$as_me: failed program was:" >&5
cd958eb3
MB
12858sed 's/^/| /' conftest.$ac_ext >&5
12859
503d2be0
AS
12860eval "$as_ac_var=no"
12861fi
12862rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12863fi
c0d27fcc 12864echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
12865echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12866if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 12867 cat >>confdefs.h <<_ACEOF
503d2be0 12868#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 12869_ACEOF
ba4481b5 12870
ba4481b5
DL
12871fi
12872done
12873
c0d27fcc 12874
98418dba
CW
12875# We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
12876# uses stabs), but it is still SVR4. We cannot check for <elf.h> because
12877# Irix 4.0.5F has the header but not the library.
12878if test $ac_have_func = no && test "$ac_cv_lib_elf_elf_begin" = yes; then
12879 ac_have_func=yes
12880
c0d27fcc 12881cat >>confdefs.h <<\_ACEOF
98418dba 12882#define SVR4 1
c0d27fcc 12883_ACEOF
98418dba
CW
12884
12885fi
12886
12887if test $ac_have_func = no; then
c0d27fcc
MR
12888 if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
12889 echo "$as_me:$LINENO: checking for inq_stats/cpustats.h" >&5
98418dba
CW
12890echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6
12891if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
503d2be0 12892 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
12893fi
12894echo "$as_me:$LINENO: result: $ac_cv_header_inq_stats_cpustats_h" >&5
12895echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6
98418dba 12896else
c0d27fcc
MR
12897 # Is the header compilable?
12898echo "$as_me:$LINENO: checking inq_stats/cpustats.h usability" >&5
12899echo $ECHO_N "checking inq_stats/cpustats.h usability... $ECHO_C" >&6
12900cat >conftest.$ac_ext <<_ACEOF
12901#line $LINENO "configure"
cd958eb3
MB
12902/* confdefs.h. */
12903_ACEOF
12904cat confdefs.h >>conftest.$ac_ext
12905cat >>conftest.$ac_ext <<_ACEOF
12906/* end confdefs.h. */
c0d27fcc
MR
12907$ac_includes_default
12908#include <inq_stats/cpustats.h>
12909_ACEOF
12910rm -f conftest.$ac_objext
12911if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12912 (eval $ac_compile) 2>&5
12913 ac_status=$?
12914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12915 (exit $ac_status); } &&
12916 { ac_try='test -s conftest.$ac_objext'
12917 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12918 (eval $ac_try) 2>&5
12919 ac_status=$?
12920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12921 (exit $ac_status); }; }; then
12922 ac_header_compiler=yes
12923else
12924 echo "$as_me: failed program was:" >&5
cd958eb3
MB
12925sed 's/^/| /' conftest.$ac_ext >&5
12926
c0d27fcc
MR
12927ac_header_compiler=no
12928fi
12929rm -f conftest.$ac_objext conftest.$ac_ext
12930echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12931echo "${ECHO_T}$ac_header_compiler" >&6
12932
12933# Is the header present?
12934echo "$as_me:$LINENO: checking inq_stats/cpustats.h presence" >&5
12935echo $ECHO_N "checking inq_stats/cpustats.h presence... $ECHO_C" >&6
12936cat >conftest.$ac_ext <<_ACEOF
12937#line $LINENO "configure"
cd958eb3
MB
12938/* confdefs.h. */
12939_ACEOF
12940cat confdefs.h >>conftest.$ac_ext
12941cat >>conftest.$ac_ext <<_ACEOF
12942/* end confdefs.h. */
98418dba 12943#include <inq_stats/cpustats.h>
503d2be0 12944_ACEOF
c0d27fcc 12945if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
12946 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12947 ac_status=$?
6bae0ccf 12948 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
12949 rm -f conftest.er1
12950 cat conftest.err >&5
c0d27fcc 12951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
12952 (exit $ac_status); } >/dev/null; then
12953 if test -s conftest.err; then
12954 ac_cpp_err=$ac_c_preproc_warn_flag
12955 else
12956 ac_cpp_err=
12957 fi
12958else
12959 ac_cpp_err=yes
12960fi
12961if test -z "$ac_cpp_err"; then
c0d27fcc 12962 ac_header_preproc=yes
503d2be0
AS
12963else
12964 echo "$as_me: failed program was:" >&5
cd958eb3
MB
12965sed 's/^/| /' conftest.$ac_ext >&5
12966
c0d27fcc 12967 ac_header_preproc=no
ba4481b5 12968fi
503d2be0 12969rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
12970echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12971echo "${ECHO_T}$ac_header_preproc" >&6
12972
12973# So? What about this header?
12974case $ac_header_compiler:$ac_header_preproc in
12975 yes:no )
12976 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&5
12977echo "$as_me: WARNING: inq_stats/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
12978 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&5
cd958eb3
MB
12979echo "$as_me: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&2;}
12980 (
12981 cat <<\_ASBOX
12982## ------------------------------------ ##
12983## Report this to bug-autoconf@gnu.org. ##
12984## ------------------------------------ ##
12985_ASBOX
12986 ) |
12987 sed "s/^/$as_me: WARNING: /" >&2
12988 ;;
c0d27fcc
MR
12989 no:yes )
12990 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: present but cannot be compiled" >&5
12991echo "$as_me: WARNING: inq_stats/cpustats.h: present but cannot be compiled" >&2;}
12992 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: check for missing prerequisite headers?" >&5
12993echo "$as_me: WARNING: inq_stats/cpustats.h: check for missing prerequisite headers?" >&2;}
12994 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&5
cd958eb3
MB
12995echo "$as_me: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&2;}
12996 (
12997 cat <<\_ASBOX
12998## ------------------------------------ ##
12999## Report this to bug-autoconf@gnu.org. ##
13000## ------------------------------------ ##
13001_ASBOX
13002 ) |
13003 sed "s/^/$as_me: WARNING: /" >&2
13004 ;;
c0d27fcc
MR
13005esac
13006echo "$as_me:$LINENO: checking for inq_stats/cpustats.h" >&5
13007echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6
13008if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
13009 echo $ECHO_N "(cached) $ECHO_C" >&6
13010else
13011 ac_cv_header_inq_stats_cpustats_h=$ac_header_preproc
ba4481b5 13012fi
c0d27fcc 13013echo "$as_me:$LINENO: result: $ac_cv_header_inq_stats_cpustats_h" >&5
98418dba 13014echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6
c0d27fcc
MR
13015
13016fi
98418dba
CW
13017if test $ac_cv_header_inq_stats_cpustats_h = yes; then
13018 ac_have_func=yes
ba4481b5 13019
c0d27fcc 13020cat >>confdefs.h <<\_ACEOF
98418dba 13021#define UMAX 1
c0d27fcc 13022_ACEOF
98418dba 13023
c0d27fcc
MR
13024
13025cat >>confdefs.h <<\_ACEOF
98418dba 13026#define UMAX4_3 1
c0d27fcc 13027_ACEOF
98418dba
CW
13028
13029fi
13030
c0d27fcc 13031
98418dba
CW
13032fi
13033
13034if test $ac_have_func = no; then
c0d27fcc
MR
13035 if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
13036 echo "$as_me:$LINENO: checking for sys/cpustats.h" >&5
98418dba
CW
13037echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6
13038if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
503d2be0 13039 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
13040fi
13041echo "$as_me:$LINENO: result: $ac_cv_header_sys_cpustats_h" >&5
13042echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6
503d2be0 13043else
c0d27fcc
MR
13044 # Is the header compilable?
13045echo "$as_me:$LINENO: checking sys/cpustats.h usability" >&5
13046echo $ECHO_N "checking sys/cpustats.h usability... $ECHO_C" >&6
13047cat >conftest.$ac_ext <<_ACEOF
13048#line $LINENO "configure"
cd958eb3
MB
13049/* confdefs.h. */
13050_ACEOF
13051cat confdefs.h >>conftest.$ac_ext
13052cat >>conftest.$ac_ext <<_ACEOF
13053/* end confdefs.h. */
c0d27fcc
MR
13054$ac_includes_default
13055#include <sys/cpustats.h>
13056_ACEOF
13057rm -f conftest.$ac_objext
13058if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13059 (eval $ac_compile) 2>&5
13060 ac_status=$?
13061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13062 (exit $ac_status); } &&
13063 { ac_try='test -s conftest.$ac_objext'
13064 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13065 (eval $ac_try) 2>&5
13066 ac_status=$?
13067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13068 (exit $ac_status); }; }; then
13069 ac_header_compiler=yes
13070else
13071 echo "$as_me: failed program was:" >&5
cd958eb3
MB
13072sed 's/^/| /' conftest.$ac_ext >&5
13073
c0d27fcc
MR
13074ac_header_compiler=no
13075fi
13076rm -f conftest.$ac_objext conftest.$ac_ext
13077echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13078echo "${ECHO_T}$ac_header_compiler" >&6
13079
13080# Is the header present?
13081echo "$as_me:$LINENO: checking sys/cpustats.h presence" >&5
13082echo $ECHO_N "checking sys/cpustats.h presence... $ECHO_C" >&6
13083cat >conftest.$ac_ext <<_ACEOF
13084#line $LINENO "configure"
cd958eb3
MB
13085/* confdefs.h. */
13086_ACEOF
13087cat confdefs.h >>conftest.$ac_ext
13088cat >>conftest.$ac_ext <<_ACEOF
13089/* end confdefs.h. */
98418dba
CW
13090#include <sys/cpustats.h>
13091_ACEOF
c0d27fcc 13092if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
13093 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13094 ac_status=$?
6bae0ccf 13095 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
13096 rm -f conftest.er1
13097 cat conftest.err >&5
c0d27fcc 13098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
13099 (exit $ac_status); } >/dev/null; then
13100 if test -s conftest.err; then
13101 ac_cpp_err=$ac_c_preproc_warn_flag
13102 else
13103 ac_cpp_err=
13104 fi
13105else
13106 ac_cpp_err=yes
503d2be0 13107fi
98418dba 13108if test -z "$ac_cpp_err"; then
c0d27fcc 13109 ac_header_preproc=yes
98418dba
CW
13110else
13111 echo "$as_me: failed program was:" >&5
cd958eb3
MB
13112sed 's/^/| /' conftest.$ac_ext >&5
13113
c0d27fcc 13114 ac_header_preproc=no
98418dba
CW
13115fi
13116rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
13117echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13118echo "${ECHO_T}$ac_header_preproc" >&6
13119
13120# So? What about this header?
13121case $ac_header_compiler:$ac_header_preproc in
13122 yes:no )
13123 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&5
13124echo "$as_me: WARNING: sys/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
13125 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&5
cd958eb3
MB
13126echo "$as_me: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&2;}
13127 (
13128 cat <<\_ASBOX
13129## ------------------------------------ ##
13130## Report this to bug-autoconf@gnu.org. ##
13131## ------------------------------------ ##
13132_ASBOX
13133 ) |
13134 sed "s/^/$as_me: WARNING: /" >&2
13135 ;;
c0d27fcc
MR
13136 no:yes )
13137 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: present but cannot be compiled" >&5
13138echo "$as_me: WARNING: sys/cpustats.h: present but cannot be compiled" >&2;}
13139 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: check for missing prerequisite headers?" >&5
13140echo "$as_me: WARNING: sys/cpustats.h: check for missing prerequisite headers?" >&2;}
13141 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&5
cd958eb3
MB
13142echo "$as_me: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&2;}
13143 (
13144 cat <<\_ASBOX
13145## ------------------------------------ ##
13146## Report this to bug-autoconf@gnu.org. ##
13147## ------------------------------------ ##
13148_ASBOX
13149 ) |
13150 sed "s/^/$as_me: WARNING: /" >&2
13151 ;;
c0d27fcc
MR
13152esac
13153echo "$as_me:$LINENO: checking for sys/cpustats.h" >&5
13154echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6
13155if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
13156 echo $ECHO_N "(cached) $ECHO_C" >&6
13157else
13158 ac_cv_header_sys_cpustats_h=$ac_header_preproc
98418dba 13159fi
c0d27fcc 13160echo "$as_me:$LINENO: result: $ac_cv_header_sys_cpustats_h" >&5
98418dba 13161echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6
c0d27fcc
MR
13162
13163fi
98418dba 13164if test $ac_cv_header_sys_cpustats_h = yes; then
c0d27fcc 13165 ac_have_func=yes; cat >>confdefs.h <<\_ACEOF
98418dba 13166#define UMAX 1
c0d27fcc 13167_ACEOF
ba4481b5 13168
98418dba
CW
13169fi
13170
c0d27fcc 13171
98418dba
CW
13172fi
13173
13174if test $ac_have_func = no; then
13175
13176for ac_header in mach/mach.h
2c9dccc9
PJ
13177do
13178as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
13179if eval "test \"\${$as_ac_Header+set}\" = set"; then
13180 echo "$as_me:$LINENO: checking for $ac_header" >&5
2c9dccc9
PJ
13181echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13182if eval "test \"\${$as_ac_Header+set}\" = set"; then
13183 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
13184fi
13185echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
13186echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 13187else
c0d27fcc
MR
13188 # Is the header compilable?
13189echo "$as_me:$LINENO: checking $ac_header usability" >&5
13190echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
13191cat >conftest.$ac_ext <<_ACEOF
13192#line $LINENO "configure"
cd958eb3
MB
13193/* confdefs.h. */
13194_ACEOF
13195cat confdefs.h >>conftest.$ac_ext
13196cat >>conftest.$ac_ext <<_ACEOF
13197/* end confdefs.h. */
c0d27fcc
MR
13198$ac_includes_default
13199#include <$ac_header>
13200_ACEOF
13201rm -f conftest.$ac_objext
13202if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13203 (eval $ac_compile) 2>&5
13204 ac_status=$?
13205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13206 (exit $ac_status); } &&
13207 { ac_try='test -s conftest.$ac_objext'
13208 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13209 (eval $ac_try) 2>&5
13210 ac_status=$?
13211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13212 (exit $ac_status); }; }; then
13213 ac_header_compiler=yes
13214else
13215 echo "$as_me: failed program was:" >&5
cd958eb3
MB
13216sed 's/^/| /' conftest.$ac_ext >&5
13217
c0d27fcc
MR
13218ac_header_compiler=no
13219fi
13220rm -f conftest.$ac_objext conftest.$ac_ext
13221echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13222echo "${ECHO_T}$ac_header_compiler" >&6
13223
13224# Is the header present?
13225echo "$as_me:$LINENO: checking $ac_header presence" >&5
13226echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
13227cat >conftest.$ac_ext <<_ACEOF
13228#line $LINENO "configure"
cd958eb3
MB
13229/* confdefs.h. */
13230_ACEOF
13231cat confdefs.h >>conftest.$ac_ext
13232cat >>conftest.$ac_ext <<_ACEOF
13233/* end confdefs.h. */
2c9dccc9
PJ
13234#include <$ac_header>
13235_ACEOF
c0d27fcc 13236if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2c9dccc9
PJ
13237 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13238 ac_status=$?
6bae0ccf 13239 grep -v '^ *+' conftest.er1 >conftest.err
2c9dccc9
PJ
13240 rm -f conftest.er1
13241 cat conftest.err >&5
c0d27fcc 13242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2c9dccc9
PJ
13243 (exit $ac_status); } >/dev/null; then
13244 if test -s conftest.err; then
13245 ac_cpp_err=$ac_c_preproc_warn_flag
13246 else
13247 ac_cpp_err=
13248 fi
13249else
13250 ac_cpp_err=yes
13251fi
13252if test -z "$ac_cpp_err"; then
c0d27fcc
MR
13253 ac_header_preproc=yes
13254else
13255 echo "$as_me: failed program was:" >&5
cd958eb3
MB
13256sed 's/^/| /' conftest.$ac_ext >&5
13257
c0d27fcc
MR
13258 ac_header_preproc=no
13259fi
13260rm -f conftest.err conftest.$ac_ext
13261echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13262echo "${ECHO_T}$ac_header_preproc" >&6
13263
13264# So? What about this header?
13265case $ac_header_compiler:$ac_header_preproc in
13266 yes:no )
13267 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
13268echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
13269 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
13270echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
13271 (
13272 cat <<\_ASBOX
13273## ------------------------------------ ##
13274## Report this to bug-autoconf@gnu.org. ##
13275## ------------------------------------ ##
13276_ASBOX
13277 ) |
13278 sed "s/^/$as_me: WARNING: /" >&2
13279 ;;
c0d27fcc
MR
13280 no:yes )
13281 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
13282echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
13283 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
13284echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
13285 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
13286echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
13287 (
13288 cat <<\_ASBOX
13289## ------------------------------------ ##
13290## Report this to bug-autoconf@gnu.org. ##
13291## ------------------------------------ ##
13292_ASBOX
13293 ) |
13294 sed "s/^/$as_me: WARNING: /" >&2
13295 ;;
c0d27fcc
MR
13296esac
13297echo "$as_me:$LINENO: checking for $ac_header" >&5
13298echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13299if eval "test \"\${$as_ac_Header+set}\" = set"; then
13300 echo $ECHO_N "(cached) $ECHO_C" >&6
13301else
13302 eval "$as_ac_Header=$ac_header_preproc"
13303fi
13304echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
13305echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13306
13307fi
13308if test `eval echo '${'$as_ac_Header'}'` = yes; then
13309 cat >>confdefs.h <<_ACEOF
13310#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13311_ACEOF
13312
13313fi
13314
13315done
13316
13317fi
13318
13319
13320for ac_header in nlist.h
13321do
13322as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13323if eval "test \"\${$as_ac_Header+set}\" = set"; then
13324 echo "$as_me:$LINENO: checking for $ac_header" >&5
13325echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13326if eval "test \"\${$as_ac_Header+set}\" = set"; then
13327 echo $ECHO_N "(cached) $ECHO_C" >&6
13328fi
13329echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
13330echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13331else
13332 # Is the header compilable?
13333echo "$as_me:$LINENO: checking $ac_header usability" >&5
13334echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
13335cat >conftest.$ac_ext <<_ACEOF
13336#line $LINENO "configure"
cd958eb3
MB
13337/* confdefs.h. */
13338_ACEOF
13339cat confdefs.h >>conftest.$ac_ext
13340cat >>conftest.$ac_ext <<_ACEOF
13341/* end confdefs.h. */
c0d27fcc
MR
13342$ac_includes_default
13343#include <$ac_header>
13344_ACEOF
13345rm -f conftest.$ac_objext
13346if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13347 (eval $ac_compile) 2>&5
13348 ac_status=$?
13349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13350 (exit $ac_status); } &&
13351 { ac_try='test -s conftest.$ac_objext'
13352 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13353 (eval $ac_try) 2>&5
13354 ac_status=$?
13355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13356 (exit $ac_status); }; }; then
13357 ac_header_compiler=yes
2c9dccc9
PJ
13358else
13359 echo "$as_me: failed program was:" >&5
cd958eb3
MB
13360sed 's/^/| /' conftest.$ac_ext >&5
13361
c0d27fcc 13362ac_header_compiler=no
98418dba 13363fi
c0d27fcc
MR
13364rm -f conftest.$ac_objext conftest.$ac_ext
13365echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13366echo "${ECHO_T}$ac_header_compiler" >&6
98418dba 13367
c0d27fcc
MR
13368# Is the header present?
13369echo "$as_me:$LINENO: checking $ac_header presence" >&5
13370echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
13371cat >conftest.$ac_ext <<_ACEOF
13372#line $LINENO "configure"
cd958eb3
MB
13373/* confdefs.h. */
13374_ACEOF
13375cat confdefs.h >>conftest.$ac_ext
13376cat >>conftest.$ac_ext <<_ACEOF
13377/* end confdefs.h. */
503d2be0
AS
13378#include <$ac_header>
13379_ACEOF
c0d27fcc 13380if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
13381 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13382 ac_status=$?
6bae0ccf 13383 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
13384 rm -f conftest.er1
13385 cat conftest.err >&5
c0d27fcc 13386 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
13387 (exit $ac_status); } >/dev/null; then
13388 if test -s conftest.err; then
13389 ac_cpp_err=$ac_c_preproc_warn_flag
13390 else
13391 ac_cpp_err=
13392 fi
13393else
13394 ac_cpp_err=yes
13395fi
13396if test -z "$ac_cpp_err"; then
c0d27fcc 13397 ac_header_preproc=yes
503d2be0
AS
13398else
13399 echo "$as_me: failed program was:" >&5
cd958eb3
MB
13400sed 's/^/| /' conftest.$ac_ext >&5
13401
c0d27fcc 13402 ac_header_preproc=no
b5de8dc0 13403fi
503d2be0 13404rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
13405echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13406echo "${ECHO_T}$ac_header_preproc" >&6
13407
13408# So? What about this header?
13409case $ac_header_compiler:$ac_header_preproc in
13410 yes:no )
13411 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
13412echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
13413 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
13414echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
13415 (
13416 cat <<\_ASBOX
13417## ------------------------------------ ##
13418## Report this to bug-autoconf@gnu.org. ##
13419## ------------------------------------ ##
13420_ASBOX
13421 ) |
13422 sed "s/^/$as_me: WARNING: /" >&2
13423 ;;
c0d27fcc
MR
13424 no:yes )
13425 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
13426echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
13427 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
13428echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
13429 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
13430echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
13431 (
13432 cat <<\_ASBOX
13433## ------------------------------------ ##
13434## Report this to bug-autoconf@gnu.org. ##
13435## ------------------------------------ ##
13436_ASBOX
13437 ) |
13438 sed "s/^/$as_me: WARNING: /" >&2
13439 ;;
c0d27fcc
MR
13440esac
13441echo "$as_me:$LINENO: checking for $ac_header" >&5
13442echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13443if eval "test \"\${$as_ac_Header+set}\" = set"; then
13444 echo $ECHO_N "(cached) $ECHO_C" >&6
13445else
13446 eval "$as_ac_Header=$ac_header_preproc"
b5de8dc0 13447fi
c0d27fcc 13448echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 13449echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
13450
13451fi
98418dba 13452if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 13453 cat >>confdefs.h <<_ACEOF
98418dba 13454#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc
MR
13455_ACEOF
13456 echo "$as_me:$LINENO: checking for struct nlist.n_un.n_name" >&5
98418dba
CW
13457echo $ECHO_N "checking for struct nlist.n_un.n_name... $ECHO_C" >&6
13458if test "${ac_cv_member_struct_nlist_n_un_n_name+set}" = set; then
503d2be0 13459 echo $ECHO_N "(cached) $ECHO_C" >&6
b5de8dc0 13460else
503d2be0 13461 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 13462#line $LINENO "configure"
cd958eb3
MB
13463/* confdefs.h. */
13464_ACEOF
13465cat confdefs.h >>conftest.$ac_ext
13466cat >>conftest.$ac_ext <<_ACEOF
13467/* end confdefs.h. */
98418dba 13468#include <nlist.h>
b5de8dc0 13469
503d2be0
AS
13470int
13471main ()
13472{
98418dba
CW
13473static struct nlist ac_aggr;
13474if (ac_aggr.n_un.n_name)
13475return 0;
503d2be0
AS
13476 ;
13477 return 0;
13478}
13479_ACEOF
98418dba 13480rm -f conftest.$ac_objext
c0d27fcc 13481if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
98418dba 13482 (eval $ac_compile) 2>&5
503d2be0 13483 ac_status=$?
c0d27fcc 13484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13485 (exit $ac_status); } &&
98418dba 13486 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 13487 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13488 (eval $ac_try) 2>&5
13489 ac_status=$?
c0d27fcc 13490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13491 (exit $ac_status); }; }; then
98418dba 13492 ac_cv_member_struct_nlist_n_un_n_name=yes
503d2be0
AS
13493else
13494 echo "$as_me: failed program was:" >&5
cd958eb3
MB
13495sed 's/^/| /' conftest.$ac_ext >&5
13496
6bae0ccf
DL
13497cat >conftest.$ac_ext <<_ACEOF
13498#line $LINENO "configure"
cd958eb3
MB
13499/* confdefs.h. */
13500_ACEOF
13501cat confdefs.h >>conftest.$ac_ext
13502cat >>conftest.$ac_ext <<_ACEOF
13503/* end confdefs.h. */
6bae0ccf
DL
13504#include <nlist.h>
13505
13506int
13507main ()
13508{
13509static struct nlist ac_aggr;
13510if (sizeof ac_aggr.n_un.n_name)
13511return 0;
13512 ;
13513 return 0;
13514}
13515_ACEOF
13516rm -f conftest.$ac_objext
13517if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13518 (eval $ac_compile) 2>&5
13519 ac_status=$?
13520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13521 (exit $ac_status); } &&
13522 { ac_try='test -s conftest.$ac_objext'
13523 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13524 (eval $ac_try) 2>&5
13525 ac_status=$?
13526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13527 (exit $ac_status); }; }; then
13528 ac_cv_member_struct_nlist_n_un_n_name=yes
13529else
13530 echo "$as_me: failed program was:" >&5
cd958eb3
MB
13531sed 's/^/| /' conftest.$ac_ext >&5
13532
98418dba 13533ac_cv_member_struct_nlist_n_un_n_name=no
503d2be0 13534fi
98418dba 13535rm -f conftest.$ac_objext conftest.$ac_ext
b5de8dc0 13536fi
6bae0ccf
DL
13537rm -f conftest.$ac_objext conftest.$ac_ext
13538fi
c0d27fcc 13539echo "$as_me:$LINENO: result: $ac_cv_member_struct_nlist_n_un_n_name" >&5
98418dba
CW
13540echo "${ECHO_T}$ac_cv_member_struct_nlist_n_un_n_name" >&6
13541if test $ac_cv_member_struct_nlist_n_un_n_name = yes; then
b5de8dc0 13542
c0d27fcc 13543cat >>confdefs.h <<_ACEOF
98418dba 13544#define HAVE_STRUCT_NLIST_N_UN_N_NAME 1
c0d27fcc 13545_ACEOF
b5de8dc0 13546
c0d27fcc
MR
13547
13548cat >>confdefs.h <<\_ACEOF
98418dba 13549#define NLIST_NAME_UNION 1
c0d27fcc 13550_ACEOF
b5de8dc0 13551
98418dba 13552fi
b5de8dc0 13553
c0d27fcc 13554
98418dba 13555fi
c0d27fcc 13556
98418dba 13557done
b5de8dc0 13558
98418dba
CW
13559fi
13560done
b5de8dc0 13561
c0d27fcc 13562
98418dba 13563# Some definitions of getloadavg require that the program be installed setgid.
c0d27fcc 13564echo "$as_me:$LINENO: checking whether getloadavg requires setgid" >&5
98418dba
CW
13565echo $ECHO_N "checking whether getloadavg requires setgid... $ECHO_C" >&6
13566if test "${ac_cv_func_getloadavg_setgid+set}" = set; then
13567 echo $ECHO_N "(cached) $ECHO_C" >&6
13568else
13569 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 13570#line $LINENO "configure"
cd958eb3
MB
13571/* confdefs.h. */
13572_ACEOF
13573cat confdefs.h >>conftest.$ac_ext
13574cat >>conftest.$ac_ext <<_ACEOF
13575/* end confdefs.h. */
6bae0ccf 13576#include "$srcdir/$ac_config_libobj_dir/getloadavg.c"
98418dba
CW
13577#ifdef LDAV_PRIVILEGED
13578Yowza Am I SETGID yet
13579#endif
13580_ACEOF
13581if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 13582 $EGREP "Yowza Am I SETGID yet" >/dev/null 2>&1; then
98418dba
CW
13583 ac_cv_func_getloadavg_setgid=yes
13584else
13585 ac_cv_func_getloadavg_setgid=no
13586fi
13587rm -f conftest*
b5de8dc0 13588
98418dba 13589fi
c0d27fcc 13590echo "$as_me:$LINENO: result: $ac_cv_func_getloadavg_setgid" >&5
98418dba
CW
13591echo "${ECHO_T}$ac_cv_func_getloadavg_setgid" >&6
13592if test $ac_cv_func_getloadavg_setgid = yes; then
13593 NEED_SETGID=true
b5de8dc0 13594
c0d27fcc 13595cat >>confdefs.h <<\_ACEOF
98418dba 13596#define GETLOADAVG_PRIVILEGED 1
c0d27fcc 13597_ACEOF
98418dba 13598
b5de8dc0 13599else
98418dba 13600 NEED_SETGID=false
b5de8dc0 13601fi
98418dba
CW
13602
13603if test $ac_cv_func_getloadavg_setgid = yes; then
c0d27fcc 13604 echo "$as_me:$LINENO: checking group of /dev/kmem" >&5
98418dba
CW
13605echo $ECHO_N "checking group of /dev/kmem... $ECHO_C" >&6
13606if test "${ac_cv_group_kmem+set}" = set; then
13607 echo $ECHO_N "(cached) $ECHO_C" >&6
13608else
13609 # On Solaris, /dev/kmem is a symlink. Get info on the real file.
13610 ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null`
13611 # If we got an error (system does not support symlinks), try without -L.
13612 test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem`
13613 ac_cv_group_kmem=`echo $ac_ls_output \
13614 | sed -ne 's/[ ][ ]*/ /g;
13615 s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/;
13616 / /s/.* //;p;'`
13617
b5de8dc0 13618fi
c0d27fcc 13619echo "$as_me:$LINENO: result: $ac_cv_group_kmem" >&5
98418dba
CW
13620echo "${ECHO_T}$ac_cv_group_kmem" >&6
13621 KMEM_GROUP=$ac_cv_group_kmem
b5de8dc0 13622fi
98418dba
CW
13623if test "x$ac_save_LIBS" = x; then
13624 GETLOADAVG_LIBS=$LIBS
13625else
13626 GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$ac_save_LIBS!!"`
b5de8dc0 13627fi
98418dba 13628LIBS=$ac_save_LIBS
b5de8dc0 13629
c0d27fcc
MR
13630
13631
13632echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5
b936fae4
AS
13633echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
13634if test "${ac_cv_sys_largefile_source+set}" = set; then
503d2be0 13635 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 13636else
b936fae4
AS
13637 while :; do
13638 ac_cv_sys_largefile_source=no
503d2be0 13639 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 13640#line $LINENO "configure"
cd958eb3
MB
13641/* confdefs.h. */
13642_ACEOF
13643cat confdefs.h >>conftest.$ac_ext
13644cat >>conftest.$ac_ext <<_ACEOF
13645/* end confdefs.h. */
b936fae4 13646#include <stdio.h>
503d2be0
AS
13647int
13648main ()
13649{
b936fae4
AS
13650return !fseeko;
13651 ;
13652 return 0;
13653}
13654_ACEOF
13655rm -f conftest.$ac_objext
c0d27fcc 13656if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
b936fae4
AS
13657 (eval $ac_compile) 2>&5
13658 ac_status=$?
c0d27fcc 13659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b936fae4
AS
13660 (exit $ac_status); } &&
13661 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 13662 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
b936fae4
AS
13663 (eval $ac_try) 2>&5
13664 ac_status=$?
c0d27fcc 13665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b936fae4
AS
13666 (exit $ac_status); }; }; then
13667 break
13668else
13669 echo "$as_me: failed program was:" >&5
cd958eb3
MB
13670sed 's/^/| /' conftest.$ac_ext >&5
13671
b936fae4
AS
13672fi
13673rm -f conftest.$ac_objext conftest.$ac_ext
13674 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 13675#line $LINENO "configure"
cd958eb3
MB
13676/* confdefs.h. */
13677_ACEOF
13678cat confdefs.h >>conftest.$ac_ext
13679cat >>conftest.$ac_ext <<_ACEOF
13680/* end confdefs.h. */
b936fae4
AS
13681#define _LARGEFILE_SOURCE 1
13682#include <stdio.h>
b936fae4
AS
13683int
13684main ()
13685{
13686return !fseeko;
13687 ;
13688 return 0;
13689}
13690_ACEOF
13691rm -f conftest.$ac_objext
c0d27fcc 13692if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
b936fae4
AS
13693 (eval $ac_compile) 2>&5
13694 ac_status=$?
c0d27fcc 13695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b936fae4
AS
13696 (exit $ac_status); } &&
13697 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 13698 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
b936fae4
AS
13699 (eval $ac_try) 2>&5
13700 ac_status=$?
c0d27fcc 13701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b936fae4
AS
13702 (exit $ac_status); }; }; then
13703 ac_cv_sys_largefile_source=1; break
13704else
13705 echo "$as_me: failed program was:" >&5
cd958eb3
MB
13706sed 's/^/| /' conftest.$ac_ext >&5
13707
b936fae4
AS
13708fi
13709rm -f conftest.$ac_objext conftest.$ac_ext
13710 break
13711done
13712fi
c0d27fcc 13713echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5
b936fae4
AS
13714echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
13715if test "$ac_cv_sys_largefile_source" != no; then
13716
c0d27fcc 13717cat >>confdefs.h <<_ACEOF
b936fae4 13718#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
c0d27fcc 13719_ACEOF
b936fae4
AS
13720
13721fi
13722rm -f conftest*
4c343001 13723
b936fae4
AS
13724# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
13725# in glibc 2.1.3, but that breaks too many other things.
13726# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
c0d27fcc 13727echo "$as_me:$LINENO: checking for fseeko" >&5
b936fae4
AS
13728echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
13729if test "${ac_cv_func_fseeko+set}" = set; then
13730 echo $ECHO_N "(cached) $ECHO_C" >&6
13731else
13732 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 13733#line $LINENO "configure"
cd958eb3
MB
13734/* confdefs.h. */
13735_ACEOF
13736cat confdefs.h >>conftest.$ac_ext
13737cat >>conftest.$ac_ext <<_ACEOF
13738/* end confdefs.h. */
b936fae4 13739#include <stdio.h>
b936fae4
AS
13740int
13741main ()
13742{
13743return fseeko && fseeko (stdin, 0, 0);
503d2be0
AS
13744 ;
13745 return 0;
13746}
13747_ACEOF
13748rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13749if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
13750 (eval $ac_link) 2>&5
13751 ac_status=$?
c0d27fcc 13752 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
13753 (exit $ac_status); } &&
13754 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13755 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13756 (eval $ac_try) 2>&5
13757 ac_status=$?
c0d27fcc 13758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13759 (exit $ac_status); }; }; then
b936fae4 13760 ac_cv_func_fseeko=yes
503d2be0
AS
13761else
13762 echo "$as_me: failed program was:" >&5
cd958eb3
MB
13763sed 's/^/| /' conftest.$ac_ext >&5
13764
b936fae4 13765ac_cv_func_fseeko=no
503d2be0
AS
13766fi
13767rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13768fi
c0d27fcc 13769echo "$as_me:$LINENO: result: $ac_cv_func_fseeko" >&5
b936fae4
AS
13770echo "${ECHO_T}$ac_cv_func_fseeko" >&6
13771if test $ac_cv_func_fseeko = yes; then
13772
c0d27fcc 13773cat >>confdefs.h <<\_ACEOF
b936fae4 13774#define HAVE_FSEEKO 1
c0d27fcc 13775_ACEOF
b936fae4 13776
4c343001
DL
13777fi
13778
c0d27fcc 13779
cd958eb3
MB
13780echo "$as_me:$LINENO: checking whether getpgrp requires zero arguments" >&5
13781echo $ECHO_N "checking whether getpgrp requires zero arguments... $ECHO_C" >&6
13782if test "${ac_cv_func_getpgrp_void+set}" = set; then
13783 echo $ECHO_N "(cached) $ECHO_C" >&6
13784else
13785 # Use it with a single arg.
13786cat >conftest.$ac_ext <<_ACEOF
13787#line $LINENO "configure"
13788/* confdefs.h. */
13789_ACEOF
13790cat confdefs.h >>conftest.$ac_ext
13791cat >>conftest.$ac_ext <<_ACEOF
13792/* end confdefs.h. */
13793$ac_includes_default
13794int
13795main ()
13796{
13797getpgrp (0);
13798 ;
13799 return 0;
13800}
13801_ACEOF
13802rm -f conftest.$ac_objext
13803if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13804 (eval $ac_compile) 2>&5
13805 ac_status=$?
13806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13807 (exit $ac_status); } &&
13808 { ac_try='test -s conftest.$ac_objext'
13809 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13810 (eval $ac_try) 2>&5
13811 ac_status=$?
13812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13813 (exit $ac_status); }; }; then
13814 ac_cv_func_getpgrp_void=no
13815else
13816 echo "$as_me: failed program was:" >&5
13817sed 's/^/| /' conftest.$ac_ext >&5
13818
13819ac_cv_func_getpgrp_void=yes
13820fi
13821rm -f conftest.$ac_objext conftest.$ac_ext
13822
13823fi
13824echo "$as_me:$LINENO: result: $ac_cv_func_getpgrp_void" >&5
13825echo "${ECHO_T}$ac_cv_func_getpgrp_void" >&6
13826if test $ac_cv_func_getpgrp_void = yes; then
13827
13828cat >>confdefs.h <<\_ACEOF
13829#define GETPGRP_VOID 1
13830_ACEOF
13831
13832fi
13833
13834
b936fae4
AS
13835# UNIX98 PTYs.
13836
13837for ac_func in grantpt
503d2be0
AS
13838do
13839as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 13840echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
13841echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13842if eval "test \"\${$as_ac_var+set}\" = set"; then
13843 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 13844else
503d2be0 13845 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 13846#line $LINENO "configure"
cd958eb3
MB
13847/* confdefs.h. */
13848_ACEOF
13849cat confdefs.h >>conftest.$ac_ext
13850cat >>conftest.$ac_ext <<_ACEOF
13851/* end confdefs.h. */
503d2be0 13852/* System header to define __stub macros and hopefully few prototypes,
9e71690e
DK
13853 which can conflict with char $ac_func (); below.
13854 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13855 <limits.h> exists even on freestanding compilers. */
13856#ifdef __STDC__
13857# include <limits.h>
13858#else
13859# include <assert.h>
13860#endif
4c343001 13861/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
13862#ifdef __cplusplus
13863extern "C"
cd958eb3 13864{
503d2be0 13865#endif
4c343001 13866/* We use char because int might match the return type of a gcc2
503d2be0
AS
13867 builtin and then its argument prototype would still apply. */
13868char $ac_func ();
503d2be0
AS
13869/* The GNU C library defines this for functions which it implements
13870 to always fail with ENOSYS. Some functions are actually named
13871 something starting with __ and the normal name is an alias. */
13872#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13873choke me
13874#else
cd958eb3
MB
13875char (*f) () = $ac_func;
13876#endif
13877#ifdef __cplusplus
13878}
503d2be0 13879#endif
4c343001 13880
cd958eb3
MB
13881int
13882main ()
13883{
9e71690e 13884return f != $ac_func;
503d2be0
AS
13885 ;
13886 return 0;
13887}
13888_ACEOF
13889rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13890if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
13891 (eval $ac_link) 2>&5
13892 ac_status=$?
c0d27fcc 13893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
13894 (exit $ac_status); } &&
13895 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13896 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13897 (eval $ac_try) 2>&5
13898 ac_status=$?
c0d27fcc 13899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
13900 (exit $ac_status); }; }; then
13901 eval "$as_ac_var=yes"
13902else
13903 echo "$as_me: failed program was:" >&5
cd958eb3
MB
13904sed 's/^/| /' conftest.$ac_ext >&5
13905
503d2be0
AS
13906eval "$as_ac_var=no"
13907fi
13908rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13909fi
c0d27fcc 13910echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
13911echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13912if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 13913 cat >>confdefs.h <<_ACEOF
503d2be0 13914#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 13915_ACEOF
4c343001
DL
13916
13917fi
503d2be0
AS
13918done
13919
c0d27fcc 13920
b936fae4 13921# PTY-related GNU extensions.
4c343001 13922
b936fae4
AS
13923for ac_func in getpt
13924do
13925as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 13926echo "$as_me:$LINENO: checking for $ac_func" >&5
b936fae4
AS
13927echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13928if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 13929 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 13930else
b936fae4 13931 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 13932#line $LINENO "configure"
cd958eb3
MB
13933/* confdefs.h. */
13934_ACEOF
13935cat confdefs.h >>conftest.$ac_ext
13936cat >>conftest.$ac_ext <<_ACEOF
13937/* end confdefs.h. */
087121cc 13938/* System header to define __stub macros and hopefully few prototypes,
9e71690e
DK
13939 which can conflict with char $ac_func (); below.
13940 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13941 <limits.h> exists even on freestanding compilers. */
13942#ifdef __STDC__
13943# include <limits.h>
13944#else
13945# include <assert.h>
13946#endif
087121cc 13947/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
13948#ifdef __cplusplus
13949extern "C"
cd958eb3 13950{
503d2be0 13951#endif
087121cc 13952/* We use char because int might match the return type of a gcc2
503d2be0
AS
13953 builtin and then its argument prototype would still apply. */
13954char $ac_func ();
087121cc
GM
13955/* The GNU C library defines this for functions which it implements
13956 to always fail with ENOSYS. Some functions are actually named
13957 something starting with __ and the normal name is an alias. */
13958#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13959choke me
13960#else
cd958eb3
MB
13961char (*f) () = $ac_func;
13962#endif
13963#ifdef __cplusplus
13964}
087121cc
GM
13965#endif
13966
cd958eb3
MB
13967int
13968main ()
13969{
9e71690e 13970return f != $ac_func;
503d2be0
AS
13971 ;
13972 return 0;
13973}
13974_ACEOF
13975rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13976if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
13977 (eval $ac_link) 2>&5
13978 ac_status=$?
c0d27fcc 13979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
13980 (exit $ac_status); } &&
13981 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13982 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13983 (eval $ac_try) 2>&5
13984 ac_status=$?
c0d27fcc 13985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
13986 (exit $ac_status); }; }; then
13987 eval "$as_ac_var=yes"
13988else
13989 echo "$as_me: failed program was:" >&5
cd958eb3
MB
13990sed 's/^/| /' conftest.$ac_ext >&5
13991
503d2be0
AS
13992eval "$as_ac_var=no"
13993fi
13994rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13995fi
c0d27fcc 13996echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
13997echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13998if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 13999 cat >>confdefs.h <<_ACEOF
503d2be0 14000#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 14001_ACEOF
087121cc 14002
087121cc
GM
14003fi
14004done
14005
c0d27fcc 14006
ba4481b5
DL
14007# Check this now, so that we will NOT find the above functions in ncurses.
14008# That is because we have not set up to link ncurses in lib-src.
14009# It's better to believe a function is not available
14010# than to expect to find it in ncurses.
503d2be0 14011
c0d27fcc 14012echo "$as_me:$LINENO: checking for tparm in -lncurses" >&5
503d2be0
AS
14013echo $ECHO_N "checking for tparm in -lncurses... $ECHO_C" >&6
14014if test "${ac_cv_lib_ncurses_tparm+set}" = set; then
14015 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 14016else
503d2be0 14017 ac_check_lib_save_LIBS=$LIBS
ba4481b5 14018LIBS="-lncurses $LIBS"
503d2be0 14019cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 14020#line $LINENO "configure"
cd958eb3
MB
14021/* confdefs.h. */
14022_ACEOF
14023cat confdefs.h >>conftest.$ac_ext
14024cat >>conftest.$ac_ext <<_ACEOF
14025/* end confdefs.h. */
503d2be0 14026
ba4481b5 14027/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
14028#ifdef __cplusplus
14029extern "C"
14030#endif
ba4481b5 14031/* We use char because int might match the return type of a gcc2
503d2be0
AS
14032 builtin and then its argument prototype would still apply. */
14033char tparm ();
14034int
14035main ()
14036{
14037tparm ();
14038 ;
14039 return 0;
14040}
14041_ACEOF
14042rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14043if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
14044 (eval $ac_link) 2>&5
14045 ac_status=$?
c0d27fcc 14046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
14047 (exit $ac_status); } &&
14048 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14049 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
14050 (eval $ac_try) 2>&5
14051 ac_status=$?
c0d27fcc 14052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
14053 (exit $ac_status); }; }; then
14054 ac_cv_lib_ncurses_tparm=yes
14055else
14056 echo "$as_me: failed program was:" >&5
cd958eb3
MB
14057sed 's/^/| /' conftest.$ac_ext >&5
14058
503d2be0
AS
14059ac_cv_lib_ncurses_tparm=no
14060fi
14061rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14062LIBS=$ac_check_lib_save_LIBS
14063fi
c0d27fcc 14064echo "$as_me:$LINENO: result: $ac_cv_lib_ncurses_tparm" >&5
503d2be0
AS
14065echo "${ECHO_T}$ac_cv_lib_ncurses_tparm" >&6
14066if test $ac_cv_lib_ncurses_tparm = yes; then
c0d27fcc 14067 cat >>confdefs.h <<_ACEOF
503d2be0 14068#define HAVE_LIBNCURSES 1
c0d27fcc 14069_ACEOF
ba4481b5
DL
14070
14071 LIBS="-lncurses $LIBS"
14072
ba4481b5
DL
14073fi
14074
c0d27fcc 14075
84e70f78
KR
14076# Do we need the Hesiod library to provide the support routines?
14077if test "$with_hesiod" = yes ; then
14078 # Don't set $LIBS here -- see comments above.
14079 resolv=no
c0d27fcc 14080 echo "$as_me:$LINENO: checking for res_send" >&5
84e70f78
KR
14081echo $ECHO_N "checking for res_send... $ECHO_C" >&6
14082if test "${ac_cv_func_res_send+set}" = set; then
14083 echo $ECHO_N "(cached) $ECHO_C" >&6
14084else
14085 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 14086#line $LINENO "configure"
cd958eb3
MB
14087/* confdefs.h. */
14088_ACEOF
14089cat confdefs.h >>conftest.$ac_ext
14090cat >>conftest.$ac_ext <<_ACEOF
14091/* end confdefs.h. */
84e70f78 14092/* System header to define __stub macros and hopefully few prototypes,
9e71690e
DK
14093 which can conflict with char res_send (); below.
14094 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14095 <limits.h> exists even on freestanding compilers. */
14096#ifdef __STDC__
14097# include <limits.h>
14098#else
14099# include <assert.h>
14100#endif
84e70f78
KR
14101/* Override any gcc2 internal prototype to avoid an error. */
14102#ifdef __cplusplus
14103extern "C"
cd958eb3 14104{
84e70f78
KR
14105#endif
14106/* We use char because int might match the return type of a gcc2
14107 builtin and then its argument prototype would still apply. */
14108char res_send ();
84e70f78
KR
14109/* The GNU C library defines this for functions which it implements
14110 to always fail with ENOSYS. Some functions are actually named
14111 something starting with __ and the normal name is an alias. */
14112#if defined (__stub_res_send) || defined (__stub___res_send)
14113choke me
14114#else
cd958eb3 14115char (*f) () = res_send;
84e70f78 14116#endif
cd958eb3
MB
14117#ifdef __cplusplus
14118}
14119#endif
14120
14121int
14122main ()
14123{
9e71690e 14124return f != res_send;
84e70f78
KR
14125 ;
14126 return 0;
14127}
14128_ACEOF
14129rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14130if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
84e70f78
KR
14131 (eval $ac_link) 2>&5
14132 ac_status=$?
c0d27fcc 14133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
14134 (exit $ac_status); } &&
14135 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14136 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
14137 (eval $ac_try) 2>&5
14138 ac_status=$?
c0d27fcc 14139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
14140 (exit $ac_status); }; }; then
14141 ac_cv_func_res_send=yes
14142else
14143 echo "$as_me: failed program was:" >&5
cd958eb3
MB
14144sed 's/^/| /' conftest.$ac_ext >&5
14145
84e70f78
KR
14146ac_cv_func_res_send=no
14147fi
14148rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14149fi
c0d27fcc 14150echo "$as_me:$LINENO: result: $ac_cv_func_res_send" >&5
84e70f78
KR
14151echo "${ECHO_T}$ac_cv_func_res_send" >&6
14152if test $ac_cv_func_res_send = yes; then
14153 :
14154else
c0d27fcc 14155 echo "$as_me:$LINENO: checking for __res_send" >&5
84e70f78
KR
14156echo $ECHO_N "checking for __res_send... $ECHO_C" >&6
14157if test "${ac_cv_func___res_send+set}" = set; then
14158 echo $ECHO_N "(cached) $ECHO_C" >&6
14159else
14160 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 14161#line $LINENO "configure"
cd958eb3
MB
14162/* confdefs.h. */
14163_ACEOF
14164cat confdefs.h >>conftest.$ac_ext
14165cat >>conftest.$ac_ext <<_ACEOF
14166/* end confdefs.h. */
84e70f78 14167/* System header to define __stub macros and hopefully few prototypes,
9e71690e
DK
14168 which can conflict with char __res_send (); below.
14169 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14170 <limits.h> exists even on freestanding compilers. */
14171#ifdef __STDC__
14172# include <limits.h>
14173#else
14174# include <assert.h>
14175#endif
84e70f78
KR
14176/* Override any gcc2 internal prototype to avoid an error. */
14177#ifdef __cplusplus
14178extern "C"
cd958eb3 14179{
84e70f78
KR
14180#endif
14181/* We use char because int might match the return type of a gcc2
14182 builtin and then its argument prototype would still apply. */
14183char __res_send ();
84e70f78
KR
14184/* The GNU C library defines this for functions which it implements
14185 to always fail with ENOSYS. Some functions are actually named
14186 something starting with __ and the normal name is an alias. */
14187#if defined (__stub___res_send) || defined (__stub_____res_send)
14188choke me
14189#else
cd958eb3
MB
14190char (*f) () = __res_send;
14191#endif
14192#ifdef __cplusplus
14193}
84e70f78
KR
14194#endif
14195
cd958eb3
MB
14196int
14197main ()
14198{
9e71690e 14199return f != __res_send;
84e70f78
KR
14200 ;
14201 return 0;
14202}
14203_ACEOF
14204rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14205if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
84e70f78
KR
14206 (eval $ac_link) 2>&5
14207 ac_status=$?
c0d27fcc 14208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
14209 (exit $ac_status); } &&
14210 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14211 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
14212 (eval $ac_try) 2>&5
14213 ac_status=$?
c0d27fcc 14214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
14215 (exit $ac_status); }; }; then
14216 ac_cv_func___res_send=yes
14217else
14218 echo "$as_me: failed program was:" >&5
cd958eb3
MB
14219sed 's/^/| /' conftest.$ac_ext >&5
14220
84e70f78
KR
14221ac_cv_func___res_send=no
14222fi
14223rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14224fi
c0d27fcc 14225echo "$as_me:$LINENO: result: $ac_cv_func___res_send" >&5
84e70f78
KR
14226echo "${ECHO_T}$ac_cv_func___res_send" >&6
14227if test $ac_cv_func___res_send = yes; then
14228 :
14229else
c0d27fcc 14230 echo "$as_me:$LINENO: checking for res_send in -lresolv" >&5
84e70f78
KR
14231echo $ECHO_N "checking for res_send in -lresolv... $ECHO_C" >&6
14232if test "${ac_cv_lib_resolv_res_send+set}" = set; then
14233 echo $ECHO_N "(cached) $ECHO_C" >&6
14234else
14235 ac_check_lib_save_LIBS=$LIBS
14236LIBS="-lresolv $LIBS"
14237cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 14238#line $LINENO "configure"
cd958eb3
MB
14239/* confdefs.h. */
14240_ACEOF
14241cat confdefs.h >>conftest.$ac_ext
14242cat >>conftest.$ac_ext <<_ACEOF
14243/* end confdefs.h. */
84e70f78
KR
14244
14245/* Override any gcc2 internal prototype to avoid an error. */
14246#ifdef __cplusplus
14247extern "C"
14248#endif
14249/* We use char because int might match the return type of a gcc2
14250 builtin and then its argument prototype would still apply. */
14251char res_send ();
14252int
14253main ()
14254{
14255res_send ();
14256 ;
14257 return 0;
14258}
14259_ACEOF
14260rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14261if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
84e70f78
KR
14262 (eval $ac_link) 2>&5
14263 ac_status=$?
c0d27fcc 14264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
14265 (exit $ac_status); } &&
14266 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14267 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
14268 (eval $ac_try) 2>&5
14269 ac_status=$?
c0d27fcc 14270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
14271 (exit $ac_status); }; }; then
14272 ac_cv_lib_resolv_res_send=yes
14273else
14274 echo "$as_me: failed program was:" >&5
cd958eb3
MB
14275sed 's/^/| /' conftest.$ac_ext >&5
14276
84e70f78
KR
14277ac_cv_lib_resolv_res_send=no
14278fi
14279rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14280LIBS=$ac_check_lib_save_LIBS
14281fi
c0d27fcc 14282echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_send" >&5
84e70f78
KR
14283echo "${ECHO_T}$ac_cv_lib_resolv_res_send" >&6
14284if test $ac_cv_lib_resolv_res_send = yes; then
14285 resolv=yes
14286else
c0d27fcc 14287 echo "$as_me:$LINENO: checking for __res_send in -lresolv" >&5
84e70f78
KR
14288echo $ECHO_N "checking for __res_send in -lresolv... $ECHO_C" >&6
14289if test "${ac_cv_lib_resolv___res_send+set}" = set; then
14290 echo $ECHO_N "(cached) $ECHO_C" >&6
14291else
14292 ac_check_lib_save_LIBS=$LIBS
14293LIBS="-lresolv $LIBS"
14294cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 14295#line $LINENO "configure"
cd958eb3
MB
14296/* confdefs.h. */
14297_ACEOF
14298cat confdefs.h >>conftest.$ac_ext
14299cat >>conftest.$ac_ext <<_ACEOF
14300/* end confdefs.h. */
84e70f78
KR
14301
14302/* Override any gcc2 internal prototype to avoid an error. */
14303#ifdef __cplusplus
14304extern "C"
14305#endif
14306/* We use char because int might match the return type of a gcc2
14307 builtin and then its argument prototype would still apply. */
14308char __res_send ();
14309int
14310main ()
14311{
14312__res_send ();
14313 ;
14314 return 0;
14315}
14316_ACEOF
14317rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14318if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
84e70f78
KR
14319 (eval $ac_link) 2>&5
14320 ac_status=$?
c0d27fcc 14321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
14322 (exit $ac_status); } &&
14323 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14324 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
14325 (eval $ac_try) 2>&5
14326 ac_status=$?
c0d27fcc 14327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
14328 (exit $ac_status); }; }; then
14329 ac_cv_lib_resolv___res_send=yes
14330else
14331 echo "$as_me: failed program was:" >&5
cd958eb3
MB
14332sed 's/^/| /' conftest.$ac_ext >&5
14333
84e70f78
KR
14334ac_cv_lib_resolv___res_send=no
14335fi
14336rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14337LIBS=$ac_check_lib_save_LIBS
14338fi
c0d27fcc 14339echo "$as_me:$LINENO: result: $ac_cv_lib_resolv___res_send" >&5
84e70f78
KR
14340echo "${ECHO_T}$ac_cv_lib_resolv___res_send" >&6
14341if test $ac_cv_lib_resolv___res_send = yes; then
14342 resolv=yes
14343fi
14344
14345fi
14346
14347fi
14348
14349fi
14350
14351 if test "$resolv" = yes ; then
14352 RESOLVLIB=-lresolv
b936fae4 14353
c0d27fcc 14354cat >>confdefs.h <<\_ACEOF
84e70f78 14355#define HAVE_LIBRESOLV 1
c0d27fcc 14356_ACEOF
84e70f78
KR
14357
14358 else
14359 RESOLVLIB=
14360 fi
c0d27fcc 14361 echo "$as_me:$LINENO: checking for hes_getmailhost" >&5
84e70f78
KR
14362echo $ECHO_N "checking for hes_getmailhost... $ECHO_C" >&6
14363if test "${ac_cv_func_hes_getmailhost+set}" = set; then
14364 echo $ECHO_N "(cached) $ECHO_C" >&6
14365else
14366 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 14367#line $LINENO "configure"
cd958eb3
MB
14368/* confdefs.h. */
14369_ACEOF
14370cat confdefs.h >>conftest.$ac_ext
14371cat >>conftest.$ac_ext <<_ACEOF
14372/* end confdefs.h. */
84e70f78 14373/* System header to define __stub macros and hopefully few prototypes,
9e71690e
DK
14374 which can conflict with char hes_getmailhost (); below.
14375 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14376 <limits.h> exists even on freestanding compilers. */
14377#ifdef __STDC__
14378# include <limits.h>
14379#else
14380# include <assert.h>
14381#endif
84e70f78
KR
14382/* Override any gcc2 internal prototype to avoid an error. */
14383#ifdef __cplusplus
14384extern "C"
cd958eb3 14385{
84e70f78
KR
14386#endif
14387/* We use char because int might match the return type of a gcc2
14388 builtin and then its argument prototype would still apply. */
14389char hes_getmailhost ();
84e70f78
KR
14390/* The GNU C library defines this for functions which it implements
14391 to always fail with ENOSYS. Some functions are actually named
14392 something starting with __ and the normal name is an alias. */
14393#if defined (__stub_hes_getmailhost) || defined (__stub___hes_getmailhost)
14394choke me
14395#else
cd958eb3 14396char (*f) () = hes_getmailhost;
84e70f78 14397#endif
cd958eb3
MB
14398#ifdef __cplusplus
14399}
14400#endif
14401
14402int
14403main ()
14404{
9e71690e 14405return f != hes_getmailhost;
84e70f78
KR
14406 ;
14407 return 0;
14408}
14409_ACEOF
14410rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14411if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
84e70f78
KR
14412 (eval $ac_link) 2>&5
14413 ac_status=$?
c0d27fcc 14414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
14415 (exit $ac_status); } &&
14416 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14417 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
14418 (eval $ac_try) 2>&5
14419 ac_status=$?
c0d27fcc 14420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
14421 (exit $ac_status); }; }; then
14422 ac_cv_func_hes_getmailhost=yes
14423else
14424 echo "$as_me: failed program was:" >&5
cd958eb3
MB
14425sed 's/^/| /' conftest.$ac_ext >&5
14426
84e70f78
KR
14427ac_cv_func_hes_getmailhost=no
14428fi
14429rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14430fi
c0d27fcc 14431echo "$as_me:$LINENO: result: $ac_cv_func_hes_getmailhost" >&5
84e70f78
KR
14432echo "${ECHO_T}$ac_cv_func_hes_getmailhost" >&6
14433if test $ac_cv_func_hes_getmailhost = yes; then
14434 :
14435else
c0d27fcc 14436 echo "$as_me:$LINENO: checking for hes_getmailhost in -lhesiod" >&5
84e70f78
KR
14437echo $ECHO_N "checking for hes_getmailhost in -lhesiod... $ECHO_C" >&6
14438if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then
14439 echo $ECHO_N "(cached) $ECHO_C" >&6
14440else
14441 ac_check_lib_save_LIBS=$LIBS
14442LIBS="-lhesiod $RESOLVLIB $LIBS"
14443cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 14444#line $LINENO "configure"
cd958eb3
MB
14445/* confdefs.h. */
14446_ACEOF
14447cat confdefs.h >>conftest.$ac_ext
14448cat >>conftest.$ac_ext <<_ACEOF
14449/* end confdefs.h. */
84e70f78
KR
14450
14451/* Override any gcc2 internal prototype to avoid an error. */
14452#ifdef __cplusplus
14453extern "C"
14454#endif
14455/* We use char because int might match the return type of a gcc2
14456 builtin and then its argument prototype would still apply. */
14457char hes_getmailhost ();
14458int
14459main ()
14460{
14461hes_getmailhost ();
14462 ;
14463 return 0;
14464}
14465_ACEOF
14466rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14467if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
84e70f78
KR
14468 (eval $ac_link) 2>&5
14469 ac_status=$?
c0d27fcc 14470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
14471 (exit $ac_status); } &&
14472 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14473 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
14474 (eval $ac_try) 2>&5
14475 ac_status=$?
c0d27fcc 14476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
14477 (exit $ac_status); }; }; then
14478 ac_cv_lib_hesiod_hes_getmailhost=yes
14479else
14480 echo "$as_me: failed program was:" >&5
cd958eb3
MB
14481sed 's/^/| /' conftest.$ac_ext >&5
14482
84e70f78
KR
14483ac_cv_lib_hesiod_hes_getmailhost=no
14484fi
14485rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14486LIBS=$ac_check_lib_save_LIBS
14487fi
c0d27fcc 14488echo "$as_me:$LINENO: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5
84e70f78
KR
14489echo "${ECHO_T}$ac_cv_lib_hesiod_hes_getmailhost" >&6
14490if test $ac_cv_lib_hesiod_hes_getmailhost = yes; then
b936fae4 14491
c0d27fcc 14492cat >>confdefs.h <<\_ACEOF
84e70f78 14493#define HAVE_LIBHESIOD 1
c0d27fcc 14494_ACEOF
84e70f78
KR
14495
14496else
14497 :
14498fi
14499
14500fi
14501
14502fi
14503
a21616bd
KR
14504# These tell us which Kerberos-related libraries to use.
14505if test "${with_kerberos+set}" = set; then
503d2be0 14506
c0d27fcc 14507echo "$as_me:$LINENO: checking for com_err in -lcom_err" >&5
503d2be0
AS
14508echo $ECHO_N "checking for com_err in -lcom_err... $ECHO_C" >&6
14509if test "${ac_cv_lib_com_err_com_err+set}" = set; then
14510 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 14511else
503d2be0 14512 ac_check_lib_save_LIBS=$LIBS
a21616bd 14513LIBS="-lcom_err $LIBS"
503d2be0 14514cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 14515#line $LINENO "configure"
cd958eb3
MB
14516/* confdefs.h. */
14517_ACEOF
14518cat confdefs.h >>conftest.$ac_ext
14519cat >>conftest.$ac_ext <<_ACEOF
14520/* end confdefs.h. */
503d2be0 14521
a21616bd 14522/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
14523#ifdef __cplusplus
14524extern "C"
14525#endif
a21616bd 14526/* We use char because int might match the return type of a gcc2
503d2be0
AS
14527 builtin and then its argument prototype would still apply. */
14528char com_err ();
14529int
14530main ()
14531{
14532com_err ();
14533 ;
14534 return 0;
14535}
14536_ACEOF
14537rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14538if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
14539 (eval $ac_link) 2>&5
14540 ac_status=$?
c0d27fcc 14541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
14542 (exit $ac_status); } &&
14543 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14544 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
14545 (eval $ac_try) 2>&5
14546 ac_status=$?
c0d27fcc 14547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
14548 (exit $ac_status); }; }; then
14549 ac_cv_lib_com_err_com_err=yes
14550else
14551 echo "$as_me: failed program was:" >&5
cd958eb3
MB
14552sed 's/^/| /' conftest.$ac_ext >&5
14553
503d2be0
AS
14554ac_cv_lib_com_err_com_err=no
14555fi
14556rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14557LIBS=$ac_check_lib_save_LIBS
14558fi
c0d27fcc 14559echo "$as_me:$LINENO: result: $ac_cv_lib_com_err_com_err" >&5
503d2be0
AS
14560echo "${ECHO_T}$ac_cv_lib_com_err_com_err" >&6
14561if test $ac_cv_lib_com_err_com_err = yes; then
c0d27fcc 14562 cat >>confdefs.h <<_ACEOF
503d2be0 14563#define HAVE_LIBCOM_ERR 1
c0d27fcc 14564_ACEOF
a21616bd
KR
14565
14566 LIBS="-lcom_err $LIBS"
14567
a21616bd
KR
14568fi
14569
c0d27fcc
MR
14570
14571echo "$as_me:$LINENO: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
503d2be0
AS
14572echo $ECHO_N "checking for mit_des_cbc_encrypt in -lk5crypto... $ECHO_C" >&6
14573if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then
14574 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 14575else
503d2be0 14576 ac_check_lib_save_LIBS=$LIBS
a21616bd 14577LIBS="-lk5crypto $LIBS"
503d2be0 14578cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 14579#line $LINENO "configure"
cd958eb3
MB
14580/* confdefs.h. */
14581_ACEOF
14582cat confdefs.h >>conftest.$ac_ext
14583cat >>conftest.$ac_ext <<_ACEOF
14584/* end confdefs.h. */
503d2be0 14585
a21616bd 14586/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
14587#ifdef __cplusplus
14588extern "C"
14589#endif
a21616bd 14590/* We use char because int might match the return type of a gcc2
503d2be0
AS
14591 builtin and then its argument prototype would still apply. */
14592char mit_des_cbc_encrypt ();
14593int
14594main ()
14595{
14596mit_des_cbc_encrypt ();
14597 ;
14598 return 0;
14599}
14600_ACEOF
14601rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14602if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
14603 (eval $ac_link) 2>&5
14604 ac_status=$?
c0d27fcc 14605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
14606 (exit $ac_status); } &&
14607 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14608 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
14609 (eval $ac_try) 2>&5
14610 ac_status=$?
c0d27fcc 14611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
14612 (exit $ac_status); }; }; then
14613 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes
14614else
14615 echo "$as_me: failed program was:" >&5
cd958eb3
MB
14616sed 's/^/| /' conftest.$ac_ext >&5
14617
503d2be0
AS
14618ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no
14619fi
14620rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14621LIBS=$ac_check_lib_save_LIBS
14622fi
c0d27fcc 14623echo "$as_me:$LINENO: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5
503d2be0
AS
14624echo "${ECHO_T}$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6
14625if test $ac_cv_lib_k5crypto_mit_des_cbc_encrypt = yes; then
c0d27fcc 14626 cat >>confdefs.h <<_ACEOF
503d2be0 14627#define HAVE_LIBK5CRYPTO 1
c0d27fcc 14628_ACEOF
a21616bd
KR
14629
14630 LIBS="-lk5crypto $LIBS"
14631
a21616bd
KR
14632fi
14633
c0d27fcc
MR
14634
14635echo "$as_me:$LINENO: checking for mit_des_cbc_encrypt in -lcrypto" >&5
503d2be0
AS
14636echo $ECHO_N "checking for mit_des_cbc_encrypt in -lcrypto... $ECHO_C" >&6
14637if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then
14638 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 14639else
503d2be0 14640 ac_check_lib_save_LIBS=$LIBS
a21616bd 14641LIBS="-lcrypto $LIBS"
503d2be0 14642cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 14643#line $LINENO "configure"
cd958eb3
MB
14644/* confdefs.h. */
14645_ACEOF
14646cat confdefs.h >>conftest.$ac_ext
14647cat >>conftest.$ac_ext <<_ACEOF
14648/* end confdefs.h. */
503d2be0 14649
a21616bd 14650/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
14651#ifdef __cplusplus
14652extern "C"
14653#endif
a21616bd 14654/* We use char because int might match the return type of a gcc2
503d2be0
AS
14655 builtin and then its argument prototype would still apply. */
14656char mit_des_cbc_encrypt ();
14657int
14658main ()
14659{
14660mit_des_cbc_encrypt ();
14661 ;
14662 return 0;
14663}
14664_ACEOF
14665rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14666if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
14667 (eval $ac_link) 2>&5
14668 ac_status=$?
c0d27fcc 14669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
14670 (exit $ac_status); } &&
14671 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14672 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
14673 (eval $ac_try) 2>&5
14674 ac_status=$?
c0d27fcc 14675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
14676 (exit $ac_status); }; }; then
14677 ac_cv_lib_crypto_mit_des_cbc_encrypt=yes
14678else
14679 echo "$as_me: failed program was:" >&5
cd958eb3
MB
14680sed 's/^/| /' conftest.$ac_ext >&5
14681
503d2be0
AS
14682ac_cv_lib_crypto_mit_des_cbc_encrypt=no
14683fi
14684rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14685LIBS=$ac_check_lib_save_LIBS
14686fi
c0d27fcc 14687echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5
503d2be0
AS
14688echo "${ECHO_T}$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6
14689if test $ac_cv_lib_crypto_mit_des_cbc_encrypt = yes; then
c0d27fcc 14690 cat >>confdefs.h <<_ACEOF
503d2be0 14691#define HAVE_LIBCRYPTO 1
c0d27fcc 14692_ACEOF
a21616bd
KR
14693
14694 LIBS="-lcrypto $LIBS"
14695
a21616bd
KR
14696fi
14697
c0d27fcc
MR
14698
14699echo "$as_me:$LINENO: checking for krb5_init_context in -lkrb5" >&5
503d2be0
AS
14700echo $ECHO_N "checking for krb5_init_context in -lkrb5... $ECHO_C" >&6
14701if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then
14702 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 14703else
503d2be0 14704 ac_check_lib_save_LIBS=$LIBS
a21616bd 14705LIBS="-lkrb5 $LIBS"
503d2be0 14706cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 14707#line $LINENO "configure"
cd958eb3
MB
14708/* confdefs.h. */
14709_ACEOF
14710cat confdefs.h >>conftest.$ac_ext
14711cat >>conftest.$ac_ext <<_ACEOF
14712/* end confdefs.h. */
a21616bd 14713
503d2be0
AS
14714/* Override any gcc2 internal prototype to avoid an error. */
14715#ifdef __cplusplus
14716extern "C"
14717#endif
14718/* We use char because int might match the return type of a gcc2
14719 builtin and then its argument prototype would still apply. */
14720char krb5_init_context ();
14721int
14722main ()
14723{
14724krb5_init_context ();
14725 ;
14726 return 0;
14727}
14728_ACEOF
14729rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14730if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
14731 (eval $ac_link) 2>&5
14732 ac_status=$?
c0d27fcc 14733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
14734 (exit $ac_status); } &&
14735 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14736 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
14737 (eval $ac_try) 2>&5
14738 ac_status=$?
c0d27fcc 14739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
14740 (exit $ac_status); }; }; then
14741 ac_cv_lib_krb5_krb5_init_context=yes
14742else
14743 echo "$as_me: failed program was:" >&5
cd958eb3
MB
14744sed 's/^/| /' conftest.$ac_ext >&5
14745
503d2be0
AS
14746ac_cv_lib_krb5_krb5_init_context=no
14747fi
14748rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14749LIBS=$ac_check_lib_save_LIBS
14750fi
c0d27fcc 14751echo "$as_me:$LINENO: result: $ac_cv_lib_krb5_krb5_init_context" >&5
503d2be0
AS
14752echo "${ECHO_T}$ac_cv_lib_krb5_krb5_init_context" >&6
14753if test $ac_cv_lib_krb5_krb5_init_context = yes; then
c0d27fcc 14754 cat >>confdefs.h <<_ACEOF
503d2be0 14755#define HAVE_LIBKRB5 1
c0d27fcc 14756_ACEOF
a21616bd
KR
14757
14758 LIBS="-lkrb5 $LIBS"
14759
a21616bd
KR
14760fi
14761
14762 if test "${with_kerberos5+set}" != set; then
503d2be0 14763
c0d27fcc 14764echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes425" >&5
503d2be0
AS
14765echo $ECHO_N "checking for des_cbc_encrypt in -ldes425... $ECHO_C" >&6
14766if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then
14767 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 14768else
503d2be0 14769 ac_check_lib_save_LIBS=$LIBS
a21616bd 14770LIBS="-ldes425 $LIBS"
503d2be0 14771cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 14772#line $LINENO "configure"
cd958eb3
MB
14773/* confdefs.h. */
14774_ACEOF
14775cat confdefs.h >>conftest.$ac_ext
14776cat >>conftest.$ac_ext <<_ACEOF
14777/* end confdefs.h. */
503d2be0 14778
a21616bd 14779/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
14780#ifdef __cplusplus
14781extern "C"
14782#endif
a21616bd 14783/* We use char because int might match the return type of a gcc2
503d2be0
AS
14784 builtin and then its argument prototype would still apply. */
14785char des_cbc_encrypt ();
14786int
14787main ()
14788{
14789des_cbc_encrypt ();
14790 ;
14791 return 0;
14792}
14793_ACEOF
14794rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14795if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
14796 (eval $ac_link) 2>&5
14797 ac_status=$?
c0d27fcc 14798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
14799 (exit $ac_status); } &&
14800 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14801 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
14802 (eval $ac_try) 2>&5
14803 ac_status=$?
c0d27fcc 14804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
14805 (exit $ac_status); }; }; then
14806 ac_cv_lib_des425_des_cbc_encrypt=yes
14807else
14808 echo "$as_me: failed program was:" >&5
cd958eb3
MB
14809sed 's/^/| /' conftest.$ac_ext >&5
14810
503d2be0
AS
14811ac_cv_lib_des425_des_cbc_encrypt=no
14812fi
14813rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14814LIBS=$ac_check_lib_save_LIBS
14815fi
c0d27fcc 14816echo "$as_me:$LINENO: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
503d2be0
AS
14817echo "${ECHO_T}$ac_cv_lib_des425_des_cbc_encrypt" >&6
14818if test $ac_cv_lib_des425_des_cbc_encrypt = yes; then
c0d27fcc 14819 cat >>confdefs.h <<_ACEOF
503d2be0 14820#define HAVE_LIBDES425 1
c0d27fcc 14821_ACEOF
a21616bd
KR
14822
14823 LIBS="-ldes425 $LIBS"
14824
14825else
503d2be0 14826
c0d27fcc 14827echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes" >&5
503d2be0
AS
14828echo $ECHO_N "checking for des_cbc_encrypt in -ldes... $ECHO_C" >&6
14829if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then
14830 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 14831else
503d2be0 14832 ac_check_lib_save_LIBS=$LIBS
a21616bd 14833LIBS="-ldes $LIBS"
503d2be0 14834cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 14835#line $LINENO "configure"
cd958eb3
MB
14836/* confdefs.h. */
14837_ACEOF
14838cat confdefs.h >>conftest.$ac_ext
14839cat >>conftest.$ac_ext <<_ACEOF
14840/* end confdefs.h. */
503d2be0 14841
a21616bd 14842/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
14843#ifdef __cplusplus
14844extern "C"
14845#endif
a21616bd 14846/* We use char because int might match the return type of a gcc2
503d2be0
AS
14847 builtin and then its argument prototype would still apply. */
14848char des_cbc_encrypt ();
14849int
14850main ()
14851{
14852des_cbc_encrypt ();
14853 ;
14854 return 0;
14855}
14856_ACEOF
14857rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14858if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
14859 (eval $ac_link) 2>&5
14860 ac_status=$?
c0d27fcc 14861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
14862 (exit $ac_status); } &&
14863 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14864 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
14865 (eval $ac_try) 2>&5
14866 ac_status=$?
c0d27fcc 14867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
14868 (exit $ac_status); }; }; then
14869 ac_cv_lib_des_des_cbc_encrypt=yes
14870else
14871 echo "$as_me: failed program was:" >&5
cd958eb3
MB
14872sed 's/^/| /' conftest.$ac_ext >&5
14873
503d2be0
AS
14874ac_cv_lib_des_des_cbc_encrypt=no
14875fi
14876rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14877LIBS=$ac_check_lib_save_LIBS
14878fi
c0d27fcc 14879echo "$as_me:$LINENO: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
503d2be0
AS
14880echo "${ECHO_T}$ac_cv_lib_des_des_cbc_encrypt" >&6
14881if test $ac_cv_lib_des_des_cbc_encrypt = yes; then
c0d27fcc 14882 cat >>confdefs.h <<_ACEOF
503d2be0 14883#define HAVE_LIBDES 1
c0d27fcc 14884_ACEOF
a21616bd
KR
14885
14886 LIBS="-ldes $LIBS"
14887
a21616bd
KR
14888fi
14889
14890fi
14891
c0d27fcc
MR
14892
14893echo "$as_me:$LINENO: checking for krb_get_cred in -lkrb4" >&5
503d2be0
AS
14894echo $ECHO_N "checking for krb_get_cred in -lkrb4... $ECHO_C" >&6
14895if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then
14896 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 14897else
503d2be0 14898 ac_check_lib_save_LIBS=$LIBS
a21616bd 14899LIBS="-lkrb4 $LIBS"
503d2be0 14900cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 14901#line $LINENO "configure"
cd958eb3
MB
14902/* confdefs.h. */
14903_ACEOF
14904cat confdefs.h >>conftest.$ac_ext
14905cat >>conftest.$ac_ext <<_ACEOF
14906/* end confdefs.h. */
503d2be0 14907
a21616bd 14908/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
14909#ifdef __cplusplus
14910extern "C"
14911#endif
a21616bd 14912/* We use char because int might match the return type of a gcc2
503d2be0
AS
14913 builtin and then its argument prototype would still apply. */
14914char krb_get_cred ();
14915int
14916main ()
14917{
14918krb_get_cred ();
14919 ;
14920 return 0;
14921}
14922_ACEOF
14923rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14924if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
14925 (eval $ac_link) 2>&5
14926 ac_status=$?
c0d27fcc 14927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
14928 (exit $ac_status); } &&
14929 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14930 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
14931 (eval $ac_try) 2>&5
14932 ac_status=$?
c0d27fcc 14933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
14934 (exit $ac_status); }; }; then
14935 ac_cv_lib_krb4_krb_get_cred=yes
14936else
14937 echo "$as_me: failed program was:" >&5
cd958eb3
MB
14938sed 's/^/| /' conftest.$ac_ext >&5
14939
503d2be0
AS
14940ac_cv_lib_krb4_krb_get_cred=no
14941fi
14942rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14943LIBS=$ac_check_lib_save_LIBS
14944fi
c0d27fcc 14945echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_krb_get_cred" >&5
503d2be0
AS
14946echo "${ECHO_T}$ac_cv_lib_krb4_krb_get_cred" >&6
14947if test $ac_cv_lib_krb4_krb_get_cred = yes; then
c0d27fcc 14948 cat >>confdefs.h <<_ACEOF
503d2be0 14949#define HAVE_LIBKRB4 1
c0d27fcc 14950_ACEOF
a21616bd
KR
14951
14952 LIBS="-lkrb4 $LIBS"
14953
14954else
503d2be0 14955
c0d27fcc 14956echo "$as_me:$LINENO: checking for krb_get_cred in -lkrb" >&5
503d2be0
AS
14957echo $ECHO_N "checking for krb_get_cred in -lkrb... $ECHO_C" >&6
14958if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then
14959 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 14960else
503d2be0 14961 ac_check_lib_save_LIBS=$LIBS
a21616bd 14962LIBS="-lkrb $LIBS"
503d2be0 14963cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 14964#line $LINENO "configure"
cd958eb3
MB
14965/* confdefs.h. */
14966_ACEOF
14967cat confdefs.h >>conftest.$ac_ext
14968cat >>conftest.$ac_ext <<_ACEOF
14969/* end confdefs.h. */
503d2be0 14970
a21616bd 14971/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
14972#ifdef __cplusplus
14973extern "C"
14974#endif
a21616bd 14975/* We use char because int might match the return type of a gcc2
503d2be0
AS
14976 builtin and then its argument prototype would still apply. */
14977char krb_get_cred ();
14978int
14979main ()
14980{
14981krb_get_cred ();
14982 ;
14983 return 0;
14984}
14985_ACEOF
14986rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14987if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
14988 (eval $ac_link) 2>&5
14989 ac_status=$?
c0d27fcc 14990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
14991 (exit $ac_status); } &&
14992 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14993 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
14994 (eval $ac_try) 2>&5
14995 ac_status=$?
c0d27fcc 14996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
14997 (exit $ac_status); }; }; then
14998 ac_cv_lib_krb_krb_get_cred=yes
14999else
15000 echo "$as_me: failed program was:" >&5
cd958eb3
MB
15001sed 's/^/| /' conftest.$ac_ext >&5
15002
503d2be0
AS
15003ac_cv_lib_krb_krb_get_cred=no
15004fi
15005rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15006LIBS=$ac_check_lib_save_LIBS
15007fi
c0d27fcc 15008echo "$as_me:$LINENO: result: $ac_cv_lib_krb_krb_get_cred" >&5
503d2be0
AS
15009echo "${ECHO_T}$ac_cv_lib_krb_krb_get_cred" >&6
15010if test $ac_cv_lib_krb_krb_get_cred = yes; then
c0d27fcc 15011 cat >>confdefs.h <<_ACEOF
503d2be0 15012#define HAVE_LIBKRB 1
c0d27fcc 15013_ACEOF
a21616bd
KR
15014
15015 LIBS="-lkrb $LIBS"
15016
a21616bd
KR
15017fi
15018
15019fi
15020
15021 fi
15022
15023 if test "${with_kerberos5+set}" = set; then
503d2be0
AS
15024
15025for ac_header in krb5.h
a21616bd 15026do
503d2be0 15027as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
15028if eval "test \"\${$as_ac_Header+set}\" = set"; then
15029 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
15030echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15031if eval "test \"\${$as_ac_Header+set}\" = set"; then
15032 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
15033fi
15034echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15035echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 15036else
c0d27fcc
MR
15037 # Is the header compilable?
15038echo "$as_me:$LINENO: checking $ac_header usability" >&5
15039echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
15040cat >conftest.$ac_ext <<_ACEOF
15041#line $LINENO "configure"
cd958eb3
MB
15042/* confdefs.h. */
15043_ACEOF
15044cat confdefs.h >>conftest.$ac_ext
15045cat >>conftest.$ac_ext <<_ACEOF
15046/* end confdefs.h. */
c0d27fcc
MR
15047$ac_includes_default
15048#include <$ac_header>
15049_ACEOF
15050rm -f conftest.$ac_objext
15051if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15052 (eval $ac_compile) 2>&5
15053 ac_status=$?
15054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15055 (exit $ac_status); } &&
15056 { ac_try='test -s conftest.$ac_objext'
15057 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15058 (eval $ac_try) 2>&5
15059 ac_status=$?
15060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15061 (exit $ac_status); }; }; then
15062 ac_header_compiler=yes
15063else
15064 echo "$as_me: failed program was:" >&5
cd958eb3
MB
15065sed 's/^/| /' conftest.$ac_ext >&5
15066
c0d27fcc
MR
15067ac_header_compiler=no
15068fi
15069rm -f conftest.$ac_objext conftest.$ac_ext
15070echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15071echo "${ECHO_T}$ac_header_compiler" >&6
15072
15073# Is the header present?
15074echo "$as_me:$LINENO: checking $ac_header presence" >&5
15075echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
15076cat >conftest.$ac_ext <<_ACEOF
15077#line $LINENO "configure"
cd958eb3
MB
15078/* confdefs.h. */
15079_ACEOF
15080cat confdefs.h >>conftest.$ac_ext
15081cat >>conftest.$ac_ext <<_ACEOF
15082/* end confdefs.h. */
503d2be0
AS
15083#include <$ac_header>
15084_ACEOF
c0d27fcc 15085if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
15086 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15087 ac_status=$?
6bae0ccf 15088 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
15089 rm -f conftest.er1
15090 cat conftest.err >&5
c0d27fcc 15091 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
15092 (exit $ac_status); } >/dev/null; then
15093 if test -s conftest.err; then
15094 ac_cpp_err=$ac_c_preproc_warn_flag
15095 else
15096 ac_cpp_err=
15097 fi
15098else
15099 ac_cpp_err=yes
15100fi
15101if test -z "$ac_cpp_err"; then
c0d27fcc 15102 ac_header_preproc=yes
503d2be0
AS
15103else
15104 echo "$as_me: failed program was:" >&5
cd958eb3
MB
15105sed 's/^/| /' conftest.$ac_ext >&5
15106
c0d27fcc 15107 ac_header_preproc=no
a21616bd 15108fi
503d2be0 15109rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
15110echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15111echo "${ECHO_T}$ac_header_preproc" >&6
15112
15113# So? What about this header?
15114case $ac_header_compiler:$ac_header_preproc in
15115 yes:no )
15116 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
15117echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
15118 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
15119echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15120 (
15121 cat <<\_ASBOX
15122## ------------------------------------ ##
15123## Report this to bug-autoconf@gnu.org. ##
15124## ------------------------------------ ##
15125_ASBOX
15126 ) |
15127 sed "s/^/$as_me: WARNING: /" >&2
15128 ;;
c0d27fcc
MR
15129 no:yes )
15130 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
15131echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
15132 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
15133echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
15134 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
15135echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15136 (
15137 cat <<\_ASBOX
15138## ------------------------------------ ##
15139## Report this to bug-autoconf@gnu.org. ##
15140## ------------------------------------ ##
15141_ASBOX
15142 ) |
15143 sed "s/^/$as_me: WARNING: /" >&2
15144 ;;
c0d27fcc
MR
15145esac
15146echo "$as_me:$LINENO: checking for $ac_header" >&5
15147echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15148if eval "test \"\${$as_ac_Header+set}\" = set"; then
15149 echo $ECHO_N "(cached) $ECHO_C" >&6
15150else
15151 eval "$as_ac_Header=$ac_header_preproc"
a21616bd 15152fi
c0d27fcc 15153echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 15154echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
15155
15156fi
503d2be0 15157if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 15158 cat >>confdefs.h <<_ACEOF
503d2be0 15159#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 15160_ACEOF
503d2be0 15161
a21616bd 15162fi
c0d27fcc 15163
a21616bd
KR
15164done
15165
15166 else
503d2be0
AS
15167
15168for ac_header in des.h
a21616bd 15169do
503d2be0 15170as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
15171if eval "test \"\${$as_ac_Header+set}\" = set"; then
15172 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
15173echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15174if eval "test \"\${$as_ac_Header+set}\" = set"; then
15175 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
15176fi
15177echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15178echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 15179else
c0d27fcc
MR
15180 # Is the header compilable?
15181echo "$as_me:$LINENO: checking $ac_header usability" >&5
15182echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
15183cat >conftest.$ac_ext <<_ACEOF
15184#line $LINENO "configure"
cd958eb3
MB
15185/* confdefs.h. */
15186_ACEOF
15187cat confdefs.h >>conftest.$ac_ext
15188cat >>conftest.$ac_ext <<_ACEOF
15189/* end confdefs.h. */
c0d27fcc
MR
15190$ac_includes_default
15191#include <$ac_header>
15192_ACEOF
15193rm -f conftest.$ac_objext
15194if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15195 (eval $ac_compile) 2>&5
15196 ac_status=$?
15197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15198 (exit $ac_status); } &&
15199 { ac_try='test -s conftest.$ac_objext'
15200 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15201 (eval $ac_try) 2>&5
15202 ac_status=$?
15203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15204 (exit $ac_status); }; }; then
15205 ac_header_compiler=yes
15206else
15207 echo "$as_me: failed program was:" >&5
cd958eb3
MB
15208sed 's/^/| /' conftest.$ac_ext >&5
15209
c0d27fcc
MR
15210ac_header_compiler=no
15211fi
15212rm -f conftest.$ac_objext conftest.$ac_ext
15213echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15214echo "${ECHO_T}$ac_header_compiler" >&6
15215
15216# Is the header present?
15217echo "$as_me:$LINENO: checking $ac_header presence" >&5
15218echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
15219cat >conftest.$ac_ext <<_ACEOF
15220#line $LINENO "configure"
cd958eb3
MB
15221/* confdefs.h. */
15222_ACEOF
15223cat confdefs.h >>conftest.$ac_ext
15224cat >>conftest.$ac_ext <<_ACEOF
15225/* end confdefs.h. */
503d2be0
AS
15226#include <$ac_header>
15227_ACEOF
c0d27fcc 15228if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
15229 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15230 ac_status=$?
6bae0ccf 15231 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
15232 rm -f conftest.er1
15233 cat conftest.err >&5
c0d27fcc 15234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
15235 (exit $ac_status); } >/dev/null; then
15236 if test -s conftest.err; then
15237 ac_cpp_err=$ac_c_preproc_warn_flag
15238 else
15239 ac_cpp_err=
15240 fi
15241else
15242 ac_cpp_err=yes
15243fi
15244if test -z "$ac_cpp_err"; then
c0d27fcc 15245 ac_header_preproc=yes
503d2be0
AS
15246else
15247 echo "$as_me: failed program was:" >&5
cd958eb3
MB
15248sed 's/^/| /' conftest.$ac_ext >&5
15249
c0d27fcc 15250 ac_header_preproc=no
a21616bd 15251fi
503d2be0 15252rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
15253echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15254echo "${ECHO_T}$ac_header_preproc" >&6
15255
15256# So? What about this header?
15257case $ac_header_compiler:$ac_header_preproc in
15258 yes:no )
15259 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
15260echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
15261 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
15262echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15263 (
15264 cat <<\_ASBOX
15265## ------------------------------------ ##
15266## Report this to bug-autoconf@gnu.org. ##
15267## ------------------------------------ ##
15268_ASBOX
15269 ) |
15270 sed "s/^/$as_me: WARNING: /" >&2
15271 ;;
c0d27fcc
MR
15272 no:yes )
15273 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
15274echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
15275 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
15276echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
15277 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
15278echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15279 (
15280 cat <<\_ASBOX
15281## ------------------------------------ ##
15282## Report this to bug-autoconf@gnu.org. ##
15283## ------------------------------------ ##
15284_ASBOX
15285 ) |
15286 sed "s/^/$as_me: WARNING: /" >&2
15287 ;;
c0d27fcc
MR
15288esac
15289echo "$as_me:$LINENO: checking for $ac_header" >&5
15290echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15291if eval "test \"\${$as_ac_Header+set}\" = set"; then
15292 echo $ECHO_N "(cached) $ECHO_C" >&6
15293else
15294 eval "$as_ac_Header=$ac_header_preproc"
a21616bd 15295fi
c0d27fcc 15296echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 15297echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
15298
15299fi
503d2be0 15300if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 15301 cat >>confdefs.h <<_ACEOF
503d2be0 15302#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 15303_ACEOF
503d2be0 15304
a21616bd 15305else
503d2be0
AS
15306
15307for ac_header in kerberosIV/des.h
a21616bd 15308do
503d2be0 15309as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
15310if eval "test \"\${$as_ac_Header+set}\" = set"; then
15311 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
15312echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15313if eval "test \"\${$as_ac_Header+set}\" = set"; then
15314 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
15315fi
15316echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15317echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 15318else
c0d27fcc
MR
15319 # Is the header compilable?
15320echo "$as_me:$LINENO: checking $ac_header usability" >&5
15321echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
15322cat >conftest.$ac_ext <<_ACEOF
15323#line $LINENO "configure"
cd958eb3
MB
15324/* confdefs.h. */
15325_ACEOF
15326cat confdefs.h >>conftest.$ac_ext
15327cat >>conftest.$ac_ext <<_ACEOF
15328/* end confdefs.h. */
c0d27fcc
MR
15329$ac_includes_default
15330#include <$ac_header>
15331_ACEOF
15332rm -f conftest.$ac_objext
15333if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15334 (eval $ac_compile) 2>&5
15335 ac_status=$?
15336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15337 (exit $ac_status); } &&
15338 { ac_try='test -s conftest.$ac_objext'
15339 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15340 (eval $ac_try) 2>&5
15341 ac_status=$?
15342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15343 (exit $ac_status); }; }; then
15344 ac_header_compiler=yes
15345else
15346 echo "$as_me: failed program was:" >&5
cd958eb3
MB
15347sed 's/^/| /' conftest.$ac_ext >&5
15348
c0d27fcc
MR
15349ac_header_compiler=no
15350fi
15351rm -f conftest.$ac_objext conftest.$ac_ext
15352echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15353echo "${ECHO_T}$ac_header_compiler" >&6
15354
15355# Is the header present?
15356echo "$as_me:$LINENO: checking $ac_header presence" >&5
15357echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
15358cat >conftest.$ac_ext <<_ACEOF
15359#line $LINENO "configure"
cd958eb3
MB
15360/* confdefs.h. */
15361_ACEOF
15362cat confdefs.h >>conftest.$ac_ext
15363cat >>conftest.$ac_ext <<_ACEOF
15364/* end confdefs.h. */
503d2be0
AS
15365#include <$ac_header>
15366_ACEOF
c0d27fcc 15367if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
15368 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15369 ac_status=$?
6bae0ccf 15370 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
15371 rm -f conftest.er1
15372 cat conftest.err >&5
c0d27fcc 15373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
15374 (exit $ac_status); } >/dev/null; then
15375 if test -s conftest.err; then
15376 ac_cpp_err=$ac_c_preproc_warn_flag
15377 else
15378 ac_cpp_err=
15379 fi
15380else
15381 ac_cpp_err=yes
15382fi
15383if test -z "$ac_cpp_err"; then
c0d27fcc 15384 ac_header_preproc=yes
503d2be0
AS
15385else
15386 echo "$as_me: failed program was:" >&5
cd958eb3
MB
15387sed 's/^/| /' conftest.$ac_ext >&5
15388
c0d27fcc 15389 ac_header_preproc=no
a21616bd 15390fi
503d2be0 15391rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
15392echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15393echo "${ECHO_T}$ac_header_preproc" >&6
15394
15395# So? What about this header?
15396case $ac_header_compiler:$ac_header_preproc in
15397 yes:no )
15398 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
15399echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
15400 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
15401echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15402 (
15403 cat <<\_ASBOX
15404## ------------------------------------ ##
15405## Report this to bug-autoconf@gnu.org. ##
15406## ------------------------------------ ##
15407_ASBOX
15408 ) |
15409 sed "s/^/$as_me: WARNING: /" >&2
15410 ;;
c0d27fcc
MR
15411 no:yes )
15412 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
15413echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
15414 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
15415echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
15416 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
15417echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15418 (
15419 cat <<\_ASBOX
15420## ------------------------------------ ##
15421## Report this to bug-autoconf@gnu.org. ##
15422## ------------------------------------ ##
15423_ASBOX
15424 ) |
15425 sed "s/^/$as_me: WARNING: /" >&2
15426 ;;
c0d27fcc
MR
15427esac
15428echo "$as_me:$LINENO: checking for $ac_header" >&5
15429echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15430if eval "test \"\${$as_ac_Header+set}\" = set"; then
15431 echo $ECHO_N "(cached) $ECHO_C" >&6
15432else
15433 eval "$as_ac_Header=$ac_header_preproc"
a21616bd 15434fi
c0d27fcc 15435echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 15436echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
15437
15438fi
503d2be0 15439if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 15440 cat >>confdefs.h <<_ACEOF
503d2be0 15441#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 15442_ACEOF
503d2be0 15443
a21616bd 15444else
503d2be0
AS
15445
15446for ac_header in kerberos/des.h
a21616bd 15447do
503d2be0 15448as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
15449if eval "test \"\${$as_ac_Header+set}\" = set"; then
15450 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
15451echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15452if eval "test \"\${$as_ac_Header+set}\" = set"; then
15453 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
15454fi
15455echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15456echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 15457else
c0d27fcc
MR
15458 # Is the header compilable?
15459echo "$as_me:$LINENO: checking $ac_header usability" >&5
15460echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
15461cat >conftest.$ac_ext <<_ACEOF
15462#line $LINENO "configure"
cd958eb3
MB
15463/* confdefs.h. */
15464_ACEOF
15465cat confdefs.h >>conftest.$ac_ext
15466cat >>conftest.$ac_ext <<_ACEOF
15467/* end confdefs.h. */
c0d27fcc
MR
15468$ac_includes_default
15469#include <$ac_header>
15470_ACEOF
15471rm -f conftest.$ac_objext
15472if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15473 (eval $ac_compile) 2>&5
15474 ac_status=$?
15475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15476 (exit $ac_status); } &&
15477 { ac_try='test -s conftest.$ac_objext'
15478 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15479 (eval $ac_try) 2>&5
15480 ac_status=$?
15481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15482 (exit $ac_status); }; }; then
15483 ac_header_compiler=yes
15484else
15485 echo "$as_me: failed program was:" >&5
cd958eb3
MB
15486sed 's/^/| /' conftest.$ac_ext >&5
15487
c0d27fcc
MR
15488ac_header_compiler=no
15489fi
15490rm -f conftest.$ac_objext conftest.$ac_ext
15491echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15492echo "${ECHO_T}$ac_header_compiler" >&6
15493
15494# Is the header present?
15495echo "$as_me:$LINENO: checking $ac_header presence" >&5
15496echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
15497cat >conftest.$ac_ext <<_ACEOF
15498#line $LINENO "configure"
cd958eb3
MB
15499/* confdefs.h. */
15500_ACEOF
15501cat confdefs.h >>conftest.$ac_ext
15502cat >>conftest.$ac_ext <<_ACEOF
15503/* end confdefs.h. */
503d2be0
AS
15504#include <$ac_header>
15505_ACEOF
c0d27fcc 15506if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
15507 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15508 ac_status=$?
6bae0ccf 15509 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
15510 rm -f conftest.er1
15511 cat conftest.err >&5
c0d27fcc 15512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
15513 (exit $ac_status); } >/dev/null; then
15514 if test -s conftest.err; then
15515 ac_cpp_err=$ac_c_preproc_warn_flag
15516 else
15517 ac_cpp_err=
15518 fi
15519else
15520 ac_cpp_err=yes
15521fi
15522if test -z "$ac_cpp_err"; then
c0d27fcc 15523 ac_header_preproc=yes
503d2be0
AS
15524else
15525 echo "$as_me: failed program was:" >&5
cd958eb3
MB
15526sed 's/^/| /' conftest.$ac_ext >&5
15527
c0d27fcc 15528 ac_header_preproc=no
a21616bd 15529fi
503d2be0 15530rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
15531echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15532echo "${ECHO_T}$ac_header_preproc" >&6
15533
15534# So? What about this header?
15535case $ac_header_compiler:$ac_header_preproc in
15536 yes:no )
15537 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
15538echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
15539 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
15540echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15541 (
15542 cat <<\_ASBOX
15543## ------------------------------------ ##
15544## Report this to bug-autoconf@gnu.org. ##
15545## ------------------------------------ ##
15546_ASBOX
15547 ) |
15548 sed "s/^/$as_me: WARNING: /" >&2
15549 ;;
c0d27fcc
MR
15550 no:yes )
15551 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
15552echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
15553 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
15554echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
15555 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
15556echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15557 (
15558 cat <<\_ASBOX
15559## ------------------------------------ ##
15560## Report this to bug-autoconf@gnu.org. ##
15561## ------------------------------------ ##
15562_ASBOX
15563 ) |
15564 sed "s/^/$as_me: WARNING: /" >&2
15565 ;;
c0d27fcc
MR
15566esac
15567echo "$as_me:$LINENO: checking for $ac_header" >&5
15568echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15569if eval "test \"\${$as_ac_Header+set}\" = set"; then
15570 echo $ECHO_N "(cached) $ECHO_C" >&6
15571else
15572 eval "$as_ac_Header=$ac_header_preproc"
a21616bd 15573fi
c0d27fcc 15574echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 15575echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
15576
15577fi
503d2be0 15578if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 15579 cat >>confdefs.h <<_ACEOF
503d2be0 15580#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 15581_ACEOF
a21616bd
KR
15582
15583fi
c0d27fcc 15584
a21616bd
KR
15585done
15586
98418dba 15587fi
c0d27fcc 15588
925c2f3f
EZ
15589done
15590
98418dba 15591fi
c0d27fcc 15592
925c2f3f 15593done
98418dba 15594
c0d27fcc 15595
925c2f3f
EZ
15596for ac_header in krb.h
15597do
15598as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
15599if eval "test \"\${$as_ac_Header+set}\" = set"; then
15600 echo "$as_me:$LINENO: checking for $ac_header" >&5
925c2f3f
EZ
15601echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15602if eval "test \"\${$as_ac_Header+set}\" = set"; then
15603 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
15604fi
15605echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15606echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15607else
15608 # Is the header compilable?
15609echo "$as_me:$LINENO: checking $ac_header usability" >&5
15610echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
15611cat >conftest.$ac_ext <<_ACEOF
15612#line $LINENO "configure"
cd958eb3
MB
15613/* confdefs.h. */
15614_ACEOF
15615cat confdefs.h >>conftest.$ac_ext
15616cat >>conftest.$ac_ext <<_ACEOF
15617/* end confdefs.h. */
c0d27fcc
MR
15618$ac_includes_default
15619#include <$ac_header>
15620_ACEOF
15621rm -f conftest.$ac_objext
15622if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15623 (eval $ac_compile) 2>&5
15624 ac_status=$?
15625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15626 (exit $ac_status); } &&
15627 { ac_try='test -s conftest.$ac_objext'
15628 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15629 (eval $ac_try) 2>&5
15630 ac_status=$?
15631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15632 (exit $ac_status); }; }; then
15633 ac_header_compiler=yes
925c2f3f 15634else
c0d27fcc 15635 echo "$as_me: failed program was:" >&5
cd958eb3
MB
15636sed 's/^/| /' conftest.$ac_ext >&5
15637
c0d27fcc
MR
15638ac_header_compiler=no
15639fi
15640rm -f conftest.$ac_objext conftest.$ac_ext
15641echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15642echo "${ECHO_T}$ac_header_compiler" >&6
15643
15644# Is the header present?
15645echo "$as_me:$LINENO: checking $ac_header presence" >&5
15646echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
15647cat >conftest.$ac_ext <<_ACEOF
15648#line $LINENO "configure"
cd958eb3
MB
15649/* confdefs.h. */
15650_ACEOF
15651cat confdefs.h >>conftest.$ac_ext
15652cat >>conftest.$ac_ext <<_ACEOF
15653/* end confdefs.h. */
503d2be0
AS
15654#include <$ac_header>
15655_ACEOF
c0d27fcc 15656if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
15657 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15658 ac_status=$?
6bae0ccf 15659 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
15660 rm -f conftest.er1
15661 cat conftest.err >&5
c0d27fcc 15662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
15663 (exit $ac_status); } >/dev/null; then
15664 if test -s conftest.err; then
15665 ac_cpp_err=$ac_c_preproc_warn_flag
15666 else
15667 ac_cpp_err=
15668 fi
15669else
15670 ac_cpp_err=yes
15671fi
15672if test -z "$ac_cpp_err"; then
c0d27fcc 15673 ac_header_preproc=yes
503d2be0
AS
15674else
15675 echo "$as_me: failed program was:" >&5
cd958eb3
MB
15676sed 's/^/| /' conftest.$ac_ext >&5
15677
c0d27fcc 15678 ac_header_preproc=no
a21616bd 15679fi
503d2be0 15680rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
15681echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15682echo "${ECHO_T}$ac_header_preproc" >&6
15683
15684# So? What about this header?
15685case $ac_header_compiler:$ac_header_preproc in
15686 yes:no )
15687 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
15688echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
15689 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
15690echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15691 (
15692 cat <<\_ASBOX
15693## ------------------------------------ ##
15694## Report this to bug-autoconf@gnu.org. ##
15695## ------------------------------------ ##
15696_ASBOX
15697 ) |
15698 sed "s/^/$as_me: WARNING: /" >&2
15699 ;;
c0d27fcc
MR
15700 no:yes )
15701 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
15702echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
15703 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
15704echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
15705 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
15706echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15707 (
15708 cat <<\_ASBOX
15709## ------------------------------------ ##
15710## Report this to bug-autoconf@gnu.org. ##
15711## ------------------------------------ ##
15712_ASBOX
15713 ) |
15714 sed "s/^/$as_me: WARNING: /" >&2
15715 ;;
c0d27fcc
MR
15716esac
15717echo "$as_me:$LINENO: checking for $ac_header" >&5
15718echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15719if eval "test \"\${$as_ac_Header+set}\" = set"; then
15720 echo $ECHO_N "(cached) $ECHO_C" >&6
15721else
15722 eval "$as_ac_Header=$ac_header_preproc"
a21616bd 15723fi
c0d27fcc 15724echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 15725echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
15726
15727fi
503d2be0 15728if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 15729 cat >>confdefs.h <<_ACEOF
503d2be0 15730#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 15731_ACEOF
503d2be0 15732
a21616bd 15733else
503d2be0
AS
15734
15735for ac_header in kerberosIV/krb.h
a21616bd 15736do
503d2be0 15737as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
15738if eval "test \"\${$as_ac_Header+set}\" = set"; then
15739 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
15740echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15741if eval "test \"\${$as_ac_Header+set}\" = set"; then
15742 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
15743fi
15744echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15745echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 15746else
c0d27fcc
MR
15747 # Is the header compilable?
15748echo "$as_me:$LINENO: checking $ac_header usability" >&5
15749echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
15750cat >conftest.$ac_ext <<_ACEOF
15751#line $LINENO "configure"
cd958eb3
MB
15752/* confdefs.h. */
15753_ACEOF
15754cat confdefs.h >>conftest.$ac_ext
15755cat >>conftest.$ac_ext <<_ACEOF
15756/* end confdefs.h. */
c0d27fcc
MR
15757$ac_includes_default
15758#include <$ac_header>
15759_ACEOF
15760rm -f conftest.$ac_objext
15761if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15762 (eval $ac_compile) 2>&5
15763 ac_status=$?
15764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15765 (exit $ac_status); } &&
15766 { ac_try='test -s conftest.$ac_objext'
15767 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15768 (eval $ac_try) 2>&5
15769 ac_status=$?
15770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15771 (exit $ac_status); }; }; then
15772 ac_header_compiler=yes
15773else
15774 echo "$as_me: failed program was:" >&5
cd958eb3
MB
15775sed 's/^/| /' conftest.$ac_ext >&5
15776
c0d27fcc
MR
15777ac_header_compiler=no
15778fi
15779rm -f conftest.$ac_objext conftest.$ac_ext
15780echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15781echo "${ECHO_T}$ac_header_compiler" >&6
15782
15783# Is the header present?
15784echo "$as_me:$LINENO: checking $ac_header presence" >&5
15785echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
15786cat >conftest.$ac_ext <<_ACEOF
15787#line $LINENO "configure"
cd958eb3
MB
15788/* confdefs.h. */
15789_ACEOF
15790cat confdefs.h >>conftest.$ac_ext
15791cat >>conftest.$ac_ext <<_ACEOF
15792/* end confdefs.h. */
503d2be0
AS
15793#include <$ac_header>
15794_ACEOF
c0d27fcc 15795if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
15796 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15797 ac_status=$?
6bae0ccf 15798 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
15799 rm -f conftest.er1
15800 cat conftest.err >&5
c0d27fcc 15801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
15802 (exit $ac_status); } >/dev/null; then
15803 if test -s conftest.err; then
15804 ac_cpp_err=$ac_c_preproc_warn_flag
15805 else
15806 ac_cpp_err=
15807 fi
15808else
15809 ac_cpp_err=yes
15810fi
15811if test -z "$ac_cpp_err"; then
c0d27fcc 15812 ac_header_preproc=yes
503d2be0
AS
15813else
15814 echo "$as_me: failed program was:" >&5
cd958eb3
MB
15815sed 's/^/| /' conftest.$ac_ext >&5
15816
c0d27fcc 15817 ac_header_preproc=no
a21616bd 15818fi
503d2be0 15819rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
15820echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15821echo "${ECHO_T}$ac_header_preproc" >&6
15822
15823# So? What about this header?
15824case $ac_header_compiler:$ac_header_preproc in
15825 yes:no )
15826 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
15827echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
15828 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
15829echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15830 (
15831 cat <<\_ASBOX
15832## ------------------------------------ ##
15833## Report this to bug-autoconf@gnu.org. ##
15834## ------------------------------------ ##
15835_ASBOX
15836 ) |
15837 sed "s/^/$as_me: WARNING: /" >&2
15838 ;;
c0d27fcc
MR
15839 no:yes )
15840 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
15841echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
15842 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
15843echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
15844 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
15845echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15846 (
15847 cat <<\_ASBOX
15848## ------------------------------------ ##
15849## Report this to bug-autoconf@gnu.org. ##
15850## ------------------------------------ ##
15851_ASBOX
15852 ) |
15853 sed "s/^/$as_me: WARNING: /" >&2
15854 ;;
c0d27fcc
MR
15855esac
15856echo "$as_me:$LINENO: checking for $ac_header" >&5
15857echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15858if eval "test \"\${$as_ac_Header+set}\" = set"; then
15859 echo $ECHO_N "(cached) $ECHO_C" >&6
15860else
15861 eval "$as_ac_Header=$ac_header_preproc"
a21616bd 15862fi
c0d27fcc 15863echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 15864echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
15865
15866fi
503d2be0 15867if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 15868 cat >>confdefs.h <<_ACEOF
503d2be0 15869#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 15870_ACEOF
503d2be0 15871
a21616bd 15872else
503d2be0
AS
15873
15874for ac_header in kerberos/krb.h
a21616bd 15875do
503d2be0 15876as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
15877if eval "test \"\${$as_ac_Header+set}\" = set"; then
15878 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
15879echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15880if eval "test \"\${$as_ac_Header+set}\" = set"; then
15881 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
15882fi
15883echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15884echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 15885else
c0d27fcc
MR
15886 # Is the header compilable?
15887echo "$as_me:$LINENO: checking $ac_header usability" >&5
15888echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
15889cat >conftest.$ac_ext <<_ACEOF
15890#line $LINENO "configure"
cd958eb3
MB
15891/* confdefs.h. */
15892_ACEOF
15893cat confdefs.h >>conftest.$ac_ext
15894cat >>conftest.$ac_ext <<_ACEOF
15895/* end confdefs.h. */
c0d27fcc
MR
15896$ac_includes_default
15897#include <$ac_header>
15898_ACEOF
15899rm -f conftest.$ac_objext
15900if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15901 (eval $ac_compile) 2>&5
15902 ac_status=$?
15903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15904 (exit $ac_status); } &&
15905 { ac_try='test -s conftest.$ac_objext'
15906 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15907 (eval $ac_try) 2>&5
15908 ac_status=$?
15909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15910 (exit $ac_status); }; }; then
15911 ac_header_compiler=yes
15912else
15913 echo "$as_me: failed program was:" >&5
cd958eb3
MB
15914sed 's/^/| /' conftest.$ac_ext >&5
15915
c0d27fcc
MR
15916ac_header_compiler=no
15917fi
15918rm -f conftest.$ac_objext conftest.$ac_ext
15919echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15920echo "${ECHO_T}$ac_header_compiler" >&6
15921
15922# Is the header present?
15923echo "$as_me:$LINENO: checking $ac_header presence" >&5
15924echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
15925cat >conftest.$ac_ext <<_ACEOF
15926#line $LINENO "configure"
cd958eb3
MB
15927/* confdefs.h. */
15928_ACEOF
15929cat confdefs.h >>conftest.$ac_ext
15930cat >>conftest.$ac_ext <<_ACEOF
15931/* end confdefs.h. */
503d2be0
AS
15932#include <$ac_header>
15933_ACEOF
c0d27fcc 15934if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
15935 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15936 ac_status=$?
6bae0ccf 15937 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
15938 rm -f conftest.er1
15939 cat conftest.err >&5
c0d27fcc 15940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
15941 (exit $ac_status); } >/dev/null; then
15942 if test -s conftest.err; then
15943 ac_cpp_err=$ac_c_preproc_warn_flag
15944 else
15945 ac_cpp_err=
15946 fi
15947else
15948 ac_cpp_err=yes
15949fi
15950if test -z "$ac_cpp_err"; then
c0d27fcc 15951 ac_header_preproc=yes
503d2be0
AS
15952else
15953 echo "$as_me: failed program was:" >&5
cd958eb3
MB
15954sed 's/^/| /' conftest.$ac_ext >&5
15955
c0d27fcc 15956 ac_header_preproc=no
a21616bd 15957fi
503d2be0 15958rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
15959echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15960echo "${ECHO_T}$ac_header_preproc" >&6
15961
15962# So? What about this header?
15963case $ac_header_compiler:$ac_header_preproc in
15964 yes:no )
15965 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
15966echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
15967 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
15968echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15969 (
15970 cat <<\_ASBOX
15971## ------------------------------------ ##
15972## Report this to bug-autoconf@gnu.org. ##
15973## ------------------------------------ ##
15974_ASBOX
15975 ) |
15976 sed "s/^/$as_me: WARNING: /" >&2
15977 ;;
c0d27fcc
MR
15978 no:yes )
15979 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
15980echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
15981 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
15982echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
15983 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
15984echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15985 (
15986 cat <<\_ASBOX
15987## ------------------------------------ ##
15988## Report this to bug-autoconf@gnu.org. ##
15989## ------------------------------------ ##
15990_ASBOX
15991 ) |
15992 sed "s/^/$as_me: WARNING: /" >&2
15993 ;;
c0d27fcc
MR
15994esac
15995echo "$as_me:$LINENO: checking for $ac_header" >&5
15996echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15997if eval "test \"\${$as_ac_Header+set}\" = set"; then
15998 echo $ECHO_N "(cached) $ECHO_C" >&6
15999else
16000 eval "$as_ac_Header=$ac_header_preproc"
a21616bd 16001fi
c0d27fcc 16002echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 16003echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
16004
16005fi
503d2be0 16006if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 16007 cat >>confdefs.h <<_ACEOF
503d2be0 16008#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 16009_ACEOF
503d2be0 16010
a21616bd 16011fi
c0d27fcc 16012
a21616bd
KR
16013done
16014
16015fi
c0d27fcc 16016
a21616bd
KR
16017done
16018
16019fi
c0d27fcc 16020
a21616bd
KR
16021done
16022
16023 fi
503d2be0
AS
16024
16025for ac_header in com_err.h
a21616bd 16026do
503d2be0 16027as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
16028if eval "test \"\${$as_ac_Header+set}\" = set"; then
16029 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
16030echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16031if eval "test \"\${$as_ac_Header+set}\" = set"; then
16032 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
16033fi
16034echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
16035echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 16036else
c0d27fcc
MR
16037 # Is the header compilable?
16038echo "$as_me:$LINENO: checking $ac_header usability" >&5
16039echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
16040cat >conftest.$ac_ext <<_ACEOF
16041#line $LINENO "configure"
cd958eb3
MB
16042/* confdefs.h. */
16043_ACEOF
16044cat confdefs.h >>conftest.$ac_ext
16045cat >>conftest.$ac_ext <<_ACEOF
16046/* end confdefs.h. */
c0d27fcc
MR
16047$ac_includes_default
16048#include <$ac_header>
16049_ACEOF
16050rm -f conftest.$ac_objext
16051if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16052 (eval $ac_compile) 2>&5
16053 ac_status=$?
16054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16055 (exit $ac_status); } &&
16056 { ac_try='test -s conftest.$ac_objext'
16057 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16058 (eval $ac_try) 2>&5
16059 ac_status=$?
16060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16061 (exit $ac_status); }; }; then
16062 ac_header_compiler=yes
16063else
16064 echo "$as_me: failed program was:" >&5
cd958eb3
MB
16065sed 's/^/| /' conftest.$ac_ext >&5
16066
c0d27fcc
MR
16067ac_header_compiler=no
16068fi
16069rm -f conftest.$ac_objext conftest.$ac_ext
16070echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16071echo "${ECHO_T}$ac_header_compiler" >&6
16072
16073# Is the header present?
16074echo "$as_me:$LINENO: checking $ac_header presence" >&5
16075echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
16076cat >conftest.$ac_ext <<_ACEOF
16077#line $LINENO "configure"
cd958eb3
MB
16078/* confdefs.h. */
16079_ACEOF
16080cat confdefs.h >>conftest.$ac_ext
16081cat >>conftest.$ac_ext <<_ACEOF
16082/* end confdefs.h. */
503d2be0
AS
16083#include <$ac_header>
16084_ACEOF
c0d27fcc 16085if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
16086 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16087 ac_status=$?
6bae0ccf 16088 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
16089 rm -f conftest.er1
16090 cat conftest.err >&5
c0d27fcc 16091 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
16092 (exit $ac_status); } >/dev/null; then
16093 if test -s conftest.err; then
16094 ac_cpp_err=$ac_c_preproc_warn_flag
16095 else
16096 ac_cpp_err=
16097 fi
16098else
16099 ac_cpp_err=yes
16100fi
16101if test -z "$ac_cpp_err"; then
c0d27fcc 16102 ac_header_preproc=yes
503d2be0
AS
16103else
16104 echo "$as_me: failed program was:" >&5
cd958eb3
MB
16105sed 's/^/| /' conftest.$ac_ext >&5
16106
c0d27fcc 16107 ac_header_preproc=no
a21616bd 16108fi
503d2be0 16109rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
16110echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16111echo "${ECHO_T}$ac_header_preproc" >&6
16112
16113# So? What about this header?
16114case $ac_header_compiler:$ac_header_preproc in
16115 yes:no )
16116 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16117echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
16118 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
16119echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
16120 (
16121 cat <<\_ASBOX
16122## ------------------------------------ ##
16123## Report this to bug-autoconf@gnu.org. ##
16124## ------------------------------------ ##
16125_ASBOX
16126 ) |
16127 sed "s/^/$as_me: WARNING: /" >&2
16128 ;;
c0d27fcc
MR
16129 no:yes )
16130 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16131echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
16132 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
16133echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
16134 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
16135echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
16136 (
16137 cat <<\_ASBOX
16138## ------------------------------------ ##
16139## Report this to bug-autoconf@gnu.org. ##
16140## ------------------------------------ ##
16141_ASBOX
16142 ) |
16143 sed "s/^/$as_me: WARNING: /" >&2
16144 ;;
c0d27fcc
MR
16145esac
16146echo "$as_me:$LINENO: checking for $ac_header" >&5
16147echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16148if eval "test \"\${$as_ac_Header+set}\" = set"; then
16149 echo $ECHO_N "(cached) $ECHO_C" >&6
16150else
16151 eval "$as_ac_Header=$ac_header_preproc"
a21616bd 16152fi
c0d27fcc 16153echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 16154echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
16155
16156fi
503d2be0 16157if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 16158 cat >>confdefs.h <<_ACEOF
503d2be0 16159#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 16160_ACEOF
503d2be0 16161
a21616bd 16162fi
c0d27fcc 16163
a21616bd
KR
16164done
16165
16166fi
16167
ba4481b5
DL
16168# Solaris requires -lintl if you want strerror (which calls dgettext)
16169# to return localized messages.
503d2be0 16170
c0d27fcc 16171echo "$as_me:$LINENO: checking for dgettext in -lintl" >&5
503d2be0
AS
16172echo $ECHO_N "checking for dgettext in -lintl... $ECHO_C" >&6
16173if test "${ac_cv_lib_intl_dgettext+set}" = set; then
16174 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16175else
503d2be0 16176 ac_check_lib_save_LIBS=$LIBS
ba4481b5 16177LIBS="-lintl $LIBS"
503d2be0 16178cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 16179#line $LINENO "configure"
cd958eb3
MB
16180/* confdefs.h. */
16181_ACEOF
16182cat confdefs.h >>conftest.$ac_ext
16183cat >>conftest.$ac_ext <<_ACEOF
16184/* end confdefs.h. */
503d2be0 16185
ba4481b5 16186/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
16187#ifdef __cplusplus
16188extern "C"
16189#endif
ba4481b5 16190/* We use char because int might match the return type of a gcc2
503d2be0
AS
16191 builtin and then its argument prototype would still apply. */
16192char dgettext ();
16193int
16194main ()
16195{
16196dgettext ();
16197 ;
16198 return 0;
16199}
16200_ACEOF
16201rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 16202if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
16203 (eval $ac_link) 2>&5
16204 ac_status=$?
c0d27fcc 16205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
16206 (exit $ac_status); } &&
16207 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 16208 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
16209 (eval $ac_try) 2>&5
16210 ac_status=$?
c0d27fcc 16211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
16212 (exit $ac_status); }; }; then
16213 ac_cv_lib_intl_dgettext=yes
16214else
16215 echo "$as_me: failed program was:" >&5
cd958eb3
MB
16216sed 's/^/| /' conftest.$ac_ext >&5
16217
503d2be0
AS
16218ac_cv_lib_intl_dgettext=no
16219fi
16220rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16221LIBS=$ac_check_lib_save_LIBS
16222fi
c0d27fcc 16223echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dgettext" >&5
503d2be0
AS
16224echo "${ECHO_T}$ac_cv_lib_intl_dgettext" >&6
16225if test $ac_cv_lib_intl_dgettext = yes; then
c0d27fcc 16226 cat >>confdefs.h <<_ACEOF
503d2be0 16227#define HAVE_LIBINTL 1
c0d27fcc 16228_ACEOF
ba4481b5
DL
16229
16230 LIBS="-lintl $LIBS"
16231
ba4481b5
DL
16232fi
16233
c0d27fcc
MR
16234
16235echo "$as_me:$LINENO: checking whether localtime caches TZ" >&5
503d2be0
AS
16236echo $ECHO_N "checking whether localtime caches TZ... $ECHO_C" >&6
16237if test "${emacs_cv_localtime_cache+set}" = set; then
16238 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
16239else
16240 if test x$ac_cv_func_tzset = xyes; then
16241if test "$cross_compiling" = yes; then
16242 # If we have tzset, assume the worst when cross-compiling.
16243emacs_cv_localtime_cache=yes
16244else
503d2be0 16245 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 16246#line $LINENO "configure"
cd958eb3
MB
16247/* confdefs.h. */
16248_ACEOF
16249cat confdefs.h >>conftest.$ac_ext
16250cat >>conftest.$ac_ext <<_ACEOF
16251/* end confdefs.h. */
ba4481b5 16252#include <time.h>
ba4481b5
DL
16253extern char **environ;
16254unset_TZ ()
16255{
16256 char **from, **to;
16257 for (to = from = environ; (*to = *from); from++)
16258 if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
16259 to++;
16260}
16261char TZ_GMT0[] = "TZ=GMT0";
16262char TZ_PST8[] = "TZ=PST8";
16263main()
16264{
16265 time_t now = time ((time_t *) 0);
16266 int hour_GMT0, hour_unset;
16267 if (putenv (TZ_GMT0) != 0)
16268 exit (1);
16269 hour_GMT0 = localtime (&now)->tm_hour;
16270 unset_TZ ();
16271 hour_unset = localtime (&now)->tm_hour;
16272 if (putenv (TZ_PST8) != 0)
16273 exit (1);
16274 if (localtime (&now)->tm_hour == hour_GMT0)
16275 exit (1);
16276 unset_TZ ();
16277 if (localtime (&now)->tm_hour != hour_unset)
16278 exit (1);
16279 exit (0);
16280}
503d2be0
AS
16281_ACEOF
16282rm -f conftest$ac_exeext
c0d27fcc 16283if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
16284 (eval $ac_link) 2>&5
16285 ac_status=$?
c0d27fcc 16286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16287 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 16288 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
16289 (eval $ac_try) 2>&5
16290 ac_status=$?
c0d27fcc 16291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16292 (exit $ac_status); }; }; then
ba4481b5
DL
16293 emacs_cv_localtime_cache=no
16294else
503d2be0
AS
16295 echo "$as_me: program exited with status $ac_status" >&5
16296echo "$as_me: failed program was:" >&5
cd958eb3
MB
16297sed 's/^/| /' conftest.$ac_ext >&5
16298
c0d27fcc 16299( exit $ac_status )
503d2be0 16300emacs_cv_localtime_cache=yes
ba4481b5 16301fi
6bae0ccf 16302rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 16303fi
ba4481b5
DL
16304else
16305 # If we lack tzset, report that localtime does not cache TZ,
16306 # since we can't invalidate the cache if we don't have tzset.
16307 emacs_cv_localtime_cache=no
16308fi
16309fi
c0d27fcc 16310echo "$as_me:$LINENO: result: $emacs_cv_localtime_cache" >&5
503d2be0 16311echo "${ECHO_T}$emacs_cv_localtime_cache" >&6
ba4481b5 16312if test $emacs_cv_localtime_cache = yes; then
b936fae4 16313
c0d27fcc 16314cat >>confdefs.h <<\_ACEOF
ba4481b5 16315#define LOCALTIME_CACHE 1
c0d27fcc 16316_ACEOF
ba4481b5
DL
16317
16318fi
16319
16320if test "x$HAVE_TIMEVAL" = xyes; then
503d2be0
AS
16321
16322for ac_func in gettimeofday
48d4b120 16323do
503d2be0 16324as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 16325echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
16326echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16327if eval "test \"\${$as_ac_var+set}\" = set"; then
16328 echo $ECHO_N "(cached) $ECHO_C" >&6
48d4b120 16329else
503d2be0 16330 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 16331#line $LINENO "configure"
cd958eb3
MB
16332/* confdefs.h. */
16333_ACEOF
16334cat confdefs.h >>conftest.$ac_ext
16335cat >>conftest.$ac_ext <<_ACEOF
16336/* end confdefs.h. */
48d4b120 16337/* System header to define __stub macros and hopefully few prototypes,
9e71690e
DK
16338 which can conflict with char $ac_func (); below.
16339 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16340 <limits.h> exists even on freestanding compilers. */
16341#ifdef __STDC__
16342# include <limits.h>
16343#else
16344# include <assert.h>
16345#endif
48d4b120 16346/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
16347#ifdef __cplusplus
16348extern "C"
cd958eb3 16349{
503d2be0 16350#endif
48d4b120 16351/* We use char because int might match the return type of a gcc2
503d2be0
AS
16352 builtin and then its argument prototype would still apply. */
16353char $ac_func ();
48d4b120
DL
16354/* The GNU C library defines this for functions which it implements
16355 to always fail with ENOSYS. Some functions are actually named
16356 something starting with __ and the normal name is an alias. */
16357#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16358choke me
16359#else
cd958eb3 16360char (*f) () = $ac_func;
48d4b120 16361#endif
cd958eb3
MB
16362#ifdef __cplusplus
16363}
16364#endif
16365
16366int
16367main ()
16368{
9e71690e 16369return f != $ac_func;
503d2be0
AS
16370 ;
16371 return 0;
16372}
16373_ACEOF
16374rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 16375if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
16376 (eval $ac_link) 2>&5
16377 ac_status=$?
c0d27fcc 16378 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
16379 (exit $ac_status); } &&
16380 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 16381 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
16382 (eval $ac_try) 2>&5
16383 ac_status=$?
c0d27fcc 16384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
16385 (exit $ac_status); }; }; then
16386 eval "$as_ac_var=yes"
16387else
16388 echo "$as_me: failed program was:" >&5
cd958eb3
MB
16389sed 's/^/| /' conftest.$ac_ext >&5
16390
503d2be0
AS
16391eval "$as_ac_var=no"
16392fi
16393rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16394fi
c0d27fcc 16395echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
16396echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16397if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 16398 cat >>confdefs.h <<_ACEOF
503d2be0 16399#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 16400_ACEOF
48d4b120 16401
48d4b120
DL
16402fi
16403done
16404
b936fae4 16405 if test $ac_cv_func_gettimeofday = yes; then
c0d27fcc 16406 echo "$as_me:$LINENO: checking whether gettimeofday can accept two arguments" >&5
503d2be0
AS
16407echo $ECHO_N "checking whether gettimeofday can accept two arguments... $ECHO_C" >&6
16408if test "${emacs_cv_gettimeofday_two_arguments+set}" = set; then
16409 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16410else
503d2be0 16411 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 16412#line $LINENO "configure"
cd958eb3
MB
16413/* confdefs.h. */
16414_ACEOF
16415cat confdefs.h >>conftest.$ac_ext
16416cat >>conftest.$ac_ext <<_ACEOF
16417/* end confdefs.h. */
ba4481b5 16418
a3f08d9e
DL
16419#ifdef TIME_WITH_SYS_TIME
16420#include <sys/time.h>
16421#include <time.h>
16422#else
16423#ifdef HAVE_SYS_TIME_H
16424#include <sys/time.h>
16425#else
16426#include <time.h>
16427#endif
16428#endif
503d2be0
AS
16429int
16430main ()
16431{
a3f08d9e 16432struct timeval time;
b936fae4 16433 gettimeofday (&time, 0);
503d2be0
AS
16434 ;
16435 return 0;
16436}
16437_ACEOF
16438rm -f conftest.$ac_objext
c0d27fcc 16439if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
16440 (eval $ac_compile) 2>&5
16441 ac_status=$?
c0d27fcc 16442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
16443 (exit $ac_status); } &&
16444 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 16445 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
16446 (eval $ac_try) 2>&5
16447 ac_status=$?
c0d27fcc 16448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16449 (exit $ac_status); }; }; then
ba4481b5
DL
16450 emacs_cv_gettimeofday_two_arguments=yes
16451else
503d2be0 16452 echo "$as_me: failed program was:" >&5
cd958eb3
MB
16453sed 's/^/| /' conftest.$ac_ext >&5
16454
503d2be0 16455emacs_cv_gettimeofday_two_arguments=no
ba4481b5 16456fi
503d2be0 16457rm -f conftest.$ac_objext conftest.$ac_ext
ba4481b5 16458fi
c0d27fcc 16459echo "$as_me:$LINENO: result: $emacs_cv_gettimeofday_two_arguments" >&5
503d2be0 16460echo "${ECHO_T}$emacs_cv_gettimeofday_two_arguments" >&6
b936fae4
AS
16461 if test $emacs_cv_gettimeofday_two_arguments = no; then
16462
c0d27fcc 16463cat >>confdefs.h <<\_ACEOF
ba4481b5 16464#define GETTIMEOFDAY_ONE_ARGUMENT 1
c0d27fcc 16465_ACEOF
ba4481b5 16466
b936fae4 16467 fi
ba4481b5
DL
16468 fi
16469fi
16470
48d4b120 16471if test "$ac_cv_func_gettimeofday" = yes; then
c0d27fcc 16472 echo "$as_me:$LINENO: checking for struct timezone" >&5
503d2be0
AS
16473echo $ECHO_N "checking for struct timezone... $ECHO_C" >&6
16474if test "${emacs_cv_struct_timezone+set}" = set; then
16475 echo $ECHO_N "(cached) $ECHO_C" >&6
48d4b120 16476else
503d2be0 16477 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 16478#line $LINENO "configure"
cd958eb3
MB
16479/* confdefs.h. */
16480_ACEOF
16481cat confdefs.h >>conftest.$ac_ext
16482cat >>conftest.$ac_ext <<_ACEOF
16483/* end confdefs.h. */
48d4b120 16484#include <sys/time.h>
503d2be0
AS
16485int
16486main ()
16487{
48d4b120 16488struct timezone tz;
503d2be0
AS
16489 ;
16490 return 0;
16491}
16492_ACEOF
16493rm -f conftest.$ac_objext
c0d27fcc 16494if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
16495 (eval $ac_compile) 2>&5
16496 ac_status=$?
c0d27fcc 16497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
16498 (exit $ac_status); } &&
16499 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 16500 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
16501 (eval $ac_try) 2>&5
16502 ac_status=$?
c0d27fcc 16503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16504 (exit $ac_status); }; }; then
48d4b120
DL
16505 if test "$cross_compiling" = yes; then
16506 emacs_cv_struct_timezone=yes
16507else
503d2be0 16508 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 16509#line $LINENO "configure"
cd958eb3
MB
16510/* confdefs.h. */
16511_ACEOF
16512cat confdefs.h >>conftest.$ac_ext
16513cat >>conftest.$ac_ext <<_ACEOF
16514/* end confdefs.h. */
48d4b120
DL
16515
16516#ifdef TIME_WITH_SYS_TIME
16517#include <sys/time.h>
16518#include <time.h>
16519#else
16520#ifdef HAVE_SYS_TIME_H
16521#include <sys/time.h>
16522#else
16523#include <time.h>
16524#endif
16525#endif
16526main () {
16527 struct timeval time;
16528 struct timezone dummy;
16529 exit (gettimeofday (&time, &dummy));
16530}
503d2be0
AS
16531_ACEOF
16532rm -f conftest$ac_exeext
c0d27fcc 16533if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
16534 (eval $ac_link) 2>&5
16535 ac_status=$?
c0d27fcc 16536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16537 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 16538 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
16539 (eval $ac_try) 2>&5
16540 ac_status=$?
c0d27fcc 16541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16542 (exit $ac_status); }; }; then
48d4b120
DL
16543 emacs_cv_struct_timezone=yes
16544else
503d2be0
AS
16545 echo "$as_me: program exited with status $ac_status" >&5
16546echo "$as_me: failed program was:" >&5
cd958eb3
MB
16547sed 's/^/| /' conftest.$ac_ext >&5
16548
c0d27fcc 16549( exit $ac_status )
503d2be0 16550emacs_cv_struct_timezone=no
48d4b120 16551fi
6bae0ccf 16552rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
48d4b120 16553fi
48d4b120 16554else
503d2be0 16555 echo "$as_me: failed program was:" >&5
cd958eb3
MB
16556sed 's/^/| /' conftest.$ac_ext >&5
16557
503d2be0 16558emacs_cv_struct_timezone=no
48d4b120 16559fi
503d2be0 16560rm -f conftest.$ac_objext conftest.$ac_ext
48d4b120 16561fi
c0d27fcc 16562echo "$as_me:$LINENO: result: $emacs_cv_struct_timezone" >&5
503d2be0 16563echo "${ECHO_T}$emacs_cv_struct_timezone" >&6
48d4b120
DL
16564fi
16565
ba4481b5 16566ok_so_far=yes
c0d27fcc 16567echo "$as_me:$LINENO: checking for socket" >&5
503d2be0
AS
16568echo $ECHO_N "checking for socket... $ECHO_C" >&6
16569if test "${ac_cv_func_socket+set}" = set; then
16570 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16571else
503d2be0 16572 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 16573#line $LINENO "configure"
cd958eb3
MB
16574/* confdefs.h. */
16575_ACEOF
16576cat confdefs.h >>conftest.$ac_ext
16577cat >>conftest.$ac_ext <<_ACEOF
16578/* end confdefs.h. */
ba4481b5 16579/* System header to define __stub macros and hopefully few prototypes,
9e71690e
DK
16580 which can conflict with char socket (); below.
16581 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16582 <limits.h> exists even on freestanding compilers. */
16583#ifdef __STDC__
16584# include <limits.h>
16585#else
16586# include <assert.h>
16587#endif
ba4481b5 16588/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
16589#ifdef __cplusplus
16590extern "C"
cd958eb3 16591{
503d2be0 16592#endif
ba4481b5 16593/* We use char because int might match the return type of a gcc2
503d2be0
AS
16594 builtin and then its argument prototype would still apply. */
16595char socket ();
ba4481b5
DL
16596/* The GNU C library defines this for functions which it implements
16597 to always fail with ENOSYS. Some functions are actually named
16598 something starting with __ and the normal name is an alias. */
16599#if defined (__stub_socket) || defined (__stub___socket)
16600choke me
16601#else
cd958eb3 16602char (*f) () = socket;
ba4481b5 16603#endif
cd958eb3
MB
16604#ifdef __cplusplus
16605}
16606#endif
16607
16608int
16609main ()
16610{
9e71690e 16611return f != socket;
503d2be0
AS
16612 ;
16613 return 0;
16614}
16615_ACEOF
16616rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 16617if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
16618 (eval $ac_link) 2>&5
16619 ac_status=$?
c0d27fcc 16620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
16621 (exit $ac_status); } &&
16622 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 16623 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
16624 (eval $ac_try) 2>&5
16625 ac_status=$?
c0d27fcc 16626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
16627 (exit $ac_status); }; }; then
16628 ac_cv_func_socket=yes
16629else
16630 echo "$as_me: failed program was:" >&5
cd958eb3
MB
16631sed 's/^/| /' conftest.$ac_ext >&5
16632
503d2be0
AS
16633ac_cv_func_socket=no
16634fi
16635rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16636fi
c0d27fcc 16637echo "$as_me:$LINENO: result: $ac_cv_func_socket" >&5
503d2be0
AS
16638echo "${ECHO_T}$ac_cv_func_socket" >&6
16639if test $ac_cv_func_socket = yes; then
ba4481b5
DL
16640 :
16641else
503d2be0 16642 ok_so_far=no
ba4481b5
DL
16643fi
16644
16645if test $ok_so_far = yes; then
c0d27fcc
MR
16646 if test "${ac_cv_header_netinet_in_h+set}" = set; then
16647 echo "$as_me:$LINENO: checking for netinet/in.h" >&5
503d2be0
AS
16648echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6
16649if test "${ac_cv_header_netinet_in_h+set}" = set; then
16650 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
16651fi
16652echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5
16653echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6
98418dba 16654else
c0d27fcc
MR
16655 # Is the header compilable?
16656echo "$as_me:$LINENO: checking netinet/in.h usability" >&5
16657echo $ECHO_N "checking netinet/in.h usability... $ECHO_C" >&6
16658cat >conftest.$ac_ext <<_ACEOF
16659#line $LINENO "configure"
cd958eb3
MB
16660/* confdefs.h. */
16661_ACEOF
16662cat confdefs.h >>conftest.$ac_ext
16663cat >>conftest.$ac_ext <<_ACEOF
16664/* end confdefs.h. */
c0d27fcc
MR
16665$ac_includes_default
16666#include <netinet/in.h>
16667_ACEOF
16668rm -f conftest.$ac_objext
16669if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16670 (eval $ac_compile) 2>&5
16671 ac_status=$?
16672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16673 (exit $ac_status); } &&
16674 { ac_try='test -s conftest.$ac_objext'
16675 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16676 (eval $ac_try) 2>&5
16677 ac_status=$?
16678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16679 (exit $ac_status); }; }; then
16680 ac_header_compiler=yes
16681else
16682 echo "$as_me: failed program was:" >&5
cd958eb3
MB
16683sed 's/^/| /' conftest.$ac_ext >&5
16684
c0d27fcc
MR
16685ac_header_compiler=no
16686fi
16687rm -f conftest.$ac_objext conftest.$ac_ext
16688echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16689echo "${ECHO_T}$ac_header_compiler" >&6
16690
16691# Is the header present?
16692echo "$as_me:$LINENO: checking netinet/in.h presence" >&5
16693echo $ECHO_N "checking netinet/in.h presence... $ECHO_C" >&6
16694cat >conftest.$ac_ext <<_ACEOF
16695#line $LINENO "configure"
cd958eb3
MB
16696/* confdefs.h. */
16697_ACEOF
16698cat confdefs.h >>conftest.$ac_ext
16699cat >>conftest.$ac_ext <<_ACEOF
16700/* end confdefs.h. */
ba4481b5 16701#include <netinet/in.h>
503d2be0 16702_ACEOF
c0d27fcc 16703if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
16704 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16705 ac_status=$?
6bae0ccf 16706 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
16707 rm -f conftest.er1
16708 cat conftest.err >&5
c0d27fcc 16709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
16710 (exit $ac_status); } >/dev/null; then
16711 if test -s conftest.err; then
16712 ac_cpp_err=$ac_c_preproc_warn_flag
16713 else
16714 ac_cpp_err=
16715 fi
16716else
16717 ac_cpp_err=yes
16718fi
16719if test -z "$ac_cpp_err"; then
c0d27fcc 16720 ac_header_preproc=yes
ba4481b5 16721else
503d2be0 16722 echo "$as_me: failed program was:" >&5
cd958eb3
MB
16723sed 's/^/| /' conftest.$ac_ext >&5
16724
c0d27fcc 16725 ac_header_preproc=no
ba4481b5 16726fi
503d2be0 16727rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
16728echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16729echo "${ECHO_T}$ac_header_preproc" >&6
16730
16731# So? What about this header?
16732case $ac_header_compiler:$ac_header_preproc in
16733 yes:no )
16734 { echo "$as_me:$LINENO: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&5
16735echo "$as_me: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16736 { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&5
cd958eb3
MB
16737echo "$as_me: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&2;}
16738 (
16739 cat <<\_ASBOX
16740## ------------------------------------ ##
16741## Report this to bug-autoconf@gnu.org. ##
16742## ------------------------------------ ##
16743_ASBOX
16744 ) |
16745 sed "s/^/$as_me: WARNING: /" >&2
16746 ;;
c0d27fcc
MR
16747 no:yes )
16748 { echo "$as_me:$LINENO: WARNING: netinet/in.h: present but cannot be compiled" >&5
16749echo "$as_me: WARNING: netinet/in.h: present but cannot be compiled" >&2;}
16750 { echo "$as_me:$LINENO: WARNING: netinet/in.h: check for missing prerequisite headers?" >&5
16751echo "$as_me: WARNING: netinet/in.h: check for missing prerequisite headers?" >&2;}
16752 { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&5
cd958eb3
MB
16753echo "$as_me: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&2;}
16754 (
16755 cat <<\_ASBOX
16756## ------------------------------------ ##
16757## Report this to bug-autoconf@gnu.org. ##
16758## ------------------------------------ ##
16759_ASBOX
16760 ) |
16761 sed "s/^/$as_me: WARNING: /" >&2
16762 ;;
c0d27fcc
MR
16763esac
16764echo "$as_me:$LINENO: checking for netinet/in.h" >&5
16765echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6
16766if test "${ac_cv_header_netinet_in_h+set}" = set; then
16767 echo $ECHO_N "(cached) $ECHO_C" >&6
16768else
16769 ac_cv_header_netinet_in_h=$ac_header_preproc
ba4481b5 16770fi
c0d27fcc 16771echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5
503d2be0 16772echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6
c0d27fcc
MR
16773
16774fi
503d2be0 16775if test $ac_cv_header_netinet_in_h = yes; then
ba4481b5
DL
16776 :
16777else
503d2be0 16778 ok_so_far=no
ba4481b5
DL
16779fi
16780
c0d27fcc 16781
ba4481b5
DL
16782fi
16783if test $ok_so_far = yes; then
c0d27fcc
MR
16784 if test "${ac_cv_header_arpa_inet_h+set}" = set; then
16785 echo "$as_me:$LINENO: checking for arpa/inet.h" >&5
503d2be0
AS
16786echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6
16787if test "${ac_cv_header_arpa_inet_h+set}" = set; then
16788 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
16789fi
16790echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5
16791echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6
98418dba 16792else
c0d27fcc
MR
16793 # Is the header compilable?
16794echo "$as_me:$LINENO: checking arpa/inet.h usability" >&5
16795echo $ECHO_N "checking arpa/inet.h usability... $ECHO_C" >&6
16796cat >conftest.$ac_ext <<_ACEOF
16797#line $LINENO "configure"
cd958eb3
MB
16798/* confdefs.h. */
16799_ACEOF
16800cat confdefs.h >>conftest.$ac_ext
16801cat >>conftest.$ac_ext <<_ACEOF
16802/* end confdefs.h. */
c0d27fcc
MR
16803$ac_includes_default
16804#include <arpa/inet.h>
16805_ACEOF
16806rm -f conftest.$ac_objext
16807if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16808 (eval $ac_compile) 2>&5
16809 ac_status=$?
16810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16811 (exit $ac_status); } &&
16812 { ac_try='test -s conftest.$ac_objext'
16813 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16814 (eval $ac_try) 2>&5
16815 ac_status=$?
16816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16817 (exit $ac_status); }; }; then
16818 ac_header_compiler=yes
16819else
16820 echo "$as_me: failed program was:" >&5
cd958eb3
MB
16821sed 's/^/| /' conftest.$ac_ext >&5
16822
c0d27fcc
MR
16823ac_header_compiler=no
16824fi
16825rm -f conftest.$ac_objext conftest.$ac_ext
16826echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16827echo "${ECHO_T}$ac_header_compiler" >&6
16828
16829# Is the header present?
16830echo "$as_me:$LINENO: checking arpa/inet.h presence" >&5
16831echo $ECHO_N "checking arpa/inet.h presence... $ECHO_C" >&6
16832cat >conftest.$ac_ext <<_ACEOF
16833#line $LINENO "configure"
cd958eb3
MB
16834/* confdefs.h. */
16835_ACEOF
16836cat confdefs.h >>conftest.$ac_ext
16837cat >>conftest.$ac_ext <<_ACEOF
16838/* end confdefs.h. */
ba4481b5 16839#include <arpa/inet.h>
503d2be0 16840_ACEOF
c0d27fcc 16841if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
16842 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16843 ac_status=$?
6bae0ccf 16844 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
16845 rm -f conftest.er1
16846 cat conftest.err >&5
c0d27fcc 16847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
16848 (exit $ac_status); } >/dev/null; then
16849 if test -s conftest.err; then
16850 ac_cpp_err=$ac_c_preproc_warn_flag
16851 else
16852 ac_cpp_err=
16853 fi
16854else
16855 ac_cpp_err=yes
16856fi
16857if test -z "$ac_cpp_err"; then
c0d27fcc 16858 ac_header_preproc=yes
ba4481b5 16859else
503d2be0 16860 echo "$as_me: failed program was:" >&5
cd958eb3
MB
16861sed 's/^/| /' conftest.$ac_ext >&5
16862
c0d27fcc 16863 ac_header_preproc=no
ba4481b5 16864fi
503d2be0 16865rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
16866echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16867echo "${ECHO_T}$ac_header_preproc" >&6
16868
16869# So? What about this header?
16870case $ac_header_compiler:$ac_header_preproc in
16871 yes:no )
16872 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&5
16873echo "$as_me: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16874 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&5
cd958eb3
MB
16875echo "$as_me: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&2;}
16876 (
16877 cat <<\_ASBOX
16878## ------------------------------------ ##
16879## Report this to bug-autoconf@gnu.org. ##
16880## ------------------------------------ ##
16881_ASBOX
16882 ) |
16883 sed "s/^/$as_me: WARNING: /" >&2
16884 ;;
c0d27fcc
MR
16885 no:yes )
16886 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: present but cannot be compiled" >&5
16887echo "$as_me: WARNING: arpa/inet.h: present but cannot be compiled" >&2;}
16888 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: check for missing prerequisite headers?" >&5
16889echo "$as_me: WARNING: arpa/inet.h: check for missing prerequisite headers?" >&2;}
16890 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&5
cd958eb3
MB
16891echo "$as_me: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&2;}
16892 (
16893 cat <<\_ASBOX
16894## ------------------------------------ ##
16895## Report this to bug-autoconf@gnu.org. ##
16896## ------------------------------------ ##
16897_ASBOX
16898 ) |
16899 sed "s/^/$as_me: WARNING: /" >&2
16900 ;;
c0d27fcc
MR
16901esac
16902echo "$as_me:$LINENO: checking for arpa/inet.h" >&5
16903echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6
16904if test "${ac_cv_header_arpa_inet_h+set}" = set; then
16905 echo $ECHO_N "(cached) $ECHO_C" >&6
16906else
16907 ac_cv_header_arpa_inet_h=$ac_header_preproc
ba4481b5 16908fi
c0d27fcc 16909echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5
503d2be0 16910echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6
c0d27fcc
MR
16911
16912fi
503d2be0 16913if test $ac_cv_header_arpa_inet_h = yes; then
ba4481b5
DL
16914 :
16915else
503d2be0 16916 ok_so_far=no
ba4481b5
DL
16917fi
16918
c0d27fcc 16919
ba4481b5
DL
16920fi
16921if test $ok_so_far = yes; then
b936fae4 16922
c0d27fcc 16923cat >>confdefs.h <<\_ACEOF
ba4481b5 16924#define HAVE_INET_SOCKETS 1
c0d27fcc 16925_ACEOF
ba4481b5
DL
16926
16927fi
16928
16929if test -f /usr/lpp/X11/bin/smt.exp; then
b936fae4 16930
c0d27fcc 16931cat >>confdefs.h <<\_ACEOF
ba4481b5 16932#define HAVE_AIX_SMT_EXP 1
c0d27fcc 16933_ACEOF
ba4481b5
DL
16934
16935fi
16936
c0d27fcc 16937echo "$as_me:$LINENO: checking whether system supports dynamic ptys" >&5
503d2be0 16938echo $ECHO_N "checking whether system supports dynamic ptys... $ECHO_C" >&6
3d9fec71 16939if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then
c0d27fcc 16940 echo "$as_me:$LINENO: result: yes" >&5
503d2be0 16941echo "${ECHO_T}yes" >&6
b936fae4 16942
c0d27fcc 16943cat >>confdefs.h <<\_ACEOF
3d9fec71 16944#define HAVE_DEV_PTMX 1
c0d27fcc 16945_ACEOF
3d9fec71
DL
16946
16947else
c0d27fcc 16948 echo "$as_me:$LINENO: result: no" >&5
503d2be0 16949echo "${ECHO_T}no" >&6
3d9fec71
DL
16950fi
16951
c0d27fcc 16952echo "$as_me:$LINENO: checking for pid_t" >&5
503d2be0
AS
16953echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
16954if test "${ac_cv_type_pid_t+set}" = set; then
16955 echo $ECHO_N "(cached) $ECHO_C" >&6
647847ea 16956else
503d2be0 16957 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 16958#line $LINENO "configure"
cd958eb3
MB
16959/* confdefs.h. */
16960_ACEOF
16961cat confdefs.h >>conftest.$ac_ext
16962cat >>conftest.$ac_ext <<_ACEOF
16963/* end confdefs.h. */
503d2be0
AS
16964$ac_includes_default
16965int
16966main ()
16967{
16968if ((pid_t *) 0)
16969 return 0;
16970if (sizeof (pid_t))
16971 return 0;
16972 ;
16973 return 0;
16974}
16975_ACEOF
16976rm -f conftest.$ac_objext
c0d27fcc 16977if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
16978 (eval $ac_compile) 2>&5
16979 ac_status=$?
c0d27fcc 16980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
16981 (exit $ac_status); } &&
16982 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 16983 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
16984 (eval $ac_try) 2>&5
16985 ac_status=$?
c0d27fcc 16986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16987 (exit $ac_status); }; }; then
647847ea
DL
16988 ac_cv_type_pid_t=yes
16989else
503d2be0 16990 echo "$as_me: failed program was:" >&5
cd958eb3
MB
16991sed 's/^/| /' conftest.$ac_ext >&5
16992
503d2be0 16993ac_cv_type_pid_t=no
647847ea 16994fi
503d2be0 16995rm -f conftest.$ac_objext conftest.$ac_ext
647847ea 16996fi
c0d27fcc 16997echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
503d2be0
AS
16998echo "${ECHO_T}$ac_cv_type_pid_t" >&6
16999if test $ac_cv_type_pid_t = yes; then
17000 :
17001else
17002
c0d27fcc 17003cat >>confdefs.h <<_ACEOF
647847ea 17004#define pid_t int
c0d27fcc 17005_ACEOF
647847ea
DL
17006
17007fi
17008
c0d27fcc
MR
17009
17010
503d2be0
AS
17011for ac_header in unistd.h vfork.h
17012do
17013as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
17014if eval "test \"\${$as_ac_Header+set}\" = set"; then
17015 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
17016echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17017if eval "test \"\${$as_ac_Header+set}\" = set"; then
17018 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
17019fi
17020echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
17021echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 17022else
c0d27fcc
MR
17023 # Is the header compilable?
17024echo "$as_me:$LINENO: checking $ac_header usability" >&5
17025echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
17026cat >conftest.$ac_ext <<_ACEOF
17027#line $LINENO "configure"
cd958eb3
MB
17028/* confdefs.h. */
17029_ACEOF
17030cat confdefs.h >>conftest.$ac_ext
17031cat >>conftest.$ac_ext <<_ACEOF
17032/* end confdefs.h. */
c0d27fcc
MR
17033$ac_includes_default
17034#include <$ac_header>
17035_ACEOF
17036rm -f conftest.$ac_objext
17037if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17038 (eval $ac_compile) 2>&5
17039 ac_status=$?
17040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17041 (exit $ac_status); } &&
17042 { ac_try='test -s conftest.$ac_objext'
17043 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17044 (eval $ac_try) 2>&5
17045 ac_status=$?
17046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17047 (exit $ac_status); }; }; then
17048 ac_header_compiler=yes
17049else
17050 echo "$as_me: failed program was:" >&5
cd958eb3
MB
17051sed 's/^/| /' conftest.$ac_ext >&5
17052
c0d27fcc
MR
17053ac_header_compiler=no
17054fi
17055rm -f conftest.$ac_objext conftest.$ac_ext
17056echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17057echo "${ECHO_T}$ac_header_compiler" >&6
17058
17059# Is the header present?
17060echo "$as_me:$LINENO: checking $ac_header presence" >&5
17061echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
17062cat >conftest.$ac_ext <<_ACEOF
17063#line $LINENO "configure"
cd958eb3
MB
17064/* confdefs.h. */
17065_ACEOF
17066cat confdefs.h >>conftest.$ac_ext
17067cat >>conftest.$ac_ext <<_ACEOF
17068/* end confdefs.h. */
503d2be0
AS
17069#include <$ac_header>
17070_ACEOF
c0d27fcc 17071if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
17072 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17073 ac_status=$?
6bae0ccf 17074 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
17075 rm -f conftest.er1
17076 cat conftest.err >&5
c0d27fcc 17077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
17078 (exit $ac_status); } >/dev/null; then
17079 if test -s conftest.err; then
17080 ac_cpp_err=$ac_c_preproc_warn_flag
17081 else
17082 ac_cpp_err=
17083 fi
647847ea 17084else
503d2be0
AS
17085 ac_cpp_err=yes
17086fi
17087if test -z "$ac_cpp_err"; then
c0d27fcc 17088 ac_header_preproc=yes
647847ea 17089else
503d2be0 17090 echo "$as_me: failed program was:" >&5
cd958eb3
MB
17091sed 's/^/| /' conftest.$ac_ext >&5
17092
c0d27fcc 17093 ac_header_preproc=no
647847ea 17094fi
503d2be0 17095rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
17096echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17097echo "${ECHO_T}$ac_header_preproc" >&6
17098
17099# So? What about this header?
17100case $ac_header_compiler:$ac_header_preproc in
17101 yes:no )
17102 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
17103echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
17104 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
17105echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
17106 (
17107 cat <<\_ASBOX
17108## ------------------------------------ ##
17109## Report this to bug-autoconf@gnu.org. ##
17110## ------------------------------------ ##
17111_ASBOX
17112 ) |
17113 sed "s/^/$as_me: WARNING: /" >&2
17114 ;;
c0d27fcc
MR
17115 no:yes )
17116 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
17117echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
17118 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
17119echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
17120 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
17121echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
17122 (
17123 cat <<\_ASBOX
17124## ------------------------------------ ##
17125## Report this to bug-autoconf@gnu.org. ##
17126## ------------------------------------ ##
17127_ASBOX
17128 ) |
17129 sed "s/^/$as_me: WARNING: /" >&2
17130 ;;
c0d27fcc
MR
17131esac
17132echo "$as_me:$LINENO: checking for $ac_header" >&5
17133echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17134if eval "test \"\${$as_ac_Header+set}\" = set"; then
17135 echo $ECHO_N "(cached) $ECHO_C" >&6
17136else
17137 eval "$as_ac_Header=$ac_header_preproc"
647847ea 17138fi
c0d27fcc 17139echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 17140echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
17141
17142fi
503d2be0 17143if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 17144 cat >>confdefs.h <<_ACEOF
503d2be0 17145#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 17146_ACEOF
647847ea 17147
73b77ee5 17148fi
c0d27fcc 17149
503d2be0 17150done
73b77ee5 17151
c0d27fcc
MR
17152
17153
503d2be0
AS
17154for ac_func in fork vfork
17155do
17156as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 17157echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
17158echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17159if eval "test \"\${$as_ac_var+set}\" = set"; then
17160 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 17161else
503d2be0 17162 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 17163#line $LINENO "configure"
cd958eb3
MB
17164/* confdefs.h. */
17165_ACEOF
17166cat confdefs.h >>conftest.$ac_ext
17167cat >>conftest.$ac_ext <<_ACEOF
17168/* end confdefs.h. */
fa0b693c 17169/* System header to define __stub macros and hopefully few prototypes,
9e71690e
DK
17170 which can conflict with char $ac_func (); below.
17171 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17172 <limits.h> exists even on freestanding compilers. */
17173#ifdef __STDC__
17174# include <limits.h>
17175#else
17176# include <assert.h>
17177#endif
fa0b693c 17178/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
17179#ifdef __cplusplus
17180extern "C"
cd958eb3 17181{
503d2be0 17182#endif
fa0b693c 17183/* We use char because int might match the return type of a gcc2
503d2be0
AS
17184 builtin and then its argument prototype would still apply. */
17185char $ac_func ();
fa0b693c
GM
17186/* The GNU C library defines this for functions which it implements
17187 to always fail with ENOSYS. Some functions are actually named
17188 something starting with __ and the normal name is an alias. */
503d2be0 17189#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
fa0b693c
GM
17190choke me
17191#else
cd958eb3
MB
17192char (*f) () = $ac_func;
17193#endif
17194#ifdef __cplusplus
17195}
fa0b693c
GM
17196#endif
17197
cd958eb3
MB
17198int
17199main ()
17200{
9e71690e 17201return f != $ac_func;
503d2be0
AS
17202 ;
17203 return 0;
17204}
17205_ACEOF
17206rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17207if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
17208 (eval $ac_link) 2>&5
17209 ac_status=$?
c0d27fcc 17210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
17211 (exit $ac_status); } &&
17212 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17213 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
17214 (eval $ac_try) 2>&5
17215 ac_status=$?
c0d27fcc 17216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
17217 (exit $ac_status); }; }; then
17218 eval "$as_ac_var=yes"
17219else
17220 echo "$as_me: failed program was:" >&5
cd958eb3
MB
17221sed 's/^/| /' conftest.$ac_ext >&5
17222
503d2be0
AS
17223eval "$as_ac_var=no"
17224fi
17225rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17226fi
c0d27fcc 17227echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
17228echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17229if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 17230 cat >>confdefs.h <<_ACEOF
503d2be0 17231#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 17232_ACEOF
503d2be0 17233
fa0b693c 17234fi
503d2be0 17235done
fa0b693c 17236
503d2be0 17237if test "x$ac_cv_func_fork" = xyes; then
c0d27fcc 17238 echo "$as_me:$LINENO: checking for working fork" >&5
503d2be0
AS
17239echo $ECHO_N "checking for working fork... $ECHO_C" >&6
17240if test "${ac_cv_func_fork_works+set}" = set; then
17241 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 17242else
503d2be0
AS
17243 if test "$cross_compiling" = yes; then
17244 ac_cv_func_fork_works=cross
17245else
17246 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 17247/* By Ruediger Kuhlmann. */
503d2be0
AS
17248 #include <sys/types.h>
17249 #if HAVE_UNISTD_H
17250 # include <unistd.h>
17251 #endif
17252 /* Some systems only have a dummy stub for fork() */
17253 int main ()
17254 {
17255 if (fork() < 0)
17256 exit (1);
17257 exit (0);
17258 }
17259_ACEOF
17260rm -f conftest$ac_exeext
c0d27fcc 17261if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
17262 (eval $ac_link) 2>&5
17263 ac_status=$?
c0d27fcc 17264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 17265 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 17266 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
17267 (eval $ac_try) 2>&5
17268 ac_status=$?
c0d27fcc 17269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
17270 (exit $ac_status); }; }; then
17271 ac_cv_func_fork_works=yes
17272else
17273 echo "$as_me: program exited with status $ac_status" >&5
17274echo "$as_me: failed program was:" >&5
cd958eb3
MB
17275sed 's/^/| /' conftest.$ac_ext >&5
17276
c0d27fcc 17277( exit $ac_status )
503d2be0
AS
17278ac_cv_func_fork_works=no
17279fi
6bae0ccf 17280rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
17281fi
17282fi
c0d27fcc 17283echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
503d2be0
AS
17284echo "${ECHO_T}$ac_cv_func_fork_works" >&6
17285
6bae0ccf
DL
17286else
17287 ac_cv_func_fork_works=$ac_cv_func_fork
503d2be0
AS
17288fi
17289if test "x$ac_cv_func_fork_works" = xcross; then
17290 case $host in
17291 *-*-amigaos* | *-*-msdosdjgpp*)
17292 # Override, as these systems have only a dummy fork() stub
17293 ac_cv_func_fork_works=no
17294 ;;
17295 *)
17296 ac_cv_func_fork_works=yes
17297 ;;
17298 esac
c0d27fcc
MR
17299 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
17300echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
fa0b693c 17301fi
73b77ee5 17302ac_cv_func_vfork_works=$ac_cv_func_vfork
503d2be0 17303if test "x$ac_cv_func_vfork" = xyes; then
c0d27fcc 17304 echo "$as_me:$LINENO: checking for working vfork" >&5
503d2be0
AS
17305echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
17306if test "${ac_cv_func_vfork_works+set}" = set; then
17307 echo $ECHO_N "(cached) $ECHO_C" >&6
17308else
17309 if test "$cross_compiling" = yes; then
17310 ac_cv_func_vfork_works=cross
fa0b693c 17311else
503d2be0 17312 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 17313#line $LINENO "configure"
cd958eb3
MB
17314/* confdefs.h. */
17315_ACEOF
17316cat confdefs.h >>conftest.$ac_ext
17317cat >>conftest.$ac_ext <<_ACEOF
17318/* end confdefs.h. */
73b77ee5
GM
17319/* Thanks to Paul Eggert for this test. */
17320#include <stdio.h>
cd958eb3 17321#include <stdlib.h>
fa0b693c 17322#include <sys/types.h>
73b77ee5 17323#include <sys/stat.h>
cd958eb3 17324#include <sys/wait.h>
503d2be0
AS
17325#if HAVE_UNISTD_H
17326# include <unistd.h>
73b77ee5 17327#endif
503d2be0
AS
17328#if HAVE_VFORK_H
17329# include <vfork.h>
73b77ee5
GM
17330#endif
17331/* On some sparc systems, changes by the child to local and incoming
503d2be0
AS
17332 argument registers are propagated back to the parent. The compiler
17333 is told about this with #include <vfork.h>, but some compilers
17334 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
17335 static variable whose address is put into a register that is
17336 clobbered by the vfork. */
cd958eb3 17337static void
fa0b693c 17338#ifdef __cplusplus
73b77ee5 17339sparc_address_test (int arg)
503d2be0 17340# else
73b77ee5 17341sparc_address_test (arg) int arg;
fa0b693c 17342#endif
fa0b693c 17343{
73b77ee5
GM
17344 static pid_t child;
17345 if (!child) {
17346 child = vfork ();
17347 if (child < 0) {
17348 perror ("vfork");
17349 _exit(2);
17350 }
17351 if (!child) {
17352 arg = getpid();
17353 write(-1, "", 0);
17354 _exit (arg);
17355 }
17356 }
17357}
503d2be0
AS
17358
17359int
17360main ()
17361{
73b77ee5
GM
17362 pid_t parent = getpid ();
17363 pid_t child;
fa0b693c 17364
cd958eb3 17365 sparc_address_test (0);
fa0b693c 17366
73b77ee5 17367 child = vfork ();
fa0b693c 17368
73b77ee5 17369 if (child == 0) {
503d2be0
AS
17370 /* Here is another test for sparc vfork register problems. This
17371 test uses lots of local variables, at least as many local
17372 variables as main has allocated so far including compiler
17373 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
17374 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
17375 reuse the register of parent for one of the local variables,
17376 since it will think that parent can't possibly be used any more
17377 in this routine. Assigning to the local variable will thus
17378 munge parent in the parent process. */
73b77ee5
GM
17379 pid_t
17380 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
17381 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
17382 /* Convince the compiler that p..p7 are live; otherwise, it might
17383 use the same hardware register for all 8 local variables. */
17384 if (p != p1 || p != p2 || p != p3 || p != p4
17385 || p != p5 || p != p6 || p != p7)
17386 _exit(1);
fa0b693c 17387
503d2be0
AS
17388 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
17389 from child file descriptors. If the child closes a descriptor
17390 before it execs or exits, this munges the parent's descriptor
17391 as well. Test for this by closing stdout in the child. */
73b77ee5
GM
17392 _exit(close(fileno(stdout)) != 0);
17393 } else {
17394 int status;
17395 struct stat st;
17396
17397 while (wait(&status) != child)
17398 ;
17399 exit(
17400 /* Was there some problem with vforking? */
17401 child < 0
17402
17403 /* Did the child fail? (This shouldn't happen.) */
17404 || status
17405
17406 /* Did the vfork/compiler bug occur? */
17407 || parent != getpid()
fa0b693c 17408
73b77ee5
GM
17409 /* Did the file descriptor bug occur? */
17410 || fstat(fileno(stdout), &st) != 0
17411 );
17412 }
17413}
503d2be0
AS
17414_ACEOF
17415rm -f conftest$ac_exeext
c0d27fcc 17416if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
17417 (eval $ac_link) 2>&5
17418 ac_status=$?
c0d27fcc 17419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 17420 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 17421 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
17422 (eval $ac_try) 2>&5
17423 ac_status=$?
c0d27fcc 17424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 17425 (exit $ac_status); }; }; then
73b77ee5 17426 ac_cv_func_vfork_works=yes
fa0b693c 17427else
503d2be0
AS
17428 echo "$as_me: program exited with status $ac_status" >&5
17429echo "$as_me: failed program was:" >&5
cd958eb3
MB
17430sed 's/^/| /' conftest.$ac_ext >&5
17431
c0d27fcc 17432( exit $ac_status )
503d2be0
AS
17433ac_cv_func_vfork_works=no
17434fi
6bae0ccf 17435rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fa0b693c 17436fi
fa0b693c 17437fi
c0d27fcc 17438echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
503d2be0 17439echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
fa0b693c 17440
503d2be0
AS
17441fi;
17442if test "x$ac_cv_func_fork_works" = xcross; then
17443 ac_cv_func_vfork_works=ac_cv_func_vfork
c0d27fcc
MR
17444 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
17445echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
fa0b693c
GM
17446fi
17447
503d2be0
AS
17448if test "x$ac_cv_func_vfork_works" = xyes; then
17449
c0d27fcc 17450cat >>confdefs.h <<\_ACEOF
503d2be0 17451#define HAVE_WORKING_VFORK 1
c0d27fcc 17452_ACEOF
503d2be0
AS
17453
17454else
17455
c0d27fcc 17456cat >>confdefs.h <<\_ACEOF
73b77ee5 17457#define vfork fork
c0d27fcc 17458_ACEOF
fa0b693c
GM
17459
17460fi
503d2be0
AS
17461if test "x$ac_cv_func_fork_works" = xyes; then
17462
c0d27fcc 17463cat >>confdefs.h <<\_ACEOF
503d2be0 17464#define HAVE_WORKING_FORK 1
c0d27fcc 17465_ACEOF
fa0b693c 17466
503d2be0 17467fi
647847ea 17468
c0d27fcc 17469
6a3a24fa
JD
17470echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5
17471echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
17472if test "${emacs_cv_langinfo_codeset+set}" = set; then
17473 echo $ECHO_N "(cached) $ECHO_C" >&6
17474else
17475 cat >conftest.$ac_ext <<_ACEOF
17476#line $LINENO "configure"
17477/* confdefs.h. */
17478_ACEOF
17479cat confdefs.h >>conftest.$ac_ext
17480cat >>conftest.$ac_ext <<_ACEOF
17481/* end confdefs.h. */
17482#include <langinfo.h>
17483int
17484main ()
17485{
17486char* cs = nl_langinfo(CODESET);
17487 ;
17488 return 0;
17489}
17490_ACEOF
17491rm -f conftest.$ac_objext conftest$ac_exeext
17492if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17493 (eval $ac_link) 2>&5
17494 ac_status=$?
17495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17496 (exit $ac_status); } &&
17497 { ac_try='test -s conftest$ac_exeext'
17498 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17499 (eval $ac_try) 2>&5
17500 ac_status=$?
17501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17502 (exit $ac_status); }; }; then
17503 emacs_cv_langinfo_codeset=yes
17504else
17505 echo "$as_me: failed program was:" >&5
17506sed 's/^/| /' conftest.$ac_ext >&5
17507
17508emacs_cv_langinfo_codeset=no
17509fi
17510rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17511
17512fi
17513echo "$as_me:$LINENO: result: $emacs_cv_langinfo_codeset" >&5
17514echo "${ECHO_T}$emacs_cv_langinfo_codeset" >&6
17515if test $emacs_cv_langinfo_codeset = yes; then
17516
17517cat >>confdefs.h <<\_ACEOF
17518#define HAVE_LANGINFO_CODESET 1
17519_ACEOF
17520
17521fi
17522
c0d27fcc 17523echo "$as_me:$LINENO: checking for size_t" >&5
503d2be0
AS
17524echo $ECHO_N "checking for size_t... $ECHO_C" >&6
17525if test "${ac_cv_type_size_t+set}" = set; then
17526 echo $ECHO_N "(cached) $ECHO_C" >&6
8730a8da 17527else
503d2be0 17528 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 17529#line $LINENO "configure"
cd958eb3
MB
17530/* confdefs.h. */
17531_ACEOF
17532cat confdefs.h >>conftest.$ac_ext
17533cat >>conftest.$ac_ext <<_ACEOF
17534/* end confdefs.h. */
503d2be0
AS
17535$ac_includes_default
17536int
17537main ()
17538{
17539if ((size_t *) 0)
17540 return 0;
17541if (sizeof (size_t))
17542 return 0;
17543 ;
17544 return 0;
17545}
17546_ACEOF
17547rm -f conftest.$ac_objext
c0d27fcc 17548if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
17549 (eval $ac_compile) 2>&5
17550 ac_status=$?
c0d27fcc 17551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
17552 (exit $ac_status); } &&
17553 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 17554 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
17555 (eval $ac_try) 2>&5
17556 ac_status=$?
c0d27fcc 17557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 17558 (exit $ac_status); }; }; then
8730a8da
DL
17559 ac_cv_type_size_t=yes
17560else
503d2be0 17561 echo "$as_me: failed program was:" >&5
cd958eb3
MB
17562sed 's/^/| /' conftest.$ac_ext >&5
17563
503d2be0 17564ac_cv_type_size_t=no
8730a8da 17565fi
503d2be0 17566rm -f conftest.$ac_objext conftest.$ac_ext
8730a8da 17567fi
c0d27fcc 17568echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
503d2be0
AS
17569echo "${ECHO_T}$ac_cv_type_size_t" >&6
17570if test $ac_cv_type_size_t = yes; then
503d2be0 17571
c0d27fcc
MR
17572cat >>confdefs.h <<_ACEOF
17573#define HAVE_SIZE_T 1
17574_ACEOF
17575
8730a8da
DL
17576
17577fi
17578
c0d27fcc 17579
22044edf
DL
17580echo "$as_me:$LINENO: checking for C restrict keyword" >&5
17581echo $ECHO_N "checking for C restrict keyword... $ECHO_C" >&6
17582if test "${emacs_cv_c_restrict+set}" = set; then
17583 echo $ECHO_N "(cached) $ECHO_C" >&6
17584else
17585 cat >conftest.$ac_ext <<_ACEOF
17586#line $LINENO "configure"
cd958eb3
MB
17587/* confdefs.h. */
17588_ACEOF
17589cat confdefs.h >>conftest.$ac_ext
17590cat >>conftest.$ac_ext <<_ACEOF
17591/* end confdefs.h. */
22044edf
DL
17592void fred (int *restrict x);
17593int
17594main ()
17595{
b936fae4 17596
22044edf
DL
17597 ;
17598 return 0;
17599}
c0d27fcc 17600_ACEOF
22044edf
DL
17601rm -f conftest.$ac_objext
17602if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17603 (eval $ac_compile) 2>&5
17604 ac_status=$?
17605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17606 (exit $ac_status); } &&
17607 { ac_try='test -s conftest.$ac_objext'
17608 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17609 (eval $ac_try) 2>&5
17610 ac_status=$?
17611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17612 (exit $ac_status); }; }; then
17613 emacs_cv_c_restrict=yes
17614else
17615 echo "$as_me: failed program was:" >&5
cd958eb3
MB
17616sed 's/^/| /' conftest.$ac_ext >&5
17617
22044edf
DL
17618cat >conftest.$ac_ext <<_ACEOF
17619#line $LINENO "configure"
cd958eb3
MB
17620/* confdefs.h. */
17621_ACEOF
17622cat confdefs.h >>conftest.$ac_ext
17623cat >>conftest.$ac_ext <<_ACEOF
17624/* end confdefs.h. */
22044edf
DL
17625void fred (int *__restrict x);
17626int
17627main ()
17628{
c0d27fcc 17629
22044edf
DL
17630 ;
17631 return 0;
17632}
c0d27fcc 17633_ACEOF
22044edf
DL
17634rm -f conftest.$ac_objext
17635if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17636 (eval $ac_compile) 2>&5
17637 ac_status=$?
17638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17639 (exit $ac_status); } &&
17640 { ac_try='test -s conftest.$ac_objext'
17641 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17642 (eval $ac_try) 2>&5
17643 ac_status=$?
17644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17645 (exit $ac_status); }; }; then
17646 emacs_cv_c_restrict=__restrict
17647else
17648 echo "$as_me: failed program was:" >&5
cd958eb3
MB
17649sed 's/^/| /' conftest.$ac_ext >&5
17650
22044edf 17651emacs_cv_c_restrict=no
ba4481b5 17652fi
22044edf 17653rm -f conftest.$ac_objext conftest.$ac_ext
ba4481b5 17654fi
22044edf 17655rm -f conftest.$ac_objext conftest.$ac_ext
ba4481b5 17656fi
22044edf
DL
17657echo "$as_me:$LINENO: result: $emacs_cv_c_restrict" >&5
17658echo "${ECHO_T}$emacs_cv_c_restrict" >&6
17659case "$emacs_cv_c_restrict" in
17660 yes) emacs_restrict=restrict;;
17661 no) emacs_restrict="";;
17662 *) emacs_restrict="$emacs_cv_c_restrict";;
17663esac
17664if test "$emacs_restrict" != __restrict; then
b936fae4 17665
22044edf
DL
17666cat >>confdefs.h <<_ACEOF
17667#define __restrict $emacs_restrict
c0d27fcc 17668_ACEOF
ba4481b5
DL
17669
17670fi
ba4481b5 17671
22044edf
DL
17672echo "$as_me:$LINENO: checking for C restricted array declarations" >&5
17673echo $ECHO_N "checking for C restricted array declarations... $ECHO_C" >&6
17674if test "${emacs_cv_c_restrict_arr+set}" = set; then
17675 echo $ECHO_N "(cached) $ECHO_C" >&6
17676else
17677 cat >conftest.$ac_ext <<_ACEOF
17678#line $LINENO "configure"
cd958eb3
MB
17679/* confdefs.h. */
17680_ACEOF
17681cat confdefs.h >>conftest.$ac_ext
17682cat >>conftest.$ac_ext <<_ACEOF
17683/* end confdefs.h. */
22044edf
DL
17684void fred (int x[__restrict]);
17685int
17686main ()
17687{
b936fae4 17688
22044edf
DL
17689 ;
17690 return 0;
17691}
c0d27fcc 17692_ACEOF
22044edf
DL
17693rm -f conftest.$ac_objext
17694if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17695 (eval $ac_compile) 2>&5
17696 ac_status=$?
17697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17698 (exit $ac_status); } &&
17699 { ac_try='test -s conftest.$ac_objext'
17700 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17701 (eval $ac_try) 2>&5
17702 ac_status=$?
17703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17704 (exit $ac_status); }; }; then
17705 emacs_cv_c_restrict_arr=yes
17706else
17707 echo "$as_me: failed program was:" >&5
cd958eb3
MB
17708sed 's/^/| /' conftest.$ac_ext >&5
17709
22044edf 17710emacs_cv_c_restrict_arr=no
ba4481b5 17711fi
22044edf
DL
17712rm -f conftest.$ac_objext conftest.$ac_ext
17713fi
17714echo "$as_me:$LINENO: result: $emacs_cv_c_restrict_arr" >&5
17715echo "${ECHO_T}$emacs_cv_c_restrict_arr" >&6
17716if test "$emacs_cv_c_restrict_arr" = yes; then
b936fae4 17717
c0d27fcc 17718cat >>confdefs.h <<\_ACEOF
22044edf 17719#define __restrict_arr __restrict
c0d27fcc 17720_ACEOF
ba4481b5 17721
ba4481b5
DL
17722fi
17723
c0d27fcc 17724
f0f2756d
SS
17725for ac_header in nlist.h
17726do
17727as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
17728if eval "test \"\${$as_ac_Header+set}\" = set"; then
17729 echo "$as_me:$LINENO: checking for $ac_header" >&5
f0f2756d
SS
17730echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17731if eval "test \"\${$as_ac_Header+set}\" = set"; then
17732 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
17733fi
17734echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
17735echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 17736else
c0d27fcc
MR
17737 # Is the header compilable?
17738echo "$as_me:$LINENO: checking $ac_header usability" >&5
17739echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
17740cat >conftest.$ac_ext <<_ACEOF
17741#line $LINENO "configure"
cd958eb3
MB
17742/* confdefs.h. */
17743_ACEOF
17744cat confdefs.h >>conftest.$ac_ext
17745cat >>conftest.$ac_ext <<_ACEOF
17746/* end confdefs.h. */
c0d27fcc
MR
17747$ac_includes_default
17748#include <$ac_header>
17749_ACEOF
17750rm -f conftest.$ac_objext
17751if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17752 (eval $ac_compile) 2>&5
17753 ac_status=$?
17754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17755 (exit $ac_status); } &&
17756 { ac_try='test -s conftest.$ac_objext'
17757 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17758 (eval $ac_try) 2>&5
17759 ac_status=$?
17760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17761 (exit $ac_status); }; }; then
17762 ac_header_compiler=yes
17763else
17764 echo "$as_me: failed program was:" >&5
cd958eb3
MB
17765sed 's/^/| /' conftest.$ac_ext >&5
17766
c0d27fcc
MR
17767ac_header_compiler=no
17768fi
17769rm -f conftest.$ac_objext conftest.$ac_ext
17770echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17771echo "${ECHO_T}$ac_header_compiler" >&6
17772
17773# Is the header present?
17774echo "$as_me:$LINENO: checking $ac_header presence" >&5
17775echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
17776cat >conftest.$ac_ext <<_ACEOF
17777#line $LINENO "configure"
cd958eb3
MB
17778/* confdefs.h. */
17779_ACEOF
17780cat confdefs.h >>conftest.$ac_ext
17781cat >>conftest.$ac_ext <<_ACEOF
17782/* end confdefs.h. */
f0f2756d
SS
17783#include <$ac_header>
17784_ACEOF
c0d27fcc 17785if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
f0f2756d
SS
17786 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17787 ac_status=$?
6bae0ccf 17788 grep -v '^ *+' conftest.er1 >conftest.err
f0f2756d
SS
17789 rm -f conftest.er1
17790 cat conftest.err >&5
c0d27fcc 17791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f0f2756d
SS
17792 (exit $ac_status); } >/dev/null; then
17793 if test -s conftest.err; then
17794 ac_cpp_err=$ac_c_preproc_warn_flag
17795 else
17796 ac_cpp_err=
17797 fi
17798else
17799 ac_cpp_err=yes
17800fi
17801if test -z "$ac_cpp_err"; then
c0d27fcc 17802 ac_header_preproc=yes
f0f2756d
SS
17803else
17804 echo "$as_me: failed program was:" >&5
cd958eb3
MB
17805sed 's/^/| /' conftest.$ac_ext >&5
17806
c0d27fcc 17807 ac_header_preproc=no
f0f2756d
SS
17808fi
17809rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
17810echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17811echo "${ECHO_T}$ac_header_preproc" >&6
17812
17813# So? What about this header?
17814case $ac_header_compiler:$ac_header_preproc in
17815 yes:no )
17816 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
17817echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
17818 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
17819echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
17820 (
17821 cat <<\_ASBOX
17822## ------------------------------------ ##
17823## Report this to bug-autoconf@gnu.org. ##
17824## ------------------------------------ ##
17825_ASBOX
17826 ) |
17827 sed "s/^/$as_me: WARNING: /" >&2
17828 ;;
c0d27fcc
MR
17829 no:yes )
17830 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
17831echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
17832 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
17833echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
17834 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
cd958eb3
MB
17835echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
17836 (
17837 cat <<\_ASBOX
17838## ------------------------------------ ##
17839## Report this to bug-autoconf@gnu.org. ##
17840## ------------------------------------ ##
17841_ASBOX
17842 ) |
17843 sed "s/^/$as_me: WARNING: /" >&2
17844 ;;
c0d27fcc
MR
17845esac
17846echo "$as_me:$LINENO: checking for $ac_header" >&5
17847echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17848if eval "test \"\${$as_ac_Header+set}\" = set"; then
17849 echo $ECHO_N "(cached) $ECHO_C" >&6
17850else
17851 eval "$as_ac_Header=$ac_header_preproc"
f0f2756d 17852fi
c0d27fcc 17853echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
f0f2756d 17854echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
17855
17856fi
f0f2756d 17857if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 17858 cat >>confdefs.h <<_ACEOF
f0f2756d 17859#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 17860_ACEOF
f0f2756d 17861
c0d27fcc 17862cat >>confdefs.h <<\_ACEOF
f0f2756d 17863#define NLIST_STRUCT 1
c0d27fcc 17864_ACEOF
f0f2756d
SS
17865
17866fi
c0d27fcc 17867
f0f2756d
SS
17868done
17869
c0d27fcc
MR
17870
17871
17872
22044edf
DL
17873# Set up the CFLAGS for real compilation, so we can substitute it.
17874CFLAGS="$REAL_CFLAGS"
17875CPPFLAGS="$REAL_CPPFLAGS"
17876
17877#### Find out which version of Emacs this is.
17878version=`grep 'defconst[ ]*emacs-version' ${srcdir}/lisp/version.el \
17879 | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`
17880if test x"${version}" = x; then
17881 { { echo "$as_me:$LINENO: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." >&5
17882echo "$as_me: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." >&2;}
17883 { (exit 1); exit 1; }; }
17884fi
17885
17886### Specify what sort of things we'll be editing into Makefile and config.h.
17887### Use configuration here uncanonicalized to avoid exceeding size limits.
17888
17889
17890
17891
17892
17893
17894
17895
17896
17897
17898
17899
17900
17901
17902
17903
17904
17905
17906
17907
17908
17909
17910
17911
17912
17913
17914
17915
17916
17917
17918
17919
6a3a24fa 17920
22044edf
DL
17921
17922
17923cat >>confdefs.h <<_ACEOF
17924#define EMACS_CONFIGURATION "${canonical}"
17925_ACEOF
17926
17927
17928cat >>confdefs.h <<_ACEOF
17929#define EMACS_CONFIG_OPTIONS "${ac_configure_args}"
17930_ACEOF
17931
17932
17933cat >>confdefs.h <<_ACEOF
17934#define config_machfile "${machfile}"
17935_ACEOF
17936
17937
17938cat >>confdefs.h <<_ACEOF
17939#define config_opsysfile "${opsysfile}"
17940_ACEOF
17941
17942
17943cat >>confdefs.h <<_ACEOF
17944#define LD_SWITCH_X_SITE ${LD_SWITCH_X_SITE}
17945_ACEOF
17946
17947
17948cat >>confdefs.h <<_ACEOF
17949#define LD_SWITCH_X_SITE_AUX ${LD_SWITCH_X_SITE_AUX}
17950_ACEOF
17951
17952
17953cat >>confdefs.h <<_ACEOF
17954#define C_SWITCH_X_SITE ${C_SWITCH_X_SITE}
17955_ACEOF
17956
17957
17958cat >>confdefs.h <<_ACEOF
17959#define UNEXEC_SRC ${UNEXEC_SRC}
17960_ACEOF
17961
17962
17963if test "${HAVE_X_WINDOWS}" = "yes" ; then
17964
17965cat >>confdefs.h <<\_ACEOF
17966#define HAVE_X_WINDOWS 1
17967_ACEOF
17968
17969fi
17970if test "${USE_X_TOOLKIT}" != "none" ; then
17971
17972cat >>confdefs.h <<\_ACEOF
17973#define USE_X_TOOLKIT 1
17974_ACEOF
17975
17976fi
17977if test "${HAVE_X11}" = "yes" ; then
17978
17979cat >>confdefs.h <<\_ACEOF
17980#define HAVE_X11 1
17981_ACEOF
17982
17983fi
17984if test "${HAVE_XFREE386}" = "yes" ; then
17985
17986cat >>confdefs.h <<\_ACEOF
17987#define HAVE_XFREE386 1
17988_ACEOF
17989
17990fi
17991if test "${HAVE_MENUS}" = "yes" ; then
17992
17993cat >>confdefs.h <<\_ACEOF
17994#define HAVE_MENUS 1
17995_ACEOF
17996
17997fi
17998if test "${GNU_MALLOC}" = "yes" ; then
17999
18000cat >>confdefs.h <<\_ACEOF
18001#define GNU_MALLOC 1
18002_ACEOF
18003
18004fi
18005if test "${REL_ALLOC}" = "yes" ; then
18006
18007cat >>confdefs.h <<\_ACEOF
18008#define REL_ALLOC 1
18009_ACEOF
18010
18011fi
18012
18013
18014
c0d27fcc
MR
18015
18016
ba4481b5 18017#### Report on what we decided to do.
488dd4c4
JD
18018#### Report GTK as a toolkit, even if it doesn't use Xt.
18019#### It makes printing result more understandable as using GTK sets
18020#### toolkit_scroll_bars to yes by default.
18021if test "${HAVE_GTK}" = "yes"; then
18022 USE_X_TOOLKIT=GTK
18023fi
18024
ba4481b5
DL
18025echo "
18026Configured for \`${canonical}'.
18027
18028 Where should the build process find the source code? ${srcdir}
18029 What operating system and machine description files should Emacs use?
18030 \`${opsysfile}' and \`${machfile}'
18031 What compiler should emacs be built with? ${CC} ${CFLAGS}
18032 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
73b77ee5 18033 Should Emacs use a relocating allocator for buffers? ${REL_ALLOC}
ef9e4345 18034 Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers
ba4481b5 18035 What window system should Emacs use? ${window_system}
8e967cf7 18036 What toolkit should Emacs use? ${USE_X_TOOLKIT}"
ba4481b5
DL
18037
18038if test -n "${x_includes}"; then
18039echo " Where do we find X Windows header files? ${x_includes}"
18040else
18041echo " Where do we find X Windows header files? Standard dirs"
18042fi
18043if test -n "${x_libraries}"; then
18044echo " Where do we find X Windows libraries? ${x_libraries}"
18045else
18046echo " Where do we find X Windows libraries? Standard dirs"
18047fi
18048
18049echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}"
18050echo " Does Emacs use -lXpm? ${HAVE_XPM}"
18051echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
18052echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
18053echo " Does Emacs use -lungif? ${HAVE_GIF}"
18054echo " Does Emacs use -lpng? ${HAVE_PNG}"
18055echo " Does Emacs use X toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}"
18056echo
18057
18058# Remove any trailing slashes in these variables.
18059test "${prefix}" != NONE &&
18060 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
18061test "${exec_prefix}" != NONE &&
18062 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
18063
d0e9bfd2
GM
18064## Check if the C preprocessor will convert `..' to `. .'. If so, set
18065## CPP_NEED_TRADITIONAL to `yes' so that the code to generate Makefile
18066## from Makefile.c can correctly provide the arg `-traditional' to the
18067## C preprocessor.
18068
503d2be0 18069cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 18070#line $LINENO "configure"
cd958eb3
MB
18071/* confdefs.h. */
18072_ACEOF
18073cat confdefs.h >>conftest.$ac_ext
18074cat >>conftest.$ac_ext <<_ACEOF
18075/* end confdefs.h. */
d0e9bfd2 18076yes..yes
503d2be0 18077_ACEOF
d0e9bfd2 18078if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 18079 $EGREP "yes..yes" >/dev/null 2>&1; then
d0e9bfd2
GM
18080 CPP_NEED_TRADITIONAL=no
18081else
d0e9bfd2
GM
18082 CPP_NEED_TRADITIONAL=yes
18083fi
18084rm -f conftest*
18085
c0d27fcc 18086
6bae0ccf
DL
18087 ac_config_files="$ac_config_files Makefile lib-src/Makefile.c:lib-src/Makefile.in oldXMenu/Makefile man/Makefile lwlib/Makefile src/Makefile.c:src/Makefile.in lisp/Makefile lispref/Makefile lispintro/Makefile leim/Makefile"
18088 ac_config_commands="$ac_config_commands default"
503d2be0 18089cat >confcache <<\_ACEOF
ba4481b5
DL
18090# This file is a shell script that caches the results of configure
18091# tests run on this system so they can be shared between configure
503d2be0
AS
18092# scripts and configure runs, see configure's option --config-cache.
18093# It is not useful on other systems. If it contains results you don't
18094# want to keep, you may remove or edit it.
ba4481b5 18095#
503d2be0
AS
18096# config.status only pays attention to the cache file if you give it
18097# the --recheck option to rerun configure.
ba4481b5 18098#
6bae0ccf 18099# `ac_cv_env_foo' variables (set or unset) will be overridden when
503d2be0
AS
18100# loading this file, other *unset* `ac_cv_foo' will be assigned the
18101# following values.
18102
18103_ACEOF
18104
ba4481b5
DL
18105# The following way of writing the cache mishandles newlines in values,
18106# but we know of no workaround that is simple, portable, and efficient.
18107# So, don't put newlines in cache variables' values.
18108# Ultrix sh set writes to stderr and can't be redirected directly,
18109# and sets the high bit in the cache file unless we assign to the vars.
503d2be0
AS
18110{
18111 (set) 2>&1 |
18112 case `(ac_space=' '; set | grep ac_space) 2>&1` in
18113 *ac_space=\ *)
18114 # `set' does not quote correctly, so add quotes (double-quote
18115 # substitution turns \\\\ into \\, and sed turns \\ into \).
18116 sed -n \
18117 "s/'/'\\\\''/g;
18118 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
18119 ;;
18120 *)
18121 # `set' quotes correctly as required by POSIX, so do not add quotes.
18122 sed -n \
18123 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
18124 ;;
18125 esac;
18126} |
18127 sed '
18128 t clear
18129 : clear
18130 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
18131 t end
18132 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18133 : end' >>confcache
cd958eb3 18134if diff $cache_file confcache >/dev/null 2>&1; then :; else
ba4481b5 18135 if test -w $cache_file; then
503d2be0
AS
18136 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
18137 cat confcache >$cache_file
ba4481b5
DL
18138 else
18139 echo "not updating unwritable cache $cache_file"
18140 fi
18141fi
18142rm -f confcache
18143
ba4481b5
DL
18144test "x$prefix" = xNONE && prefix=$ac_default_prefix
18145# Let make expand exec_prefix.
18146test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
18147
503d2be0
AS
18148# VPATH may cause trouble with some makes, so we remove $(srcdir),
18149# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
18150# trailing colons and then remove the whole line if VPATH becomes empty
18151# (actually we leave an empty line to preserve line numbers).
ba4481b5 18152if test "x$srcdir" = x.; then
503d2be0
AS
18153 ac_vpsub='/^[ ]*VPATH[ ]*=/{
18154s/:*\$(srcdir):*/:/;
18155s/:*\${srcdir}:*/:/;
18156s/:*@srcdir@:*/:/;
18157s/^\([^=]*=[ ]*\):*/\1/;
18158s/:*$//;
18159s/^[^=]*=[ ]*$//;
18160}'
ba4481b5
DL
18161fi
18162
ba4481b5
DL
18163DEFS=-DHAVE_CONFIG_H
18164
6bae0ccf
DL
18165ac_libobjs=
18166ac_ltlibobjs=
18167for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
18168 # 1. Remove the extension, and $U if already installed.
18169 ac_i=`echo "$ac_i" |
18170 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
18171 # 2. Add them.
18172 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
18173 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
18174done
18175LIBOBJS=$ac_libobjs
18176
18177LTLIBOBJS=$ac_ltlibobjs
18178
18179
c0d27fcc 18180
ba4481b5 18181: ${CONFIG_STATUS=./config.status}
503d2be0
AS
18182ac_clean_files_save=$ac_clean_files
18183ac_clean_files="$ac_clean_files $CONFIG_STATUS"
c0d27fcc 18184{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
503d2be0
AS
18185echo "$as_me: creating $CONFIG_STATUS" >&6;}
18186cat >$CONFIG_STATUS <<_ACEOF
18187#! $SHELL
c0d27fcc 18188# Generated by $as_me.
ba4481b5 18189# Run this file to recreate the current configuration.
ba4481b5 18190# Compiler output produced by configure, useful for debugging
503d2be0 18191# configure, is in config.log if it exists.
ba4481b5 18192
503d2be0 18193debug=false
cd958eb3
MB
18194ac_cs_recheck=false
18195ac_cs_silent=false
503d2be0 18196SHELL=\${CONFIG_SHELL-$SHELL}
503d2be0
AS
18197_ACEOF
18198
18199cat >>$CONFIG_STATUS <<\_ACEOF
c0d27fcc
MR
18200## --------------------- ##
18201## M4sh Initialization. ##
18202## --------------------- ##
18203
503d2be0
AS
18204# Be Bourne compatible
18205if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
18206 emulate sh
18207 NULLCMD=:
6bae0ccf
DL
18208 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
18209 # is contrary to our usage. Disable this feature.
18210 alias -g '${1+"$@"}'='"$@"'
503d2be0
AS
18211elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
18212 set -o posix
18213fi
18214
c0d27fcc
MR
18215# Support unset when possible.
18216if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
18217 as_unset=unset
18218else
18219 as_unset=false
18220fi
18221
6bae0ccf
DL
18222
18223# Work around bugs in pre-3.0 UWIN ksh.
18224$as_unset ENV MAIL MAILPATH
18225PS1='$ '
18226PS2='> '
18227PS4='+ '
18228
18229# NLS nuisances.
cd958eb3
MB
18230for as_var in \
18231 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
18232 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
18233 LC_TELEPHONE LC_TIME
6bae0ccf
DL
18234do
18235 if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
18236 eval $as_var=C; export $as_var
18237 else
18238 $as_unset $as_var
18239 fi
18240done
18241
18242# Required to use basename.
18243if expr a : '\(a\)' >/dev/null 2>&1; then
18244 as_expr=expr
18245else
18246 as_expr=false
18247fi
18248
18249if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
18250 as_basename=basename
18251else
18252 as_basename=false
18253fi
c0d27fcc
MR
18254
18255
503d2be0 18256# Name of the executable.
6bae0ccf 18257as_me=`$as_basename "$0" ||
c0d27fcc
MR
18258$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
18259 X"$0" : 'X\(//\)$' \| \
18260 X"$0" : 'X\(/\)$' \| \
18261 . : '\(.\)' 2>/dev/null ||
18262echo X/"$0" |
18263 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
18264 /^X\/\(\/\/\)$/{ s//\1/; q; }
18265 /^X\/\(\/\).*/{ s//\1/; q; }
18266 s/.*/./; q'`
18267
6bae0ccf 18268
c0d27fcc
MR
18269# PATH needs CR, and LINENO needs CR and PATH.
18270# Avoid depending upon Character Ranges.
18271as_cr_letters='abcdefghijklmnopqrstuvwxyz'
18272as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
18273as_cr_Letters=$as_cr_letters$as_cr_LETTERS
18274as_cr_digits='0123456789'
18275as_cr_alnum=$as_cr_Letters$as_cr_digits
18276
18277# The user is always right.
18278if test "${PATH_SEPARATOR+set}" != set; then
cd958eb3
MB
18279 echo "#! /bin/sh" >conf$$.sh
18280 echo "exit 0" >>conf$$.sh
18281 chmod +x conf$$.sh
18282 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
c0d27fcc
MR
18283 PATH_SEPARATOR=';'
18284 else
18285 PATH_SEPARATOR=:
18286 fi
cd958eb3 18287 rm -f conf$$.sh
c0d27fcc
MR
18288fi
18289
18290
18291 as_lineno_1=$LINENO
18292 as_lineno_2=$LINENO
18293 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
18294 test "x$as_lineno_1" != "x$as_lineno_2" &&
18295 test "x$as_lineno_3" = "x$as_lineno_2" || {
18296 # Find who we are. Look in the path if we contain no path at all
18297 # relative or not.
18298 case $0 in
18299 *[\\/]* ) as_myself=$0 ;;
18300 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18301for as_dir in $PATH
18302do
18303 IFS=$as_save_IFS
18304 test -z "$as_dir" && as_dir=.
18305 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
18306done
18307
18308 ;;
18309 esac
18310 # We did not find ourselves, most probably we were run as `sh COMMAND'
18311 # in which case we are not to be found in the path.
18312 if test "x$as_myself" = x; then
18313 as_myself=$0
18314 fi
18315 if test ! -f "$as_myself"; then
18316 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
18317echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
18318 { (exit 1); exit 1; }; }
18319 fi
18320 case $CONFIG_SHELL in
18321 '')
18322 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18323for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
18324do
18325 IFS=$as_save_IFS
18326 test -z "$as_dir" && as_dir=.
18327 for as_base in sh bash ksh sh5; do
18328 case $as_dir in
18329 /*)
18330 if ("$as_dir/$as_base" -c '
18331 as_lineno_1=$LINENO
18332 as_lineno_2=$LINENO
18333 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
18334 test "x$as_lineno_1" != "x$as_lineno_2" &&
18335 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
6bae0ccf
DL
18336 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
18337 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
c0d27fcc
MR
18338 CONFIG_SHELL=$as_dir/$as_base
18339 export CONFIG_SHELL
18340 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
18341 fi;;
18342 esac
18343 done
18344done
18345;;
18346 esac
18347
18348 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
18349 # uniformly replaced by the line number. The first 'sed' inserts a
18350 # line-number line before each line; the second 'sed' does the real
18351 # work. The second script uses 'N' to pair each line-number line
18352 # with the numbered line, and appends trailing '-' during
18353 # substitution so that $LINENO is not a special case at line end.
18354 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
18355 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
18356 sed '=' <$as_myself |
18357 sed '
18358 N
18359 s,$,-,
18360 : loop
18361 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
18362 t loop
18363 s,-$,,
18364 s,^['$as_cr_digits']*\n,,
18365 ' >$as_me.lineno &&
18366 chmod +x $as_me.lineno ||
18367 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
18368echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
18369 { (exit 1); exit 1; }; }
18370
18371 # Don't try to exec as it changes $[0], causing all sort of problems
18372 # (the dirname of $[0] is not the place where we might find the
18373 # original and so on. Autoconf is especially sensible to this).
18374 . ./$as_me.lineno
18375 # Exit status is that of the last command.
18376 exit
18377}
18378
18379
18380case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
18381 *c*,-n*) ECHO_N= ECHO_C='
18382' ECHO_T=' ' ;;
18383 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
18384 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
18385esac
503d2be0
AS
18386
18387if expr a : '\(a\)' >/dev/null 2>&1; then
18388 as_expr=expr
18389else
18390 as_expr=false
18391fi
18392
18393rm -f conf$$ conf$$.exe conf$$.file
18394echo >conf$$.file
18395if ln -s conf$$.file conf$$ 2>/dev/null; then
18396 # We could just check for DJGPP; but this test a) works b) is more generic
18397 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
18398 if test -f conf$$.exe; then
18399 # Don't use ln at all; we don't have any links
18400 as_ln_s='cp -p'
18401 else
18402 as_ln_s='ln -s'
18403 fi
18404elif ln conf$$.file conf$$ 2>/dev/null; then
18405 as_ln_s=ln
18406else
18407 as_ln_s='cp -p'
18408fi
18409rm -f conf$$ conf$$.exe conf$$.file
18410
6bae0ccf
DL
18411if mkdir -p . 2>/dev/null; then
18412 as_mkdir_p=:
18413else
18414 as_mkdir_p=false
18415fi
18416
503d2be0
AS
18417as_executable_p="test -f"
18418
c0d27fcc
MR
18419# Sed expression to map a string onto a valid CPP name.
18420as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
18421
18422# Sed expression to map a string onto a valid variable name.
18423as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
503d2be0 18424
503d2be0
AS
18425
18426# IFS
18427# We need space, tab and new line, in precisely that order.
18428as_nl='
18429'
18430IFS=" $as_nl"
18431
18432# CDPATH.
6bae0ccf 18433$as_unset CDPATH
503d2be0
AS
18434
18435exec 6>&1
18436
c0d27fcc
MR
18437# Open the log real soon, to keep \$[0] and so on meaningful, and to
18438# report actual input values of CONFIG_FILES etc. instead of their
18439# values after options handling. Logging --version etc. is OK.
18440exec 5>>config.log
18441{
18442 echo
18443 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18444## Running $as_me. ##
18445_ASBOX
18446} >&5
18447cat >&5 <<_CSEOF
18448
18449This file was extended by $as_me, which was
9e71690e 18450generated by GNU Autoconf 2.57. Invocation command line was
c0d27fcc
MR
18451
18452 CONFIG_FILES = $CONFIG_FILES
18453 CONFIG_HEADERS = $CONFIG_HEADERS
18454 CONFIG_LINKS = $CONFIG_LINKS
18455 CONFIG_COMMANDS = $CONFIG_COMMANDS
18456 $ $0 $@
18457
18458_CSEOF
18459echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
18460echo >&5
503d2be0
AS
18461_ACEOF
18462
18463# Files that config.status was made for.
18464if test -n "$ac_config_files"; then
18465 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
18466fi
18467
18468if test -n "$ac_config_headers"; then
18469 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
18470fi
18471
18472if test -n "$ac_config_links"; then
18473 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
18474fi
18475
18476if test -n "$ac_config_commands"; then
18477 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
18478fi
18479
c0d27fcc 18480cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
18481
18482ac_cs_usage="\
18483\`$as_me' instantiates files from templates according to the
18484current configuration.
18485
18486Usage: $0 [OPTIONS] [FILE]...
18487
18488 -h, --help print this help, then exit
18489 -V, --version print version number, then exit
cd958eb3 18490 -q, --quiet do not print progress messages
503d2be0
AS
18491 -d, --debug don't remove temporary files
18492 --recheck update $as_me by reconfiguring in the same conditions
18493 --file=FILE[:TEMPLATE]
18494 instantiate the configuration file FILE
18495 --header=FILE[:TEMPLATE]
18496 instantiate the configuration header FILE
18497
18498Configuration files:
18499$config_files
18500
18501Configuration headers:
18502$config_headers
18503
18504Configuration commands:
18505$config_commands
18506
18507Report bugs to <bug-autoconf@gnu.org>."
c0d27fcc 18508_ACEOF
503d2be0 18509
c0d27fcc 18510cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
18511ac_cs_version="\\
18512config.status
9e71690e 18513configured by $0, generated by GNU Autoconf 2.57,
503d2be0
AS
18514 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
18515
18516Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
18517Free Software Foundation, Inc.
18518This config.status script is free software; the Free Software Foundation
18519gives unlimited permission to copy, distribute and modify it."
18520srcdir=$srcdir
18521INSTALL="$INSTALL"
c0d27fcc 18522_ACEOF
503d2be0 18523
c0d27fcc 18524cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
18525# If no file are specified by the user, then we need to provide default
18526# value. By we need to know if files were specified by the user.
18527ac_need_defaults=:
18528while test $# != 0
ba4481b5 18529do
503d2be0
AS
18530 case $1 in
18531 --*=*)
18532 ac_option=`expr "x$1" : 'x\([^=]*\)='`
18533 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
6bae0ccf
DL
18534 ac_shift=:
18535 ;;
18536 -*)
18537 ac_option=$1
18538 ac_optarg=$2
18539 ac_shift=shift
503d2be0 18540 ;;
503d2be0
AS
18541 *) # This is not an option, so the user has probably given explicit
18542 # arguments.
6bae0ccf 18543 ac_option=$1
503d2be0
AS
18544 ac_need_defaults=false;;
18545 esac
18546
6bae0ccf 18547 case $ac_option in
503d2be0 18548 # Handling of the options.
c0d27fcc 18549_ACEOF
c0d27fcc 18550cat >>$CONFIG_STATUS <<\_ACEOF
cd958eb3
MB
18551 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18552 ac_cs_recheck=: ;;
503d2be0
AS
18553 --version | --vers* | -V )
18554 echo "$ac_cs_version"; exit 0 ;;
18555 --he | --h)
18556 # Conflict between --help and --header
c0d27fcc 18557 { { echo "$as_me:$LINENO: error: ambiguous option: $1
503d2be0
AS
18558Try \`$0 --help' for more information." >&5
18559echo "$as_me: error: ambiguous option: $1
18560Try \`$0 --help' for more information." >&2;}
18561 { (exit 1); exit 1; }; };;
18562 --help | --hel | -h )
18563 echo "$ac_cs_usage"; exit 0 ;;
18564 --debug | --d* | -d )
18565 debug=: ;;
18566 --file | --fil | --fi | --f )
6bae0ccf
DL
18567 $ac_shift
18568 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
503d2be0
AS
18569 ac_need_defaults=false;;
18570 --header | --heade | --head | --hea )
6bae0ccf
DL
18571 $ac_shift
18572 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
503d2be0 18573 ac_need_defaults=false;;
cd958eb3
MB
18574 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18575 | -silent | --silent | --silen | --sile | --sil | --si | --s)
18576 ac_cs_silent=: ;;
503d2be0
AS
18577
18578 # This is an error.
c0d27fcc 18579 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
503d2be0
AS
18580Try \`$0 --help' for more information." >&5
18581echo "$as_me: error: unrecognized option: $1
18582Try \`$0 --help' for more information." >&2;}
18583 { (exit 1); exit 1; }; } ;;
18584
18585 *) ac_config_targets="$ac_config_targets $1" ;;
18586
ba4481b5 18587 esac
503d2be0 18588 shift
ba4481b5
DL
18589done
18590
cd958eb3
MB
18591ac_configure_extra_args=
18592
18593if $ac_cs_silent; then
18594 exec 6>/dev/null
18595 ac_configure_extra_args="$ac_configure_extra_args --silent"
18596fi
18597
18598_ACEOF
18599cat >>$CONFIG_STATUS <<_ACEOF
18600if \$ac_cs_recheck; then
18601 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
18602 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
18603fi
18604
503d2be0 18605_ACEOF
ba4481b5 18606
c0d27fcc 18607cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
18608#
18609# INIT-COMMANDS section.
18610#
ba4481b5 18611
503d2be0
AS
18612GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPP_NEED_TRADITIONAL="$CPP_NEED_TRADITIONAL" CPPFLAGS="$CPPFLAGS"
18613
c0d27fcc
MR
18614_ACEOF
18615
503d2be0 18616
c0d27fcc
MR
18617
18618cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
18619for ac_config_target in $ac_config_targets
18620do
18621 case "$ac_config_target" in
18622 # Handling of arguments.
18623 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
18624 "lib-src/Makefile.c" ) CONFIG_FILES="$CONFIG_FILES lib-src/Makefile.c:lib-src/Makefile.in" ;;
18625 "oldXMenu/Makefile" ) CONFIG_FILES="$CONFIG_FILES oldXMenu/Makefile" ;;
18626 "man/Makefile" ) CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
18627 "lwlib/Makefile" ) CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;;
18628 "src/Makefile.c" ) CONFIG_FILES="$CONFIG_FILES src/Makefile.c:src/Makefile.in" ;;
18629 "lisp/Makefile" ) CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;;
23b24859 18630 "lispref/Makefile" ) CONFIG_FILES="$CONFIG_FILES lispref/Makefile" ;;
981626b7 18631 "lispintro/Makefile" ) CONFIG_FILES="$CONFIG_FILES lispintro/Makefile" ;;
503d2be0
AS
18632 "leim/Makefile" ) CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;;
18633 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
18634 "src/config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:src/config.in" ;;
c0d27fcc 18635 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
503d2be0
AS
18636echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
18637 { (exit 1); exit 1; }; };;
18638 esac
ba4481b5 18639done
503d2be0
AS
18640
18641# If the user did not use the arguments to specify the items to instantiate,
18642# then the envvar interface is used. Set only those that are not.
18643# We use the long form for the default assignment because of an extremely
18644# bizarre bug on SunOS 4.1.3.
18645if $ac_need_defaults; then
18646 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18647 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18648 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
ba4481b5 18649fi
503d2be0 18650
cd958eb3
MB
18651# Have a temporary directory for convenience. Make it in the build tree
18652# simply because there is no reason to put it here, and in addition,
18653# creating and moving files from /tmp can sometimes cause problems.
503d2be0
AS
18654# Create a temporary directory, and hook for its removal unless debugging.
18655$debug ||
18656{
18657 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
18658 trap '{ (exit 1); exit 1; }' 1 2 13 15
18659}
18660
18661# Create a (secure) tmp directory for tmp files.
cd958eb3 18662
503d2be0 18663{
cd958eb3 18664 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
503d2be0
AS
18665 test -n "$tmp" && test -d "$tmp"
18666} ||
18667{
cd958eb3 18668 tmp=./confstat$$-$RANDOM
503d2be0
AS
18669 (umask 077 && mkdir $tmp)
18670} ||
18671{
cd958eb3 18672 echo "$me: cannot create a temporary directory in ." >&2
503d2be0
AS
18673 { (exit 1); exit 1; }
18674}
18675
c0d27fcc 18676_ACEOF
503d2be0 18677
c0d27fcc 18678cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
18679
18680#
18681# CONFIG_FILES section.
18682#
18683
18684# No need to generate the scripts if there are no CONFIG_FILES.
18685# This happens for instance when ./config.status config.h
18686if test -n "\$CONFIG_FILES"; then
18687 # Protect against being on the right side of a sed subst in config.status.
18688 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
18689 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
18690s,@SHELL@,$SHELL,;t t
c0d27fcc
MR
18691s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
18692s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
18693s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
18694s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
18695s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
18696s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
503d2be0
AS
18697s,@exec_prefix@,$exec_prefix,;t t
18698s,@prefix@,$prefix,;t t
18699s,@program_transform_name@,$program_transform_name,;t t
18700s,@bindir@,$bindir,;t t
18701s,@sbindir@,$sbindir,;t t
18702s,@libexecdir@,$libexecdir,;t t
18703s,@datadir@,$datadir,;t t
18704s,@sysconfdir@,$sysconfdir,;t t
18705s,@sharedstatedir@,$sharedstatedir,;t t
18706s,@localstatedir@,$localstatedir,;t t
18707s,@libdir@,$libdir,;t t
18708s,@includedir@,$includedir,;t t
18709s,@oldincludedir@,$oldincludedir,;t t
18710s,@infodir@,$infodir,;t t
18711s,@mandir@,$mandir,;t t
503d2be0
AS
18712s,@build_alias@,$build_alias,;t t
18713s,@host_alias@,$host_alias,;t t
18714s,@target_alias@,$target_alias,;t t
c0d27fcc 18715s,@DEFS@,$DEFS,;t t
503d2be0
AS
18716s,@ECHO_C@,$ECHO_C,;t t
18717s,@ECHO_N@,$ECHO_N,;t t
18718s,@ECHO_T@,$ECHO_T,;t t
503d2be0
AS
18719s,@LIBS@,$LIBS,;t t
18720s,@build@,$build,;t t
18721s,@build_cpu@,$build_cpu,;t t
18722s,@build_vendor@,$build_vendor,;t t
18723s,@build_os@,$build_os,;t t
18724s,@host@,$host,;t t
18725s,@host_cpu@,$host_cpu,;t t
18726s,@host_vendor@,$host_vendor,;t t
18727s,@host_os@,$host_os,;t t
18728s,@CC@,$CC,;t t
18729s,@CFLAGS@,$CFLAGS,;t t
18730s,@LDFLAGS@,$LDFLAGS,;t t
18731s,@CPPFLAGS@,$CPPFLAGS,;t t
18732s,@ac_ct_CC@,$ac_ct_CC,;t t
18733s,@EXEEXT@,$EXEEXT,;t t
18734s,@OBJEXT@,$OBJEXT,;t t
18735s,@LN_S@,$LN_S,;t t
18736s,@CPP@,$CPP,;t t
18737s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
18738s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
18739s,@INSTALL_DATA@,$INSTALL_DATA,;t t
503d2be0
AS
18740s,@RANLIB@,$RANLIB,;t t
18741s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
9e71690e 18742s,@INSTALL_INFO@,$INSTALL_INFO,;t t
6bae0ccf 18743s,@EGREP@,$EGREP,;t t
503d2be0
AS
18744s,@LIBSOUND@,$LIBSOUND,;t t
18745s,@SET_MAKE@,$SET_MAKE,;t t
488dd4c4
JD
18746s,@PKG_CONFIG@,$PKG_CONFIG,;t t
18747s,@GTK_CFLAGS@,$GTK_CFLAGS,;t t
18748s,@GTK_LIBS@,$GTK_LIBS,;t t
503d2be0
AS
18749s,@ALLOCA@,$ALLOCA,;t t
18750s,@liblockfile@,$liblockfile,;t t
18751s,@LIBOBJS@,$LIBOBJS,;t t
18752s,@NEED_SETGID@,$NEED_SETGID,;t t
18753s,@KMEM_GROUP@,$KMEM_GROUP,;t t
18754s,@GETLOADAVG_LIBS@,$GETLOADAVG_LIBS,;t t
18755s,@version@,$version,;t t
18756s,@configuration@,$configuration,;t t
18757s,@canonical@,$canonical,;t t
18758s,@srcdir@,$srcdir,;t t
18759s,@lispdir@,$lispdir,;t t
18760s,@locallisppath@,$locallisppath,;t t
18761s,@lisppath@,$lisppath,;t t
18762s,@x_default_search_path@,$x_default_search_path,;t t
18763s,@etcdir@,$etcdir,;t t
18764s,@archlibdir@,$archlibdir,;t t
18765s,@docdir@,$docdir,;t t
18766s,@bitmapdir@,$bitmapdir,;t t
98418dba
CW
18767s,@gamedir@,$gamedir,;t t
18768s,@gameuser@,$gameuser,;t t
503d2be0
AS
18769s,@c_switch_system@,$c_switch_system,;t t
18770s,@c_switch_machine@,$c_switch_machine,;t t
18771s,@LD_SWITCH_X_SITE@,$LD_SWITCH_X_SITE,;t t
18772s,@LD_SWITCH_X_SITE_AUX@,$LD_SWITCH_X_SITE_AUX,;t t
18773s,@C_SWITCH_X_SITE@,$C_SWITCH_X_SITE,;t t
18774s,@X_TOOLKIT_TYPE@,$X_TOOLKIT_TYPE,;t t
18775s,@machfile@,$machfile,;t t
18776s,@opsysfile@,$opsysfile,;t t
6a3a24fa 18777s,@carbon_appdir@,$carbon_appdir,;t t
6bae0ccf 18778s,@LTLIBOBJS@,$LTLIBOBJS,;t t
503d2be0
AS
18779CEOF
18780
c0d27fcc 18781_ACEOF
ba4481b5 18782
c0d27fcc 18783 cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
18784 # Split the substitutions into bite-sized pieces for seds with
18785 # small command number limits, like on Digital OSF/1 and HP-UX.
18786 ac_max_sed_lines=48
18787 ac_sed_frag=1 # Number of current file.
18788 ac_beg=1 # First line for current file.
18789 ac_end=$ac_max_sed_lines # Line after last line for current file.
18790 ac_more_lines=:
18791 ac_sed_cmds=
18792 while $ac_more_lines; do
18793 if test $ac_beg -gt 1; then
18794 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18795 else
18796 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18797 fi
18798 if test ! -s $tmp/subs.frag; then
18799 ac_more_lines=false
18800 else
18801 # The purpose of the label and of the branching condition is to
18802 # speed up the sed processing (if there are no `@' at all, there
18803 # is no need to browse any of the substitutions).
18804 # These are the two extra sed commands mentioned above.
18805 (echo ':t
18806 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
18807 if test -z "$ac_sed_cmds"; then
18808 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
18809 else
18810 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
18811 fi
18812 ac_sed_frag=`expr $ac_sed_frag + 1`
18813 ac_beg=$ac_end
18814 ac_end=`expr $ac_end + $ac_max_sed_lines`
18815 fi
18816 done
18817 if test -z "$ac_sed_cmds"; then
18818 ac_sed_cmds=cat
18819 fi
18820fi # test -n "$CONFIG_FILES"
ba4481b5 18821
c0d27fcc
MR
18822_ACEOF
18823cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0 18824for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
ba4481b5 18825 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
503d2be0
AS
18826 case $ac_file in
18827 - | *:- | *:-:* ) # input from stdin
18828 cat >$tmp/stdin
18829 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18830 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18831 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18832 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18833 * ) ac_file_in=$ac_file.in ;;
ba4481b5
DL
18834 esac
18835
503d2be0 18836 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
c0d27fcc
MR
18837 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
18838$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
503d2be0
AS
18839 X"$ac_file" : 'X\(//\)[^/]' \| \
18840 X"$ac_file" : 'X\(//\)$' \| \
18841 X"$ac_file" : 'X\(/\)' \| \
18842 . : '\(.\)' 2>/dev/null ||
18843echo X"$ac_file" |
18844 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18845 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18846 /^X\(\/\/\)$/{ s//\1/; q; }
18847 /^X\(\/\).*/{ s//\1/; q; }
18848 s/.*/./; q'`
6bae0ccf
DL
18849 { if $as_mkdir_p; then
18850 mkdir -p "$ac_dir"
18851 else
18852 as_dir="$ac_dir"
18853 as_dirs=
18854 while test ! -d "$as_dir"; do
18855 as_dirs="$as_dir $as_dirs"
18856 as_dir=`(dirname "$as_dir") 2>/dev/null ||
18857$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18858 X"$as_dir" : 'X\(//\)[^/]' \| \
18859 X"$as_dir" : 'X\(//\)$' \| \
18860 X"$as_dir" : 'X\(/\)' \| \
18861 . : '\(.\)' 2>/dev/null ||
18862echo X"$as_dir" |
18863 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18864 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18865 /^X\(\/\/\)$/{ s//\1/; q; }
18866 /^X\(\/\).*/{ s//\1/; q; }
18867 s/.*/./; q'`
18868 done
18869 test ! -n "$as_dirs" || mkdir $as_dirs
18870 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
18871echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
18872 { (exit 1); exit 1; }; }; }
503d2be0 18873
c0d27fcc 18874 ac_builddir=.
98418dba 18875
c0d27fcc
MR
18876if test "$ac_dir" != .; then
18877 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
18878 # A "../" for each directory in $ac_dir_suffix.
18879 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
18880else
18881 ac_dir_suffix= ac_top_builddir=
18882fi
18883
18884case $srcdir in
18885 .) # No --srcdir option. We are building in place.
18886 ac_srcdir=.
18887 if test -z "$ac_top_builddir"; then
18888 ac_top_srcdir=.
18889 else
18890 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
18891 fi ;;
18892 [\\/]* | ?:[\\/]* ) # Absolute path.
18893 ac_srcdir=$srcdir$ac_dir_suffix;
18894 ac_top_srcdir=$srcdir ;;
ba4481b5 18895 *) # Relative path.
c0d27fcc
MR
18896 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
18897 ac_top_srcdir=$ac_top_builddir$srcdir ;;
18898esac
18899# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
18900# absolute.
18901ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
6bae0ccf 18902ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
c0d27fcc
MR
18903ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
18904ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
18905
ba4481b5 18906
503d2be0
AS
18907 case $INSTALL in
18908 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
c0d27fcc 18909 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
ba4481b5
DL
18910 esac
18911
503d2be0 18912 if test x"$ac_file" != x-; then
c0d27fcc 18913 { echo "$as_me:$LINENO: creating $ac_file" >&5
503d2be0
AS
18914echo "$as_me: creating $ac_file" >&6;}
18915 rm -f "$ac_file"
18916 fi
18917 # Let's still pretend it is `configure' which instantiates (i.e., don't
18918 # use $as_me), people would be surprised to read:
c0d27fcc
MR
18919 # /* config.h. Generated by config.status. */
18920 if test x"$ac_file" = x-; then
18921 configure_input=
18922 else
18923 configure_input="$ac_file. "
18924 fi
18925 configure_input=$configure_input"Generated from `echo $ac_file_in |
18926 sed 's,.*/,,'` by configure."
503d2be0
AS
18927
18928 # First look for the input files in the build tree, otherwise in the
18929 # src tree.
18930 ac_file_inputs=`IFS=:
18931 for f in $ac_file_in; do
18932 case $f in
18933 -) echo $tmp/stdin ;;
18934 [\\/$]*)
18935 # Absolute (can't be DOS-style, as IFS=:)
c0d27fcc 18936 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
503d2be0
AS
18937echo "$as_me: error: cannot find input file: $f" >&2;}
18938 { (exit 1); exit 1; }; }
18939 echo $f;;
18940 *) # Relative
18941 if test -f "$f"; then
18942 # Build tree
18943 echo $f
18944 elif test -f "$srcdir/$f"; then
18945 # Source tree
18946 echo $srcdir/$f
18947 else
18948 # /dev/null tree
c0d27fcc 18949 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
503d2be0
AS
18950echo "$as_me: error: cannot find input file: $f" >&2;}
18951 { (exit 1); exit 1; }; }
18952 fi;;
18953 esac
18954 done` || { (exit 1); exit 1; }
c0d27fcc
MR
18955_ACEOF
18956cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
18957 sed "$ac_vpsub
18958$extrasub
c0d27fcc
MR
18959_ACEOF
18960cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
18961:t
18962/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
18963s,@configure_input@,$configure_input,;t t
18964s,@srcdir@,$ac_srcdir,;t t
c0d27fcc 18965s,@abs_srcdir@,$ac_abs_srcdir,;t t
503d2be0 18966s,@top_srcdir@,$ac_top_srcdir,;t t
c0d27fcc
MR
18967s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
18968s,@builddir@,$ac_builddir,;t t
18969s,@abs_builddir@,$ac_abs_builddir,;t t
18970s,@top_builddir@,$ac_top_builddir,;t t
18971s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
503d2be0
AS
18972s,@INSTALL@,$ac_INSTALL,;t t
18973" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
18974 rm -f $tmp/stdin
18975 if test x"$ac_file" != x-; then
18976 mv $tmp/out $ac_file
18977 else
18978 cat $tmp/out
18979 rm -f $tmp/out
18980 fi
18981
18982done
c0d27fcc
MR
18983_ACEOF
18984cat >>$CONFIG_STATUS <<\_ACEOF
ba4481b5 18985
503d2be0
AS
18986#
18987# CONFIG_HEADER section.
18988#
ba4481b5
DL
18989
18990# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
18991# NAME is the cpp macro being defined and VALUE is the value it is being given.
18992#
18993# ac_d sets the value in "#define NAME VALUE" lines.
503d2be0
AS
18994ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
18995ac_dB='[ ].*$,\1#\2'
18996ac_dC=' '
18997ac_dD=',;t'
18998# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
18999ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
19000ac_uB='$,\1#\2define\3'
ba4481b5 19001ac_uC=' '
503d2be0 19002ac_uD=',;t'
ba4481b5 19003
503d2be0 19004for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
ba4481b5 19005 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
503d2be0
AS
19006 case $ac_file in
19007 - | *:- | *:-:* ) # input from stdin
19008 cat >$tmp/stdin
19009 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19010 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19011 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19012 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19013 * ) ac_file_in=$ac_file.in ;;
ba4481b5
DL
19014 esac
19015
c0d27fcc 19016 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
503d2be0
AS
19017echo "$as_me: creating $ac_file" >&6;}
19018
19019 # First look for the input files in the build tree, otherwise in the
19020 # src tree.
19021 ac_file_inputs=`IFS=:
19022 for f in $ac_file_in; do
19023 case $f in
19024 -) echo $tmp/stdin ;;
19025 [\\/$]*)
19026 # Absolute (can't be DOS-style, as IFS=:)
c0d27fcc 19027 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
503d2be0
AS
19028echo "$as_me: error: cannot find input file: $f" >&2;}
19029 { (exit 1); exit 1; }; }
19030 echo $f;;
19031 *) # Relative
19032 if test -f "$f"; then
19033 # Build tree
19034 echo $f
19035 elif test -f "$srcdir/$f"; then
19036 # Source tree
19037 echo $srcdir/$f
19038 else
19039 # /dev/null tree
c0d27fcc 19040 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
503d2be0
AS
19041echo "$as_me: error: cannot find input file: $f" >&2;}
19042 { (exit 1); exit 1; }; }
19043 fi;;
19044 esac
19045 done` || { (exit 1); exit 1; }
19046 # Remove the trailing spaces.
19047 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
19048
c0d27fcc 19049_ACEOF
503d2be0
AS
19050
19051# Transform confdefs.h into two sed scripts, `conftest.defines' and
19052# `conftest.undefs', that substitutes the proper values into
19053# config.h.in to produce config.h. The first handles `#define'
19054# templates, and the second `#undef' templates.
19055# And first: Protect against being on the right side of a sed subst in
19056# config.status. Protect against being in an unquoted here document
19057# in config.status.
19058rm -f conftest.defines conftest.undefs
19059# Using a here document instead of a string reduces the quoting nightmare.
19060# Putting comments in sed scripts is not portable.
19061#
19062# `end' is used to avoid that the second main sed command (meant for
19063# 0-ary CPP macros) applies to n-ary macro definitions.
19064# See the Autoconf documentation for `clear'.
c0d27fcc 19065cat >confdef2sed.sed <<\_ACEOF
503d2be0
AS
19066s/[\\&,]/\\&/g
19067s,[\\$`],\\&,g
19068t clear
19069: clear
c0d27fcc 19070s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
503d2be0
AS
19071t end
19072s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
19073: end
c0d27fcc 19074_ACEOF
503d2be0
AS
19075# If some macros were called several times there might be several times
19076# the same #defines, which is useless. Nevertheless, we may not want to
19077# sort them, since we want the *last* AC-DEFINE to be honored.
19078uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
19079sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
19080rm -f confdef2sed.sed
ba4481b5
DL
19081
19082# This sed command replaces #undef with comments. This is necessary, for
19083# example, in the case of _POSIX_SOURCE, which is predefined and required
19084# on some systems where configure will not decide to define it.
c0d27fcc 19085cat >>conftest.undefs <<\_ACEOF
503d2be0 19086s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
c0d27fcc 19087_ACEOF
ba4481b5 19088
503d2be0
AS
19089# Break up conftest.defines because some shells have a limit on the size
19090# of here documents, and old seds have small limits too (100 cmds).
19091echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
6bae0ccf 19092echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
503d2be0
AS
19093echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
19094echo ' :' >>$CONFIG_STATUS
19095rm -f conftest.tail
19096while grep . conftest.defines >/dev/null
19097do
19098 # Write a limited-size here document to $tmp/defines.sed.
19099 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
19100 # Speed up: don't consider the non `#define' lines.
19101 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
19102 # Work around the forget-to-reset-the-flag bug.
19103 echo 't clr' >>$CONFIG_STATUS
19104 echo ': clr' >>$CONFIG_STATUS
19105 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
19106 echo 'CEOF
19107 sed -f $tmp/defines.sed $tmp/in >$tmp/out
19108 rm -f $tmp/in
19109 mv $tmp/out $tmp/in
19110' >>$CONFIG_STATUS
19111 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
19112 rm -f conftest.defines
19113 mv conftest.tail conftest.defines
19114done
19115rm -f conftest.defines
6bae0ccf 19116echo ' fi # grep' >>$CONFIG_STATUS
503d2be0 19117echo >>$CONFIG_STATUS
ba4481b5 19118
503d2be0
AS
19119# Break up conftest.undefs because some shells have a limit on the size
19120# of here documents, and old seds have small limits too (100 cmds).
19121echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
ba4481b5 19122rm -f conftest.tail
503d2be0 19123while grep . conftest.undefs >/dev/null
ba4481b5 19124do
503d2be0
AS
19125 # Write a limited-size here document to $tmp/undefs.sed.
19126 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
19127 # Speed up: don't consider the non `#undef'
19128 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
19129 # Work around the forget-to-reset-the-flag bug.
19130 echo 't clr' >>$CONFIG_STATUS
19131 echo ': clr' >>$CONFIG_STATUS
19132 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
ba4481b5 19133 echo 'CEOF
503d2be0
AS
19134 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
19135 rm -f $tmp/in
19136 mv $tmp/out $tmp/in
19137' >>$CONFIG_STATUS
19138 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
19139 rm -f conftest.undefs
19140 mv conftest.tail conftest.undefs
ba4481b5 19141done
503d2be0
AS
19142rm -f conftest.undefs
19143
c0d27fcc 19144cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
19145 # Let's still pretend it is `configure' which instantiates (i.e., don't
19146 # use $as_me), people would be surprised to read:
c0d27fcc 19147 # /* config.h. Generated by config.status. */
503d2be0 19148 if test x"$ac_file" = x-; then
c0d27fcc 19149 echo "/* Generated by configure. */" >$tmp/config.h
ba4481b5 19150 else
c0d27fcc 19151 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
503d2be0
AS
19152 fi
19153 cat $tmp/in >>$tmp/config.h
19154 rm -f $tmp/in
19155 if test x"$ac_file" != x-; then
cd958eb3 19156 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
c0d27fcc 19157 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
503d2be0
AS
19158echo "$as_me: $ac_file is unchanged" >&6;}
19159 else
c0d27fcc
MR
19160 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
19161$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
503d2be0
AS
19162 X"$ac_file" : 'X\(//\)[^/]' \| \
19163 X"$ac_file" : 'X\(//\)$' \| \
19164 X"$ac_file" : 'X\(/\)' \| \
19165 . : '\(.\)' 2>/dev/null ||
19166echo X"$ac_file" |
19167 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19168 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19169 /^X\(\/\/\)$/{ s//\1/; q; }
19170 /^X\(\/\).*/{ s//\1/; q; }
19171 s/.*/./; q'`
6bae0ccf
DL
19172 { if $as_mkdir_p; then
19173 mkdir -p "$ac_dir"
19174 else
19175 as_dir="$ac_dir"
19176 as_dirs=
19177 while test ! -d "$as_dir"; do
19178 as_dirs="$as_dir $as_dirs"
19179 as_dir=`(dirname "$as_dir") 2>/dev/null ||
19180$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19181 X"$as_dir" : 'X\(//\)[^/]' \| \
19182 X"$as_dir" : 'X\(//\)$' \| \
19183 X"$as_dir" : 'X\(/\)' \| \
19184 . : '\(.\)' 2>/dev/null ||
19185echo X"$as_dir" |
19186 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19187 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19188 /^X\(\/\/\)$/{ s//\1/; q; }
19189 /^X\(\/\).*/{ s//\1/; q; }
19190 s/.*/./; q'`
19191 done
19192 test ! -n "$as_dirs" || mkdir $as_dirs
19193 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
19194echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
19195 { (exit 1); exit 1; }; }; }
503d2be0 19196
503d2be0
AS
19197 rm -f $ac_file
19198 mv $tmp/config.h $ac_file
ba4481b5 19199 fi
503d2be0
AS
19200 else
19201 cat $tmp/config.h
19202 rm -f $tmp/config.h
ba4481b5 19203 fi
503d2be0 19204done
c0d27fcc
MR
19205_ACEOF
19206cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
19207
19208#
19209# CONFIG_COMMANDS section.
19210#
19211for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
19212 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
19213 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
c0d27fcc
MR
19214 ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
19215$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19216 X"$ac_dest" : 'X\(//\)[^/]' \| \
19217 X"$ac_dest" : 'X\(//\)$' \| \
19218 X"$ac_dest" : 'X\(/\)' \| \
19219 . : '\(.\)' 2>/dev/null ||
19220echo X"$ac_dest" |
19221 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19222 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19223 /^X\(\/\/\)$/{ s//\1/; q; }
19224 /^X\(\/\).*/{ s//\1/; q; }
19225 s/.*/./; q'`
19226 ac_builddir=.
19227
19228if test "$ac_dir" != .; then
19229 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
19230 # A "../" for each directory in $ac_dir_suffix.
19231 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
19232else
19233 ac_dir_suffix= ac_top_builddir=
19234fi
19235
19236case $srcdir in
19237 .) # No --srcdir option. We are building in place.
19238 ac_srcdir=.
19239 if test -z "$ac_top_builddir"; then
19240 ac_top_srcdir=.
19241 else
19242 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
19243 fi ;;
19244 [\\/]* | ?:[\\/]* ) # Absolute path.
19245 ac_srcdir=$srcdir$ac_dir_suffix;
19246 ac_top_srcdir=$srcdir ;;
19247 *) # Relative path.
19248 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
19249 ac_top_srcdir=$ac_top_builddir$srcdir ;;
19250esac
19251# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
19252# absolute.
19253ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
6bae0ccf 19254ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
c0d27fcc
MR
19255ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
19256ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
ba4481b5 19257
c0d27fcc
MR
19258
19259 { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
19260echo "$as_me: executing $ac_dest commands" >&6;}
503d2be0
AS
19261 case $ac_dest in
19262 default )
ba4481b5
DL
19263
19264### Make the necessary directories, if they don't exist.
19265for dir in etc lisp ; do
19266 test -d ${dir} || mkdir ${dir}
19267done
19268
19269# Build src/Makefile from ${srcdir}/src/Makefile.c
19270# and lib-src/Makefile from ${srcdir}/lib-src/Makefile.c
19271# This must be done after src/config.h is built, since we rely on that file.
19272
19273# Now get this: Some word that is part of the ${srcdir} directory name
19274# or the ${configuration} value might, just might, happen to be an
19275# identifier like `sun4' or `i386' or something, and be predefined by
19276# the C preprocessor to some helpful value like 1, or maybe the empty
19277# string. Needless to say consequent macro substitutions are less
19278# than conducive to the makefile finding the correct directory.
19279undefs="`echo $top_srcdir $configuration $canonical |
19280sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/ *$//' \
19281 -e 's/ */ -U/g' -e 's/-U[0-9][^ ]*//g' \
19282`"
19283
19284echo creating src/epaths.h
4aa6b955 19285${MAKE-make} epaths-force
ba4481b5 19286
1c203d4c
DL
19287# As of 2000-11-19, newest development versions of GNU cpp preprocess
19288# `..' to `. .' unless invoked with -traditional
19289
d0e9bfd2 19290if test "x$GCC" = xyes && test "x$CPP_NEED_TRADITIONAL" = xyes; then
1c203d4c
DL
19291 CPPFLAGS="$CPPFLAGS -traditional"
19292fi
19293
ba4481b5
DL
19294echo creating lib-src/Makefile
19295( cd lib-src
19296 rm -f junk.c junk1.c junk2.c
19297 sed -e '/start of cpp stuff/q' \
19298 < Makefile.c > junk1.c
19299 sed -e '1,/start of cpp stuff/d'\
9a72e4c1 19300 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
ba4481b5 19301 < Makefile.c > junk.c
503d2be0 19302 $CPP $undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
ba4481b5
DL
19303 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
19304 cat junk1.c junk2.c > Makefile.new
19305 rm -f junk.c junk1.c junk2.c
19306 chmod 444 Makefile.new
19307 mv -f Makefile.new Makefile
19308)
19309
19310echo creating src/Makefile
19311( cd src
19312 rm -f junk.c junk1.c junk2.c
19313 sed -e '/start of cpp stuff/q' \
19314 < Makefile.c > junk1.c
19315 sed -e '1,/start of cpp stuff/d'\
9a72e4c1 19316 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
ba4481b5 19317 < Makefile.c > junk.c
503d2be0 19318 $CPP $undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
ba4481b5
DL
19319 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
19320 cat junk1.c junk2.c > Makefile.new
19321 rm -f junk.c junk1.c junk2.c
19322 chmod 444 Makefile.new
19323 mv -f Makefile.new Makefile
19324)
19325
503d2be0 19326if test ! -f src/.gdbinit && test -f $srcdir/src/.gdbinit; then
ba4481b5 19327 echo creating src/.gdbinit
503d2be0 19328 echo source $srcdir/src/.gdbinit > src/.gdbinit
ba4481b5
DL
19329fi
19330
19331# This is how we know whether to re-run configure in certain cases.
19332touch src/config.stamp
19333
503d2be0
AS
19334 ;;
19335 esac
19336done
c0d27fcc 19337_ACEOF
503d2be0 19338
c0d27fcc 19339cat >>$CONFIG_STATUS <<\_ACEOF
ba4481b5 19340
503d2be0 19341{ (exit 0); exit 0; }
c0d27fcc 19342_ACEOF
ba4481b5 19343chmod +x $CONFIG_STATUS
503d2be0
AS
19344ac_clean_files=$ac_clean_files_save
19345
c0d27fcc 19346
503d2be0
AS
19347# configure is writing to config.log, and then calls config.status.
19348# config.status does its own redirection, appending to config.log.
19349# Unfortunately, on DOS this fails, as config.log is still kept open
19350# by configure, so config.status won't be able to write to it; its
19351# output is simply discarded. So we exec the FD to /dev/null,
19352# effectively closing config.log, so it can be properly (re)opened and
19353# appended to by config.status. When coming back to configure, we
19354# need to make the FD available again.
19355if test "$no_create" != yes; then
19356 ac_cs_success=:
cd958eb3
MB
19357 ac_config_status_args=
19358 test "$silent" = yes &&
19359 ac_config_status_args="$ac_config_status_args --quiet"
503d2be0 19360 exec 5>/dev/null
cd958eb3 19361 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
503d2be0
AS
19362 exec 5>>config.log
19363 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19364 # would make configure fail if this is the last instruction.
19365 $ac_cs_success || { (exit 1); exit 1; }
19366fi
f5f47add 19367
c0d27fcc 19368