(subprocess-input, start-subprocess, subprocess-command, command-send-input,
[bpt/emacs.git] / configure
CommitLineData
ba4481b5 1#! /bin/sh
ba4481b5 2# Guess values for system-dependent variables and create Makefiles.
edfaf76d 3# Generated by GNU Autoconf 2.59.
ba4481b5 4#
439f58ee 5# Copyright (C) 2003 Free Software Foundation, Inc.
ba4481b5
DL
6# This configure script is free software; the Free Software Foundation
7# gives unlimited permission to copy, distribute and modify it.
c0d27fcc
MR
8## --------------------- ##
9## M4sh Initialization. ##
10## --------------------- ##
503d2be0
AS
11
12# Be Bourne compatible
13if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
14 emulate sh
15 NULLCMD=:
6bae0ccf
DL
16 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
17 # is contrary to our usage. Disable this feature.
18 alias -g '${1+"$@"}'='"$@"'
503d2be0
AS
19elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
20 set -o posix
21fi
edfaf76d 22DUALCASE=1; export DUALCASE # for MKS sh
503d2be0 23
c0d27fcc 24# Support unset when possible.
edfaf76d 25if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
c0d27fcc
MR
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.
19650fd6
AS
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 43do
edfaf76d 44 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
6bae0ccf
DL
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
19650fd6
AS
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
19650fd6 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
edfaf76d 221 test -d ./-p && rmdir ./-p
6bae0ccf
DL
222 as_mkdir_p=false
223fi
224
503d2be0
AS
225as_executable_p="test -f"
226
c0d27fcc 227# Sed expression to map a string onto a valid CPP name.
edfaf76d 228as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
c0d27fcc
MR
229
230# Sed expression to map a string onto a valid variable name.
edfaf76d 231as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
503d2be0 232
503d2be0
AS
233
234# IFS
235# We need space, tab and new line, in precisely that order.
236as_nl='
237'
238IFS=" $as_nl"
239
240# CDPATH.
6bae0ccf 241$as_unset CDPATH
c0d27fcc 242
503d2be0
AS
243
244# Name of the host.
245# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
246# so uname gets run too.
247ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
248
249exec 6>&1
250
251#
252# Initializations.
253#
ba4481b5 254ac_default_prefix=/usr/local
6bae0ccf 255ac_config_libobj_dir=.
503d2be0
AS
256cross_compiling=no
257subdirs=
c0d27fcc
MR
258MFLAGS=
259MAKEFLAGS=
503d2be0
AS
260SHELL=${CONFIG_SHELL-/bin/sh}
261
262# Maximum number of lines to put in a shell here document.
263# This variable seems obsolete. It should probably be removed, and
264# only ac_max_sed_lines should be used.
265: ${ac_max_here_lines=38}
266
c0d27fcc
MR
267# Identity of this package.
268PACKAGE_NAME=
269PACKAGE_TARNAME=
270PACKAGE_VERSION=
271PACKAGE_STRING=
272PACKAGE_BUGREPORT=
273
503d2be0 274ac_unique_file="src/lisp.h"
6bae0ccf 275ac_config_libobj_dir=src
503d2be0
AS
276# Factoring default headers for most tests.
277ac_includes_default="\
278#include <stdio.h>
279#if HAVE_SYS_TYPES_H
280# include <sys/types.h>
281#endif
282#if HAVE_SYS_STAT_H
283# include <sys/stat.h>
284#endif
285#if STDC_HEADERS
286# include <stdlib.h>
287# include <stddef.h>
288#else
289# if HAVE_STDLIB_H
290# include <stdlib.h>
291# endif
292#endif
293#if HAVE_STRING_H
294# if !STDC_HEADERS && HAVE_MEMORY_H
295# include <memory.h>
296# endif
297# include <string.h>
298#endif
299#if HAVE_STRINGS_H
300# include <strings.h>
301#endif
302#if HAVE_INTTYPES_H
303# include <inttypes.h>
304#else
305# if HAVE_STDINT_H
306# include <stdint.h>
307# endif
308#endif
309#if HAVE_UNISTD_H
310# include <unistd.h>
311#endif"
ba4481b5 312
439f58ee 313ac_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 MAINT build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP LN_S INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA RANLIB ac_ct_RANLIB INSTALL_INFO GZIP_PROG LIBSOUND PKG_CONFIG ALSA_CFLAGS ALSA_LIBS CFLAGS_SOUND SET_MAKE GTK_CFLAGS GTK_LIBS ALLOCA liblockfile LIBOBJS NEED_SETGID KMEM_GROUP GETLOADAVG_LIBS GETOPT_H GETOPTOBJS 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 314ac_subst_files=''
c0d27fcc 315
ba4481b5 316# Initialize some variables set by options.
503d2be0
AS
317ac_init_help=
318ac_init_version=false
ba4481b5
DL
319# The variables have the same names as the options, with
320# dashes changed to underlines.
503d2be0 321cache_file=/dev/null
ba4481b5 322exec_prefix=NONE
ba4481b5 323no_create=
ba4481b5
DL
324no_recursion=
325prefix=NONE
326program_prefix=NONE
327program_suffix=NONE
328program_transform_name=s,x,x,
329silent=
330site=
331srcdir=
ba4481b5
DL
332verbose=
333x_includes=NONE
334x_libraries=NONE
503d2be0
AS
335
336# Installation directory options.
337# These are left unexpanded so users can "make install exec_prefix=/foo"
338# and all the variables that are supposed to be based on exec_prefix
339# by default will actually change.
340# Use braces instead of parens because sh, perl, etc. also accept them.
ba4481b5
DL
341bindir='${exec_prefix}/bin'
342sbindir='${exec_prefix}/sbin'
343libexecdir='${exec_prefix}/libexec'
344datadir='${prefix}/share'
345sysconfdir='${prefix}/etc'
346sharedstatedir='${prefix}/com'
347localstatedir='${prefix}/var'
348libdir='${exec_prefix}/lib'
349includedir='${prefix}/include'
350oldincludedir='/usr/include'
351infodir='${prefix}/info'
352mandir='${prefix}/man'
353
ba4481b5
DL
354ac_prev=
355for ac_option
356do
ba4481b5
DL
357 # If the previous option needs an argument, assign it.
358 if test -n "$ac_prev"; then
359 eval "$ac_prev=\$ac_option"
360 ac_prev=
361 continue
362 fi
363
503d2be0 364 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
ba4481b5
DL
365
366 # Accept the important Cygnus configure options, so we can diagnose typos.
367
503d2be0 368 case $ac_option in
ba4481b5
DL
369
370 -bindir | --bindir | --bindi | --bind | --bin | --bi)
371 ac_prev=bindir ;;
372 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
503d2be0 373 bindir=$ac_optarg ;;
ba4481b5
DL
374
375 -build | --build | --buil | --bui | --bu)
503d2be0 376 ac_prev=build_alias ;;
ba4481b5 377 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
503d2be0 378 build_alias=$ac_optarg ;;
ba4481b5
DL
379
380 -cache-file | --cache-file | --cache-fil | --cache-fi \
381 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
382 ac_prev=cache_file ;;
383 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
384 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
503d2be0
AS
385 cache_file=$ac_optarg ;;
386
387 --config-cache | -C)
388 cache_file=config.cache ;;
ba4481b5
DL
389
390 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
391 ac_prev=datadir ;;
392 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
393 | --da=*)
503d2be0 394 datadir=$ac_optarg ;;
ba4481b5
DL
395
396 -disable-* | --disable-*)
503d2be0 397 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
ba4481b5 398 # Reject names that are not valid shell variable names.
503d2be0
AS
399 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
400 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
401 { (exit 1); exit 1; }; }
402 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
403 eval "enable_$ac_feature=no" ;;
ba4481b5
DL
404
405 -enable-* | --enable-*)
503d2be0 406 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
ba4481b5 407 # Reject names that are not valid shell variable names.
503d2be0
AS
408 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
409 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
410 { (exit 1); exit 1; }; }
411 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
412 case $ac_option in
413 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
ba4481b5
DL
414 *) ac_optarg=yes ;;
415 esac
503d2be0 416 eval "enable_$ac_feature='$ac_optarg'" ;;
ba4481b5
DL
417
418 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
419 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
420 | --exec | --exe | --ex)
421 ac_prev=exec_prefix ;;
422 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
423 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
424 | --exec=* | --exe=* | --ex=*)
503d2be0 425 exec_prefix=$ac_optarg ;;
ba4481b5
DL
426
427 -gas | --gas | --ga | --g)
428 # Obsolete; use --with-gas.
429 with_gas=yes ;;
430
503d2be0
AS
431 -help | --help | --hel | --he | -h)
432 ac_init_help=long ;;
433 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
434 ac_init_help=recursive ;;
435 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
436 ac_init_help=short ;;
ba4481b5
DL
437
438 -host | --host | --hos | --ho)
503d2be0 439 ac_prev=host_alias ;;
ba4481b5 440 -host=* | --host=* | --hos=* | --ho=*)
503d2be0 441 host_alias=$ac_optarg ;;
ba4481b5
DL
442
443 -includedir | --includedir | --includedi | --included | --include \
444 | --includ | --inclu | --incl | --inc)
445 ac_prev=includedir ;;
446 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
447 | --includ=* | --inclu=* | --incl=* | --inc=*)
503d2be0 448 includedir=$ac_optarg ;;
ba4481b5
DL
449
450 -infodir | --infodir | --infodi | --infod | --info | --inf)
451 ac_prev=infodir ;;
452 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
503d2be0 453 infodir=$ac_optarg ;;
ba4481b5
DL
454
455 -libdir | --libdir | --libdi | --libd)
456 ac_prev=libdir ;;
457 -libdir=* | --libdir=* | --libdi=* | --libd=*)
503d2be0 458 libdir=$ac_optarg ;;
ba4481b5
DL
459
460 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
461 | --libexe | --libex | --libe)
462 ac_prev=libexecdir ;;
463 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
464 | --libexe=* | --libex=* | --libe=*)
503d2be0 465 libexecdir=$ac_optarg ;;
ba4481b5
DL
466
467 -localstatedir | --localstatedir | --localstatedi | --localstated \
468 | --localstate | --localstat | --localsta | --localst \
469 | --locals | --local | --loca | --loc | --lo)
470 ac_prev=localstatedir ;;
471 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
472 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
473 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
503d2be0 474 localstatedir=$ac_optarg ;;
ba4481b5
DL
475
476 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
477 ac_prev=mandir ;;
478 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
503d2be0 479 mandir=$ac_optarg ;;
ba4481b5
DL
480
481 -nfp | --nfp | --nf)
482 # Obsolete; use --without-fp.
483 with_fp=no ;;
484
485 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
c0d27fcc 486 | --no-cr | --no-c | -n)
ba4481b5
DL
487 no_create=yes ;;
488
489 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
490 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
491 no_recursion=yes ;;
492
493 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
494 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
495 | --oldin | --oldi | --old | --ol | --o)
496 ac_prev=oldincludedir ;;
497 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
498 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
499 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
503d2be0 500 oldincludedir=$ac_optarg ;;
ba4481b5
DL
501
502 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
503 ac_prev=prefix ;;
504 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
503d2be0 505 prefix=$ac_optarg ;;
ba4481b5
DL
506
507 -program-prefix | --program-prefix | --program-prefi | --program-pref \
508 | --program-pre | --program-pr | --program-p)
509 ac_prev=program_prefix ;;
510 -program-prefix=* | --program-prefix=* | --program-prefi=* \
511 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
503d2be0 512 program_prefix=$ac_optarg ;;
ba4481b5
DL
513
514 -program-suffix | --program-suffix | --program-suffi | --program-suff \
515 | --program-suf | --program-su | --program-s)
516 ac_prev=program_suffix ;;
517 -program-suffix=* | --program-suffix=* | --program-suffi=* \
518 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
503d2be0 519 program_suffix=$ac_optarg ;;
ba4481b5
DL
520
521 -program-transform-name | --program-transform-name \
522 | --program-transform-nam | --program-transform-na \
523 | --program-transform-n | --program-transform- \
524 | --program-transform | --program-transfor \
525 | --program-transfo | --program-transf \
526 | --program-trans | --program-tran \
527 | --progr-tra | --program-tr | --program-t)
528 ac_prev=program_transform_name ;;
529 -program-transform-name=* | --program-transform-name=* \
530 | --program-transform-nam=* | --program-transform-na=* \
531 | --program-transform-n=* | --program-transform-=* \
532 | --program-transform=* | --program-transfor=* \
533 | --program-transfo=* | --program-transf=* \
534 | --program-trans=* | --program-tran=* \
535 | --progr-tra=* | --program-tr=* | --program-t=*)
503d2be0 536 program_transform_name=$ac_optarg ;;
ba4481b5
DL
537
538 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
539 | -silent | --silent | --silen | --sile | --sil)
540 silent=yes ;;
541
542 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
543 ac_prev=sbindir ;;
544 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
545 | --sbi=* | --sb=*)
503d2be0 546 sbindir=$ac_optarg ;;
ba4481b5
DL
547
548 -sharedstatedir | --sharedstatedir | --sharedstatedi \
549 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
550 | --sharedst | --shareds | --shared | --share | --shar \
551 | --sha | --sh)
552 ac_prev=sharedstatedir ;;
553 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
554 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
555 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
556 | --sha=* | --sh=*)
503d2be0 557 sharedstatedir=$ac_optarg ;;
ba4481b5
DL
558
559 -site | --site | --sit)
560 ac_prev=site ;;
561 -site=* | --site=* | --sit=*)
503d2be0 562 site=$ac_optarg ;;
ba4481b5
DL
563
564 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
565 ac_prev=srcdir ;;
566 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
503d2be0 567 srcdir=$ac_optarg ;;
ba4481b5
DL
568
569 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
570 | --syscon | --sysco | --sysc | --sys | --sy)
571 ac_prev=sysconfdir ;;
572 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
573 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
503d2be0 574 sysconfdir=$ac_optarg ;;
ba4481b5
DL
575
576 -target | --target | --targe | --targ | --tar | --ta | --t)
503d2be0 577 ac_prev=target_alias ;;
ba4481b5 578 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
503d2be0 579 target_alias=$ac_optarg ;;
ba4481b5
DL
580
581 -v | -verbose | --verbose | --verbos | --verbo | --verb)
582 verbose=yes ;;
583
503d2be0
AS
584 -version | --version | --versio | --versi | --vers | -V)
585 ac_init_version=: ;;
ba4481b5
DL
586
587 -with-* | --with-*)
503d2be0 588 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
ba4481b5 589 # Reject names that are not valid shell variable names.
503d2be0
AS
590 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
591 { echo "$as_me: error: invalid package name: $ac_package" >&2
592 { (exit 1); exit 1; }; }
ba4481b5 593 ac_package=`echo $ac_package| sed 's/-/_/g'`
503d2be0
AS
594 case $ac_option in
595 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
ba4481b5
DL
596 *) ac_optarg=yes ;;
597 esac
503d2be0 598 eval "with_$ac_package='$ac_optarg'" ;;
ba4481b5
DL
599
600 -without-* | --without-*)
503d2be0 601 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
ba4481b5 602 # Reject names that are not valid shell variable names.
503d2be0
AS
603 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
604 { echo "$as_me: error: invalid package name: $ac_package" >&2
605 { (exit 1); exit 1; }; }
606 ac_package=`echo $ac_package | sed 's/-/_/g'`
607 eval "with_$ac_package=no" ;;
ba4481b5
DL
608
609 --x)
610 # Obsolete; use --with-x.
611 with_x=yes ;;
612
613 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
614 | --x-incl | --x-inc | --x-in | --x-i)
615 ac_prev=x_includes ;;
616 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
617 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
503d2be0 618 x_includes=$ac_optarg ;;
ba4481b5
DL
619
620 -x-libraries | --x-libraries | --x-librarie | --x-librari \
621 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
622 ac_prev=x_libraries ;;
623 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
624 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
503d2be0 625 x_libraries=$ac_optarg ;;
ba4481b5 626
503d2be0
AS
627 -*) { echo "$as_me: error: unrecognized option: $ac_option
628Try \`$0 --help' for more information." >&2
629 { (exit 1); exit 1; }; }
ba4481b5
DL
630 ;;
631
503d2be0
AS
632 *=*)
633 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
634 # Reject names that are not valid shell variable names.
635 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
636 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
637 { (exit 1); exit 1; }; }
638 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
639 eval "$ac_envvar='$ac_optarg'"
640 export $ac_envvar ;;
641
ba4481b5 642 *)
503d2be0
AS
643 # FIXME: should be removed in autoconf 3.0.
644 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
645 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
646 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
647 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
ba4481b5
DL
648 ;;
649
650 esac
651done
652
653if test -n "$ac_prev"; then
503d2be0
AS
654 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
655 { echo "$as_me: error: missing argument to $ac_option" >&2
656 { (exit 1); exit 1; }; }
ba4481b5 657fi
ba4481b5 658
503d2be0
AS
659# Be sure to have absolute paths.
660for ac_var in exec_prefix prefix
661do
662 eval ac_val=$`echo $ac_var`
663 case $ac_val in
664 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
c0d27fcc 665 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
503d2be0
AS
666 { (exit 1); exit 1; }; };;
667 esac
668done
ba4481b5 669
503d2be0
AS
670# Be sure to have absolute paths.
671for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
edfaf76d 672 localstatedir libdir includedir oldincludedir infodir mandir
ba4481b5 673do
503d2be0
AS
674 eval ac_val=$`echo $ac_var`
675 case $ac_val in
676 [\\/$]* | ?:[\\/]* ) ;;
c0d27fcc 677 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
503d2be0 678 { (exit 1); exit 1; }; };;
ba4481b5
DL
679 esac
680done
681
503d2be0
AS
682# There might be people who depend on the old broken behavior: `$host'
683# used to hold the argument of --host etc.
c0d27fcc 684# FIXME: To remove some day.
503d2be0
AS
685build=$build_alias
686host=$host_alias
687target=$target_alias
688
c0d27fcc 689# FIXME: To remove some day.
503d2be0
AS
690if test "x$host_alias" != x; then
691 if test "x$build_alias" = x; then
692 cross_compiling=maybe
693 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
694 If a cross compiler is detected then cross compile mode will be used." >&2
695 elif test "x$build_alias" != "x$host_alias"; then
696 cross_compiling=yes
697 fi
698fi
ba4481b5 699
503d2be0
AS
700ac_tool_prefix=
701test -n "$host_alias" && ac_tool_prefix=$host_alias-
ba4481b5 702
503d2be0 703test "$silent" = yes && exec 6>/dev/null
ba4481b5 704
c0d27fcc 705
ba4481b5
DL
706# Find the source files, if location was not specified.
707if test -z "$srcdir"; then
708 ac_srcdir_defaulted=yes
709 # Try the directory containing this script, then its parent.
c0d27fcc
MR
710 ac_confdir=`(dirname "$0") 2>/dev/null ||
711$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
712 X"$0" : 'X\(//\)[^/]' \| \
713 X"$0" : 'X\(//\)$' \| \
714 X"$0" : 'X\(/\)' \| \
715 . : '\(.\)' 2>/dev/null ||
c0d27fcc
MR
716echo X"$0" |
717 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
718 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
719 /^X\(\/\/\)$/{ s//\1/; q; }
720 /^X\(\/\).*/{ s//\1/; q; }
721 s/.*/./; q'`
ba4481b5
DL
722 srcdir=$ac_confdir
723 if test ! -r $srcdir/$ac_unique_file; then
724 srcdir=..
725 fi
726else
727 ac_srcdir_defaulted=no
728fi
729if test ! -r $srcdir/$ac_unique_file; then
730 if test "$ac_srcdir_defaulted" = yes; then
c0d27fcc 731 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
503d2be0 732 { (exit 1); exit 1; }; }
ba4481b5 733 else
c0d27fcc 734 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
503d2be0 735 { (exit 1); exit 1; }; }
ba4481b5
DL
736 fi
737fi
6bae0ccf
DL
738(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
739 { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
740 { (exit 1); exit 1; }; }
503d2be0
AS
741srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
742ac_env_build_alias_set=${build_alias+set}
743ac_env_build_alias_value=$build_alias
744ac_cv_env_build_alias_set=${build_alias+set}
745ac_cv_env_build_alias_value=$build_alias
746ac_env_host_alias_set=${host_alias+set}
747ac_env_host_alias_value=$host_alias
748ac_cv_env_host_alias_set=${host_alias+set}
749ac_cv_env_host_alias_value=$host_alias
750ac_env_target_alias_set=${target_alias+set}
751ac_env_target_alias_value=$target_alias
752ac_cv_env_target_alias_set=${target_alias+set}
753ac_cv_env_target_alias_value=$target_alias
754ac_env_CC_set=${CC+set}
755ac_env_CC_value=$CC
756ac_cv_env_CC_set=${CC+set}
757ac_cv_env_CC_value=$CC
758ac_env_CFLAGS_set=${CFLAGS+set}
759ac_env_CFLAGS_value=$CFLAGS
760ac_cv_env_CFLAGS_set=${CFLAGS+set}
761ac_cv_env_CFLAGS_value=$CFLAGS
762ac_env_LDFLAGS_set=${LDFLAGS+set}
763ac_env_LDFLAGS_value=$LDFLAGS
764ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
765ac_cv_env_LDFLAGS_value=$LDFLAGS
766ac_env_CPPFLAGS_set=${CPPFLAGS+set}
767ac_env_CPPFLAGS_value=$CPPFLAGS
768ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
769ac_cv_env_CPPFLAGS_value=$CPPFLAGS
770ac_env_CPP_set=${CPP+set}
771ac_env_CPP_value=$CPP
772ac_cv_env_CPP_set=${CPP+set}
773ac_cv_env_CPP_value=$CPP
774
775#
776# Report the --help message.
777#
778if test "$ac_init_help" = "long"; then
779 # Omit some internal or obsolete options to make the list less imposing.
780 # This message is too long to be a string in the A/UX 3.1 sh.
c0d27fcc 781 cat <<_ACEOF
503d2be0
AS
782\`configure' configures this package to adapt to many kinds of systems.
783
784Usage: $0 [OPTION]... [VAR=VALUE]...
785
786To assign environment variables (e.g., CC, CFLAGS...), specify them as
787VAR=VALUE. See below for descriptions of some of the useful variables.
788
789Defaults for the options are specified in brackets.
790
791Configuration:
792 -h, --help display this help and exit
793 --help=short display options specific to this package
794 --help=recursive display the short help of all the included packages
795 -V, --version display version information and exit
796 -q, --quiet, --silent do not print \`checking...' messages
797 --cache-file=FILE cache test results in FILE [disabled]
798 -C, --config-cache alias for \`--cache-file=config.cache'
799 -n, --no-create do not create output files
800 --srcdir=DIR find the sources in DIR [configure dir or \`..']
801
c0d27fcc 802_ACEOF
503d2be0 803
c0d27fcc 804 cat <<_ACEOF
503d2be0
AS
805Installation directories:
806 --prefix=PREFIX install architecture-independent files in PREFIX
edfaf76d 807 [$ac_default_prefix]
503d2be0 808 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
edfaf76d 809 [PREFIX]
503d2be0
AS
810
811By default, \`make install' will install all the files in
812\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
813an installation prefix other than \`$ac_default_prefix' using \`--prefix',
814for instance \`--prefix=\$HOME'.
815
816For better control, use the options below.
817
818Fine tuning of the installation directories:
819 --bindir=DIR user executables [EPREFIX/bin]
820 --sbindir=DIR system admin executables [EPREFIX/sbin]
821 --libexecdir=DIR program executables [EPREFIX/libexec]
822 --datadir=DIR read-only architecture-independent data [PREFIX/share]
823 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
824 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
825 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
826 --libdir=DIR object code libraries [EPREFIX/lib]
827 --includedir=DIR C header files [PREFIX/include]
828 --oldincludedir=DIR C header files for non-gcc [/usr/include]
829 --infodir=DIR info documentation [PREFIX/info]
830 --mandir=DIR man documentation [PREFIX/man]
c0d27fcc 831_ACEOF
503d2be0 832
c0d27fcc 833 cat <<\_ACEOF
503d2be0 834
ba5da88a
PJ
835Program names:
836 --program-prefix=PREFIX prepend PREFIX to installed program names
837 --program-suffix=SUFFIX append SUFFIX to installed program names
838 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
839
503d2be0
AS
840X features:
841 --x-includes=DIR X include files are in DIR
842 --x-libraries=DIR X library files are in DIR
843
844System types:
845 --build=BUILD configure for building on BUILD [guessed]
c0d27fcc
MR
846 --host=HOST cross-compile to build programs to run on HOST [BUILD]
847_ACEOF
503d2be0
AS
848fi
849
850if test -n "$ac_init_help"; then
851
c0d27fcc 852 cat <<\_ACEOF
503d2be0
AS
853
854Optional Features:
855 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
856 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
6a3a24fa
JD
857 --enable-carbon-app[=DIR] [DIR=/Application]
858 specify install directory for Emacs.app on Mac OS X
d0098f13 859 --enable-asserts compile code with asserts enabled
19650fd6
AS
860 --enable-maintainer-mode enable make rules and dependencies not useful
861 (and sometimes confusing) to the casual installer
9adfabc2
LK
862 --enable-locallisppath=PATH
863 directories Emacs should search for lisp files
864 specific to this site
503d2be0
AS
865 --disable-largefile omit support for large files
866
867Optional Packages:
868 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
869 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
870 --without-gcc don't use GCC to compile Emacs if GCC is found
871 --without-pop don't support POP mail retrieval with movemail
872 --with-kerberos support Kerberos-authenticated POP
873 --with-kerberos5 support Kerberos version 5 authenticated POP
874 --with-hesiod support Hesiod to get the POP server host
2c9dccc9 875 --without-sound don't compile with sound support
488dd4c4
JD
876 --with-x-toolkit=KIT use an X toolkit
877 (KIT = yes/lucid/athena/motif/gtk/no)
503d2be0
AS
878 --with-xpm use -lXpm for displaying XPM images
879 --with-jpeg use -ljpeg for displaying JPEG images
880 --with-tiff use -ltiff for displaying TIFF images
881 --with-gif use -lungif for displaying GIF images
882 --with-png use -lpng for displaying PNG images
488dd4c4
JD
883 --with-gtk use GTK (same as --with-x-toolkit=gtk)
884 --with-pkg-config-prog Path to pkg-config to use for finding GTK
503d2be0 885 --without-toolkit-scroll-bars
cc227489
MB
886 don't use Motif or Xaw3d scroll bars
887 --without-xim don't use X11 XIM
e0f712ba 888 --without-carbon don't use Carbon GUI on Mac OS X
503d2be0
AS
889 --with-x use the X Window System
890
891Some influential environment variables:
892 CC C compiler command
893 CFLAGS C compiler flags
894 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
895 nonstandard directory <lib dir>
896 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
897 headers in a nonstandard directory <include dir>
898 CPP C preprocessor
899
900Use these variables to override the choices made by `configure' or to help
901it to find libraries and programs with nonstandard names/locations.
902
c0d27fcc 903_ACEOF
503d2be0
AS
904fi
905
906if test "$ac_init_help" = "recursive"; then
907 # If there are subdirs, report their specific --help.
908 ac_popdir=`pwd`
c0d27fcc
MR
909 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
910 test -d $ac_dir || continue
911 ac_builddir=.
912
913if test "$ac_dir" != .; then
914 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
915 # A "../" for each directory in $ac_dir_suffix.
916 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
917else
918 ac_dir_suffix= ac_top_builddir=
919fi
503d2be0 920
c0d27fcc
MR
921case $srcdir in
922 .) # No --srcdir option. We are building in place.
923 ac_srcdir=.
924 if test -z "$ac_top_builddir"; then
925 ac_top_srcdir=.
926 else
927 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
928 fi ;;
929 [\\/]* | ?:[\\/]* ) # Absolute path.
930 ac_srcdir=$srcdir$ac_dir_suffix;
931 ac_top_srcdir=$srcdir ;;
932 *) # Relative path.
933 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
934 ac_top_srcdir=$ac_top_builddir$srcdir ;;
935esac
edfaf76d
LK
936
937# Do not use `cd foo && pwd` to compute absolute paths, because
938# the directories may not exist.
939case `pwd` in
940.) ac_abs_builddir="$ac_dir";;
941*)
942 case "$ac_dir" in
943 .) ac_abs_builddir=`pwd`;;
944 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
945 *) ac_abs_builddir=`pwd`/"$ac_dir";;
946 esac;;
947esac
948case $ac_abs_builddir in
949.) ac_abs_top_builddir=${ac_top_builddir}.;;
950*)
951 case ${ac_top_builddir}. in
952 .) ac_abs_top_builddir=$ac_abs_builddir;;
953 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
954 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
955 esac;;
956esac
957case $ac_abs_builddir in
958.) ac_abs_srcdir=$ac_srcdir;;
959*)
960 case $ac_srcdir in
961 .) ac_abs_srcdir=$ac_abs_builddir;;
962 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
963 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
964 esac;;
965esac
966case $ac_abs_builddir in
967.) ac_abs_top_srcdir=$ac_top_srcdir;;
968*)
969 case $ac_top_srcdir in
970 .) ac_abs_top_srcdir=$ac_abs_builddir;;
971 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
972 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
973 esac;;
974esac
c0d27fcc
MR
975
976 cd $ac_dir
503d2be0 977 # Check for guested configure; otherwise get Cygnus style configure.
c0d27fcc 978 if test -f $ac_srcdir/configure.gnu; then
503d2be0 979 echo
c0d27fcc
MR
980 $SHELL $ac_srcdir/configure.gnu --help=recursive
981 elif test -f $ac_srcdir/configure; then
503d2be0 982 echo
c0d27fcc
MR
983 $SHELL $ac_srcdir/configure --help=recursive
984 elif test -f $ac_srcdir/configure.ac ||
edfaf76d 985 test -f $ac_srcdir/configure.in; then
503d2be0
AS
986 echo
987 $ac_configure --help
988 else
c0d27fcc 989 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
503d2be0 990 fi
bc5d9888 991 cd "$ac_popdir"
503d2be0
AS
992 done
993fi
994
995test -n "$ac_init_help" && exit 0
996if $ac_init_version; then
c0d27fcc 997 cat <<\_ACEOF
503d2be0 998
edfaf76d 999Copyright (C) 2003 Free Software Foundation, Inc.
503d2be0
AS
1000This configure script is free software; the Free Software Foundation
1001gives unlimited permission to copy, distribute and modify it.
c0d27fcc 1002_ACEOF
503d2be0
AS
1003 exit 0
1004fi
1005exec 5>config.log
c0d27fcc 1006cat >&5 <<_ACEOF
503d2be0
AS
1007This file contains any messages produced by compilers while
1008running configure, to aid debugging if configure makes a mistake.
1009
1010It was created by $as_me, which was
edfaf76d 1011generated by GNU Autoconf 2.59. Invocation command line was
503d2be0
AS
1012
1013 $ $0 $@
1014
c0d27fcc 1015_ACEOF
503d2be0
AS
1016{
1017cat <<_ASUNAME
c0d27fcc
MR
1018## --------- ##
1019## Platform. ##
1020## --------- ##
503d2be0
AS
1021
1022hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1023uname -m = `(uname -m) 2>/dev/null || echo unknown`
1024uname -r = `(uname -r) 2>/dev/null || echo unknown`
1025uname -s = `(uname -s) 2>/dev/null || echo unknown`
1026uname -v = `(uname -v) 2>/dev/null || echo unknown`
1027
1028/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1029/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1030
1031/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1032/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1033/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1034hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
1035/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1036/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1037/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1038
925c2f3f 1039_ASUNAME
c0d27fcc
MR
1040
1041as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1042for as_dir in $PATH
1043do
1044 IFS=$as_save_IFS
1045 test -z "$as_dir" && as_dir=.
1046 echo "PATH: $as_dir"
1047done
1048
503d2be0
AS
1049} >&5
1050
c0d27fcc
MR
1051cat >&5 <<_ACEOF
1052
1053
1054## ----------- ##
1055## Core tests. ##
1056## ----------- ##
1057
1058_ACEOF
503d2be0 1059
503d2be0
AS
1060
1061# Keep a trace of the command line.
1062# Strip out --no-create and --no-recursion so they do not pile up.
19650fd6 1063# Strip out --silent because we don't want to record it for future runs.
503d2be0 1064# Also quote any args containing shell meta-characters.
19650fd6 1065# Make two passes to allow for proper duplicate-argument suppression.
503d2be0 1066ac_configure_args=
19650fd6
AS
1067ac_configure_args0=
1068ac_configure_args1=
503d2be0 1069ac_sep=
19650fd6
AS
1070ac_must_keep_next=false
1071for ac_pass in 1 2
503d2be0 1072do
19650fd6
AS
1073 for ac_arg
1074 do
1075 case $ac_arg in
1076 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1077 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1078 | -silent | --silent | --silen | --sile | --sil)
1079 continue ;;
1080 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1081 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1082 esac
1083 case $ac_pass in
1084 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1085 2)
1086 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1087 if test $ac_must_keep_next = true; then
edfaf76d 1088 ac_must_keep_next=false # Got value, back to normal.
19650fd6 1089 else
edfaf76d
LK
1090 case $ac_arg in
1091 *=* | --config-cache | -C | -disable-* | --disable-* \
1092 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1093 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1094 | -with-* | --with-* | -without-* | --without-* | --x)
1095 case "$ac_configure_args0 " in
1096 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1097 esac
1098 ;;
1099 -* ) ac_must_keep_next=true ;;
1100 esac
19650fd6
AS
1101 fi
1102 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1103 # Get rid of the leading space.
1104 ac_sep=" "
1105 ;;
1106 esac
1107 done
503d2be0 1108done
19650fd6
AS
1109$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1110$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
503d2be0
AS
1111
1112# When interrupted or exit'd, cleanup temporary files, and complete
1113# config.log. We remove comments because anyway the quotes in there
1114# would cause problems or look ugly.
c0d27fcc
MR
1115# WARNING: Be sure not to use single quotes in there, as some shells,
1116# such as our DU 5.0 friend, will then `close' the trap.
503d2be0
AS
1117trap 'exit_status=$?
1118 # Save into config.log some information that might help in debugging.
c0d27fcc
MR
1119 {
1120 echo
6bae0ccf 1121
c0d27fcc
MR
1122 cat <<\_ASBOX
1123## ---------------- ##
1124## Cache variables. ##
1125## ---------------- ##
1126_ASBOX
1127 echo
1128 # The following way of writing the cache mishandles newlines in values,
503d2be0
AS
1129{
1130 (set) 2>&1 |
1131 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1132 *ac_space=\ *)
1133 sed -n \
edfaf76d
LK
1134 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1135 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
503d2be0
AS
1136 ;;
1137 *)
1138 sed -n \
edfaf76d 1139 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
503d2be0
AS
1140 ;;
1141 esac;
c0d27fcc
MR
1142}
1143 echo
6bae0ccf
DL
1144
1145 cat <<\_ASBOX
1146## ----------------- ##
1147## Output variables. ##
1148## ----------------- ##
1149_ASBOX
1150 echo
1151 for ac_var in $ac_subst_vars
1152 do
1153 eval ac_val=$`echo $ac_var`
1154 echo "$ac_var='"'"'$ac_val'"'"'"
1155 done | sort
1156 echo
1157
1158 if test -n "$ac_subst_files"; then
1159 cat <<\_ASBOX
1160## ------------- ##
1161## Output files. ##
1162## ------------- ##
1163_ASBOX
1164 echo
1165 for ac_var in $ac_subst_files
1166 do
1167 eval ac_val=$`echo $ac_var`
edfaf76d 1168 echo "$ac_var='"'"'$ac_val'"'"'"
6bae0ccf
DL
1169 done | sort
1170 echo
1171 fi
1172
c0d27fcc
MR
1173 if test -s confdefs.h; then
1174 cat <<\_ASBOX
1175## ----------- ##
1176## confdefs.h. ##
1177## ----------- ##
1178_ASBOX
1179 echo
6bae0ccf 1180 sed "/^$/d" confdefs.h | sort
c0d27fcc
MR
1181 echo
1182 fi
1183 test "$ac_signal" != 0 &&
1184 echo "$as_me: caught signal $ac_signal"
1185 echo "$as_me: exit $exit_status"
1186 } >&5
edfaf76d 1187 rm -f core *.core &&
c0d27fcc 1188 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
503d2be0
AS
1189 exit $exit_status
1190 ' 0
1191for ac_signal in 1 2 13 15; do
1192 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1193done
1194ac_signal=0
1195
1196# confdefs.h avoids OS command line length limits that DEFS can exceed.
1197rm -rf conftest* confdefs.h
1198# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1199echo >confdefs.h
ba4481b5 1200
c0d27fcc
MR
1201# Predefined preprocessor variables.
1202
1203cat >>confdefs.h <<_ACEOF
1204#define PACKAGE_NAME "$PACKAGE_NAME"
1205_ACEOF
1206
1207
1208cat >>confdefs.h <<_ACEOF
1209#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1210_ACEOF
1211
1212
1213cat >>confdefs.h <<_ACEOF
1214#define PACKAGE_VERSION "$PACKAGE_VERSION"
1215_ACEOF
1216
1217
1218cat >>confdefs.h <<_ACEOF
1219#define PACKAGE_STRING "$PACKAGE_STRING"
1220_ACEOF
1221
1222
1223cat >>confdefs.h <<_ACEOF
1224#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1225_ACEOF
1226
1227
503d2be0 1228# Let the site file select an alternate cache file if it wants to.
ba4481b5
DL
1229# Prefer explicitly selected file to automatically selected ones.
1230if test -z "$CONFIG_SITE"; then
1231 if test "x$prefix" != xNONE; then
1232 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1233 else
1234 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1235 fi
1236fi
1237for ac_site_file in $CONFIG_SITE; do
1238 if test -r "$ac_site_file"; then
c0d27fcc 1239 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
503d2be0 1240echo "$as_me: loading site script $ac_site_file" >&6;}
c0d27fcc 1241 sed 's/^/| /' "$ac_site_file" >&5
ba4481b5
DL
1242 . "$ac_site_file"
1243 fi
1244done
1245
1246if test -r "$cache_file"; then
503d2be0
AS
1247 # Some versions of bash will fail to source /dev/null (special
1248 # files actually), so we avoid doing that.
1249 if test -f "$cache_file"; then
c0d27fcc 1250 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
503d2be0
AS
1251echo "$as_me: loading cache $cache_file" >&6;}
1252 case $cache_file in
1253 [\\/]* | ?:[\\/]* ) . $cache_file;;
1254 *) . ./$cache_file;;
1255 esac
1256 fi
ba4481b5 1257else
c0d27fcc 1258 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
503d2be0
AS
1259echo "$as_me: creating cache $cache_file" >&6;}
1260 >$cache_file
1261fi
1262
1263# Check that the precious variables saved in the cache have kept the same
1264# value.
1265ac_cache_corrupted=false
1266for ac_var in `(set) 2>&1 |
edfaf76d 1267 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
503d2be0
AS
1268 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1269 eval ac_new_set=\$ac_env_${ac_var}_set
1270 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1271 eval ac_new_val="\$ac_env_${ac_var}_value"
1272 case $ac_old_set,$ac_new_set in
1273 set,)
c0d27fcc 1274 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
503d2be0
AS
1275echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1276 ac_cache_corrupted=: ;;
1277 ,set)
c0d27fcc 1278 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
503d2be0
AS
1279echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1280 ac_cache_corrupted=: ;;
1281 ,);;
1282 *)
1283 if test "x$ac_old_val" != "x$ac_new_val"; then
edfaf76d 1284 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
503d2be0 1285echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
edfaf76d 1286 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
503d2be0 1287echo "$as_me: former value: $ac_old_val" >&2;}
edfaf76d 1288 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
503d2be0 1289echo "$as_me: current value: $ac_new_val" >&2;}
edfaf76d 1290 ac_cache_corrupted=:
503d2be0
AS
1291 fi;;
1292 esac
c0d27fcc 1293 # Pass precious variables to config.status.
503d2be0
AS
1294 if test "$ac_new_set" = set; then
1295 case $ac_new_val in
1296 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
c0d27fcc
MR
1297 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1298 *) ac_arg=$ac_var=$ac_new_val ;;
1299 esac
1300 case " $ac_configure_args " in
1301 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1302 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
503d2be0
AS
1303 esac
1304 fi
1305done
1306if $ac_cache_corrupted; then
c0d27fcc 1307 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
503d2be0 1308echo "$as_me: error: changes in the environment can compromise the build" >&2;}
c0d27fcc 1309 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
503d2be0
AS
1310echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1311 { (exit 1); exit 1; }; }
ba4481b5
DL
1312fi
1313
1314ac_ext=c
ba4481b5 1315ac_cpp='$CPP $CPPFLAGS'
503d2be0
AS
1316ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1317ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1318ac_compiler_gnu=$ac_cv_c_compiler_gnu
1319
c0d27fcc
MR
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
ba4481b5 1336
6bae0ccf
DL
1337
1338 ac_config_headers="$ac_config_headers src/config.h:src/config.in"
ba4481b5 1339
c0d27fcc 1340
ba5da88a
PJ
1341test "$program_prefix" != NONE &&
1342 program_transform_name="s,^,$program_prefix,;$program_transform_name"
1343# Use a double $ so make ignores it.
1344test "$program_suffix" != NONE &&
1345 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1346# Double any \ or $. echo might interpret backslashes.
1347# By default was `s,x,x', remove it if useless.
1348cat <<\_ACEOF >conftest.sed
1349s/[\\$]/&&/g;s/;s,x,x,$//
1350_ACEOF
1351program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1352rm conftest.sed
1353
c0d27fcc 1354
ba4481b5
DL
1355lispdir='${datadir}/emacs/${version}/lisp'
1356locallisppath='${datadir}/emacs/${version}/site-lisp:'\
e9291f09
EZ
1357'${datadir}/emacs/site-lisp'
1358lisppath='${locallisppath}:${lispdir}:${datadir}/emacs/${version}/leim'
ba4481b5
DL
1359etcdir='${datadir}/emacs/${version}/etc'
1360archlibdir='${libexecdir}/emacs/${version}/${configuration}'
1361docdir='${datadir}/emacs/${version}/etc'
24b01ec4 1362gamedir='${localstatedir}/games/emacs'
98418dba
CW
1363
1364gameuser=games
1365
c0d27fcc 1366
ba4481b5
DL
1367# Check whether --with-gcc or --without-gcc was given.
1368if test "${with_gcc+set}" = set; then
1369 withval="$with_gcc"
503d2be0
AS
1370
1371fi;
ba4481b5
DL
1372
1373# Check whether --with-pop or --without-pop was given.
1374if test "${with_pop+set}" = set; then
1375 withval="$with_pop"
243cf185 1376 if test "$withval" = yes; then
c0d27fcc 1377 cat >>confdefs.h <<\_ACEOF
ba4481b5 1378#define MAIL_USE_POP 1
c0d27fcc 1379_ACEOF
ba4481b5 1380
243cf185
DL
1381else :
1382fi
3d9fec71 1383else
c0d27fcc 1384 cat >>confdefs.h <<\_ACEOF
3d9fec71 1385#define MAIL_USE_POP 1
c0d27fcc 1386_ACEOF
3d9fec71 1387
503d2be0 1388fi;
ba4481b5 1389
c0d27fcc 1390
a21616bd
KR
1391# Check whether --with-kerberos or --without-kerberos was given.
1392if test "${with_kerberos+set}" = set; then
1393 withval="$with_kerberos"
c0d27fcc 1394 cat >>confdefs.h <<\_ACEOF
a21616bd 1395#define KERBEROS 1
c0d27fcc 1396_ACEOF
a21616bd 1397
503d2be0 1398fi;
a21616bd 1399
c0d27fcc 1400
a21616bd
KR
1401# Check whether --with-kerberos5 or --without-kerberos5 was given.
1402if test "${with_kerberos5+set}" = set; then
1403 withval="$with_kerberos5"
1404 if test "${with_kerberos5+set}" = set; then
1405 if test "${with_kerberos+set}" != set; then
1406 with_kerberos=yes
c0d27fcc 1407 cat >>confdefs.h <<\_ACEOF
a21616bd 1408#define KERBEROS 1
c0d27fcc 1409_ACEOF
a21616bd
KR
1410
1411 fi
1412fi
b936fae4 1413
c0d27fcc 1414cat >>confdefs.h <<\_ACEOF
a21616bd 1415#define KERBEROS5 1
c0d27fcc 1416_ACEOF
a21616bd 1417
503d2be0 1418fi;
a21616bd 1419
ba4481b5
DL
1420# Check whether --with-hesiod or --without-hesiod was given.
1421if test "${with_hesiod+set}" = set; then
1422 withval="$with_hesiod"
b936fae4 1423
c0d27fcc 1424cat >>confdefs.h <<\_ACEOF
ba4481b5 1425#define HESIOD 1
c0d27fcc 1426_ACEOF
ba4481b5 1427
503d2be0 1428fi;
ba4481b5 1429
c0d27fcc 1430
2c9dccc9
PJ
1431# Check whether --with-sound or --without-sound was given.
1432if test "${with_sound+set}" = set; then
1433 withval="$with_sound"
1434
1435fi;
1436
c0d27fcc 1437
ba4481b5
DL
1438# Check whether --with-x-toolkit or --without-x-toolkit was given.
1439if test "${with_x_toolkit+set}" = set; then
1440 withval="$with_x_toolkit"
1441 case "${withval}" in
1442 y | ye | yes ) val=athena ;;
1443 n | no ) val=no ;;
1444 l | lu | luc | luci | lucid ) val=lucid ;;
1445 a | at | ath | athe | athen | athena ) val=athena ;;
1446 m | mo | mot | moti | motif ) val=motif ;;
488dd4c4 1447 g | gt | gtk ) val=gtk ;;
ba4481b5 1448 * )
c0d27fcc 1449{ { echo "$as_me:$LINENO: error: \`--with-x-toolkit=$withval' is invalid\;
488dd4c4 1450this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif' or \`gtk'.
503d2be0
AS
1451Currently, \`yes', \`athena' and \`lucid' are synonyms." >&5
1452echo "$as_me: error: \`--with-x-toolkit=$withval' is invalid\;
488dd4c4 1453this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif' or \`gtk'.
503d2be0
AS
1454Currently, \`yes', \`athena' and \`lucid' are synonyms." >&2;}
1455 { (exit 1); exit 1; }; }
ba4481b5
DL
1456 ;;
1457 esac
1458 with_x_toolkit=$val
1459
503d2be0 1460fi;
ba4481b5
DL
1461
1462# Check whether --with-xpm or --without-xpm was given.
1463if test "${with_xpm+set}" = set; then
1464 withval="$with_xpm"
503d2be0
AS
1465
1466fi;
ba4481b5
DL
1467
1468# Check whether --with-jpeg or --without-jpeg was given.
1469if test "${with_jpeg+set}" = set; then
1470 withval="$with_jpeg"
503d2be0
AS
1471
1472fi;
ba4481b5
DL
1473
1474# Check whether --with-tiff or --without-tiff was given.
1475if test "${with_tiff+set}" = set; then
1476 withval="$with_tiff"
503d2be0
AS
1477
1478fi;
ba4481b5
DL
1479
1480# Check whether --with-gif or --without-gif was given.
1481if test "${with_gif+set}" = set; then
1482 withval="$with_gif"
503d2be0
AS
1483
1484fi;
ba4481b5
DL
1485
1486# Check whether --with-png or --without-png was given.
1487if test "${with_png+set}" = set; then
1488 withval="$with_png"
503d2be0
AS
1489
1490fi;
ba4481b5 1491
488dd4c4
JD
1492# Check whether --with-gtk or --without-gtk was given.
1493if test "${with_gtk+set}" = set; then
1494 withval="$with_gtk"
1495
1496fi;
1497
1498# Check whether --with-pkg-config-prog or --without-pkg-config-prog was given.
1499if test "${with_pkg_config_prog+set}" = set; then
1500 withval="$with_pkg_config_prog"
1501
1502fi;
1503
ba4481b5
DL
1504# Check whether --with-toolkit-scroll-bars or --without-toolkit-scroll-bars was given.
1505if test "${with_toolkit_scroll_bars+set}" = set; then
1506 withval="$with_toolkit_scroll_bars"
503d2be0
AS
1507
1508fi;
ba4481b5 1509
1d36487c
GM
1510# Check whether --with-xim or --without-xim was given.
1511if test "${with_xim+set}" = set; then
1512 withval="$with_xim"
1d36487c 1513
503d2be0 1514fi;
ba4481b5 1515
e0f712ba
AC
1516# Check whether --with-carbon or --without-carbon was given.
1517if test "${with_carbon+set}" = set; then
1518 withval="$with_carbon"
1519
1520fi;
6a3a24fa
JD
1521# Check whether --enable-carbon-app or --disable-carbon-app was given.
1522if test "${enable_carbon_app+set}" = set; then
1523 enableval="$enable_carbon_app"
1524 carbon_appdir_x=${enableval}
1525fi;
e0f712ba 1526
d0098f13
JD
1527# Check whether --enable-asserts or --disable-asserts was given.
1528if test "${enable_asserts+set}" = set; then
1529 enableval="$enable_asserts"
1530 USE_XASSERTS=$enableval
1531else
1532 USE_XASSERTS=no
1533fi;
1534
19650fd6
AS
1535# Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
1536if test "${enable_maintainer_mode+set}" = set; then
1537 enableval="$enable_maintainer_mode"
1538 USE_MAINTAINER_MODE=$enableval
1539else
1540 USE_MAINTAINER_MODE=no
1541fi;
1542if test $USE_MAINTAINER_MODE = yes; then
1543 MAINT=
1544else
1545 MAINT=#
1546fi
1547
1548
9adfabc2
LK
1549# Check whether --enable-locallisppath or --disable-locallisppath was given.
1550if test "${enable_locallisppath+set}" = set; then
1551 enableval="$enable_locallisppath"
1552 if test "${enableval}" = "no"; then
1553 locallisppath=
1554elif test "${enableval}" != "yes"; then
1555 locallisppath=${enableval}
1556fi
1557fi;
1558
ba4481b5 1559#### Make srcdir absolute, if it isn't already. It's important to
17494071 1560#### avoid running the path through pwd unnecessarily, since pwd can
ba4481b5
DL
1561#### give you automounter prefixes, which can go away. We do all this
1562#### so Emacs can find its files when run uninstalled.
17494071
GM
1563## Make sure CDPATH doesn't affect cd (in case PWD is relative).
1564unset CDPATH
ba4481b5
DL
1565case "${srcdir}" in
1566 /* ) ;;
1567 . )
1568 ## We may be able to use the $PWD environment variable to make this
1569 ## absolute. But sometimes PWD is inaccurate.
df645f7c
AS
1570 ## Note: we used to use ${PWD} at the end instead of `pwd`,
1571 ## but that tested only for a well-formed and valid PWD,
1572 ## it did not object when PWD was well-formed and valid but just wrong.
1573 if test ".${PWD}" != "." && test ".`(cd ${PWD} ; sh -c pwd)`" = ".`pwd`" ;
ba4481b5
DL
1574 then
1575 srcdir="$PWD"
1576 else
1577 srcdir="`(cd ${srcdir}; pwd)`"
1578 fi
1579 ;;
1580 * ) srcdir="`(cd ${srcdir}; pwd)`" ;;
1581esac
1582
1583#### Check if the source directory already has a configured system in it.
1584if test `pwd` != `(cd ${srcdir} && pwd)` \
1585 && test -f "${srcdir}/src/config.h" ; then
c0d27fcc 1586 { echo "$as_me:$LINENO: WARNING: The directory tree \`${srcdir}' is being used
503d2be0
AS
1587 as a build directory right now; it has been configured in its own
1588 right. To configure in another directory as well, you MUST
1589 use GNU make. If you do not have GNU make, then you must
1590 now do \`make distclean' in ${srcdir},
1591 and then run $0 again." >&5
1592echo "$as_me: WARNING: The directory tree \`${srcdir}' is being used
ba4481b5
DL
1593 as a build directory right now; it has been configured in its own
1594 right. To configure in another directory as well, you MUST
1595 use GNU make. If you do not have GNU make, then you must
1596 now do \`make distclean' in ${srcdir},
503d2be0 1597 and then run $0 again." >&2;}
ba4481b5
DL
1598fi
1599
1600#### Given the configuration name, set machfile and opsysfile to the
1601#### names of the m/*.h and s/*.h files we should use.
1602
1603### Canonicalize the configuration name.
1604
1605ac_aux_dir=
1606for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1607 if test -f $ac_dir/install-sh; then
1608 ac_aux_dir=$ac_dir
1609 ac_install_sh="$ac_aux_dir/install-sh -c"
1610 break
1611 elif test -f $ac_dir/install.sh; then
1612 ac_aux_dir=$ac_dir
1613 ac_install_sh="$ac_aux_dir/install.sh -c"
1614 break
503d2be0
AS
1615 elif test -f $ac_dir/shtool; then
1616 ac_aux_dir=$ac_dir
1617 ac_install_sh="$ac_aux_dir/shtool install -c"
1618 break
ba4481b5
DL
1619 fi
1620done
1621if test -z "$ac_aux_dir"; then
c0d27fcc 1622 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
503d2be0
AS
1623echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1624 { (exit 1); exit 1; }; }
ba4481b5 1625fi
503d2be0
AS
1626ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1627ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1628ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
ba4481b5
DL
1629
1630# Make sure we can run config.sub.
503d2be0 1631$ac_config_sub sun4 >/dev/null 2>&1 ||
c0d27fcc 1632 { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
503d2be0
AS
1633echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1634 { (exit 1); exit 1; }; }
1635
c0d27fcc 1636echo "$as_me:$LINENO: checking build system type" >&5
503d2be0
AS
1637echo $ECHO_N "checking build system type... $ECHO_C" >&6
1638if test "${ac_cv_build+set}" = set; then
1639 echo $ECHO_N "(cached) $ECHO_C" >&6
1640else
1641 ac_cv_build_alias=$build_alias
1642test -z "$ac_cv_build_alias" &&
1643 ac_cv_build_alias=`$ac_config_guess`
1644test -z "$ac_cv_build_alias" &&
c0d27fcc 1645 { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
503d2be0
AS
1646echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1647 { (exit 1); exit 1; }; }
1648ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
c0d27fcc
MR
1649 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
1650echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
503d2be0
AS
1651 { (exit 1); exit 1; }; }
1652
1653fi
c0d27fcc 1654echo "$as_me:$LINENO: result: $ac_cv_build" >&5
503d2be0
AS
1655echo "${ECHO_T}$ac_cv_build" >&6
1656build=$ac_cv_build
1657build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1658build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1659build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1660
c0d27fcc
MR
1661
1662echo "$as_me:$LINENO: checking host system type" >&5
503d2be0
AS
1663echo $ECHO_N "checking host system type... $ECHO_C" >&6
1664if test "${ac_cv_host+set}" = set; then
1665 echo $ECHO_N "(cached) $ECHO_C" >&6
1666else
1667 ac_cv_host_alias=$host_alias
1668test -z "$ac_cv_host_alias" &&
1669 ac_cv_host_alias=$ac_cv_build_alias
1670ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
c0d27fcc 1671 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
503d2be0
AS
1672echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1673 { (exit 1); exit 1; }; }
1674
1675fi
c0d27fcc 1676echo "$as_me:$LINENO: result: $ac_cv_host" >&5
503d2be0
AS
1677echo "${ECHO_T}$ac_cv_host" >&6
1678host=$ac_cv_host
1679host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1680host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1681host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
ba4481b5 1682
c0d27fcc 1683
ba4481b5 1684canonical=$host
531a3336 1685configuration=${host_alias-$host}
ba4481b5 1686
c0d27fcc 1687
22044edf 1688
ba4481b5
DL
1689### If you add support for a new configuration, add code to this
1690### switch statement to recognize your configuration name and select
1691### the appropriate operating system and machine description files.
1692
1693### You would hope that you could choose an m/*.h file pretty much
1694### based on the machine portion of the configuration name, and an s-
1695### file based on the operating system portion. However, it turns out
1696### that each m/*.h file is pretty manufacturer-specific - for
1697### example, apollo.h, hp9000s300.h, mega68k, news.h, and tad68k are
1698### all 68000 machines; mips.h, pmax.h, and news-risc are all MIPS
1699### machines. So we basically have to have a special case for each
1700### configuration name.
1701###
1702### As far as handling version numbers on operating systems is
1703### concerned, make sure things will fail in a fixable way. If
1704### /etc/MACHINES doesn't say anything about version numbers, be
1705### prepared to handle anything reasonably. If version numbers
1706### matter, be sure /etc/MACHINES says something about it.
1707###
1708### Eric Raymond says we should accept strings like "sysvr4" to mean
1709### "System V Release 4"; he writes, "The old convention encouraged
1710### confusion between `system' and `release' levels'."
1711
1712machine='' opsys='' unported=no
1713case "${canonical}" in
1714
1096bcc0
GM
1715 ## FreeBSD ports
1716 *-*-freebsd* )
1717 opsys=freebsd
1718 case "${canonical}" in
1719 alpha*-*-freebsd*) machine=alpha ;;
ec8fcb10
YM
1720 ia64-*-freebsd*) machine=ia64 ;;
1721 sparc64-*-freebsd*) machine=sparc ;;
1722 powerpc-*-freebsd*) machine=macppc ;;
1096bcc0 1723 i[3456]86-*-freebsd*) machine=intel386 ;;
01abe918 1724 amd64-*-freebsd*|x86_64-*-freebsd*) machine=amdx86-64 ;;
1096bcc0
GM
1725 esac
1726 ;;
1727
ba4481b5
DL
1728 ## NetBSD ports
1729 *-*-netbsd* )
1730 opsys=netbsd
dd038e26 1731 if test -f /usr/lib/crti.o; then
f57bd967
DL
1732
1733cat >>confdefs.h <<\_ACEOF
1734#define HAVE_CRTIN
dd038e26
AS
1735_ACEOF
1736
1737 fi
1738
ba4481b5
DL
1739 case "${canonical}" in
1740 alpha*-*-netbsd*) machine=alpha ;;
1741 i[3456]86-*-netbsd*) machine=intel386 ;;
1742 m68k-*-netbsd*)
1743 # This is somewhat bogus.
1744 machine=hp9000s300 ;;
1745 powerpc-apple-netbsd*) machine=macppc ;;
1746 mips-*-netbsd*) machine=pmax ;;
2df636f4 1747 mipsel-*-netbsd*) machine=pmax ;;
97836269 1748 mipseb-*-netbsd*) machine=pmax ;;
ba4481b5 1749 ns32k-*-netbsd*) machine=ns32000 ;;
3a64eef5 1750 powerpc-*-netbsd*) machine=macppc ;;
71c9ec51 1751 sparc*-*-netbsd*) machine=sparc ;;
ba4481b5 1752 vax-*-netbsd*) machine=vax ;;
2df636f4 1753 arm-*-netbsd*) machine=arm ;;
ba4481b5
DL
1754 esac
1755 ;;
1756
1757 ## OpenBSD ports
1758 *-*-openbsd* )
1759 opsys=openbsd
1760 case "${canonical}" in
1761 alpha*-*-openbsd*) machine=alpha ;;
1762 i386-*-openbsd*) machine=intel386 ;;
4713fa76 1763 x86_64-*-openbsd*) machine=amdx86-64 ;;
ba4481b5
DL
1764 m68k-*-openbsd*) machine=hp9000s300 ;;
1765 mipsel-*-openbsd*) machine=pmax ;;
1766 ns32k-*-openbsd*) machine=ns32000 ;;
1767 sparc-*-openbsd*) machine=sparc ;;
1768 vax-*-openbsd*) machine=vax ;;
1769 esac
1770 ;;
1771
10a3b1a1
EZ
1772 ## LynxOS ports
1773 *-*-lynxos* )
1774 opsys=lynxos
1775 case "${canonical}" in
1776 i[3456]86-*-lynxos*) machine=intel386 ;;
1777 powerpc-*-lynxos*) machine=powerpc ;;
1778 esac
1779 ;;
1780
ba4481b5
DL
1781 ## Acorn RISCiX:
1782 arm-acorn-riscix1.1* )
1783 machine=acorn opsys=riscix1-1
1784 ;;
1785 arm-acorn-riscix1.2* | arm-acorn-riscix )
1786 ## This name is riscix12 instead of riscix1.2
1787 ## to avoid a file name conflict on MSDOS.
1788 machine=acorn opsys=riscix12
1789 ;;
1790
1791 ## BSDI ports
1792 *-*-bsdi* )
1793 opsys=bsdi
1794 case "${canonical}" in
1795 i[345]86-*-bsdi*) machine=intel386 ;;
1796 sparc-*-bsdi*) machine=sparc ;;
3aeecf97 1797 powerpc-*-bsdi*) machine=macppc ;;
ba4481b5
DL
1798 esac
1799 case "${canonical}" in
1800 *-*-bsd386* | *-*-bsdi1* ) opsys=bsd386 ;;
1801 *-*-bsdi2.0* ) opsys=bsdos2 ;;
1802 *-*-bsdi2* ) opsys=bsdos2-1 ;;
1803 *-*-bsdi3* ) opsys=bsdos3 ;;
1d06fc82 1804 *-*-bsdi[45]* ) opsys=bsdos4 ;;
ba4481b5
DL
1805 esac
1806 ;;
1807
1808 ## Alliant machines
1809 ## Strictly speaking, we need the version of the alliant operating
1810 ## system to choose the right machine file, but currently the
1811 ## configuration name doesn't tell us enough to choose the right
1812 ## one; we need to give alliants their own operating system name to
1813 ## do this right. When someone cares, they can help us.
1814 fx80-alliant-* )
1815 machine=alliant4 opsys=bsd4-2
1816 ;;
1817 i860-alliant-* )
1818 machine=alliant-2800 opsys=bsd4-3
1819 ;;
1820
1821 ## Alpha (DEC) machines.
1822 alpha*-dec-osf* )
1823 machine=alpha opsys=osf1
1824 # This is needed to find X11R6.1 libraries for certain tests.
1825 NON_GCC_LINK_TEST_OPTIONS=-Wl,-rpath,/usr/X11R6/lib
1826 GCC_LINK_TEST_OPTIONS=-Wl,-rpath,/usr/X11R6/lib
34979055
DL
1827 # NON_GNU_CPP is necessary on 5.0 to avoid mangling src/Makefile
1828 # due to non-traditional preprocessing with the current compiler
1829 # defaults. OSF 4 can also have that compiler version, and there
1830 # seems always to have been a usable /usr/bin/cpp.
1831 NON_GNU_CPP=/usr/bin/cpp
ca512671 1832 case "${canonical}" in
a55b799a 1833 alpha*-dec-osf[5-9]*)
bb17930d 1834 opsys=osf5-0 ;;
ca512671 1835 esac
ba4481b5
DL
1836 ;;
1837
1838 alpha*-*-linux-gnu* )
1839 machine=alpha opsys=gnu-linux
1840 ;;
1841
c4bb2108
DL
1842 arm*-*-linux-gnu* )
1843 machine=arm opsys=gnu-linux
1844 ;;
1845
ba4481b5
DL
1846 ## Altos 3068
1847 m68*-altos-sysv* )
1848 machine=altos opsys=usg5-2
1849 ;;
1850
1851 ## Amdahl UTS
1852 580-amdahl-sysv* )
1853 machine=amdahl opsys=usg5-2-2
1854 ;;
1855
1856 ## Apollo, Domain/OS
1857 m68*-apollo-* )
1858 machine=apollo opsys=bsd4-3
1859 ;;
1860
1861 ## AT&T 3b2, 3b5, 3b15, 3b20
1862 we32k-att-sysv* )
1863 machine=att3b opsys=usg5-2-2
1864 ;;
1865
1866 ## AT&T 3b1 - The Mighty Unix PC!
1867 m68*-att-sysv* )
1868 machine=7300 opsys=usg5-2-2
1869 ;;
1870
1871 ## Bull dpx20
1872 rs6000-bull-bosx* )
1873 machine=ibmrs6000 opsys=aix3-2
1874 ;;
1875
1876 ## Bull dpx2
1877 m68*-bull-sysv3* )
1878 machine=dpx2 opsys=usg5-3
1879 ;;
1880
1881 ## Bull sps7
1882 m68*-bull-sysv2* )
1883 machine=sps7 opsys=usg5-2
1884 ;;
1885
1886 ## CCI 5/32, 6/32 -- see "Tahoe".
1887
1888 ## Celerity
1889 ## I don't know what configuration name to use for this; config.sub
1890 ## doesn't seem to know anything about it. Hey, Celerity users, get
1891 ## in touch with us!
1892 celerity-celerity-bsd* )
1893 machine=celerity opsys=bsd4-2
1894 ;;
1895
1896 ## Clipper
1897 ## What operating systems does this chip run that Emacs has been
1898 ## tested on?
1899 clipper-* )
1900 machine=clipper
1901 ## We'll use the catch-all code at the bottom to guess the
1902 ## operating system.
1903 ;;
1904
df645f7c
AS
1905 ## Compaq Nonstop
1906 mips-compaq-nonstopux* )
1907 machine=nonstopux opsys=nonstopux
1908 ;;
1909
ba4481b5
DL
1910 ## Convex
1911 *-convex-bsd* | *-convex-convexos* )
1912 machine=convex opsys=bsd4-3
1913 ## Prevents spurious white space in makefiles - d.m.cooke@larc.nasa.gov
1914 NON_GNU_CPP="cc -E -P"
1915 ;;
1916
1917 ## Cubix QBx/386
1918 i[3456]86-cubix-sysv* )
1919 machine=intel386 opsys=usg5-3
1920 ;;
1921
1922 ## Cydra 5
1923 cydra*-cydrome-sysv* )
1924 machine=cydra5 opsys=usg5-3
1925 ;;
1926
1927 ## Data General AViiON Machines
1928 ## DG changed naming conventions with the release of 5.4.4.10, they
1929 ## dropped the initial 5.4 but left the intervening R. Because of the
1930 ## R this shouldn't conflict with older versions of the OS (which I
1931 ## think were named like dgux4.*). In addition, DG new AViiONs series
1932 ## uses either Motorola M88k or Intel Pentium CPUs.
1933 m88k-dg-dguxR4.* | m88k-dg-dgux4* )
1934 machine=aviion opsys=dgux4
1935 ;;
1936 m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* )
1937 ## This name is dgux5-4-3 instead of dgux5-4r3
1938 ## to avoid a file name conflict on MSDOS.
1939 machine=aviion opsys=dgux5-4-3
1940 ;;
1941 m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* )
1942 machine=aviion opsys=dgux5-4r2
1943 ;;
1944 m88k-dg-dgux* )
1945 machine=aviion opsys=dgux
1946 ;;
1947
1948 ## Data General AViiON Intel (x86) Machines
1949 ## Exists from 5.4.3 (current i586-dg-dguxR4.11)
1950 ## Ehud Karni, 1998-may-30, ehud@unix.simonwiesel.co.il
1951 i[345]86-dg-dguxR4* )
1952 machine=aviion-intel opsys=dgux4
1953 ;;
1954
1955 ## DECstations
1956 mips-dec-ultrix[0-3].* | mips-dec-ultrix4.0* | mips-dec-bsd4.2* )
1957 machine=pmax opsys=bsd4-2
1958 ;;
1959 mips-dec-ultrix4.[12]* | mips-dec-bsd* )
1960 machine=pmax opsys=bsd4-3
1961 ;;
1962 mips-dec-ultrix* )
1963 machine=pmax opsys=ultrix4-3
1964 ;;
1965 mips-dec-osf* )
1966 machine=pmax opsys=osf1
1967 ;;
1968 mips-dec-mach_bsd4.3* )
1969 machine=pmax opsys=mach-bsd4-3
1970 ;;
1971
cd890796
JD
1972 ## Motorola Delta machines
1973 m68k-motorola-sysv* | m68000-motorola-sysv* )
1974 machine=delta opsys=usg5-3
1975 if test -z "`type gnucc | grep 'not found'`"
1976 then
1977 if test -s /etc/167config
1978 then CC="gnucc -m68040"
1979 else CC="gnucc -m68881"
1980 fi
1981 else
1982 if test -z "`type gcc | grep 'not found'`"
1983 then CC=gcc
1984 else CC=cc
1985 fi
1986 fi
1987 ;;
ba4481b5
DL
1988 m88k-motorola-sysv4* )
1989 # jbotte@bnr.ca says that UNIX_System_V <hostName> 4.0 R40V4.3 m88k mc88110
1990 # needs POSIX_SIGNALS and therefore needs usg5-4-2.
1991 # I hope there are not other 4.0 versions for this machine
1992 # which really need usg5-4 instead.
1993 machine=delta88k opsys=usg5-4-2
1994 ;;
1995 m88k-motorola-sysv* | m88k-motorola-m88kbcs* )
1996 machine=delta88k opsys=usg5-3
1997 ;;
1998
1999 ## Dual machines
2000 m68*-dual-sysv* )
2001 machine=dual opsys=usg5-2
2002 ;;
2003 m68*-dual-uniplus* )
2004 machine=dual opsys=unipl5-2
2005 ;;
2006
2007 ## Elxsi 6400
2008 elxsi-elxsi-sysv* )
2009 machine=elxsi opsys=usg5-2
2010 ;;
2011
2012 ## Encore machines
2013 ns16k-encore-bsd* )
2014 machine=ns16000 opsys=umax
2015 ;;
2016
65171e3a
DL
2017 ## The GEC 63 - apparently, this port isn't really finished yet.
2018 # I'm sure we finished off the last of the machines, though. -- fx
ba4481b5
DL
2019
2020 ## Gould Power Node and NP1
2021 pn-gould-bsd4.2* )
2022 machine=gould opsys=bsd4-2
2023 ;;
2024 pn-gould-bsd4.3* )
2025 machine=gould opsys=bsd4-3
2026 ;;
2027 np1-gould-bsd* )
2028 machine=gould-np1 opsys=bsd4-3
2029 ;;
2030
2031 ## Harris Night Hawk machines running CX/UX (a 5000 looks just like a 4000
2032 ## as far as Emacs is concerned).
2033 m88k-harris-cxux* )
2034 # Build needs to be different on 7.0 and later releases
2035 case "`uname -r`" in
2036 [56].[0-9] ) machine=nh4000 opsys=cxux ;;
2037 [7].[0-9] ) machine=nh4000 opsys=cxux7 ;;
2038 esac
2039 NON_GNU_CPP="/lib/cpp"
2040 ;;
2041 ## Harris ecx or gcx running CX/UX (Series 1200, Series 3000)
2042 m68k-harris-cxux* )
2043 machine=nh3000 opsys=cxux
2044 ;;
2045 ## Harris power pc NightHawk running Power UNIX (Series 6000)
2046 powerpc-harris-powerunix )
2047 machine=nh6000 opsys=powerunix
2048 NON_GNU_CPP="cc -Xo -E -P"
2049 ;;
2050 ## SR2001/SR2201 running HI-UX/MPP
2051 hppa1.1-hitachi-hiuxmpp* )
2052 machine=sr2k opsys=hiuxmpp
2053 ;;
89a336fa
GM
2054 hppa1.1-hitachi-hiuxwe2* )
2055 machine=sr2k opsys=hiuxwe2
2056 ;;
ba4481b5
DL
2057 ## Honeywell XPS100
2058 xps*-honeywell-sysv* )
2059 machine=xps100 opsys=usg5-2
2060 ;;
2061
2062 ## HP 9000 series 200 or 300
2063 m68*-hp-bsd* )
2064 machine=hp9000s300 opsys=bsd4-3
2065 ;;
2066 ## HP/UX 7, 8, 9, and 10 are supported on these machines.
2067 m68*-hp-hpux* )
2068 case "`uname -r`" in
2069 ## Someone's system reports A.B8.05 for this.
2070 ## I wonder what other possibilities there are.
2071 *.B8.* ) machine=hp9000s300 opsys=hpux8 ;;
2072 *.08.* ) machine=hp9000s300 opsys=hpux8 ;;
2073 *.09.* ) machine=hp9000s300 opsys=hpux9 ;;
2074 *.1[0-9].* ) machine=hp9000s300 opsys=hpux9shr ;;
2075 *) machine=hp9000s300 opsys=hpux ;;
2076 esac
2077 ;;
2078
2079 ## HP 9000 series 700 and 800, running HP/UX
2080 hppa*-hp-hpux7* )
2081 machine=hp800 opsys=hpux
2082 ;;
2083 hppa*-hp-hpux8* )
2084 machine=hp800 opsys=hpux8
2085 ;;
2086 hppa*-hp-hpux9shr* )
2087 machine=hp800 opsys=hpux9shr
2088 ;;
2089 hppa*-hp-hpux9* )
2090 machine=hp800 opsys=hpux9
2091 ;;
b0e44248
RB
2092 hppa*-hp-hpux10.2* )
2093 machine=hp800 opsys=hpux10-20
2094 ;;
cc227489 2095 hppa*-hp-hpux10* )
ba4481b5
DL
2096 machine=hp800 opsys=hpux10
2097 ;;
cc227489
MB
2098 hppa*-hp-hpux1[1-9]* )
2099 machine=hp800 opsys=hpux11
7c00e1e9 2100 CFLAGS="-D_INCLUDE__STDC_A1_SOURCE $CFLAGS"
cc227489 2101 ;;
ba4481b5 2102
409d9577
GM
2103 hppa*-*-linux-gnu* )
2104 machine=hp800 opsys=gnu-linux
2105 ;;
2106
ba4481b5
DL
2107 ## HP 9000 series 700 and 800, running HP/UX
2108 hppa*-hp-hpux* )
2109 ## Cross-compilation? Nah!
2110 case "`uname -r`" in
2111 ## Someone's system reports A.B8.05 for this.
2112 ## I wonder what other possibilities there are.
2113 *.B8.* ) machine=hp800 opsys=hpux8 ;;
2114 *.08.* ) machine=hp800 opsys=hpux8 ;;
2115 *.09.* ) machine=hp800 opsys=hpux9 ;;
2116 *) machine=hp800 opsys=hpux10 ;;
2117 esac
2118 ;;
2119 hppa*-*-nextstep* )
2120 machine=hp800 opsys=nextstep
2121 ;;
2122
2123 ## Orion machines
2124 orion-orion-bsd* )
2125 machine=orion opsys=bsd4-2
2126 ;;
2127 clipper-orion-bsd* )
2128 machine=orion105 opsys=bsd4-2
2129 ;;
2130
2131 ## IBM machines
2132 i[3456]86-ibm-aix1.1* )
2133 machine=ibmps2-aix opsys=usg5-2-2
2134 ;;
2135 i[3456]86-ibm-aix1.[23]* | i[3456]86-ibm-aix* )
2136 machine=ibmps2-aix opsys=usg5-3
2137 ;;
2138 i370-ibm-aix*)
2139 machine=ibm370aix opsys=usg5-3
2140 ;;
55597d70 2141 s390-*-linux-gnu* )
138f0859
GM
2142 machine=ibms390 opsys=gnu-linux
2143 ;;
bcdb1378
EZ
2144 s390x-*-linux-gnu* )
2145 machine=ibms390x opsys=gnu-linux
2146 ;;
ba4481b5
DL
2147 rs6000-ibm-aix3.1* | powerpc-ibm-aix3.1* )
2148 machine=ibmrs6000 opsys=aix3-1
2149 ;;
2150 rs6000-ibm-aix3.2.5 | powerpc-ibm-aix3.2.5 )
2151 machine=ibmrs6000 opsys=aix3-2-5
2152 ;;
2153 rs6000-ibm-aix4.1* | powerpc-ibm-aix4.1* )
2154 machine=ibmrs6000 opsys=aix4-1
2155 ;;
2156 rs6000-ibm-aix4.2* | powerpc-ibm-aix4.2* )
2157 machine=ibmrs6000 opsys=aix4-2
2158 ;;
55597d70 2159 rs6000-ibm-aix5* | powerpc-ibm-aix5* )
d6b82250
EZ
2160 machine=ibmrs6000 opsys=aix4-2
2161 ;;
ba4481b5
DL
2162 rs6000-ibm-aix4.0* | powerpc-ibm-aix4.0* )
2163 machine=ibmrs6000 opsys=aix4
2164 ;;
2165 rs6000-ibm-aix4* | powerpc-ibm-aix4* )
2166 machine=ibmrs6000 opsys=aix4-1
2167 ;;
2168 rs6000-ibm-aix* | powerpc-ibm-aix* )
2169 machine=ibmrs6000 opsys=aix3-2
2170 ;;
2171 romp-ibm-bsd4.3* )
2172 machine=ibmrt opsys=bsd4-3
2173 ;;
2174 romp-ibm-bsd4.2* )
2175 machine=ibmrt opsys=bsd4-2
2176 ;;
2177 romp-ibm-aos4.3* )
2178 machine=ibmrt opsys=bsd4-3
2179 ;;
2180 romp-ibm-aos4.2* )
2181 machine=ibmrt opsys=bsd4-2
2182 ;;
2183 romp-ibm-aos* )
2184 machine=ibmrt opsys=bsd4-3
2185 ;;
2186 romp-ibm-bsd* )
2187 machine=ibmrt opsys=bsd4-3
2188 ;;
2189 romp-ibm-aix* )
2190 machine=ibmrt-aix opsys=usg5-2-2
2191 ;;
2192
2193 ## Integrated Solutions `Optimum V'
2194 m68*-isi-bsd4.2* )
2195 machine=isi-ov opsys=bsd4-2
2196 ;;
2197 m68*-isi-bsd4.3* )
2198 machine=isi-ov opsys=bsd4-3
2199 ;;
2200
2201 ## Intel 386 machines where we do care about the manufacturer
2202 i[3456]86-intsys-sysv* )
2203 machine=is386 opsys=usg5-2-2
2204 ;;
2205
2206 ## Prime EXL
2207 i[3456]86-prime-sysv* )
2208 machine=i386 opsys=usg5-3
2209 ;;
2210
2211 ## Sequent Symmetry running Dynix
2212 i[3456]86-sequent-bsd* )
2213 machine=symmetry opsys=bsd4-3
2214 ;;
2215
2216 ## Sequent Symmetry running ptx 4, which is a modified SVR4.
2217 i[3456]86-sequent-ptx4* | i[3456]86-sequent-sysv4* )
2218 machine=sequent-ptx opsys=ptx4
2219 NON_GNU_CPP=/lib/cpp
2220 ;;
2221
2222 ## Sequent Symmetry running DYNIX/ptx
2223 ## Use the old cpp rather than the newer ANSI one.
2224 i[3456]86-sequent-ptx* )
2225 machine=sequent-ptx opsys=ptx
2226 NON_GNU_CPP="/lib/cpp"
2227 ;;
2228
2229 ## ncr machine running svr4.3.
2230 i[3456]86-ncr-sysv4.3 )
2231 machine=ncr386 opsys=usg5-4-3
2232 ;;
2233
2234 ## Unspecified sysv on an ncr machine defaults to svr4.2.
2235 ## (Plain usg5-4 doesn't turn on POSIX signals, which we need.)
2236 i[3456]86-ncr-sysv* )
2237 machine=ncr386 opsys=usg5-4-2
2238 ;;
2239
2240 ## Intel Paragon OSF/1
2241 i860-intel-osf1* )
2242 machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp
2243 ;;
2244
2245 ## Intel 860
2246 i860-*-sysv4* )
2247 machine=i860 opsys=usg5-4
2248 NON_GNU_CC="/bin/cc" # Ie, not the one in /usr/ucb/cc.
2249 NON_GNU_CPP="/usr/ccs/lib/cpp" # cc -E tokenizes macro expansion.
2250 ;;
2251
c76e04a8
GM
2252 ## Macintosh PowerPC
2253 powerpc*-*-linux-gnu* )
2254 machine=macppc opsys=gnu-linux
2255 ;;
2256
ba4481b5
DL
2257 ## Masscomp machines
2258 m68*-masscomp-rtu* )
2259 machine=masscomp opsys=rtu
2260 ;;
2261
2262 ## Megatest machines
2263 m68*-megatest-bsd* )
2264 machine=mega68 opsys=bsd4-2
2265 ;;
2266
2267 ## Workstations sold by MIPS
2268 ## This is not necessarily all workstations using the MIPS processor -
2269 ## Irises are produced by SGI, and DECstations by DEC.
2270
2271 ## etc/MACHINES lists mips.h and mips4.h as possible machine files,
2272 ## and usg5-2-2 and bsd4-3 as possible OS files. The only guidance
2273 ## it gives for choosing between the alternatives seems to be "Use
2274 ## -machine=mips4 for RISCOS version 4; use -opsystem=bsd4-3 with
2275 ## the BSD world." I'll assume that these are instructions for
2276 ## handling two odd situations, and that every other situation
2277 ## should use mips.h and usg5-2-2, they being listed first.
2278 mips-mips-usg* )
2279 machine=mips4
2280 ## Fall through to the general code at the bottom to decide on the OS.
2281 ;;
2282 mips-mips-riscos4* )
2283 machine=mips4 opsys=bsd4-3
2284 NON_GNU_CC="cc -systype bsd43"
2285 NON_GNU_CPP="cc -systype bsd43 -E"
2286 ;;
2287 mips-mips-riscos5* )
2288 machine=mips4 opsys=riscos5
2289 NON_GNU_CC="cc -systype bsd43"
2290 NON_GNU_CPP="cc -systype bsd43 -E"
2291 ;;
2292 mips-mips-bsd* )
2293 machine=mips opsys=bsd4-3
2294 ;;
2295 mips-mips-* )
2296 machine=mips opsys=usg5-2-2
2297 ;;
2298
2299 ## NeXT
2300 m68*-next-* | m68k-*-nextstep* )
2301 machine=m68k opsys=nextstep
2302 ;;
2303
2304 ## The complete machine from National Semiconductor
2305 ns32k-ns-genix* )
2306 machine=ns32000 opsys=usg5-2
2307 ;;
2308
2309 ## NCR machines
2310 m68*-ncr-sysv2* | m68*-ncr-sysvr2* )
2311 machine=tower32 opsys=usg5-2-2
2312 ;;
2313 m68*-ncr-sysv3* | m68*-ncr-sysvr3* )
2314 machine=tower32v3 opsys=usg5-3
2315 ;;
2316
2317 ## NEC EWS4800
2318 mips-nec-sysv4*)
2319 machine=ews4800 opsys=ux4800
2320 ;;
2321
2322 ## Nixdorf Targon 31
2323 m68*-nixdorf-sysv* )
2324 machine=targon31 opsys=usg5-2-2
2325 ;;
2326
2327 ## Nu (TI or LMI)
2328 m68*-nu-sysv* )
2329 machine=nu opsys=usg5-2
2330 ;;
2331
2332 ## Plexus
2333 m68*-plexus-sysv* )
2334 machine=plexus opsys=usg5-2
2335 ;;
2336
ba4481b5
DL
2337 ## Pyramid machines
2338 ## I don't really have any idea what sort of processor the Pyramid has,
2339 ## so I'm assuming it is its own architecture.
2340 pyramid-pyramid-bsd* )
2341 machine=pyramid opsys=bsd4-2
2342 ;;
2343
2344 ## Sequent Balance
2345 ns32k-sequent-bsd4.2* )
2346 machine=sequent opsys=bsd4-2
2347 ;;
2348 ns32k-sequent-bsd4.3* )
2349 machine=sequent opsys=bsd4-3
2350 ;;
2351
2352 ## Siemens Nixdorf
2353 mips-siemens-sysv* | mips-sni-sysv*)
2354 machine=mips-siemens opsys=usg5-4
2355 NON_GNU_CC=/usr/ccs/bin/cc
2356 NON_GNU_CPP=/usr/ccs/lib/cpp
2357 ;;
2358
2359 ## Silicon Graphics machines
2360 ## Iris 2500 and Iris 2500 Turbo (aka the Iris 3030)
2361 m68*-sgi-iris3.5* )
2362 machine=irist opsys=iris3-5
2363 ;;
2364 m68*-sgi-iris3.6* | m68*-sgi-iris*)
2365 machine=irist opsys=iris3-6
2366 ;;
2367 ## Iris 4D
2368 mips-sgi-irix3* )
2369 machine=iris4d opsys=irix3-3
2370 ;;
2371 mips-sgi-irix4* )
2372 machine=iris4d opsys=irix4-0
2373 ;;
2374 mips-sgi-irix6.5 )
2375 machine=iris4d opsys=irix6-5
946173ad
DL
2376 # Without defining _LANGUAGE_C, things get masked out in the headers
2377 # so that, for instance, grepping for `free' in stdlib.h fails and
2378 # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
2379 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
d42122a3 2380 NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C"
ba4481b5
DL
2381 ;;
2382 mips-sgi-irix6* )
2383 machine=iris4d opsys=irix6-0
c4bb2108 2384 # It's not clear whether -D_LANGUAGE_C is necessary as it is for 6.5,
946173ad
DL
2385 # but presumably it does no harm.
2386 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
d42122a3 2387 # -32 probably isn't necessary in later v.6s -- anyone know which?
ba4481b5
DL
2388 NON_GCC_TEST_OPTIONS=-32
2389 ;;
2390 mips-sgi-irix5.[01]* )
2391 machine=iris4d opsys=irix5-0
2392 ;;
2393 mips-sgi-irix5* | mips-sgi-irix* )
2394 machine=iris4d opsys=irix5-2
2395 ;;
2396
2397 ## SONY machines
2398 m68*-sony-bsd4.2* )
2399 machine=news opsys=bsd4-2
2400 ;;
2401 m68*-sony-bsd4.3* )
2402 machine=news opsys=bsd4-3
2403 ;;
2404 m68*-sony-newsos3* | m68*-sony-news3*)
2405 machine=news opsys=bsd4-3
2406 ;;
2407 mips-sony-bsd* | mips-sony-newsos4* | mips-sony-news4*)
2408 machine=news-risc opsys=bsd4-3
2409 ;;
2410 mips-sony-newsos6* )
2411 machine=news-r6 opsys=newsos6
2412 ;;
2413 mips-sony-news* )
2414 machine=news-risc opsys=newsos5
2415 ;;
2416
2417 ## Stride
2418 m68*-stride-sysv* )
2419 machine=stride opsys=usg5-2
2420 ;;
2421
2422 ## Suns
2423 sparc-*-linux-gnu* | sparc64-*-linux-gnu* )
2424 machine=sparc opsys=gnu-linux
2425 ;;
2426
d054101f 2427 *-auspex-sunos* | *-sun-sunos* | *-sun-bsd* | *-sun-solaris* \
ba4481b5
DL
2428 | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* | powerpc*-*-solaris2* \
2429 | rs6000-*-solaris2*)
2430 case "${canonical}" in
2431 m68*-sunos1* ) machine=sun1 ;;
2432 m68*-sunos2* ) machine=sun2 ;;
2433 m68* ) machine=sun3 ;;
2434 i[3456]86-sun-sunos[34]* ) machine=sun386 ;;
2435 i[3456]86-*-* ) machine=intel386 ;;
2436 powerpcle* ) machine=powerpcle ;;
2437 powerpc* | rs6000* ) machine=ibmrs6000 ;;
2438 sparc* ) machine=sparc ;;
2439 * ) unported=yes ;;
2440 esac
2441 case "${canonical}" in
2442 ## The Sun386 didn't get past 4.0.
2443 i[3456]86-*-sunos4 ) opsys=sunos4-0 ;;
2444 *-sunos4.0* ) opsys=sunos4-0 ;;
2445 *-sunos4.1.[3-9]*noshare )
2446 ## This name is sunos413 instead of sunos4-1-3
2447 ## to avoid a file name conflict on MSDOS.
2448 opsys=sunos413
2449 NON_GNU_CPP=/usr/lib/cpp
2450 NON_GCC_TEST_OPTIONS=-Bstatic
2451 GCC_TEST_OPTIONS=-static
2452 ;;
2453 *-sunos4.1.[3-9]* | *-sunos4shr*)
2454 opsys=sunos4shr
2455 NON_GNU_CPP=/usr/lib/cpp
2456 ;;
2457 *-sunos4* | *-sunos )
2458 opsys=sunos4-1
2459 NON_GCC_TEST_OPTIONS=-Bstatic
2460 GCC_TEST_OPTIONS=-static
2461 ;;
2462 *-sunos5.3* | *-solaris2.3* )
2463 opsys=sol2-3
2464 NON_GNU_CPP=/usr/ccs/lib/cpp
2465 ;;
2466 *-sunos5.4* | *-solaris2.4* )
2467 opsys=sol2-4
2468 NON_GNU_CPP=/usr/ccs/lib/cpp
2469 RANLIB="ar -ts"
2470 ;;
2471 *-sunos5.5* | *-solaris2.5* )
2472 opsys=sol2-5
2473 NON_GNU_CPP=/usr/ccs/lib/cpp
2474 RANLIB="ar -ts"
2475 ;;
8e967cf7
MR
2476 *-sunos5.6* | *-solaris2.6* )
2477 opsys=sol2-6
2478 NON_GNU_CPP=/usr/ccs/lib/cpp
2479 RANLIB="ar -ts"
2480 ;;
ba4481b5 2481 *-sunos5* | *-solaris* )
9e71690e 2482 opsys=sol2-6
ba4481b5
DL
2483 NON_GNU_CPP=/usr/ccs/lib/cpp
2484 ;;
2485 * ) opsys=bsd4-2 ;;
2486 esac
2487 ## Watch out for a compiler that we know will not work.
2488 case "${canonical}" in
2489 *-solaris* | *-sunos5* )
2490 if [ "x$CC" = x/usr/ucb/cc ]; then
2491 ## /usr/ucb/cc doesn't work;
2492 ## we should find some other compiler that does work.
2493 unset CC
2494 fi
2495 ;;
2496 *) ;;
2497 esac
2498 ;;
2499 sparc-*-nextstep* )
2500 machine=sparc opsys=nextstep
2501 ;;
2502
2503 ## Tadpole 68k
2504 m68*-tadpole-sysv* )
2505 machine=tad68k opsys=usg5-3
2506 ;;
2507
2508 ## Tahoe machines
2509 tahoe-tahoe-bsd4.2* )
2510 machine=tahoe opsys=bsd4-2
2511 ;;
2512 tahoe-tahoe-bsd4.3* )
2513 machine=tahoe opsys=bsd4-3
2514 ;;
2515
2516 ## Tandem Integrity S2
2517 mips-tandem-sysv* )
2518 machine=tandem-s2 opsys=usg5-3
2519 ;;
2520
2521 ## Tektronix XD88
2522 m88k-tektronix-sysv3* )
2523 machine=tekxd88 opsys=usg5-3
2524 ;;
2525
2526 ## Tektronix 16000 box (6130?)
2527 ns16k-tektronix-bsd* )
2528 machine=ns16000 opsys=bsd4-2
2529 ;;
2530 ## Tektronix 4300
2531 ## src/m/tek4300.h hints that this is a m68k machine.
2532 m68*-tektronix-bsd* )
2533 machine=tek4300 opsys=bsd4-3
2534 ;;
2535
2536 ## Titan P2 or P3
2537 ## We seem to have lost the machine-description file titan.h!
2538 titan-titan-sysv* )
2539 machine=titan opsys=usg5-3
2540 ;;
2541
2542 ## Ustation E30 (SS5E)
2543 m68*-unisys-uniplus* )
2544 machine=ustation opsystem=unipl5-2
2545 ;;
2546
2547 ## Vaxen.
2548 vax-dec-* )
2549 machine=vax
2550 case "${canonical}" in
2551 *-bsd4.1* ) opsys=bsd4-1 ;;
2552 *-bsd4.2* | *-ultrix[0-3].* | *-ultrix4.0* ) opsys=bsd4-2 ;;
2553 *-bsd4.3* | *-ultrix* ) opsys=bsd4-3 ;;
2554 *-sysv[01]* | *-sysvr[01]* ) opsys=usg5-0 ;;
2555 *-sysv2* | *-sysvr2* ) opsys=usg5-2 ;;
2556 *-vms* ) opsys=vms ;;
2557 * ) unported=yes
2558 esac
2559 ;;
2560
2561 ## Whitechapel MG1
2562 ns16k-whitechapel-* )
2563 machine=mg1
2564 ## We don't know what sort of OS runs on these; we'll let the
2565 ## operating system guessing code below try.
2566 ;;
2567
2568 ## Wicat
2569 m68*-wicat-sysv* )
2570 machine=wicat opsys=usg5-2
2571 ;;
2572
f4988be7
GM
2573 ## IA-64
2574 ia64*-*-linux* )
2575 machine=ia64 opsys=gnu-linux
2576 ;;
2577
ba4481b5
DL
2578 ## Intel 386 machines where we don't care about the manufacturer
2579 i[3456]86-*-* )
2580 machine=intel386
2581 case "${canonical}" in
c60ee5e7 2582 *-cygwin ) opsys=cygwin ;;
eae54018 2583 *-darwin* ) opsys=darwin
23fd4483
ST
2584 CPP="${CC-cc} -E -no-cpp-precomp"
2585 ;;
ba4481b5
DL
2586 *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
2587 *-isc2.2* ) opsys=isc2-2 ;;
2588 *-isc4.0* ) opsys=isc4-0 ;;
2589 *-isc4.* ) opsys=isc4-1
2590 GCC_TEST_OPTIONS=-posix
2591 NON_GCC_TEST_OPTIONS=-Xp
2592 ;;
2593 *-isc* ) opsys=isc3-0 ;;
2594 *-esix5* ) opsys=esix5r4; NON_GNU_CPP=/usr/lib/cpp ;;
2595 *-esix* ) opsys=esix ;;
2596 *-xenix* ) opsys=xenix ;;
2597 *-linux-gnu* ) opsys=gnu-linux ;;
2598 *-sco3.2v4* ) opsys=sco4 ; NON_GNU_CPP=/lib/cpp ;;
503d2be0 2599 *-sco3.2v5* ) opsys=sco5
ba4481b5
DL
2600 NON_GNU_CPP=/lib/cpp
2601 # Prevent -belf from being passed to $CPP.
2602 # /lib/cpp does not accept it.
2603 OVERRIDE_CPPFLAGS=" "
2604 ;;
2605 *-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
55597d70
DL
2606 *-sysv5uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
2607 *-sysv5OpenUNIX* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
ba4481b5 2608 *-386bsd* ) opsys=386bsd ;;
ba4481b5
DL
2609 *-nextstep* ) opsys=nextstep ;;
2610 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
2611 esac
2612 ;;
2613
2614 ## m68k Linux-based GNU system
2615 m68k-*-linux-gnu* )
2616 machine=m68k opsys=gnu-linux
2617 ;;
2618
2619 ## Mips Linux-based GNU system
cd958eb3 2620 mips-*-linux-gnu* | mipsel-*-linux-gnu* )
ba4481b5
DL
2621 machine=mips opsys=gnu-linux
2622 ;;
2623
2624 ## UXP/DS
2625 sparc-fujitsu-sysv4* )
2626 machine=sparc opsys=uxpds
2627 NON_GNU_CPP=/usr/ccs/lib/cpp
2628 RANLIB="ar -ts"
2629 ;;
2630
2631 ## UXP/V
2632 f301-fujitsu-uxpv4.1)
2633 machine=f301 opsys=uxpv
2634 ;;
2635
e0f712ba
AC
2636 ## Darwin / Mac OS X
2637 powerpc-apple-darwin* )
2638 machine=powermac opsys=darwin
2639 # Define CPP as follows to make autoconf work correctly.
2a75d75d 2640 CPP="${CC-cc} -E -no-cpp-precomp"
8ae52ca6
RF
2641 # Use fink packages if available.
2642 if test -d /sw/include && test -d /sw/lib; then
2643 GCC_TEST_OPTIONS="-I/sw/include -L/sw/lib"
2644 CPP="${CPP} ${GCC_TEST_OPTIONS}"
2645 NON_GCC_TEST_OPTIONS=${GCC_TEST_OPTIONS}
2646 fi
e0f712ba
AC
2647 ;;
2648
598a2813
AS
2649 ## AMD x86-64 Linux-based GNU system
2650 x86_64-*-linux-gnu* )
24b01ec4 2651 machine=amdx86-64 opsys=gnu-linux
598a2813
AS
2652 ;;
2653
ba4481b5
DL
2654 * )
2655 unported=yes
2656 ;;
2657esac
2658
2659### If the code above didn't choose an operating system, just choose
2660### an operating system based on the configuration name. You really
2661### only want to use this when you have no idea what the right
2662### operating system is; if you know what operating systems a machine
2663### runs, it's cleaner to make it explicit in the case statement
2664### above.
2665if test x"${opsys}" = x; then
2666 case "${canonical}" in
2667 *-gnu* ) opsys=gnu ;;
2668 *-bsd4.[01] ) opsys=bsd4-1 ;;
2669 *-bsd4.2 ) opsys=bsd4-2 ;;
2670 *-bsd4.3 ) opsys=bsd4-3 ;;
2671 *-sysv0 | *-sysvr0 ) opsys=usg5-0 ;;
2672 *-sysv2 | *-sysvr2 ) opsys=usg5-2 ;;
2673 *-sysv2.2 | *-sysvr2.2 ) opsys=usg5-2-2 ;;
2674 *-sysv3* | *-sysvr3* ) opsys=usg5-3 ;;
2675 *-sysv4.2uw* ) opsys=unixware ;;
55597d70
DL
2676 *-sysv5uw* ) opsys=unixware ;;
2677 *-sysv5OpenUNIX* ) opsys=unixware ;;
ba4481b5
DL
2678 *-sysv4.1* | *-sysvr4.1* )
2679 NON_GNU_CPP=/usr/lib/cpp
2680 opsys=usg5-4 ;;
2681 *-sysv4.[2-9]* | *-sysvr4.[2-9]* )
2682 if [ x$NON_GNU_CPP = x ]; then
2683 if [ -f /usr/ccs/lib/cpp ]; then
2684 NON_GNU_CPP=/usr/ccs/lib/cpp
2685 else
2686 NON_GNU_CPP=/lib/cpp
2687 fi
2688 fi
2689 opsys=usg5-4-2 ;;
2690 *-sysv4* | *-sysvr4* ) opsys=usg5-4 ;;
2691 * )
2692 unported=yes
2693 ;;
2694 esac
2695fi
2696
c0d27fcc 2697
22044edf 2698
ba4481b5 2699if test $unported = yes; then
c0d27fcc 2700 { { echo "$as_me:$LINENO: error: Emacs hasn't been ported to \`${canonical}' systems.
503d2be0
AS
2701Check \`etc/MACHINES' for recognized configuration names." >&5
2702echo "$as_me: error: Emacs hasn't been ported to \`${canonical}' systems.
2703Check \`etc/MACHINES' for recognized configuration names." >&2;}
2704 { (exit 1); exit 1; }; }
ba4481b5
DL
2705fi
2706
2707machfile="m/${machine}.h"
2708opsysfile="s/${opsys}.h"
2709
c0d27fcc 2710
ba4481b5
DL
2711#### Choose a compiler.
2712test -n "$CC" && cc_specified=yes
2713
2714# Save the value of CFLAGS that the user specified.
2715SPECIFIED_CFLAGS="$CFLAGS"
2716
2717case ${with_gcc} in
2718 "yes" ) CC="gcc" GCC=yes ;;
2719 "no" ) : ${CC=cc} ;;
503d2be0
AS
2720 * )
2721esac
2722ac_ext=c
2723ac_cpp='$CPP $CPPFLAGS'
2724ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2725ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2726ac_compiler_gnu=$ac_cv_c_compiler_gnu
2727if test -n "$ac_tool_prefix"; then
2728 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2729set dummy ${ac_tool_prefix}gcc; ac_word=$2
c0d27fcc 2730echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2731echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2732if test "${ac_cv_prog_CC+set}" = set; then
2733 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
2734else
2735 if test -n "$CC"; then
2736 ac_cv_prog_CC="$CC" # Let the user override the test.
2737else
c0d27fcc
MR
2738as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2739for as_dir in $PATH
2740do
2741 IFS=$as_save_IFS
2742 test -z "$as_dir" && as_dir=.
2743 for ac_exec_ext in '' $ac_executable_extensions; do
2744 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2745 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2746 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2747 break 2
2748 fi
2749done
503d2be0
AS
2750done
2751
ba4481b5
DL
2752fi
2753fi
503d2be0 2754CC=$ac_cv_prog_CC
ba4481b5 2755if test -n "$CC"; then
c0d27fcc 2756 echo "$as_me:$LINENO: result: $CC" >&5
503d2be0
AS
2757echo "${ECHO_T}$CC" >&6
2758else
c0d27fcc 2759 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
2760echo "${ECHO_T}no" >&6
2761fi
2762
2763fi
2764if test -z "$ac_cv_prog_CC"; then
2765 ac_ct_CC=$CC
2766 # Extract the first word of "gcc", so it can be a program name with args.
2767set dummy gcc; ac_word=$2
c0d27fcc 2768echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2769echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2770if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2771 echo $ECHO_N "(cached) $ECHO_C" >&6
2772else
2773 if test -n "$ac_ct_CC"; then
2774 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2775else
c0d27fcc
MR
2776as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2777for as_dir in $PATH
2778do
2779 IFS=$as_save_IFS
2780 test -z "$as_dir" && as_dir=.
2781 for ac_exec_ext in '' $ac_executable_extensions; do
2782 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2783 ac_cv_prog_ac_ct_CC="gcc"
2784 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2785 break 2
2786 fi
2787done
503d2be0
AS
2788done
2789
2790fi
2791fi
2792ac_ct_CC=$ac_cv_prog_ac_ct_CC
2793if test -n "$ac_ct_CC"; then
c0d27fcc 2794 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
503d2be0 2795echo "${ECHO_T}$ac_ct_CC" >&6
ba4481b5 2796else
c0d27fcc 2797 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
2798echo "${ECHO_T}no" >&6
2799fi
2800
2801 CC=$ac_ct_CC
2802else
2803 CC="$ac_cv_prog_CC"
ba4481b5
DL
2804fi
2805
2806if test -z "$CC"; then
503d2be0
AS
2807 if test -n "$ac_tool_prefix"; then
2808 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2809set dummy ${ac_tool_prefix}cc; ac_word=$2
c0d27fcc 2810echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2811echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2812if test "${ac_cv_prog_CC+set}" = set; then
2813 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
2814else
2815 if test -n "$CC"; then
2816 ac_cv_prog_CC="$CC" # Let the user override the test.
2817else
c0d27fcc
MR
2818as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2819for as_dir in $PATH
2820do
2821 IFS=$as_save_IFS
2822 test -z "$as_dir" && as_dir=.
2823 for ac_exec_ext in '' $ac_executable_extensions; do
2824 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2825 ac_cv_prog_CC="${ac_tool_prefix}cc"
2826 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2827 break 2
2828 fi
2829done
503d2be0
AS
2830done
2831
2832fi
2833fi
2834CC=$ac_cv_prog_CC
2835if test -n "$CC"; then
c0d27fcc 2836 echo "$as_me:$LINENO: result: $CC" >&5
503d2be0
AS
2837echo "${ECHO_T}$CC" >&6
2838else
c0d27fcc 2839 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
2840echo "${ECHO_T}no" >&6
2841fi
2842
2843fi
2844if test -z "$ac_cv_prog_CC"; then
2845 ac_ct_CC=$CC
2846 # Extract the first word of "cc", so it can be a program name with args.
2847set dummy cc; ac_word=$2
c0d27fcc 2848echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2849echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2850if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2851 echo $ECHO_N "(cached) $ECHO_C" >&6
2852else
2853 if test -n "$ac_ct_CC"; then
2854 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2855else
c0d27fcc
MR
2856as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2857for as_dir in $PATH
2858do
2859 IFS=$as_save_IFS
2860 test -z "$as_dir" && as_dir=.
2861 for ac_exec_ext in '' $ac_executable_extensions; do
2862 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2863 ac_cv_prog_ac_ct_CC="cc"
2864 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2865 break 2
2866 fi
2867done
503d2be0
AS
2868done
2869
2870fi
2871fi
2872ac_ct_CC=$ac_cv_prog_ac_ct_CC
2873if test -n "$ac_ct_CC"; then
c0d27fcc 2874 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
503d2be0
AS
2875echo "${ECHO_T}$ac_ct_CC" >&6
2876else
c0d27fcc 2877 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
2878echo "${ECHO_T}no" >&6
2879fi
2880
2881 CC=$ac_ct_CC
2882else
2883 CC="$ac_cv_prog_CC"
2884fi
2885
2886fi
2887if test -z "$CC"; then
2888 # Extract the first word of "cc", so it can be a program name with args.
2889set dummy cc; ac_word=$2
c0d27fcc 2890echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2891echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2892if test "${ac_cv_prog_CC+set}" = set; then
2893 echo $ECHO_N "(cached) $ECHO_C" >&6
2894else
2895 if test -n "$CC"; then
2896 ac_cv_prog_CC="$CC" # Let the user override the test.
2897else
2898 ac_prog_rejected=no
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 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2907 ac_prog_rejected=yes
2908 continue
2909 fi
2910 ac_cv_prog_CC="cc"
2911 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2912 break 2
2913 fi
2914done
503d2be0
AS
2915done
2916
ba4481b5
DL
2917if test $ac_prog_rejected = yes; then
2918 # We found a bogon in the path, so make sure we never use it.
2919 set dummy $ac_cv_prog_CC
2920 shift
503d2be0 2921 if test $# != 0; then
ba4481b5
DL
2922 # We chose a different compiler from the bogus one.
2923 # However, it has the same basename, so the bogon will be chosen
2924 # first if we set CC to just the basename; use the full file name.
2925 shift
6bae0ccf 2926 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
ba4481b5
DL
2927 fi
2928fi
2929fi
2930fi
503d2be0 2931CC=$ac_cv_prog_CC
ba4481b5 2932if test -n "$CC"; then
c0d27fcc 2933 echo "$as_me:$LINENO: result: $CC" >&5
503d2be0 2934echo "${ECHO_T}$CC" >&6
ba4481b5 2935else
c0d27fcc 2936 echo "$as_me:$LINENO: result: no" >&5
503d2be0 2937echo "${ECHO_T}no" >&6
ba4481b5
DL
2938fi
2939
503d2be0
AS
2940fi
2941if test -z "$CC"; then
2942 if test -n "$ac_tool_prefix"; then
2943 for ac_prog in cl
2944 do
2945 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2946set dummy $ac_tool_prefix$ac_prog; ac_word=$2
c0d27fcc 2947echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2948echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2949if test "${ac_cv_prog_CC+set}" = set; then
2950 echo $ECHO_N "(cached) $ECHO_C" >&6
c4bb2108
DL
2951else
2952 if test -n "$CC"; then
2953 ac_cv_prog_CC="$CC" # Let the user override the test.
2954else
c0d27fcc
MR
2955as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2956for as_dir in $PATH
2957do
2958 IFS=$as_save_IFS
2959 test -z "$as_dir" && as_dir=.
2960 for ac_exec_ext in '' $ac_executable_extensions; do
2961 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2962 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2963 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2964 break 2
2965 fi
2966done
503d2be0
AS
2967done
2968
c4bb2108
DL
2969fi
2970fi
503d2be0 2971CC=$ac_cv_prog_CC
c4bb2108 2972if test -n "$CC"; then
c0d27fcc 2973 echo "$as_me:$LINENO: result: $CC" >&5
503d2be0 2974echo "${ECHO_T}$CC" >&6
c4bb2108 2975else
c0d27fcc 2976 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
2977echo "${ECHO_T}no" >&6
2978fi
2979
2980 test -n "$CC" && break
2981 done
2982fi
2983if test -z "$CC"; then
2984 ac_ct_CC=$CC
2985 for ac_prog in cl
2986do
2987 # Extract the first word of "$ac_prog", so it can be a program name with args.
2988set dummy $ac_prog; ac_word=$2
c0d27fcc 2989echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2990echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2991if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2992 echo $ECHO_N "(cached) $ECHO_C" >&6
2993else
2994 if test -n "$ac_ct_CC"; then
2995 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2996else
c0d27fcc
MR
2997as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2998for as_dir in $PATH
2999do
3000 IFS=$as_save_IFS
3001 test -z "$as_dir" && as_dir=.
3002 for ac_exec_ext in '' $ac_executable_extensions; do
3003 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3004 ac_cv_prog_ac_ct_CC="$ac_prog"
3005 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3006 break 2
3007 fi
3008done
503d2be0
AS
3009done
3010
c4bb2108 3011fi
503d2be0
AS
3012fi
3013ac_ct_CC=$ac_cv_prog_ac_ct_CC
3014if test -n "$ac_ct_CC"; then
c0d27fcc 3015 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
503d2be0
AS
3016echo "${ECHO_T}$ac_ct_CC" >&6
3017else
c0d27fcc 3018 echo "$as_me:$LINENO: result: no" >&5
503d2be0 3019echo "${ECHO_T}no" >&6
ba4481b5
DL
3020fi
3021
503d2be0
AS
3022 test -n "$ac_ct_CC" && break
3023done
ba4481b5 3024
503d2be0
AS
3025 CC=$ac_ct_CC
3026fi
3027
3028fi
ba4481b5 3029
c0d27fcc 3030
19650fd6
AS
3031test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
3032See \`config.log' for more details." >&5
3033echo "$as_me: error: no acceptable C compiler found in \$PATH
3034See \`config.log' for more details." >&2;}
503d2be0 3035 { (exit 1); exit 1; }; }
c4bb2108 3036
503d2be0 3037# Provide some information about the compiler.
c0d27fcc 3038echo "$as_me:$LINENO:" \
503d2be0
AS
3039 "checking for C compiler version" >&5
3040ac_compiler=`set X $ac_compile; echo $2`
c0d27fcc 3041{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
503d2be0
AS
3042 (eval $ac_compiler --version </dev/null >&5) 2>&5
3043 ac_status=$?
c0d27fcc 3044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3045 (exit $ac_status); }
c0d27fcc 3046{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
503d2be0
AS
3047 (eval $ac_compiler -v </dev/null >&5) 2>&5
3048 ac_status=$?
c0d27fcc 3049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3050 (exit $ac_status); }
c0d27fcc 3051{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
503d2be0
AS
3052 (eval $ac_compiler -V </dev/null >&5) 2>&5
3053 ac_status=$?
c0d27fcc 3054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3055 (exit $ac_status); }
3056
3057cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3058/* confdefs.h. */
3059_ACEOF
3060cat confdefs.h >>conftest.$ac_ext
3061cat >>conftest.$ac_ext <<_ACEOF
3062/* end confdefs.h. */
c4bb2108 3063
503d2be0
AS
3064int
3065main ()
3066{
3067
3068 ;
3069 return 0;
3070}
3071_ACEOF
3072ac_clean_files_save=$ac_clean_files
19650fd6 3073ac_clean_files="$ac_clean_files a.out a.exe b.out"
503d2be0
AS
3074# Try to create an executable without -o first, disregard a.out.
3075# It will help us diagnose broken compilers, and finding out an intuition
3076# of exeext.
edfaf76d
LK
3077echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
3078echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
503d2be0 3079ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
c0d27fcc 3080if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
503d2be0
AS
3081 (eval $ac_link_default) 2>&5
3082 ac_status=$?
c0d27fcc 3083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3084 (exit $ac_status); }; then
3085 # Find the output, starting from the most likely. This scheme is
3086# not robust to junk in `.', hence go to wildcards (a.*) only as a last
3087# resort.
c0d27fcc
MR
3088
3089# Be careful to initialize this variable, since it used to be cached.
3090# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
3091ac_cv_exeext=
19650fd6
AS
3092# b.out is created by i960 compilers.
3093for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
3094do
6bae0ccf 3095 test -f "$ac_file" || continue
503d2be0 3096 case $ac_file in
19650fd6 3097 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
edfaf76d 3098 ;;
19650fd6 3099 conftest.$ac_ext )
edfaf76d
LK
3100 # This is the source file.
3101 ;;
19650fd6 3102 [ab].out )
edfaf76d
LK
3103 # We found the default executable, but exeext='' is most
3104 # certainly right.
3105 break;;
19650fd6 3106 *.* )
edfaf76d
LK
3107 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3108 # FIXME: I believe we export ac_cv_exeext for Libtool,
3109 # but it would be cool to find out if it's true. Does anybody
3110 # maintain Libtool? --akim.
3111 export ac_cv_exeext
3112 break;;
19650fd6 3113 * )
edfaf76d 3114 break;;
503d2be0
AS
3115 esac
3116done
3117else
3118 echo "$as_me: failed program was:" >&5
19650fd6
AS
3119sed 's/^/| /' conftest.$ac_ext >&5
3120
6bae0ccf 3121{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
19650fd6 3122See \`config.log' for more details." >&5
6bae0ccf 3123echo "$as_me: error: C compiler cannot create executables
19650fd6 3124See \`config.log' for more details." >&2;}
503d2be0
AS
3125 { (exit 77); exit 77; }; }
3126fi
3127
3128ac_exeext=$ac_cv_exeext
c0d27fcc 3129echo "$as_me:$LINENO: result: $ac_file" >&5
503d2be0
AS
3130echo "${ECHO_T}$ac_file" >&6
3131
3132# Check the compiler produces executables we can run. If not, either
3133# the compiler is broken, or we cross compile.
c0d27fcc 3134echo "$as_me:$LINENO: checking whether the C compiler works" >&5
503d2be0
AS
3135echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
3136# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
3137# If not cross compiling, check that we can run a simple program.
3138if test "$cross_compiling" != yes; then
3139 if { ac_try='./$ac_file'
c0d27fcc 3140 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3141 (eval $ac_try) 2>&5
3142 ac_status=$?
c0d27fcc 3143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3144 (exit $ac_status); }; }; then
3145 cross_compiling=no
ba4481b5 3146 else
503d2be0
AS
3147 if test "$cross_compiling" = maybe; then
3148 cross_compiling=yes
3149 else
c0d27fcc 3150 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
19650fd6
AS
3151If you meant to cross compile, use \`--host'.
3152See \`config.log' for more details." >&5
503d2be0 3153echo "$as_me: error: cannot run C compiled programs.
19650fd6
AS
3154If you meant to cross compile, use \`--host'.
3155See \`config.log' for more details." >&2;}
503d2be0
AS
3156 { (exit 1); exit 1; }; }
3157 fi
ba4481b5 3158 fi
503d2be0 3159fi
c0d27fcc 3160echo "$as_me:$LINENO: result: yes" >&5
503d2be0
AS
3161echo "${ECHO_T}yes" >&6
3162
19650fd6 3163rm -f a.out a.exe conftest$ac_cv_exeext b.out
503d2be0
AS
3164ac_clean_files=$ac_clean_files_save
3165# Check the compiler produces executables we can run. If not, either
3166# the compiler is broken, or we cross compile.
c0d27fcc 3167echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
503d2be0 3168echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
c0d27fcc 3169echo "$as_me:$LINENO: result: $cross_compiling" >&5
503d2be0
AS
3170echo "${ECHO_T}$cross_compiling" >&6
3171
c0d27fcc
MR
3172echo "$as_me:$LINENO: checking for suffix of executables" >&5
3173echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
3174if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
3175 (eval $ac_link) 2>&5
3176 ac_status=$?
c0d27fcc 3177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3178 (exit $ac_status); }; then
3179 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3180# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3181# work properly (i.e., refer to `conftest.exe'), while it won't with
3182# `rm'.
6bae0ccf
DL
3183for ac_file in conftest.exe conftest conftest.*; do
3184 test -f "$ac_file" || continue
503d2be0 3185 case $ac_file in
6bae0ccf 3186 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
503d2be0 3187 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
edfaf76d
LK
3188 export ac_cv_exeext
3189 break;;
503d2be0
AS
3190 * ) break;;
3191 esac
3192done
ba4481b5 3193else
19650fd6
AS
3194 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
3195See \`config.log' for more details." >&5
3196echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
3197See \`config.log' for more details." >&2;}
503d2be0 3198 { (exit 1); exit 1; }; }
ba4481b5 3199fi
ba4481b5 3200
503d2be0 3201rm -f conftest$ac_cv_exeext
c0d27fcc 3202echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
503d2be0 3203echo "${ECHO_T}$ac_cv_exeext" >&6
ba4481b5 3204
503d2be0
AS
3205rm -f conftest.$ac_ext
3206EXEEXT=$ac_cv_exeext
3207ac_exeext=$EXEEXT
c0d27fcc
MR
3208echo "$as_me:$LINENO: checking for suffix of object files" >&5
3209echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
503d2be0
AS
3210if test "${ac_cv_objext+set}" = set; then
3211 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3212else
503d2be0 3213 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3214/* confdefs.h. */
3215_ACEOF
3216cat confdefs.h >>conftest.$ac_ext
3217cat >>conftest.$ac_ext <<_ACEOF
3218/* end confdefs.h. */
ba4481b5 3219
503d2be0
AS
3220int
3221main ()
3222{
ba4481b5 3223
503d2be0
AS
3224 ;
3225 return 0;
3226}
3227_ACEOF
3228rm -f conftest.o conftest.obj
c0d27fcc 3229if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
3230 (eval $ac_compile) 2>&5
3231 ac_status=$?
c0d27fcc 3232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3233 (exit $ac_status); }; then
3234 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
3235 case $ac_file in
6bae0ccf 3236 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
503d2be0
AS
3237 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3238 break;;
3239 esac
3240done
c4bb2108 3241else
503d2be0 3242 echo "$as_me: failed program was:" >&5
19650fd6
AS
3243sed 's/^/| /' conftest.$ac_ext >&5
3244
3245{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
3246See \`config.log' for more details." >&5
3247echo "$as_me: error: cannot compute suffix of object files: cannot compile
3248See \`config.log' for more details." >&2;}
503d2be0 3249 { (exit 1); exit 1; }; }
c4bb2108
DL
3250fi
3251
503d2be0
AS
3252rm -f conftest.$ac_cv_objext conftest.$ac_ext
3253fi
c0d27fcc 3254echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
503d2be0
AS
3255echo "${ECHO_T}$ac_cv_objext" >&6
3256OBJEXT=$ac_cv_objext
3257ac_objext=$OBJEXT
c0d27fcc 3258echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
503d2be0
AS
3259echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
3260if test "${ac_cv_c_compiler_gnu+set}" = set; then
3261 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3262else
503d2be0 3263 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3264/* confdefs.h. */
3265_ACEOF
3266cat confdefs.h >>conftest.$ac_ext
3267cat >>conftest.$ac_ext <<_ACEOF
3268/* end confdefs.h. */
503d2be0
AS
3269
3270int
3271main ()
3272{
3273#ifndef __GNUC__
3274 choke me
3275#endif
3276
3277 ;
3278 return 0;
3279}
3280_ACEOF
3281rm -f conftest.$ac_objext
c0d27fcc 3282if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 3283 (eval $ac_compile) 2>conftest.er1
503d2be0 3284 ac_status=$?
edfaf76d
LK
3285 grep -v '^ *+' conftest.er1 >conftest.err
3286 rm -f conftest.er1
3287 cat conftest.err >&5
c0d27fcc 3288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3289 (exit $ac_status); } &&
ec8fcb10
YM
3290 { ac_try='test -z "$ac_c_werror_flag"
3291 || test ! -s conftest.err'
edfaf76d
LK
3292 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3293 (eval $ac_try) 2>&5
3294 ac_status=$?
3295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3296 (exit $ac_status); }; } &&
3297 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 3298 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3299 (eval $ac_try) 2>&5
3300 ac_status=$?
c0d27fcc 3301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3302 (exit $ac_status); }; }; then
3303 ac_compiler_gnu=yes
3304else
3305 echo "$as_me: failed program was:" >&5
19650fd6
AS
3306sed 's/^/| /' conftest.$ac_ext >&5
3307
503d2be0
AS
3308ac_compiler_gnu=no
3309fi
edfaf76d 3310rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
3311ac_cv_c_compiler_gnu=$ac_compiler_gnu
3312
3313fi
c0d27fcc 3314echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
503d2be0
AS
3315echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
3316GCC=`test $ac_compiler_gnu = yes && echo yes`
3317ac_test_CFLAGS=${CFLAGS+set}
3318ac_save_CFLAGS=$CFLAGS
3319CFLAGS="-g"
c0d27fcc 3320echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
503d2be0
AS
3321echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
3322if test "${ac_cv_prog_cc_g+set}" = set; then
3323 echo $ECHO_N "(cached) $ECHO_C" >&6
3324else
3325 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3326/* confdefs.h. */
3327_ACEOF
3328cat confdefs.h >>conftest.$ac_ext
3329cat >>conftest.$ac_ext <<_ACEOF
3330/* end confdefs.h. */
503d2be0
AS
3331
3332int
3333main ()
3334{
3335
3336 ;
3337 return 0;
3338}
3339_ACEOF
3340rm -f conftest.$ac_objext
c0d27fcc 3341if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 3342 (eval $ac_compile) 2>conftest.er1
503d2be0 3343 ac_status=$?
edfaf76d
LK
3344 grep -v '^ *+' conftest.er1 >conftest.err
3345 rm -f conftest.er1
3346 cat conftest.err >&5
c0d27fcc 3347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3348 (exit $ac_status); } &&
ec8fcb10
YM
3349 { ac_try='test -z "$ac_c_werror_flag"
3350 || test ! -s conftest.err'
edfaf76d
LK
3351 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3352 (eval $ac_try) 2>&5
3353 ac_status=$?
3354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3355 (exit $ac_status); }; } &&
3356 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 3357 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3358 (eval $ac_try) 2>&5
3359 ac_status=$?
c0d27fcc 3360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3361 (exit $ac_status); }; }; then
ba4481b5
DL
3362 ac_cv_prog_cc_g=yes
3363else
503d2be0 3364 echo "$as_me: failed program was:" >&5
19650fd6
AS
3365sed 's/^/| /' conftest.$ac_ext >&5
3366
503d2be0 3367ac_cv_prog_cc_g=no
ba4481b5 3368fi
edfaf76d 3369rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 3370fi
c0d27fcc 3371echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
503d2be0 3372echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
c4bb2108 3373if test "$ac_test_CFLAGS" = set; then
503d2be0 3374 CFLAGS=$ac_save_CFLAGS
c4bb2108
DL
3375elif test $ac_cv_prog_cc_g = yes; then
3376 if test "$GCC" = yes; then
ba4481b5
DL
3377 CFLAGS="-g -O2"
3378 else
c4bb2108 3379 CFLAGS="-g"
ba4481b5 3380 fi
22afa6e8 3381else
c4bb2108
DL
3382 if test "$GCC" = yes; then
3383 CFLAGS="-O2"
3384 else
3385 CFLAGS=
3386 fi
ba4481b5 3387fi
6bae0ccf
DL
3388echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
3389echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
3390if test "${ac_cv_prog_cc_stdc+set}" = set; then
3391 echo $ECHO_N "(cached) $ECHO_C" >&6
3392else
3393 ac_cv_prog_cc_stdc=no
3394ac_save_CC=$CC
3395cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3396/* confdefs.h. */
3397_ACEOF
3398cat confdefs.h >>conftest.$ac_ext
3399cat >>conftest.$ac_ext <<_ACEOF
3400/* end confdefs.h. */
6bae0ccf
DL
3401#include <stdarg.h>
3402#include <stdio.h>
3403#include <sys/types.h>
3404#include <sys/stat.h>
3405/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3406struct buf { int x; };
3407FILE * (*rcsopen) (struct buf *, struct stat *, int);
3408static char *e (p, i)
3409 char **p;
3410 int i;
3411{
3412 return p[i];
3413}
3414static char *f (char * (*g) (char **, int), char **p, ...)
3415{
3416 char *s;
3417 va_list v;
3418 va_start (v,p);
3419 s = g (p, va_arg (v,int));
3420 va_end (v);
3421 return s;
3422}
edfaf76d
LK
3423
3424/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3425 function prototypes and stuff, but not '\xHH' hex character constants.
3426 These don't provoke an error unfortunately, instead are silently treated
3427 as 'x'. The following induces an error, until -std1 is added to get
3428 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3429 array size at least. It's necessary to write '\x00'==0 to get something
3430 that's true only with -std1. */
3431int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3432
6bae0ccf
DL
3433int test (int i, double x);
3434struct s1 {int (*f) (int a);};
3435struct s2 {int (*f) (double a);};
3436int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3437int argc;
3438char **argv;
3439int
3440main ()
3441{
3442return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3443 ;
3444 return 0;
3445}
3446_ACEOF
3447# Don't try gcc -ansi; that turns off useful extensions and
3448# breaks some systems' header files.
3449# AIX -qlanglvl=ansi
3450# Ultrix and OSF/1 -std1
3451# HP-UX 10.20 and later -Ae
3452# HP-UX older versions -Aa -D_HPUX_SOURCE
3453# SVR4 -Xc -D__EXTENSIONS__
3454for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3455do
3456 CC="$ac_save_CC $ac_arg"
3457 rm -f conftest.$ac_objext
3458if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 3459 (eval $ac_compile) 2>conftest.er1
6bae0ccf 3460 ac_status=$?
edfaf76d
LK
3461 grep -v '^ *+' conftest.er1 >conftest.err
3462 rm -f conftest.er1
3463 cat conftest.err >&5
6bae0ccf
DL
3464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3465 (exit $ac_status); } &&
ec8fcb10
YM
3466 { ac_try='test -z "$ac_c_werror_flag"
3467 || test ! -s conftest.err'
edfaf76d
LK
3468 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3469 (eval $ac_try) 2>&5
3470 ac_status=$?
3471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3472 (exit $ac_status); }; } &&
3473 { ac_try='test -s conftest.$ac_objext'
6bae0ccf
DL
3474 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3475 (eval $ac_try) 2>&5
3476 ac_status=$?
3477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3478 (exit $ac_status); }; }; then
3479 ac_cv_prog_cc_stdc=$ac_arg
3480break
3481else
3482 echo "$as_me: failed program was:" >&5
19650fd6
AS
3483sed 's/^/| /' conftest.$ac_ext >&5
3484
6bae0ccf 3485fi
edfaf76d 3486rm -f conftest.err conftest.$ac_objext
6bae0ccf
DL
3487done
3488rm -f conftest.$ac_ext conftest.$ac_objext
3489CC=$ac_save_CC
3490
3491fi
3492
3493case "x$ac_cv_prog_cc_stdc" in
3494 x|xno)
3495 echo "$as_me:$LINENO: result: none needed" >&5
3496echo "${ECHO_T}none needed" >&6 ;;
3497 *)
3498 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
3499echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
3500 CC="$CC $ac_cv_prog_cc_stdc" ;;
3501esac
3502
503d2be0
AS
3503# Some people use a C++ compiler to compile C. Since we use `exit',
3504# in C++ we need to declare it. In case someone uses the same compiler
3505# for both compiling C and C++ we need to have the C++ compiler decide
3506# the declaration of exit, since it's the most demanding environment.
3507cat >conftest.$ac_ext <<_ACEOF
3508#ifndef __cplusplus
3509 choke me
3510#endif
3511_ACEOF
3512rm -f conftest.$ac_objext
c0d27fcc 3513if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 3514 (eval $ac_compile) 2>conftest.er1
503d2be0 3515 ac_status=$?
edfaf76d
LK
3516 grep -v '^ *+' conftest.er1 >conftest.err
3517 rm -f conftest.er1
3518 cat conftest.err >&5
c0d27fcc 3519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3520 (exit $ac_status); } &&
ec8fcb10
YM
3521 { ac_try='test -z "$ac_c_werror_flag"
3522 || test ! -s conftest.err'
edfaf76d
LK
3523 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3524 (eval $ac_try) 2>&5
3525 ac_status=$?
3526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3527 (exit $ac_status); }; } &&
3528 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 3529 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3530 (eval $ac_try) 2>&5
3531 ac_status=$?
c0d27fcc 3532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3533 (exit $ac_status); }; }; then
3534 for ac_declaration in \
edfaf76d 3535 '' \
503d2be0
AS
3536 'extern "C" void std::exit (int) throw (); using std::exit;' \
3537 'extern "C" void std::exit (int); using std::exit;' \
3538 'extern "C" void exit (int) throw ();' \
3539 'extern "C" void exit (int);' \
cffcede7 3540 'void exit (int);'
503d2be0
AS
3541do
3542 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3543/* confdefs.h. */
3544_ACEOF
3545cat confdefs.h >>conftest.$ac_ext
3546cat >>conftest.$ac_ext <<_ACEOF
3547/* end confdefs.h. */
7c9e5167 3548$ac_declaration
edfaf76d 3549#include <stdlib.h>
503d2be0
AS
3550int
3551main ()
3552{
3553exit (42);
3554 ;
3555 return 0;
3556}
3557_ACEOF
3558rm -f conftest.$ac_objext
c0d27fcc 3559if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 3560 (eval $ac_compile) 2>conftest.er1
503d2be0 3561 ac_status=$?
edfaf76d
LK
3562 grep -v '^ *+' conftest.er1 >conftest.err
3563 rm -f conftest.er1
3564 cat conftest.err >&5
c0d27fcc 3565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3566 (exit $ac_status); } &&
ec8fcb10
YM
3567 { ac_try='test -z "$ac_c_werror_flag"
3568 || test ! -s conftest.err'
edfaf76d
LK
3569 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3570 (eval $ac_try) 2>&5
3571 ac_status=$?
3572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3573 (exit $ac_status); }; } &&
3574 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 3575 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3576 (eval $ac_try) 2>&5
3577 ac_status=$?
c0d27fcc 3578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3579 (exit $ac_status); }; }; then
3580 :
3581else
3582 echo "$as_me: failed program was:" >&5
19650fd6
AS
3583sed 's/^/| /' conftest.$ac_ext >&5
3584
503d2be0
AS
3585continue
3586fi
edfaf76d 3587rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 3588 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3589/* confdefs.h. */
3590_ACEOF
3591cat confdefs.h >>conftest.$ac_ext
3592cat >>conftest.$ac_ext <<_ACEOF
3593/* end confdefs.h. */
503d2be0
AS
3594$ac_declaration
3595int
3596main ()
3597{
3598exit (42);
3599 ;
3600 return 0;
3601}
3602_ACEOF
3603rm -f conftest.$ac_objext
c0d27fcc 3604if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 3605 (eval $ac_compile) 2>conftest.er1
503d2be0 3606 ac_status=$?
edfaf76d
LK
3607 grep -v '^ *+' conftest.er1 >conftest.err
3608 rm -f conftest.er1
3609 cat conftest.err >&5
c0d27fcc 3610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3611 (exit $ac_status); } &&
ec8fcb10
YM
3612 { ac_try='test -z "$ac_c_werror_flag"
3613 || test ! -s conftest.err'
edfaf76d
LK
3614 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3615 (eval $ac_try) 2>&5
3616 ac_status=$?
3617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3618 (exit $ac_status); }; } &&
3619 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 3620 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3621 (eval $ac_try) 2>&5
3622 ac_status=$?
c0d27fcc 3623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3624 (exit $ac_status); }; }; then
3625 break
3626else
3627 echo "$as_me: failed program was:" >&5
19650fd6
AS
3628sed 's/^/| /' conftest.$ac_ext >&5
3629
503d2be0 3630fi
edfaf76d 3631rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
3632done
3633rm -f conftest*
3634if test -n "$ac_declaration"; then
3635 echo '#ifdef __cplusplus' >>confdefs.h
3636 echo $ac_declaration >>confdefs.h
3637 echo '#endif' >>confdefs.h
3638fi
ba4481b5 3639
503d2be0
AS
3640else
3641 echo "$as_me: failed program was:" >&5
19650fd6
AS
3642sed 's/^/| /' conftest.$ac_ext >&5
3643
503d2be0 3644fi
edfaf76d 3645rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
3646ac_ext=c
3647ac_cpp='$CPP $CPPFLAGS'
3648ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3649ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3650ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5 3651
c0d27fcc 3652
ba4481b5
DL
3653# On Suns, sometimes $CPP names a directory.
3654if test -n "$CPP" && test -d "$CPP"; then
3655 CPP=
3656fi
3657
3658#### Some systems specify a CPP to use unless we are using GCC.
3659#### Now that we know whether we are using GCC, we can decide whether
3660#### to use that one.
3661if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x
3662then
3663 CPP="$NON_GNU_CPP"
3664fi
3665
3666#### Some systems specify a CC to use unless we are using GCC.
3667#### Now that we know whether we are using GCC, we can decide whether
3668#### to use that one.
3669if test "x$NON_GNU_CC" != x && test x$GCC != xyes &&
3670 test x$cc_specified != xyes
3671then
3672 CC="$NON_GNU_CC"
3673fi
3674
3675if test x$GCC = xyes && test "x$GCC_TEST_OPTIONS" != x
3676then
3677 CC="$CC $GCC_TEST_OPTIONS"
3678fi
3679
3680if test x$GCC = x && test "x$NON_GCC_TEST_OPTIONS" != x
3681then
3682 CC="$CC $NON_GCC_TEST_OPTIONS"
3683fi
3684
e143ad11
AS
3685
3686ac_ext=c
3687ac_cpp='$CPP $CPPFLAGS'
3688ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3689ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3690ac_compiler_gnu=$ac_cv_c_compiler_gnu
3691echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3692echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
3693# On Suns, sometimes $CPP names a directory.
3694if test -n "$CPP" && test -d "$CPP"; then
3695 CPP=
3696fi
3697if test -z "$CPP"; then
3698 if test "${ac_cv_prog_CPP+set}" = set; then
3699 echo $ECHO_N "(cached) $ECHO_C" >&6
3700else
3701 # Double quotes because CPP needs to be expanded
3702 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3703 do
3704 ac_preproc_ok=false
3705for ac_c_preproc_warn_flag in '' yes
3706do
3707 # Use a header file that comes with gcc, so configuring glibc
3708 # with a fresh cross-compiler works.
3709 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3710 # <limits.h> exists even on freestanding compilers.
3711 # On the NeXT, cc -E runs the code through the compiler's parser,
3712 # not just through cpp. "Syntax error" is here to catch this case.
3713 cat >conftest.$ac_ext <<_ACEOF
3714/* confdefs.h. */
3715_ACEOF
3716cat confdefs.h >>conftest.$ac_ext
3717cat >>conftest.$ac_ext <<_ACEOF
3718/* end confdefs.h. */
3719#ifdef __STDC__
3720# include <limits.h>
3721#else
3722# include <assert.h>
3723#endif
3724 Syntax error
3725_ACEOF
3726if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3727 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3728 ac_status=$?
3729 grep -v '^ *+' conftest.er1 >conftest.err
3730 rm -f conftest.er1
3731 cat conftest.err >&5
3732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3733 (exit $ac_status); } >/dev/null; then
3734 if test -s conftest.err; then
3735 ac_cpp_err=$ac_c_preproc_warn_flag
3736 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3737 else
3738 ac_cpp_err=
3739 fi
3740else
3741 ac_cpp_err=yes
3742fi
3743if test -z "$ac_cpp_err"; then
3744 :
3745else
3746 echo "$as_me: failed program was:" >&5
3747sed 's/^/| /' conftest.$ac_ext >&5
3748
3749 # Broken: fails on valid input.
3750continue
3751fi
3752rm -f conftest.err conftest.$ac_ext
3753
3754 # OK, works on sane cases. Now check whether non-existent headers
3755 # can be detected and how.
3756 cat >conftest.$ac_ext <<_ACEOF
3757/* confdefs.h. */
3758_ACEOF
3759cat confdefs.h >>conftest.$ac_ext
3760cat >>conftest.$ac_ext <<_ACEOF
3761/* end confdefs.h. */
3762#include <ac_nonexistent.h>
3763_ACEOF
3764if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3765 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3766 ac_status=$?
3767 grep -v '^ *+' conftest.er1 >conftest.err
3768 rm -f conftest.er1
3769 cat conftest.err >&5
3770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3771 (exit $ac_status); } >/dev/null; then
3772 if test -s conftest.err; then
3773 ac_cpp_err=$ac_c_preproc_warn_flag
3774 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3775 else
3776 ac_cpp_err=
3777 fi
3778else
3779 ac_cpp_err=yes
3780fi
3781if test -z "$ac_cpp_err"; then
3782 # Broken: success on invalid input.
3783continue
3784else
3785 echo "$as_me: failed program was:" >&5
3786sed 's/^/| /' conftest.$ac_ext >&5
3787
3788 # Passes both tests.
3789ac_preproc_ok=:
3790break
3791fi
3792rm -f conftest.err conftest.$ac_ext
3793
3794done
3795# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3796rm -f conftest.err conftest.$ac_ext
3797if $ac_preproc_ok; then
3798 break
3799fi
3800
3801 done
3802 ac_cv_prog_CPP=$CPP
3803
3804fi
3805 CPP=$ac_cv_prog_CPP
3806else
3807 ac_cv_prog_CPP=$CPP
3808fi
3809echo "$as_me:$LINENO: result: $CPP" >&5
3810echo "${ECHO_T}$CPP" >&6
3811ac_preproc_ok=false
3812for ac_c_preproc_warn_flag in '' yes
3813do
3814 # Use a header file that comes with gcc, so configuring glibc
3815 # with a fresh cross-compiler works.
3816 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3817 # <limits.h> exists even on freestanding compilers.
3818 # On the NeXT, cc -E runs the code through the compiler's parser,
3819 # not just through cpp. "Syntax error" is here to catch this case.
3820 cat >conftest.$ac_ext <<_ACEOF
3821/* confdefs.h. */
3822_ACEOF
3823cat confdefs.h >>conftest.$ac_ext
3824cat >>conftest.$ac_ext <<_ACEOF
3825/* end confdefs.h. */
3826#ifdef __STDC__
3827# include <limits.h>
3828#else
3829# include <assert.h>
3830#endif
3831 Syntax error
3832_ACEOF
3833if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3834 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3835 ac_status=$?
3836 grep -v '^ *+' conftest.er1 >conftest.err
3837 rm -f conftest.er1
3838 cat conftest.err >&5
3839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3840 (exit $ac_status); } >/dev/null; then
3841 if test -s conftest.err; then
3842 ac_cpp_err=$ac_c_preproc_warn_flag
3843 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3844 else
3845 ac_cpp_err=
3846 fi
3847else
3848 ac_cpp_err=yes
3849fi
3850if test -z "$ac_cpp_err"; then
3851 :
3852else
3853 echo "$as_me: failed program was:" >&5
3854sed 's/^/| /' conftest.$ac_ext >&5
3855
3856 # Broken: fails on valid input.
3857continue
3858fi
3859rm -f conftest.err conftest.$ac_ext
3860
3861 # OK, works on sane cases. Now check whether non-existent headers
3862 # can be detected and how.
3863 cat >conftest.$ac_ext <<_ACEOF
3864/* confdefs.h. */
3865_ACEOF
3866cat confdefs.h >>conftest.$ac_ext
3867cat >>conftest.$ac_ext <<_ACEOF
3868/* end confdefs.h. */
3869#include <ac_nonexistent.h>
3870_ACEOF
3871if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3872 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3873 ac_status=$?
3874 grep -v '^ *+' conftest.er1 >conftest.err
3875 rm -f conftest.er1
3876 cat conftest.err >&5
3877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3878 (exit $ac_status); } >/dev/null; then
3879 if test -s conftest.err; then
3880 ac_cpp_err=$ac_c_preproc_warn_flag
3881 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3882 else
3883 ac_cpp_err=
3884 fi
3885else
3886 ac_cpp_err=yes
3887fi
3888if test -z "$ac_cpp_err"; then
3889 # Broken: success on invalid input.
3890continue
3891else
3892 echo "$as_me: failed program was:" >&5
3893sed 's/^/| /' conftest.$ac_ext >&5
3894
3895 # Passes both tests.
3896ac_preproc_ok=:
3897break
3898fi
3899rm -f conftest.err conftest.$ac_ext
3900
3901done
3902# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3903rm -f conftest.err conftest.$ac_ext
3904if $ac_preproc_ok; then
3905 :
3906else
3907 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3908See \`config.log' for more details." >&5
3909echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3910See \`config.log' for more details." >&2;}
3911 { (exit 1); exit 1; }; }
3912fi
3913
3914ac_ext=c
3915ac_cpp='$CPP $CPPFLAGS'
3916ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3917ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3918ac_compiler_gnu=$ac_cv_c_compiler_gnu
3919
3920
3921echo "$as_me:$LINENO: checking for egrep" >&5
3922echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3923if test "${ac_cv_prog_egrep+set}" = set; then
3924 echo $ECHO_N "(cached) $ECHO_C" >&6
3925else
3926 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3927 then ac_cv_prog_egrep='grep -E'
3928 else ac_cv_prog_egrep='egrep'
3929 fi
3930fi
3931echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
3932echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3933 EGREP=$ac_cv_prog_egrep
3934
3935
3936
3937echo "$as_me:$LINENO: checking for AIX" >&5
3938echo $ECHO_N "checking for AIX... $ECHO_C" >&6
3939cat >conftest.$ac_ext <<_ACEOF
3940/* confdefs.h. */
3941_ACEOF
3942cat confdefs.h >>conftest.$ac_ext
3943cat >>conftest.$ac_ext <<_ACEOF
3944/* end confdefs.h. */
3945#ifdef _AIX
3946 yes
3947#endif
3948
3949_ACEOF
3950if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3951 $EGREP "yes" >/dev/null 2>&1; then
3952 echo "$as_me:$LINENO: result: yes" >&5
3953echo "${ECHO_T}yes" >&6
3954cat >>confdefs.h <<\_ACEOF
3955#define _ALL_SOURCE 1
3956_ACEOF
3957
3958else
3959 echo "$as_me:$LINENO: result: no" >&5
3960echo "${ECHO_T}no" >&6
3961fi
3962rm -f conftest*
3963
3964
3965
3966cat >>confdefs.h <<\_ACEOF
3967#define _GNU_SOURCE 1
3968_ACEOF
3969
3970
3971
01abe918
CY
3972### Use -Wno-pointer-sign if the compiler supports it
3973echo "$as_me:$LINENO: checking whether gcc understands -Wno-pointer-sign" >&5
3974echo $ECHO_N "checking whether gcc understands -Wno-pointer-sign... $ECHO_C" >&6
3975SAVE_CFLAGS="$CFLAGS"
3976CFLAGS="$CFLAGS -Wno-pointer-sign"
01abe918
CY
3977cat >conftest.$ac_ext <<_ACEOF
3978/* confdefs.h. */
3979_ACEOF
3980cat confdefs.h >>conftest.$ac_ext
3981cat >>conftest.$ac_ext <<_ACEOF
3982/* end confdefs.h. */
3983
3984int
3985main ()
3986{
3987
3988 ;
3989 return 0;
3990}
3991_ACEOF
3992rm -f conftest.$ac_objext
3993if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3994 (eval $ac_compile) 2>conftest.er1
3995 ac_status=$?
3996 grep -v '^ *+' conftest.er1 >conftest.err
3997 rm -f conftest.er1
3998 cat conftest.err >&5
3999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4000 (exit $ac_status); } &&
ec8fcb10
YM
4001 { ac_try='test -z "$ac_c_werror_flag"
4002 || test ! -s conftest.err'
01abe918
CY
4003 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4004 (eval $ac_try) 2>&5
4005 ac_status=$?
4006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4007 (exit $ac_status); }; } &&
4008 { ac_try='test -s conftest.$ac_objext'
4009 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4010 (eval $ac_try) 2>&5
4011 ac_status=$?
4012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4013 (exit $ac_status); }; }; then
4014 has_option=yes
4015else
4016 echo "$as_me: failed program was:" >&5
4017sed 's/^/| /' conftest.$ac_ext >&5
4018
4019has_option=no
4020fi
4021rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4022if test $has_option = yes; then
4023 C_WARNINGS_SWITCH="-Wno-pointer-sign $C_WARNINGS_SWITCH"
4024fi
4025echo "$as_me:$LINENO: result: $has_option" >&5
4026echo "${ECHO_T}$has_option" >&6
4027CFLAGS="$SAVE_CFLAGS"
4028unset has_option
4029unset SAVE_CFLAGS
4030
6a3a24fa 4031#### Some other nice autoconf tests.
ba4481b5 4032
c0d27fcc 4033echo "$as_me:$LINENO: checking whether ln -s works" >&5
503d2be0
AS
4034echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
4035LN_S=$as_ln_s
4036if test "$LN_S" = "ln -s"; then
c0d27fcc 4037 echo "$as_me:$LINENO: result: yes" >&5
503d2be0 4038echo "${ECHO_T}yes" >&6
ba4481b5 4039else
c0d27fcc 4040 echo "$as_me:$LINENO: result: no, using $LN_S" >&5
503d2be0 4041echo "${ECHO_T}no, using $LN_S" >&6
ba4481b5
DL
4042fi
4043
503d2be0
AS
4044ac_ext=c
4045ac_cpp='$CPP $CPPFLAGS'
4046ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4047ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4048ac_compiler_gnu=$ac_cv_c_compiler_gnu
c0d27fcc 4049echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
503d2be0 4050echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
ba4481b5
DL
4051# On Suns, sometimes $CPP names a directory.
4052if test -n "$CPP" && test -d "$CPP"; then
4053 CPP=
4054fi
4055if test -z "$CPP"; then
503d2be0
AS
4056 if test "${ac_cv_prog_CPP+set}" = set; then
4057 echo $ECHO_N "(cached) $ECHO_C" >&6
4058else
4059 # Double quotes because CPP needs to be expanded
4060 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4061 do
4062 ac_preproc_ok=false
4063for ac_c_preproc_warn_flag in '' yes
4064do
4065 # Use a header file that comes with gcc, so configuring glibc
4066 # with a fresh cross-compiler works.
19650fd6
AS
4067 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4068 # <limits.h> exists even on freestanding compilers.
ba4481b5 4069 # On the NeXT, cc -E runs the code through the compiler's parser,
503d2be0
AS
4070 # not just through cpp. "Syntax error" is here to catch this case.
4071 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4072/* confdefs.h. */
4073_ACEOF
4074cat confdefs.h >>conftest.$ac_ext
4075cat >>conftest.$ac_ext <<_ACEOF
4076/* end confdefs.h. */
4077#ifdef __STDC__
4078# include <limits.h>
4079#else
4080# include <assert.h>
4081#endif
edfaf76d 4082 Syntax error
503d2be0 4083_ACEOF
c0d27fcc 4084if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
4085 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4086 ac_status=$?
6bae0ccf 4087 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4088 rm -f conftest.er1
4089 cat conftest.err >&5
c0d27fcc 4090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4091 (exit $ac_status); } >/dev/null; then
4092 if test -s conftest.err; then
4093 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 4094 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
4095 else
4096 ac_cpp_err=
4097 fi
4098else
4099 ac_cpp_err=yes
4100fi
4101if test -z "$ac_cpp_err"; then
ba4481b5
DL
4102 :
4103else
503d2be0 4104 echo "$as_me: failed program was:" >&5
19650fd6
AS
4105sed 's/^/| /' conftest.$ac_ext >&5
4106
503d2be0
AS
4107 # Broken: fails on valid input.
4108continue
4109fi
4110rm -f conftest.err conftest.$ac_ext
4111
4112 # OK, works on sane cases. Now check whether non-existent headers
4113 # can be detected and how.
4114 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4115/* confdefs.h. */
4116_ACEOF
4117cat confdefs.h >>conftest.$ac_ext
4118cat >>conftest.$ac_ext <<_ACEOF
4119/* end confdefs.h. */
503d2be0
AS
4120#include <ac_nonexistent.h>
4121_ACEOF
c0d27fcc 4122if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
4123 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4124 ac_status=$?
6bae0ccf 4125 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4126 rm -f conftest.er1
4127 cat conftest.err >&5
c0d27fcc 4128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4129 (exit $ac_status); } >/dev/null; then
4130 if test -s conftest.err; then
4131 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 4132 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
4133 else
4134 ac_cpp_err=
4135 fi
4136else
4137 ac_cpp_err=yes
4138fi
4139if test -z "$ac_cpp_err"; then
4140 # Broken: success on invalid input.
4141continue
c4bb2108 4142else
503d2be0 4143 echo "$as_me: failed program was:" >&5
19650fd6
AS
4144sed 's/^/| /' conftest.$ac_ext >&5
4145
503d2be0
AS
4146 # Passes both tests.
4147ac_preproc_ok=:
4148break
4149fi
4150rm -f conftest.err conftest.$ac_ext
4151
4152done
4153# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4154rm -f conftest.err conftest.$ac_ext
4155if $ac_preproc_ok; then
4156 break
4157fi
4158
4159 done
4160 ac_cv_prog_CPP=$CPP
4161
4162fi
4163 CPP=$ac_cv_prog_CPP
4164else
4165 ac_cv_prog_CPP=$CPP
4166fi
c0d27fcc 4167echo "$as_me:$LINENO: result: $CPP" >&5
503d2be0
AS
4168echo "${ECHO_T}$CPP" >&6
4169ac_preproc_ok=false
4170for ac_c_preproc_warn_flag in '' yes
4171do
4172 # Use a header file that comes with gcc, so configuring glibc
4173 # with a fresh cross-compiler works.
19650fd6
AS
4174 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4175 # <limits.h> exists even on freestanding compilers.
503d2be0
AS
4176 # On the NeXT, cc -E runs the code through the compiler's parser,
4177 # not just through cpp. "Syntax error" is here to catch this case.
4178 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4179/* confdefs.h. */
4180_ACEOF
4181cat confdefs.h >>conftest.$ac_ext
4182cat >>conftest.$ac_ext <<_ACEOF
4183/* end confdefs.h. */
4184#ifdef __STDC__
4185# include <limits.h>
4186#else
4187# include <assert.h>
4188#endif
edfaf76d 4189 Syntax error
503d2be0 4190_ACEOF
c0d27fcc 4191if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
4192 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4193 ac_status=$?
6bae0ccf 4194 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4195 rm -f conftest.er1
4196 cat conftest.err >&5
c0d27fcc 4197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4198 (exit $ac_status); } >/dev/null; then
4199 if test -s conftest.err; then
4200 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 4201 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
4202 else
4203 ac_cpp_err=
4204 fi
4205else
4206 ac_cpp_err=yes
4207fi
4208if test -z "$ac_cpp_err"; then
ba4481b5
DL
4209 :
4210else
503d2be0 4211 echo "$as_me: failed program was:" >&5
19650fd6
AS
4212sed 's/^/| /' conftest.$ac_ext >&5
4213
503d2be0
AS
4214 # Broken: fails on valid input.
4215continue
4216fi
4217rm -f conftest.err conftest.$ac_ext
4218
4219 # OK, works on sane cases. Now check whether non-existent headers
4220 # can be detected and how.
4221 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4222/* confdefs.h. */
4223_ACEOF
4224cat confdefs.h >>conftest.$ac_ext
4225cat >>conftest.$ac_ext <<_ACEOF
4226/* end confdefs.h. */
503d2be0
AS
4227#include <ac_nonexistent.h>
4228_ACEOF
c0d27fcc 4229if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
4230 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4231 ac_status=$?
6bae0ccf 4232 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4233 rm -f conftest.er1
4234 cat conftest.err >&5
c0d27fcc 4235 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4236 (exit $ac_status); } >/dev/null; then
4237 if test -s conftest.err; then
4238 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 4239 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
4240 else
4241 ac_cpp_err=
4242 fi
4243else
4244 ac_cpp_err=yes
c4bb2108 4245fi
503d2be0
AS
4246if test -z "$ac_cpp_err"; then
4247 # Broken: success on invalid input.
4248continue
4249else
4250 echo "$as_me: failed program was:" >&5
19650fd6
AS
4251sed 's/^/| /' conftest.$ac_ext >&5
4252
503d2be0
AS
4253 # Passes both tests.
4254ac_preproc_ok=:
4255break
ba4481b5 4256fi
503d2be0
AS
4257rm -f conftest.err conftest.$ac_ext
4258
4259done
4260# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4261rm -f conftest.err conftest.$ac_ext
4262if $ac_preproc_ok; then
4263 :
ba4481b5 4264else
19650fd6
AS
4265 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
4266See \`config.log' for more details." >&5
4267echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
4268See \`config.log' for more details." >&2;}
503d2be0 4269 { (exit 1); exit 1; }; }
ba4481b5 4270fi
503d2be0
AS
4271
4272ac_ext=c
4273ac_cpp='$CPP $CPPFLAGS'
4274ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4275ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4276ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5
DL
4277
4278# Find a good install program. We prefer a C program (faster),
4279# so one script is as good as another. But avoid the broken or
4280# incompatible versions:
4281# SysV /etc/install, /usr/sbin/install
4282# SunOS /usr/etc/install
4283# IRIX /sbin/install
4284# AIX /bin/install
503d2be0 4285# AmigaOS /C/install, which installs bootblocks on floppy discs
c4bb2108 4286# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
ba4481b5
DL
4287# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4288# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
edfaf76d 4289# OS/2's system install, which has a completely different semantic
ba4481b5 4290# ./install, which can be erroneously created by make from ./install.sh.
c0d27fcc
MR
4291echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4292echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
ba4481b5 4293if test -z "$INSTALL"; then
503d2be0
AS
4294if test "${ac_cv_path_install+set}" = set; then
4295 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4296else
c0d27fcc
MR
4297 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4298for as_dir in $PATH
4299do
4300 IFS=$as_save_IFS
4301 test -z "$as_dir" && as_dir=.
4302 # Account for people who put trailing slashes in PATH elements.
4303case $as_dir/ in
4304 ./ | .// | /cC/* | \
4305 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
edfaf76d 4306 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
c0d27fcc
MR
4307 /usr/ucb/* ) ;;
4308 *)
4309 # OSF1 and SCO ODT 3.0 have their own names for install.
4310 # Don't use installbsd from OSF since it installs stuff as root
4311 # by default.
4312 for ac_prog in ginstall scoinst install; do
4313 for ac_exec_ext in '' $ac_executable_extensions; do
edfaf76d
LK
4314 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
4315 if test $ac_prog = install &&
4316 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4317 # AIX install. It has an incompatible calling convention.
4318 :
4319 elif test $ac_prog = install &&
4320 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4321 # program-specific install script used by HP pwplus--don't use.
4322 :
4323 else
4324 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4325 break 3
4326 fi
4327 fi
ba4481b5 4328 done
c0d27fcc
MR
4329 done
4330 ;;
4331esac
4332done
4333
ba4481b5
DL
4334
4335fi
4336 if test "${ac_cv_path_install+set}" = set; then
503d2be0 4337 INSTALL=$ac_cv_path_install
ba4481b5
DL
4338 else
4339 # As a last resort, use the slow shell script. We don't cache a
4340 # path for INSTALL within a source directory, because that will
4341 # break other packages using the cache if that directory is
4342 # removed, or if the path is relative.
503d2be0 4343 INSTALL=$ac_install_sh
ba4481b5
DL
4344 fi
4345fi
c0d27fcc 4346echo "$as_me:$LINENO: result: $INSTALL" >&5
503d2be0 4347echo "${ECHO_T}$INSTALL" >&6
ba4481b5
DL
4348
4349# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4350# It thinks the first close brace ends the variable substitution.
4351test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4352
503d2be0 4353test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
c4bb2108 4354
ba4481b5
DL
4355test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4356
c0d27fcc
MR
4357if test "x$RANLIB" = x; then
4358 if test -n "$ac_tool_prefix"; then
4359 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4360set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4361echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0 4362echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
c0d27fcc 4363if test "${ac_cv_prog_RANLIB+set}" = set; then
503d2be0 4364 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4
DL
4365else
4366 if test -n "$RANLIB"; then
4367 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4368else
c0d27fcc
MR
4369as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4370for as_dir in $PATH
4371do
4372 IFS=$as_save_IFS
4373 test -z "$as_dir" && as_dir=.
4374 for ac_exec_ext in '' $ac_executable_extensions; do
4375 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4376 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4377 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4378 break 2
4379 fi
4380done
503d2be0
AS
4381done
4382
7397acc4
DL
4383fi
4384fi
503d2be0 4385RANLIB=$ac_cv_prog_RANLIB
7397acc4 4386if test -n "$RANLIB"; then
c0d27fcc 4387 echo "$as_me:$LINENO: result: $RANLIB" >&5
503d2be0
AS
4388echo "${ECHO_T}$RANLIB" >&6
4389else
c0d27fcc 4390 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
4391echo "${ECHO_T}no" >&6
4392fi
4393
4394fi
4395if test -z "$ac_cv_prog_RANLIB"; then
4396 ac_ct_RANLIB=$RANLIB
4397 # Extract the first word of "ranlib", so it can be a program name with args.
4398set dummy ranlib; ac_word=$2
c0d27fcc 4399echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
4400echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4401if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4402 echo $ECHO_N "(cached) $ECHO_C" >&6
4403else
4404 if test -n "$ac_ct_RANLIB"; then
4405 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4406else
c0d27fcc
MR
4407as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4408for as_dir in $PATH
4409do
4410 IFS=$as_save_IFS
4411 test -z "$as_dir" && as_dir=.
4412 for ac_exec_ext in '' $ac_executable_extensions; do
4413 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4414 ac_cv_prog_ac_ct_RANLIB="ranlib"
4415 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4416 break 2
4417 fi
4418done
503d2be0
AS
4419done
4420
4421 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
4422fi
4423fi
4424ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4425if test -n "$ac_ct_RANLIB"; then
c0d27fcc 4426 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
503d2be0
AS
4427echo "${ECHO_T}$ac_ct_RANLIB" >&6
4428else
c0d27fcc 4429 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
4430echo "${ECHO_T}no" >&6
4431fi
4432
4433 RANLIB=$ac_ct_RANLIB
7397acc4 4434else
503d2be0 4435 RANLIB="$ac_cv_prog_RANLIB"
7397acc4
DL
4436fi
4437
4438fi
9e71690e
DK
4439# Extract the first word of "install-info", so it can be a program name with args.
4440set dummy install-info; ac_word=$2
4441echo "$as_me:$LINENO: checking for $ac_word" >&5
4442echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4443if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
4444 echo $ECHO_N "(cached) $ECHO_C" >&6
4445else
4446 case $INSTALL_INFO in
4447 [\\/]* | ?:[\\/]*)
4448 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
4449 ;;
4450 *)
4451 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4452for as_dir in $PATH
4453do
4454 IFS=$as_save_IFS
4455 test -z "$as_dir" && as_dir=.
4456 for ac_exec_ext in '' $ac_executable_extensions; do
4457 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4458 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
4459 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4460 break 2
4461 fi
4462done
4463done
4464
4465 ;;
4466esac
4467fi
4468INSTALL_INFO=$ac_cv_path_INSTALL_INFO
4469
4470if test -n "$INSTALL_INFO"; then
4471 echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
4472echo "${ECHO_T}$INSTALL_INFO" >&6
4473else
4474 echo "$as_me:$LINENO: result: no" >&5
4475echo "${ECHO_T}no" >&6
4476fi
4477
4478# Extract the first word of "install-info", so it can be a program name with args.
4479set dummy install-info; ac_word=$2
4480echo "$as_me:$LINENO: checking for $ac_word" >&5
4481echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4482if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
4483 echo $ECHO_N "(cached) $ECHO_C" >&6
4484else
4485 case $INSTALL_INFO in
4486 [\\/]* | ?:[\\/]*)
4487 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
4488 ;;
4489 *)
4490 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4491for as_dir in /usr/sbin
4492do
4493 IFS=$as_save_IFS
4494 test -z "$as_dir" && as_dir=.
4495 for ac_exec_ext in '' $ac_executable_extensions; do
4496 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4497 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
4498 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4499 break 2
4500 fi
4501done
4502done
4503
4504 ;;
4505esac
4506fi
4507INSTALL_INFO=$ac_cv_path_INSTALL_INFO
4508
4509if test -n "$INSTALL_INFO"; then
4510 echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
4511echo "${ECHO_T}$INSTALL_INFO" >&6
4512else
4513 echo "$as_me:$LINENO: result: no" >&5
4514echo "${ECHO_T}no" >&6
4515fi
4516
4517# Extract the first word of "install-info", so it can be a program name with args.
4518set dummy install-info; ac_word=$2
4519echo "$as_me:$LINENO: checking for $ac_word" >&5
4520echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4521if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
4522 echo $ECHO_N "(cached) $ECHO_C" >&6
4523else
4524 case $INSTALL_INFO in
4525 [\\/]* | ?:[\\/]*)
4526 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
4527 ;;
4528 *)
4529 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4530for as_dir in /sbin
4531do
4532 IFS=$as_save_IFS
4533 test -z "$as_dir" && as_dir=.
4534 for ac_exec_ext in '' $ac_executable_extensions; do
4535 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4536 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
4537 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4538 break 2
4539 fi
4540done
4541done
4542
4543 test -z "$ac_cv_path_INSTALL_INFO" && ac_cv_path_INSTALL_INFO=":"
4544 ;;
4545esac
4546fi
4547INSTALL_INFO=$ac_cv_path_INSTALL_INFO
4548
4549if test -n "$INSTALL_INFO"; then
4550 echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
4551echo "${ECHO_T}$INSTALL_INFO" >&6
4552else
4553 echo "$as_me:$LINENO: result: no" >&5
4554echo "${ECHO_T}no" >&6
4555fi
4556
8ae52ca6
RF
4557# Extract the first word of "gzip", so it can be a program name with args.
4558set dummy gzip; ac_word=$2
4559echo "$as_me:$LINENO: checking for $ac_word" >&5
4560echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
46e35e9f 4561if test "${ac_cv_path_GZIP_PROG+set}" = set; then
8ae52ca6
RF
4562 echo $ECHO_N "(cached) $ECHO_C" >&6
4563else
46e35e9f 4564 case $GZIP_PROG in
8ae52ca6 4565 [\\/]* | ?:[\\/]*)
46e35e9f 4566 ac_cv_path_GZIP_PROG="$GZIP_PROG" # Let the user override the test with a path.
8ae52ca6
RF
4567 ;;
4568 *)
4569 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4570for as_dir in $PATH
4571do
4572 IFS=$as_save_IFS
4573 test -z "$as_dir" && as_dir=.
4574 for ac_exec_ext in '' $ac_executable_extensions; do
4575 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46e35e9f 4576 ac_cv_path_GZIP_PROG="$as_dir/$ac_word$ac_exec_ext"
8ae52ca6
RF
4577 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4578 break 2
4579 fi
4580done
4581done
4582
4583 ;;
4584esac
4585fi
46e35e9f 4586GZIP_PROG=$ac_cv_path_GZIP_PROG
8ae52ca6 4587
46e35e9f
AS
4588if test -n "$GZIP_PROG"; then
4589 echo "$as_me:$LINENO: result: $GZIP_PROG" >&5
4590echo "${ECHO_T}$GZIP_PROG" >&6
8ae52ca6
RF
4591else
4592 echo "$as_me:$LINENO: result: no" >&5
4593echo "${ECHO_T}no" >&6
4594fi
4595
ba4481b5 4596
c0d27fcc 4597
8e967cf7
MR
4598if test x$GCC = xyes && test "x$GCC_LINK_TEST_OPTIONS" != x
4599then
4600 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
4601fi
4602
4603if test x$GCC = x && test "x$NON_GCC_LINK_TEST_OPTIONS" != x
4604then
4605 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
4606fi
4607
c0d27fcc 4608
fe239f0f 4609late_LDFLAGS=$LDFLAGS
4af002d6 4610if test "$GCC" = yes; then
fe239f0f
AS
4611 LDFLAGS="$LDFLAGS -Wl,-znocombreloc"
4612else
4613 LDFLAGS="$LDFLAGS -znocombreloc"
4614fi
4615
edfaf76d
LK
4616echo "$as_me:$LINENO: checking for -znocombreloc" >&5
4617echo $ECHO_N "checking for -znocombreloc... $ECHO_C" >&6
fe239f0f
AS
4618cat >conftest.$ac_ext <<_ACEOF
4619main(){return 0;}
4620_ACEOF
4621rm -f conftest.$ac_objext conftest$ac_exeext
4622if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 4623 (eval $ac_link) 2>conftest.er1
fe239f0f 4624 ac_status=$?
edfaf76d
LK
4625 grep -v '^ *+' conftest.er1 >conftest.err
4626 rm -f conftest.er1
4627 cat conftest.err >&5
fe239f0f
AS
4628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4629 (exit $ac_status); } &&
ec8fcb10
YM
4630 { ac_try='test -z "$ac_c_werror_flag"
4631 || test ! -s conftest.err'
edfaf76d
LK
4632 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4633 (eval $ac_try) 2>&5
4634 ac_status=$?
4635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4636 (exit $ac_status); }; } &&
4637 { ac_try='test -s conftest$ac_exeext'
fe239f0f
AS
4638 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4639 (eval $ac_try) 2>&5
4640 ac_status=$?
4641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4642 (exit $ac_status); }; }; then
4643 echo "$as_me:$LINENO: result: yes" >&5
4644echo "${ECHO_T}yes" >&6
4645else
4646 echo "$as_me: failed program was:" >&5
4647sed 's/^/| /' conftest.$ac_ext >&5
4648
4649LDFLAGS=$late_LDFLAGS
4650 echo "$as_me:$LINENO: result: no" >&5
4651echo "${ECHO_T}no" >&6
4652fi
edfaf76d
LK
4653rm -f conftest.err conftest.$ac_objext \
4654 conftest$ac_exeext conftest.$ac_ext
fe239f0f 4655
3b33a005
DL
4656#### Extract some information from the operating system and machine files.
4657
c0d27fcc 4658{ echo "$as_me:$LINENO: checking the machine- and system-dependent files to find out
3b33a005 4659 - which libraries the lib-src programs will want, and
503d2be0
AS
4660 - whether the GNU malloc routines are usable..." >&5
4661echo "$as_me: checking the machine- and system-dependent files to find out
3b33a005 4662 - which libraries the lib-src programs will want, and
503d2be0 4663 - whether the GNU malloc routines are usable..." >&6;}
3b33a005
DL
4664
4665### First figure out CFLAGS (which we use for running the compiler here)
4666### and REAL_CFLAGS (which we use for real compilation).
4667### The two are the same except on a few systems, where they are made
4668### different to work around various lossages. For example,
4669### GCC 2.5 on GNU/Linux needs them to be different because it treats -g
4670### as implying static linking.
4671
4672### If the CFLAGS env var is specified, we use that value
4673### instead of the default.
4674
4675### It's not important that this name contain the PID; you can't run
4676### two configures in the same directory and have anything work
4677### anyway.
4678tempcname="conftest.c"
4679
4680echo '
4681#include "'${srcdir}'/src/'${opsysfile}'"
4682#include "'${srcdir}'/src/'${machfile}'"
4683#ifndef LIBS_MACHINE
4684#define LIBS_MACHINE
4685#endif
4686#ifndef LIBS_SYSTEM
4687#define LIBS_SYSTEM
4688#endif
4689#ifndef C_SWITCH_SYSTEM
4690#define C_SWITCH_SYSTEM
4691#endif
4692#ifndef C_SWITCH_MACHINE
4693#define C_SWITCH_MACHINE
4694#endif
4695configure___ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM
4696configure___ c_switch_system=C_SWITCH_SYSTEM
4697configure___ c_switch_machine=C_SWITCH_MACHINE
4698
4699#ifndef LIB_X11_LIB
4700#define LIB_X11_LIB -lX11
4701#endif
4702
4703#ifndef LIBX11_MACHINE
4704#define LIBX11_MACHINE
4705#endif
4706
4707#ifndef LIBX11_SYSTEM
4708#define LIBX11_SYSTEM
4709#endif
4710configure___ LIBX=LIB_X11_LIB LIBX11_MACHINE LIBX11_SYSTEM
4711
4712#ifdef UNEXEC
4713configure___ unexec=UNEXEC
4714#else
4715configure___ unexec=unexec.o
4716#endif
4717
4718#ifdef SYSTEM_MALLOC
4719configure___ system_malloc=yes
4720#else
4721configure___ system_malloc=no
4722#endif
4723
ef9e4345
GM
4724#ifdef USE_MMAP_FOR_BUFFERS
4725configure___ use_mmap_for_buffers=yes
73b77ee5 4726#else
ef9e4345 4727configure___ use_mmap_for_buffers=no
73b77ee5
GM
4728#endif
4729
3b33a005
DL
4730#ifndef C_DEBUG_SWITCH
4731#define C_DEBUG_SWITCH -g
4732#endif
4733
4734#ifndef C_OPTIMIZE_SWITCH
4735#ifdef __GNUC__
4736#define C_OPTIMIZE_SWITCH -O2
4737#else
4738#define C_OPTIMIZE_SWITCH -O
4739#endif
4740#endif
4741
01abe918
CY
4742#ifndef C_WARNINGS_SWITCH
4743#define C_WARNINGS_SWITCH ${C_WARNINGS_SWITCH}
4744#endif
4745
3b33a005
DL
4746#ifndef LD_SWITCH_MACHINE
4747#define LD_SWITCH_MACHINE
4748#endif
4749
4750#ifndef LD_SWITCH_SYSTEM
4751#define LD_SWITCH_SYSTEM
4752#endif
4753
4754#ifndef LD_SWITCH_X_SITE_AUX
4755#define LD_SWITCH_X_SITE_AUX
503d2be0 4756#endif
3b33a005
DL
4757
4758configure___ ld_switch_system=LD_SWITCH_SYSTEM
4759configure___ ld_switch_machine=LD_SWITCH_MACHINE
4760
4761#ifdef THIS_IS_CONFIGURE
4762
4763/* Get the CFLAGS for tests in configure. */
4764#ifdef __GNUC__
4765configure___ CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
4766#else
4767configure___ CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
4768#endif
4769
4770#else /* not THIS_IS_CONFIGURE */
4771
4772/* Get the CFLAGS for real compilation. */
4773#ifdef __GNUC__
01abe918 4774configure___ REAL_CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH C_WARNINGS_SWITCH '${SPECIFIED_CFLAGS}'
3b33a005
DL
4775#else
4776configure___ REAL_CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
4777#endif
4778
4779#endif /* not THIS_IS_CONFIGURE */
4780' > ${tempcname}
4781
4782# The value of CPP is a quoted variable reference, so we need to do this
4783# to get its actual value...
4784CPP=`eval "echo $CPP"`
4785eval `${CPP} -Isrc ${tempcname} \
4786 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
4787if test "x$SPECIFIED_CFLAGS" = x; then
4788 eval `${CPP} -Isrc -DTHIS_IS_CONFIGURE ${tempcname} \
4789 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
4790else
4791 REAL_CFLAGS="$CFLAGS"
4792fi
4793rm ${tempcname}
4794
4795ac_link="$ac_link $ld_switch_machine $ld_switch_system"
4796
4797### Make sure subsequent tests use flags consistent with the build flags.
4798
4799if test x"${OVERRIDE_CPPFLAGS}" != x; then
4800 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
4801else
4802 CPPFLAGS="$c_switch_system $c_switch_machine $CPPFLAGS"
4803fi
4804
6bae0ccf
DL
4805
4806
503d2be0 4807# Check whether --enable-largefile or --disable-largefile was given.
f4988be7
GM
4808if test "${enable_largefile+set}" = set; then
4809 enableval="$enable_largefile"
f4988be7 4810
503d2be0
AS
4811fi;
4812if test "$enable_largefile" != no; then
f4988be7 4813
c0d27fcc 4814 echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
503d2be0
AS
4815echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
4816if test "${ac_cv_sys_largefile_CC+set}" = set; then
4817 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4818else
f4988be7 4819 ac_cv_sys_largefile_CC=no
503d2be0
AS
4820 if test "$GCC" != yes; then
4821 ac_save_CC=$CC
4822 while :; do
4823 # IRIX 6.2 and later do not support large files by default,
4824 # so use the C compiler's -n32 option if that helps.
edfaf76d 4825 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4826/* confdefs.h. */
4827_ACEOF
4828cat confdefs.h >>conftest.$ac_ext
4829cat >>conftest.$ac_ext <<_ACEOF
4830/* end confdefs.h. */
f4988be7 4831#include <sys/types.h>
503d2be0
AS
4832 /* Check that off_t can represent 2**63 - 1 correctly.
4833 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4834 since some C++ compilers masquerading as C compilers
4835 incorrectly reject 9223372036854775807. */
4836#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4837 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4838 && LARGE_OFF_T % 2147483647 == 1)
4839 ? 1 : -1];
4840int
4841main ()
4842{
f4988be7 4843
503d2be0
AS
4844 ;
4845 return 0;
4846}
4847_ACEOF
4848 rm -f conftest.$ac_objext
c0d27fcc 4849if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 4850 (eval $ac_compile) 2>conftest.er1
503d2be0 4851 ac_status=$?
edfaf76d
LK
4852 grep -v '^ *+' conftest.er1 >conftest.err
4853 rm -f conftest.er1
4854 cat conftest.err >&5
c0d27fcc 4855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 4856 (exit $ac_status); } &&
ec8fcb10
YM
4857 { ac_try='test -z "$ac_c_werror_flag"
4858 || test ! -s conftest.err'
edfaf76d
LK
4859 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4860 (eval $ac_try) 2>&5
4861 ac_status=$?
4862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4863 (exit $ac_status); }; } &&
4864 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 4865 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
4866 (eval $ac_try) 2>&5
4867 ac_status=$?
c0d27fcc 4868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4869 (exit $ac_status); }; }; then
4870 break
b192d653 4871else
503d2be0 4872 echo "$as_me: failed program was:" >&5
19650fd6
AS
4873sed 's/^/| /' conftest.$ac_ext >&5
4874
503d2be0 4875fi
edfaf76d 4876rm -f conftest.err conftest.$ac_objext
503d2be0
AS
4877 CC="$CC -n32"
4878 rm -f conftest.$ac_objext
c0d27fcc 4879if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 4880 (eval $ac_compile) 2>conftest.er1
503d2be0 4881 ac_status=$?
edfaf76d
LK
4882 grep -v '^ *+' conftest.er1 >conftest.err
4883 rm -f conftest.er1
4884 cat conftest.err >&5
c0d27fcc 4885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 4886 (exit $ac_status); } &&
ec8fcb10
YM
4887 { ac_try='test -z "$ac_c_werror_flag"
4888 || test ! -s conftest.err'
edfaf76d
LK
4889 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4890 (eval $ac_try) 2>&5
4891 ac_status=$?
4892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4893 (exit $ac_status); }; } &&
4894 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 4895 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
4896 (eval $ac_try) 2>&5
4897 ac_status=$?
c0d27fcc 4898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4899 (exit $ac_status); }; }; then
4900 ac_cv_sys_largefile_CC=' -n32'; break
4901else
4902 echo "$as_me: failed program was:" >&5
19650fd6
AS
4903sed 's/^/| /' conftest.$ac_ext >&5
4904
503d2be0 4905fi
edfaf76d
LK
4906rm -f conftest.err conftest.$ac_objext
4907 break
503d2be0
AS
4908 done
4909 CC=$ac_save_CC
4910 rm -f conftest.$ac_ext
4911 fi
b192d653 4912fi
c0d27fcc 4913echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
503d2be0
AS
4914echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
4915 if test "$ac_cv_sys_largefile_CC" != no; then
4916 CC=$CC$ac_cv_sys_largefile_CC
4917 fi
b192d653 4918
c0d27fcc 4919 echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
503d2be0
AS
4920echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
4921if test "${ac_cv_sys_file_offset_bits+set}" = set; then
4922 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4923else
503d2be0 4924 while :; do
f4988be7 4925 ac_cv_sys_file_offset_bits=no
503d2be0 4926 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4927/* confdefs.h. */
4928_ACEOF
4929cat confdefs.h >>conftest.$ac_ext
4930cat >>conftest.$ac_ext <<_ACEOF
4931/* end confdefs.h. */
f4988be7 4932#include <sys/types.h>
503d2be0
AS
4933 /* Check that off_t can represent 2**63 - 1 correctly.
4934 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4935 since some C++ compilers masquerading as C compilers
4936 incorrectly reject 9223372036854775807. */
4937#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4938 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4939 && LARGE_OFF_T % 2147483647 == 1)
4940 ? 1 : -1];
4941int
4942main ()
4943{
f4988be7 4944
503d2be0
AS
4945 ;
4946 return 0;
4947}
4948_ACEOF
4949rm -f conftest.$ac_objext
c0d27fcc 4950if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 4951 (eval $ac_compile) 2>conftest.er1
503d2be0 4952 ac_status=$?
edfaf76d
LK
4953 grep -v '^ *+' conftest.er1 >conftest.err
4954 rm -f conftest.er1
4955 cat conftest.err >&5
c0d27fcc 4956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 4957 (exit $ac_status); } &&
ec8fcb10
YM
4958 { ac_try='test -z "$ac_c_werror_flag"
4959 || test ! -s conftest.err'
edfaf76d
LK
4960 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4961 (eval $ac_try) 2>&5
4962 ac_status=$?
4963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4964 (exit $ac_status); }; } &&
4965 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 4966 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
4967 (eval $ac_try) 2>&5
4968 ac_status=$?
c0d27fcc 4969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4970 (exit $ac_status); }; }; then
4971 break
f4988be7 4972else
503d2be0 4973 echo "$as_me: failed program was:" >&5
19650fd6
AS
4974sed 's/^/| /' conftest.$ac_ext >&5
4975
503d2be0 4976fi
edfaf76d 4977rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 4978 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4979/* confdefs.h. */
4980_ACEOF
4981cat confdefs.h >>conftest.$ac_ext
4982cat >>conftest.$ac_ext <<_ACEOF
4983/* end confdefs.h. */
f4988be7
GM
4984#define _FILE_OFFSET_BITS 64
4985#include <sys/types.h>
503d2be0
AS
4986 /* Check that off_t can represent 2**63 - 1 correctly.
4987 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4988 since some C++ compilers masquerading as C compilers
4989 incorrectly reject 9223372036854775807. */
4990#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4991 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4992 && LARGE_OFF_T % 2147483647 == 1)
4993 ? 1 : -1];
4994int
4995main ()
4996{
4997
4998 ;
4999 return 0;
5000}
5001_ACEOF
5002rm -f conftest.$ac_objext
c0d27fcc 5003if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 5004 (eval $ac_compile) 2>conftest.er1
503d2be0 5005 ac_status=$?
edfaf76d
LK
5006 grep -v '^ *+' conftest.er1 >conftest.err
5007 rm -f conftest.er1
5008 cat conftest.err >&5
c0d27fcc 5009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5010 (exit $ac_status); } &&
ec8fcb10
YM
5011 { ac_try='test -z "$ac_c_werror_flag"
5012 || test ! -s conftest.err'
edfaf76d
LK
5013 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5014 (eval $ac_try) 2>&5
5015 ac_status=$?
5016 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5017 (exit $ac_status); }; } &&
5018 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 5019 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5020 (eval $ac_try) 2>&5
5021 ac_status=$?
c0d27fcc 5022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
5023 (exit $ac_status); }; }; then
5024 ac_cv_sys_file_offset_bits=64; break
5025else
5026 echo "$as_me: failed program was:" >&5
19650fd6
AS
5027sed 's/^/| /' conftest.$ac_ext >&5
5028
503d2be0 5029fi
edfaf76d 5030rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
5031 break
5032done
ba4481b5 5033fi
c0d27fcc 5034echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
503d2be0
AS
5035echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
5036if test "$ac_cv_sys_file_offset_bits" != no; then
ba4481b5 5037
c0d27fcc 5038cat >>confdefs.h <<_ACEOF
f4988be7 5039#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
c0d27fcc 5040_ACEOF
f4988be7 5041
503d2be0
AS
5042fi
5043rm -f conftest*
c0d27fcc 5044 echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
503d2be0
AS
5045echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
5046if test "${ac_cv_sys_large_files+set}" = set; then
5047 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5048else
503d2be0 5049 while :; do
f4988be7 5050 ac_cv_sys_large_files=no
503d2be0 5051 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5052/* confdefs.h. */
5053_ACEOF
5054cat confdefs.h >>conftest.$ac_ext
5055cat >>conftest.$ac_ext <<_ACEOF
5056/* end confdefs.h. */
503d2be0
AS
5057#include <sys/types.h>
5058 /* Check that off_t can represent 2**63 - 1 correctly.
5059 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5060 since some C++ compilers masquerading as C compilers
5061 incorrectly reject 9223372036854775807. */
5062#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5063 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5064 && LARGE_OFF_T % 2147483647 == 1)
5065 ? 1 : -1];
5066int
5067main ()
5068{
ba4481b5 5069
503d2be0
AS
5070 ;
5071 return 0;
5072}
5073_ACEOF
5074rm -f conftest.$ac_objext
c0d27fcc 5075if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 5076 (eval $ac_compile) 2>conftest.er1
503d2be0 5077 ac_status=$?
edfaf76d
LK
5078 grep -v '^ *+' conftest.er1 >conftest.err
5079 rm -f conftest.er1
5080 cat conftest.err >&5
c0d27fcc 5081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5082 (exit $ac_status); } &&
ec8fcb10
YM
5083 { ac_try='test -z "$ac_c_werror_flag"
5084 || test ! -s conftest.err'
edfaf76d
LK
5085 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5086 (eval $ac_try) 2>&5
5087 ac_status=$?
5088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5089 (exit $ac_status); }; } &&
5090 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 5091 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5092 (eval $ac_try) 2>&5
5093 ac_status=$?
c0d27fcc 5094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
5095 (exit $ac_status); }; }; then
5096 break
ba4481b5 5097else
503d2be0 5098 echo "$as_me: failed program was:" >&5
19650fd6
AS
5099sed 's/^/| /' conftest.$ac_ext >&5
5100
503d2be0 5101fi
edfaf76d 5102rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 5103 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5104/* confdefs.h. */
5105_ACEOF
5106cat confdefs.h >>conftest.$ac_ext
5107cat >>conftest.$ac_ext <<_ACEOF
5108/* end confdefs.h. */
f4988be7 5109#define _LARGE_FILES 1
503d2be0
AS
5110#include <sys/types.h>
5111 /* Check that off_t can represent 2**63 - 1 correctly.
5112 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5113 since some C++ compilers masquerading as C compilers
5114 incorrectly reject 9223372036854775807. */
5115#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5116 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5117 && LARGE_OFF_T % 2147483647 == 1)
5118 ? 1 : -1];
5119int
5120main ()
5121{
f4988be7 5122
503d2be0
AS
5123 ;
5124 return 0;
5125}
5126_ACEOF
5127rm -f conftest.$ac_objext
c0d27fcc 5128if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 5129 (eval $ac_compile) 2>conftest.er1
503d2be0 5130 ac_status=$?
edfaf76d
LK
5131 grep -v '^ *+' conftest.er1 >conftest.err
5132 rm -f conftest.er1
5133 cat conftest.err >&5
c0d27fcc 5134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5135 (exit $ac_status); } &&
ec8fcb10
YM
5136 { ac_try='test -z "$ac_c_werror_flag"
5137 || test ! -s conftest.err'
edfaf76d
LK
5138 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5139 (eval $ac_try) 2>&5
5140 ac_status=$?
5141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5142 (exit $ac_status); }; } &&
5143 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 5144 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5145 (eval $ac_try) 2>&5
5146 ac_status=$?
c0d27fcc 5147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
5148 (exit $ac_status); }; }; then
5149 ac_cv_sys_large_files=1; break
5150else
5151 echo "$as_me: failed program was:" >&5
19650fd6
AS
5152sed 's/^/| /' conftest.$ac_ext >&5
5153
503d2be0 5154fi
edfaf76d 5155rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
5156 break
5157done
ba4481b5 5158fi
c0d27fcc 5159echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
503d2be0
AS
5160echo "${ECHO_T}$ac_cv_sys_large_files" >&6
5161if test "$ac_cv_sys_large_files" != no; then
ba4481b5 5162
c0d27fcc 5163cat >>confdefs.h <<_ACEOF
f4988be7 5164#define _LARGE_FILES $ac_cv_sys_large_files
c0d27fcc 5165_ACEOF
ba4481b5 5166
503d2be0
AS
5167fi
5168rm -f conftest*
5169fi
ba4481b5 5170
c0d27fcc 5171
439f58ee 5172
bc5d9888
CY
5173### The standard library on x86-64 GNU/Linux distributions can
5174### be located in either /usr/lib64 or /usr/lib.
5175case "${canonical}" in
5176 x86_64-*-linux-gnu* )
5177 if test -d /usr/lib64; then
5178
5179cat >>confdefs.h <<\_ACEOF
5180#define HAVE_X86_64_LIB64_DIR 1
5181_ACEOF
5182
5183fi
5184esac
5185
439f58ee
JD
5186
5187
5188
2c9dccc9
PJ
5189if test "${with_sound}" != "no"; then
5190 # Sound support for GNU/Linux and the free BSDs.
c0d27fcc
MR
5191 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5192echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
5193if test "${ac_cv_header_stdc+set}" = set; then
5194 echo $ECHO_N "(cached) $ECHO_C" >&6
5195else
5196 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5197/* confdefs.h. */
5198_ACEOF
5199cat confdefs.h >>conftest.$ac_ext
5200cat >>conftest.$ac_ext <<_ACEOF
5201/* end confdefs.h. */
c0d27fcc
MR
5202#include <stdlib.h>
5203#include <stdarg.h>
5204#include <string.h>
5205#include <float.h>
98418dba 5206
19650fd6
AS
5207int
5208main ()
5209{
5210
5211 ;
5212 return 0;
5213}
c0d27fcc 5214_ACEOF
19650fd6
AS
5215rm -f conftest.$ac_objext
5216if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 5217 (eval $ac_compile) 2>conftest.er1
cd958eb3 5218 ac_status=$?
edfaf76d
LK
5219 grep -v '^ *+' conftest.er1 >conftest.err
5220 rm -f conftest.er1
5221 cat conftest.err >&5
cd958eb3 5222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19650fd6 5223 (exit $ac_status); } &&
ec8fcb10
YM
5224 { ac_try='test -z "$ac_c_werror_flag"
5225 || test ! -s conftest.err'
edfaf76d
LK
5226 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5227 (eval $ac_try) 2>&5
5228 ac_status=$?
5229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5230 (exit $ac_status); }; } &&
5231 { ac_try='test -s conftest.$ac_objext'
19650fd6
AS
5232 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5233 (eval $ac_try) 2>&5
5234 ac_status=$?
5235 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5236 (exit $ac_status); }; }; then
c0d27fcc
MR
5237 ac_cv_header_stdc=yes
5238else
5239 echo "$as_me: failed program was:" >&5
19650fd6
AS
5240sed 's/^/| /' conftest.$ac_ext >&5
5241
5242ac_cv_header_stdc=no
c0d27fcc 5243fi
edfaf76d 5244rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
5245
5246if test $ac_cv_header_stdc = yes; then
5247 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5248 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5249/* confdefs.h. */
5250_ACEOF
5251cat confdefs.h >>conftest.$ac_ext
5252cat >>conftest.$ac_ext <<_ACEOF
5253/* end confdefs.h. */
c0d27fcc
MR
5254#include <string.h>
5255
5256_ACEOF
5257if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 5258 $EGREP "memchr" >/dev/null 2>&1; then
c0d27fcc
MR
5259 :
5260else
5261 ac_cv_header_stdc=no
5262fi
5263rm -f conftest*
5264
5265fi
5266
5267if test $ac_cv_header_stdc = yes; then
5268 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5269 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5270/* confdefs.h. */
5271_ACEOF
5272cat confdefs.h >>conftest.$ac_ext
5273cat >>conftest.$ac_ext <<_ACEOF
5274/* end confdefs.h. */
c0d27fcc
MR
5275#include <stdlib.h>
5276
5277_ACEOF
5278if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 5279 $EGREP "free" >/dev/null 2>&1; then
c0d27fcc
MR
5280 :
5281else
5282 ac_cv_header_stdc=no
5283fi
5284rm -f conftest*
5285
5286fi
5287
5288if test $ac_cv_header_stdc = yes; then
5289 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5290 if test "$cross_compiling" = yes; then
5291 :
5292else
5293 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5294/* confdefs.h. */
5295_ACEOF
5296cat confdefs.h >>conftest.$ac_ext
5297cat >>conftest.$ac_ext <<_ACEOF
5298/* end confdefs.h. */
c0d27fcc
MR
5299#include <ctype.h>
5300#if ((' ' & 0x0FF) == 0x020)
5301# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5302# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5303#else
19650fd6 5304# define ISLOWER(c) \
edfaf76d
LK
5305 (('a' <= (c) && (c) <= 'i') \
5306 || ('j' <= (c) && (c) <= 'r') \
5307 || ('s' <= (c) && (c) <= 'z'))
c0d27fcc
MR
5308# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5309#endif
5310
5311#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5312int
5313main ()
5314{
5315 int i;
5316 for (i = 0; i < 256; i++)
5317 if (XOR (islower (i), ISLOWER (i))
edfaf76d 5318 || toupper (i) != TOUPPER (i))
c0d27fcc
MR
5319 exit(2);
5320 exit (0);
5321}
5322_ACEOF
5323rm -f conftest$ac_exeext
5324if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5325 (eval $ac_link) 2>&5
5326 ac_status=$?
5327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5328 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5329 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5330 (eval $ac_try) 2>&5
5331 ac_status=$?
5332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5333 (exit $ac_status); }; }; then
5334 :
5335else
5336 echo "$as_me: program exited with status $ac_status" >&5
5337echo "$as_me: failed program was:" >&5
19650fd6
AS
5338sed 's/^/| /' conftest.$ac_ext >&5
5339
c0d27fcc
MR
5340( exit $ac_status )
5341ac_cv_header_stdc=no
5342fi
edfaf76d 5343rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
5344fi
5345fi
5346fi
5347echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5348echo "${ECHO_T}$ac_cv_header_stdc" >&6
5349if test $ac_cv_header_stdc = yes; then
5350
5351cat >>confdefs.h <<\_ACEOF
5352#define STDC_HEADERS 1
5353_ACEOF
5354
5355fi
5356
5357# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
edfaf76d 5368 inttypes.h stdint.h unistd.h
98418dba
CW
5369do
5370as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc 5371echo "$as_me:$LINENO: checking for $ac_header" >&5
98418dba
CW
5372echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5373if eval "test \"\${$as_ac_Header+set}\" = set"; then
503d2be0 5374 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 5375else
925c2f3f 5376 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5377/* confdefs.h. */
5378_ACEOF
5379cat confdefs.h >>conftest.$ac_ext
5380cat >>conftest.$ac_ext <<_ACEOF
5381/* end confdefs.h. */
c0d27fcc
MR
5382$ac_includes_default
5383
5384#include <$ac_header>
5385_ACEOF
5386rm -f conftest.$ac_objext
5387if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 5388 (eval $ac_compile) 2>conftest.er1
c0d27fcc 5389 ac_status=$?
edfaf76d
LK
5390 grep -v '^ *+' conftest.er1 >conftest.err
5391 rm -f conftest.er1
5392 cat conftest.err >&5
c0d27fcc
MR
5393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5394 (exit $ac_status); } &&
ec8fcb10
YM
5395 { ac_try='test -z "$ac_c_werror_flag"
5396 || test ! -s conftest.err'
edfaf76d
LK
5397 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5398 (eval $ac_try) 2>&5
5399 ac_status=$?
5400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5401 (exit $ac_status); }; } &&
5402 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
5403 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5404 (eval $ac_try) 2>&5
5405 ac_status=$?
5406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5407 (exit $ac_status); }; }; then
5408 eval "$as_ac_Header=yes"
5409else
5410 echo "$as_me: failed program was:" >&5
19650fd6
AS
5411sed 's/^/| /' conftest.$ac_ext >&5
5412
c0d27fcc
MR
5413eval "$as_ac_Header=no"
5414fi
edfaf76d 5415rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
5416fi
5417echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5418echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5419if test `eval echo '${'$as_ac_Header'}'` = yes; then
5420 cat >>confdefs.h <<_ACEOF
5421#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5422_ACEOF
5423
5424fi
5425
5426done
5427
5428
5429
5430
5431
5432for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h
5433do
5434as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5435if eval "test \"\${$as_ac_Header+set}\" = set"; then
5436 echo "$as_me:$LINENO: checking for $ac_header" >&5
5437echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5438if eval "test \"\${$as_ac_Header+set}\" = set"; then
5439 echo $ECHO_N "(cached) $ECHO_C" >&6
5440fi
5441echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5442echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5443else
5444 # Is the header compilable?
5445echo "$as_me:$LINENO: checking $ac_header usability" >&5
5446echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
5447cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5448/* confdefs.h. */
5449_ACEOF
5450cat confdefs.h >>conftest.$ac_ext
5451cat >>conftest.$ac_ext <<_ACEOF
5452/* end confdefs.h. */
c0d27fcc 5453$ac_includes_default
98418dba 5454#include <$ac_header>
503d2be0 5455_ACEOF
c0d27fcc
MR
5456rm -f conftest.$ac_objext
5457if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 5458 (eval $ac_compile) 2>conftest.er1
c0d27fcc 5459 ac_status=$?
edfaf76d
LK
5460 grep -v '^ *+' conftest.er1 >conftest.err
5461 rm -f conftest.er1
5462 cat conftest.err >&5
c0d27fcc
MR
5463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5464 (exit $ac_status); } &&
ec8fcb10
YM
5465 { ac_try='test -z "$ac_c_werror_flag"
5466 || test ! -s conftest.err'
edfaf76d
LK
5467 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5468 (eval $ac_try) 2>&5
5469 ac_status=$?
5470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5471 (exit $ac_status); }; } &&
5472 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
5473 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5474 (eval $ac_try) 2>&5
5475 ac_status=$?
5476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5477 (exit $ac_status); }; }; then
5478 ac_header_compiler=yes
5479else
5480 echo "$as_me: failed program was:" >&5
19650fd6
AS
5481sed 's/^/| /' conftest.$ac_ext >&5
5482
c0d27fcc
MR
5483ac_header_compiler=no
5484fi
edfaf76d 5485rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
5486echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5487echo "${ECHO_T}$ac_header_compiler" >&6
5488
5489# Is the header present?
5490echo "$as_me:$LINENO: checking $ac_header presence" >&5
5491echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
5492cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5493/* confdefs.h. */
5494_ACEOF
5495cat confdefs.h >>conftest.$ac_ext
5496cat >>conftest.$ac_ext <<_ACEOF
5497/* end confdefs.h. */
c0d27fcc
MR
5498#include <$ac_header>
5499_ACEOF
5500if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba 5501 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
503d2be0 5502 ac_status=$?
6bae0ccf 5503 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
5504 rm -f conftest.er1
5505 cat conftest.err >&5
c0d27fcc 5506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
5507 (exit $ac_status); } >/dev/null; then
5508 if test -s conftest.err; then
5509 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 5510 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
5511 else
5512 ac_cpp_err=
5513 fi
5514else
5515 ac_cpp_err=yes
5516fi
5517if test -z "$ac_cpp_err"; then
c0d27fcc 5518 ac_header_preproc=yes
f4988be7 5519else
503d2be0 5520 echo "$as_me: failed program was:" >&5
19650fd6
AS
5521sed 's/^/| /' conftest.$ac_ext >&5
5522
c0d27fcc 5523 ac_header_preproc=no
f4988be7 5524fi
98418dba 5525rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
5526echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5527echo "${ECHO_T}$ac_header_preproc" >&6
5528
5529# So? What about this header?
edfaf76d
LK
5530case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5531 yes:no: )
c0d27fcc
MR
5532 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5533echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
5534 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5535echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
5536 ac_header_preproc=yes
19650fd6 5537 ;;
edfaf76d 5538 no:yes:* )
c0d27fcc
MR
5539 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5540echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
5541 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5542echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5543 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5544echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5545 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5546echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 5547 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 5548echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
5549 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5550echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
5551 (
5552 cat <<\_ASBOX
edfaf76d
LK
5553## ------------------------------------------ ##
5554## Report this to the AC_PACKAGE_NAME lists. ##
5555## ------------------------------------------ ##
19650fd6
AS
5556_ASBOX
5557 ) |
5558 sed "s/^/$as_me: WARNING: /" >&2
5559 ;;
c0d27fcc
MR
5560esac
5561echo "$as_me:$LINENO: checking for $ac_header" >&5
5562echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5563if eval "test \"\${$as_ac_Header+set}\" = set"; then
5564 echo $ECHO_N "(cached) $ECHO_C" >&6
5565else
edfaf76d 5566 eval "$as_ac_Header=\$ac_header_preproc"
f4988be7 5567fi
c0d27fcc 5568echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 5569echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
5570
5571fi
98418dba 5572if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 5573 cat >>confdefs.h <<_ACEOF
98418dba 5574#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 5575_ACEOF
f4988be7
GM
5576
5577fi
c0d27fcc 5578
98418dba
CW
5579done
5580
5581 # Emulation library used on NetBSD.
c0d27fcc 5582 echo "$as_me:$LINENO: checking for _oss_ioctl in -lossaudio" >&5
98418dba
CW
5583echo $ECHO_N "checking for _oss_ioctl in -lossaudio... $ECHO_C" >&6
5584if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then
503d2be0 5585 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 5586else
98418dba
CW
5587 ac_check_lib_save_LIBS=$LIBS
5588LIBS="-lossaudio $LIBS"
5589cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5590/* confdefs.h. */
5591_ACEOF
5592cat confdefs.h >>conftest.$ac_ext
5593cat >>conftest.$ac_ext <<_ACEOF
5594/* end confdefs.h. */
98418dba
CW
5595
5596/* Override any gcc2 internal prototype to avoid an error. */
5597#ifdef __cplusplus
5598extern "C"
f4988be7 5599#endif
98418dba
CW
5600/* We use char because int might match the return type of a gcc2
5601 builtin and then its argument prototype would still apply. */
5602char _oss_ioctl ();
503d2be0
AS
5603int
5604main ()
5605{
98418dba 5606_oss_ioctl ();
503d2be0
AS
5607 ;
5608 return 0;
5609}
5610_ACEOF
98418dba 5611rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 5612if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 5613 (eval $ac_link) 2>conftest.er1
503d2be0 5614 ac_status=$?
edfaf76d
LK
5615 grep -v '^ *+' conftest.er1 >conftest.err
5616 rm -f conftest.er1
5617 cat conftest.err >&5
c0d27fcc 5618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5619 (exit $ac_status); } &&
ec8fcb10
YM
5620 { ac_try='test -z "$ac_c_werror_flag"
5621 || test ! -s conftest.err'
edfaf76d
LK
5622 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5623 (eval $ac_try) 2>&5
5624 ac_status=$?
5625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5626 (exit $ac_status); }; } &&
5627 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 5628 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5629 (eval $ac_try) 2>&5
5630 ac_status=$?
c0d27fcc 5631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5632 (exit $ac_status); }; }; then
98418dba 5633 ac_cv_lib_ossaudio__oss_ioctl=yes
f4988be7 5634else
503d2be0 5635 echo "$as_me: failed program was:" >&5
19650fd6
AS
5636sed 's/^/| /' conftest.$ac_ext >&5
5637
98418dba 5638ac_cv_lib_ossaudio__oss_ioctl=no
f4988be7 5639fi
edfaf76d
LK
5640rm -f conftest.err conftest.$ac_objext \
5641 conftest$ac_exeext conftest.$ac_ext
98418dba 5642LIBS=$ac_check_lib_save_LIBS
f4988be7 5643fi
c0d27fcc 5644echo "$as_me:$LINENO: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5
98418dba
CW
5645echo "${ECHO_T}$ac_cv_lib_ossaudio__oss_ioctl" >&6
5646if test $ac_cv_lib_ossaudio__oss_ioctl = yes; then
5647 LIBSOUND=-lossaudio
5648else
5649 LIBSOUND=
5650fi
5651
c0d27fcc 5652
439f58ee
JD
5653
5654 ALSA_REQUIRED=1.0.0
5655 ALSA_MODULES="alsa >= $ALSA_REQUIRED"
5656 if test "X${with_pkg_config_prog}" != X; then
5657 PKG_CONFIG="${with_pkg_config_prog}"
5658 fi
5659
5660 succeeded=no
5661
5662 if test -z "$PKG_CONFIG"; then
5663 # Extract the first word of "pkg-config", so it can be a program name with args.
5664set dummy pkg-config; ac_word=$2
5665echo "$as_me:$LINENO: checking for $ac_word" >&5
5666echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5667if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
5668 echo $ECHO_N "(cached) $ECHO_C" >&6
5669else
5670 case $PKG_CONFIG in
5671 [\\/]* | ?:[\\/]*)
5672 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
5673 ;;
5674 *)
5675 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5676for as_dir in $PATH
5677do
5678 IFS=$as_save_IFS
5679 test -z "$as_dir" && as_dir=.
5680 for ac_exec_ext in '' $ac_executable_extensions; do
5681 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5682 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
5683 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5684 break 2
5685 fi
5686done
5687done
5688
5689 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
5690 ;;
5691esac
5692fi
5693PKG_CONFIG=$ac_cv_path_PKG_CONFIG
5694
5695if test -n "$PKG_CONFIG"; then
5696 echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
5697echo "${ECHO_T}$PKG_CONFIG" >&6
5698else
5699 echo "$as_me:$LINENO: result: no" >&5
5700echo "${ECHO_T}no" >&6
5701fi
5702
5703 fi
5704
5705 if test "$PKG_CONFIG" = "no" ; then
5706 HAVE_ALSA=no
5707 else
5708 PKG_CONFIG_MIN_VERSION=0.9.0
5709 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5710 echo "$as_me:$LINENO: checking for $ALSA_MODULES" >&5
5711echo $ECHO_N "checking for $ALSA_MODULES... $ECHO_C" >&6
5712
67db6aa2 5713 if $PKG_CONFIG --exists "$ALSA_MODULES" 2>&5; then
439f58ee
JD
5714 echo "$as_me:$LINENO: result: yes" >&5
5715echo "${ECHO_T}yes" >&6
5716 succeeded=yes
5717
5718 echo "$as_me:$LINENO: checking ALSA_CFLAGS" >&5
5719echo $ECHO_N "checking ALSA_CFLAGS... $ECHO_C" >&6
5720 ALSA_CFLAGS=`$PKG_CONFIG --cflags "$ALSA_MODULES"`
5721 echo "$as_me:$LINENO: result: $ALSA_CFLAGS" >&5
5722echo "${ECHO_T}$ALSA_CFLAGS" >&6
5723
5724 echo "$as_me:$LINENO: checking ALSA_LIBS" >&5
5725echo $ECHO_N "checking ALSA_LIBS... $ECHO_C" >&6
5726 ALSA_LIBS=`$PKG_CONFIG --libs "$ALSA_MODULES"`
5727 echo "$as_me:$LINENO: result: $ALSA_LIBS" >&5
5728echo "${ECHO_T}$ALSA_LIBS" >&6
5729 else
5730 echo "$as_me:$LINENO: result: no" >&5
5731echo "${ECHO_T}no" >&6
5732 ALSA_CFLAGS=""
5733 ALSA_LIBS=""
5734 ## If we have a custom action on failure, don't print errors, but
5735 ## do set a variable so people can do so.
5736 ALSA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$ALSA_MODULES"`
5737
5738 fi
5739
5740
5741
5742 else
5743 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
5744 echo "*** See http://www.freedesktop.org/software/pkgconfig"
5745 fi
5746 fi
5747
5748 if test $succeeded = yes; then
5749 HAVE_ALSA=yes
5750 else
5751 HAVE_ALSA=no
5752 fi
5753
5754 if test $HAVE_ALSA = yes; then
5755 LIBSOUND="$LIBSOUND $ALSA_LIBS"
5756 CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS"
5757
5758cat >>confdefs.h <<\_ACEOF
5759#define HAVE_ALSA 1
5760_ACEOF
5761
5762 fi
5763
f4988be7 5764fi
c0d27fcc
MR
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
22044edf
DL
5783
5784
973a76b1 5785
cffcede7 5786
551ffc27 5787
226e2359 5788
c0d27fcc 5789
f4988be7 5790
98418dba
CW
5791for ac_header in sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \
5792 linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \
25ca0bca 5793 termcap.h stdio_ext.h fcntl.h strings.h coff.h pty.h sys/mman.h \
551ffc27 5794 sys/param.h sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h \
226e2359 5795 sys/utsname.h pwd.h
98418dba
CW
5796do
5797as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
5798if eval "test \"\${$as_ac_Header+set}\" = set"; then
5799 echo "$as_me:$LINENO: checking for $ac_header" >&5
98418dba
CW
5800echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5801if eval "test \"\${$as_ac_Header+set}\" = set"; then
503d2be0 5802 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
5803fi
5804echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5805echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
f4988be7 5806else
c0d27fcc
MR
5807 # Is the header compilable?
5808echo "$as_me:$LINENO: checking $ac_header usability" >&5
5809echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
5810cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5811/* confdefs.h. */
5812_ACEOF
5813cat confdefs.h >>conftest.$ac_ext
5814cat >>conftest.$ac_ext <<_ACEOF
5815/* end confdefs.h. */
c0d27fcc
MR
5816$ac_includes_default
5817#include <$ac_header>
5818_ACEOF
5819rm -f conftest.$ac_objext
5820if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 5821 (eval $ac_compile) 2>conftest.er1
c0d27fcc 5822 ac_status=$?
edfaf76d
LK
5823 grep -v '^ *+' conftest.er1 >conftest.err
5824 rm -f conftest.er1
5825 cat conftest.err >&5
c0d27fcc
MR
5826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5827 (exit $ac_status); } &&
ec8fcb10
YM
5828 { ac_try='test -z "$ac_c_werror_flag"
5829 || test ! -s conftest.err'
edfaf76d
LK
5830 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5831 (eval $ac_try) 2>&5
5832 ac_status=$?
5833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5834 (exit $ac_status); }; } &&
5835 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
5836 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5837 (eval $ac_try) 2>&5
5838 ac_status=$?
5839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5840 (exit $ac_status); }; }; then
5841 ac_header_compiler=yes
5842else
5843 echo "$as_me: failed program was:" >&5
19650fd6
AS
5844sed 's/^/| /' conftest.$ac_ext >&5
5845
c0d27fcc
MR
5846ac_header_compiler=no
5847fi
edfaf76d 5848rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
5849echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5850echo "${ECHO_T}$ac_header_compiler" >&6
5851
5852# Is the header present?
5853echo "$as_me:$LINENO: checking $ac_header presence" >&5
5854echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
5855cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5856/* confdefs.h. */
5857_ACEOF
5858cat confdefs.h >>conftest.$ac_ext
5859cat >>conftest.$ac_ext <<_ACEOF
5860/* end confdefs.h. */
98418dba 5861#include <$ac_header>
503d2be0 5862_ACEOF
c0d27fcc 5863if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba 5864 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
503d2be0 5865 ac_status=$?
6bae0ccf 5866 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
5867 rm -f conftest.er1
5868 cat conftest.err >&5
c0d27fcc 5869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
5870 (exit $ac_status); } >/dev/null; then
5871 if test -s conftest.err; then
5872 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 5873 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
5874 else
5875 ac_cpp_err=
5876 fi
5877else
5878 ac_cpp_err=yes
5879fi
5880if test -z "$ac_cpp_err"; then
c0d27fcc 5881 ac_header_preproc=yes
34ec9ebe 5882else
503d2be0 5883 echo "$as_me: failed program was:" >&5
19650fd6
AS
5884sed 's/^/| /' conftest.$ac_ext >&5
5885
c0d27fcc 5886 ac_header_preproc=no
34ec9ebe 5887fi
98418dba 5888rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
5889echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5890echo "${ECHO_T}$ac_header_preproc" >&6
5891
5892# So? What about this header?
edfaf76d
LK
5893case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5894 yes:no: )
c0d27fcc
MR
5895 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5896echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
5897 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5898echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
5899 ac_header_preproc=yes
19650fd6 5900 ;;
edfaf76d 5901 no:yes:* )
c0d27fcc
MR
5902 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5903echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
5904 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5905echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5906 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5907echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5908 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5909echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 5910 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 5911echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
5912 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5913echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
5914 (
5915 cat <<\_ASBOX
edfaf76d
LK
5916## ------------------------------------------ ##
5917## Report this to the AC_PACKAGE_NAME lists. ##
5918## ------------------------------------------ ##
19650fd6
AS
5919_ASBOX
5920 ) |
5921 sed "s/^/$as_me: WARNING: /" >&2
5922 ;;
c0d27fcc
MR
5923esac
5924echo "$as_me:$LINENO: checking for $ac_header" >&5
5925echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5926if eval "test \"\${$as_ac_Header+set}\" = set"; then
5927 echo $ECHO_N "(cached) $ECHO_C" >&6
5928else
edfaf76d 5929 eval "$as_ac_Header=\$ac_header_preproc"
34ec9ebe 5930fi
c0d27fcc 5931echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 5932echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
5933
5934fi
98418dba 5935if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 5936 cat >>confdefs.h <<_ACEOF
98418dba 5937#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 5938_ACEOF
34ec9ebe 5939
98418dba 5940fi
c0d27fcc 5941
98418dba
CW
5942done
5943
22044edf 5944
f17e308a
JD
5945echo "$as_me:$LINENO: checking if personality LINUX32 can be set" >&5
5946echo $ECHO_N "checking if personality LINUX32 can be set... $ECHO_C" >&6
5947cat >conftest.$ac_ext <<_ACEOF
5948/* confdefs.h. */
5949_ACEOF
5950cat confdefs.h >>conftest.$ac_ext
5951cat >>conftest.$ac_ext <<_ACEOF
5952/* end confdefs.h. */
5953#include <sys/personality.h>
5954int
5955main ()
5956{
5957personality (PER_LINUX32)
5958 ;
5959 return 0;
5960}
5961_ACEOF
5962rm -f conftest.$ac_objext
5963if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 5964 (eval $ac_compile) 2>conftest.er1
f17e308a 5965 ac_status=$?
edfaf76d
LK
5966 grep -v '^ *+' conftest.er1 >conftest.err
5967 rm -f conftest.er1
5968 cat conftest.err >&5
f17e308a
JD
5969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5970 (exit $ac_status); } &&
ec8fcb10
YM
5971 { ac_try='test -z "$ac_c_werror_flag"
5972 || test ! -s conftest.err'
edfaf76d
LK
5973 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5974 (eval $ac_try) 2>&5
5975 ac_status=$?
5976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5977 (exit $ac_status); }; } &&
5978 { ac_try='test -s conftest.$ac_objext'
f17e308a
JD
5979 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5980 (eval $ac_try) 2>&5
5981 ac_status=$?
5982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5983 (exit $ac_status); }; }; then
5984 emacs_cv_personality_linux32=yes
5985else
5986 echo "$as_me: failed program was:" >&5
5987sed 's/^/| /' conftest.$ac_ext >&5
5988
5989emacs_cv_personality_linux32=no
5990fi
edfaf76d 5991rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
f17e308a
JD
5992echo "$as_me:$LINENO: result: $emacs_cv_personality_linux32" >&5
5993echo "${ECHO_T}$emacs_cv_personality_linux32" >&6
5994
5995if test $emacs_cv_personality_linux32 = yes; then
5996
5997cat >>confdefs.h <<\_ACEOF
5998#define HAVE_PERSONALITY_LINUX32 1
5999_ACEOF
6000
6001fi
6002
6003
22044edf
DL
6004for ac_header in term.h
6005do
6006as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6007echo "$as_me:$LINENO: checking for $ac_header" >&5
6008echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6009if eval "test \"\${$as_ac_Header+set}\" = set"; then
6010 echo $ECHO_N "(cached) $ECHO_C" >&6
6011else
6012 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6013/* confdefs.h. */
6014_ACEOF
6015cat confdefs.h >>conftest.$ac_ext
6016cat >>conftest.$ac_ext <<_ACEOF
6017/* end confdefs.h. */
22044edf
DL
6018#include <$ac_header>
6019_ACEOF
6020if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6021 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6022 ac_status=$?
6023 grep -v '^ *+' conftest.er1 >conftest.err
6024 rm -f conftest.er1
6025 cat conftest.err >&5
6026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6027 (exit $ac_status); } >/dev/null; then
6028 if test -s conftest.err; then
6029 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 6030 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
22044edf
DL
6031 else
6032 ac_cpp_err=
6033 fi
6034else
6035 ac_cpp_err=yes
6036fi
6037if test -z "$ac_cpp_err"; then
6038 eval "$as_ac_Header=yes"
6039else
6040 echo "$as_me: failed program was:" >&5
19650fd6
AS
6041sed 's/^/| /' conftest.$ac_ext >&5
6042
22044edf
DL
6043 eval "$as_ac_Header=no"
6044fi
6045rm -f conftest.err conftest.$ac_ext
6046fi
6047echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6048echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6049if test `eval echo '${'$as_ac_Header'}'` = yes; then
6050 cat >>confdefs.h <<_ACEOF
6051#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6052_ACEOF
6053
6054fi
6055
6056done
6057
c0d27fcc 6058echo "$as_me:$LINENO: checking for ANSI C header files" >&5
98418dba
CW
6059echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
6060if test "${ac_cv_header_stdc+set}" = set; then
503d2be0 6061 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6062else
503d2be0 6063 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6064/* confdefs.h. */
6065_ACEOF
6066cat confdefs.h >>conftest.$ac_ext
6067cat >>conftest.$ac_ext <<_ACEOF
6068/* end confdefs.h. */
98418dba
CW
6069#include <stdlib.h>
6070#include <stdarg.h>
6071#include <string.h>
6072#include <float.h>
6073
19650fd6
AS
6074int
6075main ()
6076{
6077
6078 ;
6079 return 0;
6080}
98418dba 6081_ACEOF
19650fd6
AS
6082rm -f conftest.$ac_objext
6083if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 6084 (eval $ac_compile) 2>conftest.er1
cd958eb3 6085 ac_status=$?
edfaf76d
LK
6086 grep -v '^ *+' conftest.er1 >conftest.err
6087 rm -f conftest.er1
6088 cat conftest.err >&5
cd958eb3 6089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19650fd6 6090 (exit $ac_status); } &&
ec8fcb10
YM
6091 { ac_try='test -z "$ac_c_werror_flag"
6092 || test ! -s conftest.err'
edfaf76d
LK
6093 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6094 (eval $ac_try) 2>&5
6095 ac_status=$?
6096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6097 (exit $ac_status); }; } &&
6098 { ac_try='test -s conftest.$ac_objext'
19650fd6
AS
6099 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6100 (eval $ac_try) 2>&5
6101 ac_status=$?
6102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6103 (exit $ac_status); }; }; then
98418dba 6104 ac_cv_header_stdc=yes
ba4481b5 6105else
503d2be0 6106 echo "$as_me: failed program was:" >&5
19650fd6
AS
6107sed 's/^/| /' conftest.$ac_ext >&5
6108
6109ac_cv_header_stdc=no
ba4481b5 6110fi
edfaf76d 6111rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba
CW
6112
6113if test $ac_cv_header_stdc = yes; then
6114 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6115 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6116/* confdefs.h. */
6117_ACEOF
6118cat confdefs.h >>conftest.$ac_ext
6119cat >>conftest.$ac_ext <<_ACEOF
6120/* end confdefs.h. */
98418dba
CW
6121#include <string.h>
6122
6123_ACEOF
6124if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 6125 $EGREP "memchr" >/dev/null 2>&1; then
98418dba
CW
6126 :
6127else
6128 ac_cv_header_stdc=no
ba4481b5 6129fi
98418dba 6130rm -f conftest*
ba4481b5
DL
6131
6132fi
6133
98418dba
CW
6134if test $ac_cv_header_stdc = yes; then
6135 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6136 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6137/* confdefs.h. */
6138_ACEOF
6139cat confdefs.h >>conftest.$ac_ext
6140cat >>conftest.$ac_ext <<_ACEOF
6141/* end confdefs.h. */
98418dba
CW
6142#include <stdlib.h>
6143
6144_ACEOF
6145if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 6146 $EGREP "free" >/dev/null 2>&1; then
98418dba
CW
6147 :
6148else
6149 ac_cv_header_stdc=no
6150fi
6151rm -f conftest*
6152
6153fi
6154
6155if test $ac_cv_header_stdc = yes; then
6156 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6157 if test "$cross_compiling" = yes; then
6158 :
d42122a3 6159else
503d2be0 6160 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6161/* confdefs.h. */
6162_ACEOF
6163cat confdefs.h >>conftest.$ac_ext
6164cat >>conftest.$ac_ext <<_ACEOF
6165/* end confdefs.h. */
98418dba
CW
6166#include <ctype.h>
6167#if ((' ' & 0x0FF) == 0x020)
6168# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6169# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6170#else
19650fd6 6171# define ISLOWER(c) \
edfaf76d
LK
6172 (('a' <= (c) && (c) <= 'i') \
6173 || ('j' <= (c) && (c) <= 'r') \
6174 || ('s' <= (c) && (c) <= 'z'))
98418dba
CW
6175# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6176#endif
6177
6178#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
503d2be0
AS
6179int
6180main ()
6181{
98418dba
CW
6182 int i;
6183 for (i = 0; i < 256; i++)
6184 if (XOR (islower (i), ISLOWER (i))
edfaf76d 6185 || toupper (i) != TOUPPER (i))
98418dba
CW
6186 exit(2);
6187 exit (0);
503d2be0
AS
6188}
6189_ACEOF
98418dba 6190rm -f conftest$ac_exeext
c0d27fcc 6191if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba 6192 (eval $ac_link) 2>&5
503d2be0 6193 ac_status=$?
c0d27fcc 6194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 6195 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 6196 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
6197 (eval $ac_try) 2>&5
6198 ac_status=$?
c0d27fcc 6199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6200 (exit $ac_status); }; }; then
98418dba 6201 :
d42122a3 6202else
98418dba
CW
6203 echo "$as_me: program exited with status $ac_status" >&5
6204echo "$as_me: failed program was:" >&5
19650fd6
AS
6205sed 's/^/| /' conftest.$ac_ext >&5
6206
c0d27fcc 6207( exit $ac_status )
98418dba 6208ac_cv_header_stdc=no
d42122a3 6209fi
edfaf76d 6210rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
d42122a3 6211fi
98418dba
CW
6212fi
6213fi
c0d27fcc 6214echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
98418dba
CW
6215echo "${ECHO_T}$ac_cv_header_stdc" >&6
6216if test $ac_cv_header_stdc = yes; then
6217
c0d27fcc 6218cat >>confdefs.h <<\_ACEOF
98418dba 6219#define STDC_HEADERS 1
c0d27fcc 6220_ACEOF
d42122a3
DL
6221
6222fi
6223
c0d27fcc 6224echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
98418dba
CW
6225echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
6226if test "${ac_cv_header_time+set}" = set; then
503d2be0 6227 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6228else
503d2be0 6229 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6230/* confdefs.h. */
6231_ACEOF
6232cat confdefs.h >>conftest.$ac_ext
6233cat >>conftest.$ac_ext <<_ACEOF
6234/* end confdefs.h. */
ba4481b5 6235#include <sys/types.h>
98418dba 6236#include <sys/time.h>
ba4481b5 6237#include <time.h>
503d2be0
AS
6238
6239int
6240main ()
6241{
98418dba
CW
6242if ((struct tm *) 0)
6243return 0;
503d2be0
AS
6244 ;
6245 return 0;
6246}
6247_ACEOF
6248rm -f conftest.$ac_objext
c0d27fcc 6249if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 6250 (eval $ac_compile) 2>conftest.er1
503d2be0 6251 ac_status=$?
edfaf76d
LK
6252 grep -v '^ *+' conftest.er1 >conftest.err
6253 rm -f conftest.er1
6254 cat conftest.err >&5
c0d27fcc 6255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6256 (exit $ac_status); } &&
ec8fcb10
YM
6257 { ac_try='test -z "$ac_c_werror_flag"
6258 || test ! -s conftest.err'
edfaf76d
LK
6259 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6260 (eval $ac_try) 2>&5
6261 ac_status=$?
6262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6263 (exit $ac_status); }; } &&
6264 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6265 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
6266 (eval $ac_try) 2>&5
6267 ac_status=$?
c0d27fcc 6268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6269 (exit $ac_status); }; }; then
98418dba 6270 ac_cv_header_time=yes
ba4481b5 6271else
503d2be0 6272 echo "$as_me: failed program was:" >&5
19650fd6
AS
6273sed 's/^/| /' conftest.$ac_ext >&5
6274
98418dba 6275ac_cv_header_time=no
ba4481b5 6276fi
edfaf76d 6277rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 6278fi
c0d27fcc 6279echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
98418dba
CW
6280echo "${ECHO_T}$ac_cv_header_time" >&6
6281if test $ac_cv_header_time = yes; then
503d2be0 6282
c0d27fcc 6283cat >>confdefs.h <<\_ACEOF
98418dba 6284#define TIME_WITH_SYS_TIME 1
c0d27fcc 6285_ACEOF
ba4481b5
DL
6286
6287fi
6288
cd958eb3
MB
6289echo "$as_me:$LINENO: checking whether sys_siglist is declared" >&5
6290echo $ECHO_N "checking whether sys_siglist is declared... $ECHO_C" >&6
6291if test "${ac_cv_have_decl_sys_siglist+set}" = set; then
503d2be0 6292 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6293else
503d2be0 6294 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6295/* confdefs.h. */
6296_ACEOF
6297cat confdefs.h >>conftest.$ac_ext
6298cat >>conftest.$ac_ext <<_ACEOF
6299/* end confdefs.h. */
cd958eb3
MB
6300$ac_includes_default
6301int
6302main ()
6303{
6304#ifndef sys_siglist
6305 char *p = (char *) sys_siglist;
98418dba 6306#endif
503d2be0 6307
cd958eb3
MB
6308 ;
6309 return 0;
6310}
6311_ACEOF
6312rm -f conftest.$ac_objext
6313if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 6314 (eval $ac_compile) 2>conftest.er1
cd958eb3 6315 ac_status=$?
edfaf76d
LK
6316 grep -v '^ *+' conftest.er1 >conftest.err
6317 rm -f conftest.er1
6318 cat conftest.err >&5
cd958eb3
MB
6319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6320 (exit $ac_status); } &&
ec8fcb10
YM
6321 { ac_try='test -z "$ac_c_werror_flag"
6322 || test ! -s conftest.err'
edfaf76d
LK
6323 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6324 (eval $ac_try) 2>&5
6325 ac_status=$?
6326 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6327 (exit $ac_status); }; } &&
6328 { ac_try='test -s conftest.$ac_objext'
cd958eb3
MB
6329 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6330 (eval $ac_try) 2>&5
6331 ac_status=$?
6332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6333 (exit $ac_status); }; }; then
6334 ac_cv_have_decl_sys_siglist=yes
6335else
6336 echo "$as_me: failed program was:" >&5
19650fd6
AS
6337sed 's/^/| /' conftest.$ac_ext >&5
6338
cd958eb3
MB
6339ac_cv_have_decl_sys_siglist=no
6340fi
edfaf76d 6341rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
cd958eb3
MB
6342fi
6343echo "$as_me:$LINENO: result: $ac_cv_have_decl_sys_siglist" >&5
6344echo "${ECHO_T}$ac_cv_have_decl_sys_siglist" >&6
6345if test $ac_cv_have_decl_sys_siglist = yes; then
6346
6347cat >>confdefs.h <<_ACEOF
6348#define HAVE_DECL_SYS_SIGLIST 1
6349_ACEOF
6350
6351
6352else
6353 cat >>confdefs.h <<_ACEOF
6354#define HAVE_DECL_SYS_SIGLIST 0
6355_ACEOF
6356
6357
6358fi
6359
6360
6361if test $ac_cv_have_decl_sys_siglist != yes; then
6362 # For Tru64, at least:
6363 echo "$as_me:$LINENO: checking whether __sys_siglist is declared" >&5
6364echo $ECHO_N "checking whether __sys_siglist is declared... $ECHO_C" >&6
6365if test "${ac_cv_have_decl___sys_siglist+set}" = set; then
6366 echo $ECHO_N "(cached) $ECHO_C" >&6
6367else
6368 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6369/* confdefs.h. */
6370_ACEOF
6371cat confdefs.h >>conftest.$ac_ext
6372cat >>conftest.$ac_ext <<_ACEOF
6373/* end confdefs.h. */
cd958eb3 6374$ac_includes_default
503d2be0
AS
6375int
6376main ()
6377{
cd958eb3
MB
6378#ifndef __sys_siglist
6379 char *p = (char *) __sys_siglist;
6380#endif
6381
503d2be0
AS
6382 ;
6383 return 0;
6384}
6385_ACEOF
6386rm -f conftest.$ac_objext
c0d27fcc 6387if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 6388 (eval $ac_compile) 2>conftest.er1
503d2be0 6389 ac_status=$?
edfaf76d
LK
6390 grep -v '^ *+' conftest.er1 >conftest.err
6391 rm -f conftest.er1
6392 cat conftest.err >&5
c0d27fcc 6393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6394 (exit $ac_status); } &&
ec8fcb10
YM
6395 { ac_try='test -z "$ac_c_werror_flag"
6396 || test ! -s conftest.err'
edfaf76d
LK
6397 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6398 (eval $ac_try) 2>&5
6399 ac_status=$?
6400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6401 (exit $ac_status); }; } &&
6402 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6403 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
6404 (eval $ac_try) 2>&5
6405 ac_status=$?
c0d27fcc 6406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6407 (exit $ac_status); }; }; then
cd958eb3 6408 ac_cv_have_decl___sys_siglist=yes
ba4481b5 6409else
503d2be0 6410 echo "$as_me: failed program was:" >&5
19650fd6
AS
6411sed 's/^/| /' conftest.$ac_ext >&5
6412
cd958eb3 6413ac_cv_have_decl___sys_siglist=no
ba4481b5 6414fi
edfaf76d 6415rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 6416fi
cd958eb3
MB
6417echo "$as_me:$LINENO: result: $ac_cv_have_decl___sys_siglist" >&5
6418echo "${ECHO_T}$ac_cv_have_decl___sys_siglist" >&6
6419if test $ac_cv_have_decl___sys_siglist = yes; then
503d2be0 6420
cd958eb3
MB
6421cat >>confdefs.h <<_ACEOF
6422#define HAVE_DECL___SYS_SIGLIST 1
6423_ACEOF
6424
6425
6426else
6427 cat >>confdefs.h <<_ACEOF
6428#define HAVE_DECL___SYS_SIGLIST 0
c0d27fcc 6429_ACEOF
503d2be0 6430
cd958eb3 6431
ba4481b5
DL
6432fi
6433
cd958eb3
MB
6434
6435 if test $ac_cv_have_decl___sys_siglist = yes; then
6436
6437cat >>confdefs.h <<\_ACEOF
6438#define sys_siglist __sys_siglist
6439_ACEOF
6440
6441 fi
6442fi
c0d27fcc 6443echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
98418dba
CW
6444echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
6445if test "${ac_cv_header_sys_wait_h+set}" = set; then
503d2be0 6446 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6447else
503d2be0 6448 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6449/* confdefs.h. */
6450_ACEOF
6451cat confdefs.h >>conftest.$ac_ext
6452cat >>conftest.$ac_ext <<_ACEOF
6453/* end confdefs.h. */
98418dba
CW
6454#include <sys/types.h>
6455#include <sys/wait.h>
6456#ifndef WEXITSTATUS
6457# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
6458#endif
6459#ifndef WIFEXITED
6460# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
ba4481b5 6461#endif
503d2be0
AS
6462
6463int
6464main ()
6465{
98418dba
CW
6466 int s;
6467 wait (&s);
6468 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
503d2be0
AS
6469 ;
6470 return 0;
6471}
6472_ACEOF
98418dba 6473rm -f conftest.$ac_objext
c0d27fcc 6474if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 6475 (eval $ac_compile) 2>conftest.er1
503d2be0 6476 ac_status=$?
edfaf76d
LK
6477 grep -v '^ *+' conftest.er1 >conftest.err
6478 rm -f conftest.er1
6479 cat conftest.err >&5
c0d27fcc 6480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6481 (exit $ac_status); } &&
ec8fcb10
YM
6482 { ac_try='test -z "$ac_c_werror_flag"
6483 || test ! -s conftest.err'
edfaf76d
LK
6484 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6485 (eval $ac_try) 2>&5
6486 ac_status=$?
6487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6488 (exit $ac_status); }; } &&
6489 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6490 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
6491 (eval $ac_try) 2>&5
6492 ac_status=$?
c0d27fcc 6493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6494 (exit $ac_status); }; }; then
98418dba 6495 ac_cv_header_sys_wait_h=yes
ba4481b5 6496else
503d2be0 6497 echo "$as_me: failed program was:" >&5
19650fd6
AS
6498sed 's/^/| /' conftest.$ac_ext >&5
6499
98418dba 6500ac_cv_header_sys_wait_h=no
ba4481b5 6501fi
edfaf76d 6502rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 6503fi
c0d27fcc 6504echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
98418dba
CW
6505echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
6506if test $ac_cv_header_sys_wait_h = yes; then
503d2be0 6507
c0d27fcc 6508cat >>confdefs.h <<\_ACEOF
98418dba 6509#define HAVE_SYS_WAIT_H 1
c0d27fcc 6510_ACEOF
ba4481b5 6511
ba4481b5
DL
6512fi
6513
c0d27fcc
MR
6514
6515echo "$as_me:$LINENO: checking for struct utimbuf" >&5
98418dba
CW
6516echo $ECHO_N "checking for struct utimbuf... $ECHO_C" >&6
6517if test "${emacs_cv_struct_utimbuf+set}" = set; then
503d2be0 6518 echo $ECHO_N "(cached) $ECHO_C" >&6
1113b624 6519else
503d2be0 6520 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6521/* confdefs.h. */
6522_ACEOF
6523cat confdefs.h >>conftest.$ac_ext
6524cat >>conftest.$ac_ext <<_ACEOF
6525/* end confdefs.h. */
98418dba
CW
6526#ifdef TIME_WITH_SYS_TIME
6527#include <sys/time.h>
6528#include <time.h>
6529#else
6530#ifdef HAVE_SYS_TIME_H
6531#include <sys/time.h>
6532#else
1113b624 6533#include <time.h>
98418dba
CW
6534#endif
6535#endif
6536#ifdef HAVE_UTIME_H
6537#include <utime.h>
6538#endif
503d2be0
AS
6539int
6540main ()
6541{
98418dba 6542static struct utimbuf x; x.actime = x.modtime;
503d2be0
AS
6543 ;
6544 return 0;
6545}
6546_ACEOF
98418dba 6547rm -f conftest.$ac_objext
c0d27fcc 6548if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 6549 (eval $ac_compile) 2>conftest.er1
503d2be0 6550 ac_status=$?
edfaf76d
LK
6551 grep -v '^ *+' conftest.er1 >conftest.err
6552 rm -f conftest.er1
6553 cat conftest.err >&5
c0d27fcc 6554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6555 (exit $ac_status); } &&
ec8fcb10
YM
6556 { ac_try='test -z "$ac_c_werror_flag"
6557 || test ! -s conftest.err'
edfaf76d
LK
6558 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6559 (eval $ac_try) 2>&5
6560 ac_status=$?
6561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6562 (exit $ac_status); }; } &&
6563 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6564 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
6565 (eval $ac_try) 2>&5
6566 ac_status=$?
c0d27fcc 6567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6568 (exit $ac_status); }; }; then
98418dba 6569 emacs_cv_struct_utimbuf=yes
1113b624 6570else
503d2be0 6571 echo "$as_me: failed program was:" >&5
19650fd6
AS
6572sed 's/^/| /' conftest.$ac_ext >&5
6573
98418dba 6574emacs_cv_struct_utimbuf=no
1113b624 6575fi
edfaf76d 6576rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
1113b624 6577fi
c0d27fcc 6578echo "$as_me:$LINENO: result: $emacs_cv_struct_utimbuf" >&5
98418dba
CW
6579echo "${ECHO_T}$emacs_cv_struct_utimbuf" >&6
6580if test $emacs_cv_struct_utimbuf = yes; then
b936fae4 6581
c0d27fcc 6582cat >>confdefs.h <<\_ACEOF
98418dba 6583#define HAVE_STRUCT_UTIMBUF 1
c0d27fcc 6584_ACEOF
1113b624
PE
6585
6586fi
ba4481b5 6587
c0d27fcc 6588echo "$as_me:$LINENO: checking return type of signal handlers" >&5
98418dba
CW
6589echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
6590if test "${ac_cv_type_signal+set}" = set; then
503d2be0 6591 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 6592else
98418dba 6593 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6594/* confdefs.h. */
6595_ACEOF
6596cat confdefs.h >>conftest.$ac_ext
6597cat >>conftest.$ac_ext <<_ACEOF
6598/* end confdefs.h. */
7397acc4 6599#include <sys/types.h>
98418dba
CW
6600#include <signal.h>
6601#ifdef signal
6602# undef signal
6603#endif
6604#ifdef __cplusplus
6605extern "C" void (*signal (int, void (*)(int)))(int);
6606#else
6607void (*signal ()) ();
6608#endif
6609
503d2be0
AS
6610int
6611main ()
6612{
98418dba 6613int i;
503d2be0
AS
6614 ;
6615 return 0;
6616}
6617_ACEOF
98418dba 6618rm -f conftest.$ac_objext
c0d27fcc 6619if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 6620 (eval $ac_compile) 2>conftest.er1
503d2be0 6621 ac_status=$?
edfaf76d
LK
6622 grep -v '^ *+' conftest.er1 >conftest.err
6623 rm -f conftest.er1
6624 cat conftest.err >&5
c0d27fcc 6625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6626 (exit $ac_status); } &&
ec8fcb10
YM
6627 { ac_try='test -z "$ac_c_werror_flag"
6628 || test ! -s conftest.err'
edfaf76d
LK
6629 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6630 (eval $ac_try) 2>&5
6631 ac_status=$?
6632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6633 (exit $ac_status); }; } &&
6634 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6635 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
6636 (eval $ac_try) 2>&5
6637 ac_status=$?
c0d27fcc 6638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6639 (exit $ac_status); }; }; then
98418dba 6640 ac_cv_type_signal=void
503d2be0
AS
6641else
6642 echo "$as_me: failed program was:" >&5
19650fd6
AS
6643sed 's/^/| /' conftest.$ac_ext >&5
6644
98418dba 6645ac_cv_type_signal=int
503d2be0 6646fi
edfaf76d 6647rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 6648fi
c0d27fcc 6649echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
98418dba 6650echo "${ECHO_T}$ac_cv_type_signal" >&6
7397acc4 6651
c0d27fcc 6652cat >>confdefs.h <<_ACEOF
98418dba 6653#define RETSIGTYPE $ac_cv_type_signal
c0d27fcc
MR
6654_ACEOF
6655
503d2be0 6656
c0d27fcc
MR
6657
6658echo "$as_me:$LINENO: checking for speed_t" >&5
98418dba
CW
6659echo $ECHO_N "checking for speed_t... $ECHO_C" >&6
6660if test "${emacs_cv_speed_t+set}" = set; then
6661 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 6662else
98418dba 6663 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6664/* confdefs.h. */
6665_ACEOF
6666cat confdefs.h >>conftest.$ac_ext
6667cat >>conftest.$ac_ext <<_ACEOF
6668/* end confdefs.h. */
98418dba 6669#include <termios.h>
98418dba
CW
6670int
6671main ()
6672{
6673speed_t x = 1;
6674 ;
6675 return 0;
6676}
6677_ACEOF
6678rm -f conftest.$ac_objext
c0d27fcc 6679if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 6680 (eval $ac_compile) 2>conftest.er1
98418dba 6681 ac_status=$?
edfaf76d
LK
6682 grep -v '^ *+' conftest.er1 >conftest.err
6683 rm -f conftest.er1
6684 cat conftest.err >&5
c0d27fcc 6685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 6686 (exit $ac_status); } &&
ec8fcb10
YM
6687 { ac_try='test -z "$ac_c_werror_flag"
6688 || test ! -s conftest.err'
edfaf76d
LK
6689 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6690 (eval $ac_try) 2>&5
6691 ac_status=$?
6692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6693 (exit $ac_status); }; } &&
6694 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6695 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
6696 (eval $ac_try) 2>&5
6697 ac_status=$?
c0d27fcc 6698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
6699 (exit $ac_status); }; }; then
6700 emacs_cv_speed_t=yes
6701else
6702 echo "$as_me: failed program was:" >&5
19650fd6
AS
6703sed 's/^/| /' conftest.$ac_ext >&5
6704
98418dba
CW
6705emacs_cv_speed_t=no
6706fi
edfaf76d 6707rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 6708fi
c0d27fcc 6709echo "$as_me:$LINENO: result: $emacs_cv_speed_t" >&5
98418dba
CW
6710echo "${ECHO_T}$emacs_cv_speed_t" >&6
6711if test $emacs_cv_speed_t = yes; then
b936fae4 6712
c0d27fcc 6713cat >>confdefs.h <<\_ACEOF
98418dba 6714#define HAVE_SPEED_T 1
c0d27fcc 6715_ACEOF
98418dba 6716
7397acc4
DL
6717fi
6718
c0d27fcc 6719echo "$as_me:$LINENO: checking for struct timeval" >&5
98418dba
CW
6720echo $ECHO_N "checking for struct timeval... $ECHO_C" >&6
6721if test "${emacs_cv_struct_timeval+set}" = set; then
503d2be0 6722 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 6723else
503d2be0 6724 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6725/* confdefs.h. */
6726_ACEOF
6727cat confdefs.h >>conftest.$ac_ext
6728cat >>conftest.$ac_ext <<_ACEOF
6729/* end confdefs.h. */
98418dba
CW
6730#ifdef TIME_WITH_SYS_TIME
6731#include <sys/time.h>
6732#include <time.h>
6733#else
6734#ifdef HAVE_SYS_TIME_H
6735#include <sys/time.h>
6736#else
6737#include <time.h>
6738#endif
6739#endif
503d2be0
AS
6740int
6741main ()
6742{
98418dba 6743static struct timeval x; x.tv_sec = x.tv_usec;
503d2be0
AS
6744 ;
6745 return 0;
6746}
6747_ACEOF
6748rm -f conftest.$ac_objext
c0d27fcc 6749if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 6750 (eval $ac_compile) 2>conftest.er1
503d2be0 6751 ac_status=$?
edfaf76d
LK
6752 grep -v '^ *+' conftest.er1 >conftest.err
6753 rm -f conftest.er1
6754 cat conftest.err >&5
c0d27fcc 6755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6756 (exit $ac_status); } &&
ec8fcb10
YM
6757 { ac_try='test -z "$ac_c_werror_flag"
6758 || test ! -s conftest.err'
c0d27fcc 6759 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
6760 (eval $ac_try) 2>&5
6761 ac_status=$?
c0d27fcc 6762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
edfaf76d
LK
6763 (exit $ac_status); }; } &&
6764 { ac_try='test -s conftest.$ac_objext'
6765 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6766 (eval $ac_try) 2>&5
6767 ac_status=$?
6768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6769 (exit $ac_status); }; }; then
6770 emacs_cv_struct_timeval=yes
6771else
503d2be0 6772 echo "$as_me: failed program was:" >&5
19650fd6
AS
6773sed 's/^/| /' conftest.$ac_ext >&5
6774
98418dba 6775emacs_cv_struct_timeval=no
7397acc4 6776fi
edfaf76d 6777rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 6778fi
c0d27fcc 6779echo "$as_me:$LINENO: result: $emacs_cv_struct_timeval" >&5
98418dba
CW
6780echo "${ECHO_T}$emacs_cv_struct_timeval" >&6
6781HAVE_TIMEVAL=$emacs_cv_struct_timeval
6782if test $emacs_cv_struct_timeval = yes; then
b936fae4 6783
c0d27fcc 6784cat >>confdefs.h <<\_ACEOF
98418dba 6785#define HAVE_TIMEVAL 1
c0d27fcc 6786_ACEOF
7397acc4
DL
6787
6788fi
6789
c0d27fcc 6790echo "$as_me:$LINENO: checking for struct exception" >&5
98418dba
CW
6791echo $ECHO_N "checking for struct exception... $ECHO_C" >&6
6792if test "${emacs_cv_struct_exception+set}" = set; then
503d2be0 6793 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6794else
503d2be0 6795 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6796/* confdefs.h. */
6797_ACEOF
6798cat confdefs.h >>conftest.$ac_ext
6799cat >>conftest.$ac_ext <<_ACEOF
6800/* end confdefs.h. */
98418dba 6801#include <math.h>
503d2be0
AS
6802int
6803main ()
6804{
98418dba 6805static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1;
503d2be0
AS
6806 ;
6807 return 0;
ba4481b5 6808}
503d2be0
AS
6809_ACEOF
6810rm -f conftest.$ac_objext
c0d27fcc 6811if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 6812 (eval $ac_compile) 2>conftest.er1
503d2be0 6813 ac_status=$?
edfaf76d
LK
6814 grep -v '^ *+' conftest.er1 >conftest.err
6815 rm -f conftest.er1
6816 cat conftest.err >&5
c0d27fcc 6817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6818 (exit $ac_status); } &&
ec8fcb10
YM
6819 { ac_try='test -z "$ac_c_werror_flag"
6820 || test ! -s conftest.err'
edfaf76d
LK
6821 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6822 (eval $ac_try) 2>&5
6823 ac_status=$?
6824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6825 (exit $ac_status); }; } &&
6826 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6827 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
6828 (eval $ac_try) 2>&5
6829 ac_status=$?
c0d27fcc 6830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6831 (exit $ac_status); }; }; then
98418dba 6832 emacs_cv_struct_exception=yes
ba4481b5 6833else
503d2be0 6834 echo "$as_me: failed program was:" >&5
19650fd6
AS
6835sed 's/^/| /' conftest.$ac_ext >&5
6836
98418dba 6837emacs_cv_struct_exception=no
ba4481b5 6838fi
edfaf76d 6839rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 6840fi
c0d27fcc 6841echo "$as_me:$LINENO: result: $emacs_cv_struct_exception" >&5
98418dba
CW
6842echo "${ECHO_T}$emacs_cv_struct_exception" >&6
6843HAVE_EXCEPTION=$emacs_cv_struct_exception
6844if test $emacs_cv_struct_exception != yes; then
b936fae4 6845
c0d27fcc 6846cat >>confdefs.h <<\_ACEOF
98418dba 6847#define NO_MATHERR 1
c0d27fcc 6848_ACEOF
ba4481b5
DL
6849
6850fi
6851
7862d3a8
AS
6852
6853for ac_header in sys/socket.h
6854do
6855as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6856if eval "test \"\${$as_ac_Header+set}\" = set"; then
6857 echo "$as_me:$LINENO: checking for $ac_header" >&5
6858echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6859if eval "test \"\${$as_ac_Header+set}\" = set"; then
6860 echo $ECHO_N "(cached) $ECHO_C" >&6
6861fi
6862echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6863echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6864else
6865 # Is the header compilable?
6866echo "$as_me:$LINENO: checking $ac_header usability" >&5
6867echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
6868cat >conftest.$ac_ext <<_ACEOF
6869/* confdefs.h. */
6870_ACEOF
6871cat confdefs.h >>conftest.$ac_ext
6872cat >>conftest.$ac_ext <<_ACEOF
6873/* end confdefs.h. */
6874$ac_includes_default
6875#include <$ac_header>
6876_ACEOF
6877rm -f conftest.$ac_objext
6878if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 6879 (eval $ac_compile) 2>conftest.er1
7862d3a8 6880 ac_status=$?
edfaf76d
LK
6881 grep -v '^ *+' conftest.er1 >conftest.err
6882 rm -f conftest.er1
6883 cat conftest.err >&5
7862d3a8
AS
6884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6885 (exit $ac_status); } &&
ec8fcb10
YM
6886 { ac_try='test -z "$ac_c_werror_flag"
6887 || test ! -s conftest.err'
edfaf76d
LK
6888 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6889 (eval $ac_try) 2>&5
6890 ac_status=$?
6891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6892 (exit $ac_status); }; } &&
6893 { ac_try='test -s conftest.$ac_objext'
7862d3a8
AS
6894 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6895 (eval $ac_try) 2>&5
6896 ac_status=$?
6897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6898 (exit $ac_status); }; }; then
6899 ac_header_compiler=yes
6900else
6901 echo "$as_me: failed program was:" >&5
6902sed 's/^/| /' conftest.$ac_ext >&5
6903
6904ac_header_compiler=no
6905fi
edfaf76d 6906rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7862d3a8
AS
6907echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6908echo "${ECHO_T}$ac_header_compiler" >&6
6909
6910# Is the header present?
6911echo "$as_me:$LINENO: checking $ac_header presence" >&5
6912echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
6913cat >conftest.$ac_ext <<_ACEOF
6914/* confdefs.h. */
6915_ACEOF
6916cat confdefs.h >>conftest.$ac_ext
6917cat >>conftest.$ac_ext <<_ACEOF
6918/* end confdefs.h. */
6919#include <$ac_header>
6920_ACEOF
6921if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6922 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6923 ac_status=$?
6924 grep -v '^ *+' conftest.er1 >conftest.err
6925 rm -f conftest.er1
6926 cat conftest.err >&5
6927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6928 (exit $ac_status); } >/dev/null; then
6929 if test -s conftest.err; then
6930 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 6931 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
7862d3a8
AS
6932 else
6933 ac_cpp_err=
6934 fi
6935else
6936 ac_cpp_err=yes
6937fi
6938if test -z "$ac_cpp_err"; then
6939 ac_header_preproc=yes
6940else
6941 echo "$as_me: failed program was:" >&5
6942sed 's/^/| /' conftest.$ac_ext >&5
6943
6944 ac_header_preproc=no
6945fi
6946rm -f conftest.err conftest.$ac_ext
6947echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6948echo "${ECHO_T}$ac_header_preproc" >&6
6949
6950# So? What about this header?
edfaf76d
LK
6951case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6952 yes:no: )
7862d3a8
AS
6953 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6954echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
6955 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6956echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6957 ac_header_preproc=yes
7862d3a8 6958 ;;
edfaf76d 6959 no:yes:* )
7862d3a8
AS
6960 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6961echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
6962 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
6963echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
6964 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6965echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6966 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
6967echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
7862d3a8
AS
6968 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6969echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
6970 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6971echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
7862d3a8
AS
6972 (
6973 cat <<\_ASBOX
edfaf76d
LK
6974## ------------------------------------------ ##
6975## Report this to the AC_PACKAGE_NAME lists. ##
6976## ------------------------------------------ ##
7862d3a8
AS
6977_ASBOX
6978 ) |
6979 sed "s/^/$as_me: WARNING: /" >&2
6980 ;;
6981esac
6982echo "$as_me:$LINENO: checking for $ac_header" >&5
6983echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6984if eval "test \"\${$as_ac_Header+set}\" = set"; then
6985 echo $ECHO_N "(cached) $ECHO_C" >&6
6986else
edfaf76d 6987 eval "$as_ac_Header=\$ac_header_preproc"
7862d3a8
AS
6988fi
6989echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6990echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6991
6992fi
6993if test `eval echo '${'$as_ac_Header'}'` = yes; then
6994 cat >>confdefs.h <<_ACEOF
6995#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6996_ACEOF
6997
6998fi
6999
7000done
7001
7002
7003for ac_header in net/if.h
7004do
7005as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7006echo "$as_me:$LINENO: checking for $ac_header" >&5
7007echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7008if eval "test \"\${$as_ac_Header+set}\" = set"; then
7009 echo $ECHO_N "(cached) $ECHO_C" >&6
7010else
7011 cat >conftest.$ac_ext <<_ACEOF
7012/* confdefs.h. */
7013_ACEOF
7014cat confdefs.h >>conftest.$ac_ext
7015cat >>conftest.$ac_ext <<_ACEOF
7016/* end confdefs.h. */
7017$ac_includes_default
7018#if HAVE_SYS_SOCKET_H
7019#include <sys/socket.h>
7020#endif
7021
7022#include <$ac_header>
7023_ACEOF
7024rm -f conftest.$ac_objext
7025if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 7026 (eval $ac_compile) 2>conftest.er1
7862d3a8 7027 ac_status=$?
edfaf76d
LK
7028 grep -v '^ *+' conftest.er1 >conftest.err
7029 rm -f conftest.er1
7030 cat conftest.err >&5
7862d3a8
AS
7031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7032 (exit $ac_status); } &&
ec8fcb10
YM
7033 { ac_try='test -z "$ac_c_werror_flag"
7034 || test ! -s conftest.err'
edfaf76d
LK
7035 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7036 (eval $ac_try) 2>&5
7037 ac_status=$?
7038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7039 (exit $ac_status); }; } &&
7040 { ac_try='test -s conftest.$ac_objext'
7862d3a8
AS
7041 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7042 (eval $ac_try) 2>&5
7043 ac_status=$?
7044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7045 (exit $ac_status); }; }; then
7046 eval "$as_ac_Header=yes"
7047else
7048 echo "$as_me: failed program was:" >&5
7049sed 's/^/| /' conftest.$ac_ext >&5
7050
7051eval "$as_ac_Header=no"
7052fi
edfaf76d 7053rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7862d3a8
AS
7054fi
7055echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7056echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7057if test `eval echo '${'$as_ac_Header'}'` = yes; then
7058 cat >>confdefs.h <<_ACEOF
7059#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7060_ACEOF
7061
7062fi
7063
7064done
7065
7066
c0d27fcc 7067echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
98418dba
CW
7068echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
7069if test "${ac_cv_struct_tm+set}" = set; then
503d2be0 7070 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7071else
503d2be0 7072 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7073/* confdefs.h. */
7074_ACEOF
7075cat confdefs.h >>conftest.$ac_ext
7076cat >>conftest.$ac_ext <<_ACEOF
7077/* end confdefs.h. */
98418dba
CW
7078#include <sys/types.h>
7079#include <time.h>
7397acc4 7080
503d2be0
AS
7081int
7082main ()
7083{
98418dba 7084struct tm *tp; tp->tm_sec;
503d2be0
AS
7085 ;
7086 return 0;
7087}
7088_ACEOF
7089rm -f conftest.$ac_objext
c0d27fcc 7090if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 7091 (eval $ac_compile) 2>conftest.er1
503d2be0 7092 ac_status=$?
edfaf76d
LK
7093 grep -v '^ *+' conftest.er1 >conftest.err
7094 rm -f conftest.er1
7095 cat conftest.err >&5
c0d27fcc 7096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 7097 (exit $ac_status); } &&
ec8fcb10
YM
7098 { ac_try='test -z "$ac_c_werror_flag"
7099 || test ! -s conftest.err'
edfaf76d
LK
7100 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7101 (eval $ac_try) 2>&5
7102 ac_status=$?
7103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7104 (exit $ac_status); }; } &&
7105 { ac_try='test -s conftest.$ac_objext'
35996d22
AS
7106 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7107 (eval $ac_try) 2>&5
7108 ac_status=$?
7109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7110 (exit $ac_status); }; }; then
7111 ac_cv_struct_tm=time.h
7112else
503d2be0 7113 echo "$as_me: failed program was:" >&5
19650fd6
AS
7114sed 's/^/| /' conftest.$ac_ext >&5
7115
98418dba 7116ac_cv_struct_tm=sys/time.h
7397acc4 7117fi
edfaf76d 7118rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 7119fi
c0d27fcc 7120echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
98418dba
CW
7121echo "${ECHO_T}$ac_cv_struct_tm" >&6
7122if test $ac_cv_struct_tm = sys/time.h; then
7397acc4 7123
c0d27fcc 7124cat >>confdefs.h <<\_ACEOF
98418dba 7125#define TM_IN_SYS_TIME 1
c0d27fcc 7126_ACEOF
7397acc4
DL
7127
7128fi
ba4481b5 7129
c0d27fcc 7130echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
98418dba
CW
7131echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
7132if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
503d2be0 7133 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7134else
98418dba 7135 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7136/* confdefs.h. */
7137_ACEOF
7138cat confdefs.h >>conftest.$ac_ext
7139cat >>conftest.$ac_ext <<_ACEOF
7140/* end confdefs.h. */
98418dba
CW
7141#include <sys/types.h>
7142#include <$ac_cv_struct_tm>
ba4481b5 7143
c0d27fcc 7144
98418dba
CW
7145int
7146main ()
7147{
7148static struct tm ac_aggr;
7149if (ac_aggr.tm_zone)
7150return 0;
7151 ;
7152 return 0;
7153}
7154_ACEOF
7155rm -f conftest.$ac_objext
c0d27fcc 7156if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 7157 (eval $ac_compile) 2>conftest.er1
98418dba 7158 ac_status=$?
edfaf76d
LK
7159 grep -v '^ *+' conftest.er1 >conftest.err
7160 rm -f conftest.er1
7161 cat conftest.err >&5
c0d27fcc 7162 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 7163 (exit $ac_status); } &&
ec8fcb10
YM
7164 { ac_try='test -z "$ac_c_werror_flag"
7165 || test ! -s conftest.err'
edfaf76d
LK
7166 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7167 (eval $ac_try) 2>&5
7168 ac_status=$?
7169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7170 (exit $ac_status); }; } &&
7171 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 7172 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
7173 (eval $ac_try) 2>&5
7174 ac_status=$?
c0d27fcc 7175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7176 (exit $ac_status); }; }; then
7177 ac_cv_member_struct_tm_tm_zone=yes
ba4481b5 7178else
98418dba 7179 echo "$as_me: failed program was:" >&5
19650fd6
AS
7180sed 's/^/| /' conftest.$ac_ext >&5
7181
6bae0ccf 7182cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7183/* confdefs.h. */
7184_ACEOF
7185cat confdefs.h >>conftest.$ac_ext
7186cat >>conftest.$ac_ext <<_ACEOF
7187/* end confdefs.h. */
6bae0ccf
DL
7188#include <sys/types.h>
7189#include <$ac_cv_struct_tm>
7190
7191
7192int
7193main ()
7194{
7195static struct tm ac_aggr;
7196if (sizeof ac_aggr.tm_zone)
7197return 0;
7198 ;
7199 return 0;
7200}
7201_ACEOF
7202rm -f conftest.$ac_objext
7203if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 7204 (eval $ac_compile) 2>conftest.er1
6bae0ccf 7205 ac_status=$?
edfaf76d
LK
7206 grep -v '^ *+' conftest.er1 >conftest.err
7207 rm -f conftest.er1
7208 cat conftest.err >&5
6bae0ccf
DL
7209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7210 (exit $ac_status); } &&
ec8fcb10
YM
7211 { ac_try='test -z "$ac_c_werror_flag"
7212 || test ! -s conftest.err'
edfaf76d
LK
7213 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7214 (eval $ac_try) 2>&5
7215 ac_status=$?
7216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7217 (exit $ac_status); }; } &&
7218 { ac_try='test -s conftest.$ac_objext'
6bae0ccf
DL
7219 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7220 (eval $ac_try) 2>&5
7221 ac_status=$?
7222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7223 (exit $ac_status); }; }; then
7224 ac_cv_member_struct_tm_tm_zone=yes
7225else
7226 echo "$as_me: failed program was:" >&5
19650fd6
AS
7227sed 's/^/| /' conftest.$ac_ext >&5
7228
98418dba 7229ac_cv_member_struct_tm_tm_zone=no
ba4481b5 7230fi
edfaf76d 7231rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 7232fi
edfaf76d 7233rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 7234fi
c0d27fcc 7235echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
98418dba
CW
7236echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
7237if test $ac_cv_member_struct_tm_tm_zone = yes; then
503d2be0 7238
c0d27fcc 7239cat >>confdefs.h <<_ACEOF
98418dba 7240#define HAVE_STRUCT_TM_TM_ZONE 1
c0d27fcc
MR
7241_ACEOF
7242
ba4481b5 7243
98418dba 7244fi
ba4481b5 7245
98418dba 7246if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
ba4481b5 7247
c0d27fcc 7248cat >>confdefs.h <<\_ACEOF
98418dba 7249#define HAVE_TM_ZONE 1
c0d27fcc 7250_ACEOF
ba4481b5 7251
ba4481b5 7252else
c0d27fcc 7253 echo "$as_me:$LINENO: checking for tzname" >&5
98418dba
CW
7254echo $ECHO_N "checking for tzname... $ECHO_C" >&6
7255if test "${ac_cv_var_tzname+set}" = set; then
503d2be0 7256 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7257else
98418dba 7258 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7259/* confdefs.h. */
7260_ACEOF
7261cat confdefs.h >>conftest.$ac_ext
7262cat >>conftest.$ac_ext <<_ACEOF
7263/* end confdefs.h. */
98418dba
CW
7264#include <time.h>
7265#ifndef tzname /* For SGI. */
7266extern char *tzname[]; /* RS6000 and others reject char **tzname. */
7267#endif
7268
98418dba
CW
7269int
7270main ()
7271{
7272atoi(*tzname);
7273 ;
7274 return 0;
7275}
7276_ACEOF
7277rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 7278if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 7279 (eval $ac_link) 2>conftest.er1
98418dba 7280 ac_status=$?
edfaf76d
LK
7281 grep -v '^ *+' conftest.er1 >conftest.err
7282 rm -f conftest.er1
7283 cat conftest.err >&5
c0d27fcc 7284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 7285 (exit $ac_status); } &&
ec8fcb10
YM
7286 { ac_try='test -z "$ac_c_werror_flag"
7287 || test ! -s conftest.err'
edfaf76d
LK
7288 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7289 (eval $ac_try) 2>&5
7290 ac_status=$?
7291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7292 (exit $ac_status); }; } &&
7293 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 7294 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
7295 (eval $ac_try) 2>&5
7296 ac_status=$?
c0d27fcc 7297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7298 (exit $ac_status); }; }; then
7299 ac_cv_var_tzname=yes
7300else
7301 echo "$as_me: failed program was:" >&5
19650fd6
AS
7302sed 's/^/| /' conftest.$ac_ext >&5
7303
98418dba 7304ac_cv_var_tzname=no
ba4481b5 7305fi
edfaf76d
LK
7306rm -f conftest.err conftest.$ac_objext \
7307 conftest$ac_exeext conftest.$ac_ext
98418dba 7308fi
c0d27fcc 7309echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
98418dba
CW
7310echo "${ECHO_T}$ac_cv_var_tzname" >&6
7311 if test $ac_cv_var_tzname = yes; then
ba4481b5 7312
c0d27fcc 7313cat >>confdefs.h <<\_ACEOF
98418dba 7314#define HAVE_TZNAME 1
c0d27fcc 7315_ACEOF
503d2be0 7316
98418dba
CW
7317 fi
7318fi
503d2be0 7319
c0d27fcc 7320echo "$as_me:$LINENO: checking for struct tm.tm_gmtoff" >&5
b936fae4
AS
7321echo $ECHO_N "checking for struct tm.tm_gmtoff... $ECHO_C" >&6
7322if test "${ac_cv_member_struct_tm_tm_gmtoff+set}" = set; then
98418dba
CW
7323 echo $ECHO_N "(cached) $ECHO_C" >&6
7324else
7325 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7326/* confdefs.h. */
7327_ACEOF
7328cat confdefs.h >>conftest.$ac_ext
7329cat >>conftest.$ac_ext <<_ACEOF
7330/* end confdefs.h. */
98418dba 7331#include <time.h>
b936fae4 7332
98418dba
CW
7333int
7334main ()
7335{
b936fae4
AS
7336static struct tm ac_aggr;
7337if (ac_aggr.tm_gmtoff)
7338return 0;
98418dba
CW
7339 ;
7340 return 0;
7341}
7342_ACEOF
b936fae4 7343rm -f conftest.$ac_objext
c0d27fcc 7344if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 7345 (eval $ac_compile) 2>conftest.er1
98418dba 7346 ac_status=$?
edfaf76d
LK
7347 grep -v '^ *+' conftest.er1 >conftest.err
7348 rm -f conftest.er1
7349 cat conftest.err >&5
c0d27fcc 7350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 7351 (exit $ac_status); } &&
ec8fcb10
YM
7352 { ac_try='test -z "$ac_c_werror_flag"
7353 || test ! -s conftest.err'
edfaf76d
LK
7354 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7355 (eval $ac_try) 2>&5
7356 ac_status=$?
7357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7358 (exit $ac_status); }; } &&
7359 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 7360 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
7361 (eval $ac_try) 2>&5
7362 ac_status=$?
c0d27fcc 7363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 7364 (exit $ac_status); }; }; then
b936fae4 7365 ac_cv_member_struct_tm_tm_gmtoff=yes
98418dba
CW
7366else
7367 echo "$as_me: failed program was:" >&5
19650fd6
AS
7368sed 's/^/| /' conftest.$ac_ext >&5
7369
8799b3e4 7370cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7371/* confdefs.h. */
7372_ACEOF
7373cat confdefs.h >>conftest.$ac_ext
7374cat >>conftest.$ac_ext <<_ACEOF
7375/* end confdefs.h. */
6bae0ccf
DL
7376#include <time.h>
7377
8799b3e4
CW
7378int
7379main ()
7380{
6bae0ccf
DL
7381static struct tm ac_aggr;
7382if (sizeof ac_aggr.tm_gmtoff)
7383return 0;
8799b3e4
CW
7384 ;
7385 return 0;
7386}
7387_ACEOF
6bae0ccf 7388rm -f conftest.$ac_objext
c0d27fcc 7389if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 7390 (eval $ac_compile) 2>conftest.er1
8799b3e4 7391 ac_status=$?
edfaf76d
LK
7392 grep -v '^ *+' conftest.er1 >conftest.err
7393 rm -f conftest.er1
7394 cat conftest.err >&5
c0d27fcc 7395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8799b3e4 7396 (exit $ac_status); } &&
ec8fcb10
YM
7397 { ac_try='test -z "$ac_c_werror_flag"
7398 || test ! -s conftest.err'
edfaf76d
LK
7399 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7400 (eval $ac_try) 2>&5
7401 ac_status=$?
7402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7403 (exit $ac_status); }; } &&
7404 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 7405 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8799b3e4
CW
7406 (eval $ac_try) 2>&5
7407 ac_status=$?
c0d27fcc 7408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8799b3e4 7409 (exit $ac_status); }; }; then
6bae0ccf 7410 ac_cv_member_struct_tm_tm_gmtoff=yes
8799b3e4
CW
7411else
7412 echo "$as_me: failed program was:" >&5
19650fd6
AS
7413sed 's/^/| /' conftest.$ac_ext >&5
7414
6bae0ccf 7415ac_cv_member_struct_tm_tm_gmtoff=no
8799b3e4 7416fi
edfaf76d 7417rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 7418fi
edfaf76d 7419rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8799b3e4 7420fi
6bae0ccf
DL
7421echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_gmtoff" >&5
7422echo "${ECHO_T}$ac_cv_member_struct_tm_tm_gmtoff" >&6
7423if test $ac_cv_member_struct_tm_tm_gmtoff = yes; then
7424
7425cat >>confdefs.h <<\_ACEOF
7426#define HAVE_TM_GMTOFF 1
7427_ACEOF
7428
7429fi
7430
96f3a036
DL
7431echo "$as_me:$LINENO: checking for struct ifreq.ifr_flags" >&5
7432echo $ECHO_N "checking for struct ifreq.ifr_flags... $ECHO_C" >&6
7433if test "${ac_cv_member_struct_ifreq_ifr_flags+set}" = set; then
7434 echo $ECHO_N "(cached) $ECHO_C" >&6
7435else
7436 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7437/* confdefs.h. */
7438_ACEOF
7439cat confdefs.h >>conftest.$ac_ext
7440cat >>conftest.$ac_ext <<_ACEOF
7441/* end confdefs.h. */
7862d3a8
AS
7442$ac_includes_default
7443#if HAVE_SYS_SOCKET_H
7444#include <sys/socket.h>
7445#endif
7446#if HAVE_NET_IF_H
96f3a036 7447#include <net/if.h>
7862d3a8 7448#endif
96f3a036
DL
7449
7450int
7451main ()
7452{
7453static struct ifreq ac_aggr;
7454if (ac_aggr.ifr_flags)
7455return 0;
7456 ;
7457 return 0;
7458}
7459_ACEOF
7460rm -f conftest.$ac_objext
7461if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 7462 (eval $ac_compile) 2>conftest.er1
96f3a036 7463 ac_status=$?
edfaf76d
LK
7464 grep -v '^ *+' conftest.er1 >conftest.err
7465 rm -f conftest.er1
7466 cat conftest.err >&5
96f3a036
DL
7467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7468 (exit $ac_status); } &&
ec8fcb10
YM
7469 { ac_try='test -z "$ac_c_werror_flag"
7470 || test ! -s conftest.err'
edfaf76d
LK
7471 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7472 (eval $ac_try) 2>&5
7473 ac_status=$?
7474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7475 (exit $ac_status); }; } &&
7476 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7477 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7478 (eval $ac_try) 2>&5
7479 ac_status=$?
7480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7481 (exit $ac_status); }; }; then
7482 ac_cv_member_struct_ifreq_ifr_flags=yes
7483else
7484 echo "$as_me: failed program was:" >&5
7485sed 's/^/| /' conftest.$ac_ext >&5
7486
7487cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7488/* confdefs.h. */
7489_ACEOF
7490cat confdefs.h >>conftest.$ac_ext
7491cat >>conftest.$ac_ext <<_ACEOF
7492/* end confdefs.h. */
7862d3a8
AS
7493$ac_includes_default
7494#if HAVE_SYS_SOCKET_H
7495#include <sys/socket.h>
7496#endif
7497#if HAVE_NET_IF_H
96f3a036 7498#include <net/if.h>
7862d3a8 7499#endif
96f3a036
DL
7500
7501int
7502main ()
7503{
7504static struct ifreq ac_aggr;
7505if (sizeof ac_aggr.ifr_flags)
7506return 0;
7507 ;
7508 return 0;
7509}
7510_ACEOF
7511rm -f conftest.$ac_objext
7512if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 7513 (eval $ac_compile) 2>conftest.er1
96f3a036 7514 ac_status=$?
edfaf76d
LK
7515 grep -v '^ *+' conftest.er1 >conftest.err
7516 rm -f conftest.er1
7517 cat conftest.err >&5
96f3a036
DL
7518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7519 (exit $ac_status); } &&
ec8fcb10
YM
7520 { ac_try='test -z "$ac_c_werror_flag"
7521 || test ! -s conftest.err'
edfaf76d
LK
7522 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7523 (eval $ac_try) 2>&5
7524 ac_status=$?
7525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7526 (exit $ac_status); }; } &&
7527 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7528 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7529 (eval $ac_try) 2>&5
7530 ac_status=$?
7531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7532 (exit $ac_status); }; }; then
7533 ac_cv_member_struct_ifreq_ifr_flags=yes
7534else
7535 echo "$as_me: failed program was:" >&5
7536sed 's/^/| /' conftest.$ac_ext >&5
7537
7538ac_cv_member_struct_ifreq_ifr_flags=no
7539fi
edfaf76d 7540rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 7541fi
edfaf76d 7542rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036
DL
7543fi
7544echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_flags" >&5
7545echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_flags" >&6
7546if test $ac_cv_member_struct_ifreq_ifr_flags = yes; then
7547
7548cat >>confdefs.h <<_ACEOF
7549#define HAVE_STRUCT_IFREQ_IFR_FLAGS 1
7550_ACEOF
7551
7552
7553fi
7554echo "$as_me:$LINENO: checking for struct ifreq.ifr_hwaddr" >&5
7555echo $ECHO_N "checking for struct ifreq.ifr_hwaddr... $ECHO_C" >&6
7556if test "${ac_cv_member_struct_ifreq_ifr_hwaddr+set}" = set; then
7557 echo $ECHO_N "(cached) $ECHO_C" >&6
7558else
7559 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7560/* confdefs.h. */
7561_ACEOF
7562cat confdefs.h >>conftest.$ac_ext
7563cat >>conftest.$ac_ext <<_ACEOF
7564/* end confdefs.h. */
7862d3a8
AS
7565$ac_includes_default
7566#if HAVE_SYS_SOCKET_H
7567#include <sys/socket.h>
7568#endif
7569#if HAVE_NET_IF_H
96f3a036 7570#include <net/if.h>
7862d3a8 7571#endif
96f3a036
DL
7572
7573int
7574main ()
7575{
7576static struct ifreq ac_aggr;
7577if (ac_aggr.ifr_hwaddr)
7578return 0;
7579 ;
7580 return 0;
7581}
7582_ACEOF
7583rm -f conftest.$ac_objext
7584if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 7585 (eval $ac_compile) 2>conftest.er1
96f3a036 7586 ac_status=$?
edfaf76d
LK
7587 grep -v '^ *+' conftest.er1 >conftest.err
7588 rm -f conftest.er1
7589 cat conftest.err >&5
96f3a036
DL
7590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7591 (exit $ac_status); } &&
ec8fcb10
YM
7592 { ac_try='test -z "$ac_c_werror_flag"
7593 || test ! -s conftest.err'
edfaf76d
LK
7594 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7595 (eval $ac_try) 2>&5
7596 ac_status=$?
7597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7598 (exit $ac_status); }; } &&
7599 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7600 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7601 (eval $ac_try) 2>&5
7602 ac_status=$?
7603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7604 (exit $ac_status); }; }; then
7605 ac_cv_member_struct_ifreq_ifr_hwaddr=yes
7606else
7607 echo "$as_me: failed program was:" >&5
7608sed 's/^/| /' conftest.$ac_ext >&5
7609
7610cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7611/* confdefs.h. */
7612_ACEOF
7613cat confdefs.h >>conftest.$ac_ext
7614cat >>conftest.$ac_ext <<_ACEOF
7615/* end confdefs.h. */
7862d3a8
AS
7616$ac_includes_default
7617#if HAVE_SYS_SOCKET_H
7618#include <sys/socket.h>
7619#endif
7620#if HAVE_NET_IF_H
96f3a036 7621#include <net/if.h>
7862d3a8 7622#endif
96f3a036
DL
7623
7624int
7625main ()
7626{
7627static struct ifreq ac_aggr;
7628if (sizeof ac_aggr.ifr_hwaddr)
7629return 0;
7630 ;
7631 return 0;
7632}
7633_ACEOF
7634rm -f conftest.$ac_objext
7635if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 7636 (eval $ac_compile) 2>conftest.er1
96f3a036 7637 ac_status=$?
edfaf76d
LK
7638 grep -v '^ *+' conftest.er1 >conftest.err
7639 rm -f conftest.er1
7640 cat conftest.err >&5
96f3a036
DL
7641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7642 (exit $ac_status); } &&
ec8fcb10
YM
7643 { ac_try='test -z "$ac_c_werror_flag"
7644 || test ! -s conftest.err'
edfaf76d
LK
7645 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7646 (eval $ac_try) 2>&5
7647 ac_status=$?
7648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7649 (exit $ac_status); }; } &&
7650 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7651 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7652 (eval $ac_try) 2>&5
7653 ac_status=$?
7654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7655 (exit $ac_status); }; }; then
7656 ac_cv_member_struct_ifreq_ifr_hwaddr=yes
7657else
7658 echo "$as_me: failed program was:" >&5
7659sed 's/^/| /' conftest.$ac_ext >&5
7660
7661ac_cv_member_struct_ifreq_ifr_hwaddr=no
7662fi
edfaf76d 7663rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 7664fi
edfaf76d 7665rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036
DL
7666fi
7667echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_hwaddr" >&5
7668echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_hwaddr" >&6
7669if test $ac_cv_member_struct_ifreq_ifr_hwaddr = yes; then
7670
7671cat >>confdefs.h <<_ACEOF
7672#define HAVE_STRUCT_IFREQ_IFR_HWADDR 1
7673_ACEOF
7674
7675
7676fi
7677echo "$as_me:$LINENO: checking for struct ifreq.ifr_netmask" >&5
7678echo $ECHO_N "checking for struct ifreq.ifr_netmask... $ECHO_C" >&6
7679if test "${ac_cv_member_struct_ifreq_ifr_netmask+set}" = set; then
7680 echo $ECHO_N "(cached) $ECHO_C" >&6
7681else
7682 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7683/* confdefs.h. */
7684_ACEOF
7685cat confdefs.h >>conftest.$ac_ext
7686cat >>conftest.$ac_ext <<_ACEOF
7687/* end confdefs.h. */
7862d3a8
AS
7688$ac_includes_default
7689#if HAVE_SYS_SOCKET_H
7690#include <sys/socket.h>
7691#endif
7692#if HAVE_NET_IF_H
96f3a036 7693#include <net/if.h>
7862d3a8 7694#endif
96f3a036
DL
7695
7696int
7697main ()
7698{
7699static struct ifreq ac_aggr;
7700if (ac_aggr.ifr_netmask)
7701return 0;
7702 ;
7703 return 0;
7704}
7705_ACEOF
7706rm -f conftest.$ac_objext
7707if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 7708 (eval $ac_compile) 2>conftest.er1
96f3a036 7709 ac_status=$?
edfaf76d
LK
7710 grep -v '^ *+' conftest.er1 >conftest.err
7711 rm -f conftest.er1
7712 cat conftest.err >&5
96f3a036
DL
7713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7714 (exit $ac_status); } &&
ec8fcb10
YM
7715 { ac_try='test -z "$ac_c_werror_flag"
7716 || test ! -s conftest.err'
edfaf76d
LK
7717 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7718 (eval $ac_try) 2>&5
7719 ac_status=$?
7720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7721 (exit $ac_status); }; } &&
7722 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7723 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7724 (eval $ac_try) 2>&5
7725 ac_status=$?
7726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7727 (exit $ac_status); }; }; then
7728 ac_cv_member_struct_ifreq_ifr_netmask=yes
7729else
7730 echo "$as_me: failed program was:" >&5
7731sed 's/^/| /' conftest.$ac_ext >&5
7732
7733cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7734/* confdefs.h. */
7735_ACEOF
7736cat confdefs.h >>conftest.$ac_ext
7737cat >>conftest.$ac_ext <<_ACEOF
7738/* end confdefs.h. */
7862d3a8
AS
7739$ac_includes_default
7740#if HAVE_SYS_SOCKET_H
7741#include <sys/socket.h>
7742#endif
7743#if HAVE_NET_IF_H
96f3a036 7744#include <net/if.h>
7862d3a8 7745#endif
96f3a036
DL
7746
7747int
7748main ()
7749{
7750static struct ifreq ac_aggr;
7751if (sizeof ac_aggr.ifr_netmask)
7752return 0;
7753 ;
7754 return 0;
7755}
7756_ACEOF
7757rm -f conftest.$ac_objext
7758if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 7759 (eval $ac_compile) 2>conftest.er1
96f3a036 7760 ac_status=$?
edfaf76d
LK
7761 grep -v '^ *+' conftest.er1 >conftest.err
7762 rm -f conftest.er1
7763 cat conftest.err >&5
96f3a036
DL
7764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7765 (exit $ac_status); } &&
ec8fcb10
YM
7766 { ac_try='test -z "$ac_c_werror_flag"
7767 || test ! -s conftest.err'
edfaf76d
LK
7768 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7769 (eval $ac_try) 2>&5
7770 ac_status=$?
7771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7772 (exit $ac_status); }; } &&
7773 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7774 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7775 (eval $ac_try) 2>&5
7776 ac_status=$?
7777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7778 (exit $ac_status); }; }; then
7779 ac_cv_member_struct_ifreq_ifr_netmask=yes
7780else
7781 echo "$as_me: failed program was:" >&5
7782sed 's/^/| /' conftest.$ac_ext >&5
7783
7784ac_cv_member_struct_ifreq_ifr_netmask=no
7785fi
edfaf76d 7786rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 7787fi
edfaf76d 7788rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036
DL
7789fi
7790echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_netmask" >&5
7791echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_netmask" >&6
7792if test $ac_cv_member_struct_ifreq_ifr_netmask = yes; then
7793
7794cat >>confdefs.h <<_ACEOF
7795#define HAVE_STRUCT_IFREQ_IFR_NETMASK 1
7796_ACEOF
7797
7798
7799fi
7800echo "$as_me:$LINENO: checking for struct ifreq.ifr_broadaddr" >&5
7801echo $ECHO_N "checking for struct ifreq.ifr_broadaddr... $ECHO_C" >&6
7802if test "${ac_cv_member_struct_ifreq_ifr_broadaddr+set}" = set; then
7803 echo $ECHO_N "(cached) $ECHO_C" >&6
7804else
7805 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7806/* confdefs.h. */
7807_ACEOF
7808cat confdefs.h >>conftest.$ac_ext
7809cat >>conftest.$ac_ext <<_ACEOF
7810/* end confdefs.h. */
7862d3a8
AS
7811$ac_includes_default
7812#if HAVE_SYS_SOCKET_H
7813#include <sys/socket.h>
7814#endif
7815#if HAVE_NET_IF_H
96f3a036 7816#include <net/if.h>
7862d3a8 7817#endif
96f3a036
DL
7818
7819int
7820main ()
7821{
7822static struct ifreq ac_aggr;
7823if (ac_aggr.ifr_broadaddr)
7824return 0;
7825 ;
7826 return 0;
7827}
7828_ACEOF
7829rm -f conftest.$ac_objext
7830if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 7831 (eval $ac_compile) 2>conftest.er1
96f3a036 7832 ac_status=$?
edfaf76d
LK
7833 grep -v '^ *+' conftest.er1 >conftest.err
7834 rm -f conftest.er1
7835 cat conftest.err >&5
96f3a036
DL
7836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7837 (exit $ac_status); } &&
ec8fcb10
YM
7838 { ac_try='test -z "$ac_c_werror_flag"
7839 || test ! -s conftest.err'
edfaf76d
LK
7840 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7841 (eval $ac_try) 2>&5
7842 ac_status=$?
7843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7844 (exit $ac_status); }; } &&
7845 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7846 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7847 (eval $ac_try) 2>&5
7848 ac_status=$?
7849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7850 (exit $ac_status); }; }; then
7851 ac_cv_member_struct_ifreq_ifr_broadaddr=yes
7852else
7853 echo "$as_me: failed program was:" >&5
7854sed 's/^/| /' conftest.$ac_ext >&5
7855
7856cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7857/* confdefs.h. */
7858_ACEOF
7859cat confdefs.h >>conftest.$ac_ext
7860cat >>conftest.$ac_ext <<_ACEOF
7861/* end confdefs.h. */
7862d3a8
AS
7862$ac_includes_default
7863#if HAVE_SYS_SOCKET_H
7864#include <sys/socket.h>
7865#endif
7866#if HAVE_NET_IF_H
96f3a036 7867#include <net/if.h>
7862d3a8 7868#endif
96f3a036
DL
7869
7870int
7871main ()
7872{
7873static struct ifreq ac_aggr;
7874if (sizeof ac_aggr.ifr_broadaddr)
7875return 0;
7876 ;
7877 return 0;
7878}
7879_ACEOF
7880rm -f conftest.$ac_objext
7881if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 7882 (eval $ac_compile) 2>conftest.er1
96f3a036 7883 ac_status=$?
edfaf76d
LK
7884 grep -v '^ *+' conftest.er1 >conftest.err
7885 rm -f conftest.er1
7886 cat conftest.err >&5
96f3a036
DL
7887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7888 (exit $ac_status); } &&
ec8fcb10
YM
7889 { ac_try='test -z "$ac_c_werror_flag"
7890 || test ! -s conftest.err'
edfaf76d
LK
7891 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7892 (eval $ac_try) 2>&5
7893 ac_status=$?
7894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7895 (exit $ac_status); }; } &&
7896 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7897 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7898 (eval $ac_try) 2>&5
7899 ac_status=$?
7900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7901 (exit $ac_status); }; }; then
7902 ac_cv_member_struct_ifreq_ifr_broadaddr=yes
7903else
7904 echo "$as_me: failed program was:" >&5
7905sed 's/^/| /' conftest.$ac_ext >&5
7906
7907ac_cv_member_struct_ifreq_ifr_broadaddr=no
7908fi
edfaf76d 7909rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 7910fi
edfaf76d 7911rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036
DL
7912fi
7913echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_broadaddr" >&5
7914echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_broadaddr" >&6
7915if test $ac_cv_member_struct_ifreq_ifr_broadaddr = yes; then
7916
7917cat >>confdefs.h <<_ACEOF
7918#define HAVE_STRUCT_IFREQ_IFR_BROADADDR 1
7919_ACEOF
7920
7921
7922fi
7923echo "$as_me:$LINENO: checking for struct ifreq.ifr_addr" >&5
7924echo $ECHO_N "checking for struct ifreq.ifr_addr... $ECHO_C" >&6
7925if test "${ac_cv_member_struct_ifreq_ifr_addr+set}" = set; then
7926 echo $ECHO_N "(cached) $ECHO_C" >&6
7927else
7928 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7929/* confdefs.h. */
7930_ACEOF
7931cat confdefs.h >>conftest.$ac_ext
7932cat >>conftest.$ac_ext <<_ACEOF
7933/* end confdefs.h. */
7862d3a8
AS
7934$ac_includes_default
7935#if HAVE_SYS_SOCKET_H
7936#include <sys/socket.h>
7937#endif
7938#if HAVE_NET_IF_H
96f3a036 7939#include <net/if.h>
7862d3a8 7940#endif
96f3a036
DL
7941
7942int
7943main ()
7944{
7945static struct ifreq ac_aggr;
7946if (ac_aggr.ifr_addr)
7947return 0;
7948 ;
7949 return 0;
7950}
7951_ACEOF
7952rm -f conftest.$ac_objext
7953if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 7954 (eval $ac_compile) 2>conftest.er1
96f3a036 7955 ac_status=$?
edfaf76d
LK
7956 grep -v '^ *+' conftest.er1 >conftest.err
7957 rm -f conftest.er1
7958 cat conftest.err >&5
96f3a036
DL
7959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7960 (exit $ac_status); } &&
ec8fcb10
YM
7961 { ac_try='test -z "$ac_c_werror_flag"
7962 || test ! -s conftest.err'
edfaf76d
LK
7963 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7964 (eval $ac_try) 2>&5
7965 ac_status=$?
7966 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7967 (exit $ac_status); }; } &&
7968 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7969 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7970 (eval $ac_try) 2>&5
7971 ac_status=$?
7972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7973 (exit $ac_status); }; }; then
7974 ac_cv_member_struct_ifreq_ifr_addr=yes
7975else
7976 echo "$as_me: failed program was:" >&5
7977sed 's/^/| /' conftest.$ac_ext >&5
7978
7979cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7980/* confdefs.h. */
7981_ACEOF
7982cat confdefs.h >>conftest.$ac_ext
7983cat >>conftest.$ac_ext <<_ACEOF
7984/* end confdefs.h. */
7862d3a8
AS
7985$ac_includes_default
7986#if HAVE_SYS_SOCKET_H
7987#include <sys/socket.h>
7988#endif
7989#if HAVE_NET_IF_H
96f3a036 7990#include <net/if.h>
7862d3a8 7991#endif
96f3a036
DL
7992
7993int
7994main ()
7995{
7996static struct ifreq ac_aggr;
7997if (sizeof ac_aggr.ifr_addr)
7998return 0;
7999 ;
8000 return 0;
8001}
8002_ACEOF
8003rm -f conftest.$ac_objext
8004if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 8005 (eval $ac_compile) 2>conftest.er1
96f3a036 8006 ac_status=$?
edfaf76d
LK
8007 grep -v '^ *+' conftest.er1 >conftest.err
8008 rm -f conftest.er1
8009 cat conftest.err >&5
96f3a036
DL
8010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8011 (exit $ac_status); } &&
ec8fcb10
YM
8012 { ac_try='test -z "$ac_c_werror_flag"
8013 || test ! -s conftest.err'
edfaf76d
LK
8014 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8015 (eval $ac_try) 2>&5
8016 ac_status=$?
8017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8018 (exit $ac_status); }; } &&
8019 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
8020 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8021 (eval $ac_try) 2>&5
8022 ac_status=$?
8023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8024 (exit $ac_status); }; }; then
8025 ac_cv_member_struct_ifreq_ifr_addr=yes
8026else
8027 echo "$as_me: failed program was:" >&5
8028sed 's/^/| /' conftest.$ac_ext >&5
8029
8030ac_cv_member_struct_ifreq_ifr_addr=no
8031fi
edfaf76d 8032rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8033fi
edfaf76d 8034rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036
DL
8035fi
8036echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_addr" >&5
8037echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_addr" >&6
8038if test $ac_cv_member_struct_ifreq_ifr_addr = yes; then
8039
8040cat >>confdefs.h <<_ACEOF
8041#define HAVE_STRUCT_IFREQ_IFR_ADDR 1
8042_ACEOF
8043
8044
8045fi
8046
8799b3e4 8047
8799b3e4 8048
c0d27fcc 8049echo "$as_me:$LINENO: checking for function prototypes" >&5
98418dba
CW
8050echo $ECHO_N "checking for function prototypes... $ECHO_C" >&6
8051if test "$ac_cv_prog_cc_stdc" != no; then
c0d27fcc 8052 echo "$as_me:$LINENO: result: yes" >&5
98418dba
CW
8053echo "${ECHO_T}yes" >&6
8054
c0d27fcc 8055cat >>confdefs.h <<\_ACEOF
98418dba 8056#define PROTOTYPES 1
c0d27fcc
MR
8057_ACEOF
8058
8059
8060cat >>confdefs.h <<\_ACEOF
8061#define __PROTOTYPES 1
8062_ACEOF
98418dba
CW
8063
8064else
c0d27fcc 8065 echo "$as_me:$LINENO: result: no" >&5
98418dba
CW
8066echo "${ECHO_T}no" >&6
8067fi
8068
c0d27fcc 8069echo "$as_me:$LINENO: checking for working volatile" >&5
98418dba
CW
8070echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
8071if test "${ac_cv_c_volatile+set}" = set; then
8072 echo $ECHO_N "(cached) $ECHO_C" >&6
8073else
8074 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8075/* confdefs.h. */
8076_ACEOF
8077cat confdefs.h >>conftest.$ac_ext
8078cat >>conftest.$ac_ext <<_ACEOF
8079/* end confdefs.h. */
98418dba 8080
98418dba
CW
8081int
8082main ()
8083{
8084
8085volatile int x;
8086int * volatile y;
8087 ;
8088 return 0;
8089}
8090_ACEOF
8091rm -f conftest.$ac_objext
c0d27fcc 8092if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 8093 (eval $ac_compile) 2>conftest.er1
98418dba 8094 ac_status=$?
edfaf76d
LK
8095 grep -v '^ *+' conftest.er1 >conftest.err
8096 rm -f conftest.er1
8097 cat conftest.err >&5
c0d27fcc 8098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8099 (exit $ac_status); } &&
ec8fcb10
YM
8100 { ac_try='test -z "$ac_c_werror_flag"
8101 || test ! -s conftest.err'
edfaf76d
LK
8102 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8103 (eval $ac_try) 2>&5
8104 ac_status=$?
8105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8106 (exit $ac_status); }; } &&
8107 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 8108 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8109 (eval $ac_try) 2>&5
8110 ac_status=$?
c0d27fcc 8111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8112 (exit $ac_status); }; }; then
8113 ac_cv_c_volatile=yes
8114else
8115 echo "$as_me: failed program was:" >&5
19650fd6
AS
8116sed 's/^/| /' conftest.$ac_ext >&5
8117
98418dba
CW
8118ac_cv_c_volatile=no
8119fi
edfaf76d 8120rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 8121fi
c0d27fcc 8122echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5
98418dba
CW
8123echo "${ECHO_T}$ac_cv_c_volatile" >&6
8124if test $ac_cv_c_volatile = no; then
8125
c0d27fcc 8126cat >>confdefs.h <<\_ACEOF
98418dba 8127#define volatile
c0d27fcc 8128_ACEOF
98418dba
CW
8129
8130fi
8131
c0d27fcc 8132echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
98418dba
CW
8133echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
8134if test "${ac_cv_c_const+set}" = set; then
8135 echo $ECHO_N "(cached) $ECHO_C" >&6
8136else
8137 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8138/* confdefs.h. */
8139_ACEOF
8140cat confdefs.h >>conftest.$ac_ext
8141cat >>conftest.$ac_ext <<_ACEOF
8142/* end confdefs.h. */
98418dba 8143
98418dba
CW
8144int
8145main ()
8146{
8147/* FIXME: Include the comments suggested by Paul. */
8148#ifndef __cplusplus
8149 /* Ultrix mips cc rejects this. */
8150 typedef int charset[2];
8151 const charset x;
8152 /* SunOS 4.1.1 cc rejects this. */
8153 char const *const *ccp;
8154 char **p;
8155 /* NEC SVR4.0.2 mips cc rejects this. */
8156 struct point {int x, y;};
8157 static struct point const zero = {0,0};
8158 /* AIX XL C 1.02.0.0 rejects this.
8159 It does not let you subtract one const X* pointer from another in
8160 an arm of an if-expression whose if-part is not a constant
8161 expression */
8162 const char *g = "string";
8163 ccp = &g + (g ? g-g : 0);
8164 /* HPUX 7.0 cc rejects these. */
8165 ++ccp;
8166 p = (char**) ccp;
8167 ccp = (char const *const *) p;
8168 { /* SCO 3.2v4 cc rejects this. */
8169 char *t;
8170 char const *s = 0 ? (char *) 0 : (char const *) 0;
8171
8172 *t++ = 0;
8173 }
8174 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
8175 int x[] = {25, 17};
8176 const int *foo = &x[0];
8177 ++foo;
8178 }
8179 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
8180 typedef const int *iptr;
8181 iptr p = 0;
8182 ++p;
8183 }
8184 { /* AIX XL C 1.02.0.0 rejects this saying
8185 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
8186 struct s { int j; const int *ap[3]; };
8187 struct s *b; b->j = 5;
8188 }
8189 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
8190 const int foo = 10;
8191 }
8192#endif
8193
8194 ;
8195 return 0;
8196}
8197_ACEOF
8198rm -f conftest.$ac_objext
c0d27fcc 8199if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 8200 (eval $ac_compile) 2>conftest.er1
98418dba 8201 ac_status=$?
edfaf76d
LK
8202 grep -v '^ *+' conftest.er1 >conftest.err
8203 rm -f conftest.er1
8204 cat conftest.err >&5
c0d27fcc 8205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8206 (exit $ac_status); } &&
ec8fcb10
YM
8207 { ac_try='test -z "$ac_c_werror_flag"
8208 || test ! -s conftest.err'
edfaf76d
LK
8209 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8210 (eval $ac_try) 2>&5
8211 ac_status=$?
8212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8213 (exit $ac_status); }; } &&
8214 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 8215 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8216 (eval $ac_try) 2>&5
8217 ac_status=$?
c0d27fcc 8218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8219 (exit $ac_status); }; }; then
8220 ac_cv_c_const=yes
8221else
8222 echo "$as_me: failed program was:" >&5
19650fd6
AS
8223sed 's/^/| /' conftest.$ac_ext >&5
8224
98418dba
CW
8225ac_cv_c_const=no
8226fi
edfaf76d 8227rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 8228fi
c0d27fcc 8229echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
98418dba
CW
8230echo "${ECHO_T}$ac_cv_c_const" >&6
8231if test $ac_cv_c_const = no; then
8232
c0d27fcc 8233cat >>confdefs.h <<\_ACEOF
98418dba 8234#define const
c0d27fcc 8235_ACEOF
98418dba
CW
8236
8237fi
8238
c0d27fcc 8239echo "$as_me:$LINENO: checking for void * support" >&5
98418dba
CW
8240echo $ECHO_N "checking for void * support... $ECHO_C" >&6
8241if test "${emacs_cv_void_star+set}" = set; then
8242 echo $ECHO_N "(cached) $ECHO_C" >&6
8243else
8244 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8245/* confdefs.h. */
8246_ACEOF
8247cat confdefs.h >>conftest.$ac_ext
8248cat >>conftest.$ac_ext <<_ACEOF
8249/* end confdefs.h. */
98418dba 8250
98418dba
CW
8251int
8252main ()
8253{
8254void * foo;
8255 ;
8256 return 0;
8257}
8258_ACEOF
8259rm -f conftest.$ac_objext
c0d27fcc 8260if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 8261 (eval $ac_compile) 2>conftest.er1
98418dba 8262 ac_status=$?
edfaf76d
LK
8263 grep -v '^ *+' conftest.er1 >conftest.err
8264 rm -f conftest.er1
8265 cat conftest.err >&5
c0d27fcc 8266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8267 (exit $ac_status); } &&
ec8fcb10
YM
8268 { ac_try='test -z "$ac_c_werror_flag"
8269 || test ! -s conftest.err'
edfaf76d
LK
8270 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8271 (eval $ac_try) 2>&5
8272 ac_status=$?
8273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8274 (exit $ac_status); }; } &&
8275 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 8276 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8277 (eval $ac_try) 2>&5
8278 ac_status=$?
c0d27fcc 8279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8280 (exit $ac_status); }; }; then
8281 emacs_cv_void_star=yes
8282else
8283 echo "$as_me: failed program was:" >&5
19650fd6
AS
8284sed 's/^/| /' conftest.$ac_ext >&5
8285
98418dba
CW
8286emacs_cv_void_star=no
8287fi
edfaf76d 8288rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 8289fi
c0d27fcc 8290echo "$as_me:$LINENO: result: $emacs_cv_void_star" >&5
98418dba
CW
8291echo "${ECHO_T}$emacs_cv_void_star" >&6
8292if test $emacs_cv_void_star = yes; then
c0d27fcc 8293 cat >>confdefs.h <<\_ACEOF
98418dba 8294#define POINTER_TYPE void
c0d27fcc 8295_ACEOF
98418dba
CW
8296
8297else
c0d27fcc 8298 cat >>confdefs.h <<\_ACEOF
98418dba 8299#define POINTER_TYPE char
c0d27fcc 8300_ACEOF
98418dba
CW
8301
8302fi
8303
c0d27fcc 8304
4494a266
JD
8305
8306
cd958eb3 8307
19650fd6
AS
8308echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
8309echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
edfaf76d 8310set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
98418dba
CW
8311if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
8312 echo $ECHO_N "(cached) $ECHO_C" >&6
8313else
c0d27fcc 8314 cat >conftest.make <<\_ACEOF
98418dba 8315all:
19650fd6 8316 @echo 'ac_maketemp="$(MAKE)"'
c0d27fcc 8317_ACEOF
98418dba
CW
8318# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
8319eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
8320if test -n "$ac_maketemp"; then
8321 eval ac_cv_prog_make_${ac_make}_set=yes
8322else
8323 eval ac_cv_prog_make_${ac_make}_set=no
8324fi
8325rm -f conftest.make
8326fi
8327if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
c0d27fcc 8328 echo "$as_me:$LINENO: result: yes" >&5
98418dba
CW
8329echo "${ECHO_T}yes" >&6
8330 SET_MAKE=
8331else
c0d27fcc 8332 echo "$as_me:$LINENO: result: no" >&5
98418dba
CW
8333echo "${ECHO_T}no" >&6
8334 SET_MAKE="MAKE=${MAKE-make}"
8335fi
8336
c0d27fcc
MR
8337
8338echo "$as_me:$LINENO: checking for long file names" >&5
98418dba
CW
8339echo $ECHO_N "checking for long file names... $ECHO_C" >&6
8340if test "${ac_cv_sys_long_file_names+set}" = set; then
8341 echo $ECHO_N "(cached) $ECHO_C" >&6
8342else
8343 ac_cv_sys_long_file_names=yes
8344# Test for long file names in all the places we know might matter:
8345# . the current directory, where building will happen
8346# $prefix/lib where we will be installing things
8347# $exec_prefix/lib likewise
8348# eval it to expand exec_prefix.
8349# $TMPDIR if set, where it might want to write temporary files
8350# if $TMPDIR is not set:
8351# /tmp where it might want to write temporary files
8352# /var/tmp likewise
8353# /usr/tmp likewise
8354if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
8355 ac_tmpdirs=$TMPDIR
8356else
8357 ac_tmpdirs='/tmp /var/tmp /usr/tmp'
8358fi
8359for ac_dir in . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
8360 test -d $ac_dir || continue
8361 test -w $ac_dir || continue # It is less confusing to not echo anything here.
8362 ac_xdir=$ac_dir/cf$$
8363 (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
8364 ac_tf1=$ac_xdir/conftest9012345
8365 ac_tf2=$ac_xdir/conftest9012346
8366 (echo 1 >$ac_tf1) 2>/dev/null
8367 (echo 2 >$ac_tf2) 2>/dev/null
8368 ac_val=`cat $ac_tf1 2>/dev/null`
8369 if test ! -f $ac_tf1 || test "$ac_val" != 1; then
8370 ac_cv_sys_long_file_names=no
8371 rm -rf $ac_xdir 2>/dev/null
8372 break
8373 fi
8374 rm -rf $ac_xdir 2>/dev/null
8375done
8376fi
c0d27fcc 8377echo "$as_me:$LINENO: result: $ac_cv_sys_long_file_names" >&5
98418dba
CW
8378echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
8379if test $ac_cv_sys_long_file_names = yes; then
8380
c0d27fcc 8381cat >>confdefs.h <<\_ACEOF
98418dba 8382#define HAVE_LONG_FILE_NAMES 1
c0d27fcc 8383_ACEOF
98418dba
CW
8384
8385fi
8386
c0d27fcc 8387
98418dba
CW
8388#### Choose a window system.
8389
c0d27fcc 8390echo "$as_me:$LINENO: checking for X" >&5
98418dba
CW
8391echo $ECHO_N "checking for X... $ECHO_C" >&6
8392
bc5d9888 8393ac_path_x_has_been_run=yes
c0d27fcc 8394
98418dba
CW
8395# Check whether --with-x or --without-x was given.
8396if test "${with_x+set}" = set; then
8397 withval="$with_x"
8398
8399fi;
8400# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
8401if test "x$with_x" = xno; then
8402 # The user explicitly disabled X.
8403 have_x=disabled
8404else
8405 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
8406 # Both variables are already set.
8407 have_x=yes
8408 else
8409 if test "${ac_cv_have_x+set}" = set; then
8410 echo $ECHO_N "(cached) $ECHO_C" >&6
8411else
8412 # One or both of the vars are not set, and there is no cached value.
8413ac_x_includes=no ac_x_libraries=no
8414rm -fr conftest.dir
8415if mkdir conftest.dir; then
8416 cd conftest.dir
8417 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
c0d27fcc 8418 cat >Imakefile <<'_ACEOF'
98418dba
CW
8419acfindx:
8420 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
c0d27fcc 8421_ACEOF
98418dba
CW
8422 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
8423 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
8424 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
8425 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
8426 for ac_extension in a so sl; do
8427 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
edfaf76d
LK
8428 test -f $ac_im_libdir/libX11.$ac_extension; then
8429 ac_im_usrlibdir=$ac_im_libdir; break
98418dba
CW
8430 fi
8431 done
8432 # Screen out bogus values from the imake configuration. They are
8433 # bogus both because they are the default anyway, and because
8434 # using them would break gcc on systems where it needs fixed includes.
8435 case $ac_im_incroot in
8436 /usr/include) ;;
8437 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
8438 esac
8439 case $ac_im_usrlibdir in
8440 /usr/lib | /lib) ;;
8441 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
8442 esac
8443 fi
8444 cd ..
8445 rm -fr conftest.dir
8446fi
8447
8448# Standard set of common directories for X headers.
8449# Check X11 before X11Rn because it is often a symlink to the current release.
8450ac_x_header_dirs='
8451/usr/X11/include
8452/usr/X11R6/include
8453/usr/X11R5/include
8454/usr/X11R4/include
8455
8456/usr/include/X11
8457/usr/include/X11R6
8458/usr/include/X11R5
8459/usr/include/X11R4
8460
8461/usr/local/X11/include
8462/usr/local/X11R6/include
8463/usr/local/X11R5/include
8464/usr/local/X11R4/include
8465
8466/usr/local/include/X11
8467/usr/local/include/X11R6
8468/usr/local/include/X11R5
8469/usr/local/include/X11R4
8470
8471/usr/X386/include
8472/usr/x386/include
8473/usr/XFree86/include/X11
8474
8475/usr/include
8476/usr/local/include
8477/usr/unsupported/include
8478/usr/athena/include
8479/usr/local/x11r5/include
8480/usr/lpp/Xamples/include
8481
8482/usr/openwin/include
8483/usr/openwin/share/include'
8484
8485if test "$ac_x_includes" = no; then
bc5d9888 8486 # Guess where to find include files, by looking for a specified header file.
98418dba
CW
8487 # First, try using that file with no special directory specified.
8488 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8489/* confdefs.h. */
8490_ACEOF
8491cat confdefs.h >>conftest.$ac_ext
8492cat >>conftest.$ac_ext <<_ACEOF
8493/* end confdefs.h. */
4713fa76 8494#include <X11/Intrinsic.h>
98418dba 8495_ACEOF
c0d27fcc 8496if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
8497 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8498 ac_status=$?
6bae0ccf 8499 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
8500 rm -f conftest.er1
8501 cat conftest.err >&5
c0d27fcc 8502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8503 (exit $ac_status); } >/dev/null; then
8504 if test -s conftest.err; then
8505 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 8506 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
8507 else
8508 ac_cpp_err=
8509 fi
8510else
8511 ac_cpp_err=yes
8512fi
8513if test -z "$ac_cpp_err"; then
8514 # We can compile using X headers with no special include directory.
8515ac_x_includes=
8516else
8517 echo "$as_me: failed program was:" >&5
19650fd6
AS
8518sed 's/^/| /' conftest.$ac_ext >&5
8519
98418dba 8520 for ac_dir in $ac_x_header_dirs; do
4713fa76 8521 if test -r "$ac_dir/X11/Intrinsic.h"; then
98418dba
CW
8522 ac_x_includes=$ac_dir
8523 break
8524 fi
8525done
8526fi
8527rm -f conftest.err conftest.$ac_ext
8528fi # $ac_x_includes = no
8529
8530if test "$ac_x_libraries" = no; then
8531 # Check for the libraries.
8532 # See if we find them without any special options.
8533 # Don't add to $LIBS permanently.
8534 ac_save_LIBS=$LIBS
4713fa76 8535 LIBS="-lXt $LIBS"
98418dba 8536 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8537/* confdefs.h. */
8538_ACEOF
8539cat confdefs.h >>conftest.$ac_ext
8540cat >>conftest.$ac_ext <<_ACEOF
8541/* end confdefs.h. */
4713fa76 8542#include <X11/Intrinsic.h>
98418dba
CW
8543int
8544main ()
8545{
4713fa76 8546XtMalloc (0)
98418dba
CW
8547 ;
8548 return 0;
8549}
8550_ACEOF
8551rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8552if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 8553 (eval $ac_link) 2>conftest.er1
98418dba 8554 ac_status=$?
edfaf76d
LK
8555 grep -v '^ *+' conftest.er1 >conftest.err
8556 rm -f conftest.er1
8557 cat conftest.err >&5
c0d27fcc 8558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8559 (exit $ac_status); } &&
ec8fcb10
YM
8560 { ac_try='test -z "$ac_c_werror_flag"
8561 || test ! -s conftest.err'
edfaf76d
LK
8562 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8563 (eval $ac_try) 2>&5
8564 ac_status=$?
8565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8566 (exit $ac_status); }; } &&
8567 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8568 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8569 (eval $ac_try) 2>&5
8570 ac_status=$?
c0d27fcc 8571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8572 (exit $ac_status); }; }; then
8573 LIBS=$ac_save_LIBS
8574# We can link X programs with no special library path.
8575ac_x_libraries=
8576else
8577 echo "$as_me: failed program was:" >&5
19650fd6
AS
8578sed 's/^/| /' conftest.$ac_ext >&5
8579
98418dba
CW
8580LIBS=$ac_save_LIBS
8581for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
8582do
8583 # Don't even attempt the hair of trying to link an X program!
8584 for ac_extension in a so sl; do
4713fa76 8585 if test -r $ac_dir/libXt.$ac_extension; then
98418dba
CW
8586 ac_x_libraries=$ac_dir
8587 break 2
8588 fi
8589 done
8590done
8591fi
edfaf76d
LK
8592rm -f conftest.err conftest.$ac_objext \
8593 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
8594fi # $ac_x_libraries = no
8595
8596if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
8597 # Didn't find X anywhere. Cache the known absence of X.
8598 ac_cv_have_x="have_x=no"
8599else
8600 # Record where we found X for the cache.
8601 ac_cv_have_x="have_x=yes \
edfaf76d 8602 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
98418dba
CW
8603fi
8604fi
8605
8606 fi
8607 eval "$ac_cv_have_x"
8608fi # $with_x != no
8609
8610if test "$have_x" != yes; then
c0d27fcc 8611 echo "$as_me:$LINENO: result: $have_x" >&5
98418dba
CW
8612echo "${ECHO_T}$have_x" >&6
8613 no_x=yes
8614else
8615 # If each of the values was on the command line, it overrides each guess.
8616 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
8617 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
8618 # Update the cache value to reflect the command line values.
8619 ac_cv_have_x="have_x=yes \
8620 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
bc5d9888
CY
8621 # It might be that x_includes is empty (headers are found in the
8622 # standard search path. Then output the corresponding message
8623 ac_out_x_includes=$x_includes
8624 test "x$x_includes" = x && ac_out_x_includes="in standard search path"
8625 echo "$as_me:$LINENO: result: libraries $x_libraries, headers $ac_out_x_includes" >&5
8626echo "${ECHO_T}libraries $x_libraries, headers $ac_out_x_includes" >&6
98418dba
CW
8627fi
8628
8629if test "$no_x" = yes; then
8630 window_system=none
8631else
8632 window_system=x11
8633fi
8634
92d1ccf4
AS
8635if test "${x_libraries}" != NONE; then
8636 if test -n "${x_libraries}"; then
8637 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
8638 LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"`
8639 fi
98418dba 8640 x_default_search_path=""
92d1ccf4
AS
8641 x_search_path=${x_libraries}
8642 if test -z "${x_search_path}"; then
8643 x_search_path=/usr/lib
8644 fi
8645 for x_library in `echo ${x_search_path}: | \
8646 sed -e "s/:/ /g" -e p -e "s:/lib[^ /]* :/share :g"`; do
98418dba
CW
8647 x_search_path="\
8648${x_library}/X11/%L/%T/%N%C%S:\
8649${x_library}/X11/%l/%T/%N%C%S:\
8650${x_library}/X11/%T/%N%C%S:\
8651${x_library}/X11/%L/%T/%N%S:\
8652${x_library}/X11/%l/%T/%N%S:\
8653${x_library}/X11/%T/%N%S"
8654 if test x"${x_default_search_path}" = x; then
8655 x_default_search_path=${x_search_path}
8656 else
8657 x_default_search_path="${x_search_path}:${x_default_search_path}"
8658 fi
8659 done
8660fi
8661if test "${x_includes}" != NONE && test -n "${x_includes}"; then
8662 C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"`
8663fi
8664
8665if test x"${x_includes}" = x; then
8666 bitmapdir=/usr/include/X11/bitmaps
8667else
8668 # accumulate include directories that have X11 bitmap subdirectories
8669 bmd_acc="dummyval"
8670 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
8671 if test -d "${bmd}/X11/bitmaps"; then
8672 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
8673 fi
8674 if test -d "${bmd}/bitmaps"; then
8675 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
8676 fi
8677 done
8678 if test ${bmd_acc} != "dummyval"; then
8679 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
8680 fi
8681fi
8682
5d6da11e 8683HAVE_CARBON=no
1d4d5604
YM
8684if test "${with_carbon}" != no; then
8685 if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
5d6da11e
YM
8686 echo "$as_me:$LINENO: checking for Carbon/Carbon.h" >&5
8687echo $ECHO_N "checking for Carbon/Carbon.h... $ECHO_C" >&6
8688if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
8689 echo $ECHO_N "(cached) $ECHO_C" >&6
8690fi
8691echo "$as_me:$LINENO: result: $ac_cv_header_Carbon_Carbon_h" >&5
8692echo "${ECHO_T}$ac_cv_header_Carbon_Carbon_h" >&6
8693else
8694 # Is the header compilable?
8695echo "$as_me:$LINENO: checking Carbon/Carbon.h usability" >&5
8696echo $ECHO_N "checking Carbon/Carbon.h usability... $ECHO_C" >&6
8697cat >conftest.$ac_ext <<_ACEOF
8698/* confdefs.h. */
8699_ACEOF
8700cat confdefs.h >>conftest.$ac_ext
8701cat >>conftest.$ac_ext <<_ACEOF
8702/* end confdefs.h. */
8703$ac_includes_default
8704#include <Carbon/Carbon.h>
8705_ACEOF
8706rm -f conftest.$ac_objext
8707if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 8708 (eval $ac_compile) 2>conftest.er1
5d6da11e 8709 ac_status=$?
edfaf76d
LK
8710 grep -v '^ *+' conftest.er1 >conftest.err
8711 rm -f conftest.er1
8712 cat conftest.err >&5
5d6da11e
YM
8713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8714 (exit $ac_status); } &&
ec8fcb10
YM
8715 { ac_try='test -z "$ac_c_werror_flag"
8716 || test ! -s conftest.err'
edfaf76d
LK
8717 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8718 (eval $ac_try) 2>&5
8719 ac_status=$?
8720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8721 (exit $ac_status); }; } &&
8722 { ac_try='test -s conftest.$ac_objext'
5d6da11e
YM
8723 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8724 (eval $ac_try) 2>&5
8725 ac_status=$?
8726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8727 (exit $ac_status); }; }; then
8728 ac_header_compiler=yes
8729else
8730 echo "$as_me: failed program was:" >&5
8731sed 's/^/| /' conftest.$ac_ext >&5
8732
8733ac_header_compiler=no
8734fi
edfaf76d 8735rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5d6da11e
YM
8736echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8737echo "${ECHO_T}$ac_header_compiler" >&6
8738
8739# Is the header present?
8740echo "$as_me:$LINENO: checking Carbon/Carbon.h presence" >&5
8741echo $ECHO_N "checking Carbon/Carbon.h presence... $ECHO_C" >&6
8742cat >conftest.$ac_ext <<_ACEOF
8743/* confdefs.h. */
8744_ACEOF
8745cat confdefs.h >>conftest.$ac_ext
8746cat >>conftest.$ac_ext <<_ACEOF
8747/* end confdefs.h. */
8748#include <Carbon/Carbon.h>
8749_ACEOF
8750if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8751 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8752 ac_status=$?
8753 grep -v '^ *+' conftest.er1 >conftest.err
8754 rm -f conftest.er1
8755 cat conftest.err >&5
8756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8757 (exit $ac_status); } >/dev/null; then
8758 if test -s conftest.err; then
8759 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 8760 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
5d6da11e
YM
8761 else
8762 ac_cpp_err=
8763 fi
8764else
8765 ac_cpp_err=yes
8766fi
8767if test -z "$ac_cpp_err"; then
8768 ac_header_preproc=yes
8769else
8770 echo "$as_me: failed program was:" >&5
8771sed 's/^/| /' conftest.$ac_ext >&5
8772
8773 ac_header_preproc=no
8774fi
8775rm -f conftest.err conftest.$ac_ext
8776echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8777echo "${ECHO_T}$ac_header_preproc" >&6
8778
8779# So? What about this header?
edfaf76d
LK
8780case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8781 yes:no: )
5d6da11e
YM
8782 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: accepted by the compiler, rejected by the preprocessor!" >&5
8783echo "$as_me: WARNING: Carbon/Carbon.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
8784 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: proceeding with the compiler's result" >&5
8785echo "$as_me: WARNING: Carbon/Carbon.h: proceeding with the compiler's result" >&2;}
8786 ac_header_preproc=yes
5d6da11e 8787 ;;
edfaf76d 8788 no:yes:* )
5d6da11e
YM
8789 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: present but cannot be compiled" >&5
8790echo "$as_me: WARNING: Carbon/Carbon.h: present but cannot be compiled" >&2;}
edfaf76d
LK
8791 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: check for missing prerequisite headers?" >&5
8792echo "$as_me: WARNING: Carbon/Carbon.h: check for missing prerequisite headers?" >&2;}
8793 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: see the Autoconf documentation" >&5
8794echo "$as_me: WARNING: Carbon/Carbon.h: see the Autoconf documentation" >&2;}
8795 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: section \"Present But Cannot Be Compiled\"" >&5
8796echo "$as_me: WARNING: Carbon/Carbon.h: section \"Present But Cannot Be Compiled\"" >&2;}
5d6da11e
YM
8797 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: proceeding with the preprocessor's result" >&5
8798echo "$as_me: WARNING: Carbon/Carbon.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
8799 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: in the future, the compiler will take precedence" >&5
8800echo "$as_me: WARNING: Carbon/Carbon.h: in the future, the compiler will take precedence" >&2;}
5d6da11e
YM
8801 (
8802 cat <<\_ASBOX
edfaf76d
LK
8803## ------------------------------------------ ##
8804## Report this to the AC_PACKAGE_NAME lists. ##
8805## ------------------------------------------ ##
5d6da11e
YM
8806_ASBOX
8807 ) |
8808 sed "s/^/$as_me: WARNING: /" >&2
8809 ;;
8810esac
8811echo "$as_me:$LINENO: checking for Carbon/Carbon.h" >&5
8812echo $ECHO_N "checking for Carbon/Carbon.h... $ECHO_C" >&6
8813if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
8814 echo $ECHO_N "(cached) $ECHO_C" >&6
8815else
8816 ac_cv_header_Carbon_Carbon_h=$ac_header_preproc
8817fi
8818echo "$as_me:$LINENO: result: $ac_cv_header_Carbon_Carbon_h" >&5
8819echo "${ECHO_T}$ac_cv_header_Carbon_Carbon_h" >&6
8820
8821fi
8822if test $ac_cv_header_Carbon_Carbon_h = yes; then
8823 HAVE_CARBON=yes
8824fi
8825
8826
1d4d5604
YM
8827fi
8828if test "${window_system}" = x11 && test "${HAVE_CARBON}" = yes; then
8829 if test "${with_carbon+set}" != set \
8830 && test "${carbon_appdir_x+set}" != set; then
ec8fcb10
YM
8831 for var in with_x with_x_toolkit with_gtk with_xim \
8832 with_xpm with_jpeg with_tiff with_gif with_png; do
8833 if eval test \"\${$var+set}\" = set; then
8834 HAVE_CARBON=no
8835 break
8836 fi
8837 done
5d6da11e
YM
8838 fi
8839fi
1d4d5604
YM
8840if test "${HAVE_CARBON}" = yes; then
8841 window_system=mac
8842fi
8843
8844case "${window_system}" in
8845 x11 )
8846 HAVE_X_WINDOWS=yes
8847 HAVE_X11=yes
8848 case "${with_x_toolkit}" in
8849 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
8850 motif ) USE_X_TOOLKIT=MOTIF ;;
8851 gtk ) with_gtk=yes
8852 USE_X_TOOLKIT=none ;;
8853 no ) USE_X_TOOLKIT=none ;;
8854 * ) USE_X_TOOLKIT=maybe ;;
8855 esac
8856 ;;
8857 mac | none )
8858 HAVE_X_WINDOWS=no
8859 HAVE_X11=no
8860 USE_X_TOOLKIT=none
8861 ;;
8862esac
8863
8864### If we're using X11, we should use the X menu package.
8865HAVE_MENUS=no
8866case ${HAVE_X11} in
8867 yes ) HAVE_MENUS=yes ;;
8868esac
8869
8870if test "${opsys}" = "hpux9"; then
8871 case "${x_libraries}" in
8872 *X11R4* )
8873 opsysfile="s/hpux9-x11r4.h"
8874 ;;
8875 esac
8876fi
8877
8878if test "${opsys}" = "hpux9shr"; then
8879 case "${x_libraries}" in
8880 *X11R4* )
8881 opsysfile="s/hpux9shxr4.h"
8882 ;;
8883 esac
8884fi
5d6da11e 8885
98418dba
CW
8886### Compute the unexec source name from the object name.
8887UNEXEC_SRC="`echo ${unexec} | sed 's/\.o/.c/'`"
8888
8889# Do the opsystem or machine files prohibit the use of the GNU malloc?
8890# Assume not, until told otherwise.
8891GNU_MALLOC=yes
8892doug_lea_malloc=yes
c0d27fcc 8893echo "$as_me:$LINENO: checking for malloc_get_state" >&5
98418dba
CW
8894echo $ECHO_N "checking for malloc_get_state... $ECHO_C" >&6
8895if test "${ac_cv_func_malloc_get_state+set}" = set; then
8896 echo $ECHO_N "(cached) $ECHO_C" >&6
8897else
8898 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8899/* confdefs.h. */
8900_ACEOF
8901cat confdefs.h >>conftest.$ac_ext
8902cat >>conftest.$ac_ext <<_ACEOF
8903/* end confdefs.h. */
edfaf76d
LK
8904/* Define malloc_get_state to an innocuous variant, in case <limits.h> declares malloc_get_state.
8905 For example, HP-UX 11i <limits.h> declares gettimeofday. */
8906#define malloc_get_state innocuous_malloc_get_state
8907
98418dba 8908/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
8909 which can conflict with char malloc_get_state (); below.
8910 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8911 <limits.h> exists even on freestanding compilers. */
edfaf76d 8912
19650fd6
AS
8913#ifdef __STDC__
8914# include <limits.h>
8915#else
8916# include <assert.h>
8917#endif
edfaf76d
LK
8918
8919#undef malloc_get_state
8920
98418dba
CW
8921/* Override any gcc2 internal prototype to avoid an error. */
8922#ifdef __cplusplus
8923extern "C"
19650fd6 8924{
98418dba
CW
8925#endif
8926/* We use char because int might match the return type of a gcc2
8927 builtin and then its argument prototype would still apply. */
8928char malloc_get_state ();
98418dba
CW
8929/* The GNU C library defines this for functions which it implements
8930 to always fail with ENOSYS. Some functions are actually named
8931 something starting with __ and the normal name is an alias. */
8932#if defined (__stub_malloc_get_state) || defined (__stub___malloc_get_state)
8933choke me
8934#else
19650fd6
AS
8935char (*f) () = malloc_get_state;
8936#endif
8937#ifdef __cplusplus
8938}
98418dba
CW
8939#endif
8940
19650fd6
AS
8941int
8942main ()
8943{
8944return f != malloc_get_state;
98418dba
CW
8945 ;
8946 return 0;
8947}
8948_ACEOF
8949rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8950if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 8951 (eval $ac_link) 2>conftest.er1
98418dba 8952 ac_status=$?
edfaf76d
LK
8953 grep -v '^ *+' conftest.er1 >conftest.err
8954 rm -f conftest.er1
8955 cat conftest.err >&5
c0d27fcc 8956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8957 (exit $ac_status); } &&
ec8fcb10
YM
8958 { ac_try='test -z "$ac_c_werror_flag"
8959 || test ! -s conftest.err'
edfaf76d
LK
8960 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8961 (eval $ac_try) 2>&5
8962 ac_status=$?
8963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8964 (exit $ac_status); }; } &&
8965 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8966 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8967 (eval $ac_try) 2>&5
8968 ac_status=$?
c0d27fcc 8969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8970 (exit $ac_status); }; }; then
8971 ac_cv_func_malloc_get_state=yes
8972else
8973 echo "$as_me: failed program was:" >&5
19650fd6
AS
8974sed 's/^/| /' conftest.$ac_ext >&5
8975
98418dba
CW
8976ac_cv_func_malloc_get_state=no
8977fi
edfaf76d
LK
8978rm -f conftest.err conftest.$ac_objext \
8979 conftest$ac_exeext conftest.$ac_ext
98418dba 8980fi
c0d27fcc 8981echo "$as_me:$LINENO: result: $ac_cv_func_malloc_get_state" >&5
98418dba
CW
8982echo "${ECHO_T}$ac_cv_func_malloc_get_state" >&6
8983if test $ac_cv_func_malloc_get_state = yes; then
8984 :
8985else
8986 doug_lea_malloc=no
8987fi
8988
c0d27fcc 8989echo "$as_me:$LINENO: checking for malloc_set_state" >&5
98418dba
CW
8990echo $ECHO_N "checking for malloc_set_state... $ECHO_C" >&6
8991if test "${ac_cv_func_malloc_set_state+set}" = set; then
8992 echo $ECHO_N "(cached) $ECHO_C" >&6
8993else
8994 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8995/* confdefs.h. */
8996_ACEOF
8997cat confdefs.h >>conftest.$ac_ext
8998cat >>conftest.$ac_ext <<_ACEOF
8999/* end confdefs.h. */
edfaf76d
LK
9000/* Define malloc_set_state to an innocuous variant, in case <limits.h> declares malloc_set_state.
9001 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9002#define malloc_set_state innocuous_malloc_set_state
9003
98418dba 9004/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
9005 which can conflict with char malloc_set_state (); below.
9006 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9007 <limits.h> exists even on freestanding compilers. */
edfaf76d 9008
19650fd6
AS
9009#ifdef __STDC__
9010# include <limits.h>
9011#else
9012# include <assert.h>
9013#endif
edfaf76d
LK
9014
9015#undef malloc_set_state
9016
98418dba
CW
9017/* Override any gcc2 internal prototype to avoid an error. */
9018#ifdef __cplusplus
9019extern "C"
19650fd6 9020{
98418dba
CW
9021#endif
9022/* We use char because int might match the return type of a gcc2
9023 builtin and then its argument prototype would still apply. */
9024char malloc_set_state ();
98418dba
CW
9025/* The GNU C library defines this for functions which it implements
9026 to always fail with ENOSYS. Some functions are actually named
9027 something starting with __ and the normal name is an alias. */
9028#if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
9029choke me
9030#else
19650fd6
AS
9031char (*f) () = malloc_set_state;
9032#endif
9033#ifdef __cplusplus
9034}
98418dba
CW
9035#endif
9036
19650fd6
AS
9037int
9038main ()
9039{
9040return f != malloc_set_state;
98418dba
CW
9041 ;
9042 return 0;
9043}
9044_ACEOF
9045rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9046if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 9047 (eval $ac_link) 2>conftest.er1
98418dba 9048 ac_status=$?
edfaf76d
LK
9049 grep -v '^ *+' conftest.er1 >conftest.err
9050 rm -f conftest.er1
9051 cat conftest.err >&5
c0d27fcc 9052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9053 (exit $ac_status); } &&
ec8fcb10
YM
9054 { ac_try='test -z "$ac_c_werror_flag"
9055 || test ! -s conftest.err'
edfaf76d
LK
9056 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9057 (eval $ac_try) 2>&5
9058 ac_status=$?
9059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9060 (exit $ac_status); }; } &&
9061 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9062 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9063 (eval $ac_try) 2>&5
9064 ac_status=$?
c0d27fcc 9065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9066 (exit $ac_status); }; }; then
9067 ac_cv_func_malloc_set_state=yes
9068else
9069 echo "$as_me: failed program was:" >&5
19650fd6
AS
9070sed 's/^/| /' conftest.$ac_ext >&5
9071
98418dba
CW
9072ac_cv_func_malloc_set_state=no
9073fi
edfaf76d
LK
9074rm -f conftest.err conftest.$ac_objext \
9075 conftest$ac_exeext conftest.$ac_ext
98418dba 9076fi
c0d27fcc 9077echo "$as_me:$LINENO: result: $ac_cv_func_malloc_set_state" >&5
98418dba
CW
9078echo "${ECHO_T}$ac_cv_func_malloc_set_state" >&6
9079if test $ac_cv_func_malloc_set_state = yes; then
9080 :
9081else
9082 doug_lea_malloc=no
9083fi
9084
c0d27fcc 9085echo "$as_me:$LINENO: checking whether __after_morecore_hook exists" >&5
98418dba
CW
9086echo $ECHO_N "checking whether __after_morecore_hook exists... $ECHO_C" >&6
9087if test "${emacs_cv_var___after_morecore_hook+set}" = set; then
9088 echo $ECHO_N "(cached) $ECHO_C" >&6
9089else
9090 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9091/* confdefs.h. */
9092_ACEOF
9093cat confdefs.h >>conftest.$ac_ext
9094cat >>conftest.$ac_ext <<_ACEOF
9095/* end confdefs.h. */
98418dba 9096extern void (* __after_morecore_hook)();
98418dba
CW
9097int
9098main ()
9099{
9100__after_morecore_hook = 0
9101 ;
9102 return 0;
9103}
9104_ACEOF
9105rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9106if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 9107 (eval $ac_link) 2>conftest.er1
98418dba 9108 ac_status=$?
edfaf76d
LK
9109 grep -v '^ *+' conftest.er1 >conftest.err
9110 rm -f conftest.er1
9111 cat conftest.err >&5
c0d27fcc 9112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9113 (exit $ac_status); } &&
ec8fcb10
YM
9114 { ac_try='test -z "$ac_c_werror_flag"
9115 || test ! -s conftest.err'
edfaf76d
LK
9116 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9117 (eval $ac_try) 2>&5
9118 ac_status=$?
9119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9120 (exit $ac_status); }; } &&
9121 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9122 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9123 (eval $ac_try) 2>&5
9124 ac_status=$?
c0d27fcc 9125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9126 (exit $ac_status); }; }; then
9127 emacs_cv_var___after_morecore_hook=yes
9128else
9129 echo "$as_me: failed program was:" >&5
19650fd6
AS
9130sed 's/^/| /' conftest.$ac_ext >&5
9131
98418dba
CW
9132emacs_cv_var___after_morecore_hook=no
9133fi
edfaf76d
LK
9134rm -f conftest.err conftest.$ac_objext \
9135 conftest$ac_exeext conftest.$ac_ext
98418dba 9136fi
c0d27fcc 9137echo "$as_me:$LINENO: result: $emacs_cv_var___after_morecore_hook" >&5
98418dba
CW
9138echo "${ECHO_T}$emacs_cv_var___after_morecore_hook" >&6
9139if test $emacs_cv_var___after_morecore_hook = no; then
9140 doug_lea_malloc=no
9141fi
9142if test "${system_malloc}" = "yes"; then
9143 GNU_MALLOC=no
9144 GNU_MALLOC_reason="
9145 (The GNU allocators don't work with this system configuration.)"
9146fi
9147if test "$doug_lea_malloc" = "yes" ; then
9148 if test "$GNU_MALLOC" = yes ; then
9149 GNU_MALLOC_reason="
9150 (Using Doug Lea's new malloc from the GNU C Library.)"
9151 fi
b936fae4 9152
c0d27fcc 9153cat >>confdefs.h <<\_ACEOF
98418dba 9154#define DOUG_LEA_MALLOC 1
c0d27fcc 9155_ACEOF
98418dba
CW
9156
9157fi
9158
9159if test x"${REL_ALLOC}" = x; then
9160 REL_ALLOC=${GNU_MALLOC}
9161fi
9162
9163
c0d27fcc
MR
9164
9165
9166for ac_header in stdlib.h unistd.h
98418dba
CW
9167do
9168as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
9169if eval "test \"\${$as_ac_Header+set}\" = set"; then
9170 echo "$as_me:$LINENO: checking for $ac_header" >&5
98418dba
CW
9171echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9172if eval "test \"\${$as_ac_Header+set}\" = set"; then
9173 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
9174fi
9175echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9176echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 9177else
c0d27fcc
MR
9178 # Is the header compilable?
9179echo "$as_me:$LINENO: checking $ac_header usability" >&5
9180echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
9181cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9182/* confdefs.h. */
9183_ACEOF
9184cat confdefs.h >>conftest.$ac_ext
9185cat >>conftest.$ac_ext <<_ACEOF
9186/* end confdefs.h. */
98418dba
CW
9187$ac_includes_default
9188#include <$ac_header>
9189_ACEOF
9190rm -f conftest.$ac_objext
c0d27fcc 9191if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 9192 (eval $ac_compile) 2>conftest.er1
98418dba 9193 ac_status=$?
edfaf76d
LK
9194 grep -v '^ *+' conftest.er1 >conftest.err
9195 rm -f conftest.er1
9196 cat conftest.err >&5
c0d27fcc 9197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9198 (exit $ac_status); } &&
ec8fcb10
YM
9199 { ac_try='test -z "$ac_c_werror_flag"
9200 || test ! -s conftest.err'
edfaf76d
LK
9201 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9202 (eval $ac_try) 2>&5
9203 ac_status=$?
9204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9205 (exit $ac_status); }; } &&
9206 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 9207 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9208 (eval $ac_try) 2>&5
9209 ac_status=$?
c0d27fcc 9210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9211 (exit $ac_status); }; }; then
c0d27fcc 9212 ac_header_compiler=yes
98418dba
CW
9213else
9214 echo "$as_me: failed program was:" >&5
19650fd6
AS
9215sed 's/^/| /' conftest.$ac_ext >&5
9216
c0d27fcc 9217ac_header_compiler=no
98418dba 9218fi
edfaf76d 9219rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
9220echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9221echo "${ECHO_T}$ac_header_compiler" >&6
98418dba 9222
c0d27fcc
MR
9223# Is the header present?
9224echo "$as_me:$LINENO: checking $ac_header presence" >&5
9225echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9226cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9227/* confdefs.h. */
9228_ACEOF
9229cat confdefs.h >>conftest.$ac_ext
9230cat >>conftest.$ac_ext <<_ACEOF
9231/* end confdefs.h. */
98418dba
CW
9232#include <$ac_header>
9233_ACEOF
c0d27fcc 9234if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
9235 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9236 ac_status=$?
6bae0ccf 9237 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
9238 rm -f conftest.er1
9239 cat conftest.err >&5
c0d27fcc 9240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9241 (exit $ac_status); } >/dev/null; then
9242 if test -s conftest.err; then
9243 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 9244 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
9245 else
9246 ac_cpp_err=
9247 fi
9248else
9249 ac_cpp_err=yes
9250fi
9251if test -z "$ac_cpp_err"; then
c0d27fcc 9252 ac_header_preproc=yes
98418dba
CW
9253else
9254 echo "$as_me: failed program was:" >&5
19650fd6
AS
9255sed 's/^/| /' conftest.$ac_ext >&5
9256
c0d27fcc 9257 ac_header_preproc=no
98418dba
CW
9258fi
9259rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
9260echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9261echo "${ECHO_T}$ac_header_preproc" >&6
9262
9263# So? What about this header?
edfaf76d
LK
9264case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9265 yes:no: )
c0d27fcc
MR
9266 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9267echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
9268 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9269echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9270 ac_header_preproc=yes
9271 ;;
9272 no:yes:* )
9273 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9274echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9275 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
9276echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
9277 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9278echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9279 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
9280echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
7c9e5167
JD
9281 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9282echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
9283 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9284echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
7c9e5167
JD
9285 (
9286 cat <<\_ASBOX
edfaf76d
LK
9287## ------------------------------------------ ##
9288## Report this to the AC_PACKAGE_NAME lists. ##
9289## ------------------------------------------ ##
19650fd6
AS
9290_ASBOX
9291 ) |
9292 sed "s/^/$as_me: WARNING: /" >&2
9293 ;;
c0d27fcc
MR
9294esac
9295echo "$as_me:$LINENO: checking for $ac_header" >&5
9296echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9297if eval "test \"\${$as_ac_Header+set}\" = set"; then
9298 echo $ECHO_N "(cached) $ECHO_C" >&6
9299else
edfaf76d 9300 eval "$as_ac_Header=\$ac_header_preproc"
98418dba 9301fi
c0d27fcc 9302echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 9303echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
9304
9305fi
98418dba 9306if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 9307 cat >>confdefs.h <<_ACEOF
98418dba 9308#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 9309_ACEOF
98418dba
CW
9310
9311fi
c0d27fcc 9312
98418dba
CW
9313done
9314
c0d27fcc 9315
98418dba
CW
9316for ac_func in getpagesize
9317do
9318as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 9319echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
9320echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9321if eval "test \"\${$as_ac_var+set}\" = set"; then
9322 echo $ECHO_N "(cached) $ECHO_C" >&6
9323else
9324 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9325/* confdefs.h. */
9326_ACEOF
9327cat confdefs.h >>conftest.$ac_ext
9328cat >>conftest.$ac_ext <<_ACEOF
9329/* end confdefs.h. */
edfaf76d
LK
9330/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9331 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9332#define $ac_func innocuous_$ac_func
9333
98418dba 9334/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
9335 which can conflict with char $ac_func (); below.
9336 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9337 <limits.h> exists even on freestanding compilers. */
edfaf76d 9338
19650fd6
AS
9339#ifdef __STDC__
9340# include <limits.h>
9341#else
9342# include <assert.h>
9343#endif
edfaf76d
LK
9344
9345#undef $ac_func
9346
98418dba
CW
9347/* Override any gcc2 internal prototype to avoid an error. */
9348#ifdef __cplusplus
9349extern "C"
19650fd6 9350{
98418dba
CW
9351#endif
9352/* We use char because int might match the return type of a gcc2
9353 builtin and then its argument prototype would still apply. */
9354char $ac_func ();
98418dba
CW
9355/* The GNU C library defines this for functions which it implements
9356 to always fail with ENOSYS. Some functions are actually named
9357 something starting with __ and the normal name is an alias. */
9358#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9359choke me
9360#else
19650fd6
AS
9361char (*f) () = $ac_func;
9362#endif
9363#ifdef __cplusplus
9364}
98418dba
CW
9365#endif
9366
19650fd6
AS
9367int
9368main ()
9369{
9370return f != $ac_func;
98418dba
CW
9371 ;
9372 return 0;
9373}
9374_ACEOF
9375rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9376if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 9377 (eval $ac_link) 2>conftest.er1
98418dba 9378 ac_status=$?
edfaf76d
LK
9379 grep -v '^ *+' conftest.er1 >conftest.err
9380 rm -f conftest.er1
9381 cat conftest.err >&5
c0d27fcc 9382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9383 (exit $ac_status); } &&
ec8fcb10
YM
9384 { ac_try='test -z "$ac_c_werror_flag"
9385 || test ! -s conftest.err'
edfaf76d
LK
9386 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9387 (eval $ac_try) 2>&5
9388 ac_status=$?
9389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9390 (exit $ac_status); }; } &&
9391 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9392 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9393 (eval $ac_try) 2>&5
9394 ac_status=$?
c0d27fcc 9395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9396 (exit $ac_status); }; }; then
9397 eval "$as_ac_var=yes"
9398else
9399 echo "$as_me: failed program was:" >&5
19650fd6
AS
9400sed 's/^/| /' conftest.$ac_ext >&5
9401
98418dba
CW
9402eval "$as_ac_var=no"
9403fi
edfaf76d
LK
9404rm -f conftest.err conftest.$ac_objext \
9405 conftest$ac_exeext conftest.$ac_ext
98418dba 9406fi
c0d27fcc 9407echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
9408echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9409if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 9410 cat >>confdefs.h <<_ACEOF
98418dba 9411#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 9412_ACEOF
98418dba
CW
9413
9414fi
9415done
9416
c0d27fcc 9417echo "$as_me:$LINENO: checking for working mmap" >&5
98418dba
CW
9418echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
9419if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
9420 echo $ECHO_N "(cached) $ECHO_C" >&6
9421else
9422 if test "$cross_compiling" = yes; then
9423 ac_cv_func_mmap_fixed_mapped=no
9424else
9425 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9426/* confdefs.h. */
9427_ACEOF
9428cat confdefs.h >>conftest.$ac_ext
9429cat >>conftest.$ac_ext <<_ACEOF
9430/* end confdefs.h. */
98418dba 9431$ac_includes_default
c0d27fcc
MR
9432/* malloc might have been renamed as rpl_malloc. */
9433#undef malloc
9434
98418dba
CW
9435/* Thanks to Mike Haertel and Jim Avera for this test.
9436 Here is a matrix of mmap possibilities:
9437 mmap private not fixed
9438 mmap private fixed at somewhere currently unmapped
9439 mmap private fixed at somewhere already mapped
9440 mmap shared not fixed
9441 mmap shared fixed at somewhere currently unmapped
9442 mmap shared fixed at somewhere already mapped
9443 For private mappings, we should verify that changes cannot be read()
9444 back from the file, nor mmap's back from the file at a different
9445 address. (There have been systems where private was not correctly
9446 implemented like the infamous i386 svr4.0, and systems where the
9447 VM page cache was not coherent with the file system buffer cache
9448 like early versions of FreeBSD and possibly contemporary NetBSD.)
9449 For shared mappings, we should conversely verify that changes get
c0d27fcc 9450 propagated back to all the places they're supposed to be.
98418dba
CW
9451
9452 Grep wants private fixed already mapped.
9453 The main things grep needs to know about mmap are:
9454 * does it exist and is it safe to write into the mmap'd area
9455 * how to use it (BSD variants) */
9456
9457#include <fcntl.h>
9458#include <sys/mman.h>
9459
9460#if !STDC_HEADERS && !HAVE_STDLIB_H
9461char *malloc ();
9462#endif
9463
9464/* This mess was copied from the GNU getpagesize.h. */
9465#if !HAVE_GETPAGESIZE
9466/* Assume that all systems that can run configure have sys/param.h. */
9467# if !HAVE_SYS_PARAM_H
9468# define HAVE_SYS_PARAM_H 1
9469# endif
9470
9471# ifdef _SC_PAGESIZE
9472# define getpagesize() sysconf(_SC_PAGESIZE)
9473# else /* no _SC_PAGESIZE */
9474# if HAVE_SYS_PARAM_H
9475# include <sys/param.h>
9476# ifdef EXEC_PAGESIZE
9477# define getpagesize() EXEC_PAGESIZE
9478# else /* no EXEC_PAGESIZE */
9479# ifdef NBPG
9480# define getpagesize() NBPG * CLSIZE
9481# ifndef CLSIZE
9482# define CLSIZE 1
9483# endif /* no CLSIZE */
9484# else /* no NBPG */
9485# ifdef NBPC
9486# define getpagesize() NBPC
9487# else /* no NBPC */
9488# ifdef PAGESIZE
9489# define getpagesize() PAGESIZE
9490# endif /* PAGESIZE */
9491# endif /* no NBPC */
9492# endif /* no NBPG */
9493# endif /* no EXEC_PAGESIZE */
9494# else /* no HAVE_SYS_PARAM_H */
9495# define getpagesize() 8192 /* punt totally */
9496# endif /* no HAVE_SYS_PARAM_H */
9497# endif /* no _SC_PAGESIZE */
9498
9499#endif /* no HAVE_GETPAGESIZE */
9500
9501int
9502main ()
9503{
9504 char *data, *data2, *data3;
9505 int i, pagesize;
9506 int fd;
9507
9508 pagesize = getpagesize ();
9509
9510 /* First, make a file with some known garbage in it. */
9511 data = (char *) malloc (pagesize);
9512 if (!data)
9513 exit (1);
9514 for (i = 0; i < pagesize; ++i)
9515 *(data + i) = rand ();
9516 umask (0);
9517 fd = creat ("conftest.mmap", 0600);
9518 if (fd < 0)
9519 exit (1);
9520 if (write (fd, data, pagesize) != pagesize)
9521 exit (1);
9522 close (fd);
9523
9524 /* Next, try to mmap the file at a fixed address which already has
9525 something else allocated at it. If we can, also make sure that
9526 we see the same garbage. */
9527 fd = open ("conftest.mmap", O_RDWR);
9528 if (fd < 0)
9529 exit (1);
9530 data2 = (char *) malloc (2 * pagesize);
9531 if (!data2)
9532 exit (1);
edfaf76d 9533 data2 += (pagesize - ((long) data2 & (pagesize - 1))) & (pagesize - 1);
98418dba 9534 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
edfaf76d 9535 MAP_PRIVATE | MAP_FIXED, fd, 0L))
98418dba
CW
9536 exit (1);
9537 for (i = 0; i < pagesize; ++i)
9538 if (*(data + i) != *(data2 + i))
9539 exit (1);
9540
9541 /* Finally, make sure that changes to the mapped area do not
9542 percolate back to the file as seen by read(). (This is a bug on
9543 some variants of i386 svr4.0.) */
9544 for (i = 0; i < pagesize; ++i)
9545 *(data2 + i) = *(data2 + i) + 1;
9546 data3 = (char *) malloc (pagesize);
9547 if (!data3)
9548 exit (1);
9549 if (read (fd, data3, pagesize) != pagesize)
9550 exit (1);
9551 for (i = 0; i < pagesize; ++i)
9552 if (*(data + i) != *(data3 + i))
9553 exit (1);
9554 close (fd);
9555 exit (0);
9556}
9557_ACEOF
9558rm -f conftest$ac_exeext
c0d27fcc 9559if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
9560 (eval $ac_link) 2>&5
9561 ac_status=$?
c0d27fcc 9562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9563 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 9564 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9565 (eval $ac_try) 2>&5
9566 ac_status=$?
c0d27fcc 9567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9568 (exit $ac_status); }; }; then
9569 ac_cv_func_mmap_fixed_mapped=yes
9570else
9571 echo "$as_me: program exited with status $ac_status" >&5
9572echo "$as_me: failed program was:" >&5
19650fd6
AS
9573sed 's/^/| /' conftest.$ac_ext >&5
9574
c0d27fcc 9575( exit $ac_status )
98418dba
CW
9576ac_cv_func_mmap_fixed_mapped=no
9577fi
edfaf76d 9578rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
98418dba
CW
9579fi
9580fi
c0d27fcc 9581echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
98418dba
CW
9582echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
9583if test $ac_cv_func_mmap_fixed_mapped = yes; then
9584
c0d27fcc 9585cat >>confdefs.h <<\_ACEOF
98418dba 9586#define HAVE_MMAP 1
c0d27fcc 9587_ACEOF
98418dba
CW
9588
9589fi
9590rm -f conftest.mmap
9591
9592if test $use_mmap_for_buffers = yes; then
9593 REL_ALLOC=no
9594fi
9595
9596LIBS="$libsrc_libs $LIBS"
9597
c0d27fcc
MR
9598
9599echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
98418dba
CW
9600echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
9601if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
9602 echo $ECHO_N "(cached) $ECHO_C" >&6
9603else
9604 ac_check_lib_save_LIBS=$LIBS
9605LIBS="-ldnet $LIBS"
9606cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9607/* confdefs.h. */
9608_ACEOF
9609cat confdefs.h >>conftest.$ac_ext
9610cat >>conftest.$ac_ext <<_ACEOF
9611/* end confdefs.h. */
98418dba
CW
9612
9613/* Override any gcc2 internal prototype to avoid an error. */
9614#ifdef __cplusplus
9615extern "C"
9616#endif
9617/* We use char because int might match the return type of a gcc2
9618 builtin and then its argument prototype would still apply. */
9619char dnet_ntoa ();
98418dba
CW
9620int
9621main ()
9622{
9623dnet_ntoa ();
9624 ;
9625 return 0;
9626}
9627_ACEOF
9628rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9629if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 9630 (eval $ac_link) 2>conftest.er1
98418dba 9631 ac_status=$?
edfaf76d
LK
9632 grep -v '^ *+' conftest.er1 >conftest.err
9633 rm -f conftest.er1
9634 cat conftest.err >&5
c0d27fcc 9635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9636 (exit $ac_status); } &&
ec8fcb10
YM
9637 { ac_try='test -z "$ac_c_werror_flag"
9638 || test ! -s conftest.err'
edfaf76d
LK
9639 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9640 (eval $ac_try) 2>&5
9641 ac_status=$?
9642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9643 (exit $ac_status); }; } &&
9644 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9645 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9646 (eval $ac_try) 2>&5
9647 ac_status=$?
c0d27fcc 9648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9649 (exit $ac_status); }; }; then
9650 ac_cv_lib_dnet_dnet_ntoa=yes
9651else
9652 echo "$as_me: failed program was:" >&5
19650fd6
AS
9653sed 's/^/| /' conftest.$ac_ext >&5
9654
98418dba
CW
9655ac_cv_lib_dnet_dnet_ntoa=no
9656fi
edfaf76d
LK
9657rm -f conftest.err conftest.$ac_objext \
9658 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9659LIBS=$ac_check_lib_save_LIBS
9660fi
c0d27fcc 9661echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
98418dba
CW
9662echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
9663if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
c0d27fcc 9664 cat >>confdefs.h <<_ACEOF
98418dba 9665#define HAVE_LIBDNET 1
c0d27fcc 9666_ACEOF
98418dba
CW
9667
9668 LIBS="-ldnet $LIBS"
9669
9670fi
9671
c0d27fcc
MR
9672
9673echo "$as_me:$LINENO: checking for main in -lXbsd" >&5
98418dba
CW
9674echo $ECHO_N "checking for main in -lXbsd... $ECHO_C" >&6
9675if test "${ac_cv_lib_Xbsd_main+set}" = set; then
9676 echo $ECHO_N "(cached) $ECHO_C" >&6
9677else
9678 ac_check_lib_save_LIBS=$LIBS
9679LIBS="-lXbsd $LIBS"
9680cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9681/* confdefs.h. */
9682_ACEOF
9683cat confdefs.h >>conftest.$ac_ext
9684cat >>conftest.$ac_ext <<_ACEOF
9685/* end confdefs.h. */
98418dba 9686
c0d27fcc 9687
98418dba
CW
9688int
9689main ()
9690{
9691main ();
9692 ;
9693 return 0;
9694}
9695_ACEOF
9696rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9697if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 9698 (eval $ac_link) 2>conftest.er1
98418dba 9699 ac_status=$?
edfaf76d
LK
9700 grep -v '^ *+' conftest.er1 >conftest.err
9701 rm -f conftest.er1
9702 cat conftest.err >&5
c0d27fcc 9703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9704 (exit $ac_status); } &&
ec8fcb10
YM
9705 { ac_try='test -z "$ac_c_werror_flag"
9706 || test ! -s conftest.err'
edfaf76d
LK
9707 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9708 (eval $ac_try) 2>&5
9709 ac_status=$?
9710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9711 (exit $ac_status); }; } &&
9712 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9713 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9714 (eval $ac_try) 2>&5
9715 ac_status=$?
c0d27fcc 9716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9717 (exit $ac_status); }; }; then
9718 ac_cv_lib_Xbsd_main=yes
9719else
9720 echo "$as_me: failed program was:" >&5
19650fd6
AS
9721sed 's/^/| /' conftest.$ac_ext >&5
9722
98418dba
CW
9723ac_cv_lib_Xbsd_main=no
9724fi
edfaf76d
LK
9725rm -f conftest.err conftest.$ac_objext \
9726 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9727LIBS=$ac_check_lib_save_LIBS
9728fi
c0d27fcc 9729echo "$as_me:$LINENO: result: $ac_cv_lib_Xbsd_main" >&5
98418dba
CW
9730echo "${ECHO_T}$ac_cv_lib_Xbsd_main" >&6
9731if test $ac_cv_lib_Xbsd_main = yes; then
9732 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
9733fi
9734
c0d27fcc
MR
9735
9736
9737echo "$as_me:$LINENO: checking for cma_open in -lpthreads" >&5
98418dba
CW
9738echo $ECHO_N "checking for cma_open in -lpthreads... $ECHO_C" >&6
9739if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then
9740 echo $ECHO_N "(cached) $ECHO_C" >&6
9741else
9742 ac_check_lib_save_LIBS=$LIBS
9743LIBS="-lpthreads $LIBS"
9744cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9745/* confdefs.h. */
9746_ACEOF
9747cat confdefs.h >>conftest.$ac_ext
9748cat >>conftest.$ac_ext <<_ACEOF
9749/* end confdefs.h. */
98418dba
CW
9750
9751/* Override any gcc2 internal prototype to avoid an error. */
9752#ifdef __cplusplus
9753extern "C"
9754#endif
9755/* We use char because int might match the return type of a gcc2
9756 builtin and then its argument prototype would still apply. */
9757char cma_open ();
98418dba
CW
9758int
9759main ()
9760{
9761cma_open ();
9762 ;
9763 return 0;
9764}
9765_ACEOF
9766rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9767if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 9768 (eval $ac_link) 2>conftest.er1
98418dba 9769 ac_status=$?
edfaf76d
LK
9770 grep -v '^ *+' conftest.er1 >conftest.err
9771 rm -f conftest.er1
9772 cat conftest.err >&5
c0d27fcc 9773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9774 (exit $ac_status); } &&
ec8fcb10
YM
9775 { ac_try='test -z "$ac_c_werror_flag"
9776 || test ! -s conftest.err'
edfaf76d
LK
9777 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9778 (eval $ac_try) 2>&5
9779 ac_status=$?
9780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9781 (exit $ac_status); }; } &&
9782 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9783 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9784 (eval $ac_try) 2>&5
9785 ac_status=$?
c0d27fcc 9786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9787 (exit $ac_status); }; }; then
9788 ac_cv_lib_pthreads_cma_open=yes
9789else
9790 echo "$as_me: failed program was:" >&5
19650fd6
AS
9791sed 's/^/| /' conftest.$ac_ext >&5
9792
98418dba
CW
9793ac_cv_lib_pthreads_cma_open=no
9794fi
edfaf76d
LK
9795rm -f conftest.err conftest.$ac_objext \
9796 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9797LIBS=$ac_check_lib_save_LIBS
9798fi
c0d27fcc 9799echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_cma_open" >&5
98418dba
CW
9800echo "${ECHO_T}$ac_cv_lib_pthreads_cma_open" >&6
9801if test $ac_cv_lib_pthreads_cma_open = yes; then
c0d27fcc 9802 cat >>confdefs.h <<_ACEOF
98418dba 9803#define HAVE_LIBPTHREADS 1
c0d27fcc 9804_ACEOF
98418dba
CW
9805
9806 LIBS="-lpthreads $LIBS"
9807
9808fi
9809
c0d27fcc
MR
9810
9811echo "$as_me:$LINENO: checking for XFree86 in /usr/X386" >&5
98418dba
CW
9812echo $ECHO_N "checking for XFree86 in /usr/X386... $ECHO_C" >&6
9813if test -d /usr/X386/include; then
9814 HAVE_XFREE386=yes
9815 : ${C_SWITCH_X_SITE="-I/usr/X386/include"}
9816else
9817 HAVE_XFREE386=no
9818fi
c0d27fcc 9819echo "$as_me:$LINENO: result: $HAVE_XFREE386" >&5
98418dba
CW
9820echo "${ECHO_T}$HAVE_XFREE386" >&6
9821
55597d70
DL
9822
9823case ${host_os} in
9824aix*)
9825 echo "$as_me:$LINENO: checking for -bbigtoc option" >&5
9826echo $ECHO_N "checking for -bbigtoc option... $ECHO_C" >&6
9827if test "${gdb_cv_bigtoc+set}" = set; then
9828 echo $ECHO_N "(cached) $ECHO_C" >&6
9829else
9830
9831 case $GCC in
9832 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
9833 *) gdb_cv_bigtoc=-bbigtoc ;;
9834 esac
9835
9836 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
9837 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9838/* confdefs.h. */
9839_ACEOF
9840cat confdefs.h >>conftest.$ac_ext
9841cat >>conftest.$ac_ext <<_ACEOF
9842/* end confdefs.h. */
55597d70
DL
9843
9844int
9845main ()
9846{
9847int i;
9848 ;
9849 return 0;
9850}
9851_ACEOF
9852rm -f conftest.$ac_objext conftest$ac_exeext
9853if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 9854 (eval $ac_link) 2>conftest.er1
55597d70 9855 ac_status=$?
edfaf76d
LK
9856 grep -v '^ *+' conftest.er1 >conftest.err
9857 rm -f conftest.er1
9858 cat conftest.err >&5
55597d70
DL
9859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9860 (exit $ac_status); } &&
ec8fcb10
YM
9861 { ac_try='test -z "$ac_c_werror_flag"
9862 || test ! -s conftest.err'
edfaf76d
LK
9863 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9864 (eval $ac_try) 2>&5
9865 ac_status=$?
9866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9867 (exit $ac_status); }; } &&
9868 { ac_try='test -s conftest$ac_exeext'
55597d70
DL
9869 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9870 (eval $ac_try) 2>&5
9871 ac_status=$?
9872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9873 (exit $ac_status); }; }; then
9874 :
9875else
9876 echo "$as_me: failed program was:" >&5
19650fd6
AS
9877sed 's/^/| /' conftest.$ac_ext >&5
9878
55597d70
DL
9879gdb_cv_bigtoc=
9880fi
edfaf76d
LK
9881rm -f conftest.err conftest.$ac_objext \
9882 conftest$ac_exeext conftest.$ac_ext
55597d70
DL
9883
9884fi
9885echo "$as_me:$LINENO: result: $gdb_cv_bigtoc" >&5
9886echo "${ECHO_T}$gdb_cv_bigtoc" >&6
9887 ;;
9888esac
9889
ae1a998c
RS
9890# Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets
9891# used for the tests that follow. We set them back to REAL_CFLAGS and
9892# REAL_CPPFLAGS later on.
98418dba
CW
9893
9894REAL_CPPFLAGS="$CPPFLAGS"
9895
9896if test "${HAVE_X11}" = "yes"; then
9897 DEFS="$C_SWITCH_X_SITE $DEFS"
9898 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
9899 LIBS="$LIBX $LIBS"
9900 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
9901 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
9902
9903 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
9904 # This is handled by LD_SWITCH_X_SITE_AUX during the real build,
9905 # but it's more convenient here to set LD_RUN_PATH
9906 # since this also works on hosts that don't understand LD_SWITCH_X_SITE_AUX.
9907 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
9908 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
9909 export LD_RUN_PATH
9910 fi
9911
9912 if test "${opsys}" = "gnu-linux"; then
c0d27fcc 9913 echo "$as_me:$LINENO: checking whether X on GNU/Linux needs -b to link" >&5
98418dba
CW
9914echo $ECHO_N "checking whether X on GNU/Linux needs -b to link... $ECHO_C" >&6
9915 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9916/* confdefs.h. */
9917_ACEOF
9918cat confdefs.h >>conftest.$ac_ext
9919cat >>conftest.$ac_ext <<_ACEOF
9920/* end confdefs.h. */
98418dba 9921
98418dba
CW
9922int
9923main ()
9924{
9925XOpenDisplay ("foo");
9926 ;
9927 return 0;
9928}
9929_ACEOF
9930rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9931if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 9932 (eval $ac_link) 2>conftest.er1
98418dba 9933 ac_status=$?
edfaf76d
LK
9934 grep -v '^ *+' conftest.er1 >conftest.err
9935 rm -f conftest.er1
9936 cat conftest.err >&5
c0d27fcc 9937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9938 (exit $ac_status); } &&
ec8fcb10
YM
9939 { ac_try='test -z "$ac_c_werror_flag"
9940 || test ! -s conftest.err'
edfaf76d
LK
9941 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9942 (eval $ac_try) 2>&5
9943 ac_status=$?
9944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9945 (exit $ac_status); }; } &&
9946 { ac_try='test -s conftest$ac_exeext'
35996d22
AS
9947 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9948 (eval $ac_try) 2>&5
9949 ac_status=$?
9950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9951 (exit $ac_status); }; }; then
9952 xlinux_first_failure=no
98418dba
CW
9953else
9954 echo "$as_me: failed program was:" >&5
19650fd6
AS
9955sed 's/^/| /' conftest.$ac_ext >&5
9956
98418dba
CW
9957xlinux_first_failure=yes
9958fi
edfaf76d
LK
9959rm -f conftest.err conftest.$ac_objext \
9960 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9961 if test "${xlinux_first_failure}" = "yes"; then
9962 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
9963 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
9964 OLD_CPPFLAGS="$CPPFLAGS"
9965 OLD_LIBS="$LIBS"
9966 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
9967 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
9968 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
9969 LIBS="$LIBS -b i486-linuxaout"
9970 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9971/* confdefs.h. */
9972_ACEOF
9973cat confdefs.h >>conftest.$ac_ext
9974cat >>conftest.$ac_ext <<_ACEOF
9975/* end confdefs.h. */
98418dba 9976
98418dba
CW
9977int
9978main ()
9979{
9980XOpenDisplay ("foo");
9981 ;
9982 return 0;
9983}
9984_ACEOF
9985rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9986if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 9987 (eval $ac_link) 2>conftest.er1
98418dba 9988 ac_status=$?
edfaf76d
LK
9989 grep -v '^ *+' conftest.er1 >conftest.err
9990 rm -f conftest.er1
9991 cat conftest.err >&5
c0d27fcc 9992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9993 (exit $ac_status); } &&
ec8fcb10
YM
9994 { ac_try='test -z "$ac_c_werror_flag"
9995 || test ! -s conftest.err'
edfaf76d
LK
9996 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9997 (eval $ac_try) 2>&5
9998 ac_status=$?
9999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10000 (exit $ac_status); }; } &&
10001 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10002 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
10003 (eval $ac_try) 2>&5
10004 ac_status=$?
c0d27fcc 10005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10006 (exit $ac_status); }; }; then
10007 xlinux_second_failure=no
10008else
10009 echo "$as_me: failed program was:" >&5
19650fd6
AS
10010sed 's/^/| /' conftest.$ac_ext >&5
10011
98418dba
CW
10012xlinux_second_failure=yes
10013fi
edfaf76d
LK
10014rm -f conftest.err conftest.$ac_objext \
10015 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10016 if test "${xlinux_second_failure}" = "yes"; then
10017 # If we get the same failure with -b, there is no use adding -b.
10018 # So take it out. This plays safe.
10019 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
10020 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
10021 CPPFLAGS="$OLD_CPPFLAGS"
10022 LIBS="$OLD_LIBS"
c0d27fcc 10023 echo "$as_me:$LINENO: result: no" >&5
98418dba
CW
10024echo "${ECHO_T}no" >&6
10025 else
c0d27fcc 10026 echo "$as_me:$LINENO: result: yes" >&5
98418dba
CW
10027echo "${ECHO_T}yes" >&6
10028 fi
10029 else
c0d27fcc 10030 echo "$as_me:$LINENO: result: no" >&5
98418dba
CW
10031echo "${ECHO_T}no" >&6
10032 fi
10033 fi
10034
10035 # Reportedly, some broken Solaris systems have XKBlib.h but are missing
10036 # header files included from there.
c0d27fcc 10037 echo "$as_me:$LINENO: checking for Xkb" >&5
98418dba
CW
10038echo $ECHO_N "checking for Xkb... $ECHO_C" >&6
10039 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10040/* confdefs.h. */
10041_ACEOF
10042cat confdefs.h >>conftest.$ac_ext
10043cat >>conftest.$ac_ext <<_ACEOF
10044/* end confdefs.h. */
98418dba
CW
10045#include <X11/Xlib.h>
10046#include <X11/XKBlib.h>
98418dba
CW
10047int
10048main ()
10049{
10050XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);
10051 ;
10052 return 0;
10053}
10054_ACEOF
10055rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10056if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 10057 (eval $ac_link) 2>conftest.er1
98418dba 10058 ac_status=$?
edfaf76d
LK
10059 grep -v '^ *+' conftest.er1 >conftest.err
10060 rm -f conftest.er1
10061 cat conftest.err >&5
c0d27fcc 10062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10063 (exit $ac_status); } &&
ec8fcb10
YM
10064 { ac_try='test -z "$ac_c_werror_flag"
10065 || test ! -s conftest.err'
edfaf76d
LK
10066 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10067 (eval $ac_try) 2>&5
10068 ac_status=$?
10069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10070 (exit $ac_status); }; } &&
10071 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10072 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
10073 (eval $ac_try) 2>&5
10074 ac_status=$?
c0d27fcc 10075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10076 (exit $ac_status); }; }; then
10077 emacs_xkb=yes
10078else
10079 echo "$as_me: failed program was:" >&5
19650fd6
AS
10080sed 's/^/| /' conftest.$ac_ext >&5
10081
98418dba
CW
10082emacs_xkb=no
10083fi
edfaf76d
LK
10084rm -f conftest.err conftest.$ac_objext \
10085 conftest$ac_exeext conftest.$ac_ext
c0d27fcc 10086 echo "$as_me:$LINENO: result: $emacs_xkb" >&5
98418dba
CW
10087echo "${ECHO_T}$emacs_xkb" >&6
10088 if test $emacs_xkb = yes; then
b936fae4 10089
c0d27fcc 10090cat >>confdefs.h <<\_ACEOF
98418dba 10091#define HAVE_XKBGETKEYBOARD 1
c0d27fcc 10092_ACEOF
98418dba
CW
10093
10094 fi
10095
c0d27fcc
MR
10096
10097
10098
10099
98418dba
CW
10100for ac_func in XrmSetDatabase XScreenResourceString \
10101XScreenNumberOfScreen XSetWMProtocols
10102do
10103as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 10104echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
10105echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10106if eval "test \"\${$as_ac_var+set}\" = set"; then
10107 echo $ECHO_N "(cached) $ECHO_C" >&6
10108else
10109 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10110/* confdefs.h. */
10111_ACEOF
10112cat confdefs.h >>conftest.$ac_ext
10113cat >>conftest.$ac_ext <<_ACEOF
10114/* end confdefs.h. */
edfaf76d
LK
10115/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10116 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10117#define $ac_func innocuous_$ac_func
10118
98418dba 10119/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
10120 which can conflict with char $ac_func (); below.
10121 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10122 <limits.h> exists even on freestanding compilers. */
edfaf76d 10123
19650fd6
AS
10124#ifdef __STDC__
10125# include <limits.h>
10126#else
10127# include <assert.h>
10128#endif
edfaf76d
LK
10129
10130#undef $ac_func
10131
98418dba
CW
10132/* Override any gcc2 internal prototype to avoid an error. */
10133#ifdef __cplusplus
10134extern "C"
19650fd6 10135{
98418dba
CW
10136#endif
10137/* We use char because int might match the return type of a gcc2
10138 builtin and then its argument prototype would still apply. */
10139char $ac_func ();
98418dba
CW
10140/* The GNU C library defines this for functions which it implements
10141 to always fail with ENOSYS. Some functions are actually named
10142 something starting with __ and the normal name is an alias. */
10143#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10144choke me
10145#else
19650fd6
AS
10146char (*f) () = $ac_func;
10147#endif
10148#ifdef __cplusplus
10149}
98418dba
CW
10150#endif
10151
19650fd6
AS
10152int
10153main ()
10154{
10155return f != $ac_func;
98418dba
CW
10156 ;
10157 return 0;
10158}
10159_ACEOF
10160rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10161if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 10162 (eval $ac_link) 2>conftest.er1
98418dba 10163 ac_status=$?
edfaf76d
LK
10164 grep -v '^ *+' conftest.er1 >conftest.err
10165 rm -f conftest.er1
10166 cat conftest.err >&5
c0d27fcc 10167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10168 (exit $ac_status); } &&
ec8fcb10
YM
10169 { ac_try='test -z "$ac_c_werror_flag"
10170 || test ! -s conftest.err'
edfaf76d
LK
10171 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10172 (eval $ac_try) 2>&5
10173 ac_status=$?
10174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10175 (exit $ac_status); }; } &&
10176 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10177 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
10178 (eval $ac_try) 2>&5
10179 ac_status=$?
c0d27fcc 10180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10181 (exit $ac_status); }; }; then
10182 eval "$as_ac_var=yes"
10183else
10184 echo "$as_me: failed program was:" >&5
19650fd6
AS
10185sed 's/^/| /' conftest.$ac_ext >&5
10186
98418dba
CW
10187eval "$as_ac_var=no"
10188fi
edfaf76d
LK
10189rm -f conftest.err conftest.$ac_objext \
10190 conftest$ac_exeext conftest.$ac_ext
98418dba 10191fi
c0d27fcc 10192echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
10193echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10194if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 10195 cat >>confdefs.h <<_ACEOF
98418dba 10196#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 10197_ACEOF
98418dba
CW
10198
10199fi
10200done
10201
10202fi
10203
10204if test "${window_system}" = "x11"; then
c0d27fcc 10205 echo "$as_me:$LINENO: checking X11 version 6" >&5
98418dba
CW
10206echo $ECHO_N "checking X11 version 6... $ECHO_C" >&6
10207 if test "${emacs_cv_x11_version_6+set}" = set; then
10208 echo $ECHO_N "(cached) $ECHO_C" >&6
10209else
10210 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10211/* confdefs.h. */
10212_ACEOF
10213cat confdefs.h >>conftest.$ac_ext
10214cat >>conftest.$ac_ext <<_ACEOF
10215/* end confdefs.h. */
98418dba 10216#include <X11/Xlib.h>
98418dba
CW
10217int
10218main ()
10219{
10220#if XlibSpecificationRelease < 6
10221fail;
10222#endif
10223
10224 ;
10225 return 0;
10226}
10227_ACEOF
10228rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10229if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 10230 (eval $ac_link) 2>conftest.er1
98418dba 10231 ac_status=$?
edfaf76d
LK
10232 grep -v '^ *+' conftest.er1 >conftest.err
10233 rm -f conftest.er1
10234 cat conftest.err >&5
c0d27fcc 10235 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10236 (exit $ac_status); } &&
ec8fcb10
YM
10237 { ac_try='test -z "$ac_c_werror_flag"
10238 || test ! -s conftest.err'
edfaf76d
LK
10239 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10240 (eval $ac_try) 2>&5
10241 ac_status=$?
10242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10243 (exit $ac_status); }; } &&
10244 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10245 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
10246 (eval $ac_try) 2>&5
10247 ac_status=$?
c0d27fcc 10248 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10249 (exit $ac_status); }; }; then
10250 emacs_cv_x11_version_6=yes
10251else
10252 echo "$as_me: failed program was:" >&5
19650fd6
AS
10253sed 's/^/| /' conftest.$ac_ext >&5
10254
98418dba
CW
10255emacs_cv_x11_version_6=no
10256fi
edfaf76d
LK
10257rm -f conftest.err conftest.$ac_objext \
10258 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10259fi
10260
10261 if test $emacs_cv_x11_version_6 = yes; then
c0d27fcc 10262 echo "$as_me:$LINENO: result: 6 or newer" >&5
98418dba 10263echo "${ECHO_T}6 or newer" >&6
b936fae4 10264
c0d27fcc 10265cat >>confdefs.h <<\_ACEOF
98418dba 10266#define HAVE_X11R6 1
c0d27fcc 10267_ACEOF
98418dba
CW
10268
10269 else
c0d27fcc 10270 echo "$as_me:$LINENO: result: before 6" >&5
98418dba
CW
10271echo "${ECHO_T}before 6" >&6
10272 fi
10273fi
10274
10275if test "${window_system}" = "x11"; then
c0d27fcc 10276 echo "$as_me:$LINENO: checking X11 version 5" >&5
98418dba
CW
10277echo $ECHO_N "checking X11 version 5... $ECHO_C" >&6
10278 if test "${emacs_cv_x11_version_5+set}" = set; then
10279 echo $ECHO_N "(cached) $ECHO_C" >&6
10280else
10281 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10282/* confdefs.h. */
10283_ACEOF
10284cat confdefs.h >>conftest.$ac_ext
10285cat >>conftest.$ac_ext <<_ACEOF
10286/* end confdefs.h. */
98418dba 10287#include <X11/Xlib.h>
98418dba
CW
10288int
10289main ()
10290{
10291#if XlibSpecificationRelease < 5
10292fail;
10293#endif
10294
10295 ;
10296 return 0;
10297}
10298_ACEOF
10299rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10300if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 10301 (eval $ac_link) 2>conftest.er1
98418dba 10302 ac_status=$?
edfaf76d
LK
10303 grep -v '^ *+' conftest.er1 >conftest.err
10304 rm -f conftest.er1
10305 cat conftest.err >&5
c0d27fcc 10306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10307 (exit $ac_status); } &&
ec8fcb10
YM
10308 { ac_try='test -z "$ac_c_werror_flag"
10309 || test ! -s conftest.err'
edfaf76d
LK
10310 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10311 (eval $ac_try) 2>&5
10312 ac_status=$?
10313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10314 (exit $ac_status); }; } &&
10315 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10316 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
10317 (eval $ac_try) 2>&5
10318 ac_status=$?
c0d27fcc 10319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10320 (exit $ac_status); }; }; then
10321 emacs_cv_x11_version_5=yes
10322else
10323 echo "$as_me: failed program was:" >&5
19650fd6
AS
10324sed 's/^/| /' conftest.$ac_ext >&5
10325
98418dba
CW
10326emacs_cv_x11_version_5=no
10327fi
edfaf76d
LK
10328rm -f conftest.err conftest.$ac_objext \
10329 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10330fi
10331
10332 if test $emacs_cv_x11_version_5 = yes; then
c0d27fcc 10333 echo "$as_me:$LINENO: result: 5 or newer" >&5
98418dba
CW
10334echo "${ECHO_T}5 or newer" >&6
10335 HAVE_X11R5=yes
b936fae4 10336
c0d27fcc 10337cat >>confdefs.h <<\_ACEOF
98418dba 10338#define HAVE_X11R5 1
c0d27fcc 10339_ACEOF
98418dba
CW
10340
10341 else
10342 HAVE_X11R5=no
c0d27fcc 10343 echo "$as_me:$LINENO: result: before 5" >&5
98418dba
CW
10344echo "${ECHO_T}before 5" >&6
10345 fi
10346fi
10347
488dd4c4
JD
10348HAVE_GTK=no
10349if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "gtk"; then
cd890796 10350 if test "$USE_X_TOOLKIT" != "none" && test "$USE_X_TOOLKIT" != "maybe"; then
488dd4c4
JD
10351 { { echo "$as_me:$LINENO: error: Conflicting options, --with-gtk is incompatible with --with-x-toolkit=${with_x_toolkit}" >&5
10352echo "$as_me: error: Conflicting options, --with-gtk is incompatible with --with-x-toolkit=${with_x_toolkit}" >&2;}
10353 { (exit 1); exit 1; }; };
10354 fi
448541bc
JD
10355 GLIB_REQUIRED=2.4
10356 GTK_REQUIRED=2.4
488dd4c4
JD
10357 GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
10358
10359 if test "X${with_pkg_config_prog}" != X; then
10360 PKG_CONFIG="${with_pkg_config_prog}"
10361 fi
10362
10363 succeeded=no
10364
10365 if test -z "$PKG_CONFIG"; then
10366 # Extract the first word of "pkg-config", so it can be a program name with args.
10367set dummy pkg-config; ac_word=$2
10368echo "$as_me:$LINENO: checking for $ac_word" >&5
10369echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10370if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
10371 echo $ECHO_N "(cached) $ECHO_C" >&6
10372else
10373 case $PKG_CONFIG in
10374 [\\/]* | ?:[\\/]*)
10375 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10376 ;;
10377 *)
10378 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10379for as_dir in $PATH
10380do
10381 IFS=$as_save_IFS
10382 test -z "$as_dir" && as_dir=.
10383 for ac_exec_ext in '' $ac_executable_extensions; do
10384 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10385 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10386 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
10387 break 2
10388 fi
10389done
10390done
10391
10392 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
10393 ;;
10394esac
10395fi
10396PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10397
10398if test -n "$PKG_CONFIG"; then
10399 echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
10400echo "${ECHO_T}$PKG_CONFIG" >&6
10401else
10402 echo "$as_me:$LINENO: result: no" >&5
10403echo "${ECHO_T}no" >&6
10404fi
10405
10406 fi
10407
10408 if test "$PKG_CONFIG" = "no" ; then
439f58ee
JD
10409 { { echo "$as_me:$LINENO: error:
10410 *** The pkg-config script could not be found. Make sure it is in your path, or give the full path to pkg-config with the PKG_CONFIG environment variable or --with-pkg-config-prog. Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." >&5
10411echo "$as_me: error:
10412 *** The pkg-config script could not be found. Make sure it is in your path, or give the full path to pkg-config with the PKG_CONFIG environment variable or --with-pkg-config-prog. Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." >&2;}
10413 { (exit 1); exit 1; }; }
488dd4c4
JD
10414 else
10415 PKG_CONFIG_MIN_VERSION=0.9.0
10416 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
10417 echo "$as_me:$LINENO: checking for $GTK_MODULES" >&5
10418echo $ECHO_N "checking for $GTK_MODULES... $ECHO_C" >&6
10419
67db6aa2 10420 if $PKG_CONFIG --exists "$GTK_MODULES" 2>&5; then
488dd4c4
JD
10421 echo "$as_me:$LINENO: result: yes" >&5
10422echo "${ECHO_T}yes" >&6
10423 succeeded=yes
10424
10425 echo "$as_me:$LINENO: checking GTK_CFLAGS" >&5
10426echo $ECHO_N "checking GTK_CFLAGS... $ECHO_C" >&6
10427 GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES"`
10428 echo "$as_me:$LINENO: result: $GTK_CFLAGS" >&5
10429echo "${ECHO_T}$GTK_CFLAGS" >&6
10430
10431 echo "$as_me:$LINENO: checking GTK_LIBS" >&5
10432echo $ECHO_N "checking GTK_LIBS... $ECHO_C" >&6
10433 GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES"`
10434 echo "$as_me:$LINENO: result: $GTK_LIBS" >&5
10435echo "${ECHO_T}$GTK_LIBS" >&6
10436 else
439f58ee
JD
10437 echo "$as_me:$LINENO: result: no" >&5
10438echo "${ECHO_T}no" >&6
488dd4c4
JD
10439 GTK_CFLAGS=""
10440 GTK_LIBS=""
10441 ## If we have a custom action on failure, don't print errors, but
10442 ## do set a variable so people can do so.
10443 GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"`
10444 echo $GTK_PKG_ERRORS
10445 fi
10446
10447
10448
10449 else
10450 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10451 echo "*** See http://www.freedesktop.org/software/pkgconfig"
10452 fi
10453 fi
10454
10455 if test $succeeded = yes; then
10456 :
10457 else
10458 { { 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
10459echo "$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;}
10460 { (exit 1); exit 1; }; }
10461 fi
10462
10463
10464
10465 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS"
57669b57
JD
10466 CFLAGS="$CFLAGS $GTK_CFLAGS"
10467 LIBS="$GTK_LIBS $LIBS"
488dd4c4
JD
10468 HAVE_GTK=yes
10469
10470cat >>confdefs.h <<\_ACEOF
10471#define HAVE_GTK 1
10472_ACEOF
10473
10474 USE_X_TOOLKIT=none
10475
d0a80c21
JD
10476 if test "$with_toolkit_scroll_bars" != no; then
10477 with_toolkit_scroll_bars=yes
10478 fi
57669b57
JD
10479
10480 HAVE_GTK_MULTIDISPLAY=no
10481
10482for ac_func in gdk_display_open
10483do
10484as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10485echo "$as_me:$LINENO: checking for $ac_func" >&5
10486echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10487if eval "test \"\${$as_ac_var+set}\" = set"; then
10488 echo $ECHO_N "(cached) $ECHO_C" >&6
10489else
10490 cat >conftest.$ac_ext <<_ACEOF
57669b57
JD
10491/* confdefs.h. */
10492_ACEOF
10493cat confdefs.h >>conftest.$ac_ext
10494cat >>conftest.$ac_ext <<_ACEOF
10495/* end confdefs.h. */
edfaf76d
LK
10496/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10497 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10498#define $ac_func innocuous_$ac_func
10499
57669b57
JD
10500/* System header to define __stub macros and hopefully few prototypes,
10501 which can conflict with char $ac_func (); below.
10502 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10503 <limits.h> exists even on freestanding compilers. */
edfaf76d 10504
57669b57
JD
10505#ifdef __STDC__
10506# include <limits.h>
10507#else
10508# include <assert.h>
10509#endif
edfaf76d
LK
10510
10511#undef $ac_func
10512
57669b57
JD
10513/* Override any gcc2 internal prototype to avoid an error. */
10514#ifdef __cplusplus
10515extern "C"
10516{
10517#endif
10518/* We use char because int might match the return type of a gcc2
10519 builtin and then its argument prototype would still apply. */
10520char $ac_func ();
10521/* The GNU C library defines this for functions which it implements
10522 to always fail with ENOSYS. Some functions are actually named
10523 something starting with __ and the normal name is an alias. */
10524#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10525choke me
10526#else
10527char (*f) () = $ac_func;
10528#endif
10529#ifdef __cplusplus
10530}
10531#endif
10532
10533int
10534main ()
10535{
10536return f != $ac_func;
10537 ;
10538 return 0;
10539}
10540_ACEOF
10541rm -f conftest.$ac_objext conftest$ac_exeext
10542if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 10543 (eval $ac_link) 2>conftest.er1
57669b57 10544 ac_status=$?
edfaf76d
LK
10545 grep -v '^ *+' conftest.er1 >conftest.err
10546 rm -f conftest.er1
10547 cat conftest.err >&5
57669b57
JD
10548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10549 (exit $ac_status); } &&
ec8fcb10
YM
10550 { ac_try='test -z "$ac_c_werror_flag"
10551 || test ! -s conftest.err'
edfaf76d
LK
10552 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10553 (eval $ac_try) 2>&5
10554 ac_status=$?
10555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10556 (exit $ac_status); }; } &&
10557 { ac_try='test -s conftest$ac_exeext'
57669b57
JD
10558 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10559 (eval $ac_try) 2>&5
10560 ac_status=$?
10561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10562 (exit $ac_status); }; }; then
10563 eval "$as_ac_var=yes"
10564else
10565 echo "$as_me: failed program was:" >&5
10566sed 's/^/| /' conftest.$ac_ext >&5
10567
10568eval "$as_ac_var=no"
10569fi
edfaf76d
LK
10570rm -f conftest.err conftest.$ac_objext \
10571 conftest$ac_exeext conftest.$ac_ext
57669b57
JD
10572fi
10573echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10574echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10575if test `eval echo '${'$as_ac_var'}'` = yes; then
10576 cat >>confdefs.h <<_ACEOF
10577#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10578_ACEOF
10579 HAVE_GTK_MULTIDISPLAY=yes
10580fi
10581done
10582
10583 if test "${HAVE_GTK_MULTIDISPLAY}" = "yes"; then
10584
10585cat >>confdefs.h <<\_ACEOF
10586#define HAVE_GTK_MULTIDISPLAY 1
572a3cc2
JD
10587_ACEOF
10588
10589 fi
10590 HAVE_GTK_FILE_SELECTION=no
10591
10592for ac_func in gtk_file_selection_new
10593do
10594as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10595echo "$as_me:$LINENO: checking for $ac_func" >&5
10596echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10597if eval "test \"\${$as_ac_var+set}\" = set"; then
10598 echo $ECHO_N "(cached) $ECHO_C" >&6
10599else
10600 cat >conftest.$ac_ext <<_ACEOF
10601/* confdefs.h. */
10602_ACEOF
10603cat confdefs.h >>conftest.$ac_ext
10604cat >>conftest.$ac_ext <<_ACEOF
10605/* end confdefs.h. */
edfaf76d
LK
10606/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10607 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10608#define $ac_func innocuous_$ac_func
10609
572a3cc2
JD
10610/* System header to define __stub macros and hopefully few prototypes,
10611 which can conflict with char $ac_func (); below.
10612 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10613 <limits.h> exists even on freestanding compilers. */
edfaf76d 10614
572a3cc2
JD
10615#ifdef __STDC__
10616# include <limits.h>
10617#else
10618# include <assert.h>
10619#endif
edfaf76d
LK
10620
10621#undef $ac_func
10622
572a3cc2
JD
10623/* Override any gcc2 internal prototype to avoid an error. */
10624#ifdef __cplusplus
10625extern "C"
10626{
10627#endif
10628/* We use char because int might match the return type of a gcc2
10629 builtin and then its argument prototype would still apply. */
10630char $ac_func ();
10631/* The GNU C library defines this for functions which it implements
10632 to always fail with ENOSYS. Some functions are actually named
10633 something starting with __ and the normal name is an alias. */
10634#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10635choke me
10636#else
10637char (*f) () = $ac_func;
10638#endif
10639#ifdef __cplusplus
10640}
10641#endif
10642
10643int
10644main ()
10645{
10646return f != $ac_func;
10647 ;
10648 return 0;
10649}
10650_ACEOF
10651rm -f conftest.$ac_objext conftest$ac_exeext
10652if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 10653 (eval $ac_link) 2>conftest.er1
572a3cc2 10654 ac_status=$?
edfaf76d
LK
10655 grep -v '^ *+' conftest.er1 >conftest.err
10656 rm -f conftest.er1
10657 cat conftest.err >&5
572a3cc2
JD
10658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10659 (exit $ac_status); } &&
ec8fcb10
YM
10660 { ac_try='test -z "$ac_c_werror_flag"
10661 || test ! -s conftest.err'
edfaf76d
LK
10662 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10663 (eval $ac_try) 2>&5
10664 ac_status=$?
10665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10666 (exit $ac_status); }; } &&
10667 { ac_try='test -s conftest$ac_exeext'
572a3cc2
JD
10668 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10669 (eval $ac_try) 2>&5
10670 ac_status=$?
10671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10672 (exit $ac_status); }; }; then
10673 eval "$as_ac_var=yes"
10674else
10675 echo "$as_me: failed program was:" >&5
10676sed 's/^/| /' conftest.$ac_ext >&5
10677
10678eval "$as_ac_var=no"
10679fi
edfaf76d
LK
10680rm -f conftest.err conftest.$ac_objext \
10681 conftest$ac_exeext conftest.$ac_ext
572a3cc2
JD
10682fi
10683echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10684echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10685if test `eval echo '${'$as_ac_var'}'` = yes; then
10686 cat >>confdefs.h <<_ACEOF
10687#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10688_ACEOF
10689 HAVE_GTK_FILE_SELECTION=yes
10690fi
10691done
10692
10693
10694 HAVE_GTK_FILE_CHOOSER=no
10695
10696for ac_func in gtk_file_chooser_dialog_new
10697do
10698as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10699echo "$as_me:$LINENO: checking for $ac_func" >&5
10700echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10701if eval "test \"\${$as_ac_var+set}\" = set"; then
10702 echo $ECHO_N "(cached) $ECHO_C" >&6
10703else
10704 cat >conftest.$ac_ext <<_ACEOF
10705/* confdefs.h. */
10706_ACEOF
10707cat confdefs.h >>conftest.$ac_ext
10708cat >>conftest.$ac_ext <<_ACEOF
10709/* end confdefs.h. */
edfaf76d
LK
10710/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10711 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10712#define $ac_func innocuous_$ac_func
10713
572a3cc2
JD
10714/* System header to define __stub macros and hopefully few prototypes,
10715 which can conflict with char $ac_func (); below.
10716 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10717 <limits.h> exists even on freestanding compilers. */
edfaf76d 10718
572a3cc2
JD
10719#ifdef __STDC__
10720# include <limits.h>
10721#else
10722# include <assert.h>
10723#endif
edfaf76d
LK
10724
10725#undef $ac_func
10726
572a3cc2
JD
10727/* Override any gcc2 internal prototype to avoid an error. */
10728#ifdef __cplusplus
10729extern "C"
10730{
10731#endif
10732/* We use char because int might match the return type of a gcc2
10733 builtin and then its argument prototype would still apply. */
10734char $ac_func ();
10735/* The GNU C library defines this for functions which it implements
10736 to always fail with ENOSYS. Some functions are actually named
10737 something starting with __ and the normal name is an alias. */
10738#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10739choke me
10740#else
10741char (*f) () = $ac_func;
10742#endif
10743#ifdef __cplusplus
10744}
10745#endif
10746
10747int
10748main ()
10749{
10750return f != $ac_func;
10751 ;
10752 return 0;
10753}
10754_ACEOF
10755rm -f conftest.$ac_objext conftest$ac_exeext
10756if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 10757 (eval $ac_link) 2>conftest.er1
572a3cc2 10758 ac_status=$?
edfaf76d
LK
10759 grep -v '^ *+' conftest.er1 >conftest.err
10760 rm -f conftest.er1
10761 cat conftest.err >&5
572a3cc2
JD
10762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10763 (exit $ac_status); } &&
ec8fcb10
YM
10764 { ac_try='test -z "$ac_c_werror_flag"
10765 || test ! -s conftest.err'
edfaf76d
LK
10766 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10767 (eval $ac_try) 2>&5
10768 ac_status=$?
10769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10770 (exit $ac_status); }; } &&
10771 { ac_try='test -s conftest$ac_exeext'
572a3cc2
JD
10772 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10773 (eval $ac_try) 2>&5
10774 ac_status=$?
10775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10776 (exit $ac_status); }; }; then
10777 eval "$as_ac_var=yes"
10778else
10779 echo "$as_me: failed program was:" >&5
10780sed 's/^/| /' conftest.$ac_ext >&5
10781
10782eval "$as_ac_var=no"
10783fi
edfaf76d
LK
10784rm -f conftest.err conftest.$ac_objext \
10785 conftest$ac_exeext conftest.$ac_ext
572a3cc2
JD
10786fi
10787echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10788echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10789if test `eval echo '${'$as_ac_var'}'` = yes; then
10790 cat >>confdefs.h <<_ACEOF
10791#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10792_ACEOF
10793 HAVE_GTK_FILE_CHOOSER=yes
10794fi
10795done
10796
10797
10798 if test "$HAVE_GTK_FILE_SELECTION" = yes \
10799 && test "$HAVE_GTK_FILE_CHOOSER" = yes; then
10800
10801cat >>confdefs.h <<\_ACEOF
10802#define HAVE_GTK_FILE_BOTH 1
57669b57
JD
10803_ACEOF
10804
b8bdffbe
JD
10805 fi
10806
10807 if test "$HAVE_GTK_FILE_CHOOSER" = yes; then
10808 HAVE_GTK_AND_PTHREAD=no
10809
10810for ac_header in pthread.h
10811do
10812as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10813if eval "test \"\${$as_ac_Header+set}\" = set"; then
10814 echo "$as_me:$LINENO: checking for $ac_header" >&5
10815echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10816if eval "test \"\${$as_ac_Header+set}\" = set"; then
10817 echo $ECHO_N "(cached) $ECHO_C" >&6
10818fi
10819echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10820echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10821else
10822 # Is the header compilable?
10823echo "$as_me:$LINENO: checking $ac_header usability" >&5
10824echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
10825cat >conftest.$ac_ext <<_ACEOF
10826/* confdefs.h. */
10827_ACEOF
10828cat confdefs.h >>conftest.$ac_ext
10829cat >>conftest.$ac_ext <<_ACEOF
10830/* end confdefs.h. */
10831$ac_includes_default
10832#include <$ac_header>
10833_ACEOF
10834rm -f conftest.$ac_objext
10835if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 10836 (eval $ac_compile) 2>conftest.er1
b8bdffbe 10837 ac_status=$?
edfaf76d
LK
10838 grep -v '^ *+' conftest.er1 >conftest.err
10839 rm -f conftest.er1
10840 cat conftest.err >&5
b8bdffbe
JD
10841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10842 (exit $ac_status); } &&
ec8fcb10
YM
10843 { ac_try='test -z "$ac_c_werror_flag"
10844 || test ! -s conftest.err'
edfaf76d
LK
10845 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10846 (eval $ac_try) 2>&5
10847 ac_status=$?
10848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10849 (exit $ac_status); }; } &&
10850 { ac_try='test -s conftest.$ac_objext'
b8bdffbe
JD
10851 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10852 (eval $ac_try) 2>&5
10853 ac_status=$?
10854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10855 (exit $ac_status); }; }; then
10856 ac_header_compiler=yes
10857else
10858 echo "$as_me: failed program was:" >&5
10859sed 's/^/| /' conftest.$ac_ext >&5
10860
10861ac_header_compiler=no
10862fi
edfaf76d 10863rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b8bdffbe
JD
10864echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10865echo "${ECHO_T}$ac_header_compiler" >&6
10866
10867# Is the header present?
10868echo "$as_me:$LINENO: checking $ac_header presence" >&5
10869echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
10870cat >conftest.$ac_ext <<_ACEOF
10871/* confdefs.h. */
10872_ACEOF
10873cat confdefs.h >>conftest.$ac_ext
10874cat >>conftest.$ac_ext <<_ACEOF
10875/* end confdefs.h. */
10876#include <$ac_header>
10877_ACEOF
10878if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10879 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10880 ac_status=$?
10881 grep -v '^ *+' conftest.er1 >conftest.err
10882 rm -f conftest.er1
10883 cat conftest.err >&5
10884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10885 (exit $ac_status); } >/dev/null; then
10886 if test -s conftest.err; then
10887 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 10888 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
b8bdffbe
JD
10889 else
10890 ac_cpp_err=
10891 fi
10892else
10893 ac_cpp_err=yes
10894fi
10895if test -z "$ac_cpp_err"; then
10896 ac_header_preproc=yes
10897else
10898 echo "$as_me: failed program was:" >&5
10899sed 's/^/| /' conftest.$ac_ext >&5
10900
10901 ac_header_preproc=no
10902fi
10903rm -f conftest.err conftest.$ac_ext
10904echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10905echo "${ECHO_T}$ac_header_preproc" >&6
10906
10907# So? What about this header?
edfaf76d
LK
10908case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10909 yes:no: )
b8bdffbe
JD
10910 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10911echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
10912 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10913echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10914 ac_header_preproc=yes
b8bdffbe 10915 ;;
edfaf76d 10916 no:yes:* )
b8bdffbe
JD
10917 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10918echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
10919 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
10920echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
10921 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10922echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10923 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
10924echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
b8bdffbe
JD
10925 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10926echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
10927 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10928echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
b8bdffbe
JD
10929 (
10930 cat <<\_ASBOX
edfaf76d
LK
10931## ------------------------------------------ ##
10932## Report this to the AC_PACKAGE_NAME lists. ##
10933## ------------------------------------------ ##
b8bdffbe
JD
10934_ASBOX
10935 ) |
10936 sed "s/^/$as_me: WARNING: /" >&2
10937 ;;
10938esac
10939echo "$as_me:$LINENO: checking for $ac_header" >&5
10940echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10941if eval "test \"\${$as_ac_Header+set}\" = set"; then
10942 echo $ECHO_N "(cached) $ECHO_C" >&6
10943else
edfaf76d 10944 eval "$as_ac_Header=\$ac_header_preproc"
b8bdffbe
JD
10945fi
10946echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10947echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10948
10949fi
10950if test `eval echo '${'$as_ac_Header'}'` = yes; then
10951 cat >>confdefs.h <<_ACEOF
10952#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10953_ACEOF
10954
10955fi
10956
10957done
10958
10959 if test "$ac_cv_header_pthread_h"; then
10960 echo "$as_me:$LINENO: checking for pthread_self in -lpthread" >&5
10961echo $ECHO_N "checking for pthread_self in -lpthread... $ECHO_C" >&6
10962if test "${ac_cv_lib_pthread_pthread_self+set}" = set; then
10963 echo $ECHO_N "(cached) $ECHO_C" >&6
10964else
10965 ac_check_lib_save_LIBS=$LIBS
10966LIBS="-lpthread $LIBS"
10967cat >conftest.$ac_ext <<_ACEOF
10968/* confdefs.h. */
10969_ACEOF
10970cat confdefs.h >>conftest.$ac_ext
10971cat >>conftest.$ac_ext <<_ACEOF
10972/* end confdefs.h. */
10973
10974/* Override any gcc2 internal prototype to avoid an error. */
10975#ifdef __cplusplus
10976extern "C"
10977#endif
10978/* We use char because int might match the return type of a gcc2
10979 builtin and then its argument prototype would still apply. */
10980char pthread_self ();
10981int
10982main ()
10983{
10984pthread_self ();
10985 ;
10986 return 0;
10987}
10988_ACEOF
10989rm -f conftest.$ac_objext conftest$ac_exeext
10990if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 10991 (eval $ac_link) 2>conftest.er1
b8bdffbe 10992 ac_status=$?
edfaf76d
LK
10993 grep -v '^ *+' conftest.er1 >conftest.err
10994 rm -f conftest.er1
10995 cat conftest.err >&5
b8bdffbe
JD
10996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10997 (exit $ac_status); } &&
ec8fcb10
YM
10998 { ac_try='test -z "$ac_c_werror_flag"
10999 || test ! -s conftest.err'
edfaf76d
LK
11000 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11001 (eval $ac_try) 2>&5
11002 ac_status=$?
11003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11004 (exit $ac_status); }; } &&
11005 { ac_try='test -s conftest$ac_exeext'
b8bdffbe
JD
11006 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11007 (eval $ac_try) 2>&5
11008 ac_status=$?
11009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11010 (exit $ac_status); }; }; then
11011 ac_cv_lib_pthread_pthread_self=yes
11012else
11013 echo "$as_me: failed program was:" >&5
11014sed 's/^/| /' conftest.$ac_ext >&5
11015
11016ac_cv_lib_pthread_pthread_self=no
11017fi
edfaf76d
LK
11018rm -f conftest.err conftest.$ac_objext \
11019 conftest$ac_exeext conftest.$ac_ext
b8bdffbe
JD
11020LIBS=$ac_check_lib_save_LIBS
11021fi
11022echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_self" >&5
11023echo "${ECHO_T}$ac_cv_lib_pthread_pthread_self" >&6
11024if test $ac_cv_lib_pthread_pthread_self = yes; then
11025 HAVE_GTK_AND_PTHREAD=yes
11026fi
11027
11028 fi
11029 if test "$HAVE_GTK_AND_PTHREAD" = yes; then
11030 GTK_LIBS="$GTK_LIBS -lpthread"
11031
11032cat >>confdefs.h <<\_ACEOF
11033#define HAVE_GTK_AND_PTHREAD 1
11034_ACEOF
11035
11036 fi
57669b57 11037 fi
488dd4c4
JD
11038fi
11039
98418dba
CW
11040if test x"${USE_X_TOOLKIT}" = xmaybe; then
11041 if test x"${HAVE_X11R5}" = xyes; then
c0d27fcc 11042 echo "$as_me:$LINENO: checking X11 version 5 with Xaw" >&5
98418dba
CW
11043echo $ECHO_N "checking X11 version 5 with Xaw... $ECHO_C" >&6
11044 if test "${emacs_cv_x11_version_5_with_xaw+set}" = set; then
11045 echo $ECHO_N "(cached) $ECHO_C" >&6
11046else
11047 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11048/* confdefs.h. */
11049_ACEOF
11050cat confdefs.h >>conftest.$ac_ext
11051cat >>conftest.$ac_ext <<_ACEOF
11052/* end confdefs.h. */
98418dba
CW
11053
11054#include <X11/Intrinsic.h>
11055#include <X11/Xaw/Simple.h>
98418dba
CW
11056int
11057main ()
11058{
11059
11060 ;
11061 return 0;
11062}
11063_ACEOF
11064rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 11065if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 11066 (eval $ac_link) 2>conftest.er1
98418dba 11067 ac_status=$?
edfaf76d
LK
11068 grep -v '^ *+' conftest.er1 >conftest.err
11069 rm -f conftest.er1
11070 cat conftest.err >&5
c0d27fcc 11071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 11072 (exit $ac_status); } &&
ec8fcb10
YM
11073 { ac_try='test -z "$ac_c_werror_flag"
11074 || test ! -s conftest.err'
edfaf76d
LK
11075 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11076 (eval $ac_try) 2>&5
11077 ac_status=$?
11078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11079 (exit $ac_status); }; } &&
11080 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 11081 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
11082 (eval $ac_try) 2>&5
11083 ac_status=$?
c0d27fcc 11084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
11085 (exit $ac_status); }; }; then
11086 emacs_cv_x11_version_5_with_xaw=yes
11087else
11088 echo "$as_me: failed program was:" >&5
19650fd6
AS
11089sed 's/^/| /' conftest.$ac_ext >&5
11090
98418dba
CW
11091emacs_cv_x11_version_5_with_xaw=no
11092fi
edfaf76d
LK
11093rm -f conftest.err conftest.$ac_objext \
11094 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
11095fi
11096
11097 if test $emacs_cv_x11_version_5_with_xaw = yes; then
c0d27fcc 11098 echo "$as_me:$LINENO: result: 5 or newer, with Xaw; use toolkit by default" >&5
98418dba
CW
11099echo "${ECHO_T}5 or newer, with Xaw; use toolkit by default" >&6
11100 USE_X_TOOLKIT=LUCID
11101 else
c0d27fcc 11102 echo "$as_me:$LINENO: result: before 5 or no Xaw; do not use toolkit by default" >&5
98418dba
CW
11103echo "${ECHO_T}before 5 or no Xaw; do not use toolkit by default" >&6
11104 USE_X_TOOLKIT=none
11105 fi
11106 else
11107 USE_X_TOOLKIT=none
11108 fi
11109fi
11110
11111X_TOOLKIT_TYPE=$USE_X_TOOLKIT
11112
11113if test "${USE_X_TOOLKIT}" != "none"; then
c0d27fcc 11114 echo "$as_me:$LINENO: checking X11 toolkit version" >&5
98418dba
CW
11115echo $ECHO_N "checking X11 toolkit version... $ECHO_C" >&6
11116 if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then
11117 echo $ECHO_N "(cached) $ECHO_C" >&6
11118else
11119 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11120/* confdefs.h. */
11121_ACEOF
11122cat confdefs.h >>conftest.$ac_ext
11123cat >>conftest.$ac_ext <<_ACEOF
11124/* end confdefs.h. */
98418dba 11125#include <X11/Intrinsic.h>
98418dba
CW
11126int
11127main ()
11128{
11129#if XtSpecificationRelease < 6
11130fail;
11131#endif
11132
11133 ;
11134 return 0;
11135}
11136_ACEOF
11137rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 11138if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 11139 (eval $ac_link) 2>conftest.er1
98418dba 11140 ac_status=$?
edfaf76d
LK
11141 grep -v '^ *+' conftest.er1 >conftest.err
11142 rm -f conftest.er1
11143 cat conftest.err >&5
c0d27fcc 11144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 11145 (exit $ac_status); } &&
ec8fcb10
YM
11146 { ac_try='test -z "$ac_c_werror_flag"
11147 || test ! -s conftest.err'
edfaf76d
LK
11148 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11149 (eval $ac_try) 2>&5
11150 ac_status=$?
11151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11152 (exit $ac_status); }; } &&
11153 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 11154 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
11155 (eval $ac_try) 2>&5
11156 ac_status=$?
c0d27fcc 11157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
11158 (exit $ac_status); }; }; then
11159 emacs_cv_x11_toolkit_version_6=yes
11160else
11161 echo "$as_me: failed program was:" >&5
19650fd6
AS
11162sed 's/^/| /' conftest.$ac_ext >&5
11163
98418dba
CW
11164emacs_cv_x11_toolkit_version_6=no
11165fi
edfaf76d
LK
11166rm -f conftest.err conftest.$ac_objext \
11167 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
11168fi
11169
11170 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
11171 if test $emacs_cv_x11_toolkit_version_6 = yes; then
c0d27fcc 11172 echo "$as_me:$LINENO: result: 6 or newer" >&5
98418dba 11173echo "${ECHO_T}6 or newer" >&6
b936fae4 11174
c0d27fcc 11175cat >>confdefs.h <<\_ACEOF
98418dba 11176#define HAVE_X11XTR6 1
c0d27fcc 11177_ACEOF
98418dba
CW
11178
11179 else
c0d27fcc 11180 echo "$as_me:$LINENO: result: before 6" >&5
98418dba
CW
11181echo "${ECHO_T}before 6" >&6
11182 fi
11183
11184 OLDLIBS="$LIBS"
11185 if test x$HAVE_X11XTR6 = xyes; then
11186 LIBS="-lXt -lSM -lICE $LIBS"
11187 else
11188 LIBS="-lXt $LIBS"
11189 fi
11190
c0d27fcc 11191echo "$as_me:$LINENO: checking for XmuConvertStandardSelection in -lXmu" >&5
98418dba
CW
11192echo $ECHO_N "checking for XmuConvertStandardSelection in -lXmu... $ECHO_C" >&6
11193if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then
11194 echo $ECHO_N "(cached) $ECHO_C" >&6
11195else
11196 ac_check_lib_save_LIBS=$LIBS
11197LIBS="-lXmu $LIBS"
11198cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11199/* confdefs.h. */
11200_ACEOF
11201cat confdefs.h >>conftest.$ac_ext
11202cat >>conftest.$ac_ext <<_ACEOF
11203/* end confdefs.h. */
98418dba
CW
11204
11205/* Override any gcc2 internal prototype to avoid an error. */
11206#ifdef __cplusplus
11207extern "C"
11208#endif
11209/* We use char because int might match the return type of a gcc2
11210 builtin and then its argument prototype would still apply. */
11211char XmuConvertStandardSelection ();
98418dba
CW
11212int
11213main ()
11214{
11215XmuConvertStandardSelection ();
11216 ;
11217 return 0;
11218}
11219_ACEOF
11220rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 11221if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 11222 (eval $ac_link) 2>conftest.er1
98418dba 11223 ac_status=$?
edfaf76d
LK
11224 grep -v '^ *+' conftest.er1 >conftest.err
11225 rm -f conftest.er1
11226 cat conftest.err >&5
c0d27fcc 11227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 11228 (exit $ac_status); } &&
ec8fcb10
YM
11229 { ac_try='test -z "$ac_c_werror_flag"
11230 || test ! -s conftest.err'
edfaf76d
LK
11231 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11232 (eval $ac_try) 2>&5
11233 ac_status=$?
11234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11235 (exit $ac_status); }; } &&
11236 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 11237 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
11238 (eval $ac_try) 2>&5
11239 ac_status=$?
c0d27fcc 11240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
11241 (exit $ac_status); }; }; then
11242 ac_cv_lib_Xmu_XmuConvertStandardSelection=yes
11243else
11244 echo "$as_me: failed program was:" >&5
19650fd6
AS
11245sed 's/^/| /' conftest.$ac_ext >&5
11246
98418dba
CW
11247ac_cv_lib_Xmu_XmuConvertStandardSelection=no
11248fi
edfaf76d
LK
11249rm -f conftest.err conftest.$ac_objext \
11250 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
11251LIBS=$ac_check_lib_save_LIBS
11252fi
c0d27fcc 11253echo "$as_me:$LINENO: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5
98418dba
CW
11254echo "${ECHO_T}$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6
11255if test $ac_cv_lib_Xmu_XmuConvertStandardSelection = yes; then
c0d27fcc 11256 cat >>confdefs.h <<_ACEOF
98418dba 11257#define HAVE_LIBXMU 1
c0d27fcc 11258_ACEOF
98418dba
CW
11259
11260 LIBS="-lXmu $LIBS"
11261
11262fi
11263
11264 test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
11265fi
11266
11267# On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D.
11268if test "${HAVE_X11}" = "yes"; then
11269 if test "${USE_X_TOOLKIT}" != "none"; then
11270
c0d27fcc 11271echo "$as_me:$LINENO: checking for XShapeQueryExtension in -lXext" >&5
98418dba
CW
11272echo $ECHO_N "checking for XShapeQueryExtension in -lXext... $ECHO_C" >&6
11273if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then
11274 echo $ECHO_N "(cached) $ECHO_C" >&6
11275else
11276 ac_check_lib_save_LIBS=$LIBS
11277LIBS="-lXext $LIBS"
11278cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11279/* confdefs.h. */
11280_ACEOF
11281cat confdefs.h >>conftest.$ac_ext
11282cat >>conftest.$ac_ext <<_ACEOF
11283/* end confdefs.h. */
98418dba
CW
11284
11285/* Override any gcc2 internal prototype to avoid an error. */
11286#ifdef __cplusplus
11287extern "C"
11288#endif
11289/* We use char because int might match the return type of a gcc2
11290 builtin and then its argument prototype would still apply. */
11291char XShapeQueryExtension ();
98418dba
CW
11292int
11293main ()
11294{
11295XShapeQueryExtension ();
11296 ;
11297 return 0;
11298}
11299_ACEOF
11300rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 11301if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 11302 (eval $ac_link) 2>conftest.er1
98418dba 11303 ac_status=$?
edfaf76d
LK
11304 grep -v '^ *+' conftest.er1 >conftest.err
11305 rm -f conftest.er1
11306 cat conftest.err >&5
c0d27fcc 11307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 11308 (exit $ac_status); } &&
ec8fcb10
YM
11309 { ac_try='test -z "$ac_c_werror_flag"
11310 || test ! -s conftest.err'
edfaf76d
LK
11311 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11312 (eval $ac_try) 2>&5
11313 ac_status=$?
11314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11315 (exit $ac_status); }; } &&
11316 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 11317 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
11318 (eval $ac_try) 2>&5
11319 ac_status=$?
c0d27fcc 11320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
11321 (exit $ac_status); }; }; then
11322 ac_cv_lib_Xext_XShapeQueryExtension=yes
11323else
11324 echo "$as_me: failed program was:" >&5
19650fd6
AS
11325sed 's/^/| /' conftest.$ac_ext >&5
11326
98418dba
CW
11327ac_cv_lib_Xext_XShapeQueryExtension=no
11328fi
edfaf76d
LK
11329rm -f conftest.err conftest.$ac_objext \
11330 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
11331LIBS=$ac_check_lib_save_LIBS
11332fi
c0d27fcc 11333echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
98418dba
CW
11334echo "${ECHO_T}$ac_cv_lib_Xext_XShapeQueryExtension" >&6
11335if test $ac_cv_lib_Xext_XShapeQueryExtension = yes; then
c0d27fcc 11336 cat >>confdefs.h <<_ACEOF
98418dba 11337#define HAVE_LIBXEXT 1
c0d27fcc 11338_ACEOF
98418dba
CW
11339
11340 LIBS="-lXext $LIBS"
11341
11342fi
11343
11344 fi
11345fi
11346
11347if test "${USE_X_TOOLKIT}" = "MOTIF"; then
c0d27fcc 11348 echo "$as_me:$LINENO: checking for Motif version 2.1" >&5
98418dba
CW
11349echo $ECHO_N "checking for Motif version 2.1... $ECHO_C" >&6
11350if test "${emacs_cv_motif_version_2_1+set}" = set; then
11351 echo $ECHO_N "(cached) $ECHO_C" >&6
11352else
11353 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11354/* confdefs.h. */
11355_ACEOF
11356cat confdefs.h >>conftest.$ac_ext
11357cat >>conftest.$ac_ext <<_ACEOF
11358/* end confdefs.h. */
98418dba 11359#include <Xm/Xm.h>
98418dba
CW
11360int
11361main ()
11362{
11363#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
11364int x = 5;
11365#else
11366Motif version prior to 2.1.
11367#endif
11368 ;
11369 return 0;
11370}
11371_ACEOF
11372rm -f conftest.$ac_objext
c0d27fcc 11373if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 11374 (eval $ac_compile) 2>conftest.er1
98418dba 11375 ac_status=$?
edfaf76d
LK
11376 grep -v '^ *+' conftest.er1 >conftest.err
11377 rm -f conftest.er1
11378 cat conftest.err >&5
c0d27fcc 11379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 11380 (exit $ac_status); } &&
ec8fcb10
YM
11381 { ac_try='test -z "$ac_c_werror_flag"
11382 || test ! -s conftest.err'
edfaf76d
LK
11383 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11384 (eval $ac_try) 2>&5
11385 ac_status=$?
11386 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11387 (exit $ac_status); }; } &&
11388 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 11389 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
11390 (eval $ac_try) 2>&5
11391 ac_status=$?
c0d27fcc 11392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
11393 (exit $ac_status); }; }; then
11394 emacs_cv_motif_version_2_1=yes
11395else
11396 echo "$as_me: failed program was:" >&5
19650fd6
AS
11397sed 's/^/| /' conftest.$ac_ext >&5
11398
98418dba
CW
11399emacs_cv_motif_version_2_1=no
11400fi
edfaf76d 11401rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 11402fi
c0d27fcc 11403echo "$as_me:$LINENO: result: $emacs_cv_motif_version_2_1" >&5
98418dba
CW
11404echo "${ECHO_T}$emacs_cv_motif_version_2_1" >&6
11405 HAVE_MOTIF_2_1=$emacs_cv_motif_version_2_1
11406 if test $emacs_cv_motif_version_2_1 = yes; then
11407 HAVE_LIBXP=no
b936fae4 11408
c0d27fcc 11409cat >>confdefs.h <<\_ACEOF
98418dba 11410#define HAVE_MOTIF_2_1 1
c0d27fcc 11411_ACEOF
98418dba 11412
c0d27fcc 11413 echo "$as_me:$LINENO: checking for XpCreateContext in -lXp" >&5
98418dba
CW
11414echo $ECHO_N "checking for XpCreateContext in -lXp... $ECHO_C" >&6
11415if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then
11416 echo $ECHO_N "(cached) $ECHO_C" >&6
11417else
11418 ac_check_lib_save_LIBS=$LIBS
11419LIBS="-lXp $LIBS"
11420cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11421/* confdefs.h. */
11422_ACEOF
11423cat confdefs.h >>conftest.$ac_ext
11424cat >>conftest.$ac_ext <<_ACEOF
11425/* end confdefs.h. */
98418dba
CW
11426
11427/* Override any gcc2 internal prototype to avoid an error. */
11428#ifdef __cplusplus
11429extern "C"
11430#endif
11431/* We use char because int might match the return type of a gcc2
11432 builtin and then its argument prototype would still apply. */
11433char XpCreateContext ();
98418dba
CW
11434int
11435main ()
11436{
11437XpCreateContext ();
11438 ;
11439 return 0;
11440}
11441_ACEOF
11442rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 11443if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 11444 (eval $ac_link) 2>conftest.er1
98418dba 11445 ac_status=$?
edfaf76d
LK
11446 grep -v '^ *+' conftest.er1 >conftest.err
11447 rm -f conftest.er1
11448 cat conftest.err >&5
c0d27fcc 11449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 11450 (exit $ac_status); } &&
ec8fcb10
YM
11451 { ac_try='test -z "$ac_c_werror_flag"
11452 || test ! -s conftest.err'
edfaf76d
LK
11453 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11454 (eval $ac_try) 2>&5
11455 ac_status=$?
11456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11457 (exit $ac_status); }; } &&
11458 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 11459 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
11460 (eval $ac_try) 2>&5
11461 ac_status=$?
c0d27fcc 11462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
11463 (exit $ac_status); }; }; then
11464 ac_cv_lib_Xp_XpCreateContext=yes
11465else
11466 echo "$as_me: failed program was:" >&5
19650fd6
AS
11467sed 's/^/| /' conftest.$ac_ext >&5
11468
98418dba
CW
11469ac_cv_lib_Xp_XpCreateContext=no
11470fi
edfaf76d
LK
11471rm -f conftest.err conftest.$ac_objext \
11472 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
11473LIBS=$ac_check_lib_save_LIBS
11474fi
c0d27fcc 11475echo "$as_me:$LINENO: result: $ac_cv_lib_Xp_XpCreateContext" >&5
98418dba
CW
11476echo "${ECHO_T}$ac_cv_lib_Xp_XpCreateContext" >&6
11477if test $ac_cv_lib_Xp_XpCreateContext = yes; then
11478 HAVE_LIBXP=yes
11479fi
503d2be0 11480
98418dba 11481 if test ${HAVE_LIBXP} = yes; then
b936fae4 11482
c0d27fcc 11483cat >>confdefs.h <<\_ACEOF
98418dba 11484#define HAVE_LIBXP 1
c0d27fcc 11485_ACEOF
503d2be0 11486
98418dba 11487 fi
4693dbc9
SM
11488 else
11489 echo "$as_me:$LINENO: checking for LessTif where some systems put it" >&5
11490echo $ECHO_N "checking for LessTif where some systems put it... $ECHO_C" >&6
11491if test "${emacs_cv_lesstif+set}" = set; then
11492 echo $ECHO_N "(cached) $ECHO_C" >&6
11493else
11494 # We put this in CFLAGS temporarily to precede other -I options
11495 # that might be in CFLAGS temporarily.
11496 # We put this in CPPFLAGS where it precedes the other -I options.
11497 OLD_CPPFLAGS=$CPPFLAGS
11498 OLD_CFLAGS=$CFLAGS
11499 CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS"
11500 CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS"
11501 cat >conftest.$ac_ext <<_ACEOF
11502/* confdefs.h. */
11503_ACEOF
11504cat confdefs.h >>conftest.$ac_ext
11505cat >>conftest.$ac_ext <<_ACEOF
11506/* end confdefs.h. */
11507#include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h>
11508int
11509main ()
11510{
11511int x = 5;
11512 ;
11513 return 0;
11514}
11515_ACEOF
11516rm -f conftest.$ac_objext
11517if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 11518 (eval $ac_compile) 2>conftest.er1
4693dbc9 11519 ac_status=$?
edfaf76d
LK
11520 grep -v '^ *+' conftest.er1 >conftest.err
11521 rm -f conftest.er1
11522 cat conftest.err >&5
4693dbc9
SM
11523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11524 (exit $ac_status); } &&
ec8fcb10
YM
11525 { ac_try='test -z "$ac_c_werror_flag"
11526 || test ! -s conftest.err'
edfaf76d
LK
11527 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11528 (eval $ac_try) 2>&5
11529 ac_status=$?
11530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11531 (exit $ac_status); }; } &&
11532 { ac_try='test -s conftest.$ac_objext'
4693dbc9
SM
11533 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11534 (eval $ac_try) 2>&5
11535 ac_status=$?
11536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11537 (exit $ac_status); }; }; then
11538 emacs_cv_lesstif=yes
11539else
11540 echo "$as_me: failed program was:" >&5
11541sed 's/^/| /' conftest.$ac_ext >&5
11542
11543emacs_cv_lesstif=no
11544fi
edfaf76d 11545rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4693dbc9
SM
11546fi
11547echo "$as_me:$LINENO: result: $emacs_cv_lesstif" >&5
11548echo "${ECHO_T}$emacs_cv_lesstif" >&6
11549 if test $emacs_cv_lesstif = yes; then
11550 # Make sure this -I option remains in CPPFLAGS after it is set
11551 # back to REAL_CPPFLAGS.
11552 # There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not
11553 # have those other -I options anyway. Ultimately, having this
11554 # directory ultimately in CPPFLAGS will be enough.
11555 REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS"
11556 LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS"
11557 else
11558 CFLAGS=$OLD_CFLAGS
11559 CPPFLAGS=$OLD_CPPFLAGS
11560 fi
98418dba
CW
11561 fi
11562fi
11563
11564### Is -lXaw3d available?
11565HAVE_XAW3D=no
11566if test "${HAVE_X11}" = "yes"; then
7c00e1e9 11567 if test "${USE_X_TOOLKIT}" != "none" && test "${with_toolkit_scroll_bars}" != "no"; then
22044edf 11568 echo "$as_me:$LINENO: checking for X11/Xaw3d/Scrollbar.h" >&5
98418dba
CW
11569echo $ECHO_N "checking for X11/Xaw3d/Scrollbar.h... $ECHO_C" >&6
11570if test "${ac_cv_header_X11_Xaw3d_Scrollbar_h+set}" = set; then
11571 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba 11572else
22044edf 11573 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11574/* confdefs.h. */
11575_ACEOF
11576cat confdefs.h >>conftest.$ac_ext
11577cat >>conftest.$ac_ext <<_ACEOF
11578/* end confdefs.h. */
98418dba 11579#include <X11/Xaw3d/Scrollbar.h>
503d2be0 11580_ACEOF
c0d27fcc 11581if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
11582 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11583 ac_status=$?
6bae0ccf 11584 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
11585 rm -f conftest.er1
11586 cat conftest.err >&5
c0d27fcc 11587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
11588 (exit $ac_status); } >/dev/null; then
11589 if test -s conftest.err; then
11590 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 11591 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
11592 else
11593 ac_cpp_err=
11594 fi
11595else
11596 ac_cpp_err=yes
11597fi
11598if test -z "$ac_cpp_err"; then
22044edf 11599 ac_cv_header_X11_Xaw3d_Scrollbar_h=yes
ba4481b5 11600else
503d2be0 11601 echo "$as_me: failed program was:" >&5
19650fd6
AS
11602sed 's/^/| /' conftest.$ac_ext >&5
11603
22044edf 11604 ac_cv_header_X11_Xaw3d_Scrollbar_h=no
ba4481b5 11605fi
503d2be0 11606rm -f conftest.err conftest.$ac_ext
98418dba 11607fi
c0d27fcc 11608echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xaw3d_Scrollbar_h" >&5
98418dba 11609echo "${ECHO_T}$ac_cv_header_X11_Xaw3d_Scrollbar_h" >&6
98418dba 11610if test $ac_cv_header_X11_Xaw3d_Scrollbar_h = yes; then
c0d27fcc 11611 echo "$as_me:$LINENO: checking for XawScrollbarSetThumb in -lXaw3d" >&5
98418dba
CW
11612echo $ECHO_N "checking for XawScrollbarSetThumb in -lXaw3d... $ECHO_C" >&6
11613if test "${ac_cv_lib_Xaw3d_XawScrollbarSetThumb+set}" = set; then
11614 echo $ECHO_N "(cached) $ECHO_C" >&6
11615else
11616 ac_check_lib_save_LIBS=$LIBS
11617LIBS="-lXaw3d $LIBS"
11618cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11619/* confdefs.h. */
11620_ACEOF
11621cat confdefs.h >>conftest.$ac_ext
11622cat >>conftest.$ac_ext <<_ACEOF
11623/* end confdefs.h. */
98418dba
CW
11624
11625/* Override any gcc2 internal prototype to avoid an error. */
11626#ifdef __cplusplus
11627extern "C"
11628#endif
11629/* We use char because int might match the return type of a gcc2
11630 builtin and then its argument prototype would still apply. */
11631char XawScrollbarSetThumb ();
503d2be0
AS
11632int
11633main ()
11634{
98418dba 11635XawScrollbarSetThumb ();
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
edfaf76d 11642 (eval $ac_link) 2>conftest.er1
503d2be0 11643 ac_status=$?
edfaf76d
LK
11644 grep -v '^ *+' conftest.er1 >conftest.err
11645 rm -f conftest.er1
11646 cat conftest.err >&5
c0d27fcc 11647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 11648 (exit $ac_status); } &&
ec8fcb10
YM
11649 { ac_try='test -z "$ac_c_werror_flag"
11650 || test ! -s conftest.err'
edfaf76d
LK
11651 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11652 (eval $ac_try) 2>&5
11653 ac_status=$?
11654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11655 (exit $ac_status); }; } &&
11656 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 11657 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
11658 (eval $ac_try) 2>&5
11659 ac_status=$?
c0d27fcc 11660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 11661 (exit $ac_status); }; }; then
98418dba 11662 ac_cv_lib_Xaw3d_XawScrollbarSetThumb=yes
ba4481b5 11663else
503d2be0 11664 echo "$as_me: failed program was:" >&5
19650fd6
AS
11665sed 's/^/| /' conftest.$ac_ext >&5
11666
98418dba 11667ac_cv_lib_Xaw3d_XawScrollbarSetThumb=no
ba4481b5 11668fi
edfaf76d
LK
11669rm -f conftest.err conftest.$ac_objext \
11670 conftest$ac_exeext conftest.$ac_ext
98418dba 11671LIBS=$ac_check_lib_save_LIBS
ba4481b5 11672fi
c0d27fcc 11673echo "$as_me:$LINENO: result: $ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&5
98418dba
CW
11674echo "${ECHO_T}$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&6
11675if test $ac_cv_lib_Xaw3d_XawScrollbarSetThumb = yes; then
11676 HAVE_XAW3D=yes
ba4481b5 11677fi
503d2be0 11678
ba4481b5
DL
11679fi
11680
c0d27fcc 11681
98418dba 11682 if test "${HAVE_XAW3D}" = "yes"; then
b936fae4 11683
c0d27fcc 11684cat >>confdefs.h <<\_ACEOF
98418dba 11685#define HAVE_XAW3D 1
c0d27fcc 11686_ACEOF
98418dba 11687
ba4481b5 11688 fi
98418dba 11689 fi
ba4481b5
DL
11690fi
11691
c0d27fcc
MR
11692
11693
98418dba
CW
11694USE_TOOLKIT_SCROLL_BARS=no
11695if test "${with_toolkit_scroll_bars}" != "no"; then
11696 if test "${USE_X_TOOLKIT}" != "none"; then
11697 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
c0d27fcc 11698 cat >>confdefs.h <<\_ACEOF
98418dba 11699#define USE_TOOLKIT_SCROLL_BARS 1
c0d27fcc 11700_ACEOF
98418dba
CW
11701
11702 HAVE_XAW3D=no
11703 USE_TOOLKIT_SCROLL_BARS=yes
11704 elif test "${HAVE_XAW3D}" = "yes"; then
c0d27fcc 11705 cat >>confdefs.h <<\_ACEOF
98418dba 11706#define USE_TOOLKIT_SCROLL_BARS 1
c0d27fcc 11707_ACEOF
98418dba
CW
11708
11709 USE_TOOLKIT_SCROLL_BARS=yes
ba4481b5 11710 fi
488dd4c4
JD
11711 elif test "${HAVE_GTK}" = "yes"; then
11712 cat >>confdefs.h <<\_ACEOF
11713#define USE_TOOLKIT_SCROLL_BARS 1
5d6da11e
YM
11714_ACEOF
11715
11716 USE_TOOLKIT_SCROLL_BARS=yes
11717 elif test "${HAVE_CARBON}" = "yes"; then
11718 cat >>confdefs.h <<\_ACEOF
11719#define USE_TOOLKIT_SCROLL_BARS 1
488dd4c4
JD
11720_ACEOF
11721
11722 USE_TOOLKIT_SCROLL_BARS=yes
ba4481b5
DL
11723 fi
11724fi
11725
abd39b57 11726cat >conftest.$ac_ext <<_ACEOF
abd39b57
AC
11727/* confdefs.h. */
11728_ACEOF
11729cat confdefs.h >>conftest.$ac_ext
11730cat >>conftest.$ac_ext <<_ACEOF
11731/* end confdefs.h. */
11732
11733 #include <X11/Xlib.h>
11734 #include <X11/Xresource.h>
11735int
11736main ()
11737{
11738XIMProc callback;
11739 ;
11740 return 0;
11741}
11742_ACEOF
11743rm -f conftest.$ac_objext
11744if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 11745 (eval $ac_compile) 2>conftest.er1
abd39b57 11746 ac_status=$?
edfaf76d
LK
11747 grep -v '^ *+' conftest.er1 >conftest.err
11748 rm -f conftest.er1
11749 cat conftest.err >&5
abd39b57
AC
11750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11751 (exit $ac_status); } &&
ec8fcb10
YM
11752 { ac_try='test -z "$ac_c_werror_flag"
11753 || test ! -s conftest.err'
edfaf76d
LK
11754 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11755 (eval $ac_try) 2>&5
11756 ac_status=$?
11757 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11758 (exit $ac_status); }; } &&
11759 { ac_try='test -s conftest.$ac_objext'
abd39b57
AC
11760 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11761 (eval $ac_try) 2>&5
11762 ac_status=$?
11763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11764 (exit $ac_status); }; }; then
11765 HAVE_XIM=yes
11766
11767cat >>confdefs.h <<\_ACEOF
11768#define HAVE_XIM 1
11769_ACEOF
11770
11771else
11772 echo "$as_me: failed program was:" >&5
11773sed 's/^/| /' conftest.$ac_ext >&5
11774
11775HAVE_XIM=no
11776fi
edfaf76d 11777rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
abd39b57 11778
c0d27fcc 11779
98418dba 11780if test "${with_xim}" != "no"; then
b936fae4 11781
c0d27fcc 11782cat >>confdefs.h <<\_ACEOF
98418dba 11783#define USE_XIM 1
c0d27fcc 11784_ACEOF
98418dba 11785
793fa0d7 11786fi
abd39b57
AC
11787
11788
11789if test "${HAVE_XIM}" != "no"; then
849d80cf
DL
11790 late_CFLAGS=$CFLAGS
11791 if test "$GCC" = yes; then
11792 CFLAGS="$CFLAGS --pedantic-errors"
11793 fi
cffcede7 11794 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11795/* confdefs.h. */
11796_ACEOF
11797cat confdefs.h >>conftest.$ac_ext
11798cat >>conftest.$ac_ext <<_ACEOF
11799/* end confdefs.h. */
cffcede7
JD
11800
11801#include <X11/Xlib.h>
11802#include <X11/Xresource.h>
11803int
11804main ()
11805{
11806Display *display;
11807XrmDatabase db;
11808char *res_name;
11809char *res_class;
11810XIMProc callback;
11811XPointer *client_data;
849d80cf
DL
11812#ifndef __GNUC__
11813/* If we're not using GCC, it's probably not XFree86, and this is
11814 probably right, but we can't use something like --pedantic-errors. */
11815extern Bool XRegisterIMInstantiateCallback(Display*, XrmDatabase, char*,
11816 char*, XIMProc, XPointer*);
11817#endif
cffcede7
JD
11818(void)XRegisterIMInstantiateCallback(display, db, res_name, res_class, callback,
11819 client_data);
11820 ;
11821 return 0;
11822}
11823_ACEOF
11824rm -f conftest.$ac_objext
11825if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 11826 (eval $ac_compile) 2>conftest.er1
cffcede7 11827 ac_status=$?
edfaf76d
LK
11828 grep -v '^ *+' conftest.er1 >conftest.err
11829 rm -f conftest.er1
11830 cat conftest.err >&5
cffcede7
JD
11831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11832 (exit $ac_status); } &&
ec8fcb10
YM
11833 { ac_try='test -z "$ac_c_werror_flag"
11834 || test ! -s conftest.err'
edfaf76d
LK
11835 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11836 (eval $ac_try) 2>&5
11837 ac_status=$?
11838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11839 (exit $ac_status); }; } &&
11840 { ac_try='test -s conftest.$ac_objext'
cffcede7
JD
11841 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11842 (eval $ac_try) 2>&5
11843 ac_status=$?
11844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11845 (exit $ac_status); }; }; then
11846 emacs_cv_arg6_star=yes
11847else
11848 echo "$as_me: failed program was:" >&5
19650fd6
AS
11849sed 's/^/| /' conftest.$ac_ext >&5
11850
cffcede7 11851fi
edfaf76d 11852rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
cffcede7
JD
11853
11854 if test "$emacs_cv_arg6_star" = yes; then
f57bd967 11855 cat >>confdefs.h <<\_ACEOF
cffcede7
JD
11856#define XRegisterIMInstantiateCallback_arg6 XPointer*
11857_ACEOF
11858
11859 else
f57bd967 11860 cat >>confdefs.h <<\_ACEOF
cffcede7
JD
11861#define XRegisterIMInstantiateCallback_arg6 XPointer
11862_ACEOF
11863
11864 fi
849d80cf 11865 CFLAGS=$late_CFLAGS
98418dba
CW
11866fi
11867
11868### Use -lXpm if available, unless `--with-xpm=no'.
11869HAVE_XPM=no
11870if test "${HAVE_X11}" = "yes"; then
11871 if test "${with_xpm}" != "no"; then
c0d27fcc
MR
11872 if test "${ac_cv_header_X11_xpm_h+set}" = set; then
11873 echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
98418dba
CW
11874echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6
11875if test "${ac_cv_header_X11_xpm_h+set}" = set; then
11876 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
11877fi
11878echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
11879echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6
98418dba 11880else
c0d27fcc
MR
11881 # Is the header compilable?
11882echo "$as_me:$LINENO: checking X11/xpm.h usability" >&5
11883echo $ECHO_N "checking X11/xpm.h usability... $ECHO_C" >&6
11884cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11885/* confdefs.h. */
11886_ACEOF
11887cat confdefs.h >>conftest.$ac_ext
11888cat >>conftest.$ac_ext <<_ACEOF
11889/* end confdefs.h. */
c0d27fcc
MR
11890$ac_includes_default
11891#include <X11/xpm.h>
11892_ACEOF
11893rm -f conftest.$ac_objext
11894if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 11895 (eval $ac_compile) 2>conftest.er1
c0d27fcc 11896 ac_status=$?
edfaf76d
LK
11897 grep -v '^ *+' conftest.er1 >conftest.err
11898 rm -f conftest.er1
11899 cat conftest.err >&5
c0d27fcc
MR
11900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11901 (exit $ac_status); } &&
ec8fcb10
YM
11902 { ac_try='test -z "$ac_c_werror_flag"
11903 || test ! -s conftest.err'
edfaf76d
LK
11904 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11905 (eval $ac_try) 2>&5
11906 ac_status=$?
11907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11908 (exit $ac_status); }; } &&
11909 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
11910 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11911 (eval $ac_try) 2>&5
11912 ac_status=$?
11913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11914 (exit $ac_status); }; }; then
11915 ac_header_compiler=yes
11916else
11917 echo "$as_me: failed program was:" >&5
19650fd6
AS
11918sed 's/^/| /' conftest.$ac_ext >&5
11919
c0d27fcc
MR
11920ac_header_compiler=no
11921fi
edfaf76d 11922rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
11923echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11924echo "${ECHO_T}$ac_header_compiler" >&6
11925
11926# Is the header present?
11927echo "$as_me:$LINENO: checking X11/xpm.h presence" >&5
11928echo $ECHO_N "checking X11/xpm.h presence... $ECHO_C" >&6
11929cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11930/* confdefs.h. */
11931_ACEOF
11932cat confdefs.h >>conftest.$ac_ext
11933cat >>conftest.$ac_ext <<_ACEOF
11934/* end confdefs.h. */
98418dba
CW
11935#include <X11/xpm.h>
11936_ACEOF
c0d27fcc 11937if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
11938 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11939 ac_status=$?
6bae0ccf 11940 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
11941 rm -f conftest.er1
11942 cat conftest.err >&5
c0d27fcc 11943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
11944 (exit $ac_status); } >/dev/null; then
11945 if test -s conftest.err; then
11946 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 11947 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
11948 else
11949 ac_cpp_err=
11950 fi
11951else
11952 ac_cpp_err=yes
11953fi
11954if test -z "$ac_cpp_err"; then
c0d27fcc 11955 ac_header_preproc=yes
98418dba
CW
11956else
11957 echo "$as_me: failed program was:" >&5
19650fd6
AS
11958sed 's/^/| /' conftest.$ac_ext >&5
11959
c0d27fcc 11960 ac_header_preproc=no
98418dba
CW
11961fi
11962rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
11963echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11964echo "${ECHO_T}$ac_header_preproc" >&6
11965
11966# So? What about this header?
edfaf76d
LK
11967case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11968 yes:no: )
c0d27fcc
MR
11969 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: accepted by the compiler, rejected by the preprocessor!" >&5
11970echo "$as_me: WARNING: X11/xpm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
11971 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: proceeding with the compiler's result" >&5
11972echo "$as_me: WARNING: X11/xpm.h: proceeding with the compiler's result" >&2;}
11973 ac_header_preproc=yes
11974 ;;
11975 no:yes:* )
11976 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: present but cannot be compiled" >&5
11977echo "$as_me: WARNING: X11/xpm.h: present but cannot be compiled" >&2;}
11978 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: check for missing prerequisite headers?" >&5
11979echo "$as_me: WARNING: X11/xpm.h: check for missing prerequisite headers?" >&2;}
11980 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: see the Autoconf documentation" >&5
11981echo "$as_me: WARNING: X11/xpm.h: see the Autoconf documentation" >&2;}
11982 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: section \"Present But Cannot Be Compiled\"" >&5
11983echo "$as_me: WARNING: X11/xpm.h: section \"Present But Cannot Be Compiled\"" >&2;}
7c9e5167
JD
11984 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&5
11985echo "$as_me: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
11986 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: in the future, the compiler will take precedence" >&5
11987echo "$as_me: WARNING: X11/xpm.h: in the future, the compiler will take precedence" >&2;}
7c9e5167
JD
11988 (
11989 cat <<\_ASBOX
edfaf76d
LK
11990## ------------------------------------------ ##
11991## Report this to the AC_PACKAGE_NAME lists. ##
11992## ------------------------------------------ ##
19650fd6
AS
11993_ASBOX
11994 ) |
11995 sed "s/^/$as_me: WARNING: /" >&2
11996 ;;
c0d27fcc
MR
11997esac
11998echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
11999echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6
12000if test "${ac_cv_header_X11_xpm_h+set}" = set; then
12001 echo $ECHO_N "(cached) $ECHO_C" >&6
12002else
12003 ac_cv_header_X11_xpm_h=$ac_header_preproc
ba4481b5 12004fi
c0d27fcc 12005echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
98418dba 12006echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6
c0d27fcc
MR
12007
12008fi
98418dba 12009if test $ac_cv_header_X11_xpm_h = yes; then
c0d27fcc 12010 echo "$as_me:$LINENO: checking for XpmReadFileToPixmap in -lXpm" >&5
98418dba
CW
12011echo $ECHO_N "checking for XpmReadFileToPixmap in -lXpm... $ECHO_C" >&6
12012if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then
503d2be0 12013 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 12014else
98418dba
CW
12015 ac_check_lib_save_LIBS=$LIBS
12016LIBS="-lXpm -lX11 $LIBS"
12017cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12018/* confdefs.h. */
12019_ACEOF
12020cat confdefs.h >>conftest.$ac_ext
12021cat >>conftest.$ac_ext <<_ACEOF
12022/* end confdefs.h. */
98418dba 12023
ba4481b5 12024/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
12025#ifdef __cplusplus
12026extern "C"
12027#endif
ba4481b5 12028/* We use char because int might match the return type of a gcc2
503d2be0 12029 builtin and then its argument prototype would still apply. */
98418dba 12030char XpmReadFileToPixmap ();
503d2be0
AS
12031int
12032main ()
12033{
98418dba 12034XpmReadFileToPixmap ();
503d2be0
AS
12035 ;
12036 return 0;
12037}
12038_ACEOF
12039rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 12040if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 12041 (eval $ac_link) 2>conftest.er1
503d2be0 12042 ac_status=$?
edfaf76d
LK
12043 grep -v '^ *+' conftest.er1 >conftest.err
12044 rm -f conftest.er1
12045 cat conftest.err >&5
c0d27fcc 12046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12047 (exit $ac_status); } &&
ec8fcb10
YM
12048 { ac_try='test -z "$ac_c_werror_flag"
12049 || test ! -s conftest.err'
edfaf76d
LK
12050 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12051 (eval $ac_try) 2>&5
12052 ac_status=$?
12053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12054 (exit $ac_status); }; } &&
12055 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 12056 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
12057 (eval $ac_try) 2>&5
12058 ac_status=$?
c0d27fcc 12059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12060 (exit $ac_status); }; }; then
98418dba 12061 ac_cv_lib_Xpm_XpmReadFileToPixmap=yes
503d2be0
AS
12062else
12063 echo "$as_me: failed program was:" >&5
19650fd6
AS
12064sed 's/^/| /' conftest.$ac_ext >&5
12065
98418dba 12066ac_cv_lib_Xpm_XpmReadFileToPixmap=no
503d2be0 12067fi
edfaf76d
LK
12068rm -f conftest.err conftest.$ac_objext \
12069 conftest$ac_exeext conftest.$ac_ext
98418dba 12070LIBS=$ac_check_lib_save_LIBS
503d2be0 12071fi
c0d27fcc 12072echo "$as_me:$LINENO: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5
98418dba
CW
12073echo "${ECHO_T}$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6
12074if test $ac_cv_lib_Xpm_XpmReadFileToPixmap = yes; then
12075 HAVE_XPM=yes
ba4481b5
DL
12076fi
12077
98418dba
CW
12078fi
12079
c0d27fcc 12080
98418dba 12081 if test "${HAVE_XPM}" = "yes"; then
c0d27fcc 12082 echo "$as_me:$LINENO: checking for XpmReturnAllocPixels preprocessor define" >&5
98418dba
CW
12083echo $ECHO_N "checking for XpmReturnAllocPixels preprocessor define... $ECHO_C" >&6
12084 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12085/* confdefs.h. */
12086_ACEOF
12087cat confdefs.h >>conftest.$ac_ext
12088cat >>conftest.$ac_ext <<_ACEOF
12089/* end confdefs.h. */
98418dba
CW
12090#include "X11/xpm.h"
12091#ifndef XpmReturnAllocPixels
12092no_return_alloc_pixels
503d2be0 12093#endif
ba4481b5 12094
98418dba
CW
12095_ACEOF
12096if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 12097 $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then
98418dba
CW
12098 HAVE_XPM=no
12099else
12100 HAVE_XPM=yes
12101fi
12102rm -f conftest*
ba4481b5 12103
c0d27fcc 12104
98418dba 12105 if test "${HAVE_XPM}" = "yes"; then
c0d27fcc 12106 echo "$as_me:$LINENO: result: yes" >&5
98418dba
CW
12107echo "${ECHO_T}yes" >&6
12108 else
c0d27fcc 12109 echo "$as_me:$LINENO: result: no" >&5
98418dba
CW
12110echo "${ECHO_T}no" >&6
12111 fi
12112 fi
12113 fi
12114
12115 if test "${HAVE_XPM}" = "yes"; then
b936fae4 12116
c0d27fcc 12117cat >>confdefs.h <<\_ACEOF
98418dba 12118#define HAVE_XPM 1
c0d27fcc 12119_ACEOF
98418dba
CW
12120
12121 fi
12122fi
12123
12124### Use -ljpeg if available, unless `--with-jpeg=no'.
12125HAVE_JPEG=no
12126if test "${HAVE_X11}" = "yes"; then
12127 if test "${with_jpeg}" != "no"; then
c0d27fcc
MR
12128 if test "${ac_cv_header_jerror_h+set}" = set; then
12129 echo "$as_me:$LINENO: checking for jerror.h" >&5
98418dba
CW
12130echo $ECHO_N "checking for jerror.h... $ECHO_C" >&6
12131if test "${ac_cv_header_jerror_h+set}" = set; then
12132 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
12133fi
12134echo "$as_me:$LINENO: result: $ac_cv_header_jerror_h" >&5
12135echo "${ECHO_T}$ac_cv_header_jerror_h" >&6
503d2be0 12136else
c0d27fcc
MR
12137 # Is the header compilable?
12138echo "$as_me:$LINENO: checking jerror.h usability" >&5
12139echo $ECHO_N "checking jerror.h usability... $ECHO_C" >&6
12140cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12141/* confdefs.h. */
12142_ACEOF
12143cat confdefs.h >>conftest.$ac_ext
12144cat >>conftest.$ac_ext <<_ACEOF
12145/* end confdefs.h. */
c0d27fcc
MR
12146$ac_includes_default
12147#include <jerror.h>
12148_ACEOF
12149rm -f conftest.$ac_objext
12150if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 12151 (eval $ac_compile) 2>conftest.er1
c0d27fcc 12152 ac_status=$?
edfaf76d
LK
12153 grep -v '^ *+' conftest.er1 >conftest.err
12154 rm -f conftest.er1
12155 cat conftest.err >&5
c0d27fcc
MR
12156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12157 (exit $ac_status); } &&
ec8fcb10
YM
12158 { ac_try='test -z "$ac_c_werror_flag"
12159 || test ! -s conftest.err'
edfaf76d
LK
12160 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12161 (eval $ac_try) 2>&5
12162 ac_status=$?
12163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12164 (exit $ac_status); }; } &&
12165 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
12166 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12167 (eval $ac_try) 2>&5
12168 ac_status=$?
12169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12170 (exit $ac_status); }; }; then
12171 ac_header_compiler=yes
12172else
12173 echo "$as_me: failed program was:" >&5
19650fd6
AS
12174sed 's/^/| /' conftest.$ac_ext >&5
12175
c0d27fcc
MR
12176ac_header_compiler=no
12177fi
edfaf76d 12178rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
12179echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12180echo "${ECHO_T}$ac_header_compiler" >&6
12181
12182# Is the header present?
12183echo "$as_me:$LINENO: checking jerror.h presence" >&5
12184echo $ECHO_N "checking jerror.h presence... $ECHO_C" >&6
12185cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12186/* confdefs.h. */
12187_ACEOF
12188cat confdefs.h >>conftest.$ac_ext
12189cat >>conftest.$ac_ext <<_ACEOF
12190/* end confdefs.h. */
98418dba
CW
12191#include <jerror.h>
12192_ACEOF
c0d27fcc 12193if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
12194 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12195 ac_status=$?
6bae0ccf 12196 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
12197 rm -f conftest.er1
12198 cat conftest.err >&5
c0d27fcc 12199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
12200 (exit $ac_status); } >/dev/null; then
12201 if test -s conftest.err; then
12202 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 12203 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
12204 else
12205 ac_cpp_err=
12206 fi
12207else
12208 ac_cpp_err=yes
503d2be0 12209fi
98418dba 12210if test -z "$ac_cpp_err"; then
c0d27fcc 12211 ac_header_preproc=yes
ba4481b5 12212else
98418dba 12213 echo "$as_me: failed program was:" >&5
19650fd6
AS
12214sed 's/^/| /' conftest.$ac_ext >&5
12215
c0d27fcc 12216 ac_header_preproc=no
98418dba
CW
12217fi
12218rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
12219echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12220echo "${ECHO_T}$ac_header_preproc" >&6
12221
12222# So? What about this header?
edfaf76d
LK
12223case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12224 yes:no: )
c0d27fcc
MR
12225 { echo "$as_me:$LINENO: WARNING: jerror.h: accepted by the compiler, rejected by the preprocessor!" >&5
12226echo "$as_me: WARNING: jerror.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
12227 { echo "$as_me:$LINENO: WARNING: jerror.h: proceeding with the compiler's result" >&5
12228echo "$as_me: WARNING: jerror.h: proceeding with the compiler's result" >&2;}
12229 ac_header_preproc=yes
19650fd6 12230 ;;
edfaf76d 12231 no:yes:* )
c0d27fcc
MR
12232 { echo "$as_me:$LINENO: WARNING: jerror.h: present but cannot be compiled" >&5
12233echo "$as_me: WARNING: jerror.h: present but cannot be compiled" >&2;}
edfaf76d
LK
12234 { echo "$as_me:$LINENO: WARNING: jerror.h: check for missing prerequisite headers?" >&5
12235echo "$as_me: WARNING: jerror.h: check for missing prerequisite headers?" >&2;}
12236 { echo "$as_me:$LINENO: WARNING: jerror.h: see the Autoconf documentation" >&5
12237echo "$as_me: WARNING: jerror.h: see the Autoconf documentation" >&2;}
12238 { echo "$as_me:$LINENO: WARNING: jerror.h: section \"Present But Cannot Be Compiled\"" >&5
12239echo "$as_me: WARNING: jerror.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 12240 { echo "$as_me:$LINENO: WARNING: jerror.h: proceeding with the preprocessor's result" >&5
19650fd6 12241echo "$as_me: WARNING: jerror.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
12242 { echo "$as_me:$LINENO: WARNING: jerror.h: in the future, the compiler will take precedence" >&5
12243echo "$as_me: WARNING: jerror.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
12244 (
12245 cat <<\_ASBOX
edfaf76d
LK
12246## ------------------------------------------ ##
12247## Report this to the AC_PACKAGE_NAME lists. ##
12248## ------------------------------------------ ##
19650fd6
AS
12249_ASBOX
12250 ) |
12251 sed "s/^/$as_me: WARNING: /" >&2
12252 ;;
c0d27fcc
MR
12253esac
12254echo "$as_me:$LINENO: checking for jerror.h" >&5
12255echo $ECHO_N "checking for jerror.h... $ECHO_C" >&6
12256if test "${ac_cv_header_jerror_h+set}" = set; then
12257 echo $ECHO_N "(cached) $ECHO_C" >&6
12258else
12259 ac_cv_header_jerror_h=$ac_header_preproc
ba4481b5 12260fi
c0d27fcc 12261echo "$as_me:$LINENO: result: $ac_cv_header_jerror_h" >&5
98418dba 12262echo "${ECHO_T}$ac_cv_header_jerror_h" >&6
c0d27fcc
MR
12263
12264fi
98418dba 12265if test $ac_cv_header_jerror_h = yes; then
c0d27fcc 12266 echo "$as_me:$LINENO: checking for jpeg_destroy_compress in -ljpeg" >&5
98418dba
CW
12267echo $ECHO_N "checking for jpeg_destroy_compress in -ljpeg... $ECHO_C" >&6
12268if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then
503d2be0 12269 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 12270else
98418dba
CW
12271 ac_check_lib_save_LIBS=$LIBS
12272LIBS="-ljpeg $LIBS"
12273cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12274/* confdefs.h. */
12275_ACEOF
12276cat confdefs.h >>conftest.$ac_ext
12277cat >>conftest.$ac_ext <<_ACEOF
12278/* end confdefs.h. */
98418dba
CW
12279
12280/* Override any gcc2 internal prototype to avoid an error. */
12281#ifdef __cplusplus
12282extern "C"
12283#endif
12284/* We use char because int might match the return type of a gcc2
12285 builtin and then its argument prototype would still apply. */
12286char jpeg_destroy_compress ();
503d2be0
AS
12287int
12288main ()
12289{
98418dba 12290jpeg_destroy_compress ();
503d2be0
AS
12291 ;
12292 return 0;
12293}
12294_ACEOF
12295rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 12296if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 12297 (eval $ac_link) 2>conftest.er1
503d2be0 12298 ac_status=$?
edfaf76d
LK
12299 grep -v '^ *+' conftest.er1 >conftest.err
12300 rm -f conftest.er1
12301 cat conftest.err >&5
c0d27fcc 12302 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12303 (exit $ac_status); } &&
ec8fcb10
YM
12304 { ac_try='test -z "$ac_c_werror_flag"
12305 || test ! -s conftest.err'
edfaf76d
LK
12306 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12307 (eval $ac_try) 2>&5
12308 ac_status=$?
12309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12310 (exit $ac_status); }; } &&
12311 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 12312 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
12313 (eval $ac_try) 2>&5
12314 ac_status=$?
c0d27fcc 12315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12316 (exit $ac_status); }; }; then
98418dba 12317 ac_cv_lib_jpeg_jpeg_destroy_compress=yes
ba4481b5 12318else
503d2be0 12319 echo "$as_me: failed program was:" >&5
19650fd6
AS
12320sed 's/^/| /' conftest.$ac_ext >&5
12321
98418dba 12322ac_cv_lib_jpeg_jpeg_destroy_compress=no
ba4481b5 12323fi
edfaf76d
LK
12324rm -f conftest.err conftest.$ac_objext \
12325 conftest$ac_exeext conftest.$ac_ext
98418dba 12326LIBS=$ac_check_lib_save_LIBS
ba4481b5 12327fi
c0d27fcc 12328echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5
98418dba
CW
12329echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6
12330if test $ac_cv_lib_jpeg_jpeg_destroy_compress = yes; then
12331 HAVE_JPEG=yes
ba4481b5 12332fi
98418dba 12333
ba4481b5 12334fi
98418dba 12335
c0d27fcc 12336
ba4481b5 12337 fi
ba4481b5 12338
c0d27fcc 12339
98418dba 12340 if test "${HAVE_JPEG}" = "yes"; then
c0d27fcc 12341 cat >>confdefs.h <<\_ACEOF
98418dba 12342#define HAVE_JPEG 1
c0d27fcc 12343_ACEOF
98418dba
CW
12344
12345 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12346/* confdefs.h. */
12347_ACEOF
12348cat confdefs.h >>conftest.$ac_ext
12349cat >>conftest.$ac_ext <<_ACEOF
12350/* end confdefs.h. */
22044edf 12351#include <jpeglib.h>
98418dba
CW
12352 version=JPEG_LIB_VERSION
12353
12354_ACEOF
12355if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 12356 $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then
c0d27fcc 12357 cat >>confdefs.h <<\_ACEOF
98418dba 12358#define HAVE_JPEG 1
c0d27fcc 12359_ACEOF
ba4481b5 12360
98418dba 12361else
c0d27fcc 12362 { echo "$as_me:$LINENO: WARNING: libjpeg found, but not version 6b or later" >&5
98418dba
CW
12363echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;}
12364 HAVE_JPEG=no
ba4481b5 12365fi
98418dba 12366rm -f conftest*
ba4481b5 12367
98418dba
CW
12368 fi
12369fi
503d2be0 12370
98418dba
CW
12371### Use -lpng if available, unless `--with-png=no'.
12372HAVE_PNG=no
12373if test "${HAVE_X11}" = "yes"; then
12374 if test "${with_png}" != "no"; then
f57bd967
DL
12375 # Debian unstable as of July 2003 has multiple libpngs, and puts png.h
12376 # in /usr/include/libpng.
12377
12378
12379for ac_header in png.h libpng/png.h
12380do
12381as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12382if eval "test \"\${$as_ac_Header+set}\" = set"; then
12383 echo "$as_me:$LINENO: checking for $ac_header" >&5
12384echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12385if eval "test \"\${$as_ac_Header+set}\" = set"; then
503d2be0 12386 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 12387fi
f57bd967
DL
12388echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12389echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
503d2be0 12390else
c0d27fcc 12391 # Is the header compilable?
f57bd967
DL
12392echo "$as_me:$LINENO: checking $ac_header usability" >&5
12393echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
c0d27fcc 12394cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12395/* confdefs.h. */
12396_ACEOF
12397cat confdefs.h >>conftest.$ac_ext
12398cat >>conftest.$ac_ext <<_ACEOF
12399/* end confdefs.h. */
c0d27fcc 12400$ac_includes_default
f57bd967 12401#include <$ac_header>
c0d27fcc
MR
12402_ACEOF
12403rm -f conftest.$ac_objext
12404if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 12405 (eval $ac_compile) 2>conftest.er1
c0d27fcc 12406 ac_status=$?
edfaf76d
LK
12407 grep -v '^ *+' conftest.er1 >conftest.err
12408 rm -f conftest.er1
12409 cat conftest.err >&5
c0d27fcc
MR
12410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12411 (exit $ac_status); } &&
ec8fcb10
YM
12412 { ac_try='test -z "$ac_c_werror_flag"
12413 || test ! -s conftest.err'
edfaf76d
LK
12414 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12415 (eval $ac_try) 2>&5
12416 ac_status=$?
12417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12418 (exit $ac_status); }; } &&
12419 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
12420 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12421 (eval $ac_try) 2>&5
12422 ac_status=$?
12423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12424 (exit $ac_status); }; }; then
12425 ac_header_compiler=yes
12426else
12427 echo "$as_me: failed program was:" >&5
19650fd6
AS
12428sed 's/^/| /' conftest.$ac_ext >&5
12429
c0d27fcc
MR
12430ac_header_compiler=no
12431fi
edfaf76d 12432rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
12433echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12434echo "${ECHO_T}$ac_header_compiler" >&6
12435
12436# Is the header present?
f57bd967
DL
12437echo "$as_me:$LINENO: checking $ac_header presence" >&5
12438echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
c0d27fcc 12439cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12440/* confdefs.h. */
12441_ACEOF
12442cat confdefs.h >>conftest.$ac_ext
12443cat >>conftest.$ac_ext <<_ACEOF
12444/* end confdefs.h. */
f57bd967 12445#include <$ac_header>
503d2be0 12446_ACEOF
c0d27fcc 12447if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
12448 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12449 ac_status=$?
6bae0ccf 12450 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
12451 rm -f conftest.er1
12452 cat conftest.err >&5
c0d27fcc 12453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
12454 (exit $ac_status); } >/dev/null; then
12455 if test -s conftest.err; then
12456 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 12457 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
12458 else
12459 ac_cpp_err=
12460 fi
12461else
12462 ac_cpp_err=yes
12463fi
12464if test -z "$ac_cpp_err"; then
c0d27fcc 12465 ac_header_preproc=yes
503d2be0
AS
12466else
12467 echo "$as_me: failed program was:" >&5
19650fd6
AS
12468sed 's/^/| /' conftest.$ac_ext >&5
12469
c0d27fcc 12470 ac_header_preproc=no
ba4481b5 12471fi
503d2be0 12472rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
12473echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12474echo "${ECHO_T}$ac_header_preproc" >&6
12475
12476# So? What about this header?
edfaf76d
LK
12477case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12478 yes:no: )
f57bd967
DL
12479 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
12480echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
12481 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
12482echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
12483 ac_header_preproc=yes
19650fd6 12484 ;;
edfaf76d 12485 no:yes:* )
f57bd967
DL
12486 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
12487echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
12488 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
12489echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
12490 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
12491echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
12492 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
12493echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
f57bd967 12494 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 12495echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
12496 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
12497echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
12498 (
12499 cat <<\_ASBOX
edfaf76d
LK
12500## ------------------------------------------ ##
12501## Report this to the AC_PACKAGE_NAME lists. ##
12502## ------------------------------------------ ##
19650fd6
AS
12503_ASBOX
12504 ) |
12505 sed "s/^/$as_me: WARNING: /" >&2
12506 ;;
c0d27fcc 12507esac
f57bd967
DL
12508echo "$as_me:$LINENO: checking for $ac_header" >&5
12509echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12510if eval "test \"\${$as_ac_Header+set}\" = set"; then
c0d27fcc
MR
12511 echo $ECHO_N "(cached) $ECHO_C" >&6
12512else
edfaf76d 12513 eval "$as_ac_Header=\$ac_header_preproc"
f57bd967
DL
12514fi
12515echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12516echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12517
ba4481b5 12518fi
f57bd967
DL
12519if test `eval echo '${'$as_ac_Header'}'` = yes; then
12520 cat >>confdefs.h <<_ACEOF
12521#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12522_ACEOF
c0d27fcc
MR
12523
12524fi
f57bd967
DL
12525
12526done
12527
12528 if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then
12529 echo "$as_me:$LINENO: checking for png_get_channels in -lpng" >&5
98418dba
CW
12530echo $ECHO_N "checking for png_get_channels in -lpng... $ECHO_C" >&6
12531if test "${ac_cv_lib_png_png_get_channels+set}" = set; then
503d2be0 12532 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 12533else
98418dba
CW
12534 ac_check_lib_save_LIBS=$LIBS
12535LIBS="-lpng -lz -lm $LIBS"
12536cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12537/* confdefs.h. */
12538_ACEOF
12539cat confdefs.h >>conftest.$ac_ext
12540cat >>conftest.$ac_ext <<_ACEOF
12541/* end confdefs.h. */
98418dba 12542
ba4481b5 12543/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
12544#ifdef __cplusplus
12545extern "C"
12546#endif
ba4481b5 12547/* We use char because int might match the return type of a gcc2
503d2be0 12548 builtin and then its argument prototype would still apply. */
98418dba 12549char png_get_channels ();
503d2be0
AS
12550int
12551main ()
12552{
98418dba 12553png_get_channels ();
503d2be0
AS
12554 ;
12555 return 0;
12556}
12557_ACEOF
12558rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 12559if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 12560 (eval $ac_link) 2>conftest.er1
503d2be0 12561 ac_status=$?
edfaf76d
LK
12562 grep -v '^ *+' conftest.er1 >conftest.err
12563 rm -f conftest.er1
12564 cat conftest.err >&5
c0d27fcc 12565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 12566 (exit $ac_status); } &&
ec8fcb10
YM
12567 { ac_try='test -z "$ac_c_werror_flag"
12568 || test ! -s conftest.err'
edfaf76d
LK
12569 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12570 (eval $ac_try) 2>&5
12571 ac_status=$?
12572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12573 (exit $ac_status); }; } &&
12574 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 12575 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
12576 (eval $ac_try) 2>&5
12577 ac_status=$?
c0d27fcc 12578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12579 (exit $ac_status); }; }; then
98418dba 12580 ac_cv_lib_png_png_get_channels=yes
73b77ee5 12581else
98418dba 12582 echo "$as_me: failed program was:" >&5
19650fd6
AS
12583sed 's/^/| /' conftest.$ac_ext >&5
12584
98418dba 12585ac_cv_lib_png_png_get_channels=no
73b77ee5 12586fi
edfaf76d
LK
12587rm -f conftest.err conftest.$ac_objext \
12588 conftest$ac_exeext conftest.$ac_ext
98418dba 12589LIBS=$ac_check_lib_save_LIBS
73b77ee5 12590fi
c0d27fcc 12591echo "$as_me:$LINENO: result: $ac_cv_lib_png_png_get_channels" >&5
98418dba
CW
12592echo "${ECHO_T}$ac_cv_lib_png_png_get_channels" >&6
12593if test $ac_cv_lib_png_png_get_channels = yes; then
12594 HAVE_PNG=yes
73b77ee5 12595fi
503d2be0 12596
f57bd967 12597 fi
98418dba
CW
12598 fi
12599
12600 if test "${HAVE_PNG}" = "yes"; then
b936fae4 12601
c0d27fcc 12602cat >>confdefs.h <<\_ACEOF
98418dba 12603#define HAVE_PNG 1
c0d27fcc 12604_ACEOF
73b77ee5 12605
98418dba 12606 fi
73b77ee5
GM
12607fi
12608
98418dba
CW
12609### Use -ltiff if available, unless `--with-tiff=no'.
12610HAVE_TIFF=no
12611if test "${HAVE_X11}" = "yes"; then
12612 if test "${with_tiff}" != "no"; then
c0d27fcc
MR
12613 if test "${ac_cv_header_tiffio_h+set}" = set; then
12614 echo "$as_me:$LINENO: checking for tiffio.h" >&5
98418dba
CW
12615echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6
12616if test "${ac_cv_header_tiffio_h+set}" = set; then
12617 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
12618fi
12619echo "$as_me:$LINENO: result: $ac_cv_header_tiffio_h" >&5
12620echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6
98418dba 12621else
c0d27fcc
MR
12622 # Is the header compilable?
12623echo "$as_me:$LINENO: checking tiffio.h usability" >&5
12624echo $ECHO_N "checking tiffio.h usability... $ECHO_C" >&6
12625cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12626/* confdefs.h. */
12627_ACEOF
12628cat confdefs.h >>conftest.$ac_ext
12629cat >>conftest.$ac_ext <<_ACEOF
12630/* end confdefs.h. */
c0d27fcc
MR
12631$ac_includes_default
12632#include <tiffio.h>
12633_ACEOF
12634rm -f conftest.$ac_objext
12635if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 12636 (eval $ac_compile) 2>conftest.er1
c0d27fcc 12637 ac_status=$?
edfaf76d
LK
12638 grep -v '^ *+' conftest.er1 >conftest.err
12639 rm -f conftest.er1
12640 cat conftest.err >&5
c0d27fcc
MR
12641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12642 (exit $ac_status); } &&
ec8fcb10
YM
12643 { ac_try='test -z "$ac_c_werror_flag"
12644 || test ! -s conftest.err'
edfaf76d
LK
12645 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12646 (eval $ac_try) 2>&5
12647 ac_status=$?
12648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12649 (exit $ac_status); }; } &&
12650 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
12651 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12652 (eval $ac_try) 2>&5
12653 ac_status=$?
12654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12655 (exit $ac_status); }; }; then
12656 ac_header_compiler=yes
12657else
12658 echo "$as_me: failed program was:" >&5
19650fd6
AS
12659sed 's/^/| /' conftest.$ac_ext >&5
12660
c0d27fcc
MR
12661ac_header_compiler=no
12662fi
edfaf76d 12663rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
12664echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12665echo "${ECHO_T}$ac_header_compiler" >&6
12666
12667# Is the header present?
12668echo "$as_me:$LINENO: checking tiffio.h presence" >&5
12669echo $ECHO_N "checking tiffio.h presence... $ECHO_C" >&6
12670cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12671/* confdefs.h. */
12672_ACEOF
12673cat confdefs.h >>conftest.$ac_ext
12674cat >>conftest.$ac_ext <<_ACEOF
12675/* end confdefs.h. */
98418dba
CW
12676#include <tiffio.h>
12677_ACEOF
c0d27fcc 12678if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
12679 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12680 ac_status=$?
6bae0ccf 12681 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
12682 rm -f conftest.er1
12683 cat conftest.err >&5
c0d27fcc 12684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
12685 (exit $ac_status); } >/dev/null; then
12686 if test -s conftest.err; then
12687 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 12688 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
12689 else
12690 ac_cpp_err=
12691 fi
12692else
12693 ac_cpp_err=yes
12694fi
12695if test -z "$ac_cpp_err"; then
c0d27fcc 12696 ac_header_preproc=yes
98418dba
CW
12697else
12698 echo "$as_me: failed program was:" >&5
19650fd6
AS
12699sed 's/^/| /' conftest.$ac_ext >&5
12700
c0d27fcc 12701 ac_header_preproc=no
98418dba
CW
12702fi
12703rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
12704echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12705echo "${ECHO_T}$ac_header_preproc" >&6
12706
12707# So? What about this header?
edfaf76d
LK
12708case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12709 yes:no: )
c0d27fcc
MR
12710 { echo "$as_me:$LINENO: WARNING: tiffio.h: accepted by the compiler, rejected by the preprocessor!" >&5
12711echo "$as_me: WARNING: tiffio.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
12712 { echo "$as_me:$LINENO: WARNING: tiffio.h: proceeding with the compiler's result" >&5
12713echo "$as_me: WARNING: tiffio.h: proceeding with the compiler's result" >&2;}
12714 ac_header_preproc=yes
19650fd6 12715 ;;
edfaf76d 12716 no:yes:* )
c0d27fcc
MR
12717 { echo "$as_me:$LINENO: WARNING: tiffio.h: present but cannot be compiled" >&5
12718echo "$as_me: WARNING: tiffio.h: present but cannot be compiled" >&2;}
edfaf76d
LK
12719 { echo "$as_me:$LINENO: WARNING: tiffio.h: check for missing prerequisite headers?" >&5
12720echo "$as_me: WARNING: tiffio.h: check for missing prerequisite headers?" >&2;}
12721 { echo "$as_me:$LINENO: WARNING: tiffio.h: see the Autoconf documentation" >&5
12722echo "$as_me: WARNING: tiffio.h: see the Autoconf documentation" >&2;}
12723 { echo "$as_me:$LINENO: WARNING: tiffio.h: section \"Present But Cannot Be Compiled\"" >&5
12724echo "$as_me: WARNING: tiffio.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 12725 { echo "$as_me:$LINENO: WARNING: tiffio.h: proceeding with the preprocessor's result" >&5
19650fd6 12726echo "$as_me: WARNING: tiffio.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
12727 { echo "$as_me:$LINENO: WARNING: tiffio.h: in the future, the compiler will take precedence" >&5
12728echo "$as_me: WARNING: tiffio.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
12729 (
12730 cat <<\_ASBOX
edfaf76d
LK
12731## ------------------------------------------ ##
12732## Report this to the AC_PACKAGE_NAME lists. ##
12733## ------------------------------------------ ##
19650fd6
AS
12734_ASBOX
12735 ) |
12736 sed "s/^/$as_me: WARNING: /" >&2
12737 ;;
c0d27fcc
MR
12738esac
12739echo "$as_me:$LINENO: checking for tiffio.h" >&5
12740echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6
12741if test "${ac_cv_header_tiffio_h+set}" = set; then
12742 echo $ECHO_N "(cached) $ECHO_C" >&6
12743else
12744 ac_cv_header_tiffio_h=$ac_header_preproc
98418dba 12745fi
c0d27fcc 12746echo "$as_me:$LINENO: result: $ac_cv_header_tiffio_h" >&5
98418dba 12747echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6
c0d27fcc
MR
12748
12749fi
98418dba
CW
12750if test $ac_cv_header_tiffio_h = yes; then
12751 tifflibs="-lz -lm"
12752 # At least one tiff package requires the jpeg library.
12753 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
c0d27fcc 12754 echo "$as_me:$LINENO: checking for TIFFGetVersion in -ltiff" >&5
98418dba
CW
12755echo $ECHO_N "checking for TIFFGetVersion in -ltiff... $ECHO_C" >&6
12756if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then
503d2be0 12757 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 12758else
503d2be0 12759 ac_check_lib_save_LIBS=$LIBS
98418dba 12760LIBS="-ltiff $tifflibs $LIBS"
503d2be0 12761cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12762/* confdefs.h. */
12763_ACEOF
12764cat confdefs.h >>conftest.$ac_ext
12765cat >>conftest.$ac_ext <<_ACEOF
12766/* end confdefs.h. */
503d2be0 12767
73b77ee5 12768/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
12769#ifdef __cplusplus
12770extern "C"
12771#endif
73b77ee5 12772/* We use char because int might match the return type of a gcc2
503d2be0 12773 builtin and then its argument prototype would still apply. */
98418dba 12774char TIFFGetVersion ();
503d2be0
AS
12775int
12776main ()
12777{
98418dba 12778TIFFGetVersion ();
503d2be0
AS
12779 ;
12780 return 0;
12781}
12782_ACEOF
12783rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 12784if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 12785 (eval $ac_link) 2>conftest.er1
503d2be0 12786 ac_status=$?
edfaf76d
LK
12787 grep -v '^ *+' conftest.er1 >conftest.err
12788 rm -f conftest.er1
12789 cat conftest.err >&5
c0d27fcc 12790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12791 (exit $ac_status); } &&
ec8fcb10
YM
12792 { ac_try='test -z "$ac_c_werror_flag"
12793 || test ! -s conftest.err'
edfaf76d
LK
12794 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12795 (eval $ac_try) 2>&5
12796 ac_status=$?
12797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12798 (exit $ac_status); }; } &&
12799 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 12800 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
12801 (eval $ac_try) 2>&5
12802 ac_status=$?
c0d27fcc 12803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12804 (exit $ac_status); }; }; then
98418dba 12805 ac_cv_lib_tiff_TIFFGetVersion=yes
503d2be0
AS
12806else
12807 echo "$as_me: failed program was:" >&5
19650fd6
AS
12808sed 's/^/| /' conftest.$ac_ext >&5
12809
98418dba 12810ac_cv_lib_tiff_TIFFGetVersion=no
503d2be0 12811fi
edfaf76d
LK
12812rm -f conftest.err conftest.$ac_objext \
12813 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
12814LIBS=$ac_check_lib_save_LIBS
12815fi
c0d27fcc 12816echo "$as_me:$LINENO: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5
98418dba
CW
12817echo "${ECHO_T}$ac_cv_lib_tiff_TIFFGetVersion" >&6
12818if test $ac_cv_lib_tiff_TIFFGetVersion = yes; then
12819 HAVE_TIFF=yes
12820fi
12821
12822fi
73b77ee5 12823
c0d27fcc 12824
98418dba
CW
12825 fi
12826
12827 if test "${HAVE_TIFF}" = "yes"; then
b936fae4 12828
c0d27fcc 12829cat >>confdefs.h <<\_ACEOF
98418dba 12830#define HAVE_TIFF 1
c0d27fcc 12831_ACEOF
98418dba
CW
12832
12833 fi
73b77ee5
GM
12834fi
12835
98418dba
CW
12836### Use -lgif if available, unless `--with-gif=no'.
12837HAVE_GIF=no
12838if test "${HAVE_X11}" = "yes"; then
12839 if test "${with_gif}" != "no"; then
c0d27fcc
MR
12840 if test "${ac_cv_header_gif_lib_h+set}" = set; then
12841 echo "$as_me:$LINENO: checking for gif_lib.h" >&5
98418dba
CW
12842echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6
12843if test "${ac_cv_header_gif_lib_h+set}" = set; then
12844 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
12845fi
12846echo "$as_me:$LINENO: result: $ac_cv_header_gif_lib_h" >&5
12847echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6
98418dba 12848else
c0d27fcc
MR
12849 # Is the header compilable?
12850echo "$as_me:$LINENO: checking gif_lib.h usability" >&5
12851echo $ECHO_N "checking gif_lib.h usability... $ECHO_C" >&6
12852cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12853/* confdefs.h. */
12854_ACEOF
12855cat confdefs.h >>conftest.$ac_ext
12856cat >>conftest.$ac_ext <<_ACEOF
12857/* end confdefs.h. */
c0d27fcc
MR
12858$ac_includes_default
12859#include <gif_lib.h>
12860_ACEOF
12861rm -f conftest.$ac_objext
12862if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 12863 (eval $ac_compile) 2>conftest.er1
c0d27fcc 12864 ac_status=$?
edfaf76d
LK
12865 grep -v '^ *+' conftest.er1 >conftest.err
12866 rm -f conftest.er1
12867 cat conftest.err >&5
c0d27fcc
MR
12868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12869 (exit $ac_status); } &&
ec8fcb10
YM
12870 { ac_try='test -z "$ac_c_werror_flag"
12871 || test ! -s conftest.err'
edfaf76d
LK
12872 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12873 (eval $ac_try) 2>&5
12874 ac_status=$?
12875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12876 (exit $ac_status); }; } &&
12877 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
12878 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12879 (eval $ac_try) 2>&5
12880 ac_status=$?
12881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12882 (exit $ac_status); }; }; then
12883 ac_header_compiler=yes
12884else
12885 echo "$as_me: failed program was:" >&5
19650fd6
AS
12886sed 's/^/| /' conftest.$ac_ext >&5
12887
c0d27fcc
MR
12888ac_header_compiler=no
12889fi
edfaf76d 12890rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
12891echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12892echo "${ECHO_T}$ac_header_compiler" >&6
12893
12894# Is the header present?
12895echo "$as_me:$LINENO: checking gif_lib.h presence" >&5
12896echo $ECHO_N "checking gif_lib.h presence... $ECHO_C" >&6
12897cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12898/* confdefs.h. */
12899_ACEOF
12900cat confdefs.h >>conftest.$ac_ext
12901cat >>conftest.$ac_ext <<_ACEOF
12902/* end confdefs.h. */
98418dba
CW
12903#include <gif_lib.h>
12904_ACEOF
c0d27fcc 12905if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
12906 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12907 ac_status=$?
6bae0ccf 12908 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
12909 rm -f conftest.er1
12910 cat conftest.err >&5
c0d27fcc 12911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
12912 (exit $ac_status); } >/dev/null; then
12913 if test -s conftest.err; then
12914 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 12915 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
12916 else
12917 ac_cpp_err=
12918 fi
12919else
12920 ac_cpp_err=yes
12921fi
12922if test -z "$ac_cpp_err"; then
c0d27fcc 12923 ac_header_preproc=yes
98418dba
CW
12924else
12925 echo "$as_me: failed program was:" >&5
19650fd6
AS
12926sed 's/^/| /' conftest.$ac_ext >&5
12927
c0d27fcc 12928 ac_header_preproc=no
98418dba
CW
12929fi
12930rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
12931echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12932echo "${ECHO_T}$ac_header_preproc" >&6
12933
12934# So? What about this header?
edfaf76d
LK
12935case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12936 yes:no: )
c0d27fcc
MR
12937 { echo "$as_me:$LINENO: WARNING: gif_lib.h: accepted by the compiler, rejected by the preprocessor!" >&5
12938echo "$as_me: WARNING: gif_lib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
12939 { echo "$as_me:$LINENO: WARNING: gif_lib.h: proceeding with the compiler's result" >&5
12940echo "$as_me: WARNING: gif_lib.h: proceeding with the compiler's result" >&2;}
12941 ac_header_preproc=yes
19650fd6 12942 ;;
edfaf76d 12943 no:yes:* )
c0d27fcc
MR
12944 { echo "$as_me:$LINENO: WARNING: gif_lib.h: present but cannot be compiled" >&5
12945echo "$as_me: WARNING: gif_lib.h: present but cannot be compiled" >&2;}
edfaf76d
LK
12946 { echo "$as_me:$LINENO: WARNING: gif_lib.h: check for missing prerequisite headers?" >&5
12947echo "$as_me: WARNING: gif_lib.h: check for missing prerequisite headers?" >&2;}
12948 { echo "$as_me:$LINENO: WARNING: gif_lib.h: see the Autoconf documentation" >&5
12949echo "$as_me: WARNING: gif_lib.h: see the Autoconf documentation" >&2;}
12950 { echo "$as_me:$LINENO: WARNING: gif_lib.h: section \"Present But Cannot Be Compiled\"" >&5
12951echo "$as_me: WARNING: gif_lib.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 12952 { echo "$as_me:$LINENO: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&5
19650fd6 12953echo "$as_me: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
12954 { echo "$as_me:$LINENO: WARNING: gif_lib.h: in the future, the compiler will take precedence" >&5
12955echo "$as_me: WARNING: gif_lib.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
12956 (
12957 cat <<\_ASBOX
edfaf76d
LK
12958## ------------------------------------------ ##
12959## Report this to the AC_PACKAGE_NAME lists. ##
12960## ------------------------------------------ ##
19650fd6
AS
12961_ASBOX
12962 ) |
12963 sed "s/^/$as_me: WARNING: /" >&2
12964 ;;
c0d27fcc
MR
12965esac
12966echo "$as_me:$LINENO: checking for gif_lib.h" >&5
12967echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6
12968if test "${ac_cv_header_gif_lib_h+set}" = set; then
12969 echo $ECHO_N "(cached) $ECHO_C" >&6
12970else
12971 ac_cv_header_gif_lib_h=$ac_header_preproc
98418dba 12972fi
c0d27fcc 12973echo "$as_me:$LINENO: result: $ac_cv_header_gif_lib_h" >&5
98418dba 12974echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6
c0d27fcc
MR
12975
12976fi
98418dba
CW
12977if test $ac_cv_header_gif_lib_h = yes; then
12978 # EGifPutExtensionLast only exists from version libungif-4.1.0b1.
12979# Earlier versions can crash Emacs.
c0d27fcc 12980 echo "$as_me:$LINENO: checking for EGifPutExtensionLast in -lungif" >&5
98418dba
CW
12981echo $ECHO_N "checking for EGifPutExtensionLast in -lungif... $ECHO_C" >&6
12982if test "${ac_cv_lib_ungif_EGifPutExtensionLast+set}" = set; then
503d2be0 12983 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 12984else
503d2be0 12985 ac_check_lib_save_LIBS=$LIBS
98418dba 12986LIBS="-lungif $LIBS"
503d2be0 12987cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12988/* confdefs.h. */
12989_ACEOF
12990cat confdefs.h >>conftest.$ac_ext
12991cat >>conftest.$ac_ext <<_ACEOF
12992/* end confdefs.h. */
73b77ee5 12993
98418dba
CW
12994/* Override any gcc2 internal prototype to avoid an error. */
12995#ifdef __cplusplus
12996extern "C"
12997#endif
12998/* We use char because int might match the return type of a gcc2
12999 builtin and then its argument prototype would still apply. */
13000char EGifPutExtensionLast ();
503d2be0
AS
13001int
13002main ()
13003{
98418dba 13004EGifPutExtensionLast ();
503d2be0
AS
13005 ;
13006 return 0;
13007}
13008_ACEOF
13009rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13010if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 13011 (eval $ac_link) 2>conftest.er1
503d2be0 13012 ac_status=$?
edfaf76d
LK
13013 grep -v '^ *+' conftest.er1 >conftest.err
13014 rm -f conftest.er1
13015 cat conftest.err >&5
c0d27fcc 13016 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 13017 (exit $ac_status); } &&
ec8fcb10
YM
13018 { ac_try='test -z "$ac_c_werror_flag"
13019 || test ! -s conftest.err'
edfaf76d
LK
13020 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13021 (eval $ac_try) 2>&5
13022 ac_status=$?
13023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13024 (exit $ac_status); }; } &&
13025 { ac_try='test -s conftest$ac_exeext'
35996d22
AS
13026 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13027 (eval $ac_try) 2>&5
13028 ac_status=$?
13029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13030 (exit $ac_status); }; }; then
13031 ac_cv_lib_ungif_EGifPutExtensionLast=yes
13032else
98418dba 13033 echo "$as_me: failed program was:" >&5
19650fd6
AS
13034sed 's/^/| /' conftest.$ac_ext >&5
13035
98418dba
CW
13036ac_cv_lib_ungif_EGifPutExtensionLast=no
13037fi
edfaf76d
LK
13038rm -f conftest.err conftest.$ac_objext \
13039 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
13040LIBS=$ac_check_lib_save_LIBS
13041fi
c0d27fcc 13042echo "$as_me:$LINENO: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5
98418dba
CW
13043echo "${ECHO_T}$ac_cv_lib_ungif_EGifPutExtensionLast" >&6
13044if test $ac_cv_lib_ungif_EGifPutExtensionLast = yes; then
13045 HAVE_GIF=yes
13046fi
13047
13048fi
13049
c0d27fcc 13050
98418dba
CW
13051 fi
13052
13053 if test "${HAVE_GIF}" = "yes"; then
b936fae4 13054
c0d27fcc 13055cat >>confdefs.h <<\_ACEOF
98418dba 13056#define HAVE_GIF 1
c0d27fcc 13057_ACEOF
98418dba
CW
13058
13059 fi
13060fi
13061
cef11da2
ST
13062if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
13063 echo "$as_me:$LINENO: checking for malloc/malloc.h" >&5
13064echo $ECHO_N "checking for malloc/malloc.h... $ECHO_C" >&6
13065if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
13066 echo $ECHO_N "(cached) $ECHO_C" >&6
13067fi
13068echo "$as_me:$LINENO: result: $ac_cv_header_malloc_malloc_h" >&5
13069echo "${ECHO_T}$ac_cv_header_malloc_malloc_h" >&6
13070else
13071 # Is the header compilable?
13072echo "$as_me:$LINENO: checking malloc/malloc.h usability" >&5
13073echo $ECHO_N "checking malloc/malloc.h usability... $ECHO_C" >&6
13074cat >conftest.$ac_ext <<_ACEOF
13075/* confdefs.h. */
13076_ACEOF
13077cat confdefs.h >>conftest.$ac_ext
13078cat >>conftest.$ac_ext <<_ACEOF
13079/* end confdefs.h. */
13080$ac_includes_default
13081#include <malloc/malloc.h>
13082_ACEOF
13083rm -f conftest.$ac_objext
13084if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 13085 (eval $ac_compile) 2>conftest.er1
cef11da2 13086 ac_status=$?
edfaf76d
LK
13087 grep -v '^ *+' conftest.er1 >conftest.err
13088 rm -f conftest.er1
13089 cat conftest.err >&5
cef11da2
ST
13090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13091 (exit $ac_status); } &&
ec8fcb10
YM
13092 { ac_try='test -z "$ac_c_werror_flag"
13093 || test ! -s conftest.err'
edfaf76d
LK
13094 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13095 (eval $ac_try) 2>&5
13096 ac_status=$?
13097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13098 (exit $ac_status); }; } &&
13099 { ac_try='test -s conftest.$ac_objext'
cef11da2
ST
13100 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13101 (eval $ac_try) 2>&5
13102 ac_status=$?
13103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13104 (exit $ac_status); }; }; then
13105 ac_header_compiler=yes
13106else
13107 echo "$as_me: failed program was:" >&5
13108sed 's/^/| /' conftest.$ac_ext >&5
13109
13110ac_header_compiler=no
13111fi
edfaf76d 13112rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
cef11da2
ST
13113echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13114echo "${ECHO_T}$ac_header_compiler" >&6
13115
13116# Is the header present?
13117echo "$as_me:$LINENO: checking malloc/malloc.h presence" >&5
13118echo $ECHO_N "checking malloc/malloc.h presence... $ECHO_C" >&6
13119cat >conftest.$ac_ext <<_ACEOF
13120/* confdefs.h. */
13121_ACEOF
13122cat confdefs.h >>conftest.$ac_ext
13123cat >>conftest.$ac_ext <<_ACEOF
13124/* end confdefs.h. */
13125#include <malloc/malloc.h>
13126_ACEOF
13127if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
13128 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13129 ac_status=$?
13130 grep -v '^ *+' conftest.er1 >conftest.err
13131 rm -f conftest.er1
13132 cat conftest.err >&5
13133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13134 (exit $ac_status); } >/dev/null; then
13135 if test -s conftest.err; then
13136 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 13137 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
cef11da2
ST
13138 else
13139 ac_cpp_err=
13140 fi
13141else
13142 ac_cpp_err=yes
13143fi
13144if test -z "$ac_cpp_err"; then
13145 ac_header_preproc=yes
13146else
13147 echo "$as_me: failed program was:" >&5
13148sed 's/^/| /' conftest.$ac_ext >&5
13149
13150 ac_header_preproc=no
13151fi
13152rm -f conftest.err conftest.$ac_ext
13153echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13154echo "${ECHO_T}$ac_header_preproc" >&6
13155
13156# So? What about this header?
edfaf76d
LK
13157case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13158 yes:no: )
cef11da2
ST
13159 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: accepted by the compiler, rejected by the preprocessor!" >&5
13160echo "$as_me: WARNING: malloc/malloc.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
13161 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: proceeding with the compiler's result" >&5
13162echo "$as_me: WARNING: malloc/malloc.h: proceeding with the compiler's result" >&2;}
13163 ac_header_preproc=yes
cef11da2 13164 ;;
edfaf76d 13165 no:yes:* )
cef11da2
ST
13166 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: present but cannot be compiled" >&5
13167echo "$as_me: WARNING: malloc/malloc.h: present but cannot be compiled" >&2;}
edfaf76d
LK
13168 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: check for missing prerequisite headers?" >&5
13169echo "$as_me: WARNING: malloc/malloc.h: check for missing prerequisite headers?" >&2;}
13170 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: see the Autoconf documentation" >&5
13171echo "$as_me: WARNING: malloc/malloc.h: see the Autoconf documentation" >&2;}
13172 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: section \"Present But Cannot Be Compiled\"" >&5
13173echo "$as_me: WARNING: malloc/malloc.h: section \"Present But Cannot Be Compiled\"" >&2;}
cef11da2
ST
13174 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: proceeding with the preprocessor's result" >&5
13175echo "$as_me: WARNING: malloc/malloc.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
13176 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: in the future, the compiler will take precedence" >&5
13177echo "$as_me: WARNING: malloc/malloc.h: in the future, the compiler will take precedence" >&2;}
cef11da2
ST
13178 (
13179 cat <<\_ASBOX
edfaf76d
LK
13180## ------------------------------------------ ##
13181## Report this to the AC_PACKAGE_NAME lists. ##
13182## ------------------------------------------ ##
cef11da2
ST
13183_ASBOX
13184 ) |
13185 sed "s/^/$as_me: WARNING: /" >&2
13186 ;;
13187esac
13188echo "$as_me:$LINENO: checking for malloc/malloc.h" >&5
13189echo $ECHO_N "checking for malloc/malloc.h... $ECHO_C" >&6
13190if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
13191 echo $ECHO_N "(cached) $ECHO_C" >&6
13192else
13193 ac_cv_header_malloc_malloc_h=$ac_header_preproc
13194fi
13195echo "$as_me:$LINENO: result: $ac_cv_header_malloc_malloc_h" >&5
13196echo "${ECHO_T}$ac_cv_header_malloc_malloc_h" >&6
13197
13198fi
13199if test $ac_cv_header_malloc_malloc_h = yes; then
13200
13201cat >>confdefs.h <<\_ACEOF
13202#define HAVE_MALLOC_MALLOC_H 1
13203_ACEOF
13204
13205fi
13206
13207
13208
5d6da11e 13209### Use Mac OS X Carbon API to implement GUI.
e0f712ba 13210if test "${HAVE_CARBON}" = "yes"; then
e3ba1015 13211
c0d27fcc 13212cat >>confdefs.h <<\_ACEOF
e0f712ba 13213#define HAVE_CARBON 1
c0d27fcc 13214_ACEOF
e0f712ba 13215
6a3a24fa
JD
13216 ## Specify the install directory
13217 carbon_appdir=
13218 if test "${carbon_appdir_x}" != ""; then
13219 case ${carbon_appdir_x} in
13220 y | ye | yes) carbon_appdir=/Applications ;;
13221 * ) carbon_appdir=${carbon_appdir_x} ;;
13222 esac
13223 fi
8f417b3b
AS
13224 # We also have mouse menus.
13225 HAVE_MENUS=yes
e0f712ba
AC
13226fi
13227
98418dba
CW
13228### Use session management (-lSM -lICE) if available
13229HAVE_X_SM=no
13230if test "${HAVE_X11}" = "yes"; then
c0d27fcc
MR
13231 if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
13232 echo "$as_me:$LINENO: checking for X11/SM/SMlib.h" >&5
98418dba
CW
13233echo $ECHO_N "checking for X11/SM/SMlib.h... $ECHO_C" >&6
13234if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
13235 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
13236fi
13237echo "$as_me:$LINENO: result: $ac_cv_header_X11_SM_SMlib_h" >&5
13238echo "${ECHO_T}$ac_cv_header_X11_SM_SMlib_h" >&6
503d2be0 13239else
c0d27fcc
MR
13240 # Is the header compilable?
13241echo "$as_me:$LINENO: checking X11/SM/SMlib.h usability" >&5
13242echo $ECHO_N "checking X11/SM/SMlib.h usability... $ECHO_C" >&6
13243cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13244/* confdefs.h. */
13245_ACEOF
13246cat confdefs.h >>conftest.$ac_ext
13247cat >>conftest.$ac_ext <<_ACEOF
13248/* end confdefs.h. */
c0d27fcc
MR
13249$ac_includes_default
13250#include <X11/SM/SMlib.h>
13251_ACEOF
13252rm -f conftest.$ac_objext
13253if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 13254 (eval $ac_compile) 2>conftest.er1
c0d27fcc 13255 ac_status=$?
edfaf76d
LK
13256 grep -v '^ *+' conftest.er1 >conftest.err
13257 rm -f conftest.er1
13258 cat conftest.err >&5
c0d27fcc
MR
13259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13260 (exit $ac_status); } &&
ec8fcb10
YM
13261 { ac_try='test -z "$ac_c_werror_flag"
13262 || test ! -s conftest.err'
edfaf76d
LK
13263 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13264 (eval $ac_try) 2>&5
13265 ac_status=$?
13266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13267 (exit $ac_status); }; } &&
13268 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
13269 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13270 (eval $ac_try) 2>&5
13271 ac_status=$?
13272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13273 (exit $ac_status); }; }; then
13274 ac_header_compiler=yes
13275else
13276 echo "$as_me: failed program was:" >&5
19650fd6
AS
13277sed 's/^/| /' conftest.$ac_ext >&5
13278
c0d27fcc
MR
13279ac_header_compiler=no
13280fi
edfaf76d 13281rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
13282echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13283echo "${ECHO_T}$ac_header_compiler" >&6
13284
13285# Is the header present?
13286echo "$as_me:$LINENO: checking X11/SM/SMlib.h presence" >&5
13287echo $ECHO_N "checking X11/SM/SMlib.h presence... $ECHO_C" >&6
13288cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13289/* confdefs.h. */
13290_ACEOF
13291cat confdefs.h >>conftest.$ac_ext
13292cat >>conftest.$ac_ext <<_ACEOF
13293/* end confdefs.h. */
98418dba
CW
13294#include <X11/SM/SMlib.h>
13295_ACEOF
c0d27fcc 13296if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
13297 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13298 ac_status=$?
6bae0ccf 13299 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
13300 rm -f conftest.er1
13301 cat conftest.err >&5
c0d27fcc 13302 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
13303 (exit $ac_status); } >/dev/null; then
13304 if test -s conftest.err; then
13305 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 13306 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
13307 else
13308 ac_cpp_err=
13309 fi
13310else
13311 ac_cpp_err=yes
503d2be0 13312fi
98418dba 13313if test -z "$ac_cpp_err"; then
c0d27fcc 13314 ac_header_preproc=yes
98418dba
CW
13315else
13316 echo "$as_me: failed program was:" >&5
19650fd6
AS
13317sed 's/^/| /' conftest.$ac_ext >&5
13318
c0d27fcc 13319 ac_header_preproc=no
98418dba
CW
13320fi
13321rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
13322echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13323echo "${ECHO_T}$ac_header_preproc" >&6
13324
13325# So? What about this header?
edfaf76d
LK
13326case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13327 yes:no: )
c0d27fcc
MR
13328 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
13329echo "$as_me: WARNING: X11/SM/SMlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
13330 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: proceeding with the compiler's result" >&5
13331echo "$as_me: WARNING: X11/SM/SMlib.h: proceeding with the compiler's result" >&2;}
13332 ac_header_preproc=yes
19650fd6 13333 ;;
edfaf76d 13334 no:yes:* )
c0d27fcc
MR
13335 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: present but cannot be compiled" >&5
13336echo "$as_me: WARNING: X11/SM/SMlib.h: present but cannot be compiled" >&2;}
edfaf76d
LK
13337 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: check for missing prerequisite headers?" >&5
13338echo "$as_me: WARNING: X11/SM/SMlib.h: check for missing prerequisite headers?" >&2;}
13339 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: see the Autoconf documentation" >&5
13340echo "$as_me: WARNING: X11/SM/SMlib.h: see the Autoconf documentation" >&2;}
13341 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: section \"Present But Cannot Be Compiled\"" >&5
13342echo "$as_me: WARNING: X11/SM/SMlib.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 13343 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&5
19650fd6 13344echo "$as_me: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
13345 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: in the future, the compiler will take precedence" >&5
13346echo "$as_me: WARNING: X11/SM/SMlib.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
13347 (
13348 cat <<\_ASBOX
edfaf76d
LK
13349## ------------------------------------------ ##
13350## Report this to the AC_PACKAGE_NAME lists. ##
13351## ------------------------------------------ ##
19650fd6
AS
13352_ASBOX
13353 ) |
13354 sed "s/^/$as_me: WARNING: /" >&2
13355 ;;
c0d27fcc
MR
13356esac
13357echo "$as_me:$LINENO: checking for X11/SM/SMlib.h" >&5
13358echo $ECHO_N "checking for X11/SM/SMlib.h... $ECHO_C" >&6
13359if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
13360 echo $ECHO_N "(cached) $ECHO_C" >&6
13361else
13362 ac_cv_header_X11_SM_SMlib_h=$ac_header_preproc
73b77ee5 13363fi
c0d27fcc 13364echo "$as_me:$LINENO: result: $ac_cv_header_X11_SM_SMlib_h" >&5
98418dba 13365echo "${ECHO_T}$ac_cv_header_X11_SM_SMlib_h" >&6
c0d27fcc
MR
13366
13367fi
98418dba 13368if test $ac_cv_header_X11_SM_SMlib_h = yes; then
c0d27fcc 13369 echo "$as_me:$LINENO: checking for SmcOpenConnection in -lSM" >&5
98418dba
CW
13370echo $ECHO_N "checking for SmcOpenConnection in -lSM... $ECHO_C" >&6
13371if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then
503d2be0 13372 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 13373else
503d2be0 13374 ac_check_lib_save_LIBS=$LIBS
1660500f 13375LIBS="-lSM -lICE $LIBS"
503d2be0 13376cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13377/* confdefs.h. */
13378_ACEOF
13379cat confdefs.h >>conftest.$ac_ext
13380cat >>conftest.$ac_ext <<_ACEOF
13381/* end confdefs.h. */
503d2be0 13382
73b77ee5 13383/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
13384#ifdef __cplusplus
13385extern "C"
13386#endif
73b77ee5 13387/* We use char because int might match the return type of a gcc2
503d2be0 13388 builtin and then its argument prototype would still apply. */
98418dba 13389char SmcOpenConnection ();
503d2be0
AS
13390int
13391main ()
13392{
98418dba 13393SmcOpenConnection ();
503d2be0
AS
13394 ;
13395 return 0;
13396}
13397_ACEOF
13398rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13399if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 13400 (eval $ac_link) 2>conftest.er1
503d2be0 13401 ac_status=$?
edfaf76d
LK
13402 grep -v '^ *+' conftest.er1 >conftest.err
13403 rm -f conftest.er1
13404 cat conftest.err >&5
c0d27fcc 13405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13406 (exit $ac_status); } &&
ec8fcb10
YM
13407 { ac_try='test -z "$ac_c_werror_flag"
13408 || test ! -s conftest.err'
edfaf76d
LK
13409 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13410 (eval $ac_try) 2>&5
13411 ac_status=$?
13412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13413 (exit $ac_status); }; } &&
13414 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13415 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13416 (eval $ac_try) 2>&5
13417 ac_status=$?
c0d27fcc 13418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13419 (exit $ac_status); }; }; then
98418dba 13420 ac_cv_lib_SM_SmcOpenConnection=yes
503d2be0
AS
13421else
13422 echo "$as_me: failed program was:" >&5
19650fd6
AS
13423sed 's/^/| /' conftest.$ac_ext >&5
13424
98418dba 13425ac_cv_lib_SM_SmcOpenConnection=no
503d2be0 13426fi
edfaf76d
LK
13427rm -f conftest.err conftest.$ac_objext \
13428 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
13429LIBS=$ac_check_lib_save_LIBS
13430fi
c0d27fcc 13431echo "$as_me:$LINENO: result: $ac_cv_lib_SM_SmcOpenConnection" >&5
98418dba
CW
13432echo "${ECHO_T}$ac_cv_lib_SM_SmcOpenConnection" >&6
13433if test $ac_cv_lib_SM_SmcOpenConnection = yes; then
13434 HAVE_X_SM=yes
73b77ee5
GM
13435fi
13436
73b77ee5 13437fi
73b77ee5 13438
c0d27fcc
MR
13439
13440
98418dba 13441 if test "${HAVE_X_SM}" = "yes"; then
b936fae4 13442
c0d27fcc 13443cat >>confdefs.h <<\_ACEOF
98418dba 13444#define HAVE_X_SM 1
c0d27fcc 13445_ACEOF
73b77ee5 13446
98418dba
CW
13447 case "$LIBS" in
13448 *-lSM*) ;;
13449 *) LIBS="-lSM -lICE $LIBS" ;;
13450 esac
73b77ee5 13451 fi
98418dba 13452fi
73b77ee5 13453
98418dba 13454# If netdb.h doesn't declare h_errno, we must declare it by hand.
c0d27fcc 13455echo "$as_me:$LINENO: checking whether netdb declares h_errno" >&5
98418dba
CW
13456echo $ECHO_N "checking whether netdb declares h_errno... $ECHO_C" >&6
13457if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then
13458 echo $ECHO_N "(cached) $ECHO_C" >&6
13459else
13460 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13461/* confdefs.h. */
13462_ACEOF
13463cat confdefs.h >>conftest.$ac_ext
13464cat >>conftest.$ac_ext <<_ACEOF
13465/* end confdefs.h. */
98418dba 13466#include <netdb.h>
503d2be0
AS
13467int
13468main ()
13469{
98418dba 13470return h_errno;
503d2be0
AS
13471 ;
13472 return 0;
13473}
13474_ACEOF
13475rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13476if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 13477 (eval $ac_link) 2>conftest.er1
503d2be0 13478 ac_status=$?
edfaf76d
LK
13479 grep -v '^ *+' conftest.er1 >conftest.err
13480 rm -f conftest.er1
13481 cat conftest.err >&5
c0d27fcc 13482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13483 (exit $ac_status); } &&
ec8fcb10
YM
13484 { ac_try='test -z "$ac_c_werror_flag"
13485 || test ! -s conftest.err'
edfaf76d
LK
13486 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13487 (eval $ac_try) 2>&5
13488 ac_status=$?
13489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13490 (exit $ac_status); }; } &&
13491 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13492 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13493 (eval $ac_try) 2>&5
13494 ac_status=$?
c0d27fcc 13495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13496 (exit $ac_status); }; }; then
98418dba 13497 emacs_cv_netdb_declares_h_errno=yes
73b77ee5 13498else
503d2be0 13499 echo "$as_me: failed program was:" >&5
19650fd6
AS
13500sed 's/^/| /' conftest.$ac_ext >&5
13501
98418dba 13502emacs_cv_netdb_declares_h_errno=no
73b77ee5 13503fi
edfaf76d
LK
13504rm -f conftest.err conftest.$ac_objext \
13505 conftest$ac_exeext conftest.$ac_ext
98418dba 13506fi
c0d27fcc 13507echo "$as_me:$LINENO: result: $emacs_cv_netdb_declares_h_errno" >&5
98418dba
CW
13508echo "${ECHO_T}$emacs_cv_netdb_declares_h_errno" >&6
13509if test $emacs_cv_netdb_declares_h_errno = yes; then
b936fae4 13510
c0d27fcc 13511cat >>confdefs.h <<\_ACEOF
98418dba 13512#define HAVE_H_ERRNO 1
c0d27fcc 13513_ACEOF
73b77ee5 13514
98418dba
CW
13515fi
13516
13517# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
13518# for constant arguments. Useless!
c0d27fcc 13519echo "$as_me:$LINENO: checking for working alloca.h" >&5
98418dba
CW
13520echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
13521if test "${ac_cv_working_alloca_h+set}" = set; then
13522 echo $ECHO_N "(cached) $ECHO_C" >&6
13523else
13524 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13525/* confdefs.h. */
13526_ACEOF
13527cat confdefs.h >>conftest.$ac_ext
13528cat >>conftest.$ac_ext <<_ACEOF
13529/* end confdefs.h. */
98418dba 13530#include <alloca.h>
503d2be0
AS
13531int
13532main ()
13533{
98418dba 13534char *p = (char *) alloca (2 * sizeof (int));
503d2be0
AS
13535 ;
13536 return 0;
13537}
13538_ACEOF
13539rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13540if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 13541 (eval $ac_link) 2>conftest.er1
503d2be0 13542 ac_status=$?
edfaf76d
LK
13543 grep -v '^ *+' conftest.er1 >conftest.err
13544 rm -f conftest.er1
13545 cat conftest.err >&5
c0d27fcc 13546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13547 (exit $ac_status); } &&
ec8fcb10
YM
13548 { ac_try='test -z "$ac_c_werror_flag"
13549 || test ! -s conftest.err'
edfaf76d
LK
13550 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13551 (eval $ac_try) 2>&5
13552 ac_status=$?
13553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13554 (exit $ac_status); }; } &&
13555 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13556 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13557 (eval $ac_try) 2>&5
13558 ac_status=$?
c0d27fcc 13559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13560 (exit $ac_status); }; }; then
98418dba 13561 ac_cv_working_alloca_h=yes
73b77ee5 13562else
503d2be0 13563 echo "$as_me: failed program was:" >&5
19650fd6
AS
13564sed 's/^/| /' conftest.$ac_ext >&5
13565
98418dba 13566ac_cv_working_alloca_h=no
73b77ee5 13567fi
edfaf76d
LK
13568rm -f conftest.err conftest.$ac_objext \
13569 conftest$ac_exeext conftest.$ac_ext
98418dba 13570fi
c0d27fcc 13571echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
98418dba
CW
13572echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
13573if test $ac_cv_working_alloca_h = yes; then
73b77ee5 13574
c0d27fcc 13575cat >>confdefs.h <<\_ACEOF
98418dba 13576#define HAVE_ALLOCA_H 1
c0d27fcc 13577_ACEOF
98418dba
CW
13578
13579fi
13580
c0d27fcc 13581echo "$as_me:$LINENO: checking for alloca" >&5
98418dba
CW
13582echo $ECHO_N "checking for alloca... $ECHO_C" >&6
13583if test "${ac_cv_func_alloca_works+set}" = set; then
13584 echo $ECHO_N "(cached) $ECHO_C" >&6
13585else
503d2be0 13586 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13587/* confdefs.h. */
13588_ACEOF
13589cat confdefs.h >>conftest.$ac_ext
13590cat >>conftest.$ac_ext <<_ACEOF
13591/* end confdefs.h. */
98418dba
CW
13592#ifdef __GNUC__
13593# define alloca __builtin_alloca
13594#else
13595# ifdef _MSC_VER
13596# include <malloc.h>
13597# define alloca _alloca
13598# else
13599# if HAVE_ALLOCA_H
13600# include <alloca.h>
13601# else
13602# ifdef _AIX
13603 #pragma alloca
13604# else
13605# ifndef alloca /* predefined by HP cc +Olibcalls */
13606char *alloca ();
13607# endif
13608# endif
13609# endif
13610# endif
13611#endif
13612
503d2be0
AS
13613int
13614main ()
13615{
98418dba 13616char *p = (char *) alloca (1);
503d2be0
AS
13617 ;
13618 return 0;
13619}
13620_ACEOF
13621rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13622if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 13623 (eval $ac_link) 2>conftest.er1
503d2be0 13624 ac_status=$?
edfaf76d
LK
13625 grep -v '^ *+' conftest.er1 >conftest.err
13626 rm -f conftest.er1
13627 cat conftest.err >&5
c0d27fcc 13628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13629 (exit $ac_status); } &&
ec8fcb10
YM
13630 { ac_try='test -z "$ac_c_werror_flag"
13631 || test ! -s conftest.err'
edfaf76d
LK
13632 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13633 (eval $ac_try) 2>&5
13634 ac_status=$?
13635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13636 (exit $ac_status); }; } &&
13637 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13638 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13639 (eval $ac_try) 2>&5
13640 ac_status=$?
c0d27fcc 13641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13642 (exit $ac_status); }; }; then
98418dba 13643 ac_cv_func_alloca_works=yes
ac95a621 13644else
503d2be0 13645 echo "$as_me: failed program was:" >&5
19650fd6
AS
13646sed 's/^/| /' conftest.$ac_ext >&5
13647
98418dba 13648ac_cv_func_alloca_works=no
ac95a621 13649fi
edfaf76d
LK
13650rm -f conftest.err conftest.$ac_objext \
13651 conftest$ac_exeext conftest.$ac_ext
98418dba 13652fi
c0d27fcc 13653echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
98418dba 13654echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
ac95a621 13655
98418dba
CW
13656if test $ac_cv_func_alloca_works = yes; then
13657
c0d27fcc 13658cat >>confdefs.h <<\_ACEOF
98418dba 13659#define HAVE_ALLOCA 1
c0d27fcc 13660_ACEOF
98418dba
CW
13661
13662else
13663 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
13664# that cause trouble. Some versions do not even contain alloca or
13665# contain a buggy version. If you still want to use their alloca,
13666# use ar to extract alloca.o from them instead of compiling alloca.c.
13667
13668ALLOCA=alloca.$ac_objext
13669
c0d27fcc 13670cat >>confdefs.h <<\_ACEOF
98418dba 13671#define C_ALLOCA 1
c0d27fcc 13672_ACEOF
98418dba 13673
c0d27fcc
MR
13674
13675echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
98418dba
CW
13676echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
13677if test "${ac_cv_os_cray+set}" = set; then
13678 echo $ECHO_N "(cached) $ECHO_C" >&6
13679else
13680 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13681/* confdefs.h. */
13682_ACEOF
13683cat confdefs.h >>conftest.$ac_ext
13684cat >>conftest.$ac_ext <<_ACEOF
13685/* end confdefs.h. */
98418dba
CW
13686#if defined(CRAY) && ! defined(CRAY2)
13687webecray
13688#else
13689wenotbecray
13690#endif
13691
13692_ACEOF
13693if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 13694 $EGREP "webecray" >/dev/null 2>&1; then
98418dba
CW
13695 ac_cv_os_cray=yes
13696else
13697 ac_cv_os_cray=no
13698fi
13699rm -f conftest*
ac95a621 13700
98418dba 13701fi
c0d27fcc 13702echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
98418dba
CW
13703echo "${ECHO_T}$ac_cv_os_cray" >&6
13704if test $ac_cv_os_cray = yes; then
13705 for ac_func in _getb67 GETB67 getb67; do
13706 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 13707echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
13708echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13709if eval "test \"\${$as_ac_var+set}\" = set"; then
13710 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 13711else
503d2be0 13712 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13713/* confdefs.h. */
13714_ACEOF
13715cat confdefs.h >>conftest.$ac_ext
13716cat >>conftest.$ac_ext <<_ACEOF
13717/* end confdefs.h. */
edfaf76d
LK
13718/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
13719 For example, HP-UX 11i <limits.h> declares gettimeofday. */
13720#define $ac_func innocuous_$ac_func
13721
73b77ee5 13722/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
13723 which can conflict with char $ac_func (); below.
13724 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13725 <limits.h> exists even on freestanding compilers. */
edfaf76d 13726
19650fd6
AS
13727#ifdef __STDC__
13728# include <limits.h>
13729#else
13730# include <assert.h>
13731#endif
edfaf76d
LK
13732
13733#undef $ac_func
13734
73b77ee5 13735/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
13736#ifdef __cplusplus
13737extern "C"
19650fd6 13738{
503d2be0 13739#endif
73b77ee5 13740/* We use char because int might match the return type of a gcc2
503d2be0
AS
13741 builtin and then its argument prototype would still apply. */
13742char $ac_func ();
73b77ee5
GM
13743/* The GNU C library defines this for functions which it implements
13744 to always fail with ENOSYS. Some functions are actually named
13745 something starting with __ and the normal name is an alias. */
13746#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13747choke me
13748#else
19650fd6
AS
13749char (*f) () = $ac_func;
13750#endif
13751#ifdef __cplusplus
13752}
73b77ee5
GM
13753#endif
13754
19650fd6
AS
13755int
13756main ()
13757{
13758return f != $ac_func;
503d2be0
AS
13759 ;
13760 return 0;
13761}
13762_ACEOF
13763rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13764if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 13765 (eval $ac_link) 2>conftest.er1
503d2be0 13766 ac_status=$?
edfaf76d
LK
13767 grep -v '^ *+' conftest.er1 >conftest.err
13768 rm -f conftest.er1
13769 cat conftest.err >&5
c0d27fcc 13770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13771 (exit $ac_status); } &&
ec8fcb10
YM
13772 { ac_try='test -z "$ac_c_werror_flag"
13773 || test ! -s conftest.err'
edfaf76d
LK
13774 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13775 (eval $ac_try) 2>&5
13776 ac_status=$?
13777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13778 (exit $ac_status); }; } &&
13779 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13780 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13781 (eval $ac_try) 2>&5
13782 ac_status=$?
c0d27fcc 13783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
13784 (exit $ac_status); }; }; then
13785 eval "$as_ac_var=yes"
13786else
13787 echo "$as_me: failed program was:" >&5
19650fd6
AS
13788sed 's/^/| /' conftest.$ac_ext >&5
13789
503d2be0
AS
13790eval "$as_ac_var=no"
13791fi
edfaf76d
LK
13792rm -f conftest.err conftest.$ac_objext \
13793 conftest$ac_exeext conftest.$ac_ext
503d2be0 13794fi
c0d27fcc 13795echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
13796echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13797if test `eval echo '${'$as_ac_var'}'` = yes; then
73b77ee5 13798
c0d27fcc 13799cat >>confdefs.h <<_ACEOF
98418dba 13800#define CRAY_STACKSEG_END $ac_func
c0d27fcc 13801_ACEOF
98418dba
CW
13802
13803 break
73b77ee5 13804fi
73b77ee5 13805
98418dba 13806 done
73b77ee5
GM
13807fi
13808
c0d27fcc 13809echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
98418dba
CW
13810echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
13811if test "${ac_cv_c_stack_direction+set}" = set; then
503d2be0 13812 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
13813else
13814 if test "$cross_compiling" = yes; then
13815 ac_cv_c_stack_direction=0
73b77ee5 13816else
503d2be0 13817 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13818/* confdefs.h. */
13819_ACEOF
13820cat confdefs.h >>conftest.$ac_ext
13821cat >>conftest.$ac_ext <<_ACEOF
13822/* end confdefs.h. */
503d2be0 13823int
98418dba 13824find_stack_direction ()
503d2be0 13825{
98418dba
CW
13826 static char *addr = 0;
13827 auto char dummy;
13828 if (addr == 0)
13829 {
13830 addr = &dummy;
13831 return find_stack_direction ();
13832 }
73b77ee5 13833 else
98418dba
CW
13834 return (&dummy > addr) ? 1 : -1;
13835}
ba4481b5 13836
503d2be0
AS
13837int
13838main ()
13839{
98418dba 13840 exit (find_stack_direction () < 0);
503d2be0
AS
13841}
13842_ACEOF
98418dba 13843rm -f conftest$ac_exeext
c0d27fcc 13844if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
13845 (eval $ac_link) 2>&5
13846 ac_status=$?
c0d27fcc 13847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 13848 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 13849 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13850 (eval $ac_try) 2>&5
13851 ac_status=$?
c0d27fcc 13852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13853 (exit $ac_status); }; }; then
98418dba 13854 ac_cv_c_stack_direction=1
ba4481b5 13855else
98418dba
CW
13856 echo "$as_me: program exited with status $ac_status" >&5
13857echo "$as_me: failed program was:" >&5
19650fd6
AS
13858sed 's/^/| /' conftest.$ac_ext >&5
13859
c0d27fcc 13860( exit $ac_status )
98418dba 13861ac_cv_c_stack_direction=-1
ba4481b5 13862fi
edfaf76d 13863rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 13864fi
98418dba 13865fi
c0d27fcc 13866echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
98418dba
CW
13867echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
13868
c0d27fcc 13869cat >>confdefs.h <<_ACEOF
98418dba 13870#define STACK_DIRECTION $ac_cv_c_stack_direction
c0d27fcc
MR
13871_ACEOF
13872
ba4481b5 13873
ba4481b5
DL
13874fi
13875
c0d27fcc 13876
98418dba
CW
13877# fmod, logb, and frexp are found in -lm on most systems.
13878# On HPUX 9.01, -lm does not contain logb, so check for sqrt.
13879
c0d27fcc 13880echo "$as_me:$LINENO: checking for sqrt in -lm" >&5
98418dba
CW
13881echo $ECHO_N "checking for sqrt in -lm... $ECHO_C" >&6
13882if test "${ac_cv_lib_m_sqrt+set}" = set; then
503d2be0 13883 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13884else
98418dba
CW
13885 ac_check_lib_save_LIBS=$LIBS
13886LIBS="-lm $LIBS"
13887cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13888/* confdefs.h. */
13889_ACEOF
13890cat confdefs.h >>conftest.$ac_ext
13891cat >>conftest.$ac_ext <<_ACEOF
13892/* end confdefs.h. */
ba4481b5 13893
98418dba
CW
13894/* Override any gcc2 internal prototype to avoid an error. */
13895#ifdef __cplusplus
13896extern "C"
13897#endif
13898/* We use char because int might match the return type of a gcc2
13899 builtin and then its argument prototype would still apply. */
13900char sqrt ();
503d2be0
AS
13901int
13902main ()
13903{
98418dba 13904sqrt ();
503d2be0
AS
13905 ;
13906 return 0;
13907}
13908_ACEOF
13909rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13910if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 13911 (eval $ac_link) 2>conftest.er1
503d2be0 13912 ac_status=$?
edfaf76d
LK
13913 grep -v '^ *+' conftest.er1 >conftest.err
13914 rm -f conftest.er1
13915 cat conftest.err >&5
c0d27fcc 13916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13917 (exit $ac_status); } &&
ec8fcb10
YM
13918 { ac_try='test -z "$ac_c_werror_flag"
13919 || test ! -s conftest.err'
edfaf76d
LK
13920 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13921 (eval $ac_try) 2>&5
13922 ac_status=$?
13923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13924 (exit $ac_status); }; } &&
13925 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13926 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13927 (eval $ac_try) 2>&5
13928 ac_status=$?
c0d27fcc 13929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13930 (exit $ac_status); }; }; then
98418dba 13931 ac_cv_lib_m_sqrt=yes
ba4481b5 13932else
503d2be0 13933 echo "$as_me: failed program was:" >&5
19650fd6
AS
13934sed 's/^/| /' conftest.$ac_ext >&5
13935
98418dba 13936ac_cv_lib_m_sqrt=no
ba4481b5 13937fi
edfaf76d
LK
13938rm -f conftest.err conftest.$ac_objext \
13939 conftest$ac_exeext conftest.$ac_ext
98418dba 13940LIBS=$ac_check_lib_save_LIBS
ba4481b5 13941fi
c0d27fcc 13942echo "$as_me:$LINENO: result: $ac_cv_lib_m_sqrt" >&5
98418dba
CW
13943echo "${ECHO_T}$ac_cv_lib_m_sqrt" >&6
13944if test $ac_cv_lib_m_sqrt = yes; then
c0d27fcc 13945 cat >>confdefs.h <<_ACEOF
98418dba 13946#define HAVE_LIBM 1
c0d27fcc 13947_ACEOF
98418dba
CW
13948
13949 LIBS="-lm $LIBS"
ba4481b5 13950
ba4481b5
DL
13951fi
13952
c0d27fcc 13953
55597d70
DL
13954# Check for mail-locking functions in a "mail" library. Probably this should
13955# have the same check as for liblockfile below.
98418dba 13956
c0d27fcc 13957echo "$as_me:$LINENO: checking for maillock in -lmail" >&5
98418dba
CW
13958echo $ECHO_N "checking for maillock in -lmail... $ECHO_C" >&6
13959if test "${ac_cv_lib_mail_maillock+set}" = set; then
503d2be0 13960 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13961else
98418dba
CW
13962 ac_check_lib_save_LIBS=$LIBS
13963LIBS="-lmail $LIBS"
13964cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13965/* confdefs.h. */
13966_ACEOF
13967cat confdefs.h >>conftest.$ac_ext
13968cat >>conftest.$ac_ext <<_ACEOF
13969/* end confdefs.h. */
98418dba
CW
13970
13971/* Override any gcc2 internal prototype to avoid an error. */
13972#ifdef __cplusplus
13973extern "C"
13974#endif
13975/* We use char because int might match the return type of a gcc2
13976 builtin and then its argument prototype would still apply. */
13977char maillock ();
503d2be0
AS
13978int
13979main ()
13980{
98418dba 13981maillock ();
503d2be0
AS
13982 ;
13983 return 0;
13984}
13985_ACEOF
13986rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13987if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 13988 (eval $ac_link) 2>conftest.er1
503d2be0 13989 ac_status=$?
edfaf76d
LK
13990 grep -v '^ *+' conftest.er1 >conftest.err
13991 rm -f conftest.er1
13992 cat conftest.err >&5
c0d27fcc 13993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13994 (exit $ac_status); } &&
ec8fcb10
YM
13995 { ac_try='test -z "$ac_c_werror_flag"
13996 || test ! -s conftest.err'
edfaf76d
LK
13997 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13998 (eval $ac_try) 2>&5
13999 ac_status=$?
14000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14001 (exit $ac_status); }; } &&
14002 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14003 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
14004 (eval $ac_try) 2>&5
14005 ac_status=$?
c0d27fcc 14006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14007 (exit $ac_status); }; }; then
98418dba 14008 ac_cv_lib_mail_maillock=yes
ba4481b5 14009else
503d2be0 14010 echo "$as_me: failed program was:" >&5
19650fd6
AS
14011sed 's/^/| /' conftest.$ac_ext >&5
14012
98418dba 14013ac_cv_lib_mail_maillock=no
ba4481b5 14014fi
edfaf76d
LK
14015rm -f conftest.err conftest.$ac_objext \
14016 conftest$ac_exeext conftest.$ac_ext
98418dba 14017LIBS=$ac_check_lib_save_LIBS
ba4481b5 14018fi
c0d27fcc 14019echo "$as_me:$LINENO: result: $ac_cv_lib_mail_maillock" >&5
98418dba
CW
14020echo "${ECHO_T}$ac_cv_lib_mail_maillock" >&6
14021if test $ac_cv_lib_mail_maillock = yes; then
c0d27fcc 14022 cat >>confdefs.h <<_ACEOF
98418dba 14023#define HAVE_LIBMAIL 1
c0d27fcc 14024_ACEOF
ba4481b5 14025
98418dba 14026 LIBS="-lmail $LIBS"
ba4481b5 14027
98418dba 14028fi
ba4481b5 14029
c0d27fcc
MR
14030
14031echo "$as_me:$LINENO: checking for maillock in -llockfile" >&5
98418dba
CW
14032echo $ECHO_N "checking for maillock in -llockfile... $ECHO_C" >&6
14033if test "${ac_cv_lib_lockfile_maillock+set}" = set; then
503d2be0 14034 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 14035else
503d2be0 14036 ac_check_lib_save_LIBS=$LIBS
98418dba 14037LIBS="-llockfile $LIBS"
503d2be0 14038cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14039/* confdefs.h. */
14040_ACEOF
14041cat confdefs.h >>conftest.$ac_ext
14042cat >>conftest.$ac_ext <<_ACEOF
14043/* end confdefs.h. */
503d2be0 14044
ba4481b5 14045/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
14046#ifdef __cplusplus
14047extern "C"
14048#endif
ba4481b5 14049/* We use char because int might match the return type of a gcc2
503d2be0 14050 builtin and then its argument prototype would still apply. */
98418dba 14051char maillock ();
503d2be0
AS
14052int
14053main ()
14054{
98418dba 14055maillock ();
503d2be0
AS
14056 ;
14057 return 0;
14058}
14059_ACEOF
14060rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14061if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 14062 (eval $ac_link) 2>conftest.er1
503d2be0 14063 ac_status=$?
edfaf76d
LK
14064 grep -v '^ *+' conftest.er1 >conftest.err
14065 rm -f conftest.er1
14066 cat conftest.err >&5
c0d27fcc 14067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14068 (exit $ac_status); } &&
ec8fcb10
YM
14069 { ac_try='test -z "$ac_c_werror_flag"
14070 || test ! -s conftest.err'
edfaf76d
LK
14071 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14072 (eval $ac_try) 2>&5
14073 ac_status=$?
14074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14075 (exit $ac_status); }; } &&
14076 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14077 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
14078 (eval $ac_try) 2>&5
14079 ac_status=$?
c0d27fcc 14080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14081 (exit $ac_status); }; }; then
98418dba 14082 ac_cv_lib_lockfile_maillock=yes
503d2be0
AS
14083else
14084 echo "$as_me: failed program was:" >&5
19650fd6
AS
14085sed 's/^/| /' conftest.$ac_ext >&5
14086
98418dba
CW
14087ac_cv_lib_lockfile_maillock=no
14088fi
edfaf76d
LK
14089rm -f conftest.err conftest.$ac_objext \
14090 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
14091LIBS=$ac_check_lib_save_LIBS
14092fi
c0d27fcc 14093echo "$as_me:$LINENO: result: $ac_cv_lib_lockfile_maillock" >&5
98418dba
CW
14094echo "${ECHO_T}$ac_cv_lib_lockfile_maillock" >&6
14095if test $ac_cv_lib_lockfile_maillock = yes; then
c0d27fcc 14096 cat >>confdefs.h <<_ACEOF
98418dba 14097#define HAVE_LIBLOCKFILE 1
c0d27fcc 14098_ACEOF
98418dba
CW
14099
14100 LIBS="-llockfile $LIBS"
14101
14102fi
14103
14104# If we have the shared liblockfile, assume we must use it for mail
14105# locking (e.g. Debian). If we couldn't link against liblockfile
14106# (no liblockfile.a installed), ensure that we don't need to.
14107if test "$ac_cv_lib_lockfile_maillock" = no; then
14108 # Extract the first word of "liblockfile.so", so it can be a program name with args.
14109set dummy liblockfile.so; ac_word=$2
c0d27fcc 14110echo "$as_me:$LINENO: checking for $ac_word" >&5
98418dba
CW
14111echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14112if test "${ac_cv_prog_liblockfile+set}" = set; then
14113 echo $ECHO_N "(cached) $ECHO_C" >&6
14114else
14115 if test -n "$liblockfile"; then
14116 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
14117else
c0d27fcc 14118as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6bae0ccf
DL
14119as_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
14120for as_dir in $as_dummy
c0d27fcc
MR
14121do
14122 IFS=$as_save_IFS
14123 test -z "$as_dir" && as_dir=.
14124 for ac_exec_ext in '' $ac_executable_extensions; do
14125 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14126 ac_cv_prog_liblockfile="yes"
14127 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
14128 break 2
14129 fi
14130done
98418dba
CW
14131done
14132
14133 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
503d2be0 14134fi
503d2be0 14135fi
98418dba
CW
14136liblockfile=$ac_cv_prog_liblockfile
14137if test -n "$liblockfile"; then
c0d27fcc 14138 echo "$as_me:$LINENO: result: $liblockfile" >&5
98418dba
CW
14139echo "${ECHO_T}$liblockfile" >&6
14140else
c0d27fcc 14141 echo "$as_me:$LINENO: result: no" >&5
98418dba 14142echo "${ECHO_T}no" >&6
ba4481b5
DL
14143fi
14144
98418dba 14145 if test $ac_cv_prog_liblockfile = yes; then
c0d27fcc 14146 { { echo "$as_me:$LINENO: error: Shared liblockfile found but can't link against it.
98418dba
CW
14147This probably means that movemail could lose mail.
14148There may be a \`development' package to install containing liblockfile." >&5
14149echo "$as_me: error: Shared liblockfile found but can't link against it.
14150This probably means that movemail could lose mail.
14151There may be a \`development' package to install containing liblockfile." >&2;}
14152 { (exit 1); exit 1; }; }
98418dba 14153 else :
55597d70 14154 fi
98418dba 14155fi
503d2be0 14156
98418dba
CW
14157for ac_func in touchlock
14158do
14159as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 14160echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
14161echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14162if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 14163 echo $ECHO_N "(cached) $ECHO_C" >&6
457b792c 14164else
98418dba 14165 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14166/* confdefs.h. */
14167_ACEOF
14168cat confdefs.h >>conftest.$ac_ext
14169cat >>conftest.$ac_ext <<_ACEOF
14170/* end confdefs.h. */
edfaf76d
LK
14171/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14172 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14173#define $ac_func innocuous_$ac_func
14174
98418dba 14175/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
14176 which can conflict with char $ac_func (); below.
14177 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14178 <limits.h> exists even on freestanding compilers. */
edfaf76d 14179
19650fd6
AS
14180#ifdef __STDC__
14181# include <limits.h>
14182#else
14183# include <assert.h>
14184#endif
edfaf76d
LK
14185
14186#undef $ac_func
14187
457b792c 14188/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
14189#ifdef __cplusplus
14190extern "C"
19650fd6 14191{
503d2be0 14192#endif
457b792c 14193/* We use char because int might match the return type of a gcc2
503d2be0 14194 builtin and then its argument prototype would still apply. */
98418dba 14195char $ac_func ();
98418dba
CW
14196/* The GNU C library defines this for functions which it implements
14197 to always fail with ENOSYS. Some functions are actually named
14198 something starting with __ and the normal name is an alias. */
14199#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14200choke me
14201#else
19650fd6
AS
14202char (*f) () = $ac_func;
14203#endif
14204#ifdef __cplusplus
14205}
cd958eb3
MB
14206#endif
14207
19650fd6
AS
14208int
14209main ()
14210{
14211return f != $ac_func;
503d2be0
AS
14212 ;
14213 return 0;
14214}
14215_ACEOF
14216rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14217if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 14218 (eval $ac_link) 2>conftest.er1
503d2be0 14219 ac_status=$?
edfaf76d
LK
14220 grep -v '^ *+' conftest.er1 >conftest.err
14221 rm -f conftest.er1
14222 cat conftest.err >&5
c0d27fcc 14223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14224 (exit $ac_status); } &&
ec8fcb10
YM
14225 { ac_try='test -z "$ac_c_werror_flag"
14226 || test ! -s conftest.err'
edfaf76d
LK
14227 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14228 (eval $ac_try) 2>&5
14229 ac_status=$?
14230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14231 (exit $ac_status); }; } &&
14232 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14233 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
14234 (eval $ac_try) 2>&5
14235 ac_status=$?
c0d27fcc 14236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14237 (exit $ac_status); }; }; then
98418dba 14238 eval "$as_ac_var=yes"
503d2be0
AS
14239else
14240 echo "$as_me: failed program was:" >&5
19650fd6
AS
14241sed 's/^/| /' conftest.$ac_ext >&5
14242
98418dba 14243eval "$as_ac_var=no"
503d2be0 14244fi
edfaf76d
LK
14245rm -f conftest.err conftest.$ac_objext \
14246 conftest$ac_exeext conftest.$ac_ext
503d2be0 14247fi
c0d27fcc 14248echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
14249echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14250if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 14251 cat >>confdefs.h <<_ACEOF
98418dba 14252#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 14253_ACEOF
457b792c 14254
457b792c 14255fi
98418dba 14256done
457b792c 14257
c0d27fcc 14258
98418dba
CW
14259for ac_header in maillock.h
14260do
14261as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
14262if eval "test \"\${$as_ac_Header+set}\" = set"; then
14263 echo "$as_me:$LINENO: checking for $ac_header" >&5
98418dba
CW
14264echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14265if eval "test \"\${$as_ac_Header+set}\" = set"; then
503d2be0 14266 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
14267fi
14268echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14269echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
ba4481b5 14270else
c0d27fcc
MR
14271 # Is the header compilable?
14272echo "$as_me:$LINENO: checking $ac_header usability" >&5
14273echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
14274cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14275/* confdefs.h. */
14276_ACEOF
14277cat confdefs.h >>conftest.$ac_ext
14278cat >>conftest.$ac_ext <<_ACEOF
14279/* end confdefs.h. */
c0d27fcc
MR
14280$ac_includes_default
14281#include <$ac_header>
14282_ACEOF
14283rm -f conftest.$ac_objext
14284if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 14285 (eval $ac_compile) 2>conftest.er1
c0d27fcc 14286 ac_status=$?
edfaf76d
LK
14287 grep -v '^ *+' conftest.er1 >conftest.err
14288 rm -f conftest.er1
14289 cat conftest.err >&5
c0d27fcc
MR
14290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14291 (exit $ac_status); } &&
ec8fcb10
YM
14292 { ac_try='test -z "$ac_c_werror_flag"
14293 || test ! -s conftest.err'
edfaf76d
LK
14294 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14295 (eval $ac_try) 2>&5
14296 ac_status=$?
14297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14298 (exit $ac_status); }; } &&
14299 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
14300 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14301 (eval $ac_try) 2>&5
14302 ac_status=$?
14303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14304 (exit $ac_status); }; }; then
14305 ac_header_compiler=yes
14306else
14307 echo "$as_me: failed program was:" >&5
19650fd6
AS
14308sed 's/^/| /' conftest.$ac_ext >&5
14309
c0d27fcc
MR
14310ac_header_compiler=no
14311fi
edfaf76d 14312rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
14313echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14314echo "${ECHO_T}$ac_header_compiler" >&6
14315
14316# Is the header present?
14317echo "$as_me:$LINENO: checking $ac_header presence" >&5
14318echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
14319cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14320/* confdefs.h. */
14321_ACEOF
14322cat confdefs.h >>conftest.$ac_ext
14323cat >>conftest.$ac_ext <<_ACEOF
14324/* end confdefs.h. */
98418dba 14325#include <$ac_header>
503d2be0 14326_ACEOF
c0d27fcc 14327if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba 14328 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
503d2be0 14329 ac_status=$?
6bae0ccf 14330 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
14331 rm -f conftest.er1
14332 cat conftest.err >&5
c0d27fcc 14333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
14334 (exit $ac_status); } >/dev/null; then
14335 if test -s conftest.err; then
14336 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 14337 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
14338 else
14339 ac_cpp_err=
14340 fi
503d2be0 14341else
98418dba 14342 ac_cpp_err=yes
503d2be0 14343fi
98418dba 14344if test -z "$ac_cpp_err"; then
c0d27fcc 14345 ac_header_preproc=yes
98418dba
CW
14346else
14347 echo "$as_me: failed program was:" >&5
19650fd6
AS
14348sed 's/^/| /' conftest.$ac_ext >&5
14349
c0d27fcc 14350 ac_header_preproc=no
503d2be0 14351fi
98418dba 14352rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
14353echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14354echo "${ECHO_T}$ac_header_preproc" >&6
14355
14356# So? What about this header?
edfaf76d
LK
14357case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14358 yes:no: )
c0d27fcc
MR
14359 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
14360echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
14361 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
14362echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
14363 ac_header_preproc=yes
19650fd6 14364 ;;
edfaf76d 14365 no:yes:* )
c0d27fcc
MR
14366 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
14367echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
14368 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
14369echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
14370 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
14371echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
14372 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
14373echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 14374 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 14375echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
14376 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
14377echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
14378 (
14379 cat <<\_ASBOX
edfaf76d
LK
14380## ------------------------------------------ ##
14381## Report this to the AC_PACKAGE_NAME lists. ##
14382## ------------------------------------------ ##
19650fd6
AS
14383_ASBOX
14384 ) |
14385 sed "s/^/$as_me: WARNING: /" >&2
14386 ;;
c0d27fcc
MR
14387esac
14388echo "$as_me:$LINENO: checking for $ac_header" >&5
14389echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14390if eval "test \"\${$as_ac_Header+set}\" = set"; then
14391 echo $ECHO_N "(cached) $ECHO_C" >&6
14392else
edfaf76d 14393 eval "$as_ac_Header=\$ac_header_preproc"
ba4481b5 14394fi
c0d27fcc 14395echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 14396echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
14397
14398fi
98418dba 14399if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 14400 cat >>confdefs.h <<_ACEOF
98418dba 14401#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 14402_ACEOF
48d4b120 14403
ba4481b5 14404fi
c0d27fcc 14405
98418dba
CW
14406done
14407
c0d27fcc
MR
14408
14409
14410
14411
14412
14413
14414
14415
14416
14417
14418
14419
14420
14421
14422
14423
14424
14425
14426
14427
14428
14429
14430
14431
14432
14433
14434
14435
14436
14437
14438
14439
14440
14441
14442
14443
14444
14445
14446
14447
14448
14449
14450
14451
14452
14453
14454
14455
14456
14457
14458
14459
14460
14461
14462
22044edf
DL
14463
14464
c0d27fcc 14465
b0e44248
RB
14466
14467
973a76b1
DL
14468
14469
14470
cd958eb3 14471
25ca0bca 14472
ea92fc9f 14473
e2fcf543 14474
c0d27fcc
MR
14475
14476
98418dba 14477for ac_func in gethostname getdomainname dup2 \
e2fcf543 14478rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \
98418dba
CW
14479random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime res_init setsid \
14480strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \
973a76b1 14481utimes setrlimit setpgid getcwd getwd shutdown getaddrinfo \
98418dba
CW
14482__fpending mblen mbrlen mbsinit strsignal setitimer ualarm index rindex \
14483sendto recvfrom getsockopt setsockopt getsockname getpeername \
b0e44248 14484gai_strerror mkstemp getline getdelim mremap memmove fsync bzero \
4489ece2 14485memset memcmp difftime memcpy mempcpy mblen mbrlen posix_memalign
98418dba
CW
14486do
14487as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 14488echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
14489echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14490if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 14491 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 14492else
503d2be0 14493 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14494/* confdefs.h. */
14495_ACEOF
14496cat confdefs.h >>conftest.$ac_ext
14497cat >>conftest.$ac_ext <<_ACEOF
14498/* end confdefs.h. */
edfaf76d
LK
14499/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14500 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14501#define $ac_func innocuous_$ac_func
14502
98418dba 14503/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
14504 which can conflict with char $ac_func (); below.
14505 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14506 <limits.h> exists even on freestanding compilers. */
edfaf76d 14507
19650fd6
AS
14508#ifdef __STDC__
14509# include <limits.h>
14510#else
14511# include <assert.h>
14512#endif
edfaf76d
LK
14513
14514#undef $ac_func
14515
ba4481b5 14516/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
14517#ifdef __cplusplus
14518extern "C"
19650fd6 14519{
503d2be0 14520#endif
ba4481b5 14521/* We use char because int might match the return type of a gcc2
503d2be0 14522 builtin and then its argument prototype would still apply. */
98418dba 14523char $ac_func ();
98418dba
CW
14524/* The GNU C library defines this for functions which it implements
14525 to always fail with ENOSYS. Some functions are actually named
14526 something starting with __ and the normal name is an alias. */
14527#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14528choke me
14529#else
19650fd6
AS
14530char (*f) () = $ac_func;
14531#endif
14532#ifdef __cplusplus
14533}
98418dba
CW
14534#endif
14535
19650fd6
AS
14536int
14537main ()
14538{
14539return f != $ac_func;
503d2be0
AS
14540 ;
14541 return 0;
14542}
14543_ACEOF
14544rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14545if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 14546 (eval $ac_link) 2>conftest.er1
503d2be0 14547 ac_status=$?
edfaf76d
LK
14548 grep -v '^ *+' conftest.er1 >conftest.err
14549 rm -f conftest.er1
14550 cat conftest.err >&5
c0d27fcc 14551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14552 (exit $ac_status); } &&
ec8fcb10
YM
14553 { ac_try='test -z "$ac_c_werror_flag"
14554 || test ! -s conftest.err'
c0d27fcc 14555 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
14556 (eval $ac_try) 2>&5
14557 ac_status=$?
c0d27fcc 14558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
edfaf76d
LK
14559 (exit $ac_status); }; } &&
14560 { ac_try='test -s conftest$ac_exeext'
14561 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14562 (eval $ac_try) 2>&5
14563 ac_status=$?
14564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14565 (exit $ac_status); }; }; then
98418dba 14566 eval "$as_ac_var=yes"
503d2be0
AS
14567else
14568 echo "$as_me: failed program was:" >&5
19650fd6
AS
14569sed 's/^/| /' conftest.$ac_ext >&5
14570
98418dba 14571eval "$as_ac_var=no"
503d2be0 14572fi
edfaf76d
LK
14573rm -f conftest.err conftest.$ac_objext \
14574 conftest$ac_exeext conftest.$ac_ext
ba4481b5 14575fi
c0d27fcc 14576echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
14577echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14578if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 14579 cat >>confdefs.h <<_ACEOF
98418dba 14580#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 14581_ACEOF
ba4481b5 14582
ba4481b5 14583fi
98418dba 14584done
ba4481b5 14585
c0d27fcc
MR
14586
14587
98418dba
CW
14588for ac_header in sys/un.h
14589do
14590as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
14591if eval "test \"\${$as_ac_Header+set}\" = set"; then
14592 echo "$as_me:$LINENO: checking for $ac_header" >&5
98418dba
CW
14593echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14594if eval "test \"\${$as_ac_Header+set}\" = set"; then
14595 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
14596fi
14597echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14598echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 14599else
c0d27fcc
MR
14600 # Is the header compilable?
14601echo "$as_me:$LINENO: checking $ac_header usability" >&5
14602echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
14603cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14604/* confdefs.h. */
14605_ACEOF
14606cat confdefs.h >>conftest.$ac_ext
14607cat >>conftest.$ac_ext <<_ACEOF
14608/* end confdefs.h. */
c0d27fcc
MR
14609$ac_includes_default
14610#include <$ac_header>
14611_ACEOF
14612rm -f conftest.$ac_objext
14613if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 14614 (eval $ac_compile) 2>conftest.er1
c0d27fcc 14615 ac_status=$?
edfaf76d
LK
14616 grep -v '^ *+' conftest.er1 >conftest.err
14617 rm -f conftest.er1
14618 cat conftest.err >&5
c0d27fcc
MR
14619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14620 (exit $ac_status); } &&
ec8fcb10
YM
14621 { ac_try='test -z "$ac_c_werror_flag"
14622 || test ! -s conftest.err'
edfaf76d
LK
14623 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14624 (eval $ac_try) 2>&5
14625 ac_status=$?
14626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14627 (exit $ac_status); }; } &&
14628 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
14629 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14630 (eval $ac_try) 2>&5
14631 ac_status=$?
14632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14633 (exit $ac_status); }; }; then
14634 ac_header_compiler=yes
14635else
14636 echo "$as_me: failed program was:" >&5
19650fd6
AS
14637sed 's/^/| /' conftest.$ac_ext >&5
14638
c0d27fcc
MR
14639ac_header_compiler=no
14640fi
edfaf76d 14641rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
14642echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14643echo "${ECHO_T}$ac_header_compiler" >&6
14644
14645# Is the header present?
14646echo "$as_me:$LINENO: checking $ac_header presence" >&5
14647echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
14648cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14649/* confdefs.h. */
14650_ACEOF
14651cat confdefs.h >>conftest.$ac_ext
14652cat >>conftest.$ac_ext <<_ACEOF
14653/* end confdefs.h. */
98418dba 14654#include <$ac_header>
503d2be0 14655_ACEOF
c0d27fcc 14656if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
14657 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14658 ac_status=$?
6bae0ccf 14659 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
14660 rm -f conftest.er1
14661 cat conftest.err >&5
c0d27fcc 14662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
14663 (exit $ac_status); } >/dev/null; then
14664 if test -s conftest.err; then
14665 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 14666 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
14667 else
14668 ac_cpp_err=
14669 fi
14670else
14671 ac_cpp_err=yes
14672fi
14673if test -z "$ac_cpp_err"; then
c0d27fcc 14674 ac_header_preproc=yes
ba4481b5 14675else
503d2be0 14676 echo "$as_me: failed program was:" >&5
19650fd6
AS
14677sed 's/^/| /' conftest.$ac_ext >&5
14678
c0d27fcc 14679 ac_header_preproc=no
ba4481b5 14680fi
503d2be0 14681rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
14682echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14683echo "${ECHO_T}$ac_header_preproc" >&6
14684
14685# So? What about this header?
edfaf76d
LK
14686case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14687 yes:no: )
c0d27fcc
MR
14688 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
14689echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
14690 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
14691echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
14692 ac_header_preproc=yes
19650fd6 14693 ;;
edfaf76d 14694 no:yes:* )
c0d27fcc
MR
14695 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
14696echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
14697 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
14698echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
14699 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
14700echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
14701 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
14702echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 14703 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 14704echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
14705 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
14706echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
14707 (
14708 cat <<\_ASBOX
edfaf76d
LK
14709## ------------------------------------------ ##
14710## Report this to the AC_PACKAGE_NAME lists. ##
14711## ------------------------------------------ ##
19650fd6
AS
14712_ASBOX
14713 ) |
14714 sed "s/^/$as_me: WARNING: /" >&2
14715 ;;
c0d27fcc
MR
14716esac
14717echo "$as_me:$LINENO: checking for $ac_header" >&5
14718echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14719if eval "test \"\${$as_ac_Header+set}\" = set"; then
14720 echo $ECHO_N "(cached) $ECHO_C" >&6
14721else
edfaf76d 14722 eval "$as_ac_Header=\$ac_header_preproc"
ba4481b5 14723fi
c0d27fcc 14724echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
925c2f3f 14725echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
14726
14727fi
925c2f3f 14728if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 14729 cat >>confdefs.h <<_ACEOF
925c2f3f 14730#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 14731_ACEOF
503d2be0 14732
925c2f3f 14733fi
c0d27fcc 14734
925c2f3f
EZ
14735done
14736
c0d27fcc
MR
14737
14738
14739
edfaf76d
LK
14740
14741for ac_header in stdlib.h sys/time.h unistd.h
925c2f3f
EZ
14742do
14743as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
14744if eval "test \"\${$as_ac_Header+set}\" = set"; then
14745 echo "$as_me:$LINENO: checking for $ac_header" >&5
925c2f3f
EZ
14746echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14747if eval "test \"\${$as_ac_Header+set}\" = set"; then
14748 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
14749fi
14750echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14751echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
925c2f3f 14752else
c0d27fcc
MR
14753 # Is the header compilable?
14754echo "$as_me:$LINENO: checking $ac_header usability" >&5
14755echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
14756cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14757/* confdefs.h. */
14758_ACEOF
14759cat confdefs.h >>conftest.$ac_ext
14760cat >>conftest.$ac_ext <<_ACEOF
14761/* end confdefs.h. */
c0d27fcc
MR
14762$ac_includes_default
14763#include <$ac_header>
14764_ACEOF
14765rm -f conftest.$ac_objext
14766if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 14767 (eval $ac_compile) 2>conftest.er1
c0d27fcc 14768 ac_status=$?
edfaf76d
LK
14769 grep -v '^ *+' conftest.er1 >conftest.err
14770 rm -f conftest.er1
14771 cat conftest.err >&5
c0d27fcc
MR
14772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14773 (exit $ac_status); } &&
ec8fcb10
YM
14774 { ac_try='test -z "$ac_c_werror_flag"
14775 || test ! -s conftest.err'
edfaf76d
LK
14776 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14777 (eval $ac_try) 2>&5
14778 ac_status=$?
14779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14780 (exit $ac_status); }; } &&
14781 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
14782 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14783 (eval $ac_try) 2>&5
14784 ac_status=$?
14785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14786 (exit $ac_status); }; }; then
14787 ac_header_compiler=yes
14788else
14789 echo "$as_me: failed program was:" >&5
19650fd6
AS
14790sed 's/^/| /' conftest.$ac_ext >&5
14791
c0d27fcc
MR
14792ac_header_compiler=no
14793fi
edfaf76d 14794rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
14795echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14796echo "${ECHO_T}$ac_header_compiler" >&6
14797
14798# Is the header present?
14799echo "$as_me:$LINENO: checking $ac_header presence" >&5
14800echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
14801cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14802/* confdefs.h. */
14803_ACEOF
14804cat confdefs.h >>conftest.$ac_ext
14805cat >>conftest.$ac_ext <<_ACEOF
14806/* end confdefs.h. */
98418dba 14807#include <$ac_header>
503d2be0 14808_ACEOF
c0d27fcc 14809if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
14810 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14811 ac_status=$?
6bae0ccf 14812 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
14813 rm -f conftest.er1
14814 cat conftest.err >&5
c0d27fcc 14815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
14816 (exit $ac_status); } >/dev/null; then
14817 if test -s conftest.err; then
14818 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 14819 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
14820 else
14821 ac_cpp_err=
14822 fi
14823else
14824 ac_cpp_err=yes
14825fi
14826if test -z "$ac_cpp_err"; then
c0d27fcc 14827 ac_header_preproc=yes
98418dba
CW
14828else
14829 echo "$as_me: failed program was:" >&5
19650fd6
AS
14830sed 's/^/| /' conftest.$ac_ext >&5
14831
c0d27fcc 14832 ac_header_preproc=no
98418dba
CW
14833fi
14834rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
14835echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14836echo "${ECHO_T}$ac_header_preproc" >&6
14837
14838# So? What about this header?
edfaf76d
LK
14839case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14840 yes:no: )
c0d27fcc
MR
14841 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
14842echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
14843 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
14844echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
14845 ac_header_preproc=yes
19650fd6 14846 ;;
edfaf76d 14847 no:yes:* )
c0d27fcc
MR
14848 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
14849echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
14850 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
14851echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
14852 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
14853echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
14854 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
14855echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 14856 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 14857echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
14858 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
14859echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
14860 (
14861 cat <<\_ASBOX
edfaf76d
LK
14862## ------------------------------------------ ##
14863## Report this to the AC_PACKAGE_NAME lists. ##
14864## ------------------------------------------ ##
19650fd6
AS
14865_ASBOX
14866 ) |
14867 sed "s/^/$as_me: WARNING: /" >&2
14868 ;;
c0d27fcc
MR
14869esac
14870echo "$as_me:$LINENO: checking for $ac_header" >&5
14871echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14872if eval "test \"\${$as_ac_Header+set}\" = set"; then
14873 echo $ECHO_N "(cached) $ECHO_C" >&6
14874else
edfaf76d 14875 eval "$as_ac_Header=\$ac_header_preproc"
ffe36136 14876fi
c0d27fcc 14877echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 14878echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
14879
14880fi
98418dba 14881if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 14882 cat >>confdefs.h <<_ACEOF
98418dba 14883#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 14884_ACEOF
98418dba
CW
14885
14886fi
c0d27fcc 14887
98418dba
CW
14888done
14889
c0d27fcc 14890
98418dba
CW
14891for ac_func in alarm
14892do
14893as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 14894echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
14895echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14896if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 14897 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 14898else
98418dba 14899 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14900/* confdefs.h. */
14901_ACEOF
14902cat confdefs.h >>conftest.$ac_ext
14903cat >>conftest.$ac_ext <<_ACEOF
14904/* end confdefs.h. */
edfaf76d
LK
14905/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14906 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14907#define $ac_func innocuous_$ac_func
14908
98418dba 14909/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
14910 which can conflict with char $ac_func (); below.
14911 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14912 <limits.h> exists even on freestanding compilers. */
edfaf76d 14913
19650fd6
AS
14914#ifdef __STDC__
14915# include <limits.h>
14916#else
14917# include <assert.h>
14918#endif
edfaf76d
LK
14919
14920#undef $ac_func
14921
ba4481b5 14922/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
14923#ifdef __cplusplus
14924extern "C"
19650fd6 14925{
503d2be0 14926#endif
ba4481b5 14927/* We use char because int might match the return type of a gcc2
503d2be0 14928 builtin and then its argument prototype would still apply. */
98418dba 14929char $ac_func ();
98418dba
CW
14930/* The GNU C library defines this for functions which it implements
14931 to always fail with ENOSYS. Some functions are actually named
14932 something starting with __ and the normal name is an alias. */
14933#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14934choke me
14935#else
19650fd6
AS
14936char (*f) () = $ac_func;
14937#endif
14938#ifdef __cplusplus
14939}
98418dba
CW
14940#endif
14941
19650fd6
AS
14942int
14943main ()
14944{
14945return f != $ac_func;
503d2be0
AS
14946 ;
14947 return 0;
14948}
14949_ACEOF
14950rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14951if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 14952 (eval $ac_link) 2>conftest.er1
503d2be0 14953 ac_status=$?
edfaf76d
LK
14954 grep -v '^ *+' conftest.er1 >conftest.err
14955 rm -f conftest.er1
14956 cat conftest.err >&5
c0d27fcc 14957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14958 (exit $ac_status); } &&
ec8fcb10
YM
14959 { ac_try='test -z "$ac_c_werror_flag"
14960 || test ! -s conftest.err'
edfaf76d
LK
14961 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14962 (eval $ac_try) 2>&5
14963 ac_status=$?
14964 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14965 (exit $ac_status); }; } &&
14966 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14967 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
14968 (eval $ac_try) 2>&5
14969 ac_status=$?
c0d27fcc 14970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14971 (exit $ac_status); }; }; then
98418dba 14972 eval "$as_ac_var=yes"
503d2be0
AS
14973else
14974 echo "$as_me: failed program was:" >&5
19650fd6
AS
14975sed 's/^/| /' conftest.$ac_ext >&5
14976
98418dba 14977eval "$as_ac_var=no"
503d2be0 14978fi
edfaf76d
LK
14979rm -f conftest.err conftest.$ac_objext \
14980 conftest$ac_exeext conftest.$ac_ext
ffe36136 14981fi
c0d27fcc 14982echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
14983echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14984if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 14985 cat >>confdefs.h <<_ACEOF
98418dba 14986#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 14987_ACEOF
ffe36136 14988
ba4481b5 14989fi
98418dba 14990done
ba4481b5 14991
c0d27fcc 14992echo "$as_me:$LINENO: checking for working mktime" >&5
98418dba
CW
14993echo $ECHO_N "checking for working mktime... $ECHO_C" >&6
14994if test "${ac_cv_func_working_mktime+set}" = set; then
14995 echo $ECHO_N "(cached) $ECHO_C" >&6
14996else
14997 if test "$cross_compiling" = yes; then
14998 ac_cv_func_working_mktime=no
14999else
15000 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15001/* confdefs.h. */
15002_ACEOF
15003cat confdefs.h >>conftest.$ac_ext
15004cat >>conftest.$ac_ext <<_ACEOF
15005/* end confdefs.h. */
98418dba
CW
15006/* Test program from Paul Eggert and Tony Leneis. */
15007#if TIME_WITH_SYS_TIME
15008# include <sys/time.h>
15009# include <time.h>
15010#else
15011# if HAVE_SYS_TIME_H
15012# include <sys/time.h>
15013# else
15014# include <time.h>
15015# endif
15016#endif
ba4481b5 15017
edfaf76d
LK
15018#if HAVE_STDLIB_H
15019# include <stdlib.h>
15020#endif
15021
98418dba
CW
15022#if HAVE_UNISTD_H
15023# include <unistd.h>
15024#endif
ba4481b5 15025
98418dba
CW
15026#if !HAVE_ALARM
15027# define alarm(X) /* empty */
15028#endif
df645f7c 15029
98418dba
CW
15030/* Work around redefinition to rpl_putenv by other config tests. */
15031#undef putenv
df645f7c 15032
98418dba 15033static time_t time_t_max;
edfaf76d 15034static time_t time_t_min;
df645f7c 15035
98418dba 15036/* Values we'll use to set the TZ environment variable. */
edfaf76d
LK
15037static char *tz_strings[] = {
15038 (char *) 0, "TZ=GMT0", "TZ=JST-9",
98418dba
CW
15039 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
15040};
15041#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
503d2be0 15042
98418dba
CW
15043/* Fail if mktime fails to convert a date in the spring-forward gap.
15044 Based on a problem report from Andreas Jaeger. */
15045static void
15046spring_forward_gap ()
15047{
15048 /* glibc (up to about 1998-10-07) failed this test. */
15049 struct tm tm;
15050
15051 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
15052 instead of "TZ=America/Vancouver" in order to detect the bug even
15053 on systems that don't support the Olson extension, or don't have the
15054 full zoneinfo tables installed. */
15055 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
15056
15057 tm.tm_year = 98;
15058 tm.tm_mon = 3;
15059 tm.tm_mday = 5;
15060 tm.tm_hour = 2;
15061 tm.tm_min = 0;
15062 tm.tm_sec = 0;
15063 tm.tm_isdst = -1;
15064 if (mktime (&tm) == (time_t)-1)
15065 exit (1);
15066}
15067
15068static void
edfaf76d 15069mktime_test1 (now)
98418dba
CW
15070 time_t now;
15071{
15072 struct tm *lt;
15073 if ((lt = localtime (&now)) && mktime (lt) != now)
15074 exit (1);
edfaf76d
LK
15075}
15076
15077static void
15078mktime_test (now)
15079 time_t now;
15080{
15081 mktime_test1 (now);
15082 mktime_test1 ((time_t) (time_t_max - now));
15083 mktime_test1 ((time_t) (time_t_min + now));
98418dba
CW
15084}
15085
15086static void
15087irix_6_4_bug ()
15088{
15089 /* Based on code from Ariel Faigon. */
15090 struct tm tm;
15091 tm.tm_year = 96;
15092 tm.tm_mon = 3;
15093 tm.tm_mday = 0;
15094 tm.tm_hour = 0;
15095 tm.tm_min = 0;
15096 tm.tm_sec = 0;
15097 tm.tm_isdst = -1;
15098 mktime (&tm);
15099 if (tm.tm_mon != 2 || tm.tm_mday != 31)
15100 exit (1);
15101}
15102
15103static void
15104bigtime_test (j)
15105 int j;
15106{
15107 struct tm tm;
15108 time_t now;
15109 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
15110 now = mktime (&tm);
15111 if (now != (time_t) -1)
15112 {
15113 struct tm *lt = localtime (&now);
15114 if (! (lt
15115 && lt->tm_year == tm.tm_year
15116 && lt->tm_mon == tm.tm_mon
15117 && lt->tm_mday == tm.tm_mday
15118 && lt->tm_hour == tm.tm_hour
15119 && lt->tm_min == tm.tm_min
15120 && lt->tm_sec == tm.tm_sec
15121 && lt->tm_yday == tm.tm_yday
15122 && lt->tm_wday == tm.tm_wday
15123 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
15124 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
15125 exit (1);
15126 }
15127}
15128
15129int
15130main ()
15131{
15132 time_t t, delta;
15133 int i, j;
15134
15135 /* This test makes some buggy mktime implementations loop.
15136 Give up after 60 seconds; a mktime slower than that
15137 isn't worth using anyway. */
15138 alarm (60);
15139
15140 for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2)
15141 continue;
15142 time_t_max--;
edfaf76d
LK
15143 if ((time_t) -1 < 0)
15144 for (time_t_min = -1; (time_t) (time_t_min * 2) < 0; time_t_min *= 2)
15145 continue;
98418dba
CW
15146 delta = time_t_max / 997; /* a suitable prime number */
15147 for (i = 0; i < N_STRINGS; i++)
15148 {
15149 if (tz_strings[i])
15150 putenv (tz_strings[i]);
503d2be0 15151
98418dba
CW
15152 for (t = 0; t <= time_t_max - delta; t += delta)
15153 mktime_test (t);
edfaf76d
LK
15154 mktime_test ((time_t) 1);
15155 mktime_test ((time_t) (60 * 60));
15156 mktime_test ((time_t) (60 * 60 * 24));
98418dba
CW
15157
15158 for (j = 1; 0 < j; j *= 2)
edfaf76d 15159 bigtime_test (j);
98418dba
CW
15160 bigtime_test (j - 1);
15161 }
15162 irix_6_4_bug ();
15163 spring_forward_gap ();
15164 exit (0);
503d2be0
AS
15165}
15166_ACEOF
98418dba 15167rm -f conftest$ac_exeext
c0d27fcc 15168if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
15169 (eval $ac_link) 2>&5
15170 ac_status=$?
c0d27fcc 15171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 15172 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 15173 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
15174 (eval $ac_try) 2>&5
15175 ac_status=$?
c0d27fcc 15176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15177 (exit $ac_status); }; }; then
98418dba 15178 ac_cv_func_working_mktime=yes
503d2be0 15179else
98418dba
CW
15180 echo "$as_me: program exited with status $ac_status" >&5
15181echo "$as_me: failed program was:" >&5
19650fd6
AS
15182sed 's/^/| /' conftest.$ac_ext >&5
15183
c0d27fcc 15184( exit $ac_status )
98418dba 15185ac_cv_func_working_mktime=no
503d2be0 15186fi
edfaf76d 15187rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
503d2be0 15188fi
ba4481b5 15189fi
c0d27fcc 15190echo "$as_me:$LINENO: result: $ac_cv_func_working_mktime" >&5
98418dba
CW
15191echo "${ECHO_T}$ac_cv_func_working_mktime" >&6
15192if test $ac_cv_func_working_mktime = no; then
edfaf76d
LK
15193 case $LIBOBJS in
15194 "mktime.$ac_objext" | \
15195 *" mktime.$ac_objext" | \
15196 "mktime.$ac_objext "* | \
15197 *" mktime.$ac_objext "* ) ;;
15198 *) LIBOBJS="$LIBOBJS mktime.$ac_objext" ;;
15199esac
15200
ba4481b5
DL
15201fi
15202
98418dba 15203if test "$ac_cv_func_working_mktime" = no; then
b936fae4 15204
c0d27fcc 15205cat >>confdefs.h <<\_ACEOF
98418dba 15206#define BROKEN_MKTIME 1
c0d27fcc 15207_ACEOF
ba4481b5 15208
ba4481b5 15209fi
503d2be0 15210
98418dba
CW
15211ac_have_func=no # yes means we've found a way to get the load average.
15212
6bae0ccf
DL
15213# Make sure getloadavg.c is where it belongs, at configure-time.
15214test -f "$srcdir/$ac_config_libobj_dir/getloadavg.c" ||
15215 { { echo "$as_me:$LINENO: error: $srcdir/$ac_config_libobj_dir/getloadavg.c is missing" >&5
15216echo "$as_me: error: $srcdir/$ac_config_libobj_dir/getloadavg.c is missing" >&2;}
15217 { (exit 1); exit 1; }; }
15218
98418dba
CW
15219ac_save_LIBS=$LIBS
15220
15221# Check for getloadavg, but be sure not to touch the cache variable.
c0d27fcc 15222(echo "$as_me:$LINENO: checking for getloadavg" >&5
98418dba
CW
15223echo $ECHO_N "checking for getloadavg... $ECHO_C" >&6
15224if test "${ac_cv_func_getloadavg+set}" = set; then
503d2be0 15225 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15226else
503d2be0 15227 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15228/* confdefs.h. */
15229_ACEOF
15230cat confdefs.h >>conftest.$ac_ext
15231cat >>conftest.$ac_ext <<_ACEOF
15232/* end confdefs.h. */
edfaf76d
LK
15233/* Define getloadavg to an innocuous variant, in case <limits.h> declares getloadavg.
15234 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15235#define getloadavg innocuous_getloadavg
15236
98418dba 15237/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
15238 which can conflict with char getloadavg (); below.
15239 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15240 <limits.h> exists even on freestanding compilers. */
edfaf76d 15241
19650fd6
AS
15242#ifdef __STDC__
15243# include <limits.h>
15244#else
15245# include <assert.h>
15246#endif
edfaf76d
LK
15247
15248#undef getloadavg
15249
ba4481b5 15250/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
15251#ifdef __cplusplus
15252extern "C"
19650fd6 15253{
503d2be0 15254#endif
ba4481b5 15255/* We use char because int might match the return type of a gcc2
503d2be0 15256 builtin and then its argument prototype would still apply. */
98418dba 15257char getloadavg ();
98418dba
CW
15258/* The GNU C library defines this for functions which it implements
15259 to always fail with ENOSYS. Some functions are actually named
15260 something starting with __ and the normal name is an alias. */
15261#if defined (__stub_getloadavg) || defined (__stub___getloadavg)
15262choke me
15263#else
19650fd6
AS
15264char (*f) () = getloadavg;
15265#endif
15266#ifdef __cplusplus
15267}
cd958eb3
MB
15268#endif
15269
19650fd6
AS
15270int
15271main ()
15272{
15273return f != getloadavg;
503d2be0
AS
15274 ;
15275 return 0;
15276}
15277_ACEOF
15278rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15279if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 15280 (eval $ac_link) 2>conftest.er1
503d2be0 15281 ac_status=$?
edfaf76d
LK
15282 grep -v '^ *+' conftest.er1 >conftest.err
15283 rm -f conftest.er1
15284 cat conftest.err >&5
c0d27fcc 15285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15286 (exit $ac_status); } &&
ec8fcb10
YM
15287 { ac_try='test -z "$ac_c_werror_flag"
15288 || test ! -s conftest.err'
edfaf76d
LK
15289 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15290 (eval $ac_try) 2>&5
15291 ac_status=$?
15292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15293 (exit $ac_status); }; } &&
15294 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 15295 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
15296 (eval $ac_try) 2>&5
15297 ac_status=$?
c0d27fcc 15298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15299 (exit $ac_status); }; }; then
98418dba 15300 ac_cv_func_getloadavg=yes
503d2be0
AS
15301else
15302 echo "$as_me: failed program was:" >&5
19650fd6
AS
15303sed 's/^/| /' conftest.$ac_ext >&5
15304
98418dba 15305ac_cv_func_getloadavg=no
503d2be0 15306fi
edfaf76d
LK
15307rm -f conftest.err conftest.$ac_objext \
15308 conftest$ac_exeext conftest.$ac_ext
ba4481b5 15309fi
c0d27fcc 15310echo "$as_me:$LINENO: result: $ac_cv_func_getloadavg" >&5
98418dba
CW
15311echo "${ECHO_T}$ac_cv_func_getloadavg" >&6
15312if test $ac_cv_func_getloadavg = yes; then
15313 exit 0
15314else
15315 exit 1
ba4481b5 15316fi
98418dba 15317) && ac_have_func=yes
ba4481b5 15318
98418dba 15319# On HPUX9, an unprivileged user can get load averages through this function.
503d2be0 15320
98418dba
CW
15321for ac_func in pstat_getdynamic
15322do
15323as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 15324echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
15325echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15326if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 15327 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15328else
503d2be0 15329 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15330/* confdefs.h. */
15331_ACEOF
15332cat confdefs.h >>conftest.$ac_ext
15333cat >>conftest.$ac_ext <<_ACEOF
15334/* end confdefs.h. */
edfaf76d
LK
15335/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15336 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15337#define $ac_func innocuous_$ac_func
15338
98418dba 15339/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
15340 which can conflict with char $ac_func (); below.
15341 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15342 <limits.h> exists even on freestanding compilers. */
edfaf76d 15343
19650fd6
AS
15344#ifdef __STDC__
15345# include <limits.h>
15346#else
15347# include <assert.h>
15348#endif
edfaf76d
LK
15349
15350#undef $ac_func
15351
ba4481b5 15352/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
15353#ifdef __cplusplus
15354extern "C"
19650fd6 15355{
503d2be0 15356#endif
ba4481b5 15357/* We use char because int might match the return type of a gcc2
503d2be0 15358 builtin and then its argument prototype would still apply. */
98418dba 15359char $ac_func ();
98418dba
CW
15360/* The GNU C library defines this for functions which it implements
15361 to always fail with ENOSYS. Some functions are actually named
15362 something starting with __ and the normal name is an alias. */
15363#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15364choke me
15365#else
19650fd6
AS
15366char (*f) () = $ac_func;
15367#endif
15368#ifdef __cplusplus
15369}
98418dba
CW
15370#endif
15371
19650fd6
AS
15372int
15373main ()
15374{
15375return f != $ac_func;
98418dba
CW
15376 ;
15377 return 0;
15378}
f21fadcc 15379_ACEOF
98418dba 15380rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15381if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 15382 (eval $ac_link) 2>conftest.er1
f21fadcc 15383 ac_status=$?
edfaf76d
LK
15384 grep -v '^ *+' conftest.er1 >conftest.err
15385 rm -f conftest.er1
15386 cat conftest.err >&5
c0d27fcc 15387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 15388 (exit $ac_status); } &&
ec8fcb10
YM
15389 { ac_try='test -z "$ac_c_werror_flag"
15390 || test ! -s conftest.err'
edfaf76d
LK
15391 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15392 (eval $ac_try) 2>&5
15393 ac_status=$?
15394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15395 (exit $ac_status); }; } &&
15396 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 15397 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
15398 (eval $ac_try) 2>&5
15399 ac_status=$?
c0d27fcc 15400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
15401 (exit $ac_status); }; }; then
15402 eval "$as_ac_var=yes"
f21fadcc
JD
15403else
15404 echo "$as_me: failed program was:" >&5
19650fd6
AS
15405sed 's/^/| /' conftest.$ac_ext >&5
15406
98418dba 15407eval "$as_ac_var=no"
f21fadcc 15408fi
edfaf76d
LK
15409rm -f conftest.err conftest.$ac_objext \
15410 conftest$ac_exeext conftest.$ac_ext
f21fadcc 15411fi
c0d27fcc 15412echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
15413echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15414if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 15415 cat >>confdefs.h <<_ACEOF
98418dba 15416#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 15417_ACEOF
98418dba
CW
15418
15419fi
15420done
15421
c0d27fcc 15422
98418dba
CW
15423# Solaris has libkstat which does not require root.
15424
c0d27fcc 15425echo "$as_me:$LINENO: checking for kstat_open in -lkstat" >&5
98418dba
CW
15426echo $ECHO_N "checking for kstat_open in -lkstat... $ECHO_C" >&6
15427if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then
f21fadcc
JD
15428 echo $ECHO_N "(cached) $ECHO_C" >&6
15429else
15430 ac_check_lib_save_LIBS=$LIBS
98418dba 15431LIBS="-lkstat $LIBS"
f21fadcc 15432cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15433/* confdefs.h. */
15434_ACEOF
15435cat confdefs.h >>conftest.$ac_ext
15436cat >>conftest.$ac_ext <<_ACEOF
15437/* end confdefs.h. */
f21fadcc
JD
15438
15439/* Override any gcc2 internal prototype to avoid an error. */
15440#ifdef __cplusplus
15441extern "C"
15442#endif
15443/* We use char because int might match the return type of a gcc2
15444 builtin and then its argument prototype would still apply. */
98418dba 15445char kstat_open ();
f21fadcc
JD
15446int
15447main ()
15448{
98418dba 15449kstat_open ();
f21fadcc
JD
15450 ;
15451 return 0;
15452}
15453_ACEOF
15454rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15455if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 15456 (eval $ac_link) 2>conftest.er1
f21fadcc 15457 ac_status=$?
edfaf76d
LK
15458 grep -v '^ *+' conftest.er1 >conftest.err
15459 rm -f conftest.er1
15460 cat conftest.err >&5
c0d27fcc 15461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f21fadcc 15462 (exit $ac_status); } &&
ec8fcb10
YM
15463 { ac_try='test -z "$ac_c_werror_flag"
15464 || test ! -s conftest.err'
edfaf76d
LK
15465 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15466 (eval $ac_try) 2>&5
15467 ac_status=$?
15468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15469 (exit $ac_status); }; } &&
15470 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 15471 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
f21fadcc
JD
15472 (eval $ac_try) 2>&5
15473 ac_status=$?
c0d27fcc 15474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f21fadcc 15475 (exit $ac_status); }; }; then
98418dba 15476 ac_cv_lib_kstat_kstat_open=yes
f21fadcc
JD
15477else
15478 echo "$as_me: failed program was:" >&5
19650fd6
AS
15479sed 's/^/| /' conftest.$ac_ext >&5
15480
98418dba 15481ac_cv_lib_kstat_kstat_open=no
f21fadcc 15482fi
edfaf76d
LK
15483rm -f conftest.err conftest.$ac_objext \
15484 conftest$ac_exeext conftest.$ac_ext
f21fadcc
JD
15485LIBS=$ac_check_lib_save_LIBS
15486fi
c0d27fcc 15487echo "$as_me:$LINENO: result: $ac_cv_lib_kstat_kstat_open" >&5
98418dba
CW
15488echo "${ECHO_T}$ac_cv_lib_kstat_kstat_open" >&6
15489if test $ac_cv_lib_kstat_kstat_open = yes; then
c0d27fcc 15490 cat >>confdefs.h <<_ACEOF
98418dba 15491#define HAVE_LIBKSTAT 1
c0d27fcc 15492_ACEOF
f21fadcc 15493
98418dba 15494 LIBS="-lkstat $LIBS"
f21fadcc 15495
f21fadcc
JD
15496fi
15497
98418dba
CW
15498test $ac_cv_lib_kstat_kstat_open = yes && ac_have_func=yes
15499
15500# Some systems with -lutil have (and need) -lkvm as well, some do not.
15501# On Solaris, -lkvm requires nlist from -lelf, so check that first
15502# to get the right answer into the cache.
15503# For kstat on solaris, we need libelf to force the definition of SVR4 below.
15504if test $ac_have_func = no; then
c0d27fcc 15505 echo "$as_me:$LINENO: checking for elf_begin in -lelf" >&5
98418dba
CW
15506echo $ECHO_N "checking for elf_begin in -lelf... $ECHO_C" >&6
15507if test "${ac_cv_lib_elf_elf_begin+set}" = set; then
503d2be0 15508 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15509else
98418dba
CW
15510 ac_check_lib_save_LIBS=$LIBS
15511LIBS="-lelf $LIBS"
15512cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15513/* confdefs.h. */
15514_ACEOF
15515cat confdefs.h >>conftest.$ac_ext
15516cat >>conftest.$ac_ext <<_ACEOF
15517/* end confdefs.h. */
98418dba
CW
15518
15519/* Override any gcc2 internal prototype to avoid an error. */
15520#ifdef __cplusplus
15521extern "C"
15522#endif
15523/* We use char because int might match the return type of a gcc2
15524 builtin and then its argument prototype would still apply. */
15525char elf_begin ();
503d2be0
AS
15526int
15527main ()
15528{
98418dba 15529elf_begin ();
503d2be0
AS
15530 ;
15531 return 0;
15532}
15533_ACEOF
15534rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15535if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 15536 (eval $ac_link) 2>conftest.er1
503d2be0 15537 ac_status=$?
edfaf76d
LK
15538 grep -v '^ *+' conftest.er1 >conftest.err
15539 rm -f conftest.er1
15540 cat conftest.err >&5
c0d27fcc 15541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15542 (exit $ac_status); } &&
ec8fcb10
YM
15543 { ac_try='test -z "$ac_c_werror_flag"
15544 || test ! -s conftest.err'
edfaf76d
LK
15545 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15546 (eval $ac_try) 2>&5
15547 ac_status=$?
15548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15549 (exit $ac_status); }; } &&
15550 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 15551 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
15552 (eval $ac_try) 2>&5
15553 ac_status=$?
c0d27fcc 15554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15555 (exit $ac_status); }; }; then
98418dba 15556 ac_cv_lib_elf_elf_begin=yes
ba4481b5 15557else
503d2be0 15558 echo "$as_me: failed program was:" >&5
19650fd6
AS
15559sed 's/^/| /' conftest.$ac_ext >&5
15560
98418dba 15561ac_cv_lib_elf_elf_begin=no
ba4481b5 15562fi
edfaf76d
LK
15563rm -f conftest.err conftest.$ac_objext \
15564 conftest$ac_exeext conftest.$ac_ext
98418dba 15565LIBS=$ac_check_lib_save_LIBS
ba4481b5 15566fi
c0d27fcc 15567echo "$as_me:$LINENO: result: $ac_cv_lib_elf_elf_begin" >&5
98418dba
CW
15568echo "${ECHO_T}$ac_cv_lib_elf_elf_begin" >&6
15569if test $ac_cv_lib_elf_elf_begin = yes; then
15570 LIBS="-lelf $LIBS"
ba4481b5
DL
15571fi
15572
98418dba
CW
15573fi
15574if test $ac_have_func = no; then
c0d27fcc 15575 echo "$as_me:$LINENO: checking for kvm_open in -lkvm" >&5
98418dba
CW
15576echo $ECHO_N "checking for kvm_open in -lkvm... $ECHO_C" >&6
15577if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then
503d2be0 15578 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15579else
98418dba
CW
15580 ac_check_lib_save_LIBS=$LIBS
15581LIBS="-lkvm $LIBS"
15582cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15583/* confdefs.h. */
15584_ACEOF
15585cat confdefs.h >>conftest.$ac_ext
15586cat >>conftest.$ac_ext <<_ACEOF
15587/* end confdefs.h. */
98418dba
CW
15588
15589/* Override any gcc2 internal prototype to avoid an error. */
15590#ifdef __cplusplus
15591extern "C"
15592#endif
15593/* We use char because int might match the return type of a gcc2
15594 builtin and then its argument prototype would still apply. */
15595char kvm_open ();
503d2be0
AS
15596int
15597main ()
15598{
98418dba 15599kvm_open ();
503d2be0
AS
15600 ;
15601 return 0;
15602}
15603_ACEOF
15604rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15605if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 15606 (eval $ac_link) 2>conftest.er1
503d2be0 15607 ac_status=$?
edfaf76d
LK
15608 grep -v '^ *+' conftest.er1 >conftest.err
15609 rm -f conftest.er1
15610 cat conftest.err >&5
c0d27fcc 15611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15612 (exit $ac_status); } &&
ec8fcb10
YM
15613 { ac_try='test -z "$ac_c_werror_flag"
15614 || test ! -s conftest.err'
edfaf76d
LK
15615 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15616 (eval $ac_try) 2>&5
15617 ac_status=$?
15618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15619 (exit $ac_status); }; } &&
15620 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 15621 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
15622 (eval $ac_try) 2>&5
15623 ac_status=$?
c0d27fcc 15624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15625 (exit $ac_status); }; }; then
98418dba 15626 ac_cv_lib_kvm_kvm_open=yes
503d2be0
AS
15627else
15628 echo "$as_me: failed program was:" >&5
19650fd6
AS
15629sed 's/^/| /' conftest.$ac_ext >&5
15630
98418dba 15631ac_cv_lib_kvm_kvm_open=no
503d2be0 15632fi
edfaf76d
LK
15633rm -f conftest.err conftest.$ac_objext \
15634 conftest$ac_exeext conftest.$ac_ext
98418dba 15635LIBS=$ac_check_lib_save_LIBS
503d2be0 15636fi
c0d27fcc 15637echo "$as_me:$LINENO: result: $ac_cv_lib_kvm_kvm_open" >&5
98418dba
CW
15638echo "${ECHO_T}$ac_cv_lib_kvm_kvm_open" >&6
15639if test $ac_cv_lib_kvm_kvm_open = yes; then
15640 LIBS="-lkvm $LIBS"
ba4481b5
DL
15641fi
15642
98418dba 15643 # Check for the 4.4BSD definition of getloadavg.
c0d27fcc 15644 echo "$as_me:$LINENO: checking for getloadavg in -lutil" >&5
98418dba
CW
15645echo $ECHO_N "checking for getloadavg in -lutil... $ECHO_C" >&6
15646if test "${ac_cv_lib_util_getloadavg+set}" = set; then
503d2be0 15647 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15648else
98418dba
CW
15649 ac_check_lib_save_LIBS=$LIBS
15650LIBS="-lutil $LIBS"
15651cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15652/* confdefs.h. */
15653_ACEOF
15654cat confdefs.h >>conftest.$ac_ext
15655cat >>conftest.$ac_ext <<_ACEOF
15656/* end confdefs.h. */
98418dba
CW
15657
15658/* Override any gcc2 internal prototype to avoid an error. */
15659#ifdef __cplusplus
15660extern "C"
15661#endif
15662/* We use char because int might match the return type of a gcc2
15663 builtin and then its argument prototype would still apply. */
15664char getloadavg ();
503d2be0
AS
15665int
15666main ()
15667{
98418dba 15668getloadavg ();
503d2be0
AS
15669 ;
15670 return 0;
15671}
15672_ACEOF
15673rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15674if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 15675 (eval $ac_link) 2>conftest.er1
503d2be0 15676 ac_status=$?
edfaf76d
LK
15677 grep -v '^ *+' conftest.er1 >conftest.err
15678 rm -f conftest.er1
15679 cat conftest.err >&5
c0d27fcc 15680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15681 (exit $ac_status); } &&
ec8fcb10
YM
15682 { ac_try='test -z "$ac_c_werror_flag"
15683 || test ! -s conftest.err'
edfaf76d
LK
15684 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15685 (eval $ac_try) 2>&5
15686 ac_status=$?
15687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15688 (exit $ac_status); }; } &&
15689 { ac_try='test -s conftest$ac_exeext'
35996d22
AS
15690 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15691 (eval $ac_try) 2>&5
15692 ac_status=$?
15693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15694 (exit $ac_status); }; }; then
15695 ac_cv_lib_util_getloadavg=yes
15696else
503d2be0 15697 echo "$as_me: failed program was:" >&5
19650fd6
AS
15698sed 's/^/| /' conftest.$ac_ext >&5
15699
98418dba 15700ac_cv_lib_util_getloadavg=no
ba4481b5 15701fi
edfaf76d
LK
15702rm -f conftest.err conftest.$ac_objext \
15703 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
15704LIBS=$ac_check_lib_save_LIBS
15705fi
c0d27fcc 15706echo "$as_me:$LINENO: result: $ac_cv_lib_util_getloadavg" >&5
98418dba
CW
15707echo "${ECHO_T}$ac_cv_lib_util_getloadavg" >&6
15708if test $ac_cv_lib_util_getloadavg = yes; then
15709 LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes
ba4481b5 15710fi
503d2be0 15711
98418dba 15712fi
ba4481b5 15713
98418dba
CW
15714if test $ac_have_func = no; then
15715 # There is a commonly available library for RS/6000 AIX.
15716 # Since it is not a standard part of AIX, it might be installed locally.
15717 ac_getloadavg_LIBS=$LIBS
15718 LIBS="-L/usr/local/lib $LIBS"
c0d27fcc 15719 echo "$as_me:$LINENO: checking for getloadavg in -lgetloadavg" >&5
98418dba
CW
15720echo $ECHO_N "checking for getloadavg in -lgetloadavg... $ECHO_C" >&6
15721if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then
503d2be0 15722 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15723else
98418dba
CW
15724 ac_check_lib_save_LIBS=$LIBS
15725LIBS="-lgetloadavg $LIBS"
15726cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15727/* confdefs.h. */
15728_ACEOF
15729cat confdefs.h >>conftest.$ac_ext
15730cat >>conftest.$ac_ext <<_ACEOF
15731/* end confdefs.h. */
ba4481b5 15732
98418dba
CW
15733/* Override any gcc2 internal prototype to avoid an error. */
15734#ifdef __cplusplus
15735extern "C"
15736#endif
15737/* We use char because int might match the return type of a gcc2
15738 builtin and then its argument prototype would still apply. */
15739char getloadavg ();
98418dba
CW
15740int
15741main ()
15742{
15743getloadavg ();
15744 ;
15745 return 0;
15746}
503d2be0 15747_ACEOF
98418dba 15748rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15749if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 15750 (eval $ac_link) 2>conftest.er1
98418dba 15751 ac_status=$?
edfaf76d
LK
15752 grep -v '^ *+' conftest.er1 >conftest.err
15753 rm -f conftest.er1
15754 cat conftest.err >&5
c0d27fcc 15755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 15756 (exit $ac_status); } &&
ec8fcb10
YM
15757 { ac_try='test -z "$ac_c_werror_flag"
15758 || test ! -s conftest.err'
edfaf76d
LK
15759 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15760 (eval $ac_try) 2>&5
15761 ac_status=$?
15762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15763 (exit $ac_status); }; } &&
15764 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 15765 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
15766 (eval $ac_try) 2>&5
15767 ac_status=$?
c0d27fcc 15768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
15769 (exit $ac_status); }; }; then
15770 ac_cv_lib_getloadavg_getloadavg=yes
ba4481b5 15771else
98418dba 15772 echo "$as_me: failed program was:" >&5
19650fd6
AS
15773sed 's/^/| /' conftest.$ac_ext >&5
15774
98418dba
CW
15775ac_cv_lib_getloadavg_getloadavg=no
15776fi
edfaf76d
LK
15777rm -f conftest.err conftest.$ac_objext \
15778 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
15779LIBS=$ac_check_lib_save_LIBS
15780fi
c0d27fcc 15781echo "$as_me:$LINENO: result: $ac_cv_lib_getloadavg_getloadavg" >&5
98418dba
CW
15782echo "${ECHO_T}$ac_cv_lib_getloadavg_getloadavg" >&6
15783if test $ac_cv_lib_getloadavg_getloadavg = yes; then
15784 LIBS="-lgetloadavg $LIBS"
15785else
15786 LIBS=$ac_getloadavg_LIBS
ba4481b5 15787fi
ba4481b5
DL
15788
15789fi
98418dba
CW
15790
15791# Make sure it is really in the library, if we think we found it,
15792# otherwise set up the replacement function.
15793
15794for ac_func in getloadavg
15795do
15796as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 15797echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
15798echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15799if eval "test \"\${$as_ac_var+set}\" = set"; then
15800 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15801else
503d2be0 15802 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15803/* confdefs.h. */
15804_ACEOF
15805cat confdefs.h >>conftest.$ac_ext
15806cat >>conftest.$ac_ext <<_ACEOF
15807/* end confdefs.h. */
edfaf76d
LK
15808/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15809 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15810#define $ac_func innocuous_$ac_func
15811
ba4481b5 15812/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
15813 which can conflict with char $ac_func (); below.
15814 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15815 <limits.h> exists even on freestanding compilers. */
edfaf76d 15816
19650fd6
AS
15817#ifdef __STDC__
15818# include <limits.h>
15819#else
15820# include <assert.h>
15821#endif
edfaf76d
LK
15822
15823#undef $ac_func
15824
ba4481b5 15825/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
15826#ifdef __cplusplus
15827extern "C"
19650fd6 15828{
503d2be0 15829#endif
ba4481b5 15830/* We use char because int might match the return type of a gcc2
503d2be0
AS
15831 builtin and then its argument prototype would still apply. */
15832char $ac_func ();
ba4481b5
DL
15833/* The GNU C library defines this for functions which it implements
15834 to always fail with ENOSYS. Some functions are actually named
15835 something starting with __ and the normal name is an alias. */
15836#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15837choke me
15838#else
19650fd6
AS
15839char (*f) () = $ac_func;
15840#endif
15841#ifdef __cplusplus
15842}
cd958eb3
MB
15843#endif
15844
19650fd6
AS
15845int
15846main ()
15847{
15848return f != $ac_func;
503d2be0
AS
15849 ;
15850 return 0;
15851}
15852_ACEOF
15853rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15854if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 15855 (eval $ac_link) 2>conftest.er1
503d2be0 15856 ac_status=$?
edfaf76d
LK
15857 grep -v '^ *+' conftest.er1 >conftest.err
15858 rm -f conftest.er1
15859 cat conftest.err >&5
c0d27fcc 15860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15861 (exit $ac_status); } &&
ec8fcb10
YM
15862 { ac_try='test -z "$ac_c_werror_flag"
15863 || test ! -s conftest.err'
edfaf76d
LK
15864 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15865 (eval $ac_try) 2>&5
15866 ac_status=$?
15867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15868 (exit $ac_status); }; } &&
15869 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 15870 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
15871 (eval $ac_try) 2>&5
15872 ac_status=$?
c0d27fcc 15873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
15874 (exit $ac_status); }; }; then
15875 eval "$as_ac_var=yes"
15876else
15877 echo "$as_me: failed program was:" >&5
19650fd6
AS
15878sed 's/^/| /' conftest.$ac_ext >&5
15879
503d2be0
AS
15880eval "$as_ac_var=no"
15881fi
edfaf76d
LK
15882rm -f conftest.err conftest.$ac_objext \
15883 conftest$ac_exeext conftest.$ac_ext
503d2be0 15884fi
c0d27fcc 15885echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
15886echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15887if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 15888 cat >>confdefs.h <<_ACEOF
98418dba 15889#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 15890_ACEOF
503d2be0 15891
98418dba 15892else
edfaf76d
LK
15893 case $LIBOBJS in
15894 "getloadavg.$ac_objext" | \
15895 *" getloadavg.$ac_objext" | \
15896 "getloadavg.$ac_objext "* | \
15897 *" getloadavg.$ac_objext "* ) ;;
15898 *) LIBOBJS="$LIBOBJS getloadavg.$ac_objext" ;;
15899esac
15900
ba4481b5 15901
c0d27fcc 15902cat >>confdefs.h <<\_ACEOF
98418dba 15903#define C_GETLOADAVG 1
c0d27fcc 15904_ACEOF
ba4481b5 15905
98418dba
CW
15906# Figure out what our getloadavg.c needs.
15907ac_have_func=no
c0d27fcc
MR
15908if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
15909 echo "$as_me:$LINENO: checking for sys/dg_sys_info.h" >&5
98418dba
CW
15910echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6
15911if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
503d2be0 15912 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
15913fi
15914echo "$as_me:$LINENO: result: $ac_cv_header_sys_dg_sys_info_h" >&5
15915echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6
ba4481b5 15916else
c0d27fcc
MR
15917 # Is the header compilable?
15918echo "$as_me:$LINENO: checking sys/dg_sys_info.h usability" >&5
15919echo $ECHO_N "checking sys/dg_sys_info.h usability... $ECHO_C" >&6
15920cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15921/* confdefs.h. */
15922_ACEOF
15923cat confdefs.h >>conftest.$ac_ext
15924cat >>conftest.$ac_ext <<_ACEOF
15925/* end confdefs.h. */
c0d27fcc
MR
15926$ac_includes_default
15927#include <sys/dg_sys_info.h>
15928_ACEOF
15929rm -f conftest.$ac_objext
15930if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 15931 (eval $ac_compile) 2>conftest.er1
c0d27fcc 15932 ac_status=$?
edfaf76d
LK
15933 grep -v '^ *+' conftest.er1 >conftest.err
15934 rm -f conftest.er1
15935 cat conftest.err >&5
c0d27fcc
MR
15936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15937 (exit $ac_status); } &&
ec8fcb10
YM
15938 { ac_try='test -z "$ac_c_werror_flag"
15939 || test ! -s conftest.err'
edfaf76d
LK
15940 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15941 (eval $ac_try) 2>&5
15942 ac_status=$?
15943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15944 (exit $ac_status); }; } &&
15945 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
15946 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15947 (eval $ac_try) 2>&5
15948 ac_status=$?
15949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15950 (exit $ac_status); }; }; then
15951 ac_header_compiler=yes
15952else
15953 echo "$as_me: failed program was:" >&5
19650fd6
AS
15954sed 's/^/| /' conftest.$ac_ext >&5
15955
c0d27fcc
MR
15956ac_header_compiler=no
15957fi
edfaf76d 15958rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
15959echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15960echo "${ECHO_T}$ac_header_compiler" >&6
15961
15962# Is the header present?
15963echo "$as_me:$LINENO: checking sys/dg_sys_info.h presence" >&5
15964echo $ECHO_N "checking sys/dg_sys_info.h presence... $ECHO_C" >&6
15965cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15966/* confdefs.h. */
15967_ACEOF
15968cat confdefs.h >>conftest.$ac_ext
15969cat >>conftest.$ac_ext <<_ACEOF
15970/* end confdefs.h. */
98418dba
CW
15971#include <sys/dg_sys_info.h>
15972_ACEOF
c0d27fcc 15973if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
15974 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15975 ac_status=$?
6bae0ccf 15976 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
15977 rm -f conftest.er1
15978 cat conftest.err >&5
c0d27fcc 15979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
15980 (exit $ac_status); } >/dev/null; then
15981 if test -s conftest.err; then
15982 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 15983 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
15984 else
15985 ac_cpp_err=
15986 fi
15987else
15988 ac_cpp_err=yes
ba4481b5 15989fi
98418dba 15990if test -z "$ac_cpp_err"; then
c0d27fcc 15991 ac_header_preproc=yes
98418dba
CW
15992else
15993 echo "$as_me: failed program was:" >&5
19650fd6
AS
15994sed 's/^/| /' conftest.$ac_ext >&5
15995
c0d27fcc 15996 ac_header_preproc=no
ba4481b5 15997fi
98418dba 15998rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
15999echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16000echo "${ECHO_T}$ac_header_preproc" >&6
16001
16002# So? What about this header?
edfaf76d
LK
16003case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16004 yes:no: )
c0d27fcc
MR
16005 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: accepted by the compiler, rejected by the preprocessor!" >&5
16006echo "$as_me: WARNING: sys/dg_sys_info.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
16007 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: proceeding with the compiler's result" >&5
16008echo "$as_me: WARNING: sys/dg_sys_info.h: proceeding with the compiler's result" >&2;}
16009 ac_header_preproc=yes
19650fd6 16010 ;;
edfaf76d 16011 no:yes:* )
c0d27fcc
MR
16012 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: present but cannot be compiled" >&5
16013echo "$as_me: WARNING: sys/dg_sys_info.h: present but cannot be compiled" >&2;}
edfaf76d
LK
16014 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: check for missing prerequisite headers?" >&5
16015echo "$as_me: WARNING: sys/dg_sys_info.h: check for missing prerequisite headers?" >&2;}
16016 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: see the Autoconf documentation" >&5
16017echo "$as_me: WARNING: sys/dg_sys_info.h: see the Autoconf documentation" >&2;}
16018 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: section \"Present But Cannot Be Compiled\"" >&5
16019echo "$as_me: WARNING: sys/dg_sys_info.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16020 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&5
19650fd6 16021echo "$as_me: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
16022 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: in the future, the compiler will take precedence" >&5
16023echo "$as_me: WARNING: sys/dg_sys_info.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
16024 (
16025 cat <<\_ASBOX
edfaf76d
LK
16026## ------------------------------------------ ##
16027## Report this to the AC_PACKAGE_NAME lists. ##
16028## ------------------------------------------ ##
19650fd6
AS
16029_ASBOX
16030 ) |
16031 sed "s/^/$as_me: WARNING: /" >&2
16032 ;;
c0d27fcc
MR
16033esac
16034echo "$as_me:$LINENO: checking for sys/dg_sys_info.h" >&5
16035echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6
16036if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
16037 echo $ECHO_N "(cached) $ECHO_C" >&6
16038else
16039 ac_cv_header_sys_dg_sys_info_h=$ac_header_preproc
98418dba 16040fi
c0d27fcc 16041echo "$as_me:$LINENO: result: $ac_cv_header_sys_dg_sys_info_h" >&5
98418dba 16042echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6
c0d27fcc
MR
16043
16044fi
98418dba
CW
16045if test $ac_cv_header_sys_dg_sys_info_h = yes; then
16046 ac_have_func=yes
ba4481b5 16047
c0d27fcc 16048cat >>confdefs.h <<\_ACEOF
98418dba 16049#define DGUX 1
c0d27fcc
MR
16050_ACEOF
16051
503d2be0 16052
c0d27fcc 16053echo "$as_me:$LINENO: checking for dg_sys_info in -ldgc" >&5
98418dba
CW
16054echo $ECHO_N "checking for dg_sys_info in -ldgc... $ECHO_C" >&6
16055if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then
503d2be0 16056 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16057else
503d2be0 16058 ac_check_lib_save_LIBS=$LIBS
98418dba 16059LIBS="-ldgc $LIBS"
503d2be0 16060cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16061/* confdefs.h. */
16062_ACEOF
16063cat confdefs.h >>conftest.$ac_ext
16064cat >>conftest.$ac_ext <<_ACEOF
16065/* end confdefs.h. */
503d2be0 16066
ba4481b5 16067/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
16068#ifdef __cplusplus
16069extern "C"
16070#endif
ba4481b5 16071/* We use char because int might match the return type of a gcc2
503d2be0 16072 builtin and then its argument prototype would still apply. */
98418dba 16073char dg_sys_info ();
503d2be0
AS
16074int
16075main ()
16076{
98418dba 16077dg_sys_info ();
503d2be0
AS
16078 ;
16079 return 0;
16080}
16081_ACEOF
16082rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 16083if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 16084 (eval $ac_link) 2>conftest.er1
503d2be0 16085 ac_status=$?
edfaf76d
LK
16086 grep -v '^ *+' conftest.er1 >conftest.err
16087 rm -f conftest.er1
16088 cat conftest.err >&5
c0d27fcc 16089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16090 (exit $ac_status); } &&
ec8fcb10
YM
16091 { ac_try='test -z "$ac_c_werror_flag"
16092 || test ! -s conftest.err'
edfaf76d
LK
16093 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16094 (eval $ac_try) 2>&5
16095 ac_status=$?
16096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16097 (exit $ac_status); }; } &&
16098 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 16099 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
16100 (eval $ac_try) 2>&5
16101 ac_status=$?
c0d27fcc 16102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16103 (exit $ac_status); }; }; then
98418dba 16104 ac_cv_lib_dgc_dg_sys_info=yes
503d2be0
AS
16105else
16106 echo "$as_me: failed program was:" >&5
19650fd6
AS
16107sed 's/^/| /' conftest.$ac_ext >&5
16108
98418dba 16109ac_cv_lib_dgc_dg_sys_info=no
503d2be0 16110fi
edfaf76d
LK
16111rm -f conftest.err conftest.$ac_objext \
16112 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
16113LIBS=$ac_check_lib_save_LIBS
16114fi
c0d27fcc 16115echo "$as_me:$LINENO: result: $ac_cv_lib_dgc_dg_sys_info" >&5
98418dba
CW
16116echo "${ECHO_T}$ac_cv_lib_dgc_dg_sys_info" >&6
16117if test $ac_cv_lib_dgc_dg_sys_info = yes; then
c0d27fcc 16118 cat >>confdefs.h <<_ACEOF
98418dba 16119#define HAVE_LIBDGC 1
c0d27fcc 16120_ACEOF
ba4481b5 16121
98418dba 16122 LIBS="-ldgc $LIBS"
ba4481b5 16123
ba4481b5
DL
16124fi
16125
98418dba 16126fi
503d2be0 16127
c0d27fcc
MR
16128
16129
16130if test "${ac_cv_header_locale_h+set}" = set; then
16131 echo "$as_me:$LINENO: checking for locale.h" >&5
98418dba
CW
16132echo $ECHO_N "checking for locale.h... $ECHO_C" >&6
16133if test "${ac_cv_header_locale_h+set}" = set; then
503d2be0 16134 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
16135fi
16136echo "$as_me:$LINENO: result: $ac_cv_header_locale_h" >&5
16137echo "${ECHO_T}$ac_cv_header_locale_h" >&6
503d2be0 16138else
c0d27fcc
MR
16139 # Is the header compilable?
16140echo "$as_me:$LINENO: checking locale.h usability" >&5
16141echo $ECHO_N "checking locale.h usability... $ECHO_C" >&6
16142cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16143/* confdefs.h. */
16144_ACEOF
16145cat confdefs.h >>conftest.$ac_ext
16146cat >>conftest.$ac_ext <<_ACEOF
16147/* end confdefs.h. */
c0d27fcc
MR
16148$ac_includes_default
16149#include <locale.h>
16150_ACEOF
16151rm -f conftest.$ac_objext
16152if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 16153 (eval $ac_compile) 2>conftest.er1
c0d27fcc 16154 ac_status=$?
edfaf76d
LK
16155 grep -v '^ *+' conftest.er1 >conftest.err
16156 rm -f conftest.er1
16157 cat conftest.err >&5
c0d27fcc
MR
16158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16159 (exit $ac_status); } &&
ec8fcb10
YM
16160 { ac_try='test -z "$ac_c_werror_flag"
16161 || test ! -s conftest.err'
edfaf76d
LK
16162 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16163 (eval $ac_try) 2>&5
16164 ac_status=$?
16165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16166 (exit $ac_status); }; } &&
16167 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
16168 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16169 (eval $ac_try) 2>&5
16170 ac_status=$?
16171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16172 (exit $ac_status); }; }; then
16173 ac_header_compiler=yes
16174else
16175 echo "$as_me: failed program was:" >&5
19650fd6
AS
16176sed 's/^/| /' conftest.$ac_ext >&5
16177
c0d27fcc
MR
16178ac_header_compiler=no
16179fi
edfaf76d 16180rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
16181echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16182echo "${ECHO_T}$ac_header_compiler" >&6
16183
16184# Is the header present?
16185echo "$as_me:$LINENO: checking locale.h presence" >&5
16186echo $ECHO_N "checking locale.h presence... $ECHO_C" >&6
16187cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16188/* confdefs.h. */
16189_ACEOF
16190cat confdefs.h >>conftest.$ac_ext
16191cat >>conftest.$ac_ext <<_ACEOF
16192/* end confdefs.h. */
98418dba 16193#include <locale.h>
503d2be0 16194_ACEOF
c0d27fcc 16195if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba 16196 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
503d2be0 16197 ac_status=$?
6bae0ccf 16198 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
16199 rm -f conftest.er1
16200 cat conftest.err >&5
c0d27fcc 16201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
16202 (exit $ac_status); } >/dev/null; then
16203 if test -s conftest.err; then
16204 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 16205 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
16206 else
16207 ac_cpp_err=
16208 fi
503d2be0 16209else
98418dba 16210 ac_cpp_err=yes
503d2be0 16211fi
98418dba 16212if test -z "$ac_cpp_err"; then
c0d27fcc 16213 ac_header_preproc=yes
98418dba
CW
16214else
16215 echo "$as_me: failed program was:" >&5
19650fd6
AS
16216sed 's/^/| /' conftest.$ac_ext >&5
16217
c0d27fcc 16218 ac_header_preproc=no
ba4481b5 16219fi
98418dba 16220rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
16221echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16222echo "${ECHO_T}$ac_header_preproc" >&6
16223
16224# So? What about this header?
edfaf76d
LK
16225case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16226 yes:no: )
c0d27fcc
MR
16227 { echo "$as_me:$LINENO: WARNING: locale.h: accepted by the compiler, rejected by the preprocessor!" >&5
16228echo "$as_me: WARNING: locale.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
16229 { echo "$as_me:$LINENO: WARNING: locale.h: proceeding with the compiler's result" >&5
16230echo "$as_me: WARNING: locale.h: proceeding with the compiler's result" >&2;}
16231 ac_header_preproc=yes
19650fd6 16232 ;;
edfaf76d 16233 no:yes:* )
c0d27fcc
MR
16234 { echo "$as_me:$LINENO: WARNING: locale.h: present but cannot be compiled" >&5
16235echo "$as_me: WARNING: locale.h: present but cannot be compiled" >&2;}
edfaf76d
LK
16236 { echo "$as_me:$LINENO: WARNING: locale.h: check for missing prerequisite headers?" >&5
16237echo "$as_me: WARNING: locale.h: check for missing prerequisite headers?" >&2;}
16238 { echo "$as_me:$LINENO: WARNING: locale.h: see the Autoconf documentation" >&5
16239echo "$as_me: WARNING: locale.h: see the Autoconf documentation" >&2;}
16240 { echo "$as_me:$LINENO: WARNING: locale.h: section \"Present But Cannot Be Compiled\"" >&5
16241echo "$as_me: WARNING: locale.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16242 { echo "$as_me:$LINENO: WARNING: locale.h: proceeding with the preprocessor's result" >&5
19650fd6 16243echo "$as_me: WARNING: locale.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
16244 { echo "$as_me:$LINENO: WARNING: locale.h: in the future, the compiler will take precedence" >&5
16245echo "$as_me: WARNING: locale.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
16246 (
16247 cat <<\_ASBOX
edfaf76d
LK
16248## ------------------------------------------ ##
16249## Report this to the AC_PACKAGE_NAME lists. ##
16250## ------------------------------------------ ##
19650fd6
AS
16251_ASBOX
16252 ) |
16253 sed "s/^/$as_me: WARNING: /" >&2
16254 ;;
c0d27fcc
MR
16255esac
16256echo "$as_me:$LINENO: checking for locale.h" >&5
16257echo $ECHO_N "checking for locale.h... $ECHO_C" >&6
16258if test "${ac_cv_header_locale_h+set}" = set; then
16259 echo $ECHO_N "(cached) $ECHO_C" >&6
16260else
16261 ac_cv_header_locale_h=$ac_header_preproc
ba4481b5 16262fi
c0d27fcc 16263echo "$as_me:$LINENO: result: $ac_cv_header_locale_h" >&5
98418dba
CW
16264echo "${ECHO_T}$ac_cv_header_locale_h" >&6
16265
c0d27fcc
MR
16266fi
16267
16268
16269
98418dba 16270for ac_func in setlocale
ba4481b5 16271do
503d2be0 16272as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 16273echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
16274echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16275if eval "test \"\${$as_ac_var+set}\" = set"; then
16276 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16277else
503d2be0 16278 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16279/* confdefs.h. */
16280_ACEOF
16281cat confdefs.h >>conftest.$ac_ext
16282cat >>conftest.$ac_ext <<_ACEOF
16283/* end confdefs.h. */
edfaf76d
LK
16284/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16285 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16286#define $ac_func innocuous_$ac_func
16287
ba4481b5 16288/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
16289 which can conflict with char $ac_func (); below.
16290 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16291 <limits.h> exists even on freestanding compilers. */
edfaf76d 16292
19650fd6
AS
16293#ifdef __STDC__
16294# include <limits.h>
16295#else
16296# include <assert.h>
16297#endif
edfaf76d
LK
16298
16299#undef $ac_func
16300
ba4481b5 16301/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
16302#ifdef __cplusplus
16303extern "C"
19650fd6 16304{
503d2be0 16305#endif
ba4481b5 16306/* We use char because int might match the return type of a gcc2
503d2be0
AS
16307 builtin and then its argument prototype would still apply. */
16308char $ac_func ();
ba4481b5
DL
16309/* The GNU C library defines this for functions which it implements
16310 to always fail with ENOSYS. Some functions are actually named
16311 something starting with __ and the normal name is an alias. */
16312#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16313choke me
16314#else
19650fd6
AS
16315char (*f) () = $ac_func;
16316#endif
16317#ifdef __cplusplus
16318}
ba4481b5
DL
16319#endif
16320
19650fd6
AS
16321int
16322main ()
16323{
16324return f != $ac_func;
503d2be0
AS
16325 ;
16326 return 0;
16327}
16328_ACEOF
16329rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 16330if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 16331 (eval $ac_link) 2>conftest.er1
503d2be0 16332 ac_status=$?
edfaf76d
LK
16333 grep -v '^ *+' conftest.er1 >conftest.err
16334 rm -f conftest.er1
16335 cat conftest.err >&5
c0d27fcc 16336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16337 (exit $ac_status); } &&
ec8fcb10
YM
16338 { ac_try='test -z "$ac_c_werror_flag"
16339 || test ! -s conftest.err'
edfaf76d
LK
16340 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16341 (eval $ac_try) 2>&5
16342 ac_status=$?
16343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16344 (exit $ac_status); }; } &&
16345 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 16346 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
16347 (eval $ac_try) 2>&5
16348 ac_status=$?
c0d27fcc 16349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
16350 (exit $ac_status); }; }; then
16351 eval "$as_ac_var=yes"
16352else
16353 echo "$as_me: failed program was:" >&5
19650fd6
AS
16354sed 's/^/| /' conftest.$ac_ext >&5
16355
503d2be0
AS
16356eval "$as_ac_var=no"
16357fi
edfaf76d
LK
16358rm -f conftest.err conftest.$ac_objext \
16359 conftest$ac_exeext conftest.$ac_ext
503d2be0 16360fi
c0d27fcc 16361echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
16362echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16363if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 16364 cat >>confdefs.h <<_ACEOF
503d2be0 16365#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 16366_ACEOF
ba4481b5 16367
ba4481b5
DL
16368fi
16369done
16370
c0d27fcc 16371
98418dba
CW
16372# We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
16373# uses stabs), but it is still SVR4. We cannot check for <elf.h> because
16374# Irix 4.0.5F has the header but not the library.
16375if test $ac_have_func = no && test "$ac_cv_lib_elf_elf_begin" = yes; then
16376 ac_have_func=yes
16377
c0d27fcc 16378cat >>confdefs.h <<\_ACEOF
98418dba 16379#define SVR4 1
c0d27fcc 16380_ACEOF
98418dba
CW
16381
16382fi
16383
16384if test $ac_have_func = no; then
c0d27fcc
MR
16385 if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
16386 echo "$as_me:$LINENO: checking for inq_stats/cpustats.h" >&5
98418dba
CW
16387echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6
16388if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
503d2be0 16389 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
16390fi
16391echo "$as_me:$LINENO: result: $ac_cv_header_inq_stats_cpustats_h" >&5
16392echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6
98418dba 16393else
c0d27fcc
MR
16394 # Is the header compilable?
16395echo "$as_me:$LINENO: checking inq_stats/cpustats.h usability" >&5
16396echo $ECHO_N "checking inq_stats/cpustats.h usability... $ECHO_C" >&6
16397cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16398/* confdefs.h. */
16399_ACEOF
16400cat confdefs.h >>conftest.$ac_ext
16401cat >>conftest.$ac_ext <<_ACEOF
16402/* end confdefs.h. */
c0d27fcc
MR
16403$ac_includes_default
16404#include <inq_stats/cpustats.h>
16405_ACEOF
16406rm -f conftest.$ac_objext
16407if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 16408 (eval $ac_compile) 2>conftest.er1
c0d27fcc 16409 ac_status=$?
edfaf76d
LK
16410 grep -v '^ *+' conftest.er1 >conftest.err
16411 rm -f conftest.er1
16412 cat conftest.err >&5
c0d27fcc
MR
16413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16414 (exit $ac_status); } &&
ec8fcb10
YM
16415 { ac_try='test -z "$ac_c_werror_flag"
16416 || test ! -s conftest.err'
edfaf76d
LK
16417 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16418 (eval $ac_try) 2>&5
16419 ac_status=$?
16420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16421 (exit $ac_status); }; } &&
16422 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
16423 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16424 (eval $ac_try) 2>&5
16425 ac_status=$?
16426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16427 (exit $ac_status); }; }; then
16428 ac_header_compiler=yes
16429else
16430 echo "$as_me: failed program was:" >&5
19650fd6
AS
16431sed 's/^/| /' conftest.$ac_ext >&5
16432
c0d27fcc
MR
16433ac_header_compiler=no
16434fi
edfaf76d 16435rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
16436echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16437echo "${ECHO_T}$ac_header_compiler" >&6
16438
16439# Is the header present?
16440echo "$as_me:$LINENO: checking inq_stats/cpustats.h presence" >&5
16441echo $ECHO_N "checking inq_stats/cpustats.h presence... $ECHO_C" >&6
16442cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16443/* confdefs.h. */
16444_ACEOF
16445cat confdefs.h >>conftest.$ac_ext
16446cat >>conftest.$ac_ext <<_ACEOF
16447/* end confdefs.h. */
98418dba 16448#include <inq_stats/cpustats.h>
503d2be0 16449_ACEOF
c0d27fcc 16450if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
16451 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16452 ac_status=$?
6bae0ccf 16453 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
16454 rm -f conftest.er1
16455 cat conftest.err >&5
c0d27fcc 16456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
16457 (exit $ac_status); } >/dev/null; then
16458 if test -s conftest.err; then
16459 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 16460 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
16461 else
16462 ac_cpp_err=
16463 fi
16464else
16465 ac_cpp_err=yes
16466fi
16467if test -z "$ac_cpp_err"; then
c0d27fcc 16468 ac_header_preproc=yes
503d2be0
AS
16469else
16470 echo "$as_me: failed program was:" >&5
19650fd6
AS
16471sed 's/^/| /' conftest.$ac_ext >&5
16472
c0d27fcc 16473 ac_header_preproc=no
ba4481b5 16474fi
503d2be0 16475rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
16476echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16477echo "${ECHO_T}$ac_header_preproc" >&6
16478
16479# So? What about this header?
edfaf76d
LK
16480case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16481 yes:no: )
c0d27fcc
MR
16482 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&5
16483echo "$as_me: WARNING: inq_stats/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
16484 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: proceeding with the compiler's result" >&5
16485echo "$as_me: WARNING: inq_stats/cpustats.h: proceeding with the compiler's result" >&2;}
16486 ac_header_preproc=yes
19650fd6 16487 ;;
edfaf76d 16488 no:yes:* )
c0d27fcc
MR
16489 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: present but cannot be compiled" >&5
16490echo "$as_me: WARNING: inq_stats/cpustats.h: present but cannot be compiled" >&2;}
edfaf76d
LK
16491 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: check for missing prerequisite headers?" >&5
16492echo "$as_me: WARNING: inq_stats/cpustats.h: check for missing prerequisite headers?" >&2;}
16493 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: see the Autoconf documentation" >&5
16494echo "$as_me: WARNING: inq_stats/cpustats.h: see the Autoconf documentation" >&2;}
16495 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: section \"Present But Cannot Be Compiled\"" >&5
16496echo "$as_me: WARNING: inq_stats/cpustats.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16497 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&5
19650fd6 16498echo "$as_me: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
16499 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: in the future, the compiler will take precedence" >&5
16500echo "$as_me: WARNING: inq_stats/cpustats.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
16501 (
16502 cat <<\_ASBOX
edfaf76d
LK
16503## ------------------------------------------ ##
16504## Report this to the AC_PACKAGE_NAME lists. ##
16505## ------------------------------------------ ##
19650fd6
AS
16506_ASBOX
16507 ) |
16508 sed "s/^/$as_me: WARNING: /" >&2
16509 ;;
c0d27fcc
MR
16510esac
16511echo "$as_me:$LINENO: checking for inq_stats/cpustats.h" >&5
16512echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6
16513if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
16514 echo $ECHO_N "(cached) $ECHO_C" >&6
16515else
16516 ac_cv_header_inq_stats_cpustats_h=$ac_header_preproc
ba4481b5 16517fi
c0d27fcc 16518echo "$as_me:$LINENO: result: $ac_cv_header_inq_stats_cpustats_h" >&5
98418dba 16519echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6
c0d27fcc
MR
16520
16521fi
98418dba
CW
16522if test $ac_cv_header_inq_stats_cpustats_h = yes; then
16523 ac_have_func=yes
ba4481b5 16524
c0d27fcc 16525cat >>confdefs.h <<\_ACEOF
98418dba 16526#define UMAX 1
c0d27fcc 16527_ACEOF
98418dba 16528
c0d27fcc
MR
16529
16530cat >>confdefs.h <<\_ACEOF
98418dba 16531#define UMAX4_3 1
c0d27fcc 16532_ACEOF
98418dba
CW
16533
16534fi
16535
c0d27fcc 16536
98418dba
CW
16537fi
16538
16539if test $ac_have_func = no; then
c0d27fcc
MR
16540 if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
16541 echo "$as_me:$LINENO: checking for sys/cpustats.h" >&5
98418dba
CW
16542echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6
16543if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
503d2be0 16544 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
16545fi
16546echo "$as_me:$LINENO: result: $ac_cv_header_sys_cpustats_h" >&5
16547echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6
503d2be0 16548else
c0d27fcc
MR
16549 # Is the header compilable?
16550echo "$as_me:$LINENO: checking sys/cpustats.h usability" >&5
16551echo $ECHO_N "checking sys/cpustats.h usability... $ECHO_C" >&6
16552cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16553/* confdefs.h. */
16554_ACEOF
16555cat confdefs.h >>conftest.$ac_ext
16556cat >>conftest.$ac_ext <<_ACEOF
16557/* end confdefs.h. */
c0d27fcc
MR
16558$ac_includes_default
16559#include <sys/cpustats.h>
16560_ACEOF
16561rm -f conftest.$ac_objext
16562if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 16563 (eval $ac_compile) 2>conftest.er1
c0d27fcc 16564 ac_status=$?
edfaf76d
LK
16565 grep -v '^ *+' conftest.er1 >conftest.err
16566 rm -f conftest.er1
16567 cat conftest.err >&5
c0d27fcc
MR
16568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16569 (exit $ac_status); } &&
ec8fcb10
YM
16570 { ac_try='test -z "$ac_c_werror_flag"
16571 || test ! -s conftest.err'
edfaf76d
LK
16572 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16573 (eval $ac_try) 2>&5
16574 ac_status=$?
16575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16576 (exit $ac_status); }; } &&
16577 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
16578 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16579 (eval $ac_try) 2>&5
16580 ac_status=$?
16581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16582 (exit $ac_status); }; }; then
16583 ac_header_compiler=yes
16584else
16585 echo "$as_me: failed program was:" >&5
19650fd6
AS
16586sed 's/^/| /' conftest.$ac_ext >&5
16587
c0d27fcc
MR
16588ac_header_compiler=no
16589fi
edfaf76d 16590rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
16591echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16592echo "${ECHO_T}$ac_header_compiler" >&6
16593
16594# Is the header present?
16595echo "$as_me:$LINENO: checking sys/cpustats.h presence" >&5
16596echo $ECHO_N "checking sys/cpustats.h presence... $ECHO_C" >&6
16597cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16598/* confdefs.h. */
16599_ACEOF
16600cat confdefs.h >>conftest.$ac_ext
16601cat >>conftest.$ac_ext <<_ACEOF
16602/* end confdefs.h. */
98418dba
CW
16603#include <sys/cpustats.h>
16604_ACEOF
c0d27fcc 16605if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
16606 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16607 ac_status=$?
6bae0ccf 16608 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
16609 rm -f conftest.er1
16610 cat conftest.err >&5
c0d27fcc 16611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
16612 (exit $ac_status); } >/dev/null; then
16613 if test -s conftest.err; then
16614 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 16615 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
16616 else
16617 ac_cpp_err=
16618 fi
16619else
16620 ac_cpp_err=yes
503d2be0 16621fi
98418dba 16622if test -z "$ac_cpp_err"; then
c0d27fcc 16623 ac_header_preproc=yes
98418dba
CW
16624else
16625 echo "$as_me: failed program was:" >&5
19650fd6
AS
16626sed 's/^/| /' conftest.$ac_ext >&5
16627
c0d27fcc 16628 ac_header_preproc=no
98418dba
CW
16629fi
16630rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
16631echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16632echo "${ECHO_T}$ac_header_preproc" >&6
16633
16634# So? What about this header?
edfaf76d
LK
16635case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16636 yes:no: )
c0d27fcc
MR
16637 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&5
16638echo "$as_me: WARNING: sys/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
16639 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: proceeding with the compiler's result" >&5
16640echo "$as_me: WARNING: sys/cpustats.h: proceeding with the compiler's result" >&2;}
16641 ac_header_preproc=yes
19650fd6 16642 ;;
edfaf76d 16643 no:yes:* )
c0d27fcc
MR
16644 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: present but cannot be compiled" >&5
16645echo "$as_me: WARNING: sys/cpustats.h: present but cannot be compiled" >&2;}
edfaf76d
LK
16646 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: check for missing prerequisite headers?" >&5
16647echo "$as_me: WARNING: sys/cpustats.h: check for missing prerequisite headers?" >&2;}
16648 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: see the Autoconf documentation" >&5
16649echo "$as_me: WARNING: sys/cpustats.h: see the Autoconf documentation" >&2;}
16650 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: section \"Present But Cannot Be Compiled\"" >&5
16651echo "$as_me: WARNING: sys/cpustats.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16652 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&5
19650fd6 16653echo "$as_me: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
16654 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: in the future, the compiler will take precedence" >&5
16655echo "$as_me: WARNING: sys/cpustats.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
16656 (
16657 cat <<\_ASBOX
edfaf76d
LK
16658## ------------------------------------------ ##
16659## Report this to the AC_PACKAGE_NAME lists. ##
16660## ------------------------------------------ ##
19650fd6
AS
16661_ASBOX
16662 ) |
16663 sed "s/^/$as_me: WARNING: /" >&2
16664 ;;
c0d27fcc
MR
16665esac
16666echo "$as_me:$LINENO: checking for sys/cpustats.h" >&5
16667echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6
16668if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
16669 echo $ECHO_N "(cached) $ECHO_C" >&6
16670else
16671 ac_cv_header_sys_cpustats_h=$ac_header_preproc
98418dba 16672fi
c0d27fcc 16673echo "$as_me:$LINENO: result: $ac_cv_header_sys_cpustats_h" >&5
98418dba 16674echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6
c0d27fcc
MR
16675
16676fi
98418dba 16677if test $ac_cv_header_sys_cpustats_h = yes; then
c0d27fcc 16678 ac_have_func=yes; cat >>confdefs.h <<\_ACEOF
98418dba 16679#define UMAX 1
c0d27fcc 16680_ACEOF
ba4481b5 16681
98418dba
CW
16682fi
16683
c0d27fcc 16684
98418dba
CW
16685fi
16686
16687if test $ac_have_func = no; then
16688
16689for ac_header in mach/mach.h
2c9dccc9
PJ
16690do
16691as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
16692if eval "test \"\${$as_ac_Header+set}\" = set"; then
16693 echo "$as_me:$LINENO: checking for $ac_header" >&5
2c9dccc9
PJ
16694echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16695if eval "test \"\${$as_ac_Header+set}\" = set"; then
16696 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
16697fi
16698echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
16699echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 16700else
c0d27fcc
MR
16701 # Is the header compilable?
16702echo "$as_me:$LINENO: checking $ac_header usability" >&5
16703echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
16704cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16705/* confdefs.h. */
16706_ACEOF
16707cat confdefs.h >>conftest.$ac_ext
16708cat >>conftest.$ac_ext <<_ACEOF
16709/* end confdefs.h. */
c0d27fcc
MR
16710$ac_includes_default
16711#include <$ac_header>
16712_ACEOF
16713rm -f conftest.$ac_objext
16714if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 16715 (eval $ac_compile) 2>conftest.er1
c0d27fcc 16716 ac_status=$?
edfaf76d
LK
16717 grep -v '^ *+' conftest.er1 >conftest.err
16718 rm -f conftest.er1
16719 cat conftest.err >&5
c0d27fcc
MR
16720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16721 (exit $ac_status); } &&
ec8fcb10
YM
16722 { ac_try='test -z "$ac_c_werror_flag"
16723 || test ! -s conftest.err'
edfaf76d
LK
16724 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16725 (eval $ac_try) 2>&5
16726 ac_status=$?
16727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16728 (exit $ac_status); }; } &&
16729 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
16730 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16731 (eval $ac_try) 2>&5
16732 ac_status=$?
16733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16734 (exit $ac_status); }; }; then
16735 ac_header_compiler=yes
16736else
16737 echo "$as_me: failed program was:" >&5
19650fd6
AS
16738sed 's/^/| /' conftest.$ac_ext >&5
16739
c0d27fcc
MR
16740ac_header_compiler=no
16741fi
edfaf76d 16742rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
16743echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16744echo "${ECHO_T}$ac_header_compiler" >&6
16745
16746# Is the header present?
16747echo "$as_me:$LINENO: checking $ac_header presence" >&5
16748echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
16749cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16750/* confdefs.h. */
16751_ACEOF
16752cat confdefs.h >>conftest.$ac_ext
16753cat >>conftest.$ac_ext <<_ACEOF
16754/* end confdefs.h. */
2c9dccc9
PJ
16755#include <$ac_header>
16756_ACEOF
c0d27fcc 16757if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2c9dccc9
PJ
16758 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16759 ac_status=$?
6bae0ccf 16760 grep -v '^ *+' conftest.er1 >conftest.err
2c9dccc9
PJ
16761 rm -f conftest.er1
16762 cat conftest.err >&5
c0d27fcc 16763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2c9dccc9
PJ
16764 (exit $ac_status); } >/dev/null; then
16765 if test -s conftest.err; then
16766 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 16767 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2c9dccc9
PJ
16768 else
16769 ac_cpp_err=
16770 fi
16771else
16772 ac_cpp_err=yes
16773fi
16774if test -z "$ac_cpp_err"; then
c0d27fcc
MR
16775 ac_header_preproc=yes
16776else
16777 echo "$as_me: failed program was:" >&5
19650fd6
AS
16778sed 's/^/| /' conftest.$ac_ext >&5
16779
c0d27fcc
MR
16780 ac_header_preproc=no
16781fi
16782rm -f conftest.err conftest.$ac_ext
16783echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16784echo "${ECHO_T}$ac_header_preproc" >&6
16785
16786# So? What about this header?
edfaf76d
LK
16787case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16788 yes:no: )
c0d27fcc
MR
16789 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16790echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
16791 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
16792echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
16793 ac_header_preproc=yes
19650fd6 16794 ;;
edfaf76d 16795 no:yes:* )
c0d27fcc
MR
16796 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16797echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
16798 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
16799echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
16800 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
16801echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
16802 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
16803echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16804 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 16805echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
16806 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
16807echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
16808 (
16809 cat <<\_ASBOX
edfaf76d
LK
16810## ------------------------------------------ ##
16811## Report this to the AC_PACKAGE_NAME lists. ##
16812## ------------------------------------------ ##
19650fd6
AS
16813_ASBOX
16814 ) |
16815 sed "s/^/$as_me: WARNING: /" >&2
16816 ;;
c0d27fcc
MR
16817esac
16818echo "$as_me:$LINENO: checking for $ac_header" >&5
16819echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16820if eval "test \"\${$as_ac_Header+set}\" = set"; then
16821 echo $ECHO_N "(cached) $ECHO_C" >&6
16822else
edfaf76d 16823 eval "$as_ac_Header=\$ac_header_preproc"
c0d27fcc
MR
16824fi
16825echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
16826echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16827
16828fi
16829if test `eval echo '${'$as_ac_Header'}'` = yes; then
16830 cat >>confdefs.h <<_ACEOF
16831#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16832_ACEOF
16833
16834fi
16835
16836done
16837
16838fi
16839
16840
16841for ac_header in nlist.h
16842do
16843as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16844if eval "test \"\${$as_ac_Header+set}\" = set"; then
16845 echo "$as_me:$LINENO: checking for $ac_header" >&5
16846echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16847if eval "test \"\${$as_ac_Header+set}\" = set"; then
16848 echo $ECHO_N "(cached) $ECHO_C" >&6
16849fi
16850echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
16851echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16852else
16853 # Is the header compilable?
16854echo "$as_me:$LINENO: checking $ac_header usability" >&5
16855echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
16856cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16857/* confdefs.h. */
16858_ACEOF
16859cat confdefs.h >>conftest.$ac_ext
16860cat >>conftest.$ac_ext <<_ACEOF
16861/* end confdefs.h. */
c0d27fcc
MR
16862$ac_includes_default
16863#include <$ac_header>
16864_ACEOF
16865rm -f conftest.$ac_objext
16866if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 16867 (eval $ac_compile) 2>conftest.er1
c0d27fcc 16868 ac_status=$?
edfaf76d
LK
16869 grep -v '^ *+' conftest.er1 >conftest.err
16870 rm -f conftest.er1
16871 cat conftest.err >&5
c0d27fcc
MR
16872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16873 (exit $ac_status); } &&
ec8fcb10
YM
16874 { ac_try='test -z "$ac_c_werror_flag"
16875 || test ! -s conftest.err'
edfaf76d
LK
16876 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16877 (eval $ac_try) 2>&5
16878 ac_status=$?
16879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16880 (exit $ac_status); }; } &&
16881 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
16882 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16883 (eval $ac_try) 2>&5
16884 ac_status=$?
16885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16886 (exit $ac_status); }; }; then
16887 ac_header_compiler=yes
2c9dccc9
PJ
16888else
16889 echo "$as_me: failed program was:" >&5
19650fd6
AS
16890sed 's/^/| /' conftest.$ac_ext >&5
16891
c0d27fcc 16892ac_header_compiler=no
98418dba 16893fi
edfaf76d 16894rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
16895echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16896echo "${ECHO_T}$ac_header_compiler" >&6
98418dba 16897
c0d27fcc
MR
16898# Is the header present?
16899echo "$as_me:$LINENO: checking $ac_header presence" >&5
16900echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
16901cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16902/* confdefs.h. */
16903_ACEOF
16904cat confdefs.h >>conftest.$ac_ext
16905cat >>conftest.$ac_ext <<_ACEOF
16906/* end confdefs.h. */
503d2be0
AS
16907#include <$ac_header>
16908_ACEOF
c0d27fcc 16909if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
16910 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16911 ac_status=$?
6bae0ccf 16912 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
16913 rm -f conftest.er1
16914 cat conftest.err >&5
c0d27fcc 16915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
16916 (exit $ac_status); } >/dev/null; then
16917 if test -s conftest.err; then
16918 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 16919 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
16920 else
16921 ac_cpp_err=
16922 fi
16923else
16924 ac_cpp_err=yes
16925fi
16926if test -z "$ac_cpp_err"; then
c0d27fcc 16927 ac_header_preproc=yes
503d2be0
AS
16928else
16929 echo "$as_me: failed program was:" >&5
19650fd6
AS
16930sed 's/^/| /' conftest.$ac_ext >&5
16931
c0d27fcc 16932 ac_header_preproc=no
b5de8dc0 16933fi
503d2be0 16934rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
16935echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16936echo "${ECHO_T}$ac_header_preproc" >&6
16937
16938# So? What about this header?
edfaf76d
LK
16939case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16940 yes:no: )
c0d27fcc
MR
16941 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16942echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
16943 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
16944echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
16945 ac_header_preproc=yes
19650fd6 16946 ;;
edfaf76d 16947 no:yes:* )
c0d27fcc
MR
16948 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16949echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
16950 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
16951echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
16952 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
16953echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
16954 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
16955echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16956 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 16957echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
16958 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
16959echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
16960 (
16961 cat <<\_ASBOX
edfaf76d
LK
16962## ------------------------------------------ ##
16963## Report this to the AC_PACKAGE_NAME lists. ##
16964## ------------------------------------------ ##
19650fd6
AS
16965_ASBOX
16966 ) |
16967 sed "s/^/$as_me: WARNING: /" >&2
16968 ;;
c0d27fcc
MR
16969esac
16970echo "$as_me:$LINENO: checking for $ac_header" >&5
16971echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16972if eval "test \"\${$as_ac_Header+set}\" = set"; then
16973 echo $ECHO_N "(cached) $ECHO_C" >&6
16974else
edfaf76d 16975 eval "$as_ac_Header=\$ac_header_preproc"
b5de8dc0 16976fi
c0d27fcc 16977echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 16978echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
16979
16980fi
98418dba 16981if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 16982 cat >>confdefs.h <<_ACEOF
98418dba 16983#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc
MR
16984_ACEOF
16985 echo "$as_me:$LINENO: checking for struct nlist.n_un.n_name" >&5
98418dba
CW
16986echo $ECHO_N "checking for struct nlist.n_un.n_name... $ECHO_C" >&6
16987if test "${ac_cv_member_struct_nlist_n_un_n_name+set}" = set; then
503d2be0 16988 echo $ECHO_N "(cached) $ECHO_C" >&6
b5de8dc0 16989else
503d2be0 16990 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16991/* confdefs.h. */
16992_ACEOF
16993cat confdefs.h >>conftest.$ac_ext
16994cat >>conftest.$ac_ext <<_ACEOF
16995/* end confdefs.h. */
98418dba 16996#include <nlist.h>
b5de8dc0 16997
503d2be0
AS
16998int
16999main ()
17000{
98418dba
CW
17001static struct nlist ac_aggr;
17002if (ac_aggr.n_un.n_name)
17003return 0;
503d2be0
AS
17004 ;
17005 return 0;
17006}
17007_ACEOF
98418dba 17008rm -f conftest.$ac_objext
c0d27fcc 17009if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 17010 (eval $ac_compile) 2>conftest.er1
503d2be0 17011 ac_status=$?
edfaf76d
LK
17012 grep -v '^ *+' conftest.er1 >conftest.err
17013 rm -f conftest.er1
17014 cat conftest.err >&5
c0d27fcc 17015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 17016 (exit $ac_status); } &&
ec8fcb10
YM
17017 { ac_try='test -z "$ac_c_werror_flag"
17018 || test ! -s conftest.err'
c0d27fcc 17019 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
17020 (eval $ac_try) 2>&5
17021 ac_status=$?
c0d27fcc 17022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
edfaf76d
LK
17023 (exit $ac_status); }; } &&
17024 { ac_try='test -s conftest.$ac_objext'
17025 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17026 (eval $ac_try) 2>&5
17027 ac_status=$?
17028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17029 (exit $ac_status); }; }; then
17030 ac_cv_member_struct_nlist_n_un_n_name=yes
503d2be0
AS
17031else
17032 echo "$as_me: failed program was:" >&5
19650fd6
AS
17033sed 's/^/| /' conftest.$ac_ext >&5
17034
6bae0ccf 17035cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17036/* confdefs.h. */
17037_ACEOF
17038cat confdefs.h >>conftest.$ac_ext
17039cat >>conftest.$ac_ext <<_ACEOF
17040/* end confdefs.h. */
6bae0ccf
DL
17041#include <nlist.h>
17042
17043int
17044main ()
17045{
17046static struct nlist ac_aggr;
17047if (sizeof ac_aggr.n_un.n_name)
17048return 0;
17049 ;
17050 return 0;
17051}
17052_ACEOF
17053rm -f conftest.$ac_objext
17054if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 17055 (eval $ac_compile) 2>conftest.er1
6bae0ccf 17056 ac_status=$?
edfaf76d
LK
17057 grep -v '^ *+' conftest.er1 >conftest.err
17058 rm -f conftest.er1
17059 cat conftest.err >&5
6bae0ccf
DL
17060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17061 (exit $ac_status); } &&
ec8fcb10
YM
17062 { ac_try='test -z "$ac_c_werror_flag"
17063 || test ! -s conftest.err'
edfaf76d
LK
17064 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17065 (eval $ac_try) 2>&5
17066 ac_status=$?
17067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17068 (exit $ac_status); }; } &&
17069 { ac_try='test -s conftest.$ac_objext'
6bae0ccf
DL
17070 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17071 (eval $ac_try) 2>&5
17072 ac_status=$?
17073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17074 (exit $ac_status); }; }; then
17075 ac_cv_member_struct_nlist_n_un_n_name=yes
17076else
17077 echo "$as_me: failed program was:" >&5
19650fd6
AS
17078sed 's/^/| /' conftest.$ac_ext >&5
17079
98418dba 17080ac_cv_member_struct_nlist_n_un_n_name=no
503d2be0 17081fi
edfaf76d 17082rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b5de8dc0 17083fi
edfaf76d 17084rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 17085fi
c0d27fcc 17086echo "$as_me:$LINENO: result: $ac_cv_member_struct_nlist_n_un_n_name" >&5
98418dba
CW
17087echo "${ECHO_T}$ac_cv_member_struct_nlist_n_un_n_name" >&6
17088if test $ac_cv_member_struct_nlist_n_un_n_name = yes; then
b5de8dc0 17089
c0d27fcc 17090cat >>confdefs.h <<_ACEOF
98418dba 17091#define HAVE_STRUCT_NLIST_N_UN_N_NAME 1
c0d27fcc 17092_ACEOF
b5de8dc0 17093
c0d27fcc
MR
17094
17095cat >>confdefs.h <<\_ACEOF
98418dba 17096#define NLIST_NAME_UNION 1
c0d27fcc 17097_ACEOF
b5de8dc0 17098
98418dba 17099fi
b5de8dc0 17100
c0d27fcc 17101
98418dba 17102fi
c0d27fcc 17103
98418dba 17104done
b5de8dc0 17105
98418dba
CW
17106fi
17107done
b5de8dc0 17108
c0d27fcc 17109
98418dba 17110# Some definitions of getloadavg require that the program be installed setgid.
c0d27fcc 17111echo "$as_me:$LINENO: checking whether getloadavg requires setgid" >&5
98418dba
CW
17112echo $ECHO_N "checking whether getloadavg requires setgid... $ECHO_C" >&6
17113if test "${ac_cv_func_getloadavg_setgid+set}" = set; then
17114 echo $ECHO_N "(cached) $ECHO_C" >&6
17115else
17116 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17117/* confdefs.h. */
17118_ACEOF
17119cat confdefs.h >>conftest.$ac_ext
17120cat >>conftest.$ac_ext <<_ACEOF
17121/* end confdefs.h. */
6bae0ccf 17122#include "$srcdir/$ac_config_libobj_dir/getloadavg.c"
98418dba
CW
17123#ifdef LDAV_PRIVILEGED
17124Yowza Am I SETGID yet
17125#endif
17126_ACEOF
17127if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 17128 $EGREP "Yowza Am I SETGID yet" >/dev/null 2>&1; then
98418dba
CW
17129 ac_cv_func_getloadavg_setgid=yes
17130else
17131 ac_cv_func_getloadavg_setgid=no
17132fi
17133rm -f conftest*
b5de8dc0 17134
98418dba 17135fi
c0d27fcc 17136echo "$as_me:$LINENO: result: $ac_cv_func_getloadavg_setgid" >&5
98418dba
CW
17137echo "${ECHO_T}$ac_cv_func_getloadavg_setgid" >&6
17138if test $ac_cv_func_getloadavg_setgid = yes; then
17139 NEED_SETGID=true
b5de8dc0 17140
c0d27fcc 17141cat >>confdefs.h <<\_ACEOF
98418dba 17142#define GETLOADAVG_PRIVILEGED 1
c0d27fcc 17143_ACEOF
98418dba 17144
b5de8dc0 17145else
98418dba 17146 NEED_SETGID=false
b5de8dc0 17147fi
98418dba
CW
17148
17149if test $ac_cv_func_getloadavg_setgid = yes; then
c0d27fcc 17150 echo "$as_me:$LINENO: checking group of /dev/kmem" >&5
98418dba
CW
17151echo $ECHO_N "checking group of /dev/kmem... $ECHO_C" >&6
17152if test "${ac_cv_group_kmem+set}" = set; then
17153 echo $ECHO_N "(cached) $ECHO_C" >&6
17154else
17155 # On Solaris, /dev/kmem is a symlink. Get info on the real file.
17156 ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null`
17157 # If we got an error (system does not support symlinks), try without -L.
17158 test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem`
17159 ac_cv_group_kmem=`echo $ac_ls_output \
edfaf76d 17160 | sed -ne 's/[ ][ ]*/ /g;
98418dba
CW
17161 s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/;
17162 / /s/.* //;p;'`
17163
b5de8dc0 17164fi
c0d27fcc 17165echo "$as_me:$LINENO: result: $ac_cv_group_kmem" >&5
98418dba
CW
17166echo "${ECHO_T}$ac_cv_group_kmem" >&6
17167 KMEM_GROUP=$ac_cv_group_kmem
b5de8dc0 17168fi
98418dba
CW
17169if test "x$ac_save_LIBS" = x; then
17170 GETLOADAVG_LIBS=$LIBS
17171else
17172 GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$ac_save_LIBS!!"`
b5de8dc0 17173fi
98418dba 17174LIBS=$ac_save_LIBS
b5de8dc0 17175
c0d27fcc
MR
17176
17177
17178echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5
b936fae4
AS
17179echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
17180if test "${ac_cv_sys_largefile_source+set}" = set; then
503d2be0 17181 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 17182else
b936fae4
AS
17183 while :; do
17184 ac_cv_sys_largefile_source=no
503d2be0 17185 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17186/* confdefs.h. */
17187_ACEOF
17188cat confdefs.h >>conftest.$ac_ext
17189cat >>conftest.$ac_ext <<_ACEOF
17190/* end confdefs.h. */
b936fae4 17191#include <stdio.h>
503d2be0
AS
17192int
17193main ()
17194{
b936fae4
AS
17195return !fseeko;
17196 ;
17197 return 0;
17198}
17199_ACEOF
17200rm -f conftest.$ac_objext
c0d27fcc 17201if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 17202 (eval $ac_compile) 2>conftest.er1
b936fae4 17203 ac_status=$?
edfaf76d
LK
17204 grep -v '^ *+' conftest.er1 >conftest.err
17205 rm -f conftest.er1
17206 cat conftest.err >&5
c0d27fcc 17207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b936fae4 17208 (exit $ac_status); } &&
ec8fcb10
YM
17209 { ac_try='test -z "$ac_c_werror_flag"
17210 || test ! -s conftest.err'
edfaf76d
LK
17211 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17212 (eval $ac_try) 2>&5
17213 ac_status=$?
17214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17215 (exit $ac_status); }; } &&
17216 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 17217 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
b936fae4
AS
17218 (eval $ac_try) 2>&5
17219 ac_status=$?
c0d27fcc 17220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b936fae4
AS
17221 (exit $ac_status); }; }; then
17222 break
17223else
17224 echo "$as_me: failed program was:" >&5
19650fd6
AS
17225sed 's/^/| /' conftest.$ac_ext >&5
17226
b936fae4 17227fi
edfaf76d 17228rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b936fae4 17229 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17230/* confdefs.h. */
17231_ACEOF
17232cat confdefs.h >>conftest.$ac_ext
17233cat >>conftest.$ac_ext <<_ACEOF
17234/* end confdefs.h. */
b936fae4
AS
17235#define _LARGEFILE_SOURCE 1
17236#include <stdio.h>
b936fae4
AS
17237int
17238main ()
17239{
17240return !fseeko;
17241 ;
17242 return 0;
17243}
17244_ACEOF
17245rm -f conftest.$ac_objext
c0d27fcc 17246if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 17247 (eval $ac_compile) 2>conftest.er1
b936fae4 17248 ac_status=$?
edfaf76d
LK
17249 grep -v '^ *+' conftest.er1 >conftest.err
17250 rm -f conftest.er1
17251 cat conftest.err >&5
c0d27fcc 17252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b936fae4 17253 (exit $ac_status); } &&
ec8fcb10
YM
17254 { ac_try='test -z "$ac_c_werror_flag"
17255 || test ! -s conftest.err'
edfaf76d
LK
17256 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17257 (eval $ac_try) 2>&5
17258 ac_status=$?
17259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17260 (exit $ac_status); }; } &&
17261 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 17262 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
b936fae4
AS
17263 (eval $ac_try) 2>&5
17264 ac_status=$?
c0d27fcc 17265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b936fae4
AS
17266 (exit $ac_status); }; }; then
17267 ac_cv_sys_largefile_source=1; break
17268else
17269 echo "$as_me: failed program was:" >&5
19650fd6
AS
17270sed 's/^/| /' conftest.$ac_ext >&5
17271
b936fae4 17272fi
edfaf76d 17273rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b936fae4
AS
17274 break
17275done
17276fi
c0d27fcc 17277echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5
b936fae4
AS
17278echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
17279if test "$ac_cv_sys_largefile_source" != no; then
17280
c0d27fcc 17281cat >>confdefs.h <<_ACEOF
b936fae4 17282#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
c0d27fcc 17283_ACEOF
b936fae4
AS
17284
17285fi
17286rm -f conftest*
4c343001 17287
b936fae4
AS
17288# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
17289# in glibc 2.1.3, but that breaks too many other things.
17290# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
c0d27fcc 17291echo "$as_me:$LINENO: checking for fseeko" >&5
b936fae4
AS
17292echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
17293if test "${ac_cv_func_fseeko+set}" = set; then
17294 echo $ECHO_N "(cached) $ECHO_C" >&6
17295else
17296 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17297/* confdefs.h. */
17298_ACEOF
17299cat confdefs.h >>conftest.$ac_ext
17300cat >>conftest.$ac_ext <<_ACEOF
17301/* end confdefs.h. */
b936fae4 17302#include <stdio.h>
b936fae4
AS
17303int
17304main ()
17305{
17306return fseeko && fseeko (stdin, 0, 0);
503d2be0
AS
17307 ;
17308 return 0;
17309}
17310_ACEOF
17311rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17312if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 17313 (eval $ac_link) 2>conftest.er1
503d2be0 17314 ac_status=$?
edfaf76d
LK
17315 grep -v '^ *+' conftest.er1 >conftest.err
17316 rm -f conftest.er1
17317 cat conftest.err >&5
c0d27fcc 17318 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 17319 (exit $ac_status); } &&
ec8fcb10
YM
17320 { ac_try='test -z "$ac_c_werror_flag"
17321 || test ! -s conftest.err'
edfaf76d
LK
17322 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17323 (eval $ac_try) 2>&5
17324 ac_status=$?
17325 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17326 (exit $ac_status); }; } &&
17327 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17328 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
17329 (eval $ac_try) 2>&5
17330 ac_status=$?
c0d27fcc 17331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 17332 (exit $ac_status); }; }; then
b936fae4 17333 ac_cv_func_fseeko=yes
503d2be0
AS
17334else
17335 echo "$as_me: failed program was:" >&5
19650fd6
AS
17336sed 's/^/| /' conftest.$ac_ext >&5
17337
b936fae4 17338ac_cv_func_fseeko=no
503d2be0 17339fi
edfaf76d
LK
17340rm -f conftest.err conftest.$ac_objext \
17341 conftest$ac_exeext conftest.$ac_ext
503d2be0 17342fi
c0d27fcc 17343echo "$as_me:$LINENO: result: $ac_cv_func_fseeko" >&5
b936fae4
AS
17344echo "${ECHO_T}$ac_cv_func_fseeko" >&6
17345if test $ac_cv_func_fseeko = yes; then
17346
c0d27fcc 17347cat >>confdefs.h <<\_ACEOF
b936fae4 17348#define HAVE_FSEEKO 1
c0d27fcc 17349_ACEOF
b936fae4 17350
4c343001
DL
17351fi
17352
c0d27fcc 17353
52dbaac8
PE
17354# Configure getopt.
17355# getopt.m4 serial 10
17356
17357# The getopt module assume you want GNU getopt, with getopt_long etc,
17358# rather than vanilla POSIX getopt. This means your your code should
17359# always include <getopt.h> for the getopt prototypes.
17360
17361
17362
17363
17364
17365
17366
17367
17368
17369
17370
17371# Prerequisites of lib/getopt*.
17372
17373
17374
10a3b1a1 17375
52dbaac8
PE
17376 GETOPT_H=
17377
17378for ac_header in getopt.h
17379do
17380as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17381if eval "test \"\${$as_ac_Header+set}\" = set"; then
17382 echo "$as_me:$LINENO: checking for $ac_header" >&5
17383echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17384if eval "test \"\${$as_ac_Header+set}\" = set"; then
17385 echo $ECHO_N "(cached) $ECHO_C" >&6
17386fi
17387echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
17388echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17389else
17390 # Is the header compilable?
17391echo "$as_me:$LINENO: checking $ac_header usability" >&5
17392echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
17393cat >conftest.$ac_ext <<_ACEOF
17394/* confdefs.h. */
17395_ACEOF
17396cat confdefs.h >>conftest.$ac_ext
17397cat >>conftest.$ac_ext <<_ACEOF
17398/* end confdefs.h. */
17399$ac_includes_default
17400#include <$ac_header>
17401_ACEOF
17402rm -f conftest.$ac_objext
17403if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17404 (eval $ac_compile) 2>conftest.er1
17405 ac_status=$?
17406 grep -v '^ *+' conftest.er1 >conftest.err
17407 rm -f conftest.er1
17408 cat conftest.err >&5
17409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17410 (exit $ac_status); } &&
ec8fcb10
YM
17411 { ac_try='test -z "$ac_c_werror_flag"
17412 || test ! -s conftest.err'
52dbaac8
PE
17413 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17414 (eval $ac_try) 2>&5
17415 ac_status=$?
17416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17417 (exit $ac_status); }; } &&
17418 { ac_try='test -s conftest.$ac_objext'
17419 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17420 (eval $ac_try) 2>&5
17421 ac_status=$?
17422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17423 (exit $ac_status); }; }; then
17424 ac_header_compiler=yes
17425else
17426 echo "$as_me: failed program was:" >&5
17427sed 's/^/| /' conftest.$ac_ext >&5
17428
17429ac_header_compiler=no
17430fi
17431rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17432echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17433echo "${ECHO_T}$ac_header_compiler" >&6
17434
17435# Is the header present?
17436echo "$as_me:$LINENO: checking $ac_header presence" >&5
17437echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
17438cat >conftest.$ac_ext <<_ACEOF
17439/* confdefs.h. */
17440_ACEOF
17441cat confdefs.h >>conftest.$ac_ext
17442cat >>conftest.$ac_ext <<_ACEOF
17443/* end confdefs.h. */
17444#include <$ac_header>
17445_ACEOF
17446if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17447 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17448 ac_status=$?
17449 grep -v '^ *+' conftest.er1 >conftest.err
17450 rm -f conftest.er1
17451 cat conftest.err >&5
17452 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17453 (exit $ac_status); } >/dev/null; then
17454 if test -s conftest.err; then
17455 ac_cpp_err=$ac_c_preproc_warn_flag
17456 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
17457 else
17458 ac_cpp_err=
17459 fi
17460else
17461 ac_cpp_err=yes
17462fi
17463if test -z "$ac_cpp_err"; then
17464 ac_header_preproc=yes
17465else
17466 echo "$as_me: failed program was:" >&5
17467sed 's/^/| /' conftest.$ac_ext >&5
17468
17469 ac_header_preproc=no
17470fi
17471rm -f conftest.err conftest.$ac_ext
17472echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17473echo "${ECHO_T}$ac_header_preproc" >&6
17474
17475# So? What about this header?
17476case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17477 yes:no: )
17478 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
17479echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
17480 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
17481echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
17482 ac_header_preproc=yes
17483 ;;
17484 no:yes:* )
17485 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
17486echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
17487 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
17488echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
17489 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
17490echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
17491 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
17492echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
17493 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
17494echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
17495 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
17496echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
17497 (
17498 cat <<\_ASBOX
17499## ------------------------------------------ ##
17500## Report this to the AC_PACKAGE_NAME lists. ##
17501## ------------------------------------------ ##
17502_ASBOX
17503 ) |
17504 sed "s/^/$as_me: WARNING: /" >&2
17505 ;;
17506esac
17507echo "$as_me:$LINENO: checking for $ac_header" >&5
17508echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17509if eval "test \"\${$as_ac_Header+set}\" = set"; then
17510 echo $ECHO_N "(cached) $ECHO_C" >&6
17511else
17512 eval "$as_ac_Header=\$ac_header_preproc"
17513fi
17514echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
17515echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17516
17517fi
17518if test `eval echo '${'$as_ac_Header'}'` = yes; then
17519 cat >>confdefs.h <<_ACEOF
17520#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17521_ACEOF
17522
17523else
17524 GETOPT_H=getopt.h
17525fi
17526
17527done
17528
17529 if test -z "$GETOPT_H"; then
17530
17531for ac_func in getopt_long_only
17532do
17533as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17534echo "$as_me:$LINENO: checking for $ac_func" >&5
17535echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17536if eval "test \"\${$as_ac_var+set}\" = set"; then
17537 echo $ECHO_N "(cached) $ECHO_C" >&6
17538else
17539 cat >conftest.$ac_ext <<_ACEOF
17540/* confdefs.h. */
17541_ACEOF
17542cat confdefs.h >>conftest.$ac_ext
17543cat >>conftest.$ac_ext <<_ACEOF
17544/* end confdefs.h. */
17545/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17546 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17547#define $ac_func innocuous_$ac_func
17548
17549/* System header to define __stub macros and hopefully few prototypes,
17550 which can conflict with char $ac_func (); below.
17551 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17552 <limits.h> exists even on freestanding compilers. */
17553
17554#ifdef __STDC__
17555# include <limits.h>
17556#else
17557# include <assert.h>
17558#endif
17559
17560#undef $ac_func
17561
17562/* Override any gcc2 internal prototype to avoid an error. */
17563#ifdef __cplusplus
17564extern "C"
17565{
17566#endif
17567/* We use char because int might match the return type of a gcc2
17568 builtin and then its argument prototype would still apply. */
17569char $ac_func ();
17570/* The GNU C library defines this for functions which it implements
17571 to always fail with ENOSYS. Some functions are actually named
17572 something starting with __ and the normal name is an alias. */
17573#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17574choke me
17575#else
17576char (*f) () = $ac_func;
17577#endif
17578#ifdef __cplusplus
17579}
17580#endif
17581
17582int
17583main ()
17584{
17585return f != $ac_func;
17586 ;
17587 return 0;
17588}
17589_ACEOF
17590rm -f conftest.$ac_objext conftest$ac_exeext
17591if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17592 (eval $ac_link) 2>conftest.er1
17593 ac_status=$?
17594 grep -v '^ *+' conftest.er1 >conftest.err
17595 rm -f conftest.er1
17596 cat conftest.err >&5
17597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17598 (exit $ac_status); } &&
ec8fcb10
YM
17599 { ac_try='test -z "$ac_c_werror_flag"
17600 || test ! -s conftest.err'
52dbaac8
PE
17601 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17602 (eval $ac_try) 2>&5
17603 ac_status=$?
17604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17605 (exit $ac_status); }; } &&
17606 { ac_try='test -s conftest$ac_exeext'
17607 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17608 (eval $ac_try) 2>&5
17609 ac_status=$?
17610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17611 (exit $ac_status); }; }; then
17612 eval "$as_ac_var=yes"
17613else
17614 echo "$as_me: failed program was:" >&5
17615sed 's/^/| /' conftest.$ac_ext >&5
17616
17617eval "$as_ac_var=no"
17618fi
17619rm -f conftest.err conftest.$ac_objext \
17620 conftest$ac_exeext conftest.$ac_ext
17621fi
17622echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
17623echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17624if test `eval echo '${'$as_ac_var'}'` = yes; then
17625 cat >>confdefs.h <<_ACEOF
17626#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17627_ACEOF
17628
17629else
17630 GETOPT_H=getopt.h
17631fi
17632done
17633
17634 fi
17635
17636 if test -z "$GETOPT_H"; then
17637 echo "$as_me:$LINENO: checking whether optreset is declared" >&5
17638echo $ECHO_N "checking whether optreset is declared... $ECHO_C" >&6
17639if test "${ac_cv_have_decl_optreset+set}" = set; then
17640 echo $ECHO_N "(cached) $ECHO_C" >&6
17641else
17642 cat >conftest.$ac_ext <<_ACEOF
17643/* confdefs.h. */
17644_ACEOF
17645cat confdefs.h >>conftest.$ac_ext
17646cat >>conftest.$ac_ext <<_ACEOF
17647/* end confdefs.h. */
17648#include <getopt.h>
17649
17650int
17651main ()
17652{
17653#ifndef optreset
17654 char *p = (char *) optreset;
17655#endif
17656
17657 ;
17658 return 0;
17659}
17660_ACEOF
17661rm -f conftest.$ac_objext
17662if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17663 (eval $ac_compile) 2>conftest.er1
17664 ac_status=$?
17665 grep -v '^ *+' conftest.er1 >conftest.err
17666 rm -f conftest.er1
17667 cat conftest.err >&5
17668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17669 (exit $ac_status); } &&
ec8fcb10
YM
17670 { ac_try='test -z "$ac_c_werror_flag"
17671 || test ! -s conftest.err'
52dbaac8
PE
17672 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17673 (eval $ac_try) 2>&5
17674 ac_status=$?
17675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17676 (exit $ac_status); }; } &&
17677 { ac_try='test -s conftest.$ac_objext'
17678 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17679 (eval $ac_try) 2>&5
17680 ac_status=$?
17681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17682 (exit $ac_status); }; }; then
17683 ac_cv_have_decl_optreset=yes
17684else
17685 echo "$as_me: failed program was:" >&5
17686sed 's/^/| /' conftest.$ac_ext >&5
17687
17688ac_cv_have_decl_optreset=no
17689fi
17690rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17691fi
17692echo "$as_me:$LINENO: result: $ac_cv_have_decl_optreset" >&5
17693echo "${ECHO_T}$ac_cv_have_decl_optreset" >&6
17694if test $ac_cv_have_decl_optreset = yes; then
17695 GETOPT_H=getopt.h
17696fi
17697
17698 fi
17699
17700 if test -z "$GETOPT_H"; then
17701 echo "$as_me:$LINENO: checking for working GNU getopt function" >&5
17702echo $ECHO_N "checking for working GNU getopt function... $ECHO_C" >&6
17703if test "${gl_cv_func_gnu_getopt+set}" = set; then
17704 echo $ECHO_N "(cached) $ECHO_C" >&6
17705else
17706 if test "$cross_compiling" = yes; then
17707 echo "$as_me:$LINENO: checking whether getopt_clip is declared" >&5
17708echo $ECHO_N "checking whether getopt_clip is declared... $ECHO_C" >&6
17709if test "${ac_cv_have_decl_getopt_clip+set}" = set; then
17710 echo $ECHO_N "(cached) $ECHO_C" >&6
17711else
17712 cat >conftest.$ac_ext <<_ACEOF
17713/* confdefs.h. */
17714_ACEOF
17715cat confdefs.h >>conftest.$ac_ext
17716cat >>conftest.$ac_ext <<_ACEOF
17717/* end confdefs.h. */
17718#include <getopt.h>
17719
17720int
17721main ()
17722{
17723#ifndef getopt_clip
17724 char *p = (char *) getopt_clip;
17725#endif
17726
17727 ;
17728 return 0;
17729}
17730_ACEOF
17731rm -f conftest.$ac_objext
17732if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17733 (eval $ac_compile) 2>conftest.er1
17734 ac_status=$?
17735 grep -v '^ *+' conftest.er1 >conftest.err
17736 rm -f conftest.er1
17737 cat conftest.err >&5
17738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17739 (exit $ac_status); } &&
ec8fcb10
YM
17740 { ac_try='test -z "$ac_c_werror_flag"
17741 || test ! -s conftest.err'
52dbaac8
PE
17742 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17743 (eval $ac_try) 2>&5
17744 ac_status=$?
17745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17746 (exit $ac_status); }; } &&
17747 { ac_try='test -s conftest.$ac_objext'
17748 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17749 (eval $ac_try) 2>&5
17750 ac_status=$?
17751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17752 (exit $ac_status); }; }; then
17753 ac_cv_have_decl_getopt_clip=yes
17754else
17755 echo "$as_me: failed program was:" >&5
17756sed 's/^/| /' conftest.$ac_ext >&5
17757
17758ac_cv_have_decl_getopt_clip=no
17759fi
17760rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17761fi
17762echo "$as_me:$LINENO: result: $ac_cv_have_decl_getopt_clip" >&5
17763echo "${ECHO_T}$ac_cv_have_decl_getopt_clip" >&6
17764if test $ac_cv_have_decl_getopt_clip = yes; then
17765 gl_cv_func_gnu_getopt=no
17766else
17767 gl_cv_func_gnu_getopt=yes
17768fi
17769
17770else
17771 cat >conftest.$ac_ext <<_ACEOF
17772/* confdefs.h. */
17773_ACEOF
17774cat confdefs.h >>conftest.$ac_ext
17775cat >>conftest.$ac_ext <<_ACEOF
17776/* end confdefs.h. */
17777#include <getopt.h>
17778int
17779main ()
17780{
17781
17782 char *myargv[3];
17783 myargv[0] = "conftest";
17784 myargv[1] = "-+";
17785 myargv[2] = 0;
17786 return getopt (2, myargv, "+a") != '?';
17787
17788 ;
17789 return 0;
17790}
17791_ACEOF
17792rm -f conftest$ac_exeext
17793if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17794 (eval $ac_link) 2>&5
17795 ac_status=$?
17796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17797 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17798 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17799 (eval $ac_try) 2>&5
17800 ac_status=$?
17801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17802 (exit $ac_status); }; }; then
17803 gl_cv_func_gnu_getopt=yes
17804else
17805 echo "$as_me: program exited with status $ac_status" >&5
17806echo "$as_me: failed program was:" >&5
17807sed 's/^/| /' conftest.$ac_ext >&5
17808
17809( exit $ac_status )
17810gl_cv_func_gnu_getopt=no
17811fi
17812rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17813fi
17814fi
17815echo "$as_me:$LINENO: result: $gl_cv_func_gnu_getopt" >&5
17816echo "${ECHO_T}$gl_cv_func_gnu_getopt" >&6
17817 if test "$gl_cv_func_gnu_getopt" = "no"; then
17818 GETOPT_H=getopt.h
17819 fi
17820 fi
17821
17822
17823
17824 if test -n "$GETOPT_H"; then
17825
17826
17827 GETOPT_H=getopt.h
17828
17829cat >>confdefs.h <<\_ACEOF
17830#define __GETOPT_PREFIX rpl_
17831_ACEOF
17832
17833
17834
17835 :
17836 GETOPTOBJS='getopt.o getopt1.o'
17837
17838fi
17839
17840
17841
17842
cd958eb3
MB
17843echo "$as_me:$LINENO: checking whether getpgrp requires zero arguments" >&5
17844echo $ECHO_N "checking whether getpgrp requires zero arguments... $ECHO_C" >&6
17845if test "${ac_cv_func_getpgrp_void+set}" = set; then
17846 echo $ECHO_N "(cached) $ECHO_C" >&6
17847else
17848 # Use it with a single arg.
17849cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17850/* confdefs.h. */
17851_ACEOF
17852cat confdefs.h >>conftest.$ac_ext
17853cat >>conftest.$ac_ext <<_ACEOF
17854/* end confdefs.h. */
cd958eb3
MB
17855$ac_includes_default
17856int
17857main ()
17858{
17859getpgrp (0);
17860 ;
17861 return 0;
17862}
17863_ACEOF
17864rm -f conftest.$ac_objext
17865if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 17866 (eval $ac_compile) 2>conftest.er1
cd958eb3 17867 ac_status=$?
edfaf76d
LK
17868 grep -v '^ *+' conftest.er1 >conftest.err
17869 rm -f conftest.er1
17870 cat conftest.err >&5
cd958eb3
MB
17871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17872 (exit $ac_status); } &&
ec8fcb10
YM
17873 { ac_try='test -z "$ac_c_werror_flag"
17874 || test ! -s conftest.err'
edfaf76d
LK
17875 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17876 (eval $ac_try) 2>&5
17877 ac_status=$?
17878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17879 (exit $ac_status); }; } &&
17880 { ac_try='test -s conftest.$ac_objext'
cd958eb3
MB
17881 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17882 (eval $ac_try) 2>&5
17883 ac_status=$?
17884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17885 (exit $ac_status); }; }; then
17886 ac_cv_func_getpgrp_void=no
17887else
17888 echo "$as_me: failed program was:" >&5
19650fd6
AS
17889sed 's/^/| /' conftest.$ac_ext >&5
17890
cd958eb3
MB
17891ac_cv_func_getpgrp_void=yes
17892fi
edfaf76d 17893rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
cd958eb3
MB
17894
17895fi
17896echo "$as_me:$LINENO: result: $ac_cv_func_getpgrp_void" >&5
17897echo "${ECHO_T}$ac_cv_func_getpgrp_void" >&6
17898if test $ac_cv_func_getpgrp_void = yes; then
17899
17900cat >>confdefs.h <<\_ACEOF
17901#define GETPGRP_VOID 1
17902_ACEOF
17903
17904fi
17905
17906
973a76b1
DL
17907
17908for ac_func in strftime
17909do
17910as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17911echo "$as_me:$LINENO: checking for $ac_func" >&5
17912echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17913if eval "test \"\${$as_ac_var+set}\" = set"; then
17914 echo $ECHO_N "(cached) $ECHO_C" >&6
17915else
17916 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17917/* confdefs.h. */
17918_ACEOF
17919cat confdefs.h >>conftest.$ac_ext
17920cat >>conftest.$ac_ext <<_ACEOF
17921/* end confdefs.h. */
edfaf76d
LK
17922/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17923 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17924#define $ac_func innocuous_$ac_func
17925
973a76b1 17926/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17927 which can conflict with char $ac_func (); below.
17928 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17929 <limits.h> exists even on freestanding compilers. */
edfaf76d 17930
19650fd6
AS
17931#ifdef __STDC__
17932# include <limits.h>
17933#else
17934# include <assert.h>
17935#endif
edfaf76d
LK
17936
17937#undef $ac_func
17938
973a76b1
DL
17939/* Override any gcc2 internal prototype to avoid an error. */
17940#ifdef __cplusplus
17941extern "C"
19650fd6 17942{
973a76b1
DL
17943#endif
17944/* We use char because int might match the return type of a gcc2
17945 builtin and then its argument prototype would still apply. */
17946char $ac_func ();
17947/* The GNU C library defines this for functions which it implements
17948 to always fail with ENOSYS. Some functions are actually named
17949 something starting with __ and the normal name is an alias. */
17950#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17951choke me
17952#else
19650fd6
AS
17953char (*f) () = $ac_func;
17954#endif
17955#ifdef __cplusplus
17956}
973a76b1
DL
17957#endif
17958
19650fd6
AS
17959int
17960main ()
17961{
17962return f != $ac_func;
973a76b1
DL
17963 ;
17964 return 0;
17965}
17966_ACEOF
17967rm -f conftest.$ac_objext conftest$ac_exeext
17968if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 17969 (eval $ac_link) 2>conftest.er1
973a76b1 17970 ac_status=$?
edfaf76d
LK
17971 grep -v '^ *+' conftest.er1 >conftest.err
17972 rm -f conftest.er1
17973 cat conftest.err >&5
973a76b1
DL
17974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17975 (exit $ac_status); } &&
ec8fcb10
YM
17976 { ac_try='test -z "$ac_c_werror_flag"
17977 || test ! -s conftest.err'
edfaf76d
LK
17978 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17979 (eval $ac_try) 2>&5
17980 ac_status=$?
17981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17982 (exit $ac_status); }; } &&
17983 { ac_try='test -s conftest$ac_exeext'
973a76b1
DL
17984 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17985 (eval $ac_try) 2>&5
17986 ac_status=$?
17987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17988 (exit $ac_status); }; }; then
17989 eval "$as_ac_var=yes"
17990else
17991 echo "$as_me: failed program was:" >&5
19650fd6
AS
17992sed 's/^/| /' conftest.$ac_ext >&5
17993
973a76b1
DL
17994eval "$as_ac_var=no"
17995fi
edfaf76d
LK
17996rm -f conftest.err conftest.$ac_objext \
17997 conftest$ac_exeext conftest.$ac_ext
973a76b1
DL
17998fi
17999echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
18000echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18001if test `eval echo '${'$as_ac_var'}'` = yes; then
18002 cat >>confdefs.h <<_ACEOF
18003#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18004_ACEOF
18005
18006else
18007 # strftime is in -lintl on SCO UNIX.
18008echo "$as_me:$LINENO: checking for strftime in -lintl" >&5
18009echo $ECHO_N "checking for strftime in -lintl... $ECHO_C" >&6
18010if test "${ac_cv_lib_intl_strftime+set}" = set; then
18011 echo $ECHO_N "(cached) $ECHO_C" >&6
18012else
18013 ac_check_lib_save_LIBS=$LIBS
18014LIBS="-lintl $LIBS"
18015cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18016/* confdefs.h. */
18017_ACEOF
18018cat confdefs.h >>conftest.$ac_ext
18019cat >>conftest.$ac_ext <<_ACEOF
18020/* end confdefs.h. */
973a76b1
DL
18021
18022/* Override any gcc2 internal prototype to avoid an error. */
18023#ifdef __cplusplus
18024extern "C"
18025#endif
18026/* We use char because int might match the return type of a gcc2
18027 builtin and then its argument prototype would still apply. */
18028char strftime ();
18029int
18030main ()
18031{
18032strftime ();
18033 ;
18034 return 0;
18035}
18036_ACEOF
18037rm -f conftest.$ac_objext conftest$ac_exeext
18038if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 18039 (eval $ac_link) 2>conftest.er1
973a76b1 18040 ac_status=$?
edfaf76d
LK
18041 grep -v '^ *+' conftest.er1 >conftest.err
18042 rm -f conftest.er1
18043 cat conftest.err >&5
973a76b1
DL
18044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18045 (exit $ac_status); } &&
ec8fcb10
YM
18046 { ac_try='test -z "$ac_c_werror_flag"
18047 || test ! -s conftest.err'
edfaf76d
LK
18048 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18049 (eval $ac_try) 2>&5
18050 ac_status=$?
18051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18052 (exit $ac_status); }; } &&
18053 { ac_try='test -s conftest$ac_exeext'
973a76b1
DL
18054 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18055 (eval $ac_try) 2>&5
18056 ac_status=$?
18057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18058 (exit $ac_status); }; }; then
18059 ac_cv_lib_intl_strftime=yes
18060else
18061 echo "$as_me: failed program was:" >&5
19650fd6
AS
18062sed 's/^/| /' conftest.$ac_ext >&5
18063
973a76b1
DL
18064ac_cv_lib_intl_strftime=no
18065fi
edfaf76d
LK
18066rm -f conftest.err conftest.$ac_objext \
18067 conftest$ac_exeext conftest.$ac_ext
973a76b1
DL
18068LIBS=$ac_check_lib_save_LIBS
18069fi
18070echo "$as_me:$LINENO: result: $ac_cv_lib_intl_strftime" >&5
18071echo "${ECHO_T}$ac_cv_lib_intl_strftime" >&6
18072if test $ac_cv_lib_intl_strftime = yes; then
18073 cat >>confdefs.h <<\_ACEOF
18074#define HAVE_STRFTIME 1
18075_ACEOF
18076
18077LIBS="-lintl $LIBS"
18078fi
18079
18080fi
18081done
18082
18083
b936fae4
AS
18084# UNIX98 PTYs.
18085
18086for ac_func in grantpt
503d2be0
AS
18087do
18088as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 18089echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
18090echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18091if eval "test \"\${$as_ac_var+set}\" = set"; then
18092 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 18093else
503d2be0 18094 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18095/* confdefs.h. */
18096_ACEOF
18097cat confdefs.h >>conftest.$ac_ext
18098cat >>conftest.$ac_ext <<_ACEOF
18099/* end confdefs.h. */
edfaf76d
LK
18100/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18101 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18102#define $ac_func innocuous_$ac_func
18103
503d2be0 18104/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
18105 which can conflict with char $ac_func (); below.
18106 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18107 <limits.h> exists even on freestanding compilers. */
edfaf76d 18108
19650fd6
AS
18109#ifdef __STDC__
18110# include <limits.h>
18111#else
18112# include <assert.h>
18113#endif
edfaf76d
LK
18114
18115#undef $ac_func
18116
4c343001 18117/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
18118#ifdef __cplusplus
18119extern "C"
19650fd6 18120{
503d2be0 18121#endif
4c343001 18122/* We use char because int might match the return type of a gcc2
503d2be0
AS
18123 builtin and then its argument prototype would still apply. */
18124char $ac_func ();
503d2be0
AS
18125/* The GNU C library defines this for functions which it implements
18126 to always fail with ENOSYS. Some functions are actually named
18127 something starting with __ and the normal name is an alias. */
18128#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18129choke me
18130#else
19650fd6
AS
18131char (*f) () = $ac_func;
18132#endif
18133#ifdef __cplusplus
18134}
503d2be0 18135#endif
4c343001 18136
19650fd6
AS
18137int
18138main ()
18139{
18140return f != $ac_func;
503d2be0
AS
18141 ;
18142 return 0;
18143}
18144_ACEOF
18145rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18146if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 18147 (eval $ac_link) 2>conftest.er1
503d2be0 18148 ac_status=$?
edfaf76d
LK
18149 grep -v '^ *+' conftest.er1 >conftest.err
18150 rm -f conftest.er1
18151 cat conftest.err >&5
c0d27fcc 18152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 18153 (exit $ac_status); } &&
ec8fcb10
YM
18154 { ac_try='test -z "$ac_c_werror_flag"
18155 || test ! -s conftest.err'
edfaf76d
LK
18156 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18157 (eval $ac_try) 2>&5
18158 ac_status=$?
18159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18160 (exit $ac_status); }; } &&
18161 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18162 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
18163 (eval $ac_try) 2>&5
18164 ac_status=$?
c0d27fcc 18165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18166 (exit $ac_status); }; }; then
18167 eval "$as_ac_var=yes"
18168else
18169 echo "$as_me: failed program was:" >&5
19650fd6
AS
18170sed 's/^/| /' conftest.$ac_ext >&5
18171
503d2be0
AS
18172eval "$as_ac_var=no"
18173fi
edfaf76d
LK
18174rm -f conftest.err conftest.$ac_objext \
18175 conftest$ac_exeext conftest.$ac_ext
503d2be0 18176fi
c0d27fcc 18177echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
18178echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18179if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 18180 cat >>confdefs.h <<_ACEOF
503d2be0 18181#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 18182_ACEOF
4c343001
DL
18183
18184fi
503d2be0
AS
18185done
18186
c0d27fcc 18187
b936fae4 18188# PTY-related GNU extensions.
4c343001 18189
b936fae4
AS
18190for ac_func in getpt
18191do
18192as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 18193echo "$as_me:$LINENO: checking for $ac_func" >&5
b936fae4
AS
18194echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18195if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 18196 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 18197else
b936fae4 18198 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18199/* confdefs.h. */
18200_ACEOF
18201cat confdefs.h >>conftest.$ac_ext
18202cat >>conftest.$ac_ext <<_ACEOF
18203/* end confdefs.h. */
edfaf76d
LK
18204/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18205 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18206#define $ac_func innocuous_$ac_func
18207
087121cc 18208/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
18209 which can conflict with char $ac_func (); below.
18210 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18211 <limits.h> exists even on freestanding compilers. */
edfaf76d 18212
19650fd6
AS
18213#ifdef __STDC__
18214# include <limits.h>
18215#else
18216# include <assert.h>
18217#endif
edfaf76d
LK
18218
18219#undef $ac_func
18220
087121cc 18221/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
18222#ifdef __cplusplus
18223extern "C"
19650fd6 18224{
503d2be0 18225#endif
087121cc 18226/* We use char because int might match the return type of a gcc2
503d2be0
AS
18227 builtin and then its argument prototype would still apply. */
18228char $ac_func ();
087121cc
GM
18229/* The GNU C library defines this for functions which it implements
18230 to always fail with ENOSYS. Some functions are actually named
18231 something starting with __ and the normal name is an alias. */
18232#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18233choke me
18234#else
19650fd6
AS
18235char (*f) () = $ac_func;
18236#endif
18237#ifdef __cplusplus
18238}
087121cc
GM
18239#endif
18240
19650fd6
AS
18241int
18242main ()
18243{
18244return f != $ac_func;
503d2be0
AS
18245 ;
18246 return 0;
18247}
18248_ACEOF
18249rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18250if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 18251 (eval $ac_link) 2>conftest.er1
503d2be0 18252 ac_status=$?
edfaf76d
LK
18253 grep -v '^ *+' conftest.er1 >conftest.err
18254 rm -f conftest.er1
18255 cat conftest.err >&5
c0d27fcc 18256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 18257 (exit $ac_status); } &&
ec8fcb10
YM
18258 { ac_try='test -z "$ac_c_werror_flag"
18259 || test ! -s conftest.err'
edfaf76d
LK
18260 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18261 (eval $ac_try) 2>&5
18262 ac_status=$?
18263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18264 (exit $ac_status); }; } &&
18265 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18266 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
18267 (eval $ac_try) 2>&5
18268 ac_status=$?
c0d27fcc 18269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18270 (exit $ac_status); }; }; then
18271 eval "$as_ac_var=yes"
18272else
18273 echo "$as_me: failed program was:" >&5
19650fd6
AS
18274sed 's/^/| /' conftest.$ac_ext >&5
18275
503d2be0
AS
18276eval "$as_ac_var=no"
18277fi
edfaf76d
LK
18278rm -f conftest.err conftest.$ac_objext \
18279 conftest$ac_exeext conftest.$ac_ext
503d2be0 18280fi
c0d27fcc 18281echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
18282echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18283if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 18284 cat >>confdefs.h <<_ACEOF
503d2be0 18285#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 18286_ACEOF
087121cc 18287
087121cc
GM
18288fi
18289done
18290
c0d27fcc 18291
ba4481b5
DL
18292# Check this now, so that we will NOT find the above functions in ncurses.
18293# That is because we have not set up to link ncurses in lib-src.
18294# It's better to believe a function is not available
18295# than to expect to find it in ncurses.
503d2be0 18296
c0d27fcc 18297echo "$as_me:$LINENO: checking for tparm in -lncurses" >&5
503d2be0
AS
18298echo $ECHO_N "checking for tparm in -lncurses... $ECHO_C" >&6
18299if test "${ac_cv_lib_ncurses_tparm+set}" = set; then
18300 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 18301else
503d2be0 18302 ac_check_lib_save_LIBS=$LIBS
ba4481b5 18303LIBS="-lncurses $LIBS"
503d2be0 18304cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18305/* confdefs.h. */
18306_ACEOF
18307cat confdefs.h >>conftest.$ac_ext
18308cat >>conftest.$ac_ext <<_ACEOF
18309/* end confdefs.h. */
503d2be0 18310
ba4481b5 18311/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
18312#ifdef __cplusplus
18313extern "C"
18314#endif
ba4481b5 18315/* We use char because int might match the return type of a gcc2
503d2be0
AS
18316 builtin and then its argument prototype would still apply. */
18317char tparm ();
18318int
18319main ()
18320{
18321tparm ();
18322 ;
18323 return 0;
18324}
18325_ACEOF
18326rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18327if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 18328 (eval $ac_link) 2>conftest.er1
503d2be0 18329 ac_status=$?
edfaf76d
LK
18330 grep -v '^ *+' conftest.er1 >conftest.err
18331 rm -f conftest.er1
18332 cat conftest.err >&5
c0d27fcc 18333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 18334 (exit $ac_status); } &&
ec8fcb10
YM
18335 { ac_try='test -z "$ac_c_werror_flag"
18336 || test ! -s conftest.err'
edfaf76d
LK
18337 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18338 (eval $ac_try) 2>&5
18339 ac_status=$?
18340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18341 (exit $ac_status); }; } &&
18342 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18343 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
18344 (eval $ac_try) 2>&5
18345 ac_status=$?
c0d27fcc 18346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18347 (exit $ac_status); }; }; then
18348 ac_cv_lib_ncurses_tparm=yes
18349else
18350 echo "$as_me: failed program was:" >&5
19650fd6
AS
18351sed 's/^/| /' conftest.$ac_ext >&5
18352
503d2be0
AS
18353ac_cv_lib_ncurses_tparm=no
18354fi
edfaf76d
LK
18355rm -f conftest.err conftest.$ac_objext \
18356 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
18357LIBS=$ac_check_lib_save_LIBS
18358fi
c0d27fcc 18359echo "$as_me:$LINENO: result: $ac_cv_lib_ncurses_tparm" >&5
503d2be0
AS
18360echo "${ECHO_T}$ac_cv_lib_ncurses_tparm" >&6
18361if test $ac_cv_lib_ncurses_tparm = yes; then
c0d27fcc 18362 cat >>confdefs.h <<_ACEOF
503d2be0 18363#define HAVE_LIBNCURSES 1
c0d27fcc 18364_ACEOF
ba4481b5
DL
18365
18366 LIBS="-lncurses $LIBS"
18367
ba4481b5
DL
18368fi
18369
c0d27fcc 18370
84e70f78
KR
18371# Do we need the Hesiod library to provide the support routines?
18372if test "$with_hesiod" = yes ; then
18373 # Don't set $LIBS here -- see comments above.
18374 resolv=no
c0d27fcc 18375 echo "$as_me:$LINENO: checking for res_send" >&5
84e70f78
KR
18376echo $ECHO_N "checking for res_send... $ECHO_C" >&6
18377if test "${ac_cv_func_res_send+set}" = set; then
18378 echo $ECHO_N "(cached) $ECHO_C" >&6
18379else
18380 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18381/* confdefs.h. */
18382_ACEOF
18383cat confdefs.h >>conftest.$ac_ext
18384cat >>conftest.$ac_ext <<_ACEOF
18385/* end confdefs.h. */
edfaf76d
LK
18386/* Define res_send to an innocuous variant, in case <limits.h> declares res_send.
18387 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18388#define res_send innocuous_res_send
18389
84e70f78 18390/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
18391 which can conflict with char res_send (); below.
18392 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18393 <limits.h> exists even on freestanding compilers. */
edfaf76d 18394
19650fd6
AS
18395#ifdef __STDC__
18396# include <limits.h>
18397#else
18398# include <assert.h>
18399#endif
edfaf76d
LK
18400
18401#undef res_send
18402
84e70f78
KR
18403/* Override any gcc2 internal prototype to avoid an error. */
18404#ifdef __cplusplus
18405extern "C"
19650fd6 18406{
84e70f78
KR
18407#endif
18408/* We use char because int might match the return type of a gcc2
18409 builtin and then its argument prototype would still apply. */
18410char res_send ();
84e70f78
KR
18411/* The GNU C library defines this for functions which it implements
18412 to always fail with ENOSYS. Some functions are actually named
18413 something starting with __ and the normal name is an alias. */
18414#if defined (__stub_res_send) || defined (__stub___res_send)
18415choke me
18416#else
19650fd6
AS
18417char (*f) () = res_send;
18418#endif
18419#ifdef __cplusplus
18420}
cd958eb3
MB
18421#endif
18422
19650fd6
AS
18423int
18424main ()
18425{
18426return f != res_send;
84e70f78
KR
18427 ;
18428 return 0;
18429}
18430_ACEOF
18431rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18432if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 18433 (eval $ac_link) 2>conftest.er1
84e70f78 18434 ac_status=$?
edfaf76d
LK
18435 grep -v '^ *+' conftest.er1 >conftest.err
18436 rm -f conftest.er1
18437 cat conftest.err >&5
c0d27fcc 18438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78 18439 (exit $ac_status); } &&
ec8fcb10
YM
18440 { ac_try='test -z "$ac_c_werror_flag"
18441 || test ! -s conftest.err'
edfaf76d
LK
18442 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18443 (eval $ac_try) 2>&5
18444 ac_status=$?
18445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18446 (exit $ac_status); }; } &&
18447 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18448 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
18449 (eval $ac_try) 2>&5
18450 ac_status=$?
c0d27fcc 18451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
18452 (exit $ac_status); }; }; then
18453 ac_cv_func_res_send=yes
18454else
18455 echo "$as_me: failed program was:" >&5
19650fd6
AS
18456sed 's/^/| /' conftest.$ac_ext >&5
18457
84e70f78
KR
18458ac_cv_func_res_send=no
18459fi
edfaf76d
LK
18460rm -f conftest.err conftest.$ac_objext \
18461 conftest$ac_exeext conftest.$ac_ext
84e70f78 18462fi
c0d27fcc 18463echo "$as_me:$LINENO: result: $ac_cv_func_res_send" >&5
84e70f78
KR
18464echo "${ECHO_T}$ac_cv_func_res_send" >&6
18465if test $ac_cv_func_res_send = yes; then
18466 :
18467else
c0d27fcc 18468 echo "$as_me:$LINENO: checking for __res_send" >&5
84e70f78
KR
18469echo $ECHO_N "checking for __res_send... $ECHO_C" >&6
18470if test "${ac_cv_func___res_send+set}" = set; then
18471 echo $ECHO_N "(cached) $ECHO_C" >&6
18472else
18473 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18474/* confdefs.h. */
18475_ACEOF
18476cat confdefs.h >>conftest.$ac_ext
18477cat >>conftest.$ac_ext <<_ACEOF
18478/* end confdefs.h. */
edfaf76d
LK
18479/* Define __res_send to an innocuous variant, in case <limits.h> declares __res_send.
18480 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18481#define __res_send innocuous___res_send
18482
84e70f78 18483/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
18484 which can conflict with char __res_send (); below.
18485 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18486 <limits.h> exists even on freestanding compilers. */
edfaf76d 18487
19650fd6
AS
18488#ifdef __STDC__
18489# include <limits.h>
18490#else
18491# include <assert.h>
18492#endif
edfaf76d
LK
18493
18494#undef __res_send
18495
84e70f78
KR
18496/* Override any gcc2 internal prototype to avoid an error. */
18497#ifdef __cplusplus
18498extern "C"
19650fd6 18499{
84e70f78
KR
18500#endif
18501/* We use char because int might match the return type of a gcc2
18502 builtin and then its argument prototype would still apply. */
18503char __res_send ();
84e70f78
KR
18504/* The GNU C library defines this for functions which it implements
18505 to always fail with ENOSYS. Some functions are actually named
18506 something starting with __ and the normal name is an alias. */
18507#if defined (__stub___res_send) || defined (__stub_____res_send)
18508choke me
18509#else
19650fd6
AS
18510char (*f) () = __res_send;
18511#endif
18512#ifdef __cplusplus
18513}
84e70f78
KR
18514#endif
18515
19650fd6
AS
18516int
18517main ()
18518{
18519return f != __res_send;
84e70f78
KR
18520 ;
18521 return 0;
18522}
18523_ACEOF
18524rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18525if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 18526 (eval $ac_link) 2>conftest.er1
84e70f78 18527 ac_status=$?
edfaf76d
LK
18528 grep -v '^ *+' conftest.er1 >conftest.err
18529 rm -f conftest.er1
18530 cat conftest.err >&5
c0d27fcc 18531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78 18532 (exit $ac_status); } &&
ec8fcb10
YM
18533 { ac_try='test -z "$ac_c_werror_flag"
18534 || test ! -s conftest.err'
edfaf76d
LK
18535 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18536 (eval $ac_try) 2>&5
18537 ac_status=$?
18538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18539 (exit $ac_status); }; } &&
18540 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18541 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
18542 (eval $ac_try) 2>&5
18543 ac_status=$?
c0d27fcc 18544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
18545 (exit $ac_status); }; }; then
18546 ac_cv_func___res_send=yes
18547else
18548 echo "$as_me: failed program was:" >&5
19650fd6
AS
18549sed 's/^/| /' conftest.$ac_ext >&5
18550
84e70f78
KR
18551ac_cv_func___res_send=no
18552fi
edfaf76d
LK
18553rm -f conftest.err conftest.$ac_objext \
18554 conftest$ac_exeext conftest.$ac_ext
84e70f78 18555fi
c0d27fcc 18556echo "$as_me:$LINENO: result: $ac_cv_func___res_send" >&5
84e70f78
KR
18557echo "${ECHO_T}$ac_cv_func___res_send" >&6
18558if test $ac_cv_func___res_send = yes; then
18559 :
18560else
c0d27fcc 18561 echo "$as_me:$LINENO: checking for res_send in -lresolv" >&5
84e70f78
KR
18562echo $ECHO_N "checking for res_send in -lresolv... $ECHO_C" >&6
18563if test "${ac_cv_lib_resolv_res_send+set}" = set; then
18564 echo $ECHO_N "(cached) $ECHO_C" >&6
18565else
18566 ac_check_lib_save_LIBS=$LIBS
18567LIBS="-lresolv $LIBS"
18568cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18569/* confdefs.h. */
18570_ACEOF
18571cat confdefs.h >>conftest.$ac_ext
18572cat >>conftest.$ac_ext <<_ACEOF
18573/* end confdefs.h. */
84e70f78
KR
18574
18575/* Override any gcc2 internal prototype to avoid an error. */
18576#ifdef __cplusplus
18577extern "C"
18578#endif
18579/* We use char because int might match the return type of a gcc2
18580 builtin and then its argument prototype would still apply. */
18581char res_send ();
18582int
18583main ()
18584{
18585res_send ();
18586 ;
18587 return 0;
18588}
18589_ACEOF
18590rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18591if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 18592 (eval $ac_link) 2>conftest.er1
84e70f78 18593 ac_status=$?
edfaf76d
LK
18594 grep -v '^ *+' conftest.er1 >conftest.err
18595 rm -f conftest.er1
18596 cat conftest.err >&5
c0d27fcc 18597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78 18598 (exit $ac_status); } &&
ec8fcb10
YM
18599 { ac_try='test -z "$ac_c_werror_flag"
18600 || test ! -s conftest.err'
edfaf76d
LK
18601 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18602 (eval $ac_try) 2>&5
18603 ac_status=$?
18604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18605 (exit $ac_status); }; } &&
18606 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18607 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
18608 (eval $ac_try) 2>&5
18609 ac_status=$?
c0d27fcc 18610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
18611 (exit $ac_status); }; }; then
18612 ac_cv_lib_resolv_res_send=yes
18613else
18614 echo "$as_me: failed program was:" >&5
19650fd6
AS
18615sed 's/^/| /' conftest.$ac_ext >&5
18616
84e70f78
KR
18617ac_cv_lib_resolv_res_send=no
18618fi
edfaf76d
LK
18619rm -f conftest.err conftest.$ac_objext \
18620 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
18621LIBS=$ac_check_lib_save_LIBS
18622fi
c0d27fcc 18623echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_send" >&5
84e70f78
KR
18624echo "${ECHO_T}$ac_cv_lib_resolv_res_send" >&6
18625if test $ac_cv_lib_resolv_res_send = yes; then
18626 resolv=yes
18627else
c0d27fcc 18628 echo "$as_me:$LINENO: checking for __res_send in -lresolv" >&5
84e70f78
KR
18629echo $ECHO_N "checking for __res_send in -lresolv... $ECHO_C" >&6
18630if test "${ac_cv_lib_resolv___res_send+set}" = set; then
18631 echo $ECHO_N "(cached) $ECHO_C" >&6
18632else
18633 ac_check_lib_save_LIBS=$LIBS
18634LIBS="-lresolv $LIBS"
18635cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18636/* confdefs.h. */
18637_ACEOF
18638cat confdefs.h >>conftest.$ac_ext
18639cat >>conftest.$ac_ext <<_ACEOF
18640/* end confdefs.h. */
84e70f78
KR
18641
18642/* Override any gcc2 internal prototype to avoid an error. */
18643#ifdef __cplusplus
18644extern "C"
18645#endif
18646/* We use char because int might match the return type of a gcc2
18647 builtin and then its argument prototype would still apply. */
18648char __res_send ();
18649int
18650main ()
18651{
18652__res_send ();
18653 ;
18654 return 0;
18655}
18656_ACEOF
18657rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18658if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 18659 (eval $ac_link) 2>conftest.er1
84e70f78 18660 ac_status=$?
edfaf76d
LK
18661 grep -v '^ *+' conftest.er1 >conftest.err
18662 rm -f conftest.er1
18663 cat conftest.err >&5
c0d27fcc 18664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78 18665 (exit $ac_status); } &&
ec8fcb10
YM
18666 { ac_try='test -z "$ac_c_werror_flag"
18667 || test ! -s conftest.err'
edfaf76d
LK
18668 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18669 (eval $ac_try) 2>&5
18670 ac_status=$?
18671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18672 (exit $ac_status); }; } &&
18673 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18674 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
18675 (eval $ac_try) 2>&5
18676 ac_status=$?
c0d27fcc 18677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
18678 (exit $ac_status); }; }; then
18679 ac_cv_lib_resolv___res_send=yes
18680else
18681 echo "$as_me: failed program was:" >&5
19650fd6
AS
18682sed 's/^/| /' conftest.$ac_ext >&5
18683
84e70f78
KR
18684ac_cv_lib_resolv___res_send=no
18685fi
edfaf76d
LK
18686rm -f conftest.err conftest.$ac_objext \
18687 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
18688LIBS=$ac_check_lib_save_LIBS
18689fi
c0d27fcc 18690echo "$as_me:$LINENO: result: $ac_cv_lib_resolv___res_send" >&5
84e70f78
KR
18691echo "${ECHO_T}$ac_cv_lib_resolv___res_send" >&6
18692if test $ac_cv_lib_resolv___res_send = yes; then
18693 resolv=yes
18694fi
18695
18696fi
18697
18698fi
18699
18700fi
18701
18702 if test "$resolv" = yes ; then
18703 RESOLVLIB=-lresolv
b936fae4 18704
c0d27fcc 18705cat >>confdefs.h <<\_ACEOF
84e70f78 18706#define HAVE_LIBRESOLV 1
c0d27fcc 18707_ACEOF
84e70f78
KR
18708
18709 else
18710 RESOLVLIB=
18711 fi
c0d27fcc 18712 echo "$as_me:$LINENO: checking for hes_getmailhost" >&5
84e70f78
KR
18713echo $ECHO_N "checking for hes_getmailhost... $ECHO_C" >&6
18714if test "${ac_cv_func_hes_getmailhost+set}" = set; then
18715 echo $ECHO_N "(cached) $ECHO_C" >&6
18716else
18717 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18718/* confdefs.h. */
18719_ACEOF
18720cat confdefs.h >>conftest.$ac_ext
18721cat >>conftest.$ac_ext <<_ACEOF
18722/* end confdefs.h. */
edfaf76d
LK
18723/* Define hes_getmailhost to an innocuous variant, in case <limits.h> declares hes_getmailhost.
18724 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18725#define hes_getmailhost innocuous_hes_getmailhost
18726
84e70f78 18727/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
18728 which can conflict with char hes_getmailhost (); below.
18729 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18730 <limits.h> exists even on freestanding compilers. */
edfaf76d 18731
19650fd6
AS
18732#ifdef __STDC__
18733# include <limits.h>
18734#else
18735# include <assert.h>
18736#endif
edfaf76d
LK
18737
18738#undef hes_getmailhost
18739
84e70f78
KR
18740/* Override any gcc2 internal prototype to avoid an error. */
18741#ifdef __cplusplus
18742extern "C"
19650fd6 18743{
84e70f78
KR
18744#endif
18745/* We use char because int might match the return type of a gcc2
18746 builtin and then its argument prototype would still apply. */
18747char hes_getmailhost ();
84e70f78
KR
18748/* The GNU C library defines this for functions which it implements
18749 to always fail with ENOSYS. Some functions are actually named
18750 something starting with __ and the normal name is an alias. */
18751#if defined (__stub_hes_getmailhost) || defined (__stub___hes_getmailhost)
18752choke me
18753#else
19650fd6
AS
18754char (*f) () = hes_getmailhost;
18755#endif
18756#ifdef __cplusplus
18757}
cd958eb3
MB
18758#endif
18759
19650fd6
AS
18760int
18761main ()
18762{
18763return f != hes_getmailhost;
84e70f78
KR
18764 ;
18765 return 0;
18766}
18767_ACEOF
18768rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18769if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 18770 (eval $ac_link) 2>conftest.er1
84e70f78 18771 ac_status=$?
edfaf76d
LK
18772 grep -v '^ *+' conftest.er1 >conftest.err
18773 rm -f conftest.er1
18774 cat conftest.err >&5
c0d27fcc 18775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78 18776 (exit $ac_status); } &&
ec8fcb10
YM
18777 { ac_try='test -z "$ac_c_werror_flag"
18778 || test ! -s conftest.err'
edfaf76d
LK
18779 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18780 (eval $ac_try) 2>&5
18781 ac_status=$?
18782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18783 (exit $ac_status); }; } &&
18784 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18785 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
18786 (eval $ac_try) 2>&5
18787 ac_status=$?
c0d27fcc 18788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
18789 (exit $ac_status); }; }; then
18790 ac_cv_func_hes_getmailhost=yes
18791else
18792 echo "$as_me: failed program was:" >&5
19650fd6
AS
18793sed 's/^/| /' conftest.$ac_ext >&5
18794
84e70f78
KR
18795ac_cv_func_hes_getmailhost=no
18796fi
edfaf76d
LK
18797rm -f conftest.err conftest.$ac_objext \
18798 conftest$ac_exeext conftest.$ac_ext
84e70f78 18799fi
c0d27fcc 18800echo "$as_me:$LINENO: result: $ac_cv_func_hes_getmailhost" >&5
84e70f78
KR
18801echo "${ECHO_T}$ac_cv_func_hes_getmailhost" >&6
18802if test $ac_cv_func_hes_getmailhost = yes; then
18803 :
18804else
c0d27fcc 18805 echo "$as_me:$LINENO: checking for hes_getmailhost in -lhesiod" >&5
84e70f78
KR
18806echo $ECHO_N "checking for hes_getmailhost in -lhesiod... $ECHO_C" >&6
18807if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then
18808 echo $ECHO_N "(cached) $ECHO_C" >&6
18809else
18810 ac_check_lib_save_LIBS=$LIBS
18811LIBS="-lhesiod $RESOLVLIB $LIBS"
18812cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18813/* confdefs.h. */
18814_ACEOF
18815cat confdefs.h >>conftest.$ac_ext
18816cat >>conftest.$ac_ext <<_ACEOF
18817/* end confdefs.h. */
84e70f78
KR
18818
18819/* Override any gcc2 internal prototype to avoid an error. */
18820#ifdef __cplusplus
18821extern "C"
18822#endif
18823/* We use char because int might match the return type of a gcc2
18824 builtin and then its argument prototype would still apply. */
18825char hes_getmailhost ();
18826int
18827main ()
18828{
18829hes_getmailhost ();
18830 ;
18831 return 0;
18832}
18833_ACEOF
18834rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18835if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 18836 (eval $ac_link) 2>conftest.er1
84e70f78 18837 ac_status=$?
edfaf76d
LK
18838 grep -v '^ *+' conftest.er1 >conftest.err
18839 rm -f conftest.er1
18840 cat conftest.err >&5
c0d27fcc 18841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78 18842 (exit $ac_status); } &&
ec8fcb10
YM
18843 { ac_try='test -z "$ac_c_werror_flag"
18844 || test ! -s conftest.err'
edfaf76d
LK
18845 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18846 (eval $ac_try) 2>&5
18847 ac_status=$?
18848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18849 (exit $ac_status); }; } &&
18850 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18851 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
18852 (eval $ac_try) 2>&5
18853 ac_status=$?
c0d27fcc 18854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
18855 (exit $ac_status); }; }; then
18856 ac_cv_lib_hesiod_hes_getmailhost=yes
18857else
18858 echo "$as_me: failed program was:" >&5
19650fd6
AS
18859sed 's/^/| /' conftest.$ac_ext >&5
18860
84e70f78
KR
18861ac_cv_lib_hesiod_hes_getmailhost=no
18862fi
edfaf76d
LK
18863rm -f conftest.err conftest.$ac_objext \
18864 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
18865LIBS=$ac_check_lib_save_LIBS
18866fi
c0d27fcc 18867echo "$as_me:$LINENO: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5
84e70f78
KR
18868echo "${ECHO_T}$ac_cv_lib_hesiod_hes_getmailhost" >&6
18869if test $ac_cv_lib_hesiod_hes_getmailhost = yes; then
b936fae4 18870
c0d27fcc 18871cat >>confdefs.h <<\_ACEOF
84e70f78 18872#define HAVE_LIBHESIOD 1
c0d27fcc 18873_ACEOF
84e70f78
KR
18874
18875else
18876 :
18877fi
18878
18879fi
18880
18881fi
18882
a21616bd
KR
18883# These tell us which Kerberos-related libraries to use.
18884if test "${with_kerberos+set}" = set; then
503d2be0 18885
c0d27fcc 18886echo "$as_me:$LINENO: checking for com_err in -lcom_err" >&5
503d2be0
AS
18887echo $ECHO_N "checking for com_err in -lcom_err... $ECHO_C" >&6
18888if test "${ac_cv_lib_com_err_com_err+set}" = set; then
18889 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 18890else
503d2be0 18891 ac_check_lib_save_LIBS=$LIBS
a21616bd 18892LIBS="-lcom_err $LIBS"
503d2be0 18893cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18894/* confdefs.h. */
18895_ACEOF
18896cat confdefs.h >>conftest.$ac_ext
18897cat >>conftest.$ac_ext <<_ACEOF
18898/* end confdefs.h. */
503d2be0 18899
a21616bd 18900/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
18901#ifdef __cplusplus
18902extern "C"
18903#endif
a21616bd 18904/* We use char because int might match the return type of a gcc2
503d2be0
AS
18905 builtin and then its argument prototype would still apply. */
18906char com_err ();
18907int
18908main ()
18909{
18910com_err ();
18911 ;
18912 return 0;
18913}
18914_ACEOF
18915rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18916if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 18917 (eval $ac_link) 2>conftest.er1
503d2be0 18918 ac_status=$?
edfaf76d
LK
18919 grep -v '^ *+' conftest.er1 >conftest.err
18920 rm -f conftest.er1
18921 cat conftest.err >&5
c0d27fcc 18922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 18923 (exit $ac_status); } &&
ec8fcb10
YM
18924 { ac_try='test -z "$ac_c_werror_flag"
18925 || test ! -s conftest.err'
edfaf76d
LK
18926 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18927 (eval $ac_try) 2>&5
18928 ac_status=$?
18929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18930 (exit $ac_status); }; } &&
18931 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18932 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
18933 (eval $ac_try) 2>&5
18934 ac_status=$?
c0d27fcc 18935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18936 (exit $ac_status); }; }; then
18937 ac_cv_lib_com_err_com_err=yes
18938else
18939 echo "$as_me: failed program was:" >&5
19650fd6
AS
18940sed 's/^/| /' conftest.$ac_ext >&5
18941
503d2be0
AS
18942ac_cv_lib_com_err_com_err=no
18943fi
edfaf76d
LK
18944rm -f conftest.err conftest.$ac_objext \
18945 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
18946LIBS=$ac_check_lib_save_LIBS
18947fi
c0d27fcc 18948echo "$as_me:$LINENO: result: $ac_cv_lib_com_err_com_err" >&5
503d2be0
AS
18949echo "${ECHO_T}$ac_cv_lib_com_err_com_err" >&6
18950if test $ac_cv_lib_com_err_com_err = yes; then
c0d27fcc 18951 cat >>confdefs.h <<_ACEOF
503d2be0 18952#define HAVE_LIBCOM_ERR 1
c0d27fcc 18953_ACEOF
a21616bd
KR
18954
18955 LIBS="-lcom_err $LIBS"
18956
a21616bd
KR
18957fi
18958
c0d27fcc
MR
18959
18960echo "$as_me:$LINENO: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
503d2be0
AS
18961echo $ECHO_N "checking for mit_des_cbc_encrypt in -lk5crypto... $ECHO_C" >&6
18962if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then
18963 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 18964else
503d2be0 18965 ac_check_lib_save_LIBS=$LIBS
a21616bd 18966LIBS="-lk5crypto $LIBS"
503d2be0 18967cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18968/* confdefs.h. */
18969_ACEOF
18970cat confdefs.h >>conftest.$ac_ext
18971cat >>conftest.$ac_ext <<_ACEOF
18972/* end confdefs.h. */
503d2be0 18973
a21616bd 18974/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
18975#ifdef __cplusplus
18976extern "C"
18977#endif
a21616bd 18978/* We use char because int might match the return type of a gcc2
503d2be0
AS
18979 builtin and then its argument prototype would still apply. */
18980char mit_des_cbc_encrypt ();
18981int
18982main ()
18983{
18984mit_des_cbc_encrypt ();
18985 ;
18986 return 0;
18987}
18988_ACEOF
18989rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18990if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 18991 (eval $ac_link) 2>conftest.er1
503d2be0 18992 ac_status=$?
edfaf76d
LK
18993 grep -v '^ *+' conftest.er1 >conftest.err
18994 rm -f conftest.er1
18995 cat conftest.err >&5
c0d27fcc 18996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 18997 (exit $ac_status); } &&
ec8fcb10
YM
18998 { ac_try='test -z "$ac_c_werror_flag"
18999 || test ! -s conftest.err'
edfaf76d
LK
19000 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19001 (eval $ac_try) 2>&5
19002 ac_status=$?
19003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19004 (exit $ac_status); }; } &&
19005 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 19006 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
19007 (eval $ac_try) 2>&5
19008 ac_status=$?
c0d27fcc 19009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19010 (exit $ac_status); }; }; then
19011 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes
19012else
19013 echo "$as_me: failed program was:" >&5
19650fd6
AS
19014sed 's/^/| /' conftest.$ac_ext >&5
19015
503d2be0
AS
19016ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no
19017fi
edfaf76d
LK
19018rm -f conftest.err conftest.$ac_objext \
19019 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
19020LIBS=$ac_check_lib_save_LIBS
19021fi
c0d27fcc 19022echo "$as_me:$LINENO: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5
503d2be0
AS
19023echo "${ECHO_T}$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6
19024if test $ac_cv_lib_k5crypto_mit_des_cbc_encrypt = yes; then
c0d27fcc 19025 cat >>confdefs.h <<_ACEOF
503d2be0 19026#define HAVE_LIBK5CRYPTO 1
c0d27fcc 19027_ACEOF
a21616bd
KR
19028
19029 LIBS="-lk5crypto $LIBS"
19030
a21616bd
KR
19031fi
19032
c0d27fcc
MR
19033
19034echo "$as_me:$LINENO: checking for mit_des_cbc_encrypt in -lcrypto" >&5
503d2be0
AS
19035echo $ECHO_N "checking for mit_des_cbc_encrypt in -lcrypto... $ECHO_C" >&6
19036if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then
19037 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 19038else
503d2be0 19039 ac_check_lib_save_LIBS=$LIBS
a21616bd 19040LIBS="-lcrypto $LIBS"
503d2be0 19041cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19042/* confdefs.h. */
19043_ACEOF
19044cat confdefs.h >>conftest.$ac_ext
19045cat >>conftest.$ac_ext <<_ACEOF
19046/* end confdefs.h. */
503d2be0 19047
a21616bd 19048/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
19049#ifdef __cplusplus
19050extern "C"
19051#endif
a21616bd 19052/* We use char because int might match the return type of a gcc2
503d2be0
AS
19053 builtin and then its argument prototype would still apply. */
19054char mit_des_cbc_encrypt ();
19055int
19056main ()
19057{
19058mit_des_cbc_encrypt ();
19059 ;
19060 return 0;
19061}
19062_ACEOF
19063rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 19064if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 19065 (eval $ac_link) 2>conftest.er1
503d2be0 19066 ac_status=$?
edfaf76d
LK
19067 grep -v '^ *+' conftest.er1 >conftest.err
19068 rm -f conftest.er1
19069 cat conftest.err >&5
c0d27fcc 19070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 19071 (exit $ac_status); } &&
ec8fcb10
YM
19072 { ac_try='test -z "$ac_c_werror_flag"
19073 || test ! -s conftest.err'
edfaf76d
LK
19074 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19075 (eval $ac_try) 2>&5
19076 ac_status=$?
19077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19078 (exit $ac_status); }; } &&
19079 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 19080 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
19081 (eval $ac_try) 2>&5
19082 ac_status=$?
c0d27fcc 19083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19084 (exit $ac_status); }; }; then
19085 ac_cv_lib_crypto_mit_des_cbc_encrypt=yes
19086else
19087 echo "$as_me: failed program was:" >&5
19650fd6
AS
19088sed 's/^/| /' conftest.$ac_ext >&5
19089
503d2be0
AS
19090ac_cv_lib_crypto_mit_des_cbc_encrypt=no
19091fi
edfaf76d
LK
19092rm -f conftest.err conftest.$ac_objext \
19093 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
19094LIBS=$ac_check_lib_save_LIBS
19095fi
c0d27fcc 19096echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5
503d2be0
AS
19097echo "${ECHO_T}$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6
19098if test $ac_cv_lib_crypto_mit_des_cbc_encrypt = yes; then
c0d27fcc 19099 cat >>confdefs.h <<_ACEOF
503d2be0 19100#define HAVE_LIBCRYPTO 1
c0d27fcc 19101_ACEOF
a21616bd
KR
19102
19103 LIBS="-lcrypto $LIBS"
19104
a21616bd
KR
19105fi
19106
c0d27fcc
MR
19107
19108echo "$as_me:$LINENO: checking for krb5_init_context in -lkrb5" >&5
503d2be0
AS
19109echo $ECHO_N "checking for krb5_init_context in -lkrb5... $ECHO_C" >&6
19110if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then
19111 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 19112else
503d2be0 19113 ac_check_lib_save_LIBS=$LIBS
a21616bd 19114LIBS="-lkrb5 $LIBS"
503d2be0 19115cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19116/* confdefs.h. */
19117_ACEOF
19118cat confdefs.h >>conftest.$ac_ext
19119cat >>conftest.$ac_ext <<_ACEOF
19120/* end confdefs.h. */
a21616bd 19121
503d2be0
AS
19122/* Override any gcc2 internal prototype to avoid an error. */
19123#ifdef __cplusplus
19124extern "C"
19125#endif
19126/* We use char because int might match the return type of a gcc2
19127 builtin and then its argument prototype would still apply. */
19128char krb5_init_context ();
19129int
19130main ()
19131{
19132krb5_init_context ();
19133 ;
19134 return 0;
19135}
19136_ACEOF
19137rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 19138if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 19139 (eval $ac_link) 2>conftest.er1
503d2be0 19140 ac_status=$?
edfaf76d
LK
19141 grep -v '^ *+' conftest.er1 >conftest.err
19142 rm -f conftest.er1
19143 cat conftest.err >&5
c0d27fcc 19144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 19145 (exit $ac_status); } &&
ec8fcb10
YM
19146 { ac_try='test -z "$ac_c_werror_flag"
19147 || test ! -s conftest.err'
edfaf76d
LK
19148 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19149 (eval $ac_try) 2>&5
19150 ac_status=$?
19151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19152 (exit $ac_status); }; } &&
19153 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 19154 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
19155 (eval $ac_try) 2>&5
19156 ac_status=$?
c0d27fcc 19157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19158 (exit $ac_status); }; }; then
19159 ac_cv_lib_krb5_krb5_init_context=yes
19160else
19161 echo "$as_me: failed program was:" >&5
19650fd6
AS
19162sed 's/^/| /' conftest.$ac_ext >&5
19163
503d2be0
AS
19164ac_cv_lib_krb5_krb5_init_context=no
19165fi
edfaf76d
LK
19166rm -f conftest.err conftest.$ac_objext \
19167 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
19168LIBS=$ac_check_lib_save_LIBS
19169fi
c0d27fcc 19170echo "$as_me:$LINENO: result: $ac_cv_lib_krb5_krb5_init_context" >&5
503d2be0
AS
19171echo "${ECHO_T}$ac_cv_lib_krb5_krb5_init_context" >&6
19172if test $ac_cv_lib_krb5_krb5_init_context = yes; then
c0d27fcc 19173 cat >>confdefs.h <<_ACEOF
503d2be0 19174#define HAVE_LIBKRB5 1
c0d27fcc 19175_ACEOF
a21616bd
KR
19176
19177 LIBS="-lkrb5 $LIBS"
19178
a21616bd
KR
19179fi
19180
19181 if test "${with_kerberos5+set}" != set; then
503d2be0 19182
c0d27fcc 19183echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes425" >&5
503d2be0
AS
19184echo $ECHO_N "checking for des_cbc_encrypt in -ldes425... $ECHO_C" >&6
19185if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then
19186 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 19187else
503d2be0 19188 ac_check_lib_save_LIBS=$LIBS
a21616bd 19189LIBS="-ldes425 $LIBS"
503d2be0 19190cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19191/* confdefs.h. */
19192_ACEOF
19193cat confdefs.h >>conftest.$ac_ext
19194cat >>conftest.$ac_ext <<_ACEOF
19195/* end confdefs.h. */
503d2be0 19196
a21616bd 19197/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
19198#ifdef __cplusplus
19199extern "C"
19200#endif
a21616bd 19201/* We use char because int might match the return type of a gcc2
503d2be0
AS
19202 builtin and then its argument prototype would still apply. */
19203char des_cbc_encrypt ();
19204int
19205main ()
19206{
19207des_cbc_encrypt ();
19208 ;
19209 return 0;
19210}
19211_ACEOF
19212rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 19213if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 19214 (eval $ac_link) 2>conftest.er1
503d2be0 19215 ac_status=$?
edfaf76d
LK
19216 grep -v '^ *+' conftest.er1 >conftest.err
19217 rm -f conftest.er1
19218 cat conftest.err >&5
c0d27fcc 19219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 19220 (exit $ac_status); } &&
ec8fcb10
YM
19221 { ac_try='test -z "$ac_c_werror_flag"
19222 || test ! -s conftest.err'
edfaf76d
LK
19223 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19224 (eval $ac_try) 2>&5
19225 ac_status=$?
19226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19227 (exit $ac_status); }; } &&
19228 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 19229 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
19230 (eval $ac_try) 2>&5
19231 ac_status=$?
c0d27fcc 19232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19233 (exit $ac_status); }; }; then
19234 ac_cv_lib_des425_des_cbc_encrypt=yes
19235else
19236 echo "$as_me: failed program was:" >&5
19650fd6
AS
19237sed 's/^/| /' conftest.$ac_ext >&5
19238
503d2be0
AS
19239ac_cv_lib_des425_des_cbc_encrypt=no
19240fi
edfaf76d
LK
19241rm -f conftest.err conftest.$ac_objext \
19242 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
19243LIBS=$ac_check_lib_save_LIBS
19244fi
c0d27fcc 19245echo "$as_me:$LINENO: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
503d2be0
AS
19246echo "${ECHO_T}$ac_cv_lib_des425_des_cbc_encrypt" >&6
19247if test $ac_cv_lib_des425_des_cbc_encrypt = yes; then
c0d27fcc 19248 cat >>confdefs.h <<_ACEOF
503d2be0 19249#define HAVE_LIBDES425 1
c0d27fcc 19250_ACEOF
a21616bd
KR
19251
19252 LIBS="-ldes425 $LIBS"
19253
19254else
503d2be0 19255
c0d27fcc 19256echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes" >&5
503d2be0
AS
19257echo $ECHO_N "checking for des_cbc_encrypt in -ldes... $ECHO_C" >&6
19258if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then
19259 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 19260else
503d2be0 19261 ac_check_lib_save_LIBS=$LIBS
a21616bd 19262LIBS="-ldes $LIBS"
503d2be0 19263cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19264/* confdefs.h. */
19265_ACEOF
19266cat confdefs.h >>conftest.$ac_ext
19267cat >>conftest.$ac_ext <<_ACEOF
19268/* end confdefs.h. */
503d2be0 19269
a21616bd 19270/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
19271#ifdef __cplusplus
19272extern "C"
19273#endif
a21616bd 19274/* We use char because int might match the return type of a gcc2
503d2be0
AS
19275 builtin and then its argument prototype would still apply. */
19276char des_cbc_encrypt ();
19277int
19278main ()
19279{
19280des_cbc_encrypt ();
19281 ;
19282 return 0;
19283}
19284_ACEOF
19285rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 19286if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 19287 (eval $ac_link) 2>conftest.er1
503d2be0 19288 ac_status=$?
edfaf76d
LK
19289 grep -v '^ *+' conftest.er1 >conftest.err
19290 rm -f conftest.er1
19291 cat conftest.err >&5
c0d27fcc 19292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 19293 (exit $ac_status); } &&
ec8fcb10
YM
19294 { ac_try='test -z "$ac_c_werror_flag"
19295 || test ! -s conftest.err'
edfaf76d
LK
19296 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19297 (eval $ac_try) 2>&5
19298 ac_status=$?
19299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19300 (exit $ac_status); }; } &&
19301 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 19302 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
19303 (eval $ac_try) 2>&5
19304 ac_status=$?
c0d27fcc 19305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19306 (exit $ac_status); }; }; then
19307 ac_cv_lib_des_des_cbc_encrypt=yes
19308else
19309 echo "$as_me: failed program was:" >&5
19650fd6
AS
19310sed 's/^/| /' conftest.$ac_ext >&5
19311
503d2be0
AS
19312ac_cv_lib_des_des_cbc_encrypt=no
19313fi
edfaf76d
LK
19314rm -f conftest.err conftest.$ac_objext \
19315 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
19316LIBS=$ac_check_lib_save_LIBS
19317fi
c0d27fcc 19318echo "$as_me:$LINENO: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
503d2be0
AS
19319echo "${ECHO_T}$ac_cv_lib_des_des_cbc_encrypt" >&6
19320if test $ac_cv_lib_des_des_cbc_encrypt = yes; then
c0d27fcc 19321 cat >>confdefs.h <<_ACEOF
503d2be0 19322#define HAVE_LIBDES 1
c0d27fcc 19323_ACEOF
a21616bd
KR
19324
19325 LIBS="-ldes $LIBS"
19326
a21616bd
KR
19327fi
19328
19329fi
19330
c0d27fcc
MR
19331
19332echo "$as_me:$LINENO: checking for krb_get_cred in -lkrb4" >&5
503d2be0
AS
19333echo $ECHO_N "checking for krb_get_cred in -lkrb4... $ECHO_C" >&6
19334if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then
19335 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 19336else
503d2be0 19337 ac_check_lib_save_LIBS=$LIBS
a21616bd 19338LIBS="-lkrb4 $LIBS"
503d2be0 19339cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19340/* confdefs.h. */
19341_ACEOF
19342cat confdefs.h >>conftest.$ac_ext
19343cat >>conftest.$ac_ext <<_ACEOF
19344/* end confdefs.h. */
503d2be0 19345
a21616bd 19346/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
19347#ifdef __cplusplus
19348extern "C"
19349#endif
a21616bd 19350/* We use char because int might match the return type of a gcc2
503d2be0
AS
19351 builtin and then its argument prototype would still apply. */
19352char krb_get_cred ();
19353int
19354main ()
19355{
19356krb_get_cred ();
19357 ;
19358 return 0;
19359}
19360_ACEOF
19361rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 19362if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 19363 (eval $ac_link) 2>conftest.er1
503d2be0 19364 ac_status=$?
edfaf76d
LK
19365 grep -v '^ *+' conftest.er1 >conftest.err
19366 rm -f conftest.er1
19367 cat conftest.err >&5
c0d27fcc 19368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 19369 (exit $ac_status); } &&
ec8fcb10
YM
19370 { ac_try='test -z "$ac_c_werror_flag"
19371 || test ! -s conftest.err'
edfaf76d
LK
19372 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19373 (eval $ac_try) 2>&5
19374 ac_status=$?
19375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19376 (exit $ac_status); }; } &&
19377 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 19378 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
19379 (eval $ac_try) 2>&5
19380 ac_status=$?
c0d27fcc 19381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19382 (exit $ac_status); }; }; then
19383 ac_cv_lib_krb4_krb_get_cred=yes
19384else
19385 echo "$as_me: failed program was:" >&5
19650fd6
AS
19386sed 's/^/| /' conftest.$ac_ext >&5
19387
503d2be0
AS
19388ac_cv_lib_krb4_krb_get_cred=no
19389fi
edfaf76d
LK
19390rm -f conftest.err conftest.$ac_objext \
19391 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
19392LIBS=$ac_check_lib_save_LIBS
19393fi
c0d27fcc 19394echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_krb_get_cred" >&5
503d2be0
AS
19395echo "${ECHO_T}$ac_cv_lib_krb4_krb_get_cred" >&6
19396if test $ac_cv_lib_krb4_krb_get_cred = yes; then
c0d27fcc 19397 cat >>confdefs.h <<_ACEOF
503d2be0 19398#define HAVE_LIBKRB4 1
c0d27fcc 19399_ACEOF
a21616bd
KR
19400
19401 LIBS="-lkrb4 $LIBS"
19402
19403else
503d2be0 19404
c0d27fcc 19405echo "$as_me:$LINENO: checking for krb_get_cred in -lkrb" >&5
503d2be0
AS
19406echo $ECHO_N "checking for krb_get_cred in -lkrb... $ECHO_C" >&6
19407if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then
19408 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 19409else
503d2be0 19410 ac_check_lib_save_LIBS=$LIBS
a21616bd 19411LIBS="-lkrb $LIBS"
503d2be0 19412cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19413/* confdefs.h. */
19414_ACEOF
19415cat confdefs.h >>conftest.$ac_ext
19416cat >>conftest.$ac_ext <<_ACEOF
19417/* end confdefs.h. */
503d2be0 19418
a21616bd 19419/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
19420#ifdef __cplusplus
19421extern "C"
19422#endif
a21616bd 19423/* We use char because int might match the return type of a gcc2
503d2be0
AS
19424 builtin and then its argument prototype would still apply. */
19425char krb_get_cred ();
19426int
19427main ()
19428{
19429krb_get_cred ();
19430 ;
19431 return 0;
19432}
19433_ACEOF
19434rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 19435if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 19436 (eval $ac_link) 2>conftest.er1
503d2be0 19437 ac_status=$?
edfaf76d
LK
19438 grep -v '^ *+' conftest.er1 >conftest.err
19439 rm -f conftest.er1
19440 cat conftest.err >&5
c0d27fcc 19441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 19442 (exit $ac_status); } &&
ec8fcb10
YM
19443 { ac_try='test -z "$ac_c_werror_flag"
19444 || test ! -s conftest.err'
edfaf76d
LK
19445 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19446 (eval $ac_try) 2>&5
19447 ac_status=$?
19448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19449 (exit $ac_status); }; } &&
19450 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 19451 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
19452 (eval $ac_try) 2>&5
19453 ac_status=$?
c0d27fcc 19454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19455 (exit $ac_status); }; }; then
19456 ac_cv_lib_krb_krb_get_cred=yes
19457else
19458 echo "$as_me: failed program was:" >&5
19650fd6
AS
19459sed 's/^/| /' conftest.$ac_ext >&5
19460
503d2be0
AS
19461ac_cv_lib_krb_krb_get_cred=no
19462fi
edfaf76d
LK
19463rm -f conftest.err conftest.$ac_objext \
19464 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
19465LIBS=$ac_check_lib_save_LIBS
19466fi
c0d27fcc 19467echo "$as_me:$LINENO: result: $ac_cv_lib_krb_krb_get_cred" >&5
503d2be0
AS
19468echo "${ECHO_T}$ac_cv_lib_krb_krb_get_cred" >&6
19469if test $ac_cv_lib_krb_krb_get_cred = yes; then
c0d27fcc 19470 cat >>confdefs.h <<_ACEOF
503d2be0 19471#define HAVE_LIBKRB 1
c0d27fcc 19472_ACEOF
a21616bd
KR
19473
19474 LIBS="-lkrb $LIBS"
19475
a21616bd
KR
19476fi
19477
19478fi
19479
19480 fi
19481
19482 if test "${with_kerberos5+set}" = set; then
503d2be0
AS
19483
19484for ac_header in krb5.h
a21616bd 19485do
503d2be0 19486as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
19487if eval "test \"\${$as_ac_Header+set}\" = set"; then
19488 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
19489echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19490if eval "test \"\${$as_ac_Header+set}\" = set"; then
19491 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
19492fi
19493echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
19494echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 19495else
c0d27fcc
MR
19496 # Is the header compilable?
19497echo "$as_me:$LINENO: checking $ac_header usability" >&5
19498echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
19499cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19500/* confdefs.h. */
19501_ACEOF
19502cat confdefs.h >>conftest.$ac_ext
19503cat >>conftest.$ac_ext <<_ACEOF
19504/* end confdefs.h. */
c0d27fcc
MR
19505$ac_includes_default
19506#include <$ac_header>
19507_ACEOF
19508rm -f conftest.$ac_objext
19509if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 19510 (eval $ac_compile) 2>conftest.er1
c0d27fcc 19511 ac_status=$?
edfaf76d
LK
19512 grep -v '^ *+' conftest.er1 >conftest.err
19513 rm -f conftest.er1
19514 cat conftest.err >&5
c0d27fcc
MR
19515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19516 (exit $ac_status); } &&
ec8fcb10
YM
19517 { ac_try='test -z "$ac_c_werror_flag"
19518 || test ! -s conftest.err'
edfaf76d
LK
19519 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19520 (eval $ac_try) 2>&5
19521 ac_status=$?
19522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19523 (exit $ac_status); }; } &&
19524 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
19525 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19526 (eval $ac_try) 2>&5
19527 ac_status=$?
19528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19529 (exit $ac_status); }; }; then
19530 ac_header_compiler=yes
19531else
19532 echo "$as_me: failed program was:" >&5
19650fd6
AS
19533sed 's/^/| /' conftest.$ac_ext >&5
19534
c0d27fcc
MR
19535ac_header_compiler=no
19536fi
edfaf76d 19537rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
19538echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19539echo "${ECHO_T}$ac_header_compiler" >&6
19540
19541# Is the header present?
19542echo "$as_me:$LINENO: checking $ac_header presence" >&5
19543echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
19544cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19545/* confdefs.h. */
19546_ACEOF
19547cat confdefs.h >>conftest.$ac_ext
19548cat >>conftest.$ac_ext <<_ACEOF
19549/* end confdefs.h. */
503d2be0
AS
19550#include <$ac_header>
19551_ACEOF
c0d27fcc 19552if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
19553 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19554 ac_status=$?
6bae0ccf 19555 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
19556 rm -f conftest.er1
19557 cat conftest.err >&5
c0d27fcc 19558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19559 (exit $ac_status); } >/dev/null; then
19560 if test -s conftest.err; then
19561 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 19562 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
19563 else
19564 ac_cpp_err=
19565 fi
19566else
19567 ac_cpp_err=yes
19568fi
19569if test -z "$ac_cpp_err"; then
c0d27fcc 19570 ac_header_preproc=yes
503d2be0
AS
19571else
19572 echo "$as_me: failed program was:" >&5
19650fd6
AS
19573sed 's/^/| /' conftest.$ac_ext >&5
19574
c0d27fcc 19575 ac_header_preproc=no
a21616bd 19576fi
503d2be0 19577rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
19578echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19579echo "${ECHO_T}$ac_header_preproc" >&6
19580
19581# So? What about this header?
edfaf76d
LK
19582case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19583 yes:no: )
c0d27fcc
MR
19584 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19585echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
19586 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
19587echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
19588 ac_header_preproc=yes
19650fd6 19589 ;;
edfaf76d 19590 no:yes:* )
c0d27fcc
MR
19591 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19592echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
19593 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
19594echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
19595 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19596echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19597 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
19598echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 19599 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 19600echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
19601 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
19602echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
19603 (
19604 cat <<\_ASBOX
edfaf76d
LK
19605## ------------------------------------------ ##
19606## Report this to the AC_PACKAGE_NAME lists. ##
19607## ------------------------------------------ ##
19650fd6
AS
19608_ASBOX
19609 ) |
19610 sed "s/^/$as_me: WARNING: /" >&2
19611 ;;
c0d27fcc
MR
19612esac
19613echo "$as_me:$LINENO: checking for $ac_header" >&5
19614echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19615if eval "test \"\${$as_ac_Header+set}\" = set"; then
19616 echo $ECHO_N "(cached) $ECHO_C" >&6
19617else
edfaf76d 19618 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 19619fi
c0d27fcc 19620echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 19621echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
19622
19623fi
503d2be0 19624if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 19625 cat >>confdefs.h <<_ACEOF
503d2be0 19626#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 19627_ACEOF
503d2be0 19628
a21616bd 19629fi
c0d27fcc 19630
a21616bd
KR
19631done
19632
19633 else
503d2be0
AS
19634
19635for ac_header in des.h
a21616bd 19636do
503d2be0 19637as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
19638if eval "test \"\${$as_ac_Header+set}\" = set"; then
19639 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
19640echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19641if eval "test \"\${$as_ac_Header+set}\" = set"; then
19642 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
19643fi
19644echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
19645echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 19646else
c0d27fcc
MR
19647 # Is the header compilable?
19648echo "$as_me:$LINENO: checking $ac_header usability" >&5
19649echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
19650cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19651/* confdefs.h. */
19652_ACEOF
19653cat confdefs.h >>conftest.$ac_ext
19654cat >>conftest.$ac_ext <<_ACEOF
19655/* end confdefs.h. */
c0d27fcc
MR
19656$ac_includes_default
19657#include <$ac_header>
19658_ACEOF
19659rm -f conftest.$ac_objext
19660if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 19661 (eval $ac_compile) 2>conftest.er1
c0d27fcc 19662 ac_status=$?
edfaf76d
LK
19663 grep -v '^ *+' conftest.er1 >conftest.err
19664 rm -f conftest.er1
19665 cat conftest.err >&5
c0d27fcc
MR
19666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19667 (exit $ac_status); } &&
ec8fcb10
YM
19668 { ac_try='test -z "$ac_c_werror_flag"
19669 || test ! -s conftest.err'
edfaf76d
LK
19670 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19671 (eval $ac_try) 2>&5
19672 ac_status=$?
19673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19674 (exit $ac_status); }; } &&
19675 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
19676 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19677 (eval $ac_try) 2>&5
19678 ac_status=$?
19679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19680 (exit $ac_status); }; }; then
19681 ac_header_compiler=yes
19682else
19683 echo "$as_me: failed program was:" >&5
19650fd6
AS
19684sed 's/^/| /' conftest.$ac_ext >&5
19685
c0d27fcc
MR
19686ac_header_compiler=no
19687fi
edfaf76d 19688rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
19689echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19690echo "${ECHO_T}$ac_header_compiler" >&6
19691
19692# Is the header present?
19693echo "$as_me:$LINENO: checking $ac_header presence" >&5
19694echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
19695cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19696/* confdefs.h. */
19697_ACEOF
19698cat confdefs.h >>conftest.$ac_ext
19699cat >>conftest.$ac_ext <<_ACEOF
19700/* end confdefs.h. */
503d2be0
AS
19701#include <$ac_header>
19702_ACEOF
c0d27fcc 19703if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
19704 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19705 ac_status=$?
6bae0ccf 19706 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
19707 rm -f conftest.er1
19708 cat conftest.err >&5
c0d27fcc 19709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19710 (exit $ac_status); } >/dev/null; then
19711 if test -s conftest.err; then
19712 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 19713 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
19714 else
19715 ac_cpp_err=
19716 fi
19717else
19718 ac_cpp_err=yes
19719fi
19720if test -z "$ac_cpp_err"; then
c0d27fcc 19721 ac_header_preproc=yes
503d2be0
AS
19722else
19723 echo "$as_me: failed program was:" >&5
19650fd6
AS
19724sed 's/^/| /' conftest.$ac_ext >&5
19725
c0d27fcc 19726 ac_header_preproc=no
a21616bd 19727fi
503d2be0 19728rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
19729echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19730echo "${ECHO_T}$ac_header_preproc" >&6
19731
19732# So? What about this header?
edfaf76d
LK
19733case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19734 yes:no: )
c0d27fcc
MR
19735 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19736echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
19737 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
19738echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
19739 ac_header_preproc=yes
19650fd6 19740 ;;
edfaf76d 19741 no:yes:* )
c0d27fcc
MR
19742 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19743echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
19744 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
19745echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
19746 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19747echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19748 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
19749echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 19750 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 19751echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
19752 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
19753echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
19754 (
19755 cat <<\_ASBOX
edfaf76d
LK
19756## ------------------------------------------ ##
19757## Report this to the AC_PACKAGE_NAME lists. ##
19758## ------------------------------------------ ##
19650fd6
AS
19759_ASBOX
19760 ) |
19761 sed "s/^/$as_me: WARNING: /" >&2
19762 ;;
c0d27fcc
MR
19763esac
19764echo "$as_me:$LINENO: checking for $ac_header" >&5
19765echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19766if eval "test \"\${$as_ac_Header+set}\" = set"; then
19767 echo $ECHO_N "(cached) $ECHO_C" >&6
19768else
edfaf76d 19769 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 19770fi
c0d27fcc 19771echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 19772echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
19773
19774fi
503d2be0 19775if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 19776 cat >>confdefs.h <<_ACEOF
503d2be0 19777#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 19778_ACEOF
503d2be0 19779
a21616bd 19780else
503d2be0
AS
19781
19782for ac_header in kerberosIV/des.h
a21616bd 19783do
503d2be0 19784as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
19785if eval "test \"\${$as_ac_Header+set}\" = set"; then
19786 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
19787echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19788if eval "test \"\${$as_ac_Header+set}\" = set"; then
19789 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
19790fi
19791echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
19792echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 19793else
c0d27fcc
MR
19794 # Is the header compilable?
19795echo "$as_me:$LINENO: checking $ac_header usability" >&5
19796echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
19797cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19798/* confdefs.h. */
19799_ACEOF
19800cat confdefs.h >>conftest.$ac_ext
19801cat >>conftest.$ac_ext <<_ACEOF
19802/* end confdefs.h. */
c0d27fcc
MR
19803$ac_includes_default
19804#include <$ac_header>
19805_ACEOF
19806rm -f conftest.$ac_objext
19807if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 19808 (eval $ac_compile) 2>conftest.er1
c0d27fcc 19809 ac_status=$?
edfaf76d
LK
19810 grep -v '^ *+' conftest.er1 >conftest.err
19811 rm -f conftest.er1
19812 cat conftest.err >&5
c0d27fcc
MR
19813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19814 (exit $ac_status); } &&
ec8fcb10
YM
19815 { ac_try='test -z "$ac_c_werror_flag"
19816 || test ! -s conftest.err'
edfaf76d
LK
19817 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19818 (eval $ac_try) 2>&5
19819 ac_status=$?
19820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19821 (exit $ac_status); }; } &&
19822 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
19823 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19824 (eval $ac_try) 2>&5
19825 ac_status=$?
19826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19827 (exit $ac_status); }; }; then
19828 ac_header_compiler=yes
19829else
19830 echo "$as_me: failed program was:" >&5
19650fd6
AS
19831sed 's/^/| /' conftest.$ac_ext >&5
19832
c0d27fcc
MR
19833ac_header_compiler=no
19834fi
edfaf76d 19835rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
19836echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19837echo "${ECHO_T}$ac_header_compiler" >&6
19838
19839# Is the header present?
19840echo "$as_me:$LINENO: checking $ac_header presence" >&5
19841echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
19842cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19843/* confdefs.h. */
19844_ACEOF
19845cat confdefs.h >>conftest.$ac_ext
19846cat >>conftest.$ac_ext <<_ACEOF
19847/* end confdefs.h. */
503d2be0
AS
19848#include <$ac_header>
19849_ACEOF
c0d27fcc 19850if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
19851 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19852 ac_status=$?
6bae0ccf 19853 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
19854 rm -f conftest.er1
19855 cat conftest.err >&5
c0d27fcc 19856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19857 (exit $ac_status); } >/dev/null; then
19858 if test -s conftest.err; then
19859 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 19860 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
19861 else
19862 ac_cpp_err=
19863 fi
19864else
19865 ac_cpp_err=yes
19866fi
19867if test -z "$ac_cpp_err"; then
c0d27fcc 19868 ac_header_preproc=yes
503d2be0
AS
19869else
19870 echo "$as_me: failed program was:" >&5
19650fd6
AS
19871sed 's/^/| /' conftest.$ac_ext >&5
19872
c0d27fcc 19873 ac_header_preproc=no
a21616bd 19874fi
503d2be0 19875rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
19876echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19877echo "${ECHO_T}$ac_header_preproc" >&6
19878
19879# So? What about this header?
edfaf76d
LK
19880case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19881 yes:no: )
c0d27fcc
MR
19882 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19883echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
19884 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
19885echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
19886 ac_header_preproc=yes
19650fd6 19887 ;;
edfaf76d 19888 no:yes:* )
c0d27fcc
MR
19889 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19890echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
19891 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
19892echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
19893 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19894echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19895 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
19896echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 19897 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 19898echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
19899 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
19900echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
19901 (
19902 cat <<\_ASBOX
edfaf76d
LK
19903## ------------------------------------------ ##
19904## Report this to the AC_PACKAGE_NAME lists. ##
19905## ------------------------------------------ ##
19650fd6
AS
19906_ASBOX
19907 ) |
19908 sed "s/^/$as_me: WARNING: /" >&2
19909 ;;
c0d27fcc
MR
19910esac
19911echo "$as_me:$LINENO: checking for $ac_header" >&5
19912echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19913if eval "test \"\${$as_ac_Header+set}\" = set"; then
19914 echo $ECHO_N "(cached) $ECHO_C" >&6
19915else
edfaf76d 19916 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 19917fi
c0d27fcc 19918echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 19919echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
19920
19921fi
503d2be0 19922if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 19923 cat >>confdefs.h <<_ACEOF
503d2be0 19924#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 19925_ACEOF
503d2be0 19926
a21616bd 19927else
503d2be0
AS
19928
19929for ac_header in kerberos/des.h
a21616bd 19930do
503d2be0 19931as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
19932if eval "test \"\${$as_ac_Header+set}\" = set"; then
19933 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
19934echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19935if eval "test \"\${$as_ac_Header+set}\" = set"; then
19936 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
19937fi
19938echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
19939echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 19940else
c0d27fcc
MR
19941 # Is the header compilable?
19942echo "$as_me:$LINENO: checking $ac_header usability" >&5
19943echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
19944cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19945/* confdefs.h. */
19946_ACEOF
19947cat confdefs.h >>conftest.$ac_ext
19948cat >>conftest.$ac_ext <<_ACEOF
19949/* end confdefs.h. */
c0d27fcc
MR
19950$ac_includes_default
19951#include <$ac_header>
19952_ACEOF
19953rm -f conftest.$ac_objext
19954if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 19955 (eval $ac_compile) 2>conftest.er1
c0d27fcc 19956 ac_status=$?
edfaf76d
LK
19957 grep -v '^ *+' conftest.er1 >conftest.err
19958 rm -f conftest.er1
19959 cat conftest.err >&5
c0d27fcc
MR
19960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19961 (exit $ac_status); } &&
ec8fcb10
YM
19962 { ac_try='test -z "$ac_c_werror_flag"
19963 || test ! -s conftest.err'
edfaf76d
LK
19964 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19965 (eval $ac_try) 2>&5
19966 ac_status=$?
19967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19968 (exit $ac_status); }; } &&
19969 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
19970 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19971 (eval $ac_try) 2>&5
19972 ac_status=$?
19973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19974 (exit $ac_status); }; }; then
19975 ac_header_compiler=yes
19976else
19977 echo "$as_me: failed program was:" >&5
19650fd6
AS
19978sed 's/^/| /' conftest.$ac_ext >&5
19979
c0d27fcc
MR
19980ac_header_compiler=no
19981fi
edfaf76d 19982rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
19983echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19984echo "${ECHO_T}$ac_header_compiler" >&6
19985
19986# Is the header present?
19987echo "$as_me:$LINENO: checking $ac_header presence" >&5
19988echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
19989cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19990/* confdefs.h. */
19991_ACEOF
19992cat confdefs.h >>conftest.$ac_ext
19993cat >>conftest.$ac_ext <<_ACEOF
19994/* end confdefs.h. */
503d2be0
AS
19995#include <$ac_header>
19996_ACEOF
c0d27fcc 19997if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
19998 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19999 ac_status=$?
6bae0ccf 20000 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
20001 rm -f conftest.er1
20002 cat conftest.err >&5
c0d27fcc 20003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
20004 (exit $ac_status); } >/dev/null; then
20005 if test -s conftest.err; then
20006 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 20007 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
20008 else
20009 ac_cpp_err=
20010 fi
20011else
20012 ac_cpp_err=yes
20013fi
20014if test -z "$ac_cpp_err"; then
c0d27fcc 20015 ac_header_preproc=yes
503d2be0
AS
20016else
20017 echo "$as_me: failed program was:" >&5
19650fd6
AS
20018sed 's/^/| /' conftest.$ac_ext >&5
20019
c0d27fcc 20020 ac_header_preproc=no
a21616bd 20021fi
503d2be0 20022rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
20023echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20024echo "${ECHO_T}$ac_header_preproc" >&6
20025
20026# So? What about this header?
edfaf76d
LK
20027case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20028 yes:no: )
c0d27fcc
MR
20029 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
20030echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
20031 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
20032echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
20033 ac_header_preproc=yes
19650fd6 20034 ;;
edfaf76d 20035 no:yes:* )
c0d27fcc
MR
20036 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
20037echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
20038 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
20039echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
20040 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
20041echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
20042 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
20043echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 20044 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 20045echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
20046 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
20047echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
20048 (
20049 cat <<\_ASBOX
edfaf76d
LK
20050## ------------------------------------------ ##
20051## Report this to the AC_PACKAGE_NAME lists. ##
20052## ------------------------------------------ ##
19650fd6
AS
20053_ASBOX
20054 ) |
20055 sed "s/^/$as_me: WARNING: /" >&2
20056 ;;
c0d27fcc
MR
20057esac
20058echo "$as_me:$LINENO: checking for $ac_header" >&5
20059echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20060if eval "test \"\${$as_ac_Header+set}\" = set"; then
20061 echo $ECHO_N "(cached) $ECHO_C" >&6
20062else
edfaf76d 20063 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 20064fi
c0d27fcc 20065echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 20066echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
20067
20068fi
503d2be0 20069if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 20070 cat >>confdefs.h <<_ACEOF
503d2be0 20071#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 20072_ACEOF
a21616bd
KR
20073
20074fi
c0d27fcc 20075
a21616bd
KR
20076done
20077
98418dba 20078fi
c0d27fcc 20079
925c2f3f
EZ
20080done
20081
98418dba 20082fi
c0d27fcc 20083
925c2f3f 20084done
98418dba 20085
c0d27fcc 20086
925c2f3f
EZ
20087for ac_header in krb.h
20088do
20089as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
20090if eval "test \"\${$as_ac_Header+set}\" = set"; then
20091 echo "$as_me:$LINENO: checking for $ac_header" >&5
925c2f3f
EZ
20092echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20093if eval "test \"\${$as_ac_Header+set}\" = set"; then
20094 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
20095fi
20096echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
20097echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20098else
20099 # Is the header compilable?
20100echo "$as_me:$LINENO: checking $ac_header usability" >&5
20101echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
20102cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20103/* confdefs.h. */
20104_ACEOF
20105cat confdefs.h >>conftest.$ac_ext
20106cat >>conftest.$ac_ext <<_ACEOF
20107/* end confdefs.h. */
c0d27fcc
MR
20108$ac_includes_default
20109#include <$ac_header>
20110_ACEOF
20111rm -f conftest.$ac_objext
20112if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 20113 (eval $ac_compile) 2>conftest.er1
c0d27fcc 20114 ac_status=$?
edfaf76d
LK
20115 grep -v '^ *+' conftest.er1 >conftest.err
20116 rm -f conftest.er1
20117 cat conftest.err >&5
c0d27fcc
MR
20118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20119 (exit $ac_status); } &&
ec8fcb10
YM
20120 { ac_try='test -z "$ac_c_werror_flag"
20121 || test ! -s conftest.err'
edfaf76d
LK
20122 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20123 (eval $ac_try) 2>&5
20124 ac_status=$?
20125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20126 (exit $ac_status); }; } &&
20127 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
20128 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20129 (eval $ac_try) 2>&5
20130 ac_status=$?
20131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20132 (exit $ac_status); }; }; then
20133 ac_header_compiler=yes
925c2f3f 20134else
c0d27fcc 20135 echo "$as_me: failed program was:" >&5
19650fd6
AS
20136sed 's/^/| /' conftest.$ac_ext >&5
20137
c0d27fcc
MR
20138ac_header_compiler=no
20139fi
edfaf76d 20140rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
20141echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20142echo "${ECHO_T}$ac_header_compiler" >&6
20143
20144# Is the header present?
20145echo "$as_me:$LINENO: checking $ac_header presence" >&5
20146echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
20147cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20148/* confdefs.h. */
20149_ACEOF
20150cat confdefs.h >>conftest.$ac_ext
20151cat >>conftest.$ac_ext <<_ACEOF
20152/* end confdefs.h. */
503d2be0
AS
20153#include <$ac_header>
20154_ACEOF
c0d27fcc 20155if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
20156 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20157 ac_status=$?
6bae0ccf 20158 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
20159 rm -f conftest.er1
20160 cat conftest.err >&5
c0d27fcc 20161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
20162 (exit $ac_status); } >/dev/null; then
20163 if test -s conftest.err; then
20164 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 20165 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
20166 else
20167 ac_cpp_err=
20168 fi
20169else
20170 ac_cpp_err=yes
20171fi
20172if test -z "$ac_cpp_err"; then
c0d27fcc 20173 ac_header_preproc=yes
503d2be0
AS
20174else
20175 echo "$as_me: failed program was:" >&5
19650fd6
AS
20176sed 's/^/| /' conftest.$ac_ext >&5
20177
c0d27fcc 20178 ac_header_preproc=no
a21616bd 20179fi
503d2be0 20180rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
20181echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20182echo "${ECHO_T}$ac_header_preproc" >&6
20183
20184# So? What about this header?
edfaf76d
LK
20185case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20186 yes:no: )
c0d27fcc
MR
20187 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
20188echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
20189 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
20190echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
20191 ac_header_preproc=yes
19650fd6 20192 ;;
edfaf76d 20193 no:yes:* )
c0d27fcc
MR
20194 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
20195echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
20196 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
20197echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
20198 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
20199echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
20200 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
20201echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 20202 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 20203echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
20204 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
20205echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
20206 (
20207 cat <<\_ASBOX
edfaf76d
LK
20208## ------------------------------------------ ##
20209## Report this to the AC_PACKAGE_NAME lists. ##
20210## ------------------------------------------ ##
19650fd6
AS
20211_ASBOX
20212 ) |
20213 sed "s/^/$as_me: WARNING: /" >&2
20214 ;;
c0d27fcc
MR
20215esac
20216echo "$as_me:$LINENO: checking for $ac_header" >&5
20217echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20218if eval "test \"\${$as_ac_Header+set}\" = set"; then
20219 echo $ECHO_N "(cached) $ECHO_C" >&6
20220else
edfaf76d 20221 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 20222fi
c0d27fcc 20223echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 20224echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
20225
20226fi
503d2be0 20227if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 20228 cat >>confdefs.h <<_ACEOF
503d2be0 20229#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 20230_ACEOF
503d2be0 20231
a21616bd 20232else
503d2be0
AS
20233
20234for ac_header in kerberosIV/krb.h
a21616bd 20235do
503d2be0 20236as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
20237if eval "test \"\${$as_ac_Header+set}\" = set"; then
20238 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
20239echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20240if eval "test \"\${$as_ac_Header+set}\" = set"; then
20241 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
20242fi
20243echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
20244echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 20245else
c0d27fcc
MR
20246 # Is the header compilable?
20247echo "$as_me:$LINENO: checking $ac_header usability" >&5
20248echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
20249cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20250/* confdefs.h. */
20251_ACEOF
20252cat confdefs.h >>conftest.$ac_ext
20253cat >>conftest.$ac_ext <<_ACEOF
20254/* end confdefs.h. */
c0d27fcc
MR
20255$ac_includes_default
20256#include <$ac_header>
20257_ACEOF
20258rm -f conftest.$ac_objext
20259if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 20260 (eval $ac_compile) 2>conftest.er1
c0d27fcc 20261 ac_status=$?
edfaf76d
LK
20262 grep -v '^ *+' conftest.er1 >conftest.err
20263 rm -f conftest.er1
20264 cat conftest.err >&5
c0d27fcc
MR
20265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20266 (exit $ac_status); } &&
ec8fcb10
YM
20267 { ac_try='test -z "$ac_c_werror_flag"
20268 || test ! -s conftest.err'
edfaf76d
LK
20269 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20270 (eval $ac_try) 2>&5
20271 ac_status=$?
20272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20273 (exit $ac_status); }; } &&
20274 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
20275 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20276 (eval $ac_try) 2>&5
20277 ac_status=$?
20278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20279 (exit $ac_status); }; }; then
20280 ac_header_compiler=yes
20281else
20282 echo "$as_me: failed program was:" >&5
19650fd6
AS
20283sed 's/^/| /' conftest.$ac_ext >&5
20284
c0d27fcc
MR
20285ac_header_compiler=no
20286fi
edfaf76d 20287rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
20288echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20289echo "${ECHO_T}$ac_header_compiler" >&6
20290
20291# Is the header present?
20292echo "$as_me:$LINENO: checking $ac_header presence" >&5
20293echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
20294cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20295/* confdefs.h. */
20296_ACEOF
20297cat confdefs.h >>conftest.$ac_ext
20298cat >>conftest.$ac_ext <<_ACEOF
20299/* end confdefs.h. */
503d2be0
AS
20300#include <$ac_header>
20301_ACEOF
c0d27fcc 20302if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
20303 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20304 ac_status=$?
6bae0ccf 20305 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
20306 rm -f conftest.er1
20307 cat conftest.err >&5
c0d27fcc 20308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
20309 (exit $ac_status); } >/dev/null; then
20310 if test -s conftest.err; then
20311 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 20312 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
20313 else
20314 ac_cpp_err=
20315 fi
20316else
20317 ac_cpp_err=yes
20318fi
20319if test -z "$ac_cpp_err"; then
c0d27fcc 20320 ac_header_preproc=yes
503d2be0
AS
20321else
20322 echo "$as_me: failed program was:" >&5
19650fd6
AS
20323sed 's/^/| /' conftest.$ac_ext >&5
20324
c0d27fcc 20325 ac_header_preproc=no
a21616bd 20326fi
503d2be0 20327rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
20328echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20329echo "${ECHO_T}$ac_header_preproc" >&6
20330
20331# So? What about this header?
edfaf76d
LK
20332case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20333 yes:no: )
c0d27fcc
MR
20334 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
20335echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
20336 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
20337echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
20338 ac_header_preproc=yes
19650fd6 20339 ;;
edfaf76d 20340 no:yes:* )
c0d27fcc
MR
20341 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
20342echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
20343 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
20344echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
20345 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
20346echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
20347 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
20348echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 20349 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 20350echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
20351 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
20352echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
20353 (
20354 cat <<\_ASBOX
edfaf76d
LK
20355## ------------------------------------------ ##
20356## Report this to the AC_PACKAGE_NAME lists. ##
20357## ------------------------------------------ ##
19650fd6
AS
20358_ASBOX
20359 ) |
20360 sed "s/^/$as_me: WARNING: /" >&2
20361 ;;
c0d27fcc
MR
20362esac
20363echo "$as_me:$LINENO: checking for $ac_header" >&5
20364echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20365if eval "test \"\${$as_ac_Header+set}\" = set"; then
20366 echo $ECHO_N "(cached) $ECHO_C" >&6
20367else
edfaf76d 20368 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 20369fi
c0d27fcc 20370echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 20371echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
20372
20373fi
503d2be0 20374if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 20375 cat >>confdefs.h <<_ACEOF
503d2be0 20376#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 20377_ACEOF
503d2be0 20378
a21616bd 20379else
503d2be0
AS
20380
20381for ac_header in kerberos/krb.h
a21616bd 20382do
503d2be0 20383as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
20384if eval "test \"\${$as_ac_Header+set}\" = set"; then
20385 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
20386echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20387if eval "test \"\${$as_ac_Header+set}\" = set"; then
20388 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
20389fi
20390echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
20391echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 20392else
c0d27fcc
MR
20393 # Is the header compilable?
20394echo "$as_me:$LINENO: checking $ac_header usability" >&5
20395echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
20396cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20397/* confdefs.h. */
20398_ACEOF
20399cat confdefs.h >>conftest.$ac_ext
20400cat >>conftest.$ac_ext <<_ACEOF
20401/* end confdefs.h. */
c0d27fcc
MR
20402$ac_includes_default
20403#include <$ac_header>
20404_ACEOF
20405rm -f conftest.$ac_objext
20406if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 20407 (eval $ac_compile) 2>conftest.er1
c0d27fcc 20408 ac_status=$?
edfaf76d
LK
20409 grep -v '^ *+' conftest.er1 >conftest.err
20410 rm -f conftest.er1
20411 cat conftest.err >&5
c0d27fcc
MR
20412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20413 (exit $ac_status); } &&
ec8fcb10
YM
20414 { ac_try='test -z "$ac_c_werror_flag"
20415 || test ! -s conftest.err'
edfaf76d
LK
20416 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20417 (eval $ac_try) 2>&5
20418 ac_status=$?
20419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20420 (exit $ac_status); }; } &&
20421 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
20422 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20423 (eval $ac_try) 2>&5
20424 ac_status=$?
20425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20426 (exit $ac_status); }; }; then
20427 ac_header_compiler=yes
20428else
20429 echo "$as_me: failed program was:" >&5
19650fd6
AS
20430sed 's/^/| /' conftest.$ac_ext >&5
20431
c0d27fcc
MR
20432ac_header_compiler=no
20433fi
edfaf76d 20434rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
20435echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20436echo "${ECHO_T}$ac_header_compiler" >&6
20437
20438# Is the header present?
20439echo "$as_me:$LINENO: checking $ac_header presence" >&5
20440echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
20441cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20442/* confdefs.h. */
20443_ACEOF
20444cat confdefs.h >>conftest.$ac_ext
20445cat >>conftest.$ac_ext <<_ACEOF
20446/* end confdefs.h. */
503d2be0
AS
20447#include <$ac_header>
20448_ACEOF
c0d27fcc 20449if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
20450 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20451 ac_status=$?
6bae0ccf 20452 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
20453 rm -f conftest.er1
20454 cat conftest.err >&5
c0d27fcc 20455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
20456 (exit $ac_status); } >/dev/null; then
20457 if test -s conftest.err; then
20458 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 20459 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
20460 else
20461 ac_cpp_err=
20462 fi
20463else
20464 ac_cpp_err=yes
20465fi
20466if test -z "$ac_cpp_err"; then
c0d27fcc 20467 ac_header_preproc=yes
503d2be0
AS
20468else
20469 echo "$as_me: failed program was:" >&5
19650fd6
AS
20470sed 's/^/| /' conftest.$ac_ext >&5
20471
c0d27fcc 20472 ac_header_preproc=no
a21616bd 20473fi
503d2be0 20474rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
20475echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20476echo "${ECHO_T}$ac_header_preproc" >&6
35996d22
AS
20477
20478# So? What about this header?
edfaf76d
LK
20479case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20480 yes:no: )
35996d22
AS
20481 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
20482echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
20483 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
20484echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
20485 ac_header_preproc=yes
19650fd6 20486 ;;
edfaf76d 20487 no:yes:* )
c0d27fcc
MR
20488 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
20489echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
20490 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
20491echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
20492 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
20493echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
20494 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
20495echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 20496 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 20497echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
20498 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
20499echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
20500 (
20501 cat <<\_ASBOX
edfaf76d
LK
20502## ------------------------------------------ ##
20503## Report this to the AC_PACKAGE_NAME lists. ##
20504## ------------------------------------------ ##
19650fd6
AS
20505_ASBOX
20506 ) |
20507 sed "s/^/$as_me: WARNING: /" >&2
20508 ;;
c0d27fcc
MR
20509esac
20510echo "$as_me:$LINENO: checking for $ac_header" >&5
20511echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20512if eval "test \"\${$as_ac_Header+set}\" = set"; then
20513 echo $ECHO_N "(cached) $ECHO_C" >&6
20514else
edfaf76d 20515 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 20516fi
c0d27fcc 20517echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 20518echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
20519
20520fi
503d2be0 20521if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 20522 cat >>confdefs.h <<_ACEOF
503d2be0 20523#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 20524_ACEOF
503d2be0 20525
a21616bd 20526fi
c0d27fcc 20527
a21616bd
KR
20528done
20529
20530fi
c0d27fcc 20531
a21616bd
KR
20532done
20533
20534fi
c0d27fcc 20535
a21616bd
KR
20536done
20537
20538 fi
503d2be0
AS
20539
20540for ac_header in com_err.h
a21616bd 20541do
503d2be0 20542as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
20543if eval "test \"\${$as_ac_Header+set}\" = set"; then
20544 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
20545echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20546if eval "test \"\${$as_ac_Header+set}\" = set"; then
20547 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
20548fi
20549echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
20550echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 20551else
c0d27fcc
MR
20552 # Is the header compilable?
20553echo "$as_me:$LINENO: checking $ac_header usability" >&5
20554echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
20555cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20556/* confdefs.h. */
20557_ACEOF
20558cat confdefs.h >>conftest.$ac_ext
20559cat >>conftest.$ac_ext <<_ACEOF
20560/* end confdefs.h. */
c0d27fcc
MR
20561$ac_includes_default
20562#include <$ac_header>
20563_ACEOF
20564rm -f conftest.$ac_objext
20565if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d
LK
20566 (eval $ac_compile) 2>conftest.er1
20567 ac_status=$?
20568 grep -v '^ *+' conftest.er1 >conftest.err
20569 rm -f conftest.er1
20570 cat conftest.err >&5
20571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20572 (exit $ac_status); } &&
ec8fcb10
YM
20573 { ac_try='test -z "$ac_c_werror_flag"
20574 || test ! -s conftest.err'
edfaf76d
LK
20575 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20576 (eval $ac_try) 2>&5
35996d22
AS
20577 ac_status=$?
20578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
edfaf76d
LK
20579 (exit $ac_status); }; } &&
20580 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
20581 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20582 (eval $ac_try) 2>&5
20583 ac_status=$?
20584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20585 (exit $ac_status); }; }; then
20586 ac_header_compiler=yes
20587else
20588 echo "$as_me: failed program was:" >&5
19650fd6
AS
20589sed 's/^/| /' conftest.$ac_ext >&5
20590
c0d27fcc
MR
20591ac_header_compiler=no
20592fi
edfaf76d 20593rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
20594echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20595echo "${ECHO_T}$ac_header_compiler" >&6
20596
20597# Is the header present?
20598echo "$as_me:$LINENO: checking $ac_header presence" >&5
20599echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
20600cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20601/* confdefs.h. */
20602_ACEOF
20603cat confdefs.h >>conftest.$ac_ext
20604cat >>conftest.$ac_ext <<_ACEOF
20605/* end confdefs.h. */
503d2be0
AS
20606#include <$ac_header>
20607_ACEOF
c0d27fcc 20608if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
20609 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20610 ac_status=$?
6bae0ccf 20611 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
20612 rm -f conftest.er1
20613 cat conftest.err >&5
c0d27fcc 20614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
20615 (exit $ac_status); } >/dev/null; then
20616 if test -s conftest.err; then
20617 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 20618 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
20619 else
20620 ac_cpp_err=
20621 fi
20622else
20623 ac_cpp_err=yes
20624fi
20625if test -z "$ac_cpp_err"; then
c0d27fcc 20626 ac_header_preproc=yes
503d2be0
AS
20627else
20628 echo "$as_me: failed program was:" >&5
19650fd6
AS
20629sed 's/^/| /' conftest.$ac_ext >&5
20630
c0d27fcc 20631 ac_header_preproc=no
a21616bd 20632fi
503d2be0 20633rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
20634echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20635echo "${ECHO_T}$ac_header_preproc" >&6
20636
20637# So? What about this header?
edfaf76d
LK
20638case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20639 yes:no: )
c0d27fcc
MR
20640 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
20641echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
20642 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
20643echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
20644 ac_header_preproc=yes
19650fd6 20645 ;;
edfaf76d 20646 no:yes:* )
c0d27fcc
MR
20647 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
20648echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
20649 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
20650echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
20651 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
20652echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
20653 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
20654echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 20655 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 20656echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
20657 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
20658echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
20659 (
20660 cat <<\_ASBOX
edfaf76d
LK
20661## ------------------------------------------ ##
20662## Report this to the AC_PACKAGE_NAME lists. ##
20663## ------------------------------------------ ##
19650fd6
AS
20664_ASBOX
20665 ) |
20666 sed "s/^/$as_me: WARNING: /" >&2
20667 ;;
c0d27fcc
MR
20668esac
20669echo "$as_me:$LINENO: checking for $ac_header" >&5
20670echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20671if eval "test \"\${$as_ac_Header+set}\" = set"; then
20672 echo $ECHO_N "(cached) $ECHO_C" >&6
20673else
edfaf76d 20674 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 20675fi
c0d27fcc 20676echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 20677echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
20678
20679fi
503d2be0 20680if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 20681 cat >>confdefs.h <<_ACEOF
503d2be0 20682#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 20683_ACEOF
503d2be0 20684
a21616bd 20685fi
c0d27fcc 20686
a21616bd
KR
20687done
20688
20689fi
20690
ba4481b5
DL
20691# Solaris requires -lintl if you want strerror (which calls dgettext)
20692# to return localized messages.
503d2be0 20693
c0d27fcc 20694echo "$as_me:$LINENO: checking for dgettext in -lintl" >&5
503d2be0
AS
20695echo $ECHO_N "checking for dgettext in -lintl... $ECHO_C" >&6
20696if test "${ac_cv_lib_intl_dgettext+set}" = set; then
20697 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 20698else
503d2be0 20699 ac_check_lib_save_LIBS=$LIBS
ba4481b5 20700LIBS="-lintl $LIBS"
503d2be0 20701cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20702/* confdefs.h. */
20703_ACEOF
20704cat confdefs.h >>conftest.$ac_ext
20705cat >>conftest.$ac_ext <<_ACEOF
20706/* end confdefs.h. */
503d2be0 20707
ba4481b5 20708/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
20709#ifdef __cplusplus
20710extern "C"
20711#endif
ba4481b5 20712/* We use char because int might match the return type of a gcc2
503d2be0
AS
20713 builtin and then its argument prototype would still apply. */
20714char dgettext ();
20715int
20716main ()
20717{
20718dgettext ();
20719 ;
20720 return 0;
20721}
20722_ACEOF
20723rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 20724if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 20725 (eval $ac_link) 2>conftest.er1
503d2be0 20726 ac_status=$?
edfaf76d
LK
20727 grep -v '^ *+' conftest.er1 >conftest.err
20728 rm -f conftest.er1
20729 cat conftest.err >&5
c0d27fcc 20730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 20731 (exit $ac_status); } &&
ec8fcb10
YM
20732 { ac_try='test -z "$ac_c_werror_flag"
20733 || test ! -s conftest.err'
edfaf76d
LK
20734 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20735 (eval $ac_try) 2>&5
20736 ac_status=$?
20737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20738 (exit $ac_status); }; } &&
20739 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 20740 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
20741 (eval $ac_try) 2>&5
20742 ac_status=$?
c0d27fcc 20743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
20744 (exit $ac_status); }; }; then
20745 ac_cv_lib_intl_dgettext=yes
20746else
20747 echo "$as_me: failed program was:" >&5
19650fd6
AS
20748sed 's/^/| /' conftest.$ac_ext >&5
20749
503d2be0
AS
20750ac_cv_lib_intl_dgettext=no
20751fi
edfaf76d
LK
20752rm -f conftest.err conftest.$ac_objext \
20753 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20754LIBS=$ac_check_lib_save_LIBS
20755fi
c0d27fcc 20756echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dgettext" >&5
503d2be0
AS
20757echo "${ECHO_T}$ac_cv_lib_intl_dgettext" >&6
20758if test $ac_cv_lib_intl_dgettext = yes; then
c0d27fcc 20759 cat >>confdefs.h <<_ACEOF
503d2be0 20760#define HAVE_LIBINTL 1
c0d27fcc 20761_ACEOF
ba4481b5
DL
20762
20763 LIBS="-lintl $LIBS"
20764
ba4481b5
DL
20765fi
20766
c0d27fcc
MR
20767
20768echo "$as_me:$LINENO: checking whether localtime caches TZ" >&5
503d2be0
AS
20769echo $ECHO_N "checking whether localtime caches TZ... $ECHO_C" >&6
20770if test "${emacs_cv_localtime_cache+set}" = set; then
20771 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
20772else
20773 if test x$ac_cv_func_tzset = xyes; then
20774if test "$cross_compiling" = yes; then
20775 # If we have tzset, assume the worst when cross-compiling.
20776emacs_cv_localtime_cache=yes
20777else
503d2be0 20778 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20779/* confdefs.h. */
20780_ACEOF
20781cat confdefs.h >>conftest.$ac_ext
20782cat >>conftest.$ac_ext <<_ACEOF
20783/* end confdefs.h. */
ba4481b5 20784#include <time.h>
ba4481b5
DL
20785extern char **environ;
20786unset_TZ ()
20787{
20788 char **from, **to;
20789 for (to = from = environ; (*to = *from); from++)
20790 if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
20791 to++;
20792}
20793char TZ_GMT0[] = "TZ=GMT0";
20794char TZ_PST8[] = "TZ=PST8";
20795main()
20796{
20797 time_t now = time ((time_t *) 0);
20798 int hour_GMT0, hour_unset;
20799 if (putenv (TZ_GMT0) != 0)
20800 exit (1);
20801 hour_GMT0 = localtime (&now)->tm_hour;
20802 unset_TZ ();
20803 hour_unset = localtime (&now)->tm_hour;
20804 if (putenv (TZ_PST8) != 0)
20805 exit (1);
20806 if (localtime (&now)->tm_hour == hour_GMT0)
20807 exit (1);
20808 unset_TZ ();
20809 if (localtime (&now)->tm_hour != hour_unset)
20810 exit (1);
20811 exit (0);
20812}
503d2be0
AS
20813_ACEOF
20814rm -f conftest$ac_exeext
c0d27fcc 20815if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
20816 (eval $ac_link) 2>&5
20817 ac_status=$?
c0d27fcc 20818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 20819 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 20820 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
20821 (eval $ac_try) 2>&5
20822 ac_status=$?
c0d27fcc 20823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 20824 (exit $ac_status); }; }; then
ba4481b5
DL
20825 emacs_cv_localtime_cache=no
20826else
503d2be0
AS
20827 echo "$as_me: program exited with status $ac_status" >&5
20828echo "$as_me: failed program was:" >&5
19650fd6
AS
20829sed 's/^/| /' conftest.$ac_ext >&5
20830
c0d27fcc 20831( exit $ac_status )
503d2be0 20832emacs_cv_localtime_cache=yes
ba4481b5 20833fi
edfaf76d 20834rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 20835fi
ba4481b5
DL
20836else
20837 # If we lack tzset, report that localtime does not cache TZ,
20838 # since we can't invalidate the cache if we don't have tzset.
20839 emacs_cv_localtime_cache=no
20840fi
20841fi
c0d27fcc 20842echo "$as_me:$LINENO: result: $emacs_cv_localtime_cache" >&5
503d2be0 20843echo "${ECHO_T}$emacs_cv_localtime_cache" >&6
ba4481b5 20844if test $emacs_cv_localtime_cache = yes; then
b936fae4 20845
c0d27fcc 20846cat >>confdefs.h <<\_ACEOF
ba4481b5 20847#define LOCALTIME_CACHE 1
c0d27fcc 20848_ACEOF
ba4481b5
DL
20849
20850fi
20851
20852if test "x$HAVE_TIMEVAL" = xyes; then
503d2be0
AS
20853
20854for ac_func in gettimeofday
48d4b120 20855do
503d2be0 20856as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 20857echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
20858echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20859if eval "test \"\${$as_ac_var+set}\" = set"; then
20860 echo $ECHO_N "(cached) $ECHO_C" >&6
48d4b120 20861else
503d2be0 20862 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20863/* confdefs.h. */
20864_ACEOF
20865cat confdefs.h >>conftest.$ac_ext
20866cat >>conftest.$ac_ext <<_ACEOF
20867/* end confdefs.h. */
edfaf76d
LK
20868/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20869 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20870#define $ac_func innocuous_$ac_func
20871
48d4b120 20872/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
20873 which can conflict with char $ac_func (); below.
20874 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20875 <limits.h> exists even on freestanding compilers. */
edfaf76d 20876
19650fd6
AS
20877#ifdef __STDC__
20878# include <limits.h>
20879#else
20880# include <assert.h>
20881#endif
edfaf76d
LK
20882
20883#undef $ac_func
20884
48d4b120 20885/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
20886#ifdef __cplusplus
20887extern "C"
19650fd6 20888{
503d2be0 20889#endif
48d4b120 20890/* We use char because int might match the return type of a gcc2
503d2be0
AS
20891 builtin and then its argument prototype would still apply. */
20892char $ac_func ();
48d4b120
DL
20893/* The GNU C library defines this for functions which it implements
20894 to always fail with ENOSYS. Some functions are actually named
20895 something starting with __ and the normal name is an alias. */
20896#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
20897choke me
20898#else
19650fd6
AS
20899char (*f) () = $ac_func;
20900#endif
20901#ifdef __cplusplus
20902}
cd958eb3
MB
20903#endif
20904
19650fd6
AS
20905int
20906main ()
20907{
20908return f != $ac_func;
503d2be0
AS
20909 ;
20910 return 0;
20911}
20912_ACEOF
20913rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 20914if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 20915 (eval $ac_link) 2>conftest.er1
503d2be0 20916 ac_status=$?
edfaf76d
LK
20917 grep -v '^ *+' conftest.er1 >conftest.err
20918 rm -f conftest.er1
20919 cat conftest.err >&5
c0d27fcc 20920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 20921 (exit $ac_status); } &&
ec8fcb10
YM
20922 { ac_try='test -z "$ac_c_werror_flag"
20923 || test ! -s conftest.err'
edfaf76d
LK
20924 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20925 (eval $ac_try) 2>&5
20926 ac_status=$?
20927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20928 (exit $ac_status); }; } &&
20929 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 20930 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
20931 (eval $ac_try) 2>&5
20932 ac_status=$?
c0d27fcc 20933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
20934 (exit $ac_status); }; }; then
20935 eval "$as_ac_var=yes"
20936else
20937 echo "$as_me: failed program was:" >&5
19650fd6
AS
20938sed 's/^/| /' conftest.$ac_ext >&5
20939
503d2be0
AS
20940eval "$as_ac_var=no"
20941fi
edfaf76d
LK
20942rm -f conftest.err conftest.$ac_objext \
20943 conftest$ac_exeext conftest.$ac_ext
503d2be0 20944fi
c0d27fcc 20945echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
20946echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
20947if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 20948 cat >>confdefs.h <<_ACEOF
503d2be0 20949#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 20950_ACEOF
48d4b120 20951
48d4b120
DL
20952fi
20953done
20954
b936fae4 20955 if test $ac_cv_func_gettimeofday = yes; then
c0d27fcc 20956 echo "$as_me:$LINENO: checking whether gettimeofday can accept two arguments" >&5
503d2be0
AS
20957echo $ECHO_N "checking whether gettimeofday can accept two arguments... $ECHO_C" >&6
20958if test "${emacs_cv_gettimeofday_two_arguments+set}" = set; then
20959 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 20960else
503d2be0 20961 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20962/* confdefs.h. */
20963_ACEOF
20964cat confdefs.h >>conftest.$ac_ext
20965cat >>conftest.$ac_ext <<_ACEOF
20966/* end confdefs.h. */
ba4481b5 20967
a3f08d9e
DL
20968#ifdef TIME_WITH_SYS_TIME
20969#include <sys/time.h>
20970#include <time.h>
20971#else
20972#ifdef HAVE_SYS_TIME_H
20973#include <sys/time.h>
20974#else
20975#include <time.h>
20976#endif
20977#endif
503d2be0
AS
20978int
20979main ()
20980{
a3f08d9e 20981struct timeval time;
b936fae4 20982 gettimeofday (&time, 0);
503d2be0
AS
20983 ;
20984 return 0;
20985}
20986_ACEOF
20987rm -f conftest.$ac_objext
c0d27fcc 20988if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 20989 (eval $ac_compile) 2>conftest.er1
503d2be0 20990 ac_status=$?
edfaf76d
LK
20991 grep -v '^ *+' conftest.er1 >conftest.err
20992 rm -f conftest.er1
20993 cat conftest.err >&5
c0d27fcc 20994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 20995 (exit $ac_status); } &&
ec8fcb10
YM
20996 { ac_try='test -z "$ac_c_werror_flag"
20997 || test ! -s conftest.err'
edfaf76d
LK
20998 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20999 (eval $ac_try) 2>&5
21000 ac_status=$?
21001 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21002 (exit $ac_status); }; } &&
21003 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 21004 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
21005 (eval $ac_try) 2>&5
21006 ac_status=$?
c0d27fcc 21007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21008 (exit $ac_status); }; }; then
ba4481b5
DL
21009 emacs_cv_gettimeofday_two_arguments=yes
21010else
503d2be0 21011 echo "$as_me: failed program was:" >&5
19650fd6
AS
21012sed 's/^/| /' conftest.$ac_ext >&5
21013
503d2be0 21014emacs_cv_gettimeofday_two_arguments=no
ba4481b5 21015fi
edfaf76d 21016rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 21017fi
c0d27fcc 21018echo "$as_me:$LINENO: result: $emacs_cv_gettimeofday_two_arguments" >&5
503d2be0 21019echo "${ECHO_T}$emacs_cv_gettimeofday_two_arguments" >&6
b936fae4
AS
21020 if test $emacs_cv_gettimeofday_two_arguments = no; then
21021
c0d27fcc 21022cat >>confdefs.h <<\_ACEOF
ba4481b5 21023#define GETTIMEOFDAY_ONE_ARGUMENT 1
c0d27fcc 21024_ACEOF
ba4481b5 21025
b936fae4 21026 fi
ba4481b5
DL
21027 fi
21028fi
21029
973a76b1
DL
21030# This defines (or not) HAVE_TZNAME and HAVE_TM_ZONE.
21031echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
21032echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
21033if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
21034 echo $ECHO_N "(cached) $ECHO_C" >&6
21035else
21036 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21037/* confdefs.h. */
21038_ACEOF
21039cat confdefs.h >>conftest.$ac_ext
21040cat >>conftest.$ac_ext <<_ACEOF
21041/* end confdefs.h. */
973a76b1
DL
21042#include <sys/types.h>
21043#include <$ac_cv_struct_tm>
21044
21045
21046int
21047main ()
21048{
21049static struct tm ac_aggr;
21050if (ac_aggr.tm_zone)
21051return 0;
21052 ;
21053 return 0;
21054}
21055_ACEOF
21056rm -f conftest.$ac_objext
21057if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 21058 (eval $ac_compile) 2>conftest.er1
973a76b1 21059 ac_status=$?
edfaf76d
LK
21060 grep -v '^ *+' conftest.er1 >conftest.err
21061 rm -f conftest.er1
21062 cat conftest.err >&5
973a76b1
DL
21063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21064 (exit $ac_status); } &&
ec8fcb10
YM
21065 { ac_try='test -z "$ac_c_werror_flag"
21066 || test ! -s conftest.err'
edfaf76d
LK
21067 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21068 (eval $ac_try) 2>&5
21069 ac_status=$?
21070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21071 (exit $ac_status); }; } &&
21072 { ac_try='test -s conftest.$ac_objext'
973a76b1
DL
21073 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21074 (eval $ac_try) 2>&5
21075 ac_status=$?
21076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21077 (exit $ac_status); }; }; then
21078 ac_cv_member_struct_tm_tm_zone=yes
21079else
21080 echo "$as_me: failed program was:" >&5
19650fd6
AS
21081sed 's/^/| /' conftest.$ac_ext >&5
21082
973a76b1 21083cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21084/* confdefs.h. */
21085_ACEOF
21086cat confdefs.h >>conftest.$ac_ext
21087cat >>conftest.$ac_ext <<_ACEOF
21088/* end confdefs.h. */
973a76b1
DL
21089#include <sys/types.h>
21090#include <$ac_cv_struct_tm>
21091
21092
21093int
21094main ()
21095{
21096static struct tm ac_aggr;
21097if (sizeof ac_aggr.tm_zone)
21098return 0;
21099 ;
21100 return 0;
21101}
21102_ACEOF
21103rm -f conftest.$ac_objext
21104if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 21105 (eval $ac_compile) 2>conftest.er1
973a76b1 21106 ac_status=$?
edfaf76d
LK
21107 grep -v '^ *+' conftest.er1 >conftest.err
21108 rm -f conftest.er1
21109 cat conftest.err >&5
973a76b1
DL
21110 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21111 (exit $ac_status); } &&
ec8fcb10
YM
21112 { ac_try='test -z "$ac_c_werror_flag"
21113 || test ! -s conftest.err'
edfaf76d
LK
21114 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21115 (eval $ac_try) 2>&5
21116 ac_status=$?
21117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21118 (exit $ac_status); }; } &&
21119 { ac_try='test -s conftest.$ac_objext'
973a76b1
DL
21120 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21121 (eval $ac_try) 2>&5
21122 ac_status=$?
21123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21124 (exit $ac_status); }; }; then
21125 ac_cv_member_struct_tm_tm_zone=yes
21126else
21127 echo "$as_me: failed program was:" >&5
19650fd6
AS
21128sed 's/^/| /' conftest.$ac_ext >&5
21129
973a76b1
DL
21130ac_cv_member_struct_tm_tm_zone=no
21131fi
edfaf76d 21132rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
973a76b1 21133fi
edfaf76d 21134rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
973a76b1
DL
21135fi
21136echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
21137echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
21138if test $ac_cv_member_struct_tm_tm_zone = yes; then
21139
21140cat >>confdefs.h <<_ACEOF
21141#define HAVE_STRUCT_TM_TM_ZONE 1
21142_ACEOF
21143
21144
21145fi
21146
21147if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
21148
21149cat >>confdefs.h <<\_ACEOF
21150#define HAVE_TM_ZONE 1
21151_ACEOF
21152
21153else
21154 echo "$as_me:$LINENO: checking for tzname" >&5
21155echo $ECHO_N "checking for tzname... $ECHO_C" >&6
21156if test "${ac_cv_var_tzname+set}" = set; then
21157 echo $ECHO_N "(cached) $ECHO_C" >&6
21158else
21159 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21160/* confdefs.h. */
21161_ACEOF
21162cat confdefs.h >>conftest.$ac_ext
21163cat >>conftest.$ac_ext <<_ACEOF
21164/* end confdefs.h. */
973a76b1
DL
21165#include <time.h>
21166#ifndef tzname /* For SGI. */
21167extern char *tzname[]; /* RS6000 and others reject char **tzname. */
21168#endif
21169
21170int
21171main ()
21172{
21173atoi(*tzname);
21174 ;
21175 return 0;
21176}
21177_ACEOF
21178rm -f conftest.$ac_objext conftest$ac_exeext
21179if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 21180 (eval $ac_link) 2>conftest.er1
973a76b1 21181 ac_status=$?
edfaf76d
LK
21182 grep -v '^ *+' conftest.er1 >conftest.err
21183 rm -f conftest.er1
21184 cat conftest.err >&5
973a76b1
DL
21185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21186 (exit $ac_status); } &&
ec8fcb10
YM
21187 { ac_try='test -z "$ac_c_werror_flag"
21188 || test ! -s conftest.err'
edfaf76d
LK
21189 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21190 (eval $ac_try) 2>&5
21191 ac_status=$?
21192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21193 (exit $ac_status); }; } &&
21194 { ac_try='test -s conftest$ac_exeext'
973a76b1
DL
21195 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21196 (eval $ac_try) 2>&5
21197 ac_status=$?
21198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21199 (exit $ac_status); }; }; then
21200 ac_cv_var_tzname=yes
21201else
21202 echo "$as_me: failed program was:" >&5
19650fd6
AS
21203sed 's/^/| /' conftest.$ac_ext >&5
21204
973a76b1
DL
21205ac_cv_var_tzname=no
21206fi
edfaf76d
LK
21207rm -f conftest.err conftest.$ac_objext \
21208 conftest$ac_exeext conftest.$ac_ext
973a76b1
DL
21209fi
21210echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
21211echo "${ECHO_T}$ac_cv_var_tzname" >&6
21212 if test $ac_cv_var_tzname = yes; then
21213
21214cat >>confdefs.h <<\_ACEOF
21215#define HAVE_TZNAME 1
21216_ACEOF
21217
21218 fi
21219fi
21220
21221
48d4b120 21222if test "$ac_cv_func_gettimeofday" = yes; then
c0d27fcc 21223 echo "$as_me:$LINENO: checking for struct timezone" >&5
503d2be0
AS
21224echo $ECHO_N "checking for struct timezone... $ECHO_C" >&6
21225if test "${emacs_cv_struct_timezone+set}" = set; then
21226 echo $ECHO_N "(cached) $ECHO_C" >&6
48d4b120 21227else
503d2be0 21228 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21229/* confdefs.h. */
21230_ACEOF
21231cat confdefs.h >>conftest.$ac_ext
21232cat >>conftest.$ac_ext <<_ACEOF
21233/* end confdefs.h. */
48d4b120 21234#include <sys/time.h>
503d2be0
AS
21235int
21236main ()
21237{
48d4b120 21238struct timezone tz;
503d2be0
AS
21239 ;
21240 return 0;
21241}
21242_ACEOF
21243rm -f conftest.$ac_objext
c0d27fcc 21244if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 21245 (eval $ac_compile) 2>conftest.er1
503d2be0 21246 ac_status=$?
edfaf76d
LK
21247 grep -v '^ *+' conftest.er1 >conftest.err
21248 rm -f conftest.er1
21249 cat conftest.err >&5
c0d27fcc 21250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21251 (exit $ac_status); } &&
ec8fcb10
YM
21252 { ac_try='test -z "$ac_c_werror_flag"
21253 || test ! -s conftest.err'
edfaf76d
LK
21254 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21255 (eval $ac_try) 2>&5
21256 ac_status=$?
21257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21258 (exit $ac_status); }; } &&
21259 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 21260 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
21261 (eval $ac_try) 2>&5
21262 ac_status=$?
c0d27fcc 21263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21264 (exit $ac_status); }; }; then
48d4b120
DL
21265 if test "$cross_compiling" = yes; then
21266 emacs_cv_struct_timezone=yes
21267else
503d2be0 21268 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21269/* confdefs.h. */
21270_ACEOF
21271cat confdefs.h >>conftest.$ac_ext
21272cat >>conftest.$ac_ext <<_ACEOF
21273/* end confdefs.h. */
48d4b120
DL
21274
21275#ifdef TIME_WITH_SYS_TIME
21276#include <sys/time.h>
21277#include <time.h>
21278#else
21279#ifdef HAVE_SYS_TIME_H
21280#include <sys/time.h>
21281#else
21282#include <time.h>
21283#endif
21284#endif
21285main () {
21286 struct timeval time;
21287 struct timezone dummy;
21288 exit (gettimeofday (&time, &dummy));
21289}
503d2be0
AS
21290_ACEOF
21291rm -f conftest$ac_exeext
c0d27fcc 21292if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
21293 (eval $ac_link) 2>&5
21294 ac_status=$?
c0d27fcc 21295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21296 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 21297 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
21298 (eval $ac_try) 2>&5
21299 ac_status=$?
c0d27fcc 21300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21301 (exit $ac_status); }; }; then
48d4b120
DL
21302 emacs_cv_struct_timezone=yes
21303else
503d2be0
AS
21304 echo "$as_me: program exited with status $ac_status" >&5
21305echo "$as_me: failed program was:" >&5
19650fd6
AS
21306sed 's/^/| /' conftest.$ac_ext >&5
21307
c0d27fcc 21308( exit $ac_status )
503d2be0 21309emacs_cv_struct_timezone=no
48d4b120 21310fi
edfaf76d 21311rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
48d4b120 21312fi
48d4b120 21313else
503d2be0 21314 echo "$as_me: failed program was:" >&5
19650fd6
AS
21315sed 's/^/| /' conftest.$ac_ext >&5
21316
503d2be0 21317emacs_cv_struct_timezone=no
48d4b120 21318fi
edfaf76d 21319rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
48d4b120 21320fi
c0d27fcc 21321echo "$as_me:$LINENO: result: $emacs_cv_struct_timezone" >&5
503d2be0 21322echo "${ECHO_T}$emacs_cv_struct_timezone" >&6
48d4b120
DL
21323fi
21324
ba4481b5 21325ok_so_far=yes
c0d27fcc 21326echo "$as_me:$LINENO: checking for socket" >&5
503d2be0
AS
21327echo $ECHO_N "checking for socket... $ECHO_C" >&6
21328if test "${ac_cv_func_socket+set}" = set; then
21329 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 21330else
503d2be0 21331 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21332/* confdefs.h. */
21333_ACEOF
21334cat confdefs.h >>conftest.$ac_ext
21335cat >>conftest.$ac_ext <<_ACEOF
21336/* end confdefs.h. */
edfaf76d
LK
21337/* Define socket to an innocuous variant, in case <limits.h> declares socket.
21338 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21339#define socket innocuous_socket
21340
ba4481b5 21341/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
21342 which can conflict with char socket (); below.
21343 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
21344 <limits.h> exists even on freestanding compilers. */
edfaf76d 21345
19650fd6
AS
21346#ifdef __STDC__
21347# include <limits.h>
21348#else
21349# include <assert.h>
21350#endif
edfaf76d
LK
21351
21352#undef socket
21353
ba4481b5 21354/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
21355#ifdef __cplusplus
21356extern "C"
19650fd6 21357{
503d2be0 21358#endif
ba4481b5 21359/* We use char because int might match the return type of a gcc2
503d2be0
AS
21360 builtin and then its argument prototype would still apply. */
21361char socket ();
ba4481b5
DL
21362/* The GNU C library defines this for functions which it implements
21363 to always fail with ENOSYS. Some functions are actually named
21364 something starting with __ and the normal name is an alias. */
21365#if defined (__stub_socket) || defined (__stub___socket)
21366choke me
21367#else
19650fd6
AS
21368char (*f) () = socket;
21369#endif
21370#ifdef __cplusplus
21371}
cd958eb3
MB
21372#endif
21373
19650fd6
AS
21374int
21375main ()
21376{
21377return f != socket;
503d2be0
AS
21378 ;
21379 return 0;
21380}
21381_ACEOF
21382rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 21383if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 21384 (eval $ac_link) 2>conftest.er1
503d2be0 21385 ac_status=$?
edfaf76d
LK
21386 grep -v '^ *+' conftest.er1 >conftest.err
21387 rm -f conftest.er1
21388 cat conftest.err >&5
c0d27fcc 21389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21390 (exit $ac_status); } &&
ec8fcb10
YM
21391 { ac_try='test -z "$ac_c_werror_flag"
21392 || test ! -s conftest.err'
edfaf76d
LK
21393 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21394 (eval $ac_try) 2>&5
21395 ac_status=$?
21396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21397 (exit $ac_status); }; } &&
21398 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 21399 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
21400 (eval $ac_try) 2>&5
21401 ac_status=$?
c0d27fcc 21402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
21403 (exit $ac_status); }; }; then
21404 ac_cv_func_socket=yes
21405else
21406 echo "$as_me: failed program was:" >&5
19650fd6
AS
21407sed 's/^/| /' conftest.$ac_ext >&5
21408
503d2be0
AS
21409ac_cv_func_socket=no
21410fi
edfaf76d
LK
21411rm -f conftest.err conftest.$ac_objext \
21412 conftest$ac_exeext conftest.$ac_ext
503d2be0 21413fi
c0d27fcc 21414echo "$as_me:$LINENO: result: $ac_cv_func_socket" >&5
503d2be0
AS
21415echo "${ECHO_T}$ac_cv_func_socket" >&6
21416if test $ac_cv_func_socket = yes; then
ba4481b5
DL
21417 :
21418else
503d2be0 21419 ok_so_far=no
ba4481b5
DL
21420fi
21421
21422if test $ok_so_far = yes; then
c0d27fcc
MR
21423 if test "${ac_cv_header_netinet_in_h+set}" = set; then
21424 echo "$as_me:$LINENO: checking for netinet/in.h" >&5
503d2be0
AS
21425echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6
21426if test "${ac_cv_header_netinet_in_h+set}" = set; then
21427 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
21428fi
21429echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5
21430echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6
98418dba 21431else
c0d27fcc
MR
21432 # Is the header compilable?
21433echo "$as_me:$LINENO: checking netinet/in.h usability" >&5
21434echo $ECHO_N "checking netinet/in.h usability... $ECHO_C" >&6
21435cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21436/* confdefs.h. */
21437_ACEOF
21438cat confdefs.h >>conftest.$ac_ext
21439cat >>conftest.$ac_ext <<_ACEOF
21440/* end confdefs.h. */
c0d27fcc
MR
21441$ac_includes_default
21442#include <netinet/in.h>
21443_ACEOF
21444rm -f conftest.$ac_objext
21445if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 21446 (eval $ac_compile) 2>conftest.er1
c0d27fcc 21447 ac_status=$?
edfaf76d
LK
21448 grep -v '^ *+' conftest.er1 >conftest.err
21449 rm -f conftest.er1
21450 cat conftest.err >&5
c0d27fcc
MR
21451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21452 (exit $ac_status); } &&
ec8fcb10
YM
21453 { ac_try='test -z "$ac_c_werror_flag"
21454 || test ! -s conftest.err'
edfaf76d
LK
21455 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21456 (eval $ac_try) 2>&5
21457 ac_status=$?
21458 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21459 (exit $ac_status); }; } &&
21460 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
21461 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21462 (eval $ac_try) 2>&5
21463 ac_status=$?
21464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21465 (exit $ac_status); }; }; then
21466 ac_header_compiler=yes
21467else
21468 echo "$as_me: failed program was:" >&5
19650fd6
AS
21469sed 's/^/| /' conftest.$ac_ext >&5
21470
c0d27fcc
MR
21471ac_header_compiler=no
21472fi
edfaf76d 21473rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
21474echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21475echo "${ECHO_T}$ac_header_compiler" >&6
21476
21477# Is the header present?
21478echo "$as_me:$LINENO: checking netinet/in.h presence" >&5
21479echo $ECHO_N "checking netinet/in.h presence... $ECHO_C" >&6
21480cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21481/* confdefs.h. */
21482_ACEOF
21483cat confdefs.h >>conftest.$ac_ext
21484cat >>conftest.$ac_ext <<_ACEOF
21485/* end confdefs.h. */
ba4481b5 21486#include <netinet/in.h>
503d2be0 21487_ACEOF
c0d27fcc 21488if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
21489 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21490 ac_status=$?
6bae0ccf 21491 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21492 rm -f conftest.er1
21493 cat conftest.err >&5
c0d27fcc 21494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
21495 (exit $ac_status); } >/dev/null; then
21496 if test -s conftest.err; then
21497 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 21498 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
21499 else
21500 ac_cpp_err=
21501 fi
21502else
21503 ac_cpp_err=yes
21504fi
21505if test -z "$ac_cpp_err"; then
c0d27fcc 21506 ac_header_preproc=yes
ba4481b5 21507else
503d2be0 21508 echo "$as_me: failed program was:" >&5
19650fd6
AS
21509sed 's/^/| /' conftest.$ac_ext >&5
21510
c0d27fcc 21511 ac_header_preproc=no
ba4481b5 21512fi
503d2be0 21513rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
21514echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21515echo "${ECHO_T}$ac_header_preproc" >&6
21516
21517# So? What about this header?
edfaf76d
LK
21518case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21519 yes:no: )
c0d27fcc
MR
21520 { echo "$as_me:$LINENO: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&5
21521echo "$as_me: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21522 { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the compiler's result" >&5
21523echo "$as_me: WARNING: netinet/in.h: proceeding with the compiler's result" >&2;}
21524 ac_header_preproc=yes
19650fd6 21525 ;;
edfaf76d 21526 no:yes:* )
c0d27fcc
MR
21527 { echo "$as_me:$LINENO: WARNING: netinet/in.h: present but cannot be compiled" >&5
21528echo "$as_me: WARNING: netinet/in.h: present but cannot be compiled" >&2;}
edfaf76d
LK
21529 { echo "$as_me:$LINENO: WARNING: netinet/in.h: check for missing prerequisite headers?" >&5
21530echo "$as_me: WARNING: netinet/in.h: check for missing prerequisite headers?" >&2;}
21531 { echo "$as_me:$LINENO: WARNING: netinet/in.h: see the Autoconf documentation" >&5
21532echo "$as_me: WARNING: netinet/in.h: see the Autoconf documentation" >&2;}
21533 { echo "$as_me:$LINENO: WARNING: netinet/in.h: section \"Present But Cannot Be Compiled\"" >&5
21534echo "$as_me: WARNING: netinet/in.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21535 { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&5
19650fd6 21536echo "$as_me: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21537 { echo "$as_me:$LINENO: WARNING: netinet/in.h: in the future, the compiler will take precedence" >&5
21538echo "$as_me: WARNING: netinet/in.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
21539 (
21540 cat <<\_ASBOX
edfaf76d
LK
21541## ------------------------------------------ ##
21542## Report this to the AC_PACKAGE_NAME lists. ##
21543## ------------------------------------------ ##
19650fd6
AS
21544_ASBOX
21545 ) |
21546 sed "s/^/$as_me: WARNING: /" >&2
21547 ;;
c0d27fcc
MR
21548esac
21549echo "$as_me:$LINENO: checking for netinet/in.h" >&5
21550echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6
21551if test "${ac_cv_header_netinet_in_h+set}" = set; then
21552 echo $ECHO_N "(cached) $ECHO_C" >&6
21553else
21554 ac_cv_header_netinet_in_h=$ac_header_preproc
ba4481b5 21555fi
c0d27fcc 21556echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5
503d2be0 21557echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6
c0d27fcc
MR
21558
21559fi
503d2be0 21560if test $ac_cv_header_netinet_in_h = yes; then
ba4481b5
DL
21561 :
21562else
503d2be0 21563 ok_so_far=no
ba4481b5
DL
21564fi
21565
c0d27fcc 21566
ba4481b5
DL
21567fi
21568if test $ok_so_far = yes; then
c0d27fcc
MR
21569 if test "${ac_cv_header_arpa_inet_h+set}" = set; then
21570 echo "$as_me:$LINENO: checking for arpa/inet.h" >&5
503d2be0
AS
21571echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6
21572if test "${ac_cv_header_arpa_inet_h+set}" = set; then
21573 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
21574fi
21575echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5
21576echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6
98418dba 21577else
c0d27fcc
MR
21578 # Is the header compilable?
21579echo "$as_me:$LINENO: checking arpa/inet.h usability" >&5
21580echo $ECHO_N "checking arpa/inet.h usability... $ECHO_C" >&6
21581cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21582/* confdefs.h. */
21583_ACEOF
21584cat confdefs.h >>conftest.$ac_ext
21585cat >>conftest.$ac_ext <<_ACEOF
21586/* end confdefs.h. */
c0d27fcc
MR
21587$ac_includes_default
21588#include <arpa/inet.h>
21589_ACEOF
21590rm -f conftest.$ac_objext
21591if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 21592 (eval $ac_compile) 2>conftest.er1
c0d27fcc 21593 ac_status=$?
edfaf76d
LK
21594 grep -v '^ *+' conftest.er1 >conftest.err
21595 rm -f conftest.er1
21596 cat conftest.err >&5
c0d27fcc
MR
21597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21598 (exit $ac_status); } &&
ec8fcb10
YM
21599 { ac_try='test -z "$ac_c_werror_flag"
21600 || test ! -s conftest.err'
edfaf76d
LK
21601 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21602 (eval $ac_try) 2>&5
21603 ac_status=$?
21604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21605 (exit $ac_status); }; } &&
21606 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
21607 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21608 (eval $ac_try) 2>&5
21609 ac_status=$?
21610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21611 (exit $ac_status); }; }; then
21612 ac_header_compiler=yes
21613else
21614 echo "$as_me: failed program was:" >&5
19650fd6
AS
21615sed 's/^/| /' conftest.$ac_ext >&5
21616
c0d27fcc
MR
21617ac_header_compiler=no
21618fi
edfaf76d 21619rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
21620echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21621echo "${ECHO_T}$ac_header_compiler" >&6
21622
21623# Is the header present?
21624echo "$as_me:$LINENO: checking arpa/inet.h presence" >&5
21625echo $ECHO_N "checking arpa/inet.h presence... $ECHO_C" >&6
21626cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21627/* confdefs.h. */
21628_ACEOF
21629cat confdefs.h >>conftest.$ac_ext
21630cat >>conftest.$ac_ext <<_ACEOF
21631/* end confdefs.h. */
ba4481b5 21632#include <arpa/inet.h>
503d2be0 21633_ACEOF
c0d27fcc 21634if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
21635 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21636 ac_status=$?
6bae0ccf 21637 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21638 rm -f conftest.er1
21639 cat conftest.err >&5
c0d27fcc 21640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
21641 (exit $ac_status); } >/dev/null; then
21642 if test -s conftest.err; then
21643 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 21644 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
21645 else
21646 ac_cpp_err=
21647 fi
21648else
21649 ac_cpp_err=yes
21650fi
21651if test -z "$ac_cpp_err"; then
c0d27fcc 21652 ac_header_preproc=yes
ba4481b5 21653else
503d2be0 21654 echo "$as_me: failed program was:" >&5
19650fd6
AS
21655sed 's/^/| /' conftest.$ac_ext >&5
21656
c0d27fcc 21657 ac_header_preproc=no
ba4481b5 21658fi
503d2be0 21659rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
21660echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21661echo "${ECHO_T}$ac_header_preproc" >&6
21662
21663# So? What about this header?
edfaf76d
LK
21664case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21665 yes:no: )
c0d27fcc
MR
21666 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&5
21667echo "$as_me: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21668 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the compiler's result" >&5
21669echo "$as_me: WARNING: arpa/inet.h: proceeding with the compiler's result" >&2;}
21670 ac_header_preproc=yes
19650fd6 21671 ;;
edfaf76d 21672 no:yes:* )
c0d27fcc
MR
21673 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: present but cannot be compiled" >&5
21674echo "$as_me: WARNING: arpa/inet.h: present but cannot be compiled" >&2;}
edfaf76d
LK
21675 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: check for missing prerequisite headers?" >&5
21676echo "$as_me: WARNING: arpa/inet.h: check for missing prerequisite headers?" >&2;}
21677 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: see the Autoconf documentation" >&5
21678echo "$as_me: WARNING: arpa/inet.h: see the Autoconf documentation" >&2;}
21679 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: section \"Present But Cannot Be Compiled\"" >&5
21680echo "$as_me: WARNING: arpa/inet.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21681 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&5
19650fd6 21682echo "$as_me: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21683 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: in the future, the compiler will take precedence" >&5
21684echo "$as_me: WARNING: arpa/inet.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
21685 (
21686 cat <<\_ASBOX
edfaf76d
LK
21687## ------------------------------------------ ##
21688## Report this to the AC_PACKAGE_NAME lists. ##
21689## ------------------------------------------ ##
19650fd6
AS
21690_ASBOX
21691 ) |
21692 sed "s/^/$as_me: WARNING: /" >&2
21693 ;;
c0d27fcc
MR
21694esac
21695echo "$as_me:$LINENO: checking for arpa/inet.h" >&5
21696echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6
21697if test "${ac_cv_header_arpa_inet_h+set}" = set; then
21698 echo $ECHO_N "(cached) $ECHO_C" >&6
21699else
21700 ac_cv_header_arpa_inet_h=$ac_header_preproc
ba4481b5 21701fi
c0d27fcc 21702echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5
503d2be0 21703echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6
c0d27fcc
MR
21704
21705fi
503d2be0 21706if test $ac_cv_header_arpa_inet_h = yes; then
ba4481b5
DL
21707 :
21708else
503d2be0 21709 ok_so_far=no
ba4481b5
DL
21710fi
21711
c0d27fcc 21712
ba4481b5
DL
21713fi
21714if test $ok_so_far = yes; then
b936fae4 21715
c0d27fcc 21716cat >>confdefs.h <<\_ACEOF
ba4481b5 21717#define HAVE_INET_SOCKETS 1
c0d27fcc 21718_ACEOF
ba4481b5
DL
21719
21720fi
21721
2d2b6695 21722
7862d3a8 21723for ac_header in sys/ioctl.h
2d2b6695
KS
21724do
21725as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
21726if eval "test \"\${$as_ac_Header+set}\" = set"; then
21727 echo "$as_me:$LINENO: checking for $ac_header" >&5
21728echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21729if eval "test \"\${$as_ac_Header+set}\" = set"; then
21730 echo $ECHO_N "(cached) $ECHO_C" >&6
21731fi
21732echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
21733echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
21734else
21735 # Is the header compilable?
21736echo "$as_me:$LINENO: checking $ac_header usability" >&5
21737echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
21738cat >conftest.$ac_ext <<_ACEOF
2d2b6695
KS
21739/* confdefs.h. */
21740_ACEOF
21741cat confdefs.h >>conftest.$ac_ext
21742cat >>conftest.$ac_ext <<_ACEOF
21743/* end confdefs.h. */
21744$ac_includes_default
21745#include <$ac_header>
21746_ACEOF
21747rm -f conftest.$ac_objext
21748if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 21749 (eval $ac_compile) 2>conftest.er1
2d2b6695 21750 ac_status=$?
edfaf76d
LK
21751 grep -v '^ *+' conftest.er1 >conftest.err
21752 rm -f conftest.er1
21753 cat conftest.err >&5
2d2b6695
KS
21754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21755 (exit $ac_status); } &&
ec8fcb10
YM
21756 { ac_try='test -z "$ac_c_werror_flag"
21757 || test ! -s conftest.err'
edfaf76d
LK
21758 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21759 (eval $ac_try) 2>&5
21760 ac_status=$?
21761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21762 (exit $ac_status); }; } &&
21763 { ac_try='test -s conftest.$ac_objext'
2d2b6695
KS
21764 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21765 (eval $ac_try) 2>&5
21766 ac_status=$?
21767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21768 (exit $ac_status); }; }; then
21769 ac_header_compiler=yes
21770else
21771 echo "$as_me: failed program was:" >&5
21772sed 's/^/| /' conftest.$ac_ext >&5
21773
21774ac_header_compiler=no
21775fi
edfaf76d 21776rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2d2b6695
KS
21777echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21778echo "${ECHO_T}$ac_header_compiler" >&6
21779
21780# Is the header present?
21781echo "$as_me:$LINENO: checking $ac_header presence" >&5
21782echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
21783cat >conftest.$ac_ext <<_ACEOF
2d2b6695
KS
21784/* confdefs.h. */
21785_ACEOF
21786cat confdefs.h >>conftest.$ac_ext
21787cat >>conftest.$ac_ext <<_ACEOF
21788/* end confdefs.h. */
21789#include <$ac_header>
21790_ACEOF
21791if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
21792 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21793 ac_status=$?
21794 grep -v '^ *+' conftest.er1 >conftest.err
21795 rm -f conftest.er1
21796 cat conftest.err >&5
21797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21798 (exit $ac_status); } >/dev/null; then
21799 if test -s conftest.err; then
21800 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 21801 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2d2b6695
KS
21802 else
21803 ac_cpp_err=
21804 fi
21805else
21806 ac_cpp_err=yes
21807fi
21808if test -z "$ac_cpp_err"; then
21809 ac_header_preproc=yes
21810else
21811 echo "$as_me: failed program was:" >&5
21812sed 's/^/| /' conftest.$ac_ext >&5
21813
21814 ac_header_preproc=no
21815fi
21816rm -f conftest.err conftest.$ac_ext
21817echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21818echo "${ECHO_T}$ac_header_preproc" >&6
21819
21820# So? What about this header?
edfaf76d
LK
21821case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21822 yes:no: )
2d2b6695
KS
21823 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21824echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21825 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21826echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21827 ac_header_preproc=yes
2d2b6695 21828 ;;
edfaf76d 21829 no:yes:* )
2d2b6695
KS
21830 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21831echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21832 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21833echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21834 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21835echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21836 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21837echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
2d2b6695
KS
21838 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
21839echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21840 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21841echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
2d2b6695
KS
21842 (
21843 cat <<\_ASBOX
edfaf76d
LK
21844## ------------------------------------------ ##
21845## Report this to the AC_PACKAGE_NAME lists. ##
21846## ------------------------------------------ ##
2d2b6695
KS
21847_ASBOX
21848 ) |
21849 sed "s/^/$as_me: WARNING: /" >&2
21850 ;;
21851esac
21852echo "$as_me:$LINENO: checking for $ac_header" >&5
21853echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21854if eval "test \"\${$as_ac_Header+set}\" = set"; then
21855 echo $ECHO_N "(cached) $ECHO_C" >&6
21856else
edfaf76d 21857 eval "$as_ac_Header=\$ac_header_preproc"
2d2b6695
KS
21858fi
21859echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
21860echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
21861
21862fi
21863if test `eval echo '${'$as_ac_Header'}'` = yes; then
21864 cat >>confdefs.h <<_ACEOF
21865#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
21866_ACEOF
21867
21868fi
21869
21870done
21871
21872
ba4481b5 21873if test -f /usr/lpp/X11/bin/smt.exp; then
b936fae4 21874
c0d27fcc 21875cat >>confdefs.h <<\_ACEOF
ba4481b5 21876#define HAVE_AIX_SMT_EXP 1
c0d27fcc 21877_ACEOF
ba4481b5
DL
21878
21879fi
21880
c0d27fcc 21881echo "$as_me:$LINENO: checking whether system supports dynamic ptys" >&5
503d2be0 21882echo $ECHO_N "checking whether system supports dynamic ptys... $ECHO_C" >&6
3d9fec71 21883if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then
c0d27fcc 21884 echo "$as_me:$LINENO: result: yes" >&5
503d2be0 21885echo "${ECHO_T}yes" >&6
b936fae4 21886
c0d27fcc 21887cat >>confdefs.h <<\_ACEOF
3d9fec71 21888#define HAVE_DEV_PTMX 1
c0d27fcc 21889_ACEOF
3d9fec71
DL
21890
21891else
c0d27fcc 21892 echo "$as_me:$LINENO: result: no" >&5
503d2be0 21893echo "${ECHO_T}no" >&6
3d9fec71
DL
21894fi
21895
c0d27fcc 21896echo "$as_me:$LINENO: checking for pid_t" >&5
503d2be0
AS
21897echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
21898if test "${ac_cv_type_pid_t+set}" = set; then
21899 echo $ECHO_N "(cached) $ECHO_C" >&6
647847ea 21900else
503d2be0 21901 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21902/* confdefs.h. */
21903_ACEOF
21904cat confdefs.h >>conftest.$ac_ext
21905cat >>conftest.$ac_ext <<_ACEOF
21906/* end confdefs.h. */
503d2be0
AS
21907$ac_includes_default
21908int
21909main ()
21910{
21911if ((pid_t *) 0)
21912 return 0;
21913if (sizeof (pid_t))
21914 return 0;
21915 ;
21916 return 0;
21917}
21918_ACEOF
21919rm -f conftest.$ac_objext
c0d27fcc 21920if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 21921 (eval $ac_compile) 2>conftest.er1
503d2be0 21922 ac_status=$?
edfaf76d
LK
21923 grep -v '^ *+' conftest.er1 >conftest.err
21924 rm -f conftest.er1
21925 cat conftest.err >&5
c0d27fcc 21926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21927 (exit $ac_status); } &&
ec8fcb10
YM
21928 { ac_try='test -z "$ac_c_werror_flag"
21929 || test ! -s conftest.err'
edfaf76d
LK
21930 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21931 (eval $ac_try) 2>&5
21932 ac_status=$?
21933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21934 (exit $ac_status); }; } &&
21935 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 21936 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
21937 (eval $ac_try) 2>&5
21938 ac_status=$?
c0d27fcc 21939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21940 (exit $ac_status); }; }; then
647847ea
DL
21941 ac_cv_type_pid_t=yes
21942else
503d2be0 21943 echo "$as_me: failed program was:" >&5
19650fd6
AS
21944sed 's/^/| /' conftest.$ac_ext >&5
21945
503d2be0 21946ac_cv_type_pid_t=no
647847ea 21947fi
edfaf76d 21948rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
647847ea 21949fi
c0d27fcc 21950echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
503d2be0
AS
21951echo "${ECHO_T}$ac_cv_type_pid_t" >&6
21952if test $ac_cv_type_pid_t = yes; then
21953 :
21954else
21955
c0d27fcc 21956cat >>confdefs.h <<_ACEOF
647847ea 21957#define pid_t int
c0d27fcc 21958_ACEOF
647847ea
DL
21959
21960fi
21961
c0d27fcc
MR
21962
21963
503d2be0
AS
21964for ac_header in unistd.h vfork.h
21965do
21966as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
21967if eval "test \"\${$as_ac_Header+set}\" = set"; then
21968 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
21969echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21970if eval "test \"\${$as_ac_Header+set}\" = set"; then
21971 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
21972fi
21973echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
21974echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 21975else
c0d27fcc
MR
21976 # Is the header compilable?
21977echo "$as_me:$LINENO: checking $ac_header usability" >&5
21978echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
21979cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21980/* confdefs.h. */
21981_ACEOF
21982cat confdefs.h >>conftest.$ac_ext
21983cat >>conftest.$ac_ext <<_ACEOF
21984/* end confdefs.h. */
c0d27fcc
MR
21985$ac_includes_default
21986#include <$ac_header>
21987_ACEOF
21988rm -f conftest.$ac_objext
21989if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 21990 (eval $ac_compile) 2>conftest.er1
c0d27fcc 21991 ac_status=$?
edfaf76d
LK
21992 grep -v '^ *+' conftest.er1 >conftest.err
21993 rm -f conftest.er1
21994 cat conftest.err >&5
c0d27fcc
MR
21995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21996 (exit $ac_status); } &&
ec8fcb10
YM
21997 { ac_try='test -z "$ac_c_werror_flag"
21998 || test ! -s conftest.err'
edfaf76d
LK
21999 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22000 (eval $ac_try) 2>&5
22001 ac_status=$?
22002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22003 (exit $ac_status); }; } &&
22004 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
22005 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22006 (eval $ac_try) 2>&5
22007 ac_status=$?
22008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22009 (exit $ac_status); }; }; then
22010 ac_header_compiler=yes
22011else
22012 echo "$as_me: failed program was:" >&5
19650fd6
AS
22013sed 's/^/| /' conftest.$ac_ext >&5
22014
c0d27fcc
MR
22015ac_header_compiler=no
22016fi
edfaf76d 22017rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
22018echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22019echo "${ECHO_T}$ac_header_compiler" >&6
22020
22021# Is the header present?
22022echo "$as_me:$LINENO: checking $ac_header presence" >&5
22023echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
22024cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22025/* confdefs.h. */
22026_ACEOF
22027cat confdefs.h >>conftest.$ac_ext
22028cat >>conftest.$ac_ext <<_ACEOF
22029/* end confdefs.h. */
503d2be0
AS
22030#include <$ac_header>
22031_ACEOF
c0d27fcc 22032if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
22033 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22034 ac_status=$?
6bae0ccf 22035 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
22036 rm -f conftest.er1
22037 cat conftest.err >&5
c0d27fcc 22038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
22039 (exit $ac_status); } >/dev/null; then
22040 if test -s conftest.err; then
22041 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 22042 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
22043 else
22044 ac_cpp_err=
22045 fi
647847ea 22046else
503d2be0
AS
22047 ac_cpp_err=yes
22048fi
22049if test -z "$ac_cpp_err"; then
c0d27fcc 22050 ac_header_preproc=yes
647847ea 22051else
503d2be0 22052 echo "$as_me: failed program was:" >&5
19650fd6
AS
22053sed 's/^/| /' conftest.$ac_ext >&5
22054
c0d27fcc 22055 ac_header_preproc=no
647847ea 22056fi
503d2be0 22057rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
22058echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22059echo "${ECHO_T}$ac_header_preproc" >&6
22060
22061# So? What about this header?
edfaf76d
LK
22062case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22063 yes:no: )
c0d27fcc
MR
22064 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
22065echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
22066 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
22067echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
22068 ac_header_preproc=yes
19650fd6 22069 ;;
edfaf76d 22070 no:yes:* )
c0d27fcc
MR
22071 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
22072echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
22073 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
22074echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
22075 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
22076echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
22077 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
22078echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 22079 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 22080echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
22081 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
22082echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
22083 (
22084 cat <<\_ASBOX
edfaf76d
LK
22085## ------------------------------------------ ##
22086## Report this to the AC_PACKAGE_NAME lists. ##
22087## ------------------------------------------ ##
19650fd6
AS
22088_ASBOX
22089 ) |
22090 sed "s/^/$as_me: WARNING: /" >&2
22091 ;;
c0d27fcc
MR
22092esac
22093echo "$as_me:$LINENO: checking for $ac_header" >&5
22094echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22095if eval "test \"\${$as_ac_Header+set}\" = set"; then
22096 echo $ECHO_N "(cached) $ECHO_C" >&6
22097else
edfaf76d 22098 eval "$as_ac_Header=\$ac_header_preproc"
647847ea 22099fi
c0d27fcc 22100echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 22101echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
22102
22103fi
503d2be0 22104if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 22105 cat >>confdefs.h <<_ACEOF
503d2be0 22106#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 22107_ACEOF
647847ea 22108
73b77ee5 22109fi
c0d27fcc 22110
503d2be0 22111done
73b77ee5 22112
c0d27fcc
MR
22113
22114
503d2be0
AS
22115for ac_func in fork vfork
22116do
22117as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 22118echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
22119echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
22120if eval "test \"\${$as_ac_var+set}\" = set"; then
22121 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 22122else
503d2be0 22123 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22124/* confdefs.h. */
22125_ACEOF
22126cat confdefs.h >>conftest.$ac_ext
22127cat >>conftest.$ac_ext <<_ACEOF
22128/* end confdefs.h. */
edfaf76d
LK
22129/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22130 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22131#define $ac_func innocuous_$ac_func
22132
fa0b693c 22133/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
22134 which can conflict with char $ac_func (); below.
22135 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22136 <limits.h> exists even on freestanding compilers. */
edfaf76d 22137
19650fd6
AS
22138#ifdef __STDC__
22139# include <limits.h>
22140#else
22141# include <assert.h>
22142#endif
edfaf76d
LK
22143
22144#undef $ac_func
22145
fa0b693c 22146/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
22147#ifdef __cplusplus
22148extern "C"
19650fd6 22149{
503d2be0 22150#endif
fa0b693c 22151/* We use char because int might match the return type of a gcc2
503d2be0
AS
22152 builtin and then its argument prototype would still apply. */
22153char $ac_func ();
fa0b693c
GM
22154/* The GNU C library defines this for functions which it implements
22155 to always fail with ENOSYS. Some functions are actually named
22156 something starting with __ and the normal name is an alias. */
503d2be0 22157#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
fa0b693c
GM
22158choke me
22159#else
19650fd6
AS
22160char (*f) () = $ac_func;
22161#endif
22162#ifdef __cplusplus
22163}
fa0b693c
GM
22164#endif
22165
19650fd6
AS
22166int
22167main ()
22168{
22169return f != $ac_func;
503d2be0
AS
22170 ;
22171 return 0;
22172}
22173_ACEOF
22174rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 22175if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 22176 (eval $ac_link) 2>conftest.er1
503d2be0 22177 ac_status=$?
edfaf76d
LK
22178 grep -v '^ *+' conftest.er1 >conftest.err
22179 rm -f conftest.er1
22180 cat conftest.err >&5
c0d27fcc 22181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 22182 (exit $ac_status); } &&
ec8fcb10
YM
22183 { ac_try='test -z "$ac_c_werror_flag"
22184 || test ! -s conftest.err'
edfaf76d
LK
22185 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22186 (eval $ac_try) 2>&5
22187 ac_status=$?
22188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22189 (exit $ac_status); }; } &&
22190 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 22191 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
22192 (eval $ac_try) 2>&5
22193 ac_status=$?
c0d27fcc 22194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
22195 (exit $ac_status); }; }; then
22196 eval "$as_ac_var=yes"
22197else
22198 echo "$as_me: failed program was:" >&5
19650fd6
AS
22199sed 's/^/| /' conftest.$ac_ext >&5
22200
503d2be0
AS
22201eval "$as_ac_var=no"
22202fi
edfaf76d
LK
22203rm -f conftest.err conftest.$ac_objext \
22204 conftest$ac_exeext conftest.$ac_ext
503d2be0 22205fi
c0d27fcc 22206echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
22207echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
22208if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 22209 cat >>confdefs.h <<_ACEOF
503d2be0 22210#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 22211_ACEOF
503d2be0 22212
fa0b693c 22213fi
503d2be0 22214done
fa0b693c 22215
503d2be0 22216if test "x$ac_cv_func_fork" = xyes; then
c0d27fcc 22217 echo "$as_me:$LINENO: checking for working fork" >&5
503d2be0
AS
22218echo $ECHO_N "checking for working fork... $ECHO_C" >&6
22219if test "${ac_cv_func_fork_works+set}" = set; then
22220 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 22221else
503d2be0
AS
22222 if test "$cross_compiling" = yes; then
22223 ac_cv_func_fork_works=cross
22224else
22225 cat >conftest.$ac_ext <<_ACEOF
4713fa76
CY
22226/* By Ruediger Kuhlmann. */
22227 #include <sys/types.h>
22228 #if HAVE_UNISTD_H
22229 # include <unistd.h>
22230 #endif
22231 /* Some systems only have a dummy stub for fork() */
22232 int main ()
22233 {
22234 if (fork() < 0)
22235 exit (1);
22236 exit (0);
22237 }
503d2be0
AS
22238_ACEOF
22239rm -f conftest$ac_exeext
c0d27fcc 22240if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
22241 (eval $ac_link) 2>&5
22242 ac_status=$?
c0d27fcc 22243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 22244 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 22245 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
22246 (eval $ac_try) 2>&5
22247 ac_status=$?
c0d27fcc 22248 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
22249 (exit $ac_status); }; }; then
22250 ac_cv_func_fork_works=yes
22251else
22252 echo "$as_me: program exited with status $ac_status" >&5
22253echo "$as_me: failed program was:" >&5
19650fd6
AS
22254sed 's/^/| /' conftest.$ac_ext >&5
22255
c0d27fcc 22256( exit $ac_status )
503d2be0
AS
22257ac_cv_func_fork_works=no
22258fi
edfaf76d 22259rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
22260fi
22261fi
c0d27fcc 22262echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
503d2be0
AS
22263echo "${ECHO_T}$ac_cv_func_fork_works" >&6
22264
6bae0ccf
DL
22265else
22266 ac_cv_func_fork_works=$ac_cv_func_fork
503d2be0
AS
22267fi
22268if test "x$ac_cv_func_fork_works" = xcross; then
22269 case $host in
22270 *-*-amigaos* | *-*-msdosdjgpp*)
22271 # Override, as these systems have only a dummy fork() stub
22272 ac_cv_func_fork_works=no
22273 ;;
22274 *)
22275 ac_cv_func_fork_works=yes
22276 ;;
22277 esac
c0d27fcc
MR
22278 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
22279echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
fa0b693c 22280fi
73b77ee5 22281ac_cv_func_vfork_works=$ac_cv_func_vfork
503d2be0 22282if test "x$ac_cv_func_vfork" = xyes; then
c0d27fcc 22283 echo "$as_me:$LINENO: checking for working vfork" >&5
503d2be0
AS
22284echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
22285if test "${ac_cv_func_vfork_works+set}" = set; then
22286 echo $ECHO_N "(cached) $ECHO_C" >&6
22287else
22288 if test "$cross_compiling" = yes; then
22289 ac_cv_func_vfork_works=cross
fa0b693c 22290else
503d2be0 22291 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22292/* confdefs.h. */
22293_ACEOF
22294cat confdefs.h >>conftest.$ac_ext
22295cat >>conftest.$ac_ext <<_ACEOF
22296/* end confdefs.h. */
73b77ee5
GM
22297/* Thanks to Paul Eggert for this test. */
22298#include <stdio.h>
19650fd6 22299#include <stdlib.h>
fa0b693c 22300#include <sys/types.h>
73b77ee5 22301#include <sys/stat.h>
19650fd6 22302#include <sys/wait.h>
503d2be0
AS
22303#if HAVE_UNISTD_H
22304# include <unistd.h>
73b77ee5 22305#endif
503d2be0
AS
22306#if HAVE_VFORK_H
22307# include <vfork.h>
73b77ee5
GM
22308#endif
22309/* On some sparc systems, changes by the child to local and incoming
503d2be0
AS
22310 argument registers are propagated back to the parent. The compiler
22311 is told about this with #include <vfork.h>, but some compilers
22312 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
22313 static variable whose address is put into a register that is
22314 clobbered by the vfork. */
19650fd6 22315static void
fa0b693c 22316#ifdef __cplusplus
73b77ee5 22317sparc_address_test (int arg)
503d2be0 22318# else
73b77ee5 22319sparc_address_test (arg) int arg;
fa0b693c 22320#endif
fa0b693c 22321{
73b77ee5
GM
22322 static pid_t child;
22323 if (!child) {
22324 child = vfork ();
22325 if (child < 0) {
22326 perror ("vfork");
22327 _exit(2);
22328 }
22329 if (!child) {
22330 arg = getpid();
22331 write(-1, "", 0);
22332 _exit (arg);
22333 }
22334 }
22335}
503d2be0
AS
22336
22337int
22338main ()
22339{
73b77ee5
GM
22340 pid_t parent = getpid ();
22341 pid_t child;
fa0b693c 22342
19650fd6 22343 sparc_address_test (0);
fa0b693c 22344
73b77ee5 22345 child = vfork ();
fa0b693c 22346
73b77ee5 22347 if (child == 0) {
503d2be0
AS
22348 /* Here is another test for sparc vfork register problems. This
22349 test uses lots of local variables, at least as many local
22350 variables as main has allocated so far including compiler
22351 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
22352 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
22353 reuse the register of parent for one of the local variables,
22354 since it will think that parent can't possibly be used any more
22355 in this routine. Assigning to the local variable will thus
22356 munge parent in the parent process. */
73b77ee5
GM
22357 pid_t
22358 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
22359 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
22360 /* Convince the compiler that p..p7 are live; otherwise, it might
22361 use the same hardware register for all 8 local variables. */
22362 if (p != p1 || p != p2 || p != p3 || p != p4
22363 || p != p5 || p != p6 || p != p7)
22364 _exit(1);
fa0b693c 22365
503d2be0
AS
22366 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
22367 from child file descriptors. If the child closes a descriptor
22368 before it execs or exits, this munges the parent's descriptor
22369 as well. Test for this by closing stdout in the child. */
73b77ee5
GM
22370 _exit(close(fileno(stdout)) != 0);
22371 } else {
22372 int status;
22373 struct stat st;
22374
22375 while (wait(&status) != child)
22376 ;
22377 exit(
22378 /* Was there some problem with vforking? */
22379 child < 0
22380
22381 /* Did the child fail? (This shouldn't happen.) */
22382 || status
22383
22384 /* Did the vfork/compiler bug occur? */
22385 || parent != getpid()
fa0b693c 22386
73b77ee5
GM
22387 /* Did the file descriptor bug occur? */
22388 || fstat(fileno(stdout), &st) != 0
22389 );
22390 }
22391}
503d2be0
AS
22392_ACEOF
22393rm -f conftest$ac_exeext
c0d27fcc 22394if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
22395 (eval $ac_link) 2>&5
22396 ac_status=$?
c0d27fcc 22397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 22398 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 22399 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
22400 (eval $ac_try) 2>&5
22401 ac_status=$?
c0d27fcc 22402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 22403 (exit $ac_status); }; }; then
73b77ee5 22404 ac_cv_func_vfork_works=yes
fa0b693c 22405else
503d2be0
AS
22406 echo "$as_me: program exited with status $ac_status" >&5
22407echo "$as_me: failed program was:" >&5
19650fd6
AS
22408sed 's/^/| /' conftest.$ac_ext >&5
22409
c0d27fcc 22410( exit $ac_status )
503d2be0
AS
22411ac_cv_func_vfork_works=no
22412fi
edfaf76d 22413rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fa0b693c 22414fi
fa0b693c 22415fi
c0d27fcc 22416echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
503d2be0 22417echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
fa0b693c 22418
503d2be0
AS
22419fi;
22420if test "x$ac_cv_func_fork_works" = xcross; then
edfaf76d 22421 ac_cv_func_vfork_works=$ac_cv_func_vfork
c0d27fcc
MR
22422 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
22423echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
fa0b693c
GM
22424fi
22425
503d2be0
AS
22426if test "x$ac_cv_func_vfork_works" = xyes; then
22427
c0d27fcc 22428cat >>confdefs.h <<\_ACEOF
503d2be0 22429#define HAVE_WORKING_VFORK 1
c0d27fcc 22430_ACEOF
503d2be0
AS
22431
22432else
22433
c0d27fcc 22434cat >>confdefs.h <<\_ACEOF
73b77ee5 22435#define vfork fork
c0d27fcc 22436_ACEOF
fa0b693c
GM
22437
22438fi
503d2be0
AS
22439if test "x$ac_cv_func_fork_works" = xyes; then
22440
c0d27fcc 22441cat >>confdefs.h <<\_ACEOF
503d2be0 22442#define HAVE_WORKING_FORK 1
c0d27fcc 22443_ACEOF
fa0b693c 22444
503d2be0 22445fi
647847ea 22446
c0d27fcc 22447
6a3a24fa
JD
22448echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5
22449echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
22450if test "${emacs_cv_langinfo_codeset+set}" = set; then
22451 echo $ECHO_N "(cached) $ECHO_C" >&6
22452else
22453 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22454/* confdefs.h. */
22455_ACEOF
22456cat confdefs.h >>conftest.$ac_ext
22457cat >>conftest.$ac_ext <<_ACEOF
22458/* end confdefs.h. */
6a3a24fa
JD
22459#include <langinfo.h>
22460int
22461main ()
22462{
22463char* cs = nl_langinfo(CODESET);
22464 ;
22465 return 0;
22466}
22467_ACEOF
22468rm -f conftest.$ac_objext conftest$ac_exeext
22469if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 22470 (eval $ac_link) 2>conftest.er1
6a3a24fa 22471 ac_status=$?
edfaf76d
LK
22472 grep -v '^ *+' conftest.er1 >conftest.err
22473 rm -f conftest.er1
22474 cat conftest.err >&5
6a3a24fa
JD
22475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22476 (exit $ac_status); } &&
ec8fcb10
YM
22477 { ac_try='test -z "$ac_c_werror_flag"
22478 || test ! -s conftest.err'
edfaf76d
LK
22479 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22480 (eval $ac_try) 2>&5
22481 ac_status=$?
22482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22483 (exit $ac_status); }; } &&
22484 { ac_try='test -s conftest$ac_exeext'
6a3a24fa
JD
22485 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22486 (eval $ac_try) 2>&5
22487 ac_status=$?
22488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22489 (exit $ac_status); }; }; then
22490 emacs_cv_langinfo_codeset=yes
22491else
22492 echo "$as_me: failed program was:" >&5
19650fd6
AS
22493sed 's/^/| /' conftest.$ac_ext >&5
22494
6a3a24fa
JD
22495emacs_cv_langinfo_codeset=no
22496fi
edfaf76d
LK
22497rm -f conftest.err conftest.$ac_objext \
22498 conftest$ac_exeext conftest.$ac_ext
6a3a24fa
JD
22499
22500fi
22501echo "$as_me:$LINENO: result: $emacs_cv_langinfo_codeset" >&5
22502echo "${ECHO_T}$emacs_cv_langinfo_codeset" >&6
22503if test $emacs_cv_langinfo_codeset = yes; then
22504
22505cat >>confdefs.h <<\_ACEOF
22506#define HAVE_LANGINFO_CODESET 1
22507_ACEOF
22508
22509fi
22510
c0d27fcc 22511echo "$as_me:$LINENO: checking for size_t" >&5
503d2be0
AS
22512echo $ECHO_N "checking for size_t... $ECHO_C" >&6
22513if test "${ac_cv_type_size_t+set}" = set; then
22514 echo $ECHO_N "(cached) $ECHO_C" >&6
8730a8da 22515else
503d2be0 22516 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22517/* confdefs.h. */
22518_ACEOF
22519cat confdefs.h >>conftest.$ac_ext
22520cat >>conftest.$ac_ext <<_ACEOF
22521/* end confdefs.h. */
503d2be0
AS
22522$ac_includes_default
22523int
22524main ()
22525{
22526if ((size_t *) 0)
22527 return 0;
22528if (sizeof (size_t))
22529 return 0;
22530 ;
22531 return 0;
22532}
22533_ACEOF
22534rm -f conftest.$ac_objext
c0d27fcc 22535if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 22536 (eval $ac_compile) 2>conftest.er1
503d2be0 22537 ac_status=$?
edfaf76d
LK
22538 grep -v '^ *+' conftest.er1 >conftest.err
22539 rm -f conftest.er1
22540 cat conftest.err >&5
c0d27fcc 22541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 22542 (exit $ac_status); } &&
ec8fcb10
YM
22543 { ac_try='test -z "$ac_c_werror_flag"
22544 || test ! -s conftest.err'
edfaf76d
LK
22545 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22546 (eval $ac_try) 2>&5
22547 ac_status=$?
22548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22549 (exit $ac_status); }; } &&
22550 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 22551 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
22552 (eval $ac_try) 2>&5
22553 ac_status=$?
c0d27fcc 22554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 22555 (exit $ac_status); }; }; then
8730a8da
DL
22556 ac_cv_type_size_t=yes
22557else
503d2be0 22558 echo "$as_me: failed program was:" >&5
19650fd6
AS
22559sed 's/^/| /' conftest.$ac_ext >&5
22560
503d2be0 22561ac_cv_type_size_t=no
8730a8da 22562fi
edfaf76d 22563rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8730a8da 22564fi
c0d27fcc 22565echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
503d2be0
AS
22566echo "${ECHO_T}$ac_cv_type_size_t" >&6
22567if test $ac_cv_type_size_t = yes; then
503d2be0 22568
c0d27fcc
MR
22569cat >>confdefs.h <<_ACEOF
22570#define HAVE_SIZE_T 1
22571_ACEOF
22572
8730a8da
DL
22573
22574fi
22575
c0d27fcc 22576
973a76b1
DL
22577echo "$as_me:$LINENO: checking for mbstate_t" >&5
22578echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6
22579if test "${ac_cv_type_mbstate_t+set}" = set; then
22580 echo $ECHO_N "(cached) $ECHO_C" >&6
22581else
22582 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22583/* confdefs.h. */
22584_ACEOF
22585cat confdefs.h >>conftest.$ac_ext
22586cat >>conftest.$ac_ext <<_ACEOF
22587/* end confdefs.h. */
973a76b1
DL
22588$ac_includes_default
22589# include <wchar.h>
22590int
22591main ()
22592{
22593mbstate_t x; return sizeof x;
22594 ;
22595 return 0;
22596}
22597_ACEOF
22598rm -f conftest.$ac_objext
22599if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 22600 (eval $ac_compile) 2>conftest.er1
973a76b1 22601 ac_status=$?
edfaf76d
LK
22602 grep -v '^ *+' conftest.er1 >conftest.err
22603 rm -f conftest.er1
22604 cat conftest.err >&5
973a76b1
DL
22605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22606 (exit $ac_status); } &&
ec8fcb10
YM
22607 { ac_try='test -z "$ac_c_werror_flag"
22608 || test ! -s conftest.err'
edfaf76d
LK
22609 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22610 (eval $ac_try) 2>&5
22611 ac_status=$?
22612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22613 (exit $ac_status); }; } &&
22614 { ac_try='test -s conftest.$ac_objext'
973a76b1
DL
22615 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22616 (eval $ac_try) 2>&5
22617 ac_status=$?
22618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22619 (exit $ac_status); }; }; then
22620 ac_cv_type_mbstate_t=yes
22621else
22622 echo "$as_me: failed program was:" >&5
19650fd6
AS
22623sed 's/^/| /' conftest.$ac_ext >&5
22624
973a76b1
DL
22625ac_cv_type_mbstate_t=no
22626fi
edfaf76d 22627rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
973a76b1
DL
22628fi
22629echo "$as_me:$LINENO: result: $ac_cv_type_mbstate_t" >&5
22630echo "${ECHO_T}$ac_cv_type_mbstate_t" >&6
22631 if test $ac_cv_type_mbstate_t = yes; then
22632
22633cat >>confdefs.h <<\_ACEOF
22634#define HAVE_MBSTATE_T 1
22635_ACEOF
22636
22637 else
22638
22639cat >>confdefs.h <<\_ACEOF
22640#define mbstate_t int
22641_ACEOF
22642
22643 fi
22644
22044edf
DL
22645echo "$as_me:$LINENO: checking for C restrict keyword" >&5
22646echo $ECHO_N "checking for C restrict keyword... $ECHO_C" >&6
22647if test "${emacs_cv_c_restrict+set}" = set; then
22648 echo $ECHO_N "(cached) $ECHO_C" >&6
22649else
22650 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22651/* confdefs.h. */
22652_ACEOF
22653cat confdefs.h >>conftest.$ac_ext
22654cat >>conftest.$ac_ext <<_ACEOF
22655/* end confdefs.h. */
22044edf
DL
22656void fred (int *restrict x);
22657int
22658main ()
22659{
b936fae4 22660
22044edf
DL
22661 ;
22662 return 0;
22663}
c0d27fcc 22664_ACEOF
22044edf
DL
22665rm -f conftest.$ac_objext
22666if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 22667 (eval $ac_compile) 2>conftest.er1
22044edf 22668 ac_status=$?
edfaf76d
LK
22669 grep -v '^ *+' conftest.er1 >conftest.err
22670 rm -f conftest.er1
22671 cat conftest.err >&5
22044edf
DL
22672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22673 (exit $ac_status); } &&
ec8fcb10
YM
22674 { ac_try='test -z "$ac_c_werror_flag"
22675 || test ! -s conftest.err'
edfaf76d
LK
22676 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22677 (eval $ac_try) 2>&5
22678 ac_status=$?
22679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22680 (exit $ac_status); }; } &&
22681 { ac_try='test -s conftest.$ac_objext'
22044edf
DL
22682 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22683 (eval $ac_try) 2>&5
22684 ac_status=$?
22685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22686 (exit $ac_status); }; }; then
22687 emacs_cv_c_restrict=yes
22688else
22689 echo "$as_me: failed program was:" >&5
19650fd6
AS
22690sed 's/^/| /' conftest.$ac_ext >&5
22691
22044edf 22692cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22693/* confdefs.h. */
22694_ACEOF
22695cat confdefs.h >>conftest.$ac_ext
22696cat >>conftest.$ac_ext <<_ACEOF
22697/* end confdefs.h. */
22044edf
DL
22698void fred (int *__restrict x);
22699int
22700main ()
22701{
c0d27fcc 22702
22044edf
DL
22703 ;
22704 return 0;
22705}
c0d27fcc 22706_ACEOF
22044edf
DL
22707rm -f conftest.$ac_objext
22708if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 22709 (eval $ac_compile) 2>conftest.er1
22044edf 22710 ac_status=$?
edfaf76d
LK
22711 grep -v '^ *+' conftest.er1 >conftest.err
22712 rm -f conftest.er1
22713 cat conftest.err >&5
22044edf
DL
22714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22715 (exit $ac_status); } &&
ec8fcb10
YM
22716 { ac_try='test -z "$ac_c_werror_flag"
22717 || test ! -s conftest.err'
edfaf76d
LK
22718 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22719 (eval $ac_try) 2>&5
22720 ac_status=$?
22721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22722 (exit $ac_status); }; } &&
22723 { ac_try='test -s conftest.$ac_objext'
22044edf
DL
22724 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22725 (eval $ac_try) 2>&5
22726 ac_status=$?
22727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22728 (exit $ac_status); }; }; then
22729 emacs_cv_c_restrict=__restrict
22730else
22731 echo "$as_me: failed program was:" >&5
19650fd6
AS
22732sed 's/^/| /' conftest.$ac_ext >&5
22733
22044edf 22734emacs_cv_c_restrict=no
ba4481b5 22735fi
edfaf76d 22736rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 22737fi
edfaf76d 22738rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 22739fi
22044edf
DL
22740echo "$as_me:$LINENO: result: $emacs_cv_c_restrict" >&5
22741echo "${ECHO_T}$emacs_cv_c_restrict" >&6
22742case "$emacs_cv_c_restrict" in
22743 yes) emacs_restrict=restrict;;
22744 no) emacs_restrict="";;
22745 *) emacs_restrict="$emacs_cv_c_restrict";;
22746esac
22747if test "$emacs_restrict" != __restrict; then
b936fae4 22748
22044edf
DL
22749cat >>confdefs.h <<_ACEOF
22750#define __restrict $emacs_restrict
c0d27fcc 22751_ACEOF
ba4481b5
DL
22752
22753fi
ba4481b5 22754
22044edf
DL
22755echo "$as_me:$LINENO: checking for C restricted array declarations" >&5
22756echo $ECHO_N "checking for C restricted array declarations... $ECHO_C" >&6
22757if test "${emacs_cv_c_restrict_arr+set}" = set; then
22758 echo $ECHO_N "(cached) $ECHO_C" >&6
22759else
22760 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22761/* confdefs.h. */
22762_ACEOF
22763cat confdefs.h >>conftest.$ac_ext
22764cat >>conftest.$ac_ext <<_ACEOF
22765/* end confdefs.h. */
22044edf
DL
22766void fred (int x[__restrict]);
22767int
22768main ()
22769{
b936fae4 22770
22044edf
DL
22771 ;
22772 return 0;
22773}
c0d27fcc 22774_ACEOF
22044edf
DL
22775rm -f conftest.$ac_objext
22776if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 22777 (eval $ac_compile) 2>conftest.er1
22044edf 22778 ac_status=$?
edfaf76d
LK
22779 grep -v '^ *+' conftest.er1 >conftest.err
22780 rm -f conftest.er1
22781 cat conftest.err >&5
22044edf
DL
22782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22783 (exit $ac_status); } &&
ec8fcb10
YM
22784 { ac_try='test -z "$ac_c_werror_flag"
22785 || test ! -s conftest.err'
edfaf76d
LK
22786 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22787 (eval $ac_try) 2>&5
22788 ac_status=$?
22789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22790 (exit $ac_status); }; } &&
22791 { ac_try='test -s conftest.$ac_objext'
22044edf
DL
22792 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22793 (eval $ac_try) 2>&5
22794 ac_status=$?
22795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22796 (exit $ac_status); }; }; then
22797 emacs_cv_c_restrict_arr=yes
22798else
22799 echo "$as_me: failed program was:" >&5
19650fd6
AS
22800sed 's/^/| /' conftest.$ac_ext >&5
22801
22044edf 22802emacs_cv_c_restrict_arr=no
ba4481b5 22803fi
edfaf76d 22804rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
22044edf
DL
22805fi
22806echo "$as_me:$LINENO: result: $emacs_cv_c_restrict_arr" >&5
22807echo "${ECHO_T}$emacs_cv_c_restrict_arr" >&6
22808if test "$emacs_cv_c_restrict_arr" = yes; then
b936fae4 22809
c0d27fcc 22810cat >>confdefs.h <<\_ACEOF
22044edf 22811#define __restrict_arr __restrict
c0d27fcc 22812_ACEOF
ba4481b5 22813
ba4481b5
DL
22814fi
22815
c0d27fcc 22816
c0d27fcc 22817
22044edf
DL
22818# Set up the CFLAGS for real compilation, so we can substitute it.
22819CFLAGS="$REAL_CFLAGS"
22820CPPFLAGS="$REAL_CPPFLAGS"
22821
22822#### Find out which version of Emacs this is.
22823version=`grep 'defconst[ ]*emacs-version' ${srcdir}/lisp/version.el \
22824 | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`
22825if test x"${version}" = x; then
22826 { { echo "$as_me:$LINENO: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." >&5
22827echo "$as_me: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." >&2;}
22828 { (exit 1); exit 1; }; }
22829fi
22830
22831### Specify what sort of things we'll be editing into Makefile and config.h.
22832### Use configuration here uncanonicalized to avoid exceeding size limits.
22833
22834
22835
22836
22837
22838
22839
22840
22841
22842
22843
22844
22845
22846
22847
22848
22849
22850
22851
22852
22853
22854
22855
22856
22857
22858
22859
22860
22861
22862
22863
22864
6a3a24fa 22865
22044edf
DL
22866
22867
22868cat >>confdefs.h <<_ACEOF
22869#define EMACS_CONFIGURATION "${canonical}"
22870_ACEOF
22871
22872
22873cat >>confdefs.h <<_ACEOF
22874#define EMACS_CONFIG_OPTIONS "${ac_configure_args}"
22875_ACEOF
22876
22877
22878cat >>confdefs.h <<_ACEOF
22879#define config_machfile "${machfile}"
22880_ACEOF
22881
22882
22883cat >>confdefs.h <<_ACEOF
22884#define config_opsysfile "${opsysfile}"
22885_ACEOF
22886
22887
22888cat >>confdefs.h <<_ACEOF
22889#define LD_SWITCH_X_SITE ${LD_SWITCH_X_SITE}
22890_ACEOF
22891
22892
22893cat >>confdefs.h <<_ACEOF
22894#define LD_SWITCH_X_SITE_AUX ${LD_SWITCH_X_SITE_AUX}
22895_ACEOF
22896
22897
22898cat >>confdefs.h <<_ACEOF
22899#define C_SWITCH_X_SITE ${C_SWITCH_X_SITE}
22900_ACEOF
22901
22902
22903cat >>confdefs.h <<_ACEOF
22904#define UNEXEC_SRC ${UNEXEC_SRC}
22905_ACEOF
22906
22907
22908if test "${HAVE_X_WINDOWS}" = "yes" ; then
22909
22910cat >>confdefs.h <<\_ACEOF
22911#define HAVE_X_WINDOWS 1
22912_ACEOF
22913
22914fi
22915if test "${USE_X_TOOLKIT}" != "none" ; then
22916
22917cat >>confdefs.h <<\_ACEOF
22918#define USE_X_TOOLKIT 1
22919_ACEOF
22920
22921fi
22922if test "${HAVE_X11}" = "yes" ; then
22923
22924cat >>confdefs.h <<\_ACEOF
22925#define HAVE_X11 1
22926_ACEOF
22927
22928fi
22929if test "${HAVE_XFREE386}" = "yes" ; then
22930
22931cat >>confdefs.h <<\_ACEOF
22932#define HAVE_XFREE386 1
22933_ACEOF
22934
22935fi
22936if test "${HAVE_MENUS}" = "yes" ; then
22937
22938cat >>confdefs.h <<\_ACEOF
22939#define HAVE_MENUS 1
22940_ACEOF
22941
22942fi
22943if test "${GNU_MALLOC}" = "yes" ; then
22944
22945cat >>confdefs.h <<\_ACEOF
22946#define GNU_MALLOC 1
22947_ACEOF
22948
22949fi
22950if test "${REL_ALLOC}" = "yes" ; then
22951
22952cat >>confdefs.h <<\_ACEOF
22953#define REL_ALLOC 1
22954_ACEOF
22955
22956fi
22957
22958
22959
c0d27fcc
MR
22960
22961
ba4481b5 22962#### Report on what we decided to do.
488dd4c4
JD
22963#### Report GTK as a toolkit, even if it doesn't use Xt.
22964#### It makes printing result more understandable as using GTK sets
22965#### toolkit_scroll_bars to yes by default.
22966if test "${HAVE_GTK}" = "yes"; then
22967 USE_X_TOOLKIT=GTK
22968fi
22969
ba4481b5
DL
22970echo "
22971Configured for \`${canonical}'.
22972
22973 Where should the build process find the source code? ${srcdir}
22974 What operating system and machine description files should Emacs use?
22975 \`${opsysfile}' and \`${machfile}'
22976 What compiler should emacs be built with? ${CC} ${CFLAGS}
22977 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
73b77ee5 22978 Should Emacs use a relocating allocator for buffers? ${REL_ALLOC}
ef9e4345 22979 Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers
ba4481b5 22980 What window system should Emacs use? ${window_system}
8e967cf7 22981 What toolkit should Emacs use? ${USE_X_TOOLKIT}"
ba4481b5
DL
22982
22983if test -n "${x_includes}"; then
22984echo " Where do we find X Windows header files? ${x_includes}"
22985else
22986echo " Where do we find X Windows header files? Standard dirs"
22987fi
22988if test -n "${x_libraries}"; then
22989echo " Where do we find X Windows libraries? ${x_libraries}"
22990else
22991echo " Where do we find X Windows libraries? Standard dirs"
22992fi
22993
22994echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}"
22995echo " Does Emacs use -lXpm? ${HAVE_XPM}"
22996echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
22997echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
22998echo " Does Emacs use -lungif? ${HAVE_GIF}"
22999echo " Does Emacs use -lpng? ${HAVE_PNG}"
23000echo " Does Emacs use X toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}"
23001echo
23002
d0098f13
JD
23003if test $USE_XASSERTS = yes; then
23004 echo " Compiling with asserts turned on."
d0098f13
JD
23005 CPPFLAGS="$CPPFLAGS -DXASSERTS=1"
23006 echo
23007fi
05cf15c6 23008
05cf15c6 23009
05cf15c6 23010
ba4481b5
DL
23011# Remove any trailing slashes in these variables.
23012test "${prefix}" != NONE &&
23013 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
23014test "${exec_prefix}" != NONE &&
23015 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
23016
d0e9bfd2
GM
23017## Check if the C preprocessor will convert `..' to `. .'. If so, set
23018## CPP_NEED_TRADITIONAL to `yes' so that the code to generate Makefile
23019## from Makefile.c can correctly provide the arg `-traditional' to the
23020## C preprocessor.
23021
503d2be0 23022cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23023/* confdefs.h. */
23024_ACEOF
23025cat confdefs.h >>conftest.$ac_ext
23026cat >>conftest.$ac_ext <<_ACEOF
23027/* end confdefs.h. */
d0e9bfd2 23028yes..yes
503d2be0 23029_ACEOF
d0e9bfd2 23030if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 23031 $EGREP "yes..yes" >/dev/null 2>&1; then
d0e9bfd2
GM
23032 CPP_NEED_TRADITIONAL=no
23033else
d0e9bfd2
GM
23034 CPP_NEED_TRADITIONAL=yes
23035fi
23036rm -f conftest*
23037
c0d27fcc 23038
6bae0ccf
DL
23039 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"
23040 ac_config_commands="$ac_config_commands default"
503d2be0 23041cat >confcache <<\_ACEOF
ba4481b5
DL
23042# This file is a shell script that caches the results of configure
23043# tests run on this system so they can be shared between configure
503d2be0
AS
23044# scripts and configure runs, see configure's option --config-cache.
23045# It is not useful on other systems. If it contains results you don't
23046# want to keep, you may remove or edit it.
ba4481b5 23047#
503d2be0
AS
23048# config.status only pays attention to the cache file if you give it
23049# the --recheck option to rerun configure.
ba4481b5 23050#
6bae0ccf 23051# `ac_cv_env_foo' variables (set or unset) will be overridden when
503d2be0
AS
23052# loading this file, other *unset* `ac_cv_foo' will be assigned the
23053# following values.
23054
23055_ACEOF
23056
ba4481b5
DL
23057# The following way of writing the cache mishandles newlines in values,
23058# but we know of no workaround that is simple, portable, and efficient.
23059# So, don't put newlines in cache variables' values.
23060# Ultrix sh set writes to stderr and can't be redirected directly,
23061# and sets the high bit in the cache file unless we assign to the vars.
503d2be0
AS
23062{
23063 (set) 2>&1 |
23064 case `(ac_space=' '; set | grep ac_space) 2>&1` in
23065 *ac_space=\ *)
23066 # `set' does not quote correctly, so add quotes (double-quote
23067 # substitution turns \\\\ into \\, and sed turns \\ into \).
23068 sed -n \
edfaf76d
LK
23069 "s/'/'\\\\''/g;
23070 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
503d2be0
AS
23071 ;;
23072 *)
23073 # `set' quotes correctly as required by POSIX, so do not add quotes.
23074 sed -n \
edfaf76d 23075 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
503d2be0
AS
23076 ;;
23077 esac;
23078} |
23079 sed '
23080 t clear
23081 : clear
23082 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
23083 t end
23084 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
23085 : end' >>confcache
19650fd6 23086if diff $cache_file confcache >/dev/null 2>&1; then :; else
ba4481b5 23087 if test -w $cache_file; then
503d2be0
AS
23088 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
23089 cat confcache >$cache_file
ba4481b5
DL
23090 else
23091 echo "not updating unwritable cache $cache_file"
23092 fi
23093fi
23094rm -f confcache
23095
ba4481b5
DL
23096test "x$prefix" = xNONE && prefix=$ac_default_prefix
23097# Let make expand exec_prefix.
23098test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
23099
503d2be0
AS
23100# VPATH may cause trouble with some makes, so we remove $(srcdir),
23101# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
23102# trailing colons and then remove the whole line if VPATH becomes empty
23103# (actually we leave an empty line to preserve line numbers).
ba4481b5 23104if test "x$srcdir" = x.; then
edfaf76d 23105 ac_vpsub='/^[ ]*VPATH[ ]*=/{
503d2be0
AS
23106s/:*\$(srcdir):*/:/;
23107s/:*\${srcdir}:*/:/;
23108s/:*@srcdir@:*/:/;
edfaf76d 23109s/^\([^=]*=[ ]*\):*/\1/;
503d2be0 23110s/:*$//;
edfaf76d 23111s/^[^=]*=[ ]*$//;
503d2be0 23112}'
ba4481b5
DL
23113fi
23114
ba4481b5
DL
23115DEFS=-DHAVE_CONFIG_H
23116
6bae0ccf
DL
23117ac_libobjs=
23118ac_ltlibobjs=
23119for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
23120 # 1. Remove the extension, and $U if already installed.
23121 ac_i=`echo "$ac_i" |
edfaf76d 23122 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
6bae0ccf
DL
23123 # 2. Add them.
23124 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
23125 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
23126done
23127LIBOBJS=$ac_libobjs
23128
23129LTLIBOBJS=$ac_ltlibobjs
23130
23131
c0d27fcc 23132
ba4481b5 23133: ${CONFIG_STATUS=./config.status}
503d2be0
AS
23134ac_clean_files_save=$ac_clean_files
23135ac_clean_files="$ac_clean_files $CONFIG_STATUS"
c0d27fcc 23136{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
503d2be0
AS
23137echo "$as_me: creating $CONFIG_STATUS" >&6;}
23138cat >$CONFIG_STATUS <<_ACEOF
23139#! $SHELL
c0d27fcc 23140# Generated by $as_me.
ba4481b5 23141# Run this file to recreate the current configuration.
ba4481b5 23142# Compiler output produced by configure, useful for debugging
503d2be0 23143# configure, is in config.log if it exists.
ba4481b5 23144
503d2be0 23145debug=false
19650fd6
AS
23146ac_cs_recheck=false
23147ac_cs_silent=false
503d2be0 23148SHELL=\${CONFIG_SHELL-$SHELL}
503d2be0
AS
23149_ACEOF
23150
23151cat >>$CONFIG_STATUS <<\_ACEOF
c0d27fcc
MR
23152## --------------------- ##
23153## M4sh Initialization. ##
23154## --------------------- ##
23155
503d2be0
AS
23156# Be Bourne compatible
23157if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
23158 emulate sh
23159 NULLCMD=:
6bae0ccf
DL
23160 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
23161 # is contrary to our usage. Disable this feature.
23162 alias -g '${1+"$@"}'='"$@"'
503d2be0
AS
23163elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
23164 set -o posix
23165fi
edfaf76d 23166DUALCASE=1; export DUALCASE # for MKS sh
503d2be0 23167
c0d27fcc 23168# Support unset when possible.
edfaf76d 23169if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
c0d27fcc
MR
23170 as_unset=unset
23171else
23172 as_unset=false
23173fi
23174
6bae0ccf
DL
23175
23176# Work around bugs in pre-3.0 UWIN ksh.
23177$as_unset ENV MAIL MAILPATH
23178PS1='$ '
23179PS2='> '
23180PS4='+ '
23181
23182# NLS nuisances.
19650fd6
AS
23183for as_var in \
23184 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
23185 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
23186 LC_TELEPHONE LC_TIME
6bae0ccf 23187do
edfaf76d 23188 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
6bae0ccf
DL
23189 eval $as_var=C; export $as_var
23190 else
23191 $as_unset $as_var
23192 fi
23193done
23194
23195# Required to use basename.
23196if expr a : '\(a\)' >/dev/null 2>&1; then
23197 as_expr=expr
23198else
23199 as_expr=false
23200fi
23201
23202if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
23203 as_basename=basename
23204else
23205 as_basename=false
23206fi
c0d27fcc
MR
23207
23208
503d2be0 23209# Name of the executable.
6bae0ccf 23210as_me=`$as_basename "$0" ||
c0d27fcc
MR
23211$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
23212 X"$0" : 'X\(//\)$' \| \
23213 X"$0" : 'X\(/\)$' \| \
23214 . : '\(.\)' 2>/dev/null ||
23215echo X/"$0" |
23216 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
23217 /^X\/\(\/\/\)$/{ s//\1/; q; }
23218 /^X\/\(\/\).*/{ s//\1/; q; }
23219 s/.*/./; q'`
23220
6bae0ccf 23221
c0d27fcc
MR
23222# PATH needs CR, and LINENO needs CR and PATH.
23223# Avoid depending upon Character Ranges.
23224as_cr_letters='abcdefghijklmnopqrstuvwxyz'
23225as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
23226as_cr_Letters=$as_cr_letters$as_cr_LETTERS
23227as_cr_digits='0123456789'
23228as_cr_alnum=$as_cr_Letters$as_cr_digits
23229
23230# The user is always right.
23231if test "${PATH_SEPARATOR+set}" != set; then
19650fd6
AS
23232 echo "#! /bin/sh" >conf$$.sh
23233 echo "exit 0" >>conf$$.sh
23234 chmod +x conf$$.sh
23235 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
c0d27fcc
MR
23236 PATH_SEPARATOR=';'
23237 else
23238 PATH_SEPARATOR=:
23239 fi
19650fd6 23240 rm -f conf$$.sh
c0d27fcc
MR
23241fi
23242
23243
23244 as_lineno_1=$LINENO
23245 as_lineno_2=$LINENO
23246 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
23247 test "x$as_lineno_1" != "x$as_lineno_2" &&
23248 test "x$as_lineno_3" = "x$as_lineno_2" || {
23249 # Find who we are. Look in the path if we contain no path at all
23250 # relative or not.
23251 case $0 in
23252 *[\\/]* ) as_myself=$0 ;;
23253 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23254for as_dir in $PATH
23255do
23256 IFS=$as_save_IFS
23257 test -z "$as_dir" && as_dir=.
23258 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
23259done
23260
23261 ;;
23262 esac
23263 # We did not find ourselves, most probably we were run as `sh COMMAND'
23264 # in which case we are not to be found in the path.
23265 if test "x$as_myself" = x; then
23266 as_myself=$0
23267 fi
23268 if test ! -f "$as_myself"; then
23269 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
23270echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
23271 { (exit 1); exit 1; }; }
23272 fi
23273 case $CONFIG_SHELL in
23274 '')
23275 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23276for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
23277do
23278 IFS=$as_save_IFS
23279 test -z "$as_dir" && as_dir=.
23280 for as_base in sh bash ksh sh5; do
23281 case $as_dir in
23282 /*)
23283 if ("$as_dir/$as_base" -c '
23284 as_lineno_1=$LINENO
23285 as_lineno_2=$LINENO
23286 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
23287 test "x$as_lineno_1" != "x$as_lineno_2" &&
23288 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
6bae0ccf
DL
23289 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
23290 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
c0d27fcc
MR
23291 CONFIG_SHELL=$as_dir/$as_base
23292 export CONFIG_SHELL
23293 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
23294 fi;;
23295 esac
23296 done
23297done
23298;;
23299 esac
23300
23301 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
23302 # uniformly replaced by the line number. The first 'sed' inserts a
23303 # line-number line before each line; the second 'sed' does the real
23304 # work. The second script uses 'N' to pair each line-number line
23305 # with the numbered line, and appends trailing '-' during
23306 # substitution so that $LINENO is not a special case at line end.
23307 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
23308 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
23309 sed '=' <$as_myself |
23310 sed '
23311 N
23312 s,$,-,
23313 : loop
23314 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
23315 t loop
23316 s,-$,,
23317 s,^['$as_cr_digits']*\n,,
23318 ' >$as_me.lineno &&
23319 chmod +x $as_me.lineno ||
23320 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
23321echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
23322 { (exit 1); exit 1; }; }
23323
23324 # Don't try to exec as it changes $[0], causing all sort of problems
23325 # (the dirname of $[0] is not the place where we might find the
23326 # original and so on. Autoconf is especially sensible to this).
23327 . ./$as_me.lineno
23328 # Exit status is that of the last command.
23329 exit
23330}
23331
23332
23333case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
23334 *c*,-n*) ECHO_N= ECHO_C='
23335' ECHO_T=' ' ;;
23336 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
23337 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
23338esac
503d2be0
AS
23339
23340if expr a : '\(a\)' >/dev/null 2>&1; then
23341 as_expr=expr
23342else
23343 as_expr=false
23344fi
23345
23346rm -f conf$$ conf$$.exe conf$$.file
23347echo >conf$$.file
23348if ln -s conf$$.file conf$$ 2>/dev/null; then
23349 # We could just check for DJGPP; but this test a) works b) is more generic
23350 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
23351 if test -f conf$$.exe; then
23352 # Don't use ln at all; we don't have any links
23353 as_ln_s='cp -p'
23354 else
23355 as_ln_s='ln -s'
23356 fi
23357elif ln conf$$.file conf$$ 2>/dev/null; then
23358 as_ln_s=ln
23359else
23360 as_ln_s='cp -p'
23361fi
23362rm -f conf$$ conf$$.exe conf$$.file
23363
6bae0ccf
DL
23364if mkdir -p . 2>/dev/null; then
23365 as_mkdir_p=:
23366else
edfaf76d 23367 test -d ./-p && rmdir ./-p
6bae0ccf
DL
23368 as_mkdir_p=false
23369fi
23370
503d2be0
AS
23371as_executable_p="test -f"
23372
c0d27fcc 23373# Sed expression to map a string onto a valid CPP name.
edfaf76d 23374as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
c0d27fcc
MR
23375
23376# Sed expression to map a string onto a valid variable name.
edfaf76d 23377as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
503d2be0 23378
503d2be0
AS
23379
23380# IFS
23381# We need space, tab and new line, in precisely that order.
23382as_nl='
23383'
23384IFS=" $as_nl"
23385
23386# CDPATH.
6bae0ccf 23387$as_unset CDPATH
503d2be0
AS
23388
23389exec 6>&1
23390
c0d27fcc
MR
23391# Open the log real soon, to keep \$[0] and so on meaningful, and to
23392# report actual input values of CONFIG_FILES etc. instead of their
23393# values after options handling. Logging --version etc. is OK.
23394exec 5>>config.log
23395{
23396 echo
23397 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
23398## Running $as_me. ##
23399_ASBOX
23400} >&5
23401cat >&5 <<_CSEOF
23402
23403This file was extended by $as_me, which was
edfaf76d 23404generated by GNU Autoconf 2.59. Invocation command line was
c0d27fcc
MR
23405
23406 CONFIG_FILES = $CONFIG_FILES
23407 CONFIG_HEADERS = $CONFIG_HEADERS
23408 CONFIG_LINKS = $CONFIG_LINKS
23409 CONFIG_COMMANDS = $CONFIG_COMMANDS
23410 $ $0 $@
23411
23412_CSEOF
23413echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
23414echo >&5
503d2be0
AS
23415_ACEOF
23416
23417# Files that config.status was made for.
23418if test -n "$ac_config_files"; then
23419 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
23420fi
23421
23422if test -n "$ac_config_headers"; then
23423 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
23424fi
23425
23426if test -n "$ac_config_links"; then
23427 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
23428fi
23429
23430if test -n "$ac_config_commands"; then
23431 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
23432fi
23433
c0d27fcc 23434cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
23435
23436ac_cs_usage="\
23437\`$as_me' instantiates files from templates according to the
23438current configuration.
23439
23440Usage: $0 [OPTIONS] [FILE]...
23441
23442 -h, --help print this help, then exit
23443 -V, --version print version number, then exit
19650fd6 23444 -q, --quiet do not print progress messages
503d2be0
AS
23445 -d, --debug don't remove temporary files
23446 --recheck update $as_me by reconfiguring in the same conditions
23447 --file=FILE[:TEMPLATE]
edfaf76d 23448 instantiate the configuration file FILE
503d2be0 23449 --header=FILE[:TEMPLATE]
edfaf76d 23450 instantiate the configuration header FILE
503d2be0
AS
23451
23452Configuration files:
23453$config_files
23454
23455Configuration headers:
23456$config_headers
23457
23458Configuration commands:
23459$config_commands
23460
23461Report bugs to <bug-autoconf@gnu.org>."
c0d27fcc 23462_ACEOF
503d2be0 23463
c0d27fcc 23464cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
23465ac_cs_version="\\
23466config.status
edfaf76d 23467configured by $0, generated by GNU Autoconf 2.59,
503d2be0
AS
23468 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
23469
edfaf76d 23470Copyright (C) 2003 Free Software Foundation, Inc.
503d2be0
AS
23471This config.status script is free software; the Free Software Foundation
23472gives unlimited permission to copy, distribute and modify it."
23473srcdir=$srcdir
23474INSTALL="$INSTALL"
c0d27fcc 23475_ACEOF
503d2be0 23476
c0d27fcc 23477cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
23478# If no file are specified by the user, then we need to provide default
23479# value. By we need to know if files were specified by the user.
23480ac_need_defaults=:
23481while test $# != 0
ba4481b5 23482do
503d2be0
AS
23483 case $1 in
23484 --*=*)
23485 ac_option=`expr "x$1" : 'x\([^=]*\)='`
23486 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
6bae0ccf
DL
23487 ac_shift=:
23488 ;;
23489 -*)
23490 ac_option=$1
23491 ac_optarg=$2
23492 ac_shift=shift
503d2be0 23493 ;;
503d2be0
AS
23494 *) # This is not an option, so the user has probably given explicit
23495 # arguments.
6bae0ccf 23496 ac_option=$1
503d2be0
AS
23497 ac_need_defaults=false;;
23498 esac
23499
6bae0ccf 23500 case $ac_option in
503d2be0 23501 # Handling of the options.
c0d27fcc 23502_ACEOF
f57bd967 23503cat >>$CONFIG_STATUS <<\_ACEOF
19650fd6
AS
23504 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23505 ac_cs_recheck=: ;;
503d2be0
AS
23506 --version | --vers* | -V )
23507 echo "$ac_cs_version"; exit 0 ;;
23508 --he | --h)
23509 # Conflict between --help and --header
c0d27fcc 23510 { { echo "$as_me:$LINENO: error: ambiguous option: $1
503d2be0
AS
23511Try \`$0 --help' for more information." >&5
23512echo "$as_me: error: ambiguous option: $1
23513Try \`$0 --help' for more information." >&2;}
23514 { (exit 1); exit 1; }; };;
23515 --help | --hel | -h )
23516 echo "$ac_cs_usage"; exit 0 ;;
23517 --debug | --d* | -d )
23518 debug=: ;;
23519 --file | --fil | --fi | --f )
6bae0ccf
DL
23520 $ac_shift
23521 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
503d2be0
AS
23522 ac_need_defaults=false;;
23523 --header | --heade | --head | --hea )
6bae0ccf
DL
23524 $ac_shift
23525 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
503d2be0 23526 ac_need_defaults=false;;
19650fd6
AS
23527 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
23528 | -silent | --silent | --silen | --sile | --sil | --si | --s)
23529 ac_cs_silent=: ;;
503d2be0
AS
23530
23531 # This is an error.
c0d27fcc 23532 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
503d2be0
AS
23533Try \`$0 --help' for more information." >&5
23534echo "$as_me: error: unrecognized option: $1
23535Try \`$0 --help' for more information." >&2;}
23536 { (exit 1); exit 1; }; } ;;
23537
23538 *) ac_config_targets="$ac_config_targets $1" ;;
23539
ba4481b5 23540 esac
503d2be0 23541 shift
ba4481b5
DL
23542done
23543
19650fd6
AS
23544ac_configure_extra_args=
23545
23546if $ac_cs_silent; then
23547 exec 6>/dev/null
23548 ac_configure_extra_args="$ac_configure_extra_args --silent"
23549fi
23550
23551_ACEOF
23552cat >>$CONFIG_STATUS <<_ACEOF
23553if \$ac_cs_recheck; then
23554 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
23555 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
23556fi
23557
503d2be0 23558_ACEOF
ba4481b5 23559
c0d27fcc 23560cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
23561#
23562# INIT-COMMANDS section.
23563#
ba4481b5 23564
503d2be0
AS
23565GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPP_NEED_TRADITIONAL="$CPP_NEED_TRADITIONAL" CPPFLAGS="$CPPFLAGS"
23566
c0d27fcc
MR
23567_ACEOF
23568
503d2be0 23569
c0d27fcc
MR
23570
23571cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
23572for ac_config_target in $ac_config_targets
23573do
23574 case "$ac_config_target" in
23575 # Handling of arguments.
23576 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
23577 "lib-src/Makefile.c" ) CONFIG_FILES="$CONFIG_FILES lib-src/Makefile.c:lib-src/Makefile.in" ;;
23578 "oldXMenu/Makefile" ) CONFIG_FILES="$CONFIG_FILES oldXMenu/Makefile" ;;
23579 "man/Makefile" ) CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
23580 "lwlib/Makefile" ) CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;;
23581 "src/Makefile.c" ) CONFIG_FILES="$CONFIG_FILES src/Makefile.c:src/Makefile.in" ;;
23582 "lisp/Makefile" ) CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;;
23b24859 23583 "lispref/Makefile" ) CONFIG_FILES="$CONFIG_FILES lispref/Makefile" ;;
981626b7 23584 "lispintro/Makefile" ) CONFIG_FILES="$CONFIG_FILES lispintro/Makefile" ;;
503d2be0
AS
23585 "leim/Makefile" ) CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;;
23586 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
23587 "src/config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:src/config.in" ;;
c0d27fcc 23588 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
503d2be0
AS
23589echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
23590 { (exit 1); exit 1; }; };;
23591 esac
ba4481b5 23592done
503d2be0
AS
23593
23594# If the user did not use the arguments to specify the items to instantiate,
23595# then the envvar interface is used. Set only those that are not.
23596# We use the long form for the default assignment because of an extremely
23597# bizarre bug on SunOS 4.1.3.
23598if $ac_need_defaults; then
23599 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
23600 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
23601 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
ba4481b5 23602fi
503d2be0 23603
19650fd6
AS
23604# Have a temporary directory for convenience. Make it in the build tree
23605# simply because there is no reason to put it here, and in addition,
23606# creating and moving files from /tmp can sometimes cause problems.
503d2be0
AS
23607# Create a temporary directory, and hook for its removal unless debugging.
23608$debug ||
23609{
23610 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
23611 trap '{ (exit 1); exit 1; }' 1 2 13 15
23612}
23613
23614# Create a (secure) tmp directory for tmp files.
19650fd6 23615
503d2be0 23616{
19650fd6 23617 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
503d2be0
AS
23618 test -n "$tmp" && test -d "$tmp"
23619} ||
23620{
19650fd6 23621 tmp=./confstat$$-$RANDOM
503d2be0
AS
23622 (umask 077 && mkdir $tmp)
23623} ||
23624{
19650fd6 23625 echo "$me: cannot create a temporary directory in ." >&2
503d2be0
AS
23626 { (exit 1); exit 1; }
23627}
23628
c0d27fcc 23629_ACEOF
503d2be0 23630
c0d27fcc 23631cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
23632
23633#
23634# CONFIG_FILES section.
23635#
23636
23637# No need to generate the scripts if there are no CONFIG_FILES.
23638# This happens for instance when ./config.status config.h
23639if test -n "\$CONFIG_FILES"; then
23640 # Protect against being on the right side of a sed subst in config.status.
23641 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
23642 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
23643s,@SHELL@,$SHELL,;t t
c0d27fcc
MR
23644s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
23645s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
23646s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
23647s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
23648s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
23649s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
503d2be0
AS
23650s,@exec_prefix@,$exec_prefix,;t t
23651s,@prefix@,$prefix,;t t
23652s,@program_transform_name@,$program_transform_name,;t t
23653s,@bindir@,$bindir,;t t
23654s,@sbindir@,$sbindir,;t t
23655s,@libexecdir@,$libexecdir,;t t
23656s,@datadir@,$datadir,;t t
23657s,@sysconfdir@,$sysconfdir,;t t
23658s,@sharedstatedir@,$sharedstatedir,;t t
23659s,@localstatedir@,$localstatedir,;t t
23660s,@libdir@,$libdir,;t t
23661s,@includedir@,$includedir,;t t
23662s,@oldincludedir@,$oldincludedir,;t t
23663s,@infodir@,$infodir,;t t
23664s,@mandir@,$mandir,;t t
503d2be0
AS
23665s,@build_alias@,$build_alias,;t t
23666s,@host_alias@,$host_alias,;t t
23667s,@target_alias@,$target_alias,;t t
c0d27fcc 23668s,@DEFS@,$DEFS,;t t
503d2be0
AS
23669s,@ECHO_C@,$ECHO_C,;t t
23670s,@ECHO_N@,$ECHO_N,;t t
23671s,@ECHO_T@,$ECHO_T,;t t
503d2be0 23672s,@LIBS@,$LIBS,;t t
19650fd6 23673s,@MAINT@,$MAINT,;t t
503d2be0
AS
23674s,@build@,$build,;t t
23675s,@build_cpu@,$build_cpu,;t t
23676s,@build_vendor@,$build_vendor,;t t
23677s,@build_os@,$build_os,;t t
23678s,@host@,$host,;t t
23679s,@host_cpu@,$host_cpu,;t t
23680s,@host_vendor@,$host_vendor,;t t
23681s,@host_os@,$host_os,;t t
23682s,@CC@,$CC,;t t
23683s,@CFLAGS@,$CFLAGS,;t t
23684s,@LDFLAGS@,$LDFLAGS,;t t
23685s,@CPPFLAGS@,$CPPFLAGS,;t t
23686s,@ac_ct_CC@,$ac_ct_CC,;t t
23687s,@EXEEXT@,$EXEEXT,;t t
23688s,@OBJEXT@,$OBJEXT,;t t
503d2be0 23689s,@CPP@,$CPP,;t t
e143ad11
AS
23690s,@EGREP@,$EGREP,;t t
23691s,@LN_S@,$LN_S,;t t
503d2be0
AS
23692s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
23693s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
23694s,@INSTALL_DATA@,$INSTALL_DATA,;t t
503d2be0
AS
23695s,@RANLIB@,$RANLIB,;t t
23696s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
9e71690e 23697s,@INSTALL_INFO@,$INSTALL_INFO,;t t
46e35e9f 23698s,@GZIP_PROG@,$GZIP_PROG,;t t
503d2be0 23699s,@LIBSOUND@,$LIBSOUND,;t t
488dd4c4 23700s,@PKG_CONFIG@,$PKG_CONFIG,;t t
439f58ee
JD
23701s,@ALSA_CFLAGS@,$ALSA_CFLAGS,;t t
23702s,@ALSA_LIBS@,$ALSA_LIBS,;t t
23703s,@CFLAGS_SOUND@,$CFLAGS_SOUND,;t t
23704s,@SET_MAKE@,$SET_MAKE,;t t
488dd4c4
JD
23705s,@GTK_CFLAGS@,$GTK_CFLAGS,;t t
23706s,@GTK_LIBS@,$GTK_LIBS,;t t
503d2be0
AS
23707s,@ALLOCA@,$ALLOCA,;t t
23708s,@liblockfile@,$liblockfile,;t t
23709s,@LIBOBJS@,$LIBOBJS,;t t
23710s,@NEED_SETGID@,$NEED_SETGID,;t t
23711s,@KMEM_GROUP@,$KMEM_GROUP,;t t
23712s,@GETLOADAVG_LIBS@,$GETLOADAVG_LIBS,;t t
52dbaac8
PE
23713s,@GETOPT_H@,$GETOPT_H,;t t
23714s,@GETOPTOBJS@,$GETOPTOBJS,;t t
503d2be0
AS
23715s,@version@,$version,;t t
23716s,@configuration@,$configuration,;t t
23717s,@canonical@,$canonical,;t t
23718s,@srcdir@,$srcdir,;t t
23719s,@lispdir@,$lispdir,;t t
23720s,@locallisppath@,$locallisppath,;t t
23721s,@lisppath@,$lisppath,;t t
23722s,@x_default_search_path@,$x_default_search_path,;t t
23723s,@etcdir@,$etcdir,;t t
23724s,@archlibdir@,$archlibdir,;t t
23725s,@docdir@,$docdir,;t t
23726s,@bitmapdir@,$bitmapdir,;t t
98418dba
CW
23727s,@gamedir@,$gamedir,;t t
23728s,@gameuser@,$gameuser,;t t
503d2be0
AS
23729s,@c_switch_system@,$c_switch_system,;t t
23730s,@c_switch_machine@,$c_switch_machine,;t t
23731s,@LD_SWITCH_X_SITE@,$LD_SWITCH_X_SITE,;t t
23732s,@LD_SWITCH_X_SITE_AUX@,$LD_SWITCH_X_SITE_AUX,;t t
23733s,@C_SWITCH_X_SITE@,$C_SWITCH_X_SITE,;t t
23734s,@X_TOOLKIT_TYPE@,$X_TOOLKIT_TYPE,;t t
23735s,@machfile@,$machfile,;t t
23736s,@opsysfile@,$opsysfile,;t t
6a3a24fa 23737s,@carbon_appdir@,$carbon_appdir,;t t
6bae0ccf 23738s,@LTLIBOBJS@,$LTLIBOBJS,;t t
503d2be0
AS
23739CEOF
23740
c0d27fcc 23741_ACEOF
ba4481b5 23742
c0d27fcc 23743 cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
23744 # Split the substitutions into bite-sized pieces for seds with
23745 # small command number limits, like on Digital OSF/1 and HP-UX.
23746 ac_max_sed_lines=48
23747 ac_sed_frag=1 # Number of current file.
23748 ac_beg=1 # First line for current file.
23749 ac_end=$ac_max_sed_lines # Line after last line for current file.
23750 ac_more_lines=:
23751 ac_sed_cmds=
23752 while $ac_more_lines; do
23753 if test $ac_beg -gt 1; then
23754 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23755 else
23756 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23757 fi
23758 if test ! -s $tmp/subs.frag; then
23759 ac_more_lines=false
23760 else
23761 # The purpose of the label and of the branching condition is to
23762 # speed up the sed processing (if there are no `@' at all, there
23763 # is no need to browse any of the substitutions).
23764 # These are the two extra sed commands mentioned above.
23765 (echo ':t
23766 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
23767 if test -z "$ac_sed_cmds"; then
edfaf76d 23768 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
503d2be0 23769 else
edfaf76d 23770 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
503d2be0
AS
23771 fi
23772 ac_sed_frag=`expr $ac_sed_frag + 1`
23773 ac_beg=$ac_end
23774 ac_end=`expr $ac_end + $ac_max_sed_lines`
23775 fi
23776 done
23777 if test -z "$ac_sed_cmds"; then
23778 ac_sed_cmds=cat
23779 fi
23780fi # test -n "$CONFIG_FILES"
ba4481b5 23781
c0d27fcc
MR
23782_ACEOF
23783cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0 23784for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
ba4481b5 23785 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
503d2be0
AS
23786 case $ac_file in
23787 - | *:- | *:-:* ) # input from stdin
edfaf76d
LK
23788 cat >$tmp/stdin
23789 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23790 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
503d2be0 23791 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
edfaf76d 23792 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
503d2be0 23793 * ) ac_file_in=$ac_file.in ;;
ba4481b5
DL
23794 esac
23795
503d2be0 23796 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
c0d27fcc
MR
23797 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
23798$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
23799 X"$ac_file" : 'X\(//\)[^/]' \| \
23800 X"$ac_file" : 'X\(//\)$' \| \
23801 X"$ac_file" : 'X\(/\)' \| \
23802 . : '\(.\)' 2>/dev/null ||
503d2be0
AS
23803echo X"$ac_file" |
23804 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23805 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23806 /^X\(\/\/\)$/{ s//\1/; q; }
23807 /^X\(\/\).*/{ s//\1/; q; }
23808 s/.*/./; q'`
6bae0ccf
DL
23809 { if $as_mkdir_p; then
23810 mkdir -p "$ac_dir"
23811 else
23812 as_dir="$ac_dir"
23813 as_dirs=
23814 while test ! -d "$as_dir"; do
23815 as_dirs="$as_dir $as_dirs"
23816 as_dir=`(dirname "$as_dir") 2>/dev/null ||
23817$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
23818 X"$as_dir" : 'X\(//\)[^/]' \| \
23819 X"$as_dir" : 'X\(//\)$' \| \
23820 X"$as_dir" : 'X\(/\)' \| \
23821 . : '\(.\)' 2>/dev/null ||
6bae0ccf
DL
23822echo X"$as_dir" |
23823 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23824 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23825 /^X\(\/\/\)$/{ s//\1/; q; }
23826 /^X\(\/\).*/{ s//\1/; q; }
23827 s/.*/./; q'`
23828 done
23829 test ! -n "$as_dirs" || mkdir $as_dirs
23830 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
23831echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
23832 { (exit 1); exit 1; }; }; }
503d2be0 23833
c0d27fcc 23834 ac_builddir=.
98418dba 23835
c0d27fcc
MR
23836if test "$ac_dir" != .; then
23837 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
23838 # A "../" for each directory in $ac_dir_suffix.
23839 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
23840else
23841 ac_dir_suffix= ac_top_builddir=
23842fi
23843
23844case $srcdir in
23845 .) # No --srcdir option. We are building in place.
23846 ac_srcdir=.
23847 if test -z "$ac_top_builddir"; then
23848 ac_top_srcdir=.
23849 else
23850 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
23851 fi ;;
23852 [\\/]* | ?:[\\/]* ) # Absolute path.
23853 ac_srcdir=$srcdir$ac_dir_suffix;
23854 ac_top_srcdir=$srcdir ;;
ba4481b5 23855 *) # Relative path.
c0d27fcc
MR
23856 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
23857 ac_top_srcdir=$ac_top_builddir$srcdir ;;
23858esac
edfaf76d
LK
23859
23860# Do not use `cd foo && pwd` to compute absolute paths, because
23861# the directories may not exist.
23862case `pwd` in
23863.) ac_abs_builddir="$ac_dir";;
23864*)
23865 case "$ac_dir" in
23866 .) ac_abs_builddir=`pwd`;;
23867 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
23868 *) ac_abs_builddir=`pwd`/"$ac_dir";;
23869 esac;;
23870esac
23871case $ac_abs_builddir in
23872.) ac_abs_top_builddir=${ac_top_builddir}.;;
23873*)
23874 case ${ac_top_builddir}. in
23875 .) ac_abs_top_builddir=$ac_abs_builddir;;
23876 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
23877 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
23878 esac;;
23879esac
23880case $ac_abs_builddir in
23881.) ac_abs_srcdir=$ac_srcdir;;
23882*)
23883 case $ac_srcdir in
23884 .) ac_abs_srcdir=$ac_abs_builddir;;
23885 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
23886 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
23887 esac;;
23888esac
23889case $ac_abs_builddir in
23890.) ac_abs_top_srcdir=$ac_top_srcdir;;
23891*)
23892 case $ac_top_srcdir in
23893 .) ac_abs_top_srcdir=$ac_abs_builddir;;
23894 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
23895 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
23896 esac;;
23897esac
c0d27fcc 23898
ba4481b5 23899
503d2be0
AS
23900 case $INSTALL in
23901 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
c0d27fcc 23902 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
ba4481b5
DL
23903 esac
23904
503d2be0
AS
23905 # Let's still pretend it is `configure' which instantiates (i.e., don't
23906 # use $as_me), people would be surprised to read:
c0d27fcc
MR
23907 # /* config.h. Generated by config.status. */
23908 if test x"$ac_file" = x-; then
23909 configure_input=
23910 else
23911 configure_input="$ac_file. "
23912 fi
23913 configure_input=$configure_input"Generated from `echo $ac_file_in |
edfaf76d 23914 sed 's,.*/,,'` by configure."
503d2be0
AS
23915
23916 # First look for the input files in the build tree, otherwise in the
23917 # src tree.
23918 ac_file_inputs=`IFS=:
23919 for f in $ac_file_in; do
23920 case $f in
23921 -) echo $tmp/stdin ;;
23922 [\\/$]*)
edfaf76d
LK
23923 # Absolute (can't be DOS-style, as IFS=:)
23924 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
503d2be0
AS
23925echo "$as_me: error: cannot find input file: $f" >&2;}
23926 { (exit 1); exit 1; }; }
edfaf76d 23927 echo "$f";;
503d2be0 23928 *) # Relative
edfaf76d
LK
23929 if test -f "$f"; then
23930 # Build tree
23931 echo "$f"
23932 elif test -f "$srcdir/$f"; then
23933 # Source tree
23934 echo "$srcdir/$f"
23935 else
23936 # /dev/null tree
23937 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
503d2be0
AS
23938echo "$as_me: error: cannot find input file: $f" >&2;}
23939 { (exit 1); exit 1; }; }
edfaf76d 23940 fi;;
503d2be0
AS
23941 esac
23942 done` || { (exit 1); exit 1; }
bc5d9888
CY
23943
23944 if test x"$ac_file" != x-; then
23945 { echo "$as_me:$LINENO: creating $ac_file" >&5
23946echo "$as_me: creating $ac_file" >&6;}
23947 rm -f "$ac_file"
23948 fi
c0d27fcc
MR
23949_ACEOF
23950cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
23951 sed "$ac_vpsub
23952$extrasub
c0d27fcc
MR
23953_ACEOF
23954cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
23955:t
23956/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
23957s,@configure_input@,$configure_input,;t t
23958s,@srcdir@,$ac_srcdir,;t t
c0d27fcc 23959s,@abs_srcdir@,$ac_abs_srcdir,;t t
503d2be0 23960s,@top_srcdir@,$ac_top_srcdir,;t t
c0d27fcc
MR
23961s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
23962s,@builddir@,$ac_builddir,;t t
23963s,@abs_builddir@,$ac_abs_builddir,;t t
23964s,@top_builddir@,$ac_top_builddir,;t t
23965s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
503d2be0
AS
23966s,@INSTALL@,$ac_INSTALL,;t t
23967" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
23968 rm -f $tmp/stdin
23969 if test x"$ac_file" != x-; then
23970 mv $tmp/out $ac_file
23971 else
23972 cat $tmp/out
23973 rm -f $tmp/out
23974 fi
23975
23976done
c0d27fcc
MR
23977_ACEOF
23978cat >>$CONFIG_STATUS <<\_ACEOF
ba4481b5 23979
503d2be0
AS
23980#
23981# CONFIG_HEADER section.
23982#
ba4481b5
DL
23983
23984# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
23985# NAME is the cpp macro being defined and VALUE is the value it is being given.
23986#
23987# ac_d sets the value in "#define NAME VALUE" lines.
edfaf76d
LK
23988ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
23989ac_dB='[ ].*$,\1#\2'
503d2be0
AS
23990ac_dC=' '
23991ac_dD=',;t'
23992# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
edfaf76d 23993ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
503d2be0 23994ac_uB='$,\1#\2define\3'
ba4481b5 23995ac_uC=' '
503d2be0 23996ac_uD=',;t'
ba4481b5 23997
503d2be0 23998for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
ba4481b5 23999 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
503d2be0
AS
24000 case $ac_file in
24001 - | *:- | *:-:* ) # input from stdin
edfaf76d
LK
24002 cat >$tmp/stdin
24003 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24004 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
503d2be0 24005 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
edfaf76d 24006 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
503d2be0 24007 * ) ac_file_in=$ac_file.in ;;
ba4481b5
DL
24008 esac
24009
c0d27fcc 24010 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
503d2be0
AS
24011echo "$as_me: creating $ac_file" >&6;}
24012
24013 # First look for the input files in the build tree, otherwise in the
24014 # src tree.
24015 ac_file_inputs=`IFS=:
24016 for f in $ac_file_in; do
24017 case $f in
24018 -) echo $tmp/stdin ;;
24019 [\\/$]*)
edfaf76d
LK
24020 # Absolute (can't be DOS-style, as IFS=:)
24021 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
503d2be0
AS
24022echo "$as_me: error: cannot find input file: $f" >&2;}
24023 { (exit 1); exit 1; }; }
edfaf76d
LK
24024 # Do quote $f, to prevent DOS paths from being IFS'd.
24025 echo "$f";;
503d2be0 24026 *) # Relative
edfaf76d
LK
24027 if test -f "$f"; then
24028 # Build tree
24029 echo "$f"
24030 elif test -f "$srcdir/$f"; then
24031 # Source tree
24032 echo "$srcdir/$f"
24033 else
24034 # /dev/null tree
24035 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
503d2be0
AS
24036echo "$as_me: error: cannot find input file: $f" >&2;}
24037 { (exit 1); exit 1; }; }
edfaf76d 24038 fi;;
503d2be0
AS
24039 esac
24040 done` || { (exit 1); exit 1; }
24041 # Remove the trailing spaces.
edfaf76d 24042 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
503d2be0 24043
c0d27fcc 24044_ACEOF
503d2be0
AS
24045
24046# Transform confdefs.h into two sed scripts, `conftest.defines' and
24047# `conftest.undefs', that substitutes the proper values into
24048# config.h.in to produce config.h. The first handles `#define'
24049# templates, and the second `#undef' templates.
24050# And first: Protect against being on the right side of a sed subst in
24051# config.status. Protect against being in an unquoted here document
24052# in config.status.
24053rm -f conftest.defines conftest.undefs
24054# Using a here document instead of a string reduces the quoting nightmare.
24055# Putting comments in sed scripts is not portable.
24056#
24057# `end' is used to avoid that the second main sed command (meant for
24058# 0-ary CPP macros) applies to n-ary macro definitions.
24059# See the Autoconf documentation for `clear'.
c0d27fcc 24060cat >confdef2sed.sed <<\_ACEOF
503d2be0
AS
24061s/[\\&,]/\\&/g
24062s,[\\$`],\\&,g
24063t clear
24064: clear
edfaf76d 24065s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
503d2be0 24066t end
edfaf76d 24067s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
503d2be0 24068: end
c0d27fcc 24069_ACEOF
503d2be0
AS
24070# If some macros were called several times there might be several times
24071# the same #defines, which is useless. Nevertheless, we may not want to
24072# sort them, since we want the *last* AC-DEFINE to be honored.
24073uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
24074sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
24075rm -f confdef2sed.sed
ba4481b5
DL
24076
24077# This sed command replaces #undef with comments. This is necessary, for
24078# example, in the case of _POSIX_SOURCE, which is predefined and required
24079# on some systems where configure will not decide to define it.
c0d27fcc 24080cat >>conftest.undefs <<\_ACEOF
edfaf76d 24081s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
c0d27fcc 24082_ACEOF
ba4481b5 24083
503d2be0
AS
24084# Break up conftest.defines because some shells have a limit on the size
24085# of here documents, and old seds have small limits too (100 cmds).
24086echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
edfaf76d 24087echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
503d2be0
AS
24088echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
24089echo ' :' >>$CONFIG_STATUS
24090rm -f conftest.tail
24091while grep . conftest.defines >/dev/null
24092do
24093 # Write a limited-size here document to $tmp/defines.sed.
24094 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
24095 # Speed up: don't consider the non `#define' lines.
edfaf76d 24096 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
503d2be0
AS
24097 # Work around the forget-to-reset-the-flag bug.
24098 echo 't clr' >>$CONFIG_STATUS
24099 echo ': clr' >>$CONFIG_STATUS
24100 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
24101 echo 'CEOF
24102 sed -f $tmp/defines.sed $tmp/in >$tmp/out
24103 rm -f $tmp/in
24104 mv $tmp/out $tmp/in
24105' >>$CONFIG_STATUS
24106 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
24107 rm -f conftest.defines
24108 mv conftest.tail conftest.defines
24109done
24110rm -f conftest.defines
6bae0ccf 24111echo ' fi # grep' >>$CONFIG_STATUS
503d2be0 24112echo >>$CONFIG_STATUS
ba4481b5 24113
503d2be0
AS
24114# Break up conftest.undefs because some shells have a limit on the size
24115# of here documents, and old seds have small limits too (100 cmds).
24116echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
ba4481b5 24117rm -f conftest.tail
503d2be0 24118while grep . conftest.undefs >/dev/null
ba4481b5 24119do
503d2be0
AS
24120 # Write a limited-size here document to $tmp/undefs.sed.
24121 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
24122 # Speed up: don't consider the non `#undef'
edfaf76d 24123 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
503d2be0
AS
24124 # Work around the forget-to-reset-the-flag bug.
24125 echo 't clr' >>$CONFIG_STATUS
24126 echo ': clr' >>$CONFIG_STATUS
24127 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
ba4481b5 24128 echo 'CEOF
503d2be0
AS
24129 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
24130 rm -f $tmp/in
24131 mv $tmp/out $tmp/in
24132' >>$CONFIG_STATUS
24133 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
24134 rm -f conftest.undefs
24135 mv conftest.tail conftest.undefs
ba4481b5 24136done
503d2be0
AS
24137rm -f conftest.undefs
24138
c0d27fcc 24139cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
24140 # Let's still pretend it is `configure' which instantiates (i.e., don't
24141 # use $as_me), people would be surprised to read:
c0d27fcc 24142 # /* config.h. Generated by config.status. */
503d2be0 24143 if test x"$ac_file" = x-; then
c0d27fcc 24144 echo "/* Generated by configure. */" >$tmp/config.h
ba4481b5 24145 else
c0d27fcc 24146 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
503d2be0
AS
24147 fi
24148 cat $tmp/in >>$tmp/config.h
24149 rm -f $tmp/in
24150 if test x"$ac_file" != x-; then
19650fd6 24151 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
c0d27fcc 24152 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
503d2be0
AS
24153echo "$as_me: $ac_file is unchanged" >&6;}
24154 else
c0d27fcc
MR
24155 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
24156$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
24157 X"$ac_file" : 'X\(//\)[^/]' \| \
24158 X"$ac_file" : 'X\(//\)$' \| \
24159 X"$ac_file" : 'X\(/\)' \| \
24160 . : '\(.\)' 2>/dev/null ||
503d2be0
AS
24161echo X"$ac_file" |
24162 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24163 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24164 /^X\(\/\/\)$/{ s//\1/; q; }
24165 /^X\(\/\).*/{ s//\1/; q; }
24166 s/.*/./; q'`
6bae0ccf
DL
24167 { if $as_mkdir_p; then
24168 mkdir -p "$ac_dir"
24169 else
24170 as_dir="$ac_dir"
24171 as_dirs=
24172 while test ! -d "$as_dir"; do
24173 as_dirs="$as_dir $as_dirs"
24174 as_dir=`(dirname "$as_dir") 2>/dev/null ||
24175$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
24176 X"$as_dir" : 'X\(//\)[^/]' \| \
24177 X"$as_dir" : 'X\(//\)$' \| \
24178 X"$as_dir" : 'X\(/\)' \| \
24179 . : '\(.\)' 2>/dev/null ||
6bae0ccf
DL
24180echo X"$as_dir" |
24181 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24182 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24183 /^X\(\/\/\)$/{ s//\1/; q; }
24184 /^X\(\/\).*/{ s//\1/; q; }
24185 s/.*/./; q'`
24186 done
24187 test ! -n "$as_dirs" || mkdir $as_dirs
24188 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
24189echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
24190 { (exit 1); exit 1; }; }; }
503d2be0 24191
503d2be0
AS
24192 rm -f $ac_file
24193 mv $tmp/config.h $ac_file
ba4481b5 24194 fi
503d2be0
AS
24195 else
24196 cat $tmp/config.h
24197 rm -f $tmp/config.h
ba4481b5 24198 fi
503d2be0 24199done
c0d27fcc
MR
24200_ACEOF
24201cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
24202
24203#
24204# CONFIG_COMMANDS section.
24205#
24206for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
24207 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
24208 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
c0d27fcc
MR
24209 ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
24210$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
24211 X"$ac_dest" : 'X\(//\)[^/]' \| \
24212 X"$ac_dest" : 'X\(//\)$' \| \
24213 X"$ac_dest" : 'X\(/\)' \| \
24214 . : '\(.\)' 2>/dev/null ||
c0d27fcc
MR
24215echo X"$ac_dest" |
24216 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24217 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24218 /^X\(\/\/\)$/{ s//\1/; q; }
24219 /^X\(\/\).*/{ s//\1/; q; }
24220 s/.*/./; q'`
edfaf76d
LK
24221 { if $as_mkdir_p; then
24222 mkdir -p "$ac_dir"
24223 else
24224 as_dir="$ac_dir"
24225 as_dirs=
24226 while test ! -d "$as_dir"; do
24227 as_dirs="$as_dir $as_dirs"
24228 as_dir=`(dirname "$as_dir") 2>/dev/null ||
24229$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24230 X"$as_dir" : 'X\(//\)[^/]' \| \
24231 X"$as_dir" : 'X\(//\)$' \| \
24232 X"$as_dir" : 'X\(/\)' \| \
24233 . : '\(.\)' 2>/dev/null ||
24234echo X"$as_dir" |
24235 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24236 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24237 /^X\(\/\/\)$/{ s//\1/; q; }
24238 /^X\(\/\).*/{ s//\1/; q; }
24239 s/.*/./; q'`
24240 done
24241 test ! -n "$as_dirs" || mkdir $as_dirs
24242 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
24243echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
24244 { (exit 1); exit 1; }; }; }
24245
c0d27fcc
MR
24246 ac_builddir=.
24247
24248if test "$ac_dir" != .; then
24249 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
24250 # A "../" for each directory in $ac_dir_suffix.
24251 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
24252else
24253 ac_dir_suffix= ac_top_builddir=
24254fi
24255
24256case $srcdir in
24257 .) # No --srcdir option. We are building in place.
24258 ac_srcdir=.
24259 if test -z "$ac_top_builddir"; then
24260 ac_top_srcdir=.
24261 else
24262 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
24263 fi ;;
24264 [\\/]* | ?:[\\/]* ) # Absolute path.
24265 ac_srcdir=$srcdir$ac_dir_suffix;
24266 ac_top_srcdir=$srcdir ;;
24267 *) # Relative path.
24268 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
24269 ac_top_srcdir=$ac_top_builddir$srcdir ;;
24270esac
edfaf76d
LK
24271
24272# Do not use `cd foo && pwd` to compute absolute paths, because
24273# the directories may not exist.
24274case `pwd` in
24275.) ac_abs_builddir="$ac_dir";;
24276*)
24277 case "$ac_dir" in
24278 .) ac_abs_builddir=`pwd`;;
24279 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
24280 *) ac_abs_builddir=`pwd`/"$ac_dir";;
24281 esac;;
24282esac
24283case $ac_abs_builddir in
24284.) ac_abs_top_builddir=${ac_top_builddir}.;;
24285*)
24286 case ${ac_top_builddir}. in
24287 .) ac_abs_top_builddir=$ac_abs_builddir;;
24288 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
24289 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
24290 esac;;
24291esac
24292case $ac_abs_builddir in
24293.) ac_abs_srcdir=$ac_srcdir;;
24294*)
24295 case $ac_srcdir in
24296 .) ac_abs_srcdir=$ac_abs_builddir;;
24297 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
24298 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
24299 esac;;
24300esac
24301case $ac_abs_builddir in
24302.) ac_abs_top_srcdir=$ac_top_srcdir;;
24303*)
24304 case $ac_top_srcdir in
24305 .) ac_abs_top_srcdir=$ac_abs_builddir;;
24306 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
24307 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
24308 esac;;
24309esac
ba4481b5 24310
c0d27fcc
MR
24311
24312 { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
24313echo "$as_me: executing $ac_dest commands" >&6;}
503d2be0
AS
24314 case $ac_dest in
24315 default )
ba4481b5
DL
24316
24317### Make the necessary directories, if they don't exist.
24318for dir in etc lisp ; do
24319 test -d ${dir} || mkdir ${dir}
24320done
24321
24322# Build src/Makefile from ${srcdir}/src/Makefile.c
24323# and lib-src/Makefile from ${srcdir}/lib-src/Makefile.c
24324# This must be done after src/config.h is built, since we rely on that file.
24325
24326# Now get this: Some word that is part of the ${srcdir} directory name
24327# or the ${configuration} value might, just might, happen to be an
24328# identifier like `sun4' or `i386' or something, and be predefined by
24329# the C preprocessor to some helpful value like 1, or maybe the empty
24330# string. Needless to say consequent macro substitutions are less
24331# than conducive to the makefile finding the correct directory.
24332undefs="`echo $top_srcdir $configuration $canonical |
24333sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/ *$//' \
24334 -e 's/ */ -U/g' -e 's/-U[0-9][^ ]*//g' \
24335`"
24336
24337echo creating src/epaths.h
4aa6b955 24338${MAKE-make} epaths-force
ba4481b5 24339
1c203d4c
DL
24340# As of 2000-11-19, newest development versions of GNU cpp preprocess
24341# `..' to `. .' unless invoked with -traditional
24342
d0e9bfd2 24343if test "x$GCC" = xyes && test "x$CPP_NEED_TRADITIONAL" = xyes; then
1c203d4c
DL
24344 CPPFLAGS="$CPPFLAGS -traditional"
24345fi
24346
ba4481b5
DL
24347echo creating lib-src/Makefile
24348( cd lib-src
24349 rm -f junk.c junk1.c junk2.c
24350 sed -e '/start of cpp stuff/q' \
24351 < Makefile.c > junk1.c
24352 sed -e '1,/start of cpp stuff/d'\
9a72e4c1 24353 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
ba4481b5 24354 < Makefile.c > junk.c
503d2be0 24355 $CPP $undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
ba4481b5
DL
24356 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
24357 cat junk1.c junk2.c > Makefile.new
24358 rm -f junk.c junk1.c junk2.c
24359 chmod 444 Makefile.new
24360 mv -f Makefile.new Makefile
24361)
24362
24363echo creating src/Makefile
24364( cd src
24365 rm -f junk.c junk1.c junk2.c
24366 sed -e '/start of cpp stuff/q' \
24367 < Makefile.c > junk1.c
24368 sed -e '1,/start of cpp stuff/d'\
9a72e4c1 24369 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
ba4481b5 24370 < Makefile.c > junk.c
503d2be0 24371 $CPP $undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
ba4481b5
DL
24372 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
24373 cat junk1.c junk2.c > Makefile.new
24374 rm -f junk.c junk1.c junk2.c
24375 chmod 444 Makefile.new
24376 mv -f Makefile.new Makefile
24377)
24378
503d2be0 24379if test ! -f src/.gdbinit && test -f $srcdir/src/.gdbinit; then
ba4481b5 24380 echo creating src/.gdbinit
503d2be0 24381 echo source $srcdir/src/.gdbinit > src/.gdbinit
ba4481b5
DL
24382fi
24383
24384# This is how we know whether to re-run configure in certain cases.
24385touch src/config.stamp
24386
503d2be0
AS
24387 ;;
24388 esac
24389done
c0d27fcc 24390_ACEOF
503d2be0 24391
c0d27fcc 24392cat >>$CONFIG_STATUS <<\_ACEOF
ba4481b5 24393
503d2be0 24394{ (exit 0); exit 0; }
c0d27fcc 24395_ACEOF
ba4481b5 24396chmod +x $CONFIG_STATUS
503d2be0
AS
24397ac_clean_files=$ac_clean_files_save
24398
c0d27fcc 24399
503d2be0
AS
24400# configure is writing to config.log, and then calls config.status.
24401# config.status does its own redirection, appending to config.log.
24402# Unfortunately, on DOS this fails, as config.log is still kept open
24403# by configure, so config.status won't be able to write to it; its
24404# output is simply discarded. So we exec the FD to /dev/null,
24405# effectively closing config.log, so it can be properly (re)opened and
24406# appended to by config.status. When coming back to configure, we
24407# need to make the FD available again.
24408if test "$no_create" != yes; then
24409 ac_cs_success=:
19650fd6
AS
24410 ac_config_status_args=
24411 test "$silent" = yes &&
24412 ac_config_status_args="$ac_config_status_args --quiet"
503d2be0 24413 exec 5>/dev/null
19650fd6 24414 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
503d2be0
AS
24415 exec 5>>config.log
24416 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
24417 # would make configure fail if this is the last instruction.
24418 $ac_cs_success || { (exit 1); exit 1; }
24419fi
f5f47add 24420
c0d27fcc 24421