(sit_for): Perform redisplay even if input is pending
[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
e143ad11 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:'\
1357'${datadir}/emacs/site-lisp:${datadir}/emacs/${version}/leim'
1358lisppath='${locallisppath}:${lispdir}'
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 ;;
1720 i[3456]86-*-freebsd*) machine=intel386 ;;
01abe918 1721 amd64-*-freebsd*|x86_64-*-freebsd*) machine=amdx86-64 ;;
1096bcc0
GM
1722 esac
1723 ;;
1724
ba4481b5
DL
1725 ## NetBSD ports
1726 *-*-netbsd* )
1727 opsys=netbsd
dd038e26 1728 if test -f /usr/lib/crti.o; then
f57bd967
DL
1729
1730cat >>confdefs.h <<\_ACEOF
1731#define HAVE_CRTIN
dd038e26
AS
1732_ACEOF
1733
1734 fi
1735
ba4481b5
DL
1736 case "${canonical}" in
1737 alpha*-*-netbsd*) machine=alpha ;;
1738 i[3456]86-*-netbsd*) machine=intel386 ;;
1739 m68k-*-netbsd*)
1740 # This is somewhat bogus.
1741 machine=hp9000s300 ;;
1742 powerpc-apple-netbsd*) machine=macppc ;;
1743 mips-*-netbsd*) machine=pmax ;;
2df636f4 1744 mipsel-*-netbsd*) machine=pmax ;;
97836269 1745 mipseb-*-netbsd*) machine=pmax ;;
ba4481b5 1746 ns32k-*-netbsd*) machine=ns32000 ;;
3a64eef5 1747 powerpc-*-netbsd*) machine=macppc ;;
71c9ec51 1748 sparc*-*-netbsd*) machine=sparc ;;
ba4481b5 1749 vax-*-netbsd*) machine=vax ;;
2df636f4 1750 arm-*-netbsd*) machine=arm ;;
ba4481b5
DL
1751 esac
1752 ;;
1753
1754 ## OpenBSD ports
1755 *-*-openbsd* )
1756 opsys=openbsd
1757 case "${canonical}" in
1758 alpha*-*-openbsd*) machine=alpha ;;
1759 i386-*-openbsd*) machine=intel386 ;;
1760 m68k-*-openbsd*) machine=hp9000s300 ;;
1761 mipsel-*-openbsd*) machine=pmax ;;
1762 ns32k-*-openbsd*) machine=ns32000 ;;
1763 sparc-*-openbsd*) machine=sparc ;;
1764 vax-*-openbsd*) machine=vax ;;
1765 esac
1766 ;;
1767
10a3b1a1
EZ
1768 ## LynxOS ports
1769 *-*-lynxos* )
1770 opsys=lynxos
1771 case "${canonical}" in
1772 i[3456]86-*-lynxos*) machine=intel386 ;;
1773 powerpc-*-lynxos*) machine=powerpc ;;
1774 esac
1775 ;;
1776
ba4481b5
DL
1777 ## Acorn RISCiX:
1778 arm-acorn-riscix1.1* )
1779 machine=acorn opsys=riscix1-1
1780 ;;
1781 arm-acorn-riscix1.2* | arm-acorn-riscix )
1782 ## This name is riscix12 instead of riscix1.2
1783 ## to avoid a file name conflict on MSDOS.
1784 machine=acorn opsys=riscix12
1785 ;;
1786
1787 ## BSDI ports
1788 *-*-bsdi* )
1789 opsys=bsdi
1790 case "${canonical}" in
1791 i[345]86-*-bsdi*) machine=intel386 ;;
1792 sparc-*-bsdi*) machine=sparc ;;
3aeecf97 1793 powerpc-*-bsdi*) machine=macppc ;;
ba4481b5
DL
1794 esac
1795 case "${canonical}" in
1796 *-*-bsd386* | *-*-bsdi1* ) opsys=bsd386 ;;
1797 *-*-bsdi2.0* ) opsys=bsdos2 ;;
1798 *-*-bsdi2* ) opsys=bsdos2-1 ;;
1799 *-*-bsdi3* ) opsys=bsdos3 ;;
1d06fc82 1800 *-*-bsdi[45]* ) opsys=bsdos4 ;;
ba4481b5
DL
1801 esac
1802 ;;
1803
1804 ## Alliant machines
1805 ## Strictly speaking, we need the version of the alliant operating
1806 ## system to choose the right machine file, but currently the
1807 ## configuration name doesn't tell us enough to choose the right
1808 ## one; we need to give alliants their own operating system name to
1809 ## do this right. When someone cares, they can help us.
1810 fx80-alliant-* )
1811 machine=alliant4 opsys=bsd4-2
1812 ;;
1813 i860-alliant-* )
1814 machine=alliant-2800 opsys=bsd4-3
1815 ;;
1816
1817 ## Alpha (DEC) machines.
1818 alpha*-dec-osf* )
1819 machine=alpha opsys=osf1
1820 # This is needed to find X11R6.1 libraries for certain tests.
1821 NON_GCC_LINK_TEST_OPTIONS=-Wl,-rpath,/usr/X11R6/lib
1822 GCC_LINK_TEST_OPTIONS=-Wl,-rpath,/usr/X11R6/lib
34979055
DL
1823 # NON_GNU_CPP is necessary on 5.0 to avoid mangling src/Makefile
1824 # due to non-traditional preprocessing with the current compiler
1825 # defaults. OSF 4 can also have that compiler version, and there
1826 # seems always to have been a usable /usr/bin/cpp.
1827 NON_GNU_CPP=/usr/bin/cpp
ca512671 1828 case "${canonical}" in
a55b799a 1829 alpha*-dec-osf[5-9]*)
bb17930d 1830 opsys=osf5-0 ;;
ca512671 1831 esac
ba4481b5
DL
1832 ;;
1833
1834 alpha*-*-linux-gnu* )
1835 machine=alpha opsys=gnu-linux
1836 ;;
1837
c4bb2108
DL
1838 arm*-*-linux-gnu* )
1839 machine=arm opsys=gnu-linux
1840 ;;
1841
ba4481b5
DL
1842 ## Altos 3068
1843 m68*-altos-sysv* )
1844 machine=altos opsys=usg5-2
1845 ;;
1846
1847 ## Amdahl UTS
1848 580-amdahl-sysv* )
1849 machine=amdahl opsys=usg5-2-2
1850 ;;
1851
1852 ## Apollo, Domain/OS
1853 m68*-apollo-* )
1854 machine=apollo opsys=bsd4-3
1855 ;;
1856
1857 ## AT&T 3b2, 3b5, 3b15, 3b20
1858 we32k-att-sysv* )
1859 machine=att3b opsys=usg5-2-2
1860 ;;
1861
1862 ## AT&T 3b1 - The Mighty Unix PC!
1863 m68*-att-sysv* )
1864 machine=7300 opsys=usg5-2-2
1865 ;;
1866
1867 ## Bull dpx20
1868 rs6000-bull-bosx* )
1869 machine=ibmrs6000 opsys=aix3-2
1870 ;;
1871
1872 ## Bull dpx2
1873 m68*-bull-sysv3* )
1874 machine=dpx2 opsys=usg5-3
1875 ;;
1876
1877 ## Bull sps7
1878 m68*-bull-sysv2* )
1879 machine=sps7 opsys=usg5-2
1880 ;;
1881
1882 ## CCI 5/32, 6/32 -- see "Tahoe".
1883
1884 ## Celerity
1885 ## I don't know what configuration name to use for this; config.sub
1886 ## doesn't seem to know anything about it. Hey, Celerity users, get
1887 ## in touch with us!
1888 celerity-celerity-bsd* )
1889 machine=celerity opsys=bsd4-2
1890 ;;
1891
1892 ## Clipper
1893 ## What operating systems does this chip run that Emacs has been
1894 ## tested on?
1895 clipper-* )
1896 machine=clipper
1897 ## We'll use the catch-all code at the bottom to guess the
1898 ## operating system.
1899 ;;
1900
df645f7c
AS
1901 ## Compaq Nonstop
1902 mips-compaq-nonstopux* )
1903 machine=nonstopux opsys=nonstopux
1904 ;;
1905
ba4481b5
DL
1906 ## Convex
1907 *-convex-bsd* | *-convex-convexos* )
1908 machine=convex opsys=bsd4-3
1909 ## Prevents spurious white space in makefiles - d.m.cooke@larc.nasa.gov
1910 NON_GNU_CPP="cc -E -P"
1911 ;;
1912
1913 ## Cubix QBx/386
1914 i[3456]86-cubix-sysv* )
1915 machine=intel386 opsys=usg5-3
1916 ;;
1917
1918 ## Cydra 5
1919 cydra*-cydrome-sysv* )
1920 machine=cydra5 opsys=usg5-3
1921 ;;
1922
1923 ## Data General AViiON Machines
1924 ## DG changed naming conventions with the release of 5.4.4.10, they
1925 ## dropped the initial 5.4 but left the intervening R. Because of the
1926 ## R this shouldn't conflict with older versions of the OS (which I
1927 ## think were named like dgux4.*). In addition, DG new AViiONs series
1928 ## uses either Motorola M88k or Intel Pentium CPUs.
1929 m88k-dg-dguxR4.* | m88k-dg-dgux4* )
1930 machine=aviion opsys=dgux4
1931 ;;
1932 m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* )
1933 ## This name is dgux5-4-3 instead of dgux5-4r3
1934 ## to avoid a file name conflict on MSDOS.
1935 machine=aviion opsys=dgux5-4-3
1936 ;;
1937 m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* )
1938 machine=aviion opsys=dgux5-4r2
1939 ;;
1940 m88k-dg-dgux* )
1941 machine=aviion opsys=dgux
1942 ;;
1943
1944 ## Data General AViiON Intel (x86) Machines
1945 ## Exists from 5.4.3 (current i586-dg-dguxR4.11)
1946 ## Ehud Karni, 1998-may-30, ehud@unix.simonwiesel.co.il
1947 i[345]86-dg-dguxR4* )
1948 machine=aviion-intel opsys=dgux4
1949 ;;
1950
1951 ## DECstations
1952 mips-dec-ultrix[0-3].* | mips-dec-ultrix4.0* | mips-dec-bsd4.2* )
1953 machine=pmax opsys=bsd4-2
1954 ;;
1955 mips-dec-ultrix4.[12]* | mips-dec-bsd* )
1956 machine=pmax opsys=bsd4-3
1957 ;;
1958 mips-dec-ultrix* )
1959 machine=pmax opsys=ultrix4-3
1960 ;;
1961 mips-dec-osf* )
1962 machine=pmax opsys=osf1
1963 ;;
1964 mips-dec-mach_bsd4.3* )
1965 machine=pmax opsys=mach-bsd4-3
1966 ;;
1967
cd890796
JD
1968 ## Motorola Delta machines
1969 m68k-motorola-sysv* | m68000-motorola-sysv* )
1970 machine=delta opsys=usg5-3
1971 if test -z "`type gnucc | grep 'not found'`"
1972 then
1973 if test -s /etc/167config
1974 then CC="gnucc -m68040"
1975 else CC="gnucc -m68881"
1976 fi
1977 else
1978 if test -z "`type gcc | grep 'not found'`"
1979 then CC=gcc
1980 else CC=cc
1981 fi
1982 fi
1983 ;;
ba4481b5
DL
1984 m88k-motorola-sysv4* )
1985 # jbotte@bnr.ca says that UNIX_System_V <hostName> 4.0 R40V4.3 m88k mc88110
1986 # needs POSIX_SIGNALS and therefore needs usg5-4-2.
1987 # I hope there are not other 4.0 versions for this machine
1988 # which really need usg5-4 instead.
1989 machine=delta88k opsys=usg5-4-2
1990 ;;
1991 m88k-motorola-sysv* | m88k-motorola-m88kbcs* )
1992 machine=delta88k opsys=usg5-3
1993 ;;
1994
1995 ## Dual machines
1996 m68*-dual-sysv* )
1997 machine=dual opsys=usg5-2
1998 ;;
1999 m68*-dual-uniplus* )
2000 machine=dual opsys=unipl5-2
2001 ;;
2002
2003 ## Elxsi 6400
2004 elxsi-elxsi-sysv* )
2005 machine=elxsi opsys=usg5-2
2006 ;;
2007
2008 ## Encore machines
2009 ns16k-encore-bsd* )
2010 machine=ns16000 opsys=umax
2011 ;;
2012
65171e3a
DL
2013 ## The GEC 63 - apparently, this port isn't really finished yet.
2014 # I'm sure we finished off the last of the machines, though. -- fx
ba4481b5
DL
2015
2016 ## Gould Power Node and NP1
2017 pn-gould-bsd4.2* )
2018 machine=gould opsys=bsd4-2
2019 ;;
2020 pn-gould-bsd4.3* )
2021 machine=gould opsys=bsd4-3
2022 ;;
2023 np1-gould-bsd* )
2024 machine=gould-np1 opsys=bsd4-3
2025 ;;
2026
2027 ## Harris Night Hawk machines running CX/UX (a 5000 looks just like a 4000
2028 ## as far as Emacs is concerned).
2029 m88k-harris-cxux* )
2030 # Build needs to be different on 7.0 and later releases
2031 case "`uname -r`" in
2032 [56].[0-9] ) machine=nh4000 opsys=cxux ;;
2033 [7].[0-9] ) machine=nh4000 opsys=cxux7 ;;
2034 esac
2035 NON_GNU_CPP="/lib/cpp"
2036 ;;
2037 ## Harris ecx or gcx running CX/UX (Series 1200, Series 3000)
2038 m68k-harris-cxux* )
2039 machine=nh3000 opsys=cxux
2040 ;;
2041 ## Harris power pc NightHawk running Power UNIX (Series 6000)
2042 powerpc-harris-powerunix )
2043 machine=nh6000 opsys=powerunix
2044 NON_GNU_CPP="cc -Xo -E -P"
2045 ;;
2046 ## SR2001/SR2201 running HI-UX/MPP
2047 hppa1.1-hitachi-hiuxmpp* )
2048 machine=sr2k opsys=hiuxmpp
2049 ;;
89a336fa
GM
2050 hppa1.1-hitachi-hiuxwe2* )
2051 machine=sr2k opsys=hiuxwe2
2052 ;;
ba4481b5
DL
2053 ## Honeywell XPS100
2054 xps*-honeywell-sysv* )
2055 machine=xps100 opsys=usg5-2
2056 ;;
2057
2058 ## HP 9000 series 200 or 300
2059 m68*-hp-bsd* )
2060 machine=hp9000s300 opsys=bsd4-3
2061 ;;
2062 ## HP/UX 7, 8, 9, and 10 are supported on these machines.
2063 m68*-hp-hpux* )
2064 case "`uname -r`" in
2065 ## Someone's system reports A.B8.05 for this.
2066 ## I wonder what other possibilities there are.
2067 *.B8.* ) machine=hp9000s300 opsys=hpux8 ;;
2068 *.08.* ) machine=hp9000s300 opsys=hpux8 ;;
2069 *.09.* ) machine=hp9000s300 opsys=hpux9 ;;
2070 *.1[0-9].* ) machine=hp9000s300 opsys=hpux9shr ;;
2071 *) machine=hp9000s300 opsys=hpux ;;
2072 esac
2073 ;;
2074
2075 ## HP 9000 series 700 and 800, running HP/UX
2076 hppa*-hp-hpux7* )
2077 machine=hp800 opsys=hpux
2078 ;;
2079 hppa*-hp-hpux8* )
2080 machine=hp800 opsys=hpux8
2081 ;;
2082 hppa*-hp-hpux9shr* )
2083 machine=hp800 opsys=hpux9shr
2084 ;;
2085 hppa*-hp-hpux9* )
2086 machine=hp800 opsys=hpux9
2087 ;;
b0e44248
RB
2088 hppa*-hp-hpux10.2* )
2089 machine=hp800 opsys=hpux10-20
2090 ;;
cc227489 2091 hppa*-hp-hpux10* )
ba4481b5
DL
2092 machine=hp800 opsys=hpux10
2093 ;;
cc227489
MB
2094 hppa*-hp-hpux1[1-9]* )
2095 machine=hp800 opsys=hpux11
7c00e1e9 2096 CFLAGS="-D_INCLUDE__STDC_A1_SOURCE $CFLAGS"
cc227489 2097 ;;
ba4481b5 2098
409d9577
GM
2099 hppa*-*-linux-gnu* )
2100 machine=hp800 opsys=gnu-linux
2101 ;;
2102
ba4481b5
DL
2103 ## HP 9000 series 700 and 800, running HP/UX
2104 hppa*-hp-hpux* )
2105 ## Cross-compilation? Nah!
2106 case "`uname -r`" in
2107 ## Someone's system reports A.B8.05 for this.
2108 ## I wonder what other possibilities there are.
2109 *.B8.* ) machine=hp800 opsys=hpux8 ;;
2110 *.08.* ) machine=hp800 opsys=hpux8 ;;
2111 *.09.* ) machine=hp800 opsys=hpux9 ;;
2112 *) machine=hp800 opsys=hpux10 ;;
2113 esac
2114 ;;
2115 hppa*-*-nextstep* )
2116 machine=hp800 opsys=nextstep
2117 ;;
2118
2119 ## Orion machines
2120 orion-orion-bsd* )
2121 machine=orion opsys=bsd4-2
2122 ;;
2123 clipper-orion-bsd* )
2124 machine=orion105 opsys=bsd4-2
2125 ;;
2126
2127 ## IBM machines
2128 i[3456]86-ibm-aix1.1* )
2129 machine=ibmps2-aix opsys=usg5-2-2
2130 ;;
2131 i[3456]86-ibm-aix1.[23]* | i[3456]86-ibm-aix* )
2132 machine=ibmps2-aix opsys=usg5-3
2133 ;;
2134 i370-ibm-aix*)
2135 machine=ibm370aix opsys=usg5-3
2136 ;;
55597d70 2137 s390-*-linux-gnu* )
138f0859
GM
2138 machine=ibms390 opsys=gnu-linux
2139 ;;
bcdb1378
EZ
2140 s390x-*-linux-gnu* )
2141 machine=ibms390x opsys=gnu-linux
2142 ;;
ba4481b5
DL
2143 rs6000-ibm-aix3.1* | powerpc-ibm-aix3.1* )
2144 machine=ibmrs6000 opsys=aix3-1
2145 ;;
2146 rs6000-ibm-aix3.2.5 | powerpc-ibm-aix3.2.5 )
2147 machine=ibmrs6000 opsys=aix3-2-5
2148 ;;
2149 rs6000-ibm-aix4.1* | powerpc-ibm-aix4.1* )
2150 machine=ibmrs6000 opsys=aix4-1
2151 ;;
2152 rs6000-ibm-aix4.2* | powerpc-ibm-aix4.2* )
2153 machine=ibmrs6000 opsys=aix4-2
2154 ;;
55597d70 2155 rs6000-ibm-aix5* | powerpc-ibm-aix5* )
d6b82250
EZ
2156 machine=ibmrs6000 opsys=aix4-2
2157 ;;
ba4481b5
DL
2158 rs6000-ibm-aix4.0* | powerpc-ibm-aix4.0* )
2159 machine=ibmrs6000 opsys=aix4
2160 ;;
2161 rs6000-ibm-aix4* | powerpc-ibm-aix4* )
2162 machine=ibmrs6000 opsys=aix4-1
2163 ;;
2164 rs6000-ibm-aix* | powerpc-ibm-aix* )
2165 machine=ibmrs6000 opsys=aix3-2
2166 ;;
2167 romp-ibm-bsd4.3* )
2168 machine=ibmrt opsys=bsd4-3
2169 ;;
2170 romp-ibm-bsd4.2* )
2171 machine=ibmrt opsys=bsd4-2
2172 ;;
2173 romp-ibm-aos4.3* )
2174 machine=ibmrt opsys=bsd4-3
2175 ;;
2176 romp-ibm-aos4.2* )
2177 machine=ibmrt opsys=bsd4-2
2178 ;;
2179 romp-ibm-aos* )
2180 machine=ibmrt opsys=bsd4-3
2181 ;;
2182 romp-ibm-bsd* )
2183 machine=ibmrt opsys=bsd4-3
2184 ;;
2185 romp-ibm-aix* )
2186 machine=ibmrt-aix opsys=usg5-2-2
2187 ;;
2188
2189 ## Integrated Solutions `Optimum V'
2190 m68*-isi-bsd4.2* )
2191 machine=isi-ov opsys=bsd4-2
2192 ;;
2193 m68*-isi-bsd4.3* )
2194 machine=isi-ov opsys=bsd4-3
2195 ;;
2196
2197 ## Intel 386 machines where we do care about the manufacturer
2198 i[3456]86-intsys-sysv* )
2199 machine=is386 opsys=usg5-2-2
2200 ;;
2201
2202 ## Prime EXL
2203 i[3456]86-prime-sysv* )
2204 machine=i386 opsys=usg5-3
2205 ;;
2206
2207 ## Sequent Symmetry running Dynix
2208 i[3456]86-sequent-bsd* )
2209 machine=symmetry opsys=bsd4-3
2210 ;;
2211
2212 ## Sequent Symmetry running ptx 4, which is a modified SVR4.
2213 i[3456]86-sequent-ptx4* | i[3456]86-sequent-sysv4* )
2214 machine=sequent-ptx opsys=ptx4
2215 NON_GNU_CPP=/lib/cpp
2216 ;;
2217
2218 ## Sequent Symmetry running DYNIX/ptx
2219 ## Use the old cpp rather than the newer ANSI one.
2220 i[3456]86-sequent-ptx* )
2221 machine=sequent-ptx opsys=ptx
2222 NON_GNU_CPP="/lib/cpp"
2223 ;;
2224
2225 ## ncr machine running svr4.3.
2226 i[3456]86-ncr-sysv4.3 )
2227 machine=ncr386 opsys=usg5-4-3
2228 ;;
2229
2230 ## Unspecified sysv on an ncr machine defaults to svr4.2.
2231 ## (Plain usg5-4 doesn't turn on POSIX signals, which we need.)
2232 i[3456]86-ncr-sysv* )
2233 machine=ncr386 opsys=usg5-4-2
2234 ;;
2235
2236 ## Intel Paragon OSF/1
2237 i860-intel-osf1* )
2238 machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp
2239 ;;
2240
2241 ## Intel 860
2242 i860-*-sysv4* )
2243 machine=i860 opsys=usg5-4
2244 NON_GNU_CC="/bin/cc" # Ie, not the one in /usr/ucb/cc.
2245 NON_GNU_CPP="/usr/ccs/lib/cpp" # cc -E tokenizes macro expansion.
2246 ;;
2247
c76e04a8
GM
2248 ## Macintosh PowerPC
2249 powerpc*-*-linux-gnu* )
2250 machine=macppc opsys=gnu-linux
2251 ;;
2252
ba4481b5
DL
2253 ## Masscomp machines
2254 m68*-masscomp-rtu* )
2255 machine=masscomp opsys=rtu
2256 ;;
2257
2258 ## Megatest machines
2259 m68*-megatest-bsd* )
2260 machine=mega68 opsys=bsd4-2
2261 ;;
2262
2263 ## Workstations sold by MIPS
2264 ## This is not necessarily all workstations using the MIPS processor -
2265 ## Irises are produced by SGI, and DECstations by DEC.
2266
2267 ## etc/MACHINES lists mips.h and mips4.h as possible machine files,
2268 ## and usg5-2-2 and bsd4-3 as possible OS files. The only guidance
2269 ## it gives for choosing between the alternatives seems to be "Use
2270 ## -machine=mips4 for RISCOS version 4; use -opsystem=bsd4-3 with
2271 ## the BSD world." I'll assume that these are instructions for
2272 ## handling two odd situations, and that every other situation
2273 ## should use mips.h and usg5-2-2, they being listed first.
2274 mips-mips-usg* )
2275 machine=mips4
2276 ## Fall through to the general code at the bottom to decide on the OS.
2277 ;;
2278 mips-mips-riscos4* )
2279 machine=mips4 opsys=bsd4-3
2280 NON_GNU_CC="cc -systype bsd43"
2281 NON_GNU_CPP="cc -systype bsd43 -E"
2282 ;;
2283 mips-mips-riscos5* )
2284 machine=mips4 opsys=riscos5
2285 NON_GNU_CC="cc -systype bsd43"
2286 NON_GNU_CPP="cc -systype bsd43 -E"
2287 ;;
2288 mips-mips-bsd* )
2289 machine=mips opsys=bsd4-3
2290 ;;
2291 mips-mips-* )
2292 machine=mips opsys=usg5-2-2
2293 ;;
2294
2295 ## NeXT
2296 m68*-next-* | m68k-*-nextstep* )
2297 machine=m68k opsys=nextstep
2298 ;;
2299
2300 ## The complete machine from National Semiconductor
2301 ns32k-ns-genix* )
2302 machine=ns32000 opsys=usg5-2
2303 ;;
2304
2305 ## NCR machines
2306 m68*-ncr-sysv2* | m68*-ncr-sysvr2* )
2307 machine=tower32 opsys=usg5-2-2
2308 ;;
2309 m68*-ncr-sysv3* | m68*-ncr-sysvr3* )
2310 machine=tower32v3 opsys=usg5-3
2311 ;;
2312
2313 ## NEC EWS4800
2314 mips-nec-sysv4*)
2315 machine=ews4800 opsys=ux4800
2316 ;;
2317
2318 ## Nixdorf Targon 31
2319 m68*-nixdorf-sysv* )
2320 machine=targon31 opsys=usg5-2-2
2321 ;;
2322
2323 ## Nu (TI or LMI)
2324 m68*-nu-sysv* )
2325 machine=nu opsys=usg5-2
2326 ;;
2327
2328 ## Plexus
2329 m68*-plexus-sysv* )
2330 machine=plexus opsys=usg5-2
2331 ;;
2332
ba4481b5
DL
2333 ## Pyramid machines
2334 ## I don't really have any idea what sort of processor the Pyramid has,
2335 ## so I'm assuming it is its own architecture.
2336 pyramid-pyramid-bsd* )
2337 machine=pyramid opsys=bsd4-2
2338 ;;
2339
2340 ## Sequent Balance
2341 ns32k-sequent-bsd4.2* )
2342 machine=sequent opsys=bsd4-2
2343 ;;
2344 ns32k-sequent-bsd4.3* )
2345 machine=sequent opsys=bsd4-3
2346 ;;
2347
2348 ## Siemens Nixdorf
2349 mips-siemens-sysv* | mips-sni-sysv*)
2350 machine=mips-siemens opsys=usg5-4
2351 NON_GNU_CC=/usr/ccs/bin/cc
2352 NON_GNU_CPP=/usr/ccs/lib/cpp
2353 ;;
2354
2355 ## Silicon Graphics machines
2356 ## Iris 2500 and Iris 2500 Turbo (aka the Iris 3030)
2357 m68*-sgi-iris3.5* )
2358 machine=irist opsys=iris3-5
2359 ;;
2360 m68*-sgi-iris3.6* | m68*-sgi-iris*)
2361 machine=irist opsys=iris3-6
2362 ;;
2363 ## Iris 4D
2364 mips-sgi-irix3* )
2365 machine=iris4d opsys=irix3-3
2366 ;;
2367 mips-sgi-irix4* )
2368 machine=iris4d opsys=irix4-0
2369 ;;
2370 mips-sgi-irix6.5 )
2371 machine=iris4d opsys=irix6-5
946173ad
DL
2372 # Without defining _LANGUAGE_C, things get masked out in the headers
2373 # so that, for instance, grepping for `free' in stdlib.h fails and
2374 # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
2375 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
d42122a3 2376 NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C"
ba4481b5
DL
2377 ;;
2378 mips-sgi-irix6* )
2379 machine=iris4d opsys=irix6-0
c4bb2108 2380 # It's not clear whether -D_LANGUAGE_C is necessary as it is for 6.5,
946173ad
DL
2381 # but presumably it does no harm.
2382 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
d42122a3 2383 # -32 probably isn't necessary in later v.6s -- anyone know which?
ba4481b5
DL
2384 NON_GCC_TEST_OPTIONS=-32
2385 ;;
2386 mips-sgi-irix5.[01]* )
2387 machine=iris4d opsys=irix5-0
2388 ;;
2389 mips-sgi-irix5* | mips-sgi-irix* )
2390 machine=iris4d opsys=irix5-2
2391 ;;
2392
2393 ## SONY machines
2394 m68*-sony-bsd4.2* )
2395 machine=news opsys=bsd4-2
2396 ;;
2397 m68*-sony-bsd4.3* )
2398 machine=news opsys=bsd4-3
2399 ;;
2400 m68*-sony-newsos3* | m68*-sony-news3*)
2401 machine=news opsys=bsd4-3
2402 ;;
2403 mips-sony-bsd* | mips-sony-newsos4* | mips-sony-news4*)
2404 machine=news-risc opsys=bsd4-3
2405 ;;
2406 mips-sony-newsos6* )
2407 machine=news-r6 opsys=newsos6
2408 ;;
2409 mips-sony-news* )
2410 machine=news-risc opsys=newsos5
2411 ;;
2412
2413 ## Stride
2414 m68*-stride-sysv* )
2415 machine=stride opsys=usg5-2
2416 ;;
2417
2418 ## Suns
2419 sparc-*-linux-gnu* | sparc64-*-linux-gnu* )
2420 machine=sparc opsys=gnu-linux
2421 ;;
2422
d054101f 2423 *-auspex-sunos* | *-sun-sunos* | *-sun-bsd* | *-sun-solaris* \
ba4481b5
DL
2424 | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* | powerpc*-*-solaris2* \
2425 | rs6000-*-solaris2*)
2426 case "${canonical}" in
2427 m68*-sunos1* ) machine=sun1 ;;
2428 m68*-sunos2* ) machine=sun2 ;;
2429 m68* ) machine=sun3 ;;
2430 i[3456]86-sun-sunos[34]* ) machine=sun386 ;;
2431 i[3456]86-*-* ) machine=intel386 ;;
2432 powerpcle* ) machine=powerpcle ;;
2433 powerpc* | rs6000* ) machine=ibmrs6000 ;;
2434 sparc* ) machine=sparc ;;
2435 * ) unported=yes ;;
2436 esac
2437 case "${canonical}" in
2438 ## The Sun386 didn't get past 4.0.
2439 i[3456]86-*-sunos4 ) opsys=sunos4-0 ;;
2440 *-sunos4.0* ) opsys=sunos4-0 ;;
2441 *-sunos4.1.[3-9]*noshare )
2442 ## This name is sunos413 instead of sunos4-1-3
2443 ## to avoid a file name conflict on MSDOS.
2444 opsys=sunos413
2445 NON_GNU_CPP=/usr/lib/cpp
2446 NON_GCC_TEST_OPTIONS=-Bstatic
2447 GCC_TEST_OPTIONS=-static
2448 ;;
2449 *-sunos4.1.[3-9]* | *-sunos4shr*)
2450 opsys=sunos4shr
2451 NON_GNU_CPP=/usr/lib/cpp
2452 ;;
2453 *-sunos4* | *-sunos )
2454 opsys=sunos4-1
2455 NON_GCC_TEST_OPTIONS=-Bstatic
2456 GCC_TEST_OPTIONS=-static
2457 ;;
2458 *-sunos5.3* | *-solaris2.3* )
2459 opsys=sol2-3
2460 NON_GNU_CPP=/usr/ccs/lib/cpp
2461 ;;
2462 *-sunos5.4* | *-solaris2.4* )
2463 opsys=sol2-4
2464 NON_GNU_CPP=/usr/ccs/lib/cpp
2465 RANLIB="ar -ts"
2466 ;;
2467 *-sunos5.5* | *-solaris2.5* )
2468 opsys=sol2-5
2469 NON_GNU_CPP=/usr/ccs/lib/cpp
2470 RANLIB="ar -ts"
2471 ;;
8e967cf7
MR
2472 *-sunos5.6* | *-solaris2.6* )
2473 opsys=sol2-6
2474 NON_GNU_CPP=/usr/ccs/lib/cpp
2475 RANLIB="ar -ts"
2476 ;;
ba4481b5 2477 *-sunos5* | *-solaris* )
9e71690e 2478 opsys=sol2-6
ba4481b5
DL
2479 NON_GNU_CPP=/usr/ccs/lib/cpp
2480 ;;
2481 * ) opsys=bsd4-2 ;;
2482 esac
2483 ## Watch out for a compiler that we know will not work.
2484 case "${canonical}" in
2485 *-solaris* | *-sunos5* )
2486 if [ "x$CC" = x/usr/ucb/cc ]; then
2487 ## /usr/ucb/cc doesn't work;
2488 ## we should find some other compiler that does work.
2489 unset CC
2490 fi
2491 ;;
2492 *) ;;
2493 esac
2494 ;;
2495 sparc-*-nextstep* )
2496 machine=sparc opsys=nextstep
2497 ;;
2498
2499 ## Tadpole 68k
2500 m68*-tadpole-sysv* )
2501 machine=tad68k opsys=usg5-3
2502 ;;
2503
2504 ## Tahoe machines
2505 tahoe-tahoe-bsd4.2* )
2506 machine=tahoe opsys=bsd4-2
2507 ;;
2508 tahoe-tahoe-bsd4.3* )
2509 machine=tahoe opsys=bsd4-3
2510 ;;
2511
2512 ## Tandem Integrity S2
2513 mips-tandem-sysv* )
2514 machine=tandem-s2 opsys=usg5-3
2515 ;;
2516
2517 ## Tektronix XD88
2518 m88k-tektronix-sysv3* )
2519 machine=tekxd88 opsys=usg5-3
2520 ;;
2521
2522 ## Tektronix 16000 box (6130?)
2523 ns16k-tektronix-bsd* )
2524 machine=ns16000 opsys=bsd4-2
2525 ;;
2526 ## Tektronix 4300
2527 ## src/m/tek4300.h hints that this is a m68k machine.
2528 m68*-tektronix-bsd* )
2529 machine=tek4300 opsys=bsd4-3
2530 ;;
2531
2532 ## Titan P2 or P3
2533 ## We seem to have lost the machine-description file titan.h!
2534 titan-titan-sysv* )
2535 machine=titan opsys=usg5-3
2536 ;;
2537
2538 ## Ustation E30 (SS5E)
2539 m68*-unisys-uniplus* )
2540 machine=ustation opsystem=unipl5-2
2541 ;;
2542
2543 ## Vaxen.
2544 vax-dec-* )
2545 machine=vax
2546 case "${canonical}" in
2547 *-bsd4.1* ) opsys=bsd4-1 ;;
2548 *-bsd4.2* | *-ultrix[0-3].* | *-ultrix4.0* ) opsys=bsd4-2 ;;
2549 *-bsd4.3* | *-ultrix* ) opsys=bsd4-3 ;;
2550 *-sysv[01]* | *-sysvr[01]* ) opsys=usg5-0 ;;
2551 *-sysv2* | *-sysvr2* ) opsys=usg5-2 ;;
2552 *-vms* ) opsys=vms ;;
2553 * ) unported=yes
2554 esac
2555 ;;
2556
2557 ## Whitechapel MG1
2558 ns16k-whitechapel-* )
2559 machine=mg1
2560 ## We don't know what sort of OS runs on these; we'll let the
2561 ## operating system guessing code below try.
2562 ;;
2563
2564 ## Wicat
2565 m68*-wicat-sysv* )
2566 machine=wicat opsys=usg5-2
2567 ;;
2568
f4988be7
GM
2569 ## IA-64
2570 ia64*-*-linux* )
2571 machine=ia64 opsys=gnu-linux
2572 ;;
2573
ba4481b5
DL
2574 ## Intel 386 machines where we don't care about the manufacturer
2575 i[3456]86-*-* )
2576 machine=intel386
2577 case "${canonical}" in
c60ee5e7 2578 *-cygwin ) opsys=cygwin ;;
eae54018 2579 *-darwin* ) opsys=darwin
23fd4483
ST
2580 CPP="${CC-cc} -E -no-cpp-precomp"
2581 ;;
ba4481b5
DL
2582 *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
2583 *-isc2.2* ) opsys=isc2-2 ;;
2584 *-isc4.0* ) opsys=isc4-0 ;;
2585 *-isc4.* ) opsys=isc4-1
2586 GCC_TEST_OPTIONS=-posix
2587 NON_GCC_TEST_OPTIONS=-Xp
2588 ;;
2589 *-isc* ) opsys=isc3-0 ;;
2590 *-esix5* ) opsys=esix5r4; NON_GNU_CPP=/usr/lib/cpp ;;
2591 *-esix* ) opsys=esix ;;
2592 *-xenix* ) opsys=xenix ;;
2593 *-linux-gnu* ) opsys=gnu-linux ;;
2594 *-sco3.2v4* ) opsys=sco4 ; NON_GNU_CPP=/lib/cpp ;;
503d2be0 2595 *-sco3.2v5* ) opsys=sco5
ba4481b5
DL
2596 NON_GNU_CPP=/lib/cpp
2597 # Prevent -belf from being passed to $CPP.
2598 # /lib/cpp does not accept it.
2599 OVERRIDE_CPPFLAGS=" "
2600 ;;
2601 *-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
55597d70
DL
2602 *-sysv5uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
2603 *-sysv5OpenUNIX* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
ba4481b5 2604 *-386bsd* ) opsys=386bsd ;;
ba4481b5
DL
2605 *-nextstep* ) opsys=nextstep ;;
2606 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
2607 esac
2608 ;;
2609
2610 ## m68k Linux-based GNU system
2611 m68k-*-linux-gnu* )
2612 machine=m68k opsys=gnu-linux
2613 ;;
2614
2615 ## Mips Linux-based GNU system
cd958eb3 2616 mips-*-linux-gnu* | mipsel-*-linux-gnu* )
ba4481b5
DL
2617 machine=mips opsys=gnu-linux
2618 ;;
2619
2620 ## UXP/DS
2621 sparc-fujitsu-sysv4* )
2622 machine=sparc opsys=uxpds
2623 NON_GNU_CPP=/usr/ccs/lib/cpp
2624 RANLIB="ar -ts"
2625 ;;
2626
2627 ## UXP/V
2628 f301-fujitsu-uxpv4.1)
2629 machine=f301 opsys=uxpv
2630 ;;
2631
e0f712ba
AC
2632 ## Darwin / Mac OS X
2633 powerpc-apple-darwin* )
2634 machine=powermac opsys=darwin
2635 # Define CPP as follows to make autoconf work correctly.
2a75d75d 2636 CPP="${CC-cc} -E -no-cpp-precomp"
8ae52ca6
RF
2637 # Use fink packages if available.
2638 if test -d /sw/include && test -d /sw/lib; then
2639 GCC_TEST_OPTIONS="-I/sw/include -L/sw/lib"
2640 CPP="${CPP} ${GCC_TEST_OPTIONS}"
2641 NON_GCC_TEST_OPTIONS=${GCC_TEST_OPTIONS}
2642 fi
e0f712ba
AC
2643 ;;
2644
598a2813
AS
2645 ## AMD x86-64 Linux-based GNU system
2646 x86_64-*-linux-gnu* )
24b01ec4 2647 machine=amdx86-64 opsys=gnu-linux
598a2813
AS
2648 ;;
2649
ba4481b5
DL
2650 * )
2651 unported=yes
2652 ;;
2653esac
2654
2655### If the code above didn't choose an operating system, just choose
2656### an operating system based on the configuration name. You really
2657### only want to use this when you have no idea what the right
2658### operating system is; if you know what operating systems a machine
2659### runs, it's cleaner to make it explicit in the case statement
2660### above.
2661if test x"${opsys}" = x; then
2662 case "${canonical}" in
2663 *-gnu* ) opsys=gnu ;;
2664 *-bsd4.[01] ) opsys=bsd4-1 ;;
2665 *-bsd4.2 ) opsys=bsd4-2 ;;
2666 *-bsd4.3 ) opsys=bsd4-3 ;;
2667 *-sysv0 | *-sysvr0 ) opsys=usg5-0 ;;
2668 *-sysv2 | *-sysvr2 ) opsys=usg5-2 ;;
2669 *-sysv2.2 | *-sysvr2.2 ) opsys=usg5-2-2 ;;
2670 *-sysv3* | *-sysvr3* ) opsys=usg5-3 ;;
2671 *-sysv4.2uw* ) opsys=unixware ;;
55597d70
DL
2672 *-sysv5uw* ) opsys=unixware ;;
2673 *-sysv5OpenUNIX* ) opsys=unixware ;;
ba4481b5
DL
2674 *-sysv4.1* | *-sysvr4.1* )
2675 NON_GNU_CPP=/usr/lib/cpp
2676 opsys=usg5-4 ;;
2677 *-sysv4.[2-9]* | *-sysvr4.[2-9]* )
2678 if [ x$NON_GNU_CPP = x ]; then
2679 if [ -f /usr/ccs/lib/cpp ]; then
2680 NON_GNU_CPP=/usr/ccs/lib/cpp
2681 else
2682 NON_GNU_CPP=/lib/cpp
2683 fi
2684 fi
2685 opsys=usg5-4-2 ;;
2686 *-sysv4* | *-sysvr4* ) opsys=usg5-4 ;;
2687 * )
2688 unported=yes
2689 ;;
2690 esac
2691fi
2692
c0d27fcc 2693
22044edf 2694
ba4481b5 2695if test $unported = yes; then
c0d27fcc 2696 { { echo "$as_me:$LINENO: error: Emacs hasn't been ported to \`${canonical}' systems.
503d2be0
AS
2697Check \`etc/MACHINES' for recognized configuration names." >&5
2698echo "$as_me: error: Emacs hasn't been ported to \`${canonical}' systems.
2699Check \`etc/MACHINES' for recognized configuration names." >&2;}
2700 { (exit 1); exit 1; }; }
ba4481b5
DL
2701fi
2702
2703machfile="m/${machine}.h"
2704opsysfile="s/${opsys}.h"
2705
c0d27fcc 2706
ba4481b5
DL
2707#### Choose a compiler.
2708test -n "$CC" && cc_specified=yes
2709
2710# Save the value of CFLAGS that the user specified.
2711SPECIFIED_CFLAGS="$CFLAGS"
2712
2713case ${with_gcc} in
2714 "yes" ) CC="gcc" GCC=yes ;;
2715 "no" ) : ${CC=cc} ;;
503d2be0
AS
2716 * )
2717esac
2718ac_ext=c
2719ac_cpp='$CPP $CPPFLAGS'
2720ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2721ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2722ac_compiler_gnu=$ac_cv_c_compiler_gnu
2723if test -n "$ac_tool_prefix"; then
2724 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2725set dummy ${ac_tool_prefix}gcc; ac_word=$2
c0d27fcc 2726echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2727echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2728if test "${ac_cv_prog_CC+set}" = set; then
2729 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
2730else
2731 if test -n "$CC"; then
2732 ac_cv_prog_CC="$CC" # Let the user override the test.
2733else
c0d27fcc
MR
2734as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2735for as_dir in $PATH
2736do
2737 IFS=$as_save_IFS
2738 test -z "$as_dir" && as_dir=.
2739 for ac_exec_ext in '' $ac_executable_extensions; do
2740 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2741 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2742 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2743 break 2
2744 fi
2745done
503d2be0
AS
2746done
2747
ba4481b5
DL
2748fi
2749fi
503d2be0 2750CC=$ac_cv_prog_CC
ba4481b5 2751if test -n "$CC"; then
c0d27fcc 2752 echo "$as_me:$LINENO: result: $CC" >&5
503d2be0
AS
2753echo "${ECHO_T}$CC" >&6
2754else
c0d27fcc 2755 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
2756echo "${ECHO_T}no" >&6
2757fi
2758
2759fi
2760if test -z "$ac_cv_prog_CC"; then
2761 ac_ct_CC=$CC
2762 # Extract the first word of "gcc", so it can be a program name with args.
2763set dummy gcc; ac_word=$2
c0d27fcc 2764echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2765echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2766if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2767 echo $ECHO_N "(cached) $ECHO_C" >&6
2768else
2769 if test -n "$ac_ct_CC"; then
2770 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2771else
c0d27fcc
MR
2772as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2773for as_dir in $PATH
2774do
2775 IFS=$as_save_IFS
2776 test -z "$as_dir" && as_dir=.
2777 for ac_exec_ext in '' $ac_executable_extensions; do
2778 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2779 ac_cv_prog_ac_ct_CC="gcc"
2780 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2781 break 2
2782 fi
2783done
503d2be0
AS
2784done
2785
2786fi
2787fi
2788ac_ct_CC=$ac_cv_prog_ac_ct_CC
2789if test -n "$ac_ct_CC"; then
c0d27fcc 2790 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
503d2be0 2791echo "${ECHO_T}$ac_ct_CC" >&6
ba4481b5 2792else
c0d27fcc 2793 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
2794echo "${ECHO_T}no" >&6
2795fi
2796
2797 CC=$ac_ct_CC
2798else
2799 CC="$ac_cv_prog_CC"
ba4481b5
DL
2800fi
2801
2802if test -z "$CC"; then
503d2be0
AS
2803 if test -n "$ac_tool_prefix"; then
2804 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2805set dummy ${ac_tool_prefix}cc; ac_word=$2
c0d27fcc 2806echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2807echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2808if test "${ac_cv_prog_CC+set}" = set; then
2809 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
2810else
2811 if test -n "$CC"; then
2812 ac_cv_prog_CC="$CC" # Let the user override the test.
2813else
c0d27fcc
MR
2814as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2815for as_dir in $PATH
2816do
2817 IFS=$as_save_IFS
2818 test -z "$as_dir" && as_dir=.
2819 for ac_exec_ext in '' $ac_executable_extensions; do
2820 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2821 ac_cv_prog_CC="${ac_tool_prefix}cc"
2822 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2823 break 2
2824 fi
2825done
503d2be0
AS
2826done
2827
2828fi
2829fi
2830CC=$ac_cv_prog_CC
2831if test -n "$CC"; then
c0d27fcc 2832 echo "$as_me:$LINENO: result: $CC" >&5
503d2be0
AS
2833echo "${ECHO_T}$CC" >&6
2834else
c0d27fcc 2835 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
2836echo "${ECHO_T}no" >&6
2837fi
2838
2839fi
2840if test -z "$ac_cv_prog_CC"; then
2841 ac_ct_CC=$CC
2842 # Extract the first word of "cc", so it can be a program name with args.
2843set dummy cc; ac_word=$2
c0d27fcc 2844echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2845echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2846if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2847 echo $ECHO_N "(cached) $ECHO_C" >&6
2848else
2849 if test -n "$ac_ct_CC"; then
2850 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2851else
c0d27fcc
MR
2852as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2853for as_dir in $PATH
2854do
2855 IFS=$as_save_IFS
2856 test -z "$as_dir" && as_dir=.
2857 for ac_exec_ext in '' $ac_executable_extensions; do
2858 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2859 ac_cv_prog_ac_ct_CC="cc"
2860 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2861 break 2
2862 fi
2863done
503d2be0
AS
2864done
2865
2866fi
2867fi
2868ac_ct_CC=$ac_cv_prog_ac_ct_CC
2869if test -n "$ac_ct_CC"; then
c0d27fcc 2870 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
503d2be0
AS
2871echo "${ECHO_T}$ac_ct_CC" >&6
2872else
c0d27fcc 2873 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
2874echo "${ECHO_T}no" >&6
2875fi
2876
2877 CC=$ac_ct_CC
2878else
2879 CC="$ac_cv_prog_CC"
2880fi
2881
2882fi
2883if test -z "$CC"; then
2884 # Extract the first word of "cc", so it can be a program name with args.
2885set dummy cc; ac_word=$2
c0d27fcc 2886echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2887echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2888if test "${ac_cv_prog_CC+set}" = set; then
2889 echo $ECHO_N "(cached) $ECHO_C" >&6
2890else
2891 if test -n "$CC"; then
2892 ac_cv_prog_CC="$CC" # Let the user override the test.
2893else
2894 ac_prog_rejected=no
c0d27fcc
MR
2895as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2896for as_dir in $PATH
2897do
2898 IFS=$as_save_IFS
2899 test -z "$as_dir" && as_dir=.
2900 for ac_exec_ext in '' $ac_executable_extensions; do
2901 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2902 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2903 ac_prog_rejected=yes
2904 continue
2905 fi
2906 ac_cv_prog_CC="cc"
2907 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2908 break 2
2909 fi
2910done
503d2be0
AS
2911done
2912
ba4481b5
DL
2913if test $ac_prog_rejected = yes; then
2914 # We found a bogon in the path, so make sure we never use it.
2915 set dummy $ac_cv_prog_CC
2916 shift
503d2be0 2917 if test $# != 0; then
ba4481b5
DL
2918 # We chose a different compiler from the bogus one.
2919 # However, it has the same basename, so the bogon will be chosen
2920 # first if we set CC to just the basename; use the full file name.
2921 shift
6bae0ccf 2922 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
ba4481b5
DL
2923 fi
2924fi
2925fi
2926fi
503d2be0 2927CC=$ac_cv_prog_CC
ba4481b5 2928if test -n "$CC"; then
c0d27fcc 2929 echo "$as_me:$LINENO: result: $CC" >&5
503d2be0 2930echo "${ECHO_T}$CC" >&6
ba4481b5 2931else
c0d27fcc 2932 echo "$as_me:$LINENO: result: no" >&5
503d2be0 2933echo "${ECHO_T}no" >&6
ba4481b5
DL
2934fi
2935
503d2be0
AS
2936fi
2937if test -z "$CC"; then
2938 if test -n "$ac_tool_prefix"; then
2939 for ac_prog in cl
2940 do
2941 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2942set dummy $ac_tool_prefix$ac_prog; ac_word=$2
c0d27fcc 2943echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2944echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2945if test "${ac_cv_prog_CC+set}" = set; then
2946 echo $ECHO_N "(cached) $ECHO_C" >&6
c4bb2108
DL
2947else
2948 if test -n "$CC"; then
2949 ac_cv_prog_CC="$CC" # Let the user override the test.
2950else
c0d27fcc
MR
2951as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2952for as_dir in $PATH
2953do
2954 IFS=$as_save_IFS
2955 test -z "$as_dir" && as_dir=.
2956 for ac_exec_ext in '' $ac_executable_extensions; do
2957 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2958 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2959 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2960 break 2
2961 fi
2962done
503d2be0
AS
2963done
2964
c4bb2108
DL
2965fi
2966fi
503d2be0 2967CC=$ac_cv_prog_CC
c4bb2108 2968if test -n "$CC"; then
c0d27fcc 2969 echo "$as_me:$LINENO: result: $CC" >&5
503d2be0 2970echo "${ECHO_T}$CC" >&6
c4bb2108 2971else
c0d27fcc 2972 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
2973echo "${ECHO_T}no" >&6
2974fi
2975
2976 test -n "$CC" && break
2977 done
2978fi
2979if test -z "$CC"; then
2980 ac_ct_CC=$CC
2981 for ac_prog in cl
2982do
2983 # Extract the first word of "$ac_prog", so it can be a program name with args.
2984set dummy $ac_prog; ac_word=$2
c0d27fcc 2985echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2986echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2987if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2988 echo $ECHO_N "(cached) $ECHO_C" >&6
2989else
2990 if test -n "$ac_ct_CC"; then
2991 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2992else
c0d27fcc
MR
2993as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2994for as_dir in $PATH
2995do
2996 IFS=$as_save_IFS
2997 test -z "$as_dir" && as_dir=.
2998 for ac_exec_ext in '' $ac_executable_extensions; do
2999 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3000 ac_cv_prog_ac_ct_CC="$ac_prog"
3001 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3002 break 2
3003 fi
3004done
503d2be0
AS
3005done
3006
c4bb2108 3007fi
503d2be0
AS
3008fi
3009ac_ct_CC=$ac_cv_prog_ac_ct_CC
3010if test -n "$ac_ct_CC"; then
c0d27fcc 3011 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
503d2be0
AS
3012echo "${ECHO_T}$ac_ct_CC" >&6
3013else
c0d27fcc 3014 echo "$as_me:$LINENO: result: no" >&5
503d2be0 3015echo "${ECHO_T}no" >&6
ba4481b5
DL
3016fi
3017
503d2be0
AS
3018 test -n "$ac_ct_CC" && break
3019done
ba4481b5 3020
503d2be0
AS
3021 CC=$ac_ct_CC
3022fi
3023
3024fi
ba4481b5 3025
c0d27fcc 3026
19650fd6
AS
3027test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
3028See \`config.log' for more details." >&5
3029echo "$as_me: error: no acceptable C compiler found in \$PATH
3030See \`config.log' for more details." >&2;}
503d2be0 3031 { (exit 1); exit 1; }; }
c4bb2108 3032
503d2be0 3033# Provide some information about the compiler.
c0d27fcc 3034echo "$as_me:$LINENO:" \
503d2be0
AS
3035 "checking for C compiler version" >&5
3036ac_compiler=`set X $ac_compile; echo $2`
c0d27fcc 3037{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
503d2be0
AS
3038 (eval $ac_compiler --version </dev/null >&5) 2>&5
3039 ac_status=$?
c0d27fcc 3040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3041 (exit $ac_status); }
c0d27fcc 3042{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
503d2be0
AS
3043 (eval $ac_compiler -v </dev/null >&5) 2>&5
3044 ac_status=$?
c0d27fcc 3045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3046 (exit $ac_status); }
c0d27fcc 3047{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
503d2be0
AS
3048 (eval $ac_compiler -V </dev/null >&5) 2>&5
3049 ac_status=$?
c0d27fcc 3050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3051 (exit $ac_status); }
3052
3053cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3054/* confdefs.h. */
3055_ACEOF
3056cat confdefs.h >>conftest.$ac_ext
3057cat >>conftest.$ac_ext <<_ACEOF
3058/* end confdefs.h. */
c4bb2108 3059
503d2be0
AS
3060int
3061main ()
3062{
3063
3064 ;
3065 return 0;
3066}
3067_ACEOF
3068ac_clean_files_save=$ac_clean_files
19650fd6 3069ac_clean_files="$ac_clean_files a.out a.exe b.out"
503d2be0
AS
3070# Try to create an executable without -o first, disregard a.out.
3071# It will help us diagnose broken compilers, and finding out an intuition
3072# of exeext.
edfaf76d
LK
3073echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
3074echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
503d2be0 3075ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
c0d27fcc 3076if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
503d2be0
AS
3077 (eval $ac_link_default) 2>&5
3078 ac_status=$?
c0d27fcc 3079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3080 (exit $ac_status); }; then
3081 # Find the output, starting from the most likely. This scheme is
3082# not robust to junk in `.', hence go to wildcards (a.*) only as a last
3083# resort.
c0d27fcc
MR
3084
3085# Be careful to initialize this variable, since it used to be cached.
3086# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
3087ac_cv_exeext=
19650fd6
AS
3088# b.out is created by i960 compilers.
3089for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
3090do
6bae0ccf 3091 test -f "$ac_file" || continue
503d2be0 3092 case $ac_file in
19650fd6 3093 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
edfaf76d 3094 ;;
19650fd6 3095 conftest.$ac_ext )
edfaf76d
LK
3096 # This is the source file.
3097 ;;
19650fd6 3098 [ab].out )
edfaf76d
LK
3099 # We found the default executable, but exeext='' is most
3100 # certainly right.
3101 break;;
19650fd6 3102 *.* )
edfaf76d
LK
3103 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3104 # FIXME: I believe we export ac_cv_exeext for Libtool,
3105 # but it would be cool to find out if it's true. Does anybody
3106 # maintain Libtool? --akim.
3107 export ac_cv_exeext
3108 break;;
19650fd6 3109 * )
edfaf76d 3110 break;;
503d2be0
AS
3111 esac
3112done
3113else
3114 echo "$as_me: failed program was:" >&5
19650fd6
AS
3115sed 's/^/| /' conftest.$ac_ext >&5
3116
6bae0ccf 3117{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
19650fd6 3118See \`config.log' for more details." >&5
6bae0ccf 3119echo "$as_me: error: C compiler cannot create executables
19650fd6 3120See \`config.log' for more details." >&2;}
503d2be0
AS
3121 { (exit 77); exit 77; }; }
3122fi
3123
3124ac_exeext=$ac_cv_exeext
c0d27fcc 3125echo "$as_me:$LINENO: result: $ac_file" >&5
503d2be0
AS
3126echo "${ECHO_T}$ac_file" >&6
3127
3128# Check the compiler produces executables we can run. If not, either
3129# the compiler is broken, or we cross compile.
c0d27fcc 3130echo "$as_me:$LINENO: checking whether the C compiler works" >&5
503d2be0
AS
3131echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
3132# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
3133# If not cross compiling, check that we can run a simple program.
3134if test "$cross_compiling" != yes; then
3135 if { ac_try='./$ac_file'
c0d27fcc 3136 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3137 (eval $ac_try) 2>&5
3138 ac_status=$?
c0d27fcc 3139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3140 (exit $ac_status); }; }; then
3141 cross_compiling=no
ba4481b5 3142 else
503d2be0
AS
3143 if test "$cross_compiling" = maybe; then
3144 cross_compiling=yes
3145 else
c0d27fcc 3146 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
19650fd6
AS
3147If you meant to cross compile, use \`--host'.
3148See \`config.log' for more details." >&5
503d2be0 3149echo "$as_me: error: cannot run C compiled programs.
19650fd6
AS
3150If you meant to cross compile, use \`--host'.
3151See \`config.log' for more details." >&2;}
503d2be0
AS
3152 { (exit 1); exit 1; }; }
3153 fi
ba4481b5 3154 fi
503d2be0 3155fi
c0d27fcc 3156echo "$as_me:$LINENO: result: yes" >&5
503d2be0
AS
3157echo "${ECHO_T}yes" >&6
3158
19650fd6 3159rm -f a.out a.exe conftest$ac_cv_exeext b.out
503d2be0
AS
3160ac_clean_files=$ac_clean_files_save
3161# Check the compiler produces executables we can run. If not, either
3162# the compiler is broken, or we cross compile.
c0d27fcc 3163echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
503d2be0 3164echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
c0d27fcc 3165echo "$as_me:$LINENO: result: $cross_compiling" >&5
503d2be0
AS
3166echo "${ECHO_T}$cross_compiling" >&6
3167
c0d27fcc
MR
3168echo "$as_me:$LINENO: checking for suffix of executables" >&5
3169echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
3170if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
3171 (eval $ac_link) 2>&5
3172 ac_status=$?
c0d27fcc 3173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3174 (exit $ac_status); }; then
3175 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3176# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3177# work properly (i.e., refer to `conftest.exe'), while it won't with
3178# `rm'.
6bae0ccf
DL
3179for ac_file in conftest.exe conftest conftest.*; do
3180 test -f "$ac_file" || continue
503d2be0 3181 case $ac_file in
6bae0ccf 3182 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
503d2be0 3183 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
edfaf76d
LK
3184 export ac_cv_exeext
3185 break;;
503d2be0
AS
3186 * ) break;;
3187 esac
3188done
ba4481b5 3189else
19650fd6
AS
3190 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
3191See \`config.log' for more details." >&5
3192echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
3193See \`config.log' for more details." >&2;}
503d2be0 3194 { (exit 1); exit 1; }; }
ba4481b5 3195fi
ba4481b5 3196
503d2be0 3197rm -f conftest$ac_cv_exeext
c0d27fcc 3198echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
503d2be0 3199echo "${ECHO_T}$ac_cv_exeext" >&6
ba4481b5 3200
503d2be0
AS
3201rm -f conftest.$ac_ext
3202EXEEXT=$ac_cv_exeext
3203ac_exeext=$EXEEXT
c0d27fcc
MR
3204echo "$as_me:$LINENO: checking for suffix of object files" >&5
3205echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
503d2be0
AS
3206if test "${ac_cv_objext+set}" = set; then
3207 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3208else
503d2be0 3209 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3210/* confdefs.h. */
3211_ACEOF
3212cat confdefs.h >>conftest.$ac_ext
3213cat >>conftest.$ac_ext <<_ACEOF
3214/* end confdefs.h. */
ba4481b5 3215
503d2be0
AS
3216int
3217main ()
3218{
ba4481b5 3219
503d2be0
AS
3220 ;
3221 return 0;
3222}
3223_ACEOF
3224rm -f conftest.o conftest.obj
c0d27fcc 3225if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
3226 (eval $ac_compile) 2>&5
3227 ac_status=$?
c0d27fcc 3228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3229 (exit $ac_status); }; then
3230 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
3231 case $ac_file in
6bae0ccf 3232 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
503d2be0
AS
3233 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3234 break;;
3235 esac
3236done
c4bb2108 3237else
503d2be0 3238 echo "$as_me: failed program was:" >&5
19650fd6
AS
3239sed 's/^/| /' conftest.$ac_ext >&5
3240
3241{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
3242See \`config.log' for more details." >&5
3243echo "$as_me: error: cannot compute suffix of object files: cannot compile
3244See \`config.log' for more details." >&2;}
503d2be0 3245 { (exit 1); exit 1; }; }
c4bb2108
DL
3246fi
3247
503d2be0
AS
3248rm -f conftest.$ac_cv_objext conftest.$ac_ext
3249fi
c0d27fcc 3250echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
503d2be0
AS
3251echo "${ECHO_T}$ac_cv_objext" >&6
3252OBJEXT=$ac_cv_objext
3253ac_objext=$OBJEXT
c0d27fcc 3254echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
503d2be0
AS
3255echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
3256if test "${ac_cv_c_compiler_gnu+set}" = set; then
3257 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3258else
503d2be0 3259 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3260/* confdefs.h. */
3261_ACEOF
3262cat confdefs.h >>conftest.$ac_ext
3263cat >>conftest.$ac_ext <<_ACEOF
3264/* end confdefs.h. */
503d2be0
AS
3265
3266int
3267main ()
3268{
3269#ifndef __GNUC__
3270 choke me
3271#endif
3272
3273 ;
3274 return 0;
3275}
3276_ACEOF
3277rm -f conftest.$ac_objext
c0d27fcc 3278if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 3279 (eval $ac_compile) 2>conftest.er1
503d2be0 3280 ac_status=$?
edfaf76d
LK
3281 grep -v '^ *+' conftest.er1 >conftest.err
3282 rm -f conftest.er1
3283 cat conftest.err >&5
c0d27fcc 3284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3285 (exit $ac_status); } &&
e143ad11
AS
3286 { ac_try='test -z "$ac_c_werror_flag"
3287 || test ! -s conftest.err'
edfaf76d
LK
3288 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3289 (eval $ac_try) 2>&5
3290 ac_status=$?
3291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3292 (exit $ac_status); }; } &&
3293 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 3294 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3295 (eval $ac_try) 2>&5
3296 ac_status=$?
c0d27fcc 3297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3298 (exit $ac_status); }; }; then
3299 ac_compiler_gnu=yes
3300else
3301 echo "$as_me: failed program was:" >&5
19650fd6
AS
3302sed 's/^/| /' conftest.$ac_ext >&5
3303
503d2be0
AS
3304ac_compiler_gnu=no
3305fi
edfaf76d 3306rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
3307ac_cv_c_compiler_gnu=$ac_compiler_gnu
3308
3309fi
c0d27fcc 3310echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
503d2be0
AS
3311echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
3312GCC=`test $ac_compiler_gnu = yes && echo yes`
3313ac_test_CFLAGS=${CFLAGS+set}
3314ac_save_CFLAGS=$CFLAGS
3315CFLAGS="-g"
c0d27fcc 3316echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
503d2be0
AS
3317echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
3318if test "${ac_cv_prog_cc_g+set}" = set; then
3319 echo $ECHO_N "(cached) $ECHO_C" >&6
3320else
3321 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3322/* confdefs.h. */
3323_ACEOF
3324cat confdefs.h >>conftest.$ac_ext
3325cat >>conftest.$ac_ext <<_ACEOF
3326/* end confdefs.h. */
503d2be0
AS
3327
3328int
3329main ()
3330{
3331
3332 ;
3333 return 0;
3334}
3335_ACEOF
3336rm -f conftest.$ac_objext
c0d27fcc 3337if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 3338 (eval $ac_compile) 2>conftest.er1
503d2be0 3339 ac_status=$?
edfaf76d
LK
3340 grep -v '^ *+' conftest.er1 >conftest.err
3341 rm -f conftest.er1
3342 cat conftest.err >&5
c0d27fcc 3343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3344 (exit $ac_status); } &&
e143ad11
AS
3345 { ac_try='test -z "$ac_c_werror_flag"
3346 || test ! -s conftest.err'
edfaf76d
LK
3347 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3348 (eval $ac_try) 2>&5
3349 ac_status=$?
3350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3351 (exit $ac_status); }; } &&
3352 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 3353 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3354 (eval $ac_try) 2>&5
3355 ac_status=$?
c0d27fcc 3356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3357 (exit $ac_status); }; }; then
ba4481b5
DL
3358 ac_cv_prog_cc_g=yes
3359else
503d2be0 3360 echo "$as_me: failed program was:" >&5
19650fd6
AS
3361sed 's/^/| /' conftest.$ac_ext >&5
3362
503d2be0 3363ac_cv_prog_cc_g=no
ba4481b5 3364fi
edfaf76d 3365rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 3366fi
c0d27fcc 3367echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
503d2be0 3368echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
c4bb2108 3369if test "$ac_test_CFLAGS" = set; then
503d2be0 3370 CFLAGS=$ac_save_CFLAGS
c4bb2108
DL
3371elif test $ac_cv_prog_cc_g = yes; then
3372 if test "$GCC" = yes; then
ba4481b5
DL
3373 CFLAGS="-g -O2"
3374 else
c4bb2108 3375 CFLAGS="-g"
ba4481b5 3376 fi
22afa6e8 3377else
c4bb2108
DL
3378 if test "$GCC" = yes; then
3379 CFLAGS="-O2"
3380 else
3381 CFLAGS=
3382 fi
ba4481b5 3383fi
6bae0ccf
DL
3384echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
3385echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
3386if test "${ac_cv_prog_cc_stdc+set}" = set; then
3387 echo $ECHO_N "(cached) $ECHO_C" >&6
3388else
3389 ac_cv_prog_cc_stdc=no
3390ac_save_CC=$CC
3391cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3392/* confdefs.h. */
3393_ACEOF
3394cat confdefs.h >>conftest.$ac_ext
3395cat >>conftest.$ac_ext <<_ACEOF
3396/* end confdefs.h. */
6bae0ccf
DL
3397#include <stdarg.h>
3398#include <stdio.h>
3399#include <sys/types.h>
3400#include <sys/stat.h>
3401/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3402struct buf { int x; };
3403FILE * (*rcsopen) (struct buf *, struct stat *, int);
3404static char *e (p, i)
3405 char **p;
3406 int i;
3407{
3408 return p[i];
3409}
3410static char *f (char * (*g) (char **, int), char **p, ...)
3411{
3412 char *s;
3413 va_list v;
3414 va_start (v,p);
3415 s = g (p, va_arg (v,int));
3416 va_end (v);
3417 return s;
3418}
edfaf76d
LK
3419
3420/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3421 function prototypes and stuff, but not '\xHH' hex character constants.
3422 These don't provoke an error unfortunately, instead are silently treated
3423 as 'x'. The following induces an error, until -std1 is added to get
3424 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3425 array size at least. It's necessary to write '\x00'==0 to get something
3426 that's true only with -std1. */
3427int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3428
6bae0ccf
DL
3429int test (int i, double x);
3430struct s1 {int (*f) (int a);};
3431struct s2 {int (*f) (double a);};
3432int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3433int argc;
3434char **argv;
3435int
3436main ()
3437{
3438return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3439 ;
3440 return 0;
3441}
3442_ACEOF
3443# Don't try gcc -ansi; that turns off useful extensions and
3444# breaks some systems' header files.
3445# AIX -qlanglvl=ansi
3446# Ultrix and OSF/1 -std1
3447# HP-UX 10.20 and later -Ae
3448# HP-UX older versions -Aa -D_HPUX_SOURCE
3449# SVR4 -Xc -D__EXTENSIONS__
3450for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3451do
3452 CC="$ac_save_CC $ac_arg"
3453 rm -f conftest.$ac_objext
3454if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 3455 (eval $ac_compile) 2>conftest.er1
6bae0ccf 3456 ac_status=$?
edfaf76d
LK
3457 grep -v '^ *+' conftest.er1 >conftest.err
3458 rm -f conftest.er1
3459 cat conftest.err >&5
6bae0ccf
DL
3460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3461 (exit $ac_status); } &&
e143ad11
AS
3462 { ac_try='test -z "$ac_c_werror_flag"
3463 || test ! -s conftest.err'
edfaf76d
LK
3464 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3465 (eval $ac_try) 2>&5
3466 ac_status=$?
3467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3468 (exit $ac_status); }; } &&
3469 { ac_try='test -s conftest.$ac_objext'
6bae0ccf
DL
3470 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3471 (eval $ac_try) 2>&5
3472 ac_status=$?
3473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3474 (exit $ac_status); }; }; then
3475 ac_cv_prog_cc_stdc=$ac_arg
3476break
3477else
3478 echo "$as_me: failed program was:" >&5
19650fd6
AS
3479sed 's/^/| /' conftest.$ac_ext >&5
3480
6bae0ccf 3481fi
edfaf76d 3482rm -f conftest.err conftest.$ac_objext
6bae0ccf
DL
3483done
3484rm -f conftest.$ac_ext conftest.$ac_objext
3485CC=$ac_save_CC
3486
3487fi
3488
3489case "x$ac_cv_prog_cc_stdc" in
3490 x|xno)
3491 echo "$as_me:$LINENO: result: none needed" >&5
3492echo "${ECHO_T}none needed" >&6 ;;
3493 *)
3494 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
3495echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
3496 CC="$CC $ac_cv_prog_cc_stdc" ;;
3497esac
3498
503d2be0
AS
3499# Some people use a C++ compiler to compile C. Since we use `exit',
3500# in C++ we need to declare it. In case someone uses the same compiler
3501# for both compiling C and C++ we need to have the C++ compiler decide
3502# the declaration of exit, since it's the most demanding environment.
3503cat >conftest.$ac_ext <<_ACEOF
3504#ifndef __cplusplus
3505 choke me
3506#endif
3507_ACEOF
3508rm -f conftest.$ac_objext
c0d27fcc 3509if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 3510 (eval $ac_compile) 2>conftest.er1
503d2be0 3511 ac_status=$?
edfaf76d
LK
3512 grep -v '^ *+' conftest.er1 >conftest.err
3513 rm -f conftest.er1
3514 cat conftest.err >&5
c0d27fcc 3515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3516 (exit $ac_status); } &&
e143ad11
AS
3517 { ac_try='test -z "$ac_c_werror_flag"
3518 || test ! -s conftest.err'
edfaf76d
LK
3519 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3520 (eval $ac_try) 2>&5
3521 ac_status=$?
3522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3523 (exit $ac_status); }; } &&
3524 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 3525 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3526 (eval $ac_try) 2>&5
3527 ac_status=$?
c0d27fcc 3528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3529 (exit $ac_status); }; }; then
3530 for ac_declaration in \
edfaf76d 3531 '' \
503d2be0
AS
3532 'extern "C" void std::exit (int) throw (); using std::exit;' \
3533 'extern "C" void std::exit (int); using std::exit;' \
3534 'extern "C" void exit (int) throw ();' \
3535 'extern "C" void exit (int);' \
cffcede7 3536 'void exit (int);'
503d2be0
AS
3537do
3538 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3539/* confdefs.h. */
3540_ACEOF
3541cat confdefs.h >>conftest.$ac_ext
3542cat >>conftest.$ac_ext <<_ACEOF
3543/* end confdefs.h. */
7c9e5167 3544$ac_declaration
edfaf76d 3545#include <stdlib.h>
503d2be0
AS
3546int
3547main ()
3548{
3549exit (42);
3550 ;
3551 return 0;
3552}
3553_ACEOF
3554rm -f conftest.$ac_objext
c0d27fcc 3555if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 3556 (eval $ac_compile) 2>conftest.er1
503d2be0 3557 ac_status=$?
edfaf76d
LK
3558 grep -v '^ *+' conftest.er1 >conftest.err
3559 rm -f conftest.er1
3560 cat conftest.err >&5
c0d27fcc 3561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3562 (exit $ac_status); } &&
e143ad11
AS
3563 { ac_try='test -z "$ac_c_werror_flag"
3564 || test ! -s conftest.err'
edfaf76d
LK
3565 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3566 (eval $ac_try) 2>&5
3567 ac_status=$?
3568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3569 (exit $ac_status); }; } &&
3570 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 3571 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3572 (eval $ac_try) 2>&5
3573 ac_status=$?
c0d27fcc 3574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3575 (exit $ac_status); }; }; then
3576 :
3577else
3578 echo "$as_me: failed program was:" >&5
19650fd6
AS
3579sed 's/^/| /' conftest.$ac_ext >&5
3580
503d2be0
AS
3581continue
3582fi
edfaf76d 3583rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 3584 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3585/* confdefs.h. */
3586_ACEOF
3587cat confdefs.h >>conftest.$ac_ext
3588cat >>conftest.$ac_ext <<_ACEOF
3589/* end confdefs.h. */
503d2be0
AS
3590$ac_declaration
3591int
3592main ()
3593{
3594exit (42);
3595 ;
3596 return 0;
3597}
3598_ACEOF
3599rm -f conftest.$ac_objext
c0d27fcc 3600if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 3601 (eval $ac_compile) 2>conftest.er1
503d2be0 3602 ac_status=$?
edfaf76d
LK
3603 grep -v '^ *+' conftest.er1 >conftest.err
3604 rm -f conftest.er1
3605 cat conftest.err >&5
c0d27fcc 3606 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3607 (exit $ac_status); } &&
e143ad11
AS
3608 { ac_try='test -z "$ac_c_werror_flag"
3609 || test ! -s conftest.err'
edfaf76d
LK
3610 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3611 (eval $ac_try) 2>&5
3612 ac_status=$?
3613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3614 (exit $ac_status); }; } &&
3615 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 3616 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3617 (eval $ac_try) 2>&5
3618 ac_status=$?
c0d27fcc 3619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3620 (exit $ac_status); }; }; then
3621 break
3622else
3623 echo "$as_me: failed program was:" >&5
19650fd6
AS
3624sed 's/^/| /' conftest.$ac_ext >&5
3625
503d2be0 3626fi
edfaf76d 3627rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
3628done
3629rm -f conftest*
3630if test -n "$ac_declaration"; then
3631 echo '#ifdef __cplusplus' >>confdefs.h
3632 echo $ac_declaration >>confdefs.h
3633 echo '#endif' >>confdefs.h
3634fi
ba4481b5 3635
503d2be0
AS
3636else
3637 echo "$as_me: failed program was:" >&5
19650fd6
AS
3638sed 's/^/| /' conftest.$ac_ext >&5
3639
503d2be0 3640fi
edfaf76d 3641rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
3642ac_ext=c
3643ac_cpp='$CPP $CPPFLAGS'
3644ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3645ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3646ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5 3647
c0d27fcc 3648
ba4481b5
DL
3649# On Suns, sometimes $CPP names a directory.
3650if test -n "$CPP" && test -d "$CPP"; then
3651 CPP=
3652fi
3653
3654#### Some systems specify a CPP to use unless we are using GCC.
3655#### Now that we know whether we are using GCC, we can decide whether
3656#### to use that one.
3657if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x
3658then
3659 CPP="$NON_GNU_CPP"
3660fi
3661
3662#### Some systems specify a CC to use unless we are using GCC.
3663#### Now that we know whether we are using GCC, we can decide whether
3664#### to use that one.
3665if test "x$NON_GNU_CC" != x && test x$GCC != xyes &&
3666 test x$cc_specified != xyes
3667then
3668 CC="$NON_GNU_CC"
3669fi
3670
3671if test x$GCC = xyes && test "x$GCC_TEST_OPTIONS" != x
3672then
3673 CC="$CC $GCC_TEST_OPTIONS"
3674fi
3675
3676if test x$GCC = x && test "x$NON_GCC_TEST_OPTIONS" != x
3677then
3678 CC="$CC $NON_GCC_TEST_OPTIONS"
3679fi
3680
e143ad11
AS
3681
3682ac_ext=c
3683ac_cpp='$CPP $CPPFLAGS'
3684ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3685ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3686ac_compiler_gnu=$ac_cv_c_compiler_gnu
3687echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3688echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
3689# On Suns, sometimes $CPP names a directory.
3690if test -n "$CPP" && test -d "$CPP"; then
3691 CPP=
3692fi
3693if test -z "$CPP"; then
3694 if test "${ac_cv_prog_CPP+set}" = set; then
3695 echo $ECHO_N "(cached) $ECHO_C" >&6
3696else
3697 # Double quotes because CPP needs to be expanded
3698 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3699 do
3700 ac_preproc_ok=false
3701for ac_c_preproc_warn_flag in '' yes
3702do
3703 # Use a header file that comes with gcc, so configuring glibc
3704 # with a fresh cross-compiler works.
3705 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3706 # <limits.h> exists even on freestanding compilers.
3707 # On the NeXT, cc -E runs the code through the compiler's parser,
3708 # not just through cpp. "Syntax error" is here to catch this case.
3709 cat >conftest.$ac_ext <<_ACEOF
3710/* confdefs.h. */
3711_ACEOF
3712cat confdefs.h >>conftest.$ac_ext
3713cat >>conftest.$ac_ext <<_ACEOF
3714/* end confdefs.h. */
3715#ifdef __STDC__
3716# include <limits.h>
3717#else
3718# include <assert.h>
3719#endif
3720 Syntax error
3721_ACEOF
3722if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3723 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3724 ac_status=$?
3725 grep -v '^ *+' conftest.er1 >conftest.err
3726 rm -f conftest.er1
3727 cat conftest.err >&5
3728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3729 (exit $ac_status); } >/dev/null; then
3730 if test -s conftest.err; then
3731 ac_cpp_err=$ac_c_preproc_warn_flag
3732 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3733 else
3734 ac_cpp_err=
3735 fi
3736else
3737 ac_cpp_err=yes
3738fi
3739if test -z "$ac_cpp_err"; then
3740 :
3741else
3742 echo "$as_me: failed program was:" >&5
3743sed 's/^/| /' conftest.$ac_ext >&5
3744
3745 # Broken: fails on valid input.
3746continue
3747fi
3748rm -f conftest.err conftest.$ac_ext
3749
3750 # OK, works on sane cases. Now check whether non-existent headers
3751 # can be detected and how.
3752 cat >conftest.$ac_ext <<_ACEOF
3753/* confdefs.h. */
3754_ACEOF
3755cat confdefs.h >>conftest.$ac_ext
3756cat >>conftest.$ac_ext <<_ACEOF
3757/* end confdefs.h. */
3758#include <ac_nonexistent.h>
3759_ACEOF
3760if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3761 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3762 ac_status=$?
3763 grep -v '^ *+' conftest.er1 >conftest.err
3764 rm -f conftest.er1
3765 cat conftest.err >&5
3766 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3767 (exit $ac_status); } >/dev/null; then
3768 if test -s conftest.err; then
3769 ac_cpp_err=$ac_c_preproc_warn_flag
3770 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3771 else
3772 ac_cpp_err=
3773 fi
3774else
3775 ac_cpp_err=yes
3776fi
3777if test -z "$ac_cpp_err"; then
3778 # Broken: success on invalid input.
3779continue
3780else
3781 echo "$as_me: failed program was:" >&5
3782sed 's/^/| /' conftest.$ac_ext >&5
3783
3784 # Passes both tests.
3785ac_preproc_ok=:
3786break
3787fi
3788rm -f conftest.err conftest.$ac_ext
3789
3790done
3791# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3792rm -f conftest.err conftest.$ac_ext
3793if $ac_preproc_ok; then
3794 break
3795fi
3796
3797 done
3798 ac_cv_prog_CPP=$CPP
3799
3800fi
3801 CPP=$ac_cv_prog_CPP
3802else
3803 ac_cv_prog_CPP=$CPP
3804fi
3805echo "$as_me:$LINENO: result: $CPP" >&5
3806echo "${ECHO_T}$CPP" >&6
3807ac_preproc_ok=false
3808for ac_c_preproc_warn_flag in '' yes
3809do
3810 # Use a header file that comes with gcc, so configuring glibc
3811 # with a fresh cross-compiler works.
3812 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3813 # <limits.h> exists even on freestanding compilers.
3814 # On the NeXT, cc -E runs the code through the compiler's parser,
3815 # not just through cpp. "Syntax error" is here to catch this case.
3816 cat >conftest.$ac_ext <<_ACEOF
3817/* confdefs.h. */
3818_ACEOF
3819cat confdefs.h >>conftest.$ac_ext
3820cat >>conftest.$ac_ext <<_ACEOF
3821/* end confdefs.h. */
3822#ifdef __STDC__
3823# include <limits.h>
3824#else
3825# include <assert.h>
3826#endif
3827 Syntax error
3828_ACEOF
3829if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3830 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3831 ac_status=$?
3832 grep -v '^ *+' conftest.er1 >conftest.err
3833 rm -f conftest.er1
3834 cat conftest.err >&5
3835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3836 (exit $ac_status); } >/dev/null; then
3837 if test -s conftest.err; then
3838 ac_cpp_err=$ac_c_preproc_warn_flag
3839 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3840 else
3841 ac_cpp_err=
3842 fi
3843else
3844 ac_cpp_err=yes
3845fi
3846if test -z "$ac_cpp_err"; then
3847 :
3848else
3849 echo "$as_me: failed program was:" >&5
3850sed 's/^/| /' conftest.$ac_ext >&5
3851
3852 # Broken: fails on valid input.
3853continue
3854fi
3855rm -f conftest.err conftest.$ac_ext
3856
3857 # OK, works on sane cases. Now check whether non-existent headers
3858 # can be detected and how.
3859 cat >conftest.$ac_ext <<_ACEOF
3860/* confdefs.h. */
3861_ACEOF
3862cat confdefs.h >>conftest.$ac_ext
3863cat >>conftest.$ac_ext <<_ACEOF
3864/* end confdefs.h. */
3865#include <ac_nonexistent.h>
3866_ACEOF
3867if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3868 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3869 ac_status=$?
3870 grep -v '^ *+' conftest.er1 >conftest.err
3871 rm -f conftest.er1
3872 cat conftest.err >&5
3873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3874 (exit $ac_status); } >/dev/null; then
3875 if test -s conftest.err; then
3876 ac_cpp_err=$ac_c_preproc_warn_flag
3877 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3878 else
3879 ac_cpp_err=
3880 fi
3881else
3882 ac_cpp_err=yes
3883fi
3884if test -z "$ac_cpp_err"; then
3885 # Broken: success on invalid input.
3886continue
3887else
3888 echo "$as_me: failed program was:" >&5
3889sed 's/^/| /' conftest.$ac_ext >&5
3890
3891 # Passes both tests.
3892ac_preproc_ok=:
3893break
3894fi
3895rm -f conftest.err conftest.$ac_ext
3896
3897done
3898# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3899rm -f conftest.err conftest.$ac_ext
3900if $ac_preproc_ok; then
3901 :
3902else
3903 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3904See \`config.log' for more details." >&5
3905echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3906See \`config.log' for more details." >&2;}
3907 { (exit 1); exit 1; }; }
3908fi
3909
3910ac_ext=c
3911ac_cpp='$CPP $CPPFLAGS'
3912ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3913ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3914ac_compiler_gnu=$ac_cv_c_compiler_gnu
3915
3916
3917echo "$as_me:$LINENO: checking for egrep" >&5
3918echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3919if test "${ac_cv_prog_egrep+set}" = set; then
3920 echo $ECHO_N "(cached) $ECHO_C" >&6
3921else
3922 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3923 then ac_cv_prog_egrep='grep -E'
3924 else ac_cv_prog_egrep='egrep'
3925 fi
3926fi
3927echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
3928echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3929 EGREP=$ac_cv_prog_egrep
3930
3931
3932
3933echo "$as_me:$LINENO: checking for AIX" >&5
3934echo $ECHO_N "checking for AIX... $ECHO_C" >&6
3935cat >conftest.$ac_ext <<_ACEOF
3936/* confdefs.h. */
3937_ACEOF
3938cat confdefs.h >>conftest.$ac_ext
3939cat >>conftest.$ac_ext <<_ACEOF
3940/* end confdefs.h. */
3941#ifdef _AIX
3942 yes
3943#endif
3944
3945_ACEOF
3946if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3947 $EGREP "yes" >/dev/null 2>&1; then
3948 echo "$as_me:$LINENO: result: yes" >&5
3949echo "${ECHO_T}yes" >&6
3950cat >>confdefs.h <<\_ACEOF
3951#define _ALL_SOURCE 1
3952_ACEOF
3953
3954else
3955 echo "$as_me:$LINENO: result: no" >&5
3956echo "${ECHO_T}no" >&6
3957fi
3958rm -f conftest*
3959
3960
3961
3962cat >>confdefs.h <<\_ACEOF
3963#define _GNU_SOURCE 1
3964_ACEOF
3965
3966
3967
01abe918
CY
3968### Use -Wno-pointer-sign if the compiler supports it
3969echo "$as_me:$LINENO: checking whether gcc understands -Wno-pointer-sign" >&5
3970echo $ECHO_N "checking whether gcc understands -Wno-pointer-sign... $ECHO_C" >&6
3971SAVE_CFLAGS="$CFLAGS"
3972CFLAGS="$CFLAGS -Wno-pointer-sign"
01abe918
CY
3973cat >conftest.$ac_ext <<_ACEOF
3974/* confdefs.h. */
3975_ACEOF
3976cat confdefs.h >>conftest.$ac_ext
3977cat >>conftest.$ac_ext <<_ACEOF
3978/* end confdefs.h. */
3979
3980int
3981main ()
3982{
3983
3984 ;
3985 return 0;
3986}
3987_ACEOF
3988rm -f conftest.$ac_objext
3989if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3990 (eval $ac_compile) 2>conftest.er1
3991 ac_status=$?
3992 grep -v '^ *+' conftest.er1 >conftest.err
3993 rm -f conftest.er1
3994 cat conftest.err >&5
3995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3996 (exit $ac_status); } &&
e143ad11
AS
3997 { ac_try='test -z "$ac_c_werror_flag"
3998 || test ! -s conftest.err'
01abe918
CY
3999 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4000 (eval $ac_try) 2>&5
4001 ac_status=$?
4002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4003 (exit $ac_status); }; } &&
4004 { ac_try='test -s conftest.$ac_objext'
4005 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4006 (eval $ac_try) 2>&5
4007 ac_status=$?
4008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4009 (exit $ac_status); }; }; then
4010 has_option=yes
4011else
4012 echo "$as_me: failed program was:" >&5
4013sed 's/^/| /' conftest.$ac_ext >&5
4014
4015has_option=no
4016fi
4017rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4018if test $has_option = yes; then
4019 C_WARNINGS_SWITCH="-Wno-pointer-sign $C_WARNINGS_SWITCH"
4020fi
4021echo "$as_me:$LINENO: result: $has_option" >&5
4022echo "${ECHO_T}$has_option" >&6
4023CFLAGS="$SAVE_CFLAGS"
4024unset has_option
4025unset SAVE_CFLAGS
4026
6a3a24fa 4027#### Some other nice autoconf tests.
ba4481b5 4028
c0d27fcc 4029echo "$as_me:$LINENO: checking whether ln -s works" >&5
503d2be0
AS
4030echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
4031LN_S=$as_ln_s
4032if test "$LN_S" = "ln -s"; then
c0d27fcc 4033 echo "$as_me:$LINENO: result: yes" >&5
503d2be0 4034echo "${ECHO_T}yes" >&6
ba4481b5 4035else
c0d27fcc 4036 echo "$as_me:$LINENO: result: no, using $LN_S" >&5
503d2be0 4037echo "${ECHO_T}no, using $LN_S" >&6
ba4481b5
DL
4038fi
4039
503d2be0
AS
4040ac_ext=c
4041ac_cpp='$CPP $CPPFLAGS'
4042ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4043ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4044ac_compiler_gnu=$ac_cv_c_compiler_gnu
c0d27fcc 4045echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
503d2be0 4046echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
ba4481b5
DL
4047# On Suns, sometimes $CPP names a directory.
4048if test -n "$CPP" && test -d "$CPP"; then
4049 CPP=
4050fi
4051if test -z "$CPP"; then
503d2be0
AS
4052 if test "${ac_cv_prog_CPP+set}" = set; then
4053 echo $ECHO_N "(cached) $ECHO_C" >&6
4054else
4055 # Double quotes because CPP needs to be expanded
4056 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4057 do
4058 ac_preproc_ok=false
4059for ac_c_preproc_warn_flag in '' yes
4060do
4061 # Use a header file that comes with gcc, so configuring glibc
4062 # with a fresh cross-compiler works.
19650fd6
AS
4063 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4064 # <limits.h> exists even on freestanding compilers.
ba4481b5 4065 # On the NeXT, cc -E runs the code through the compiler's parser,
503d2be0
AS
4066 # not just through cpp. "Syntax error" is here to catch this case.
4067 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4068/* confdefs.h. */
4069_ACEOF
4070cat confdefs.h >>conftest.$ac_ext
4071cat >>conftest.$ac_ext <<_ACEOF
4072/* end confdefs.h. */
4073#ifdef __STDC__
4074# include <limits.h>
4075#else
4076# include <assert.h>
4077#endif
edfaf76d 4078 Syntax error
503d2be0 4079_ACEOF
c0d27fcc 4080if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
4081 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4082 ac_status=$?
6bae0ccf 4083 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4084 rm -f conftest.er1
4085 cat conftest.err >&5
c0d27fcc 4086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4087 (exit $ac_status); } >/dev/null; then
4088 if test -s conftest.err; then
4089 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 4090 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
4091 else
4092 ac_cpp_err=
4093 fi
4094else
4095 ac_cpp_err=yes
4096fi
4097if test -z "$ac_cpp_err"; then
ba4481b5
DL
4098 :
4099else
503d2be0 4100 echo "$as_me: failed program was:" >&5
19650fd6
AS
4101sed 's/^/| /' conftest.$ac_ext >&5
4102
503d2be0
AS
4103 # Broken: fails on valid input.
4104continue
4105fi
4106rm -f conftest.err conftest.$ac_ext
4107
4108 # OK, works on sane cases. Now check whether non-existent headers
4109 # can be detected and how.
4110 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4111/* confdefs.h. */
4112_ACEOF
4113cat confdefs.h >>conftest.$ac_ext
4114cat >>conftest.$ac_ext <<_ACEOF
4115/* end confdefs.h. */
503d2be0
AS
4116#include <ac_nonexistent.h>
4117_ACEOF
c0d27fcc 4118if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
4119 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4120 ac_status=$?
6bae0ccf 4121 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4122 rm -f conftest.er1
4123 cat conftest.err >&5
c0d27fcc 4124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4125 (exit $ac_status); } >/dev/null; then
4126 if test -s conftest.err; then
4127 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 4128 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
4129 else
4130 ac_cpp_err=
4131 fi
4132else
4133 ac_cpp_err=yes
4134fi
4135if test -z "$ac_cpp_err"; then
4136 # Broken: success on invalid input.
4137continue
c4bb2108 4138else
503d2be0 4139 echo "$as_me: failed program was:" >&5
19650fd6
AS
4140sed 's/^/| /' conftest.$ac_ext >&5
4141
503d2be0
AS
4142 # Passes both tests.
4143ac_preproc_ok=:
4144break
4145fi
4146rm -f conftest.err conftest.$ac_ext
4147
4148done
4149# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4150rm -f conftest.err conftest.$ac_ext
4151if $ac_preproc_ok; then
4152 break
4153fi
4154
4155 done
4156 ac_cv_prog_CPP=$CPP
4157
4158fi
4159 CPP=$ac_cv_prog_CPP
4160else
4161 ac_cv_prog_CPP=$CPP
4162fi
c0d27fcc 4163echo "$as_me:$LINENO: result: $CPP" >&5
503d2be0
AS
4164echo "${ECHO_T}$CPP" >&6
4165ac_preproc_ok=false
4166for ac_c_preproc_warn_flag in '' yes
4167do
4168 # Use a header file that comes with gcc, so configuring glibc
4169 # with a fresh cross-compiler works.
19650fd6
AS
4170 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4171 # <limits.h> exists even on freestanding compilers.
503d2be0
AS
4172 # On the NeXT, cc -E runs the code through the compiler's parser,
4173 # not just through cpp. "Syntax error" is here to catch this case.
4174 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4175/* confdefs.h. */
4176_ACEOF
4177cat confdefs.h >>conftest.$ac_ext
4178cat >>conftest.$ac_ext <<_ACEOF
4179/* end confdefs.h. */
4180#ifdef __STDC__
4181# include <limits.h>
4182#else
4183# include <assert.h>
4184#endif
edfaf76d 4185 Syntax error
503d2be0 4186_ACEOF
c0d27fcc 4187if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
4188 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4189 ac_status=$?
6bae0ccf 4190 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4191 rm -f conftest.er1
4192 cat conftest.err >&5
c0d27fcc 4193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4194 (exit $ac_status); } >/dev/null; then
4195 if test -s conftest.err; then
4196 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 4197 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
4198 else
4199 ac_cpp_err=
4200 fi
4201else
4202 ac_cpp_err=yes
4203fi
4204if test -z "$ac_cpp_err"; then
ba4481b5
DL
4205 :
4206else
503d2be0 4207 echo "$as_me: failed program was:" >&5
19650fd6
AS
4208sed 's/^/| /' conftest.$ac_ext >&5
4209
503d2be0
AS
4210 # Broken: fails on valid input.
4211continue
4212fi
4213rm -f conftest.err conftest.$ac_ext
4214
4215 # OK, works on sane cases. Now check whether non-existent headers
4216 # can be detected and how.
4217 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4218/* confdefs.h. */
4219_ACEOF
4220cat confdefs.h >>conftest.$ac_ext
4221cat >>conftest.$ac_ext <<_ACEOF
4222/* end confdefs.h. */
503d2be0
AS
4223#include <ac_nonexistent.h>
4224_ACEOF
c0d27fcc 4225if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
4226 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4227 ac_status=$?
6bae0ccf 4228 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4229 rm -f conftest.er1
4230 cat conftest.err >&5
c0d27fcc 4231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4232 (exit $ac_status); } >/dev/null; then
4233 if test -s conftest.err; then
4234 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 4235 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
4236 else
4237 ac_cpp_err=
4238 fi
4239else
4240 ac_cpp_err=yes
c4bb2108 4241fi
503d2be0
AS
4242if test -z "$ac_cpp_err"; then
4243 # Broken: success on invalid input.
4244continue
4245else
4246 echo "$as_me: failed program was:" >&5
19650fd6
AS
4247sed 's/^/| /' conftest.$ac_ext >&5
4248
503d2be0
AS
4249 # Passes both tests.
4250ac_preproc_ok=:
4251break
ba4481b5 4252fi
503d2be0
AS
4253rm -f conftest.err conftest.$ac_ext
4254
4255done
4256# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4257rm -f conftest.err conftest.$ac_ext
4258if $ac_preproc_ok; then
4259 :
ba4481b5 4260else
19650fd6
AS
4261 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
4262See \`config.log' for more details." >&5
4263echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
4264See \`config.log' for more details." >&2;}
503d2be0 4265 { (exit 1); exit 1; }; }
ba4481b5 4266fi
503d2be0
AS
4267
4268ac_ext=c
4269ac_cpp='$CPP $CPPFLAGS'
4270ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4271ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4272ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5
DL
4273
4274# Find a good install program. We prefer a C program (faster),
4275# so one script is as good as another. But avoid the broken or
4276# incompatible versions:
4277# SysV /etc/install, /usr/sbin/install
4278# SunOS /usr/etc/install
4279# IRIX /sbin/install
4280# AIX /bin/install
503d2be0 4281# AmigaOS /C/install, which installs bootblocks on floppy discs
c4bb2108 4282# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
ba4481b5
DL
4283# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4284# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
edfaf76d 4285# OS/2's system install, which has a completely different semantic
ba4481b5 4286# ./install, which can be erroneously created by make from ./install.sh.
c0d27fcc
MR
4287echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4288echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
ba4481b5 4289if test -z "$INSTALL"; then
503d2be0
AS
4290if test "${ac_cv_path_install+set}" = set; then
4291 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4292else
c0d27fcc
MR
4293 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4294for as_dir in $PATH
4295do
4296 IFS=$as_save_IFS
4297 test -z "$as_dir" && as_dir=.
4298 # Account for people who put trailing slashes in PATH elements.
4299case $as_dir/ in
4300 ./ | .// | /cC/* | \
4301 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
edfaf76d 4302 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
c0d27fcc
MR
4303 /usr/ucb/* ) ;;
4304 *)
4305 # OSF1 and SCO ODT 3.0 have their own names for install.
4306 # Don't use installbsd from OSF since it installs stuff as root
4307 # by default.
4308 for ac_prog in ginstall scoinst install; do
4309 for ac_exec_ext in '' $ac_executable_extensions; do
edfaf76d
LK
4310 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
4311 if test $ac_prog = install &&
4312 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4313 # AIX install. It has an incompatible calling convention.
4314 :
4315 elif test $ac_prog = install &&
4316 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4317 # program-specific install script used by HP pwplus--don't use.
4318 :
4319 else
4320 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4321 break 3
4322 fi
4323 fi
ba4481b5 4324 done
c0d27fcc
MR
4325 done
4326 ;;
4327esac
4328done
4329
ba4481b5
DL
4330
4331fi
4332 if test "${ac_cv_path_install+set}" = set; then
503d2be0 4333 INSTALL=$ac_cv_path_install
ba4481b5
DL
4334 else
4335 # As a last resort, use the slow shell script. We don't cache a
4336 # path for INSTALL within a source directory, because that will
4337 # break other packages using the cache if that directory is
4338 # removed, or if the path is relative.
503d2be0 4339 INSTALL=$ac_install_sh
ba4481b5
DL
4340 fi
4341fi
c0d27fcc 4342echo "$as_me:$LINENO: result: $INSTALL" >&5
503d2be0 4343echo "${ECHO_T}$INSTALL" >&6
ba4481b5
DL
4344
4345# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4346# It thinks the first close brace ends the variable substitution.
4347test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4348
503d2be0 4349test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
c4bb2108 4350
ba4481b5
DL
4351test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4352
c0d27fcc
MR
4353if test "x$RANLIB" = x; then
4354 if test -n "$ac_tool_prefix"; then
4355 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4356set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4357echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0 4358echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
c0d27fcc 4359if test "${ac_cv_prog_RANLIB+set}" = set; then
503d2be0 4360 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4
DL
4361else
4362 if test -n "$RANLIB"; then
4363 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4364else
c0d27fcc
MR
4365as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4366for as_dir in $PATH
4367do
4368 IFS=$as_save_IFS
4369 test -z "$as_dir" && as_dir=.
4370 for ac_exec_ext in '' $ac_executable_extensions; do
4371 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4372 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4373 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4374 break 2
4375 fi
4376done
503d2be0
AS
4377done
4378
7397acc4
DL
4379fi
4380fi
503d2be0 4381RANLIB=$ac_cv_prog_RANLIB
7397acc4 4382if test -n "$RANLIB"; then
c0d27fcc 4383 echo "$as_me:$LINENO: result: $RANLIB" >&5
503d2be0
AS
4384echo "${ECHO_T}$RANLIB" >&6
4385else
c0d27fcc 4386 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
4387echo "${ECHO_T}no" >&6
4388fi
4389
4390fi
4391if test -z "$ac_cv_prog_RANLIB"; then
4392 ac_ct_RANLIB=$RANLIB
4393 # Extract the first word of "ranlib", so it can be a program name with args.
4394set dummy ranlib; ac_word=$2
c0d27fcc 4395echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
4396echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4397if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4398 echo $ECHO_N "(cached) $ECHO_C" >&6
4399else
4400 if test -n "$ac_ct_RANLIB"; then
4401 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4402else
c0d27fcc
MR
4403as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4404for as_dir in $PATH
4405do
4406 IFS=$as_save_IFS
4407 test -z "$as_dir" && as_dir=.
4408 for ac_exec_ext in '' $ac_executable_extensions; do
4409 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4410 ac_cv_prog_ac_ct_RANLIB="ranlib"
4411 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4412 break 2
4413 fi
4414done
503d2be0
AS
4415done
4416
4417 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
4418fi
4419fi
4420ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4421if test -n "$ac_ct_RANLIB"; then
c0d27fcc 4422 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
503d2be0
AS
4423echo "${ECHO_T}$ac_ct_RANLIB" >&6
4424else
c0d27fcc 4425 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
4426echo "${ECHO_T}no" >&6
4427fi
4428
4429 RANLIB=$ac_ct_RANLIB
7397acc4 4430else
503d2be0 4431 RANLIB="$ac_cv_prog_RANLIB"
7397acc4
DL
4432fi
4433
4434fi
9e71690e
DK
4435# Extract the first word of "install-info", so it can be a program name with args.
4436set dummy install-info; ac_word=$2
4437echo "$as_me:$LINENO: checking for $ac_word" >&5
4438echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4439if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
4440 echo $ECHO_N "(cached) $ECHO_C" >&6
4441else
4442 case $INSTALL_INFO in
4443 [\\/]* | ?:[\\/]*)
4444 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
4445 ;;
4446 *)
4447 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4448for as_dir in $PATH
4449do
4450 IFS=$as_save_IFS
4451 test -z "$as_dir" && as_dir=.
4452 for ac_exec_ext in '' $ac_executable_extensions; do
4453 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4454 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
4455 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4456 break 2
4457 fi
4458done
4459done
4460
4461 ;;
4462esac
4463fi
4464INSTALL_INFO=$ac_cv_path_INSTALL_INFO
4465
4466if test -n "$INSTALL_INFO"; then
4467 echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
4468echo "${ECHO_T}$INSTALL_INFO" >&6
4469else
4470 echo "$as_me:$LINENO: result: no" >&5
4471echo "${ECHO_T}no" >&6
4472fi
4473
4474# Extract the first word of "install-info", so it can be a program name with args.
4475set dummy install-info; ac_word=$2
4476echo "$as_me:$LINENO: checking for $ac_word" >&5
4477echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4478if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
4479 echo $ECHO_N "(cached) $ECHO_C" >&6
4480else
4481 case $INSTALL_INFO in
4482 [\\/]* | ?:[\\/]*)
4483 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
4484 ;;
4485 *)
4486 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4487for as_dir in /usr/sbin
4488do
4489 IFS=$as_save_IFS
4490 test -z "$as_dir" && as_dir=.
4491 for ac_exec_ext in '' $ac_executable_extensions; do
4492 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4493 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
4494 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4495 break 2
4496 fi
4497done
4498done
4499
4500 ;;
4501esac
4502fi
4503INSTALL_INFO=$ac_cv_path_INSTALL_INFO
4504
4505if test -n "$INSTALL_INFO"; then
4506 echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
4507echo "${ECHO_T}$INSTALL_INFO" >&6
4508else
4509 echo "$as_me:$LINENO: result: no" >&5
4510echo "${ECHO_T}no" >&6
4511fi
4512
4513# Extract the first word of "install-info", so it can be a program name with args.
4514set dummy install-info; ac_word=$2
4515echo "$as_me:$LINENO: checking for $ac_word" >&5
4516echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4517if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
4518 echo $ECHO_N "(cached) $ECHO_C" >&6
4519else
4520 case $INSTALL_INFO in
4521 [\\/]* | ?:[\\/]*)
4522 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
4523 ;;
4524 *)
4525 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4526for as_dir in /sbin
4527do
4528 IFS=$as_save_IFS
4529 test -z "$as_dir" && as_dir=.
4530 for ac_exec_ext in '' $ac_executable_extensions; do
4531 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4532 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
4533 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4534 break 2
4535 fi
4536done
4537done
4538
4539 test -z "$ac_cv_path_INSTALL_INFO" && ac_cv_path_INSTALL_INFO=":"
4540 ;;
4541esac
4542fi
4543INSTALL_INFO=$ac_cv_path_INSTALL_INFO
4544
4545if test -n "$INSTALL_INFO"; then
4546 echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
4547echo "${ECHO_T}$INSTALL_INFO" >&6
4548else
4549 echo "$as_me:$LINENO: result: no" >&5
4550echo "${ECHO_T}no" >&6
4551fi
4552
8ae52ca6
RF
4553# Extract the first word of "gzip", so it can be a program name with args.
4554set dummy gzip; ac_word=$2
4555echo "$as_me:$LINENO: checking for $ac_word" >&5
4556echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
46e35e9f 4557if test "${ac_cv_path_GZIP_PROG+set}" = set; then
8ae52ca6
RF
4558 echo $ECHO_N "(cached) $ECHO_C" >&6
4559else
46e35e9f 4560 case $GZIP_PROG in
8ae52ca6 4561 [\\/]* | ?:[\\/]*)
46e35e9f 4562 ac_cv_path_GZIP_PROG="$GZIP_PROG" # Let the user override the test with a path.
8ae52ca6
RF
4563 ;;
4564 *)
4565 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4566for as_dir in $PATH
4567do
4568 IFS=$as_save_IFS
4569 test -z "$as_dir" && as_dir=.
4570 for ac_exec_ext in '' $ac_executable_extensions; do
4571 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46e35e9f 4572 ac_cv_path_GZIP_PROG="$as_dir/$ac_word$ac_exec_ext"
8ae52ca6
RF
4573 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4574 break 2
4575 fi
4576done
4577done
4578
4579 ;;
4580esac
4581fi
46e35e9f 4582GZIP_PROG=$ac_cv_path_GZIP_PROG
8ae52ca6 4583
46e35e9f
AS
4584if test -n "$GZIP_PROG"; then
4585 echo "$as_me:$LINENO: result: $GZIP_PROG" >&5
4586echo "${ECHO_T}$GZIP_PROG" >&6
8ae52ca6
RF
4587else
4588 echo "$as_me:$LINENO: result: no" >&5
4589echo "${ECHO_T}no" >&6
4590fi
4591
ba4481b5 4592
c0d27fcc 4593
8e967cf7
MR
4594if test x$GCC = xyes && test "x$GCC_LINK_TEST_OPTIONS" != x
4595then
4596 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
4597fi
4598
4599if test x$GCC = x && test "x$NON_GCC_LINK_TEST_OPTIONS" != x
4600then
4601 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
4602fi
4603
c0d27fcc 4604
fe239f0f 4605late_LDFLAGS=$LDFLAGS
4af002d6 4606if test "$GCC" = yes; then
fe239f0f
AS
4607 LDFLAGS="$LDFLAGS -Wl,-znocombreloc"
4608else
4609 LDFLAGS="$LDFLAGS -znocombreloc"
4610fi
4611
edfaf76d
LK
4612echo "$as_me:$LINENO: checking for -znocombreloc" >&5
4613echo $ECHO_N "checking for -znocombreloc... $ECHO_C" >&6
fe239f0f
AS
4614cat >conftest.$ac_ext <<_ACEOF
4615main(){return 0;}
4616_ACEOF
4617rm -f conftest.$ac_objext conftest$ac_exeext
4618if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 4619 (eval $ac_link) 2>conftest.er1
fe239f0f 4620 ac_status=$?
edfaf76d
LK
4621 grep -v '^ *+' conftest.er1 >conftest.err
4622 rm -f conftest.er1
4623 cat conftest.err >&5
fe239f0f
AS
4624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4625 (exit $ac_status); } &&
e143ad11
AS
4626 { ac_try='test -z "$ac_c_werror_flag"
4627 || test ! -s conftest.err'
edfaf76d
LK
4628 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4629 (eval $ac_try) 2>&5
4630 ac_status=$?
4631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4632 (exit $ac_status); }; } &&
4633 { ac_try='test -s conftest$ac_exeext'
fe239f0f
AS
4634 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4635 (eval $ac_try) 2>&5
4636 ac_status=$?
4637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4638 (exit $ac_status); }; }; then
4639 echo "$as_me:$LINENO: result: yes" >&5
4640echo "${ECHO_T}yes" >&6
4641else
4642 echo "$as_me: failed program was:" >&5
4643sed 's/^/| /' conftest.$ac_ext >&5
4644
4645LDFLAGS=$late_LDFLAGS
4646 echo "$as_me:$LINENO: result: no" >&5
4647echo "${ECHO_T}no" >&6
4648fi
edfaf76d
LK
4649rm -f conftest.err conftest.$ac_objext \
4650 conftest$ac_exeext conftest.$ac_ext
fe239f0f 4651
3b33a005
DL
4652#### Extract some information from the operating system and machine files.
4653
c0d27fcc 4654{ echo "$as_me:$LINENO: checking the machine- and system-dependent files to find out
3b33a005 4655 - which libraries the lib-src programs will want, and
503d2be0
AS
4656 - whether the GNU malloc routines are usable..." >&5
4657echo "$as_me: checking the machine- and system-dependent files to find out
3b33a005 4658 - which libraries the lib-src programs will want, and
503d2be0 4659 - whether the GNU malloc routines are usable..." >&6;}
3b33a005
DL
4660
4661### First figure out CFLAGS (which we use for running the compiler here)
4662### and REAL_CFLAGS (which we use for real compilation).
4663### The two are the same except on a few systems, where they are made
4664### different to work around various lossages. For example,
4665### GCC 2.5 on GNU/Linux needs them to be different because it treats -g
4666### as implying static linking.
4667
4668### If the CFLAGS env var is specified, we use that value
4669### instead of the default.
4670
4671### It's not important that this name contain the PID; you can't run
4672### two configures in the same directory and have anything work
4673### anyway.
4674tempcname="conftest.c"
4675
4676echo '
4677#include "'${srcdir}'/src/'${opsysfile}'"
4678#include "'${srcdir}'/src/'${machfile}'"
4679#ifndef LIBS_MACHINE
4680#define LIBS_MACHINE
4681#endif
4682#ifndef LIBS_SYSTEM
4683#define LIBS_SYSTEM
4684#endif
4685#ifndef C_SWITCH_SYSTEM
4686#define C_SWITCH_SYSTEM
4687#endif
4688#ifndef C_SWITCH_MACHINE
4689#define C_SWITCH_MACHINE
4690#endif
4691configure___ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM
4692configure___ c_switch_system=C_SWITCH_SYSTEM
4693configure___ c_switch_machine=C_SWITCH_MACHINE
4694
4695#ifndef LIB_X11_LIB
4696#define LIB_X11_LIB -lX11
4697#endif
4698
4699#ifndef LIBX11_MACHINE
4700#define LIBX11_MACHINE
4701#endif
4702
4703#ifndef LIBX11_SYSTEM
4704#define LIBX11_SYSTEM
4705#endif
4706configure___ LIBX=LIB_X11_LIB LIBX11_MACHINE LIBX11_SYSTEM
4707
4708#ifdef UNEXEC
4709configure___ unexec=UNEXEC
4710#else
4711configure___ unexec=unexec.o
4712#endif
4713
4714#ifdef SYSTEM_MALLOC
4715configure___ system_malloc=yes
4716#else
4717configure___ system_malloc=no
4718#endif
4719
ef9e4345
GM
4720#ifdef USE_MMAP_FOR_BUFFERS
4721configure___ use_mmap_for_buffers=yes
73b77ee5 4722#else
ef9e4345 4723configure___ use_mmap_for_buffers=no
73b77ee5
GM
4724#endif
4725
3b33a005
DL
4726#ifndef C_DEBUG_SWITCH
4727#define C_DEBUG_SWITCH -g
4728#endif
4729
4730#ifndef C_OPTIMIZE_SWITCH
4731#ifdef __GNUC__
4732#define C_OPTIMIZE_SWITCH -O2
4733#else
4734#define C_OPTIMIZE_SWITCH -O
4735#endif
4736#endif
4737
01abe918
CY
4738#ifndef C_WARNINGS_SWITCH
4739#define C_WARNINGS_SWITCH ${C_WARNINGS_SWITCH}
4740#endif
4741
3b33a005
DL
4742#ifndef LD_SWITCH_MACHINE
4743#define LD_SWITCH_MACHINE
4744#endif
4745
4746#ifndef LD_SWITCH_SYSTEM
4747#define LD_SWITCH_SYSTEM
4748#endif
4749
4750#ifndef LD_SWITCH_X_SITE_AUX
4751#define LD_SWITCH_X_SITE_AUX
503d2be0 4752#endif
3b33a005
DL
4753
4754configure___ ld_switch_system=LD_SWITCH_SYSTEM
4755configure___ ld_switch_machine=LD_SWITCH_MACHINE
4756
4757#ifdef THIS_IS_CONFIGURE
4758
4759/* Get the CFLAGS for tests in configure. */
4760#ifdef __GNUC__
4761configure___ CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
4762#else
4763configure___ CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
4764#endif
4765
4766#else /* not THIS_IS_CONFIGURE */
4767
4768/* Get the CFLAGS for real compilation. */
4769#ifdef __GNUC__
01abe918 4770configure___ REAL_CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH C_WARNINGS_SWITCH '${SPECIFIED_CFLAGS}'
3b33a005
DL
4771#else
4772configure___ REAL_CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
4773#endif
4774
4775#endif /* not THIS_IS_CONFIGURE */
4776' > ${tempcname}
4777
4778# The value of CPP is a quoted variable reference, so we need to do this
4779# to get its actual value...
4780CPP=`eval "echo $CPP"`
4781eval `${CPP} -Isrc ${tempcname} \
4782 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
4783if test "x$SPECIFIED_CFLAGS" = x; then
4784 eval `${CPP} -Isrc -DTHIS_IS_CONFIGURE ${tempcname} \
4785 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
4786else
4787 REAL_CFLAGS="$CFLAGS"
4788fi
4789rm ${tempcname}
4790
4791ac_link="$ac_link $ld_switch_machine $ld_switch_system"
4792
4793### Make sure subsequent tests use flags consistent with the build flags.
4794
4795if test x"${OVERRIDE_CPPFLAGS}" != x; then
4796 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
4797else
4798 CPPFLAGS="$c_switch_system $c_switch_machine $CPPFLAGS"
4799fi
4800
6bae0ccf
DL
4801
4802
503d2be0 4803# Check whether --enable-largefile or --disable-largefile was given.
f4988be7
GM
4804if test "${enable_largefile+set}" = set; then
4805 enableval="$enable_largefile"
f4988be7 4806
503d2be0
AS
4807fi;
4808if test "$enable_largefile" != no; then
f4988be7 4809
c0d27fcc 4810 echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
503d2be0
AS
4811echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
4812if test "${ac_cv_sys_largefile_CC+set}" = set; then
4813 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4814else
f4988be7 4815 ac_cv_sys_largefile_CC=no
503d2be0
AS
4816 if test "$GCC" != yes; then
4817 ac_save_CC=$CC
4818 while :; do
4819 # IRIX 6.2 and later do not support large files by default,
4820 # so use the C compiler's -n32 option if that helps.
edfaf76d 4821 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4822/* confdefs.h. */
4823_ACEOF
4824cat confdefs.h >>conftest.$ac_ext
4825cat >>conftest.$ac_ext <<_ACEOF
4826/* end confdefs.h. */
f4988be7 4827#include <sys/types.h>
503d2be0
AS
4828 /* Check that off_t can represent 2**63 - 1 correctly.
4829 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4830 since some C++ compilers masquerading as C compilers
4831 incorrectly reject 9223372036854775807. */
4832#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4833 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4834 && LARGE_OFF_T % 2147483647 == 1)
4835 ? 1 : -1];
4836int
4837main ()
4838{
f4988be7 4839
503d2be0
AS
4840 ;
4841 return 0;
4842}
4843_ACEOF
4844 rm -f conftest.$ac_objext
c0d27fcc 4845if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 4846 (eval $ac_compile) 2>conftest.er1
503d2be0 4847 ac_status=$?
edfaf76d
LK
4848 grep -v '^ *+' conftest.er1 >conftest.err
4849 rm -f conftest.er1
4850 cat conftest.err >&5
c0d27fcc 4851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 4852 (exit $ac_status); } &&
e143ad11
AS
4853 { ac_try='test -z "$ac_c_werror_flag"
4854 || test ! -s conftest.err'
edfaf76d
LK
4855 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4856 (eval $ac_try) 2>&5
4857 ac_status=$?
4858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4859 (exit $ac_status); }; } &&
4860 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 4861 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
4862 (eval $ac_try) 2>&5
4863 ac_status=$?
c0d27fcc 4864 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4865 (exit $ac_status); }; }; then
4866 break
b192d653 4867else
503d2be0 4868 echo "$as_me: failed program was:" >&5
19650fd6
AS
4869sed 's/^/| /' conftest.$ac_ext >&5
4870
503d2be0 4871fi
edfaf76d 4872rm -f conftest.err conftest.$ac_objext
503d2be0
AS
4873 CC="$CC -n32"
4874 rm -f conftest.$ac_objext
c0d27fcc 4875if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 4876 (eval $ac_compile) 2>conftest.er1
503d2be0 4877 ac_status=$?
edfaf76d
LK
4878 grep -v '^ *+' conftest.er1 >conftest.err
4879 rm -f conftest.er1
4880 cat conftest.err >&5
c0d27fcc 4881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 4882 (exit $ac_status); } &&
e143ad11
AS
4883 { ac_try='test -z "$ac_c_werror_flag"
4884 || test ! -s conftest.err'
edfaf76d
LK
4885 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4886 (eval $ac_try) 2>&5
4887 ac_status=$?
4888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4889 (exit $ac_status); }; } &&
4890 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 4891 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
4892 (eval $ac_try) 2>&5
4893 ac_status=$?
c0d27fcc 4894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4895 (exit $ac_status); }; }; then
4896 ac_cv_sys_largefile_CC=' -n32'; break
4897else
4898 echo "$as_me: failed program was:" >&5
19650fd6
AS
4899sed 's/^/| /' conftest.$ac_ext >&5
4900
503d2be0 4901fi
edfaf76d
LK
4902rm -f conftest.err conftest.$ac_objext
4903 break
503d2be0
AS
4904 done
4905 CC=$ac_save_CC
4906 rm -f conftest.$ac_ext
4907 fi
b192d653 4908fi
c0d27fcc 4909echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
503d2be0
AS
4910echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
4911 if test "$ac_cv_sys_largefile_CC" != no; then
4912 CC=$CC$ac_cv_sys_largefile_CC
4913 fi
b192d653 4914
c0d27fcc 4915 echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
503d2be0
AS
4916echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
4917if test "${ac_cv_sys_file_offset_bits+set}" = set; then
4918 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4919else
503d2be0 4920 while :; do
f4988be7 4921 ac_cv_sys_file_offset_bits=no
503d2be0 4922 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4923/* confdefs.h. */
4924_ACEOF
4925cat confdefs.h >>conftest.$ac_ext
4926cat >>conftest.$ac_ext <<_ACEOF
4927/* end confdefs.h. */
f4988be7 4928#include <sys/types.h>
503d2be0
AS
4929 /* Check that off_t can represent 2**63 - 1 correctly.
4930 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4931 since some C++ compilers masquerading as C compilers
4932 incorrectly reject 9223372036854775807. */
4933#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4934 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4935 && LARGE_OFF_T % 2147483647 == 1)
4936 ? 1 : -1];
4937int
4938main ()
4939{
f4988be7 4940
503d2be0
AS
4941 ;
4942 return 0;
4943}
4944_ACEOF
4945rm -f conftest.$ac_objext
c0d27fcc 4946if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 4947 (eval $ac_compile) 2>conftest.er1
503d2be0 4948 ac_status=$?
edfaf76d
LK
4949 grep -v '^ *+' conftest.er1 >conftest.err
4950 rm -f conftest.er1
4951 cat conftest.err >&5
c0d27fcc 4952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 4953 (exit $ac_status); } &&
e143ad11
AS
4954 { ac_try='test -z "$ac_c_werror_flag"
4955 || test ! -s conftest.err'
edfaf76d
LK
4956 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4957 (eval $ac_try) 2>&5
4958 ac_status=$?
4959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4960 (exit $ac_status); }; } &&
4961 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 4962 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
4963 (eval $ac_try) 2>&5
4964 ac_status=$?
c0d27fcc 4965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4966 (exit $ac_status); }; }; then
4967 break
f4988be7 4968else
503d2be0 4969 echo "$as_me: failed program was:" >&5
19650fd6
AS
4970sed 's/^/| /' conftest.$ac_ext >&5
4971
503d2be0 4972fi
edfaf76d 4973rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 4974 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4975/* confdefs.h. */
4976_ACEOF
4977cat confdefs.h >>conftest.$ac_ext
4978cat >>conftest.$ac_ext <<_ACEOF
4979/* end confdefs.h. */
f4988be7
GM
4980#define _FILE_OFFSET_BITS 64
4981#include <sys/types.h>
503d2be0
AS
4982 /* Check that off_t can represent 2**63 - 1 correctly.
4983 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4984 since some C++ compilers masquerading as C compilers
4985 incorrectly reject 9223372036854775807. */
4986#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4987 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4988 && LARGE_OFF_T % 2147483647 == 1)
4989 ? 1 : -1];
4990int
4991main ()
4992{
4993
4994 ;
4995 return 0;
4996}
4997_ACEOF
4998rm -f conftest.$ac_objext
c0d27fcc 4999if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 5000 (eval $ac_compile) 2>conftest.er1
503d2be0 5001 ac_status=$?
edfaf76d
LK
5002 grep -v '^ *+' conftest.er1 >conftest.err
5003 rm -f conftest.er1
5004 cat conftest.err >&5
c0d27fcc 5005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5006 (exit $ac_status); } &&
e143ad11
AS
5007 { ac_try='test -z "$ac_c_werror_flag"
5008 || test ! -s conftest.err'
edfaf76d
LK
5009 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5010 (eval $ac_try) 2>&5
5011 ac_status=$?
5012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5013 (exit $ac_status); }; } &&
5014 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 5015 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5016 (eval $ac_try) 2>&5
5017 ac_status=$?
c0d27fcc 5018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
5019 (exit $ac_status); }; }; then
5020 ac_cv_sys_file_offset_bits=64; break
5021else
5022 echo "$as_me: failed program was:" >&5
19650fd6
AS
5023sed 's/^/| /' conftest.$ac_ext >&5
5024
503d2be0 5025fi
edfaf76d 5026rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
5027 break
5028done
ba4481b5 5029fi
c0d27fcc 5030echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
503d2be0
AS
5031echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
5032if test "$ac_cv_sys_file_offset_bits" != no; then
ba4481b5 5033
c0d27fcc 5034cat >>confdefs.h <<_ACEOF
f4988be7 5035#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
c0d27fcc 5036_ACEOF
f4988be7 5037
503d2be0
AS
5038fi
5039rm -f conftest*
c0d27fcc 5040 echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
503d2be0
AS
5041echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
5042if test "${ac_cv_sys_large_files+set}" = set; then
5043 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5044else
503d2be0 5045 while :; do
f4988be7 5046 ac_cv_sys_large_files=no
503d2be0 5047 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5048/* confdefs.h. */
5049_ACEOF
5050cat confdefs.h >>conftest.$ac_ext
5051cat >>conftest.$ac_ext <<_ACEOF
5052/* end confdefs.h. */
503d2be0
AS
5053#include <sys/types.h>
5054 /* Check that off_t can represent 2**63 - 1 correctly.
5055 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5056 since some C++ compilers masquerading as C compilers
5057 incorrectly reject 9223372036854775807. */
5058#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5059 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5060 && LARGE_OFF_T % 2147483647 == 1)
5061 ? 1 : -1];
5062int
5063main ()
5064{
ba4481b5 5065
503d2be0
AS
5066 ;
5067 return 0;
5068}
5069_ACEOF
5070rm -f conftest.$ac_objext
c0d27fcc 5071if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 5072 (eval $ac_compile) 2>conftest.er1
503d2be0 5073 ac_status=$?
edfaf76d
LK
5074 grep -v '^ *+' conftest.er1 >conftest.err
5075 rm -f conftest.er1
5076 cat conftest.err >&5
c0d27fcc 5077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5078 (exit $ac_status); } &&
e143ad11
AS
5079 { ac_try='test -z "$ac_c_werror_flag"
5080 || test ! -s conftest.err'
edfaf76d
LK
5081 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5082 (eval $ac_try) 2>&5
5083 ac_status=$?
5084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5085 (exit $ac_status); }; } &&
5086 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 5087 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5088 (eval $ac_try) 2>&5
5089 ac_status=$?
c0d27fcc 5090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
5091 (exit $ac_status); }; }; then
5092 break
ba4481b5 5093else
503d2be0 5094 echo "$as_me: failed program was:" >&5
19650fd6
AS
5095sed 's/^/| /' conftest.$ac_ext >&5
5096
503d2be0 5097fi
edfaf76d 5098rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 5099 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5100/* confdefs.h. */
5101_ACEOF
5102cat confdefs.h >>conftest.$ac_ext
5103cat >>conftest.$ac_ext <<_ACEOF
5104/* end confdefs.h. */
f4988be7 5105#define _LARGE_FILES 1
503d2be0
AS
5106#include <sys/types.h>
5107 /* Check that off_t can represent 2**63 - 1 correctly.
5108 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5109 since some C++ compilers masquerading as C compilers
5110 incorrectly reject 9223372036854775807. */
5111#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5112 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5113 && LARGE_OFF_T % 2147483647 == 1)
5114 ? 1 : -1];
5115int
5116main ()
5117{
f4988be7 5118
503d2be0
AS
5119 ;
5120 return 0;
5121}
5122_ACEOF
5123rm -f conftest.$ac_objext
c0d27fcc 5124if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 5125 (eval $ac_compile) 2>conftest.er1
503d2be0 5126 ac_status=$?
edfaf76d
LK
5127 grep -v '^ *+' conftest.er1 >conftest.err
5128 rm -f conftest.er1
5129 cat conftest.err >&5
c0d27fcc 5130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5131 (exit $ac_status); } &&
e143ad11
AS
5132 { ac_try='test -z "$ac_c_werror_flag"
5133 || test ! -s conftest.err'
edfaf76d
LK
5134 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5135 (eval $ac_try) 2>&5
5136 ac_status=$?
5137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5138 (exit $ac_status); }; } &&
5139 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 5140 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5141 (eval $ac_try) 2>&5
5142 ac_status=$?
c0d27fcc 5143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
5144 (exit $ac_status); }; }; then
5145 ac_cv_sys_large_files=1; break
5146else
5147 echo "$as_me: failed program was:" >&5
19650fd6
AS
5148sed 's/^/| /' conftest.$ac_ext >&5
5149
503d2be0 5150fi
edfaf76d 5151rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
5152 break
5153done
ba4481b5 5154fi
c0d27fcc 5155echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
503d2be0
AS
5156echo "${ECHO_T}$ac_cv_sys_large_files" >&6
5157if test "$ac_cv_sys_large_files" != no; then
ba4481b5 5158
c0d27fcc 5159cat >>confdefs.h <<_ACEOF
f4988be7 5160#define _LARGE_FILES $ac_cv_sys_large_files
c0d27fcc 5161_ACEOF
ba4481b5 5162
503d2be0
AS
5163fi
5164rm -f conftest*
5165fi
ba4481b5 5166
c0d27fcc 5167
439f58ee
JD
5168
5169
5170
5171
2c9dccc9
PJ
5172if test "${with_sound}" != "no"; then
5173 # Sound support for GNU/Linux and the free BSDs.
c0d27fcc
MR
5174 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5175echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
5176if test "${ac_cv_header_stdc+set}" = set; then
5177 echo $ECHO_N "(cached) $ECHO_C" >&6
5178else
5179 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5180/* confdefs.h. */
5181_ACEOF
5182cat confdefs.h >>conftest.$ac_ext
5183cat >>conftest.$ac_ext <<_ACEOF
5184/* end confdefs.h. */
c0d27fcc
MR
5185#include <stdlib.h>
5186#include <stdarg.h>
5187#include <string.h>
5188#include <float.h>
98418dba 5189
19650fd6
AS
5190int
5191main ()
5192{
5193
5194 ;
5195 return 0;
5196}
c0d27fcc 5197_ACEOF
19650fd6
AS
5198rm -f conftest.$ac_objext
5199if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 5200 (eval $ac_compile) 2>conftest.er1
cd958eb3 5201 ac_status=$?
edfaf76d
LK
5202 grep -v '^ *+' conftest.er1 >conftest.err
5203 rm -f conftest.er1
5204 cat conftest.err >&5
cd958eb3 5205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19650fd6 5206 (exit $ac_status); } &&
e143ad11
AS
5207 { ac_try='test -z "$ac_c_werror_flag"
5208 || test ! -s conftest.err'
edfaf76d
LK
5209 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5210 (eval $ac_try) 2>&5
5211 ac_status=$?
5212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5213 (exit $ac_status); }; } &&
5214 { ac_try='test -s conftest.$ac_objext'
19650fd6
AS
5215 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5216 (eval $ac_try) 2>&5
5217 ac_status=$?
5218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5219 (exit $ac_status); }; }; then
c0d27fcc
MR
5220 ac_cv_header_stdc=yes
5221else
5222 echo "$as_me: failed program was:" >&5
19650fd6
AS
5223sed 's/^/| /' conftest.$ac_ext >&5
5224
5225ac_cv_header_stdc=no
c0d27fcc 5226fi
edfaf76d 5227rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
5228
5229if test $ac_cv_header_stdc = yes; then
5230 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5231 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5232/* confdefs.h. */
5233_ACEOF
5234cat confdefs.h >>conftest.$ac_ext
5235cat >>conftest.$ac_ext <<_ACEOF
5236/* end confdefs.h. */
c0d27fcc
MR
5237#include <string.h>
5238
5239_ACEOF
5240if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 5241 $EGREP "memchr" >/dev/null 2>&1; then
c0d27fcc
MR
5242 :
5243else
5244 ac_cv_header_stdc=no
5245fi
5246rm -f conftest*
5247
5248fi
5249
5250if test $ac_cv_header_stdc = yes; then
5251 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5252 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5253/* confdefs.h. */
5254_ACEOF
5255cat confdefs.h >>conftest.$ac_ext
5256cat >>conftest.$ac_ext <<_ACEOF
5257/* end confdefs.h. */
c0d27fcc
MR
5258#include <stdlib.h>
5259
5260_ACEOF
5261if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 5262 $EGREP "free" >/dev/null 2>&1; then
c0d27fcc
MR
5263 :
5264else
5265 ac_cv_header_stdc=no
5266fi
5267rm -f conftest*
5268
5269fi
5270
5271if test $ac_cv_header_stdc = yes; then
5272 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5273 if test "$cross_compiling" = yes; then
5274 :
5275else
5276 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5277/* confdefs.h. */
5278_ACEOF
5279cat confdefs.h >>conftest.$ac_ext
5280cat >>conftest.$ac_ext <<_ACEOF
5281/* end confdefs.h. */
c0d27fcc
MR
5282#include <ctype.h>
5283#if ((' ' & 0x0FF) == 0x020)
5284# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5285# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5286#else
19650fd6 5287# define ISLOWER(c) \
edfaf76d
LK
5288 (('a' <= (c) && (c) <= 'i') \
5289 || ('j' <= (c) && (c) <= 'r') \
5290 || ('s' <= (c) && (c) <= 'z'))
c0d27fcc
MR
5291# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5292#endif
5293
5294#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5295int
5296main ()
5297{
5298 int i;
5299 for (i = 0; i < 256; i++)
5300 if (XOR (islower (i), ISLOWER (i))
edfaf76d 5301 || toupper (i) != TOUPPER (i))
c0d27fcc
MR
5302 exit(2);
5303 exit (0);
5304}
5305_ACEOF
5306rm -f conftest$ac_exeext
5307if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5308 (eval $ac_link) 2>&5
5309 ac_status=$?
5310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5311 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5312 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5313 (eval $ac_try) 2>&5
5314 ac_status=$?
5315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5316 (exit $ac_status); }; }; then
5317 :
5318else
5319 echo "$as_me: program exited with status $ac_status" >&5
5320echo "$as_me: failed program was:" >&5
19650fd6
AS
5321sed 's/^/| /' conftest.$ac_ext >&5
5322
c0d27fcc
MR
5323( exit $ac_status )
5324ac_cv_header_stdc=no
5325fi
edfaf76d 5326rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
5327fi
5328fi
5329fi
5330echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5331echo "${ECHO_T}$ac_cv_header_stdc" >&6
5332if test $ac_cv_header_stdc = yes; then
5333
5334cat >>confdefs.h <<\_ACEOF
5335#define STDC_HEADERS 1
5336_ACEOF
5337
5338fi
5339
5340# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
edfaf76d 5351 inttypes.h stdint.h unistd.h
98418dba
CW
5352do
5353as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc 5354echo "$as_me:$LINENO: checking for $ac_header" >&5
98418dba
CW
5355echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5356if eval "test \"\${$as_ac_Header+set}\" = set"; then
503d2be0 5357 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 5358else
925c2f3f 5359 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5360/* confdefs.h. */
5361_ACEOF
5362cat confdefs.h >>conftest.$ac_ext
5363cat >>conftest.$ac_ext <<_ACEOF
5364/* end confdefs.h. */
c0d27fcc
MR
5365$ac_includes_default
5366
5367#include <$ac_header>
5368_ACEOF
5369rm -f conftest.$ac_objext
5370if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 5371 (eval $ac_compile) 2>conftest.er1
c0d27fcc 5372 ac_status=$?
edfaf76d
LK
5373 grep -v '^ *+' conftest.er1 >conftest.err
5374 rm -f conftest.er1
5375 cat conftest.err >&5
c0d27fcc
MR
5376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5377 (exit $ac_status); } &&
e143ad11
AS
5378 { ac_try='test -z "$ac_c_werror_flag"
5379 || test ! -s conftest.err'
edfaf76d
LK
5380 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5381 (eval $ac_try) 2>&5
5382 ac_status=$?
5383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5384 (exit $ac_status); }; } &&
5385 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
5386 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5387 (eval $ac_try) 2>&5
5388 ac_status=$?
5389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5390 (exit $ac_status); }; }; then
5391 eval "$as_ac_Header=yes"
5392else
5393 echo "$as_me: failed program was:" >&5
19650fd6
AS
5394sed 's/^/| /' conftest.$ac_ext >&5
5395
c0d27fcc
MR
5396eval "$as_ac_Header=no"
5397fi
edfaf76d 5398rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
5399fi
5400echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5401echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5402if test `eval echo '${'$as_ac_Header'}'` = yes; then
5403 cat >>confdefs.h <<_ACEOF
5404#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5405_ACEOF
5406
5407fi
5408
5409done
5410
5411
5412
5413
5414
5415for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h
5416do
5417as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5418if eval "test \"\${$as_ac_Header+set}\" = set"; then
5419 echo "$as_me:$LINENO: checking for $ac_header" >&5
5420echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5421if eval "test \"\${$as_ac_Header+set}\" = set"; then
5422 echo $ECHO_N "(cached) $ECHO_C" >&6
5423fi
5424echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5425echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5426else
5427 # Is the header compilable?
5428echo "$as_me:$LINENO: checking $ac_header usability" >&5
5429echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
5430cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5431/* confdefs.h. */
5432_ACEOF
5433cat confdefs.h >>conftest.$ac_ext
5434cat >>conftest.$ac_ext <<_ACEOF
5435/* end confdefs.h. */
c0d27fcc 5436$ac_includes_default
98418dba 5437#include <$ac_header>
503d2be0 5438_ACEOF
c0d27fcc
MR
5439rm -f conftest.$ac_objext
5440if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 5441 (eval $ac_compile) 2>conftest.er1
c0d27fcc 5442 ac_status=$?
edfaf76d
LK
5443 grep -v '^ *+' conftest.er1 >conftest.err
5444 rm -f conftest.er1
5445 cat conftest.err >&5
c0d27fcc
MR
5446 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5447 (exit $ac_status); } &&
e143ad11
AS
5448 { ac_try='test -z "$ac_c_werror_flag"
5449 || test ! -s conftest.err'
edfaf76d
LK
5450 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5451 (eval $ac_try) 2>&5
5452 ac_status=$?
5453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5454 (exit $ac_status); }; } &&
5455 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
5456 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5457 (eval $ac_try) 2>&5
5458 ac_status=$?
5459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5460 (exit $ac_status); }; }; then
5461 ac_header_compiler=yes
5462else
5463 echo "$as_me: failed program was:" >&5
19650fd6
AS
5464sed 's/^/| /' conftest.$ac_ext >&5
5465
c0d27fcc
MR
5466ac_header_compiler=no
5467fi
edfaf76d 5468rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
5469echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5470echo "${ECHO_T}$ac_header_compiler" >&6
5471
5472# Is the header present?
5473echo "$as_me:$LINENO: checking $ac_header presence" >&5
5474echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
5475cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5476/* confdefs.h. */
5477_ACEOF
5478cat confdefs.h >>conftest.$ac_ext
5479cat >>conftest.$ac_ext <<_ACEOF
5480/* end confdefs.h. */
c0d27fcc
MR
5481#include <$ac_header>
5482_ACEOF
5483if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba 5484 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
503d2be0 5485 ac_status=$?
6bae0ccf 5486 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
5487 rm -f conftest.er1
5488 cat conftest.err >&5
c0d27fcc 5489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
5490 (exit $ac_status); } >/dev/null; then
5491 if test -s conftest.err; then
5492 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 5493 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
5494 else
5495 ac_cpp_err=
5496 fi
5497else
5498 ac_cpp_err=yes
5499fi
5500if test -z "$ac_cpp_err"; then
c0d27fcc 5501 ac_header_preproc=yes
f4988be7 5502else
503d2be0 5503 echo "$as_me: failed program was:" >&5
19650fd6
AS
5504sed 's/^/| /' conftest.$ac_ext >&5
5505
c0d27fcc 5506 ac_header_preproc=no
f4988be7 5507fi
98418dba 5508rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
5509echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5510echo "${ECHO_T}$ac_header_preproc" >&6
5511
5512# So? What about this header?
edfaf76d
LK
5513case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5514 yes:no: )
c0d27fcc
MR
5515 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5516echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
5517 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5518echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
5519 ac_header_preproc=yes
19650fd6 5520 ;;
edfaf76d 5521 no:yes:* )
c0d27fcc
MR
5522 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5523echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
5524 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5525echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5526 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5527echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5528 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5529echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 5530 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 5531echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
5532 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5533echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
5534 (
5535 cat <<\_ASBOX
edfaf76d
LK
5536## ------------------------------------------ ##
5537## Report this to the AC_PACKAGE_NAME lists. ##
5538## ------------------------------------------ ##
19650fd6
AS
5539_ASBOX
5540 ) |
5541 sed "s/^/$as_me: WARNING: /" >&2
5542 ;;
c0d27fcc
MR
5543esac
5544echo "$as_me:$LINENO: checking for $ac_header" >&5
5545echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5546if eval "test \"\${$as_ac_Header+set}\" = set"; then
5547 echo $ECHO_N "(cached) $ECHO_C" >&6
5548else
edfaf76d 5549 eval "$as_ac_Header=\$ac_header_preproc"
f4988be7 5550fi
c0d27fcc 5551echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 5552echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
5553
5554fi
98418dba 5555if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 5556 cat >>confdefs.h <<_ACEOF
98418dba 5557#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 5558_ACEOF
f4988be7
GM
5559
5560fi
c0d27fcc 5561
98418dba
CW
5562done
5563
5564 # Emulation library used on NetBSD.
c0d27fcc 5565 echo "$as_me:$LINENO: checking for _oss_ioctl in -lossaudio" >&5
98418dba
CW
5566echo $ECHO_N "checking for _oss_ioctl in -lossaudio... $ECHO_C" >&6
5567if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then
503d2be0 5568 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 5569else
98418dba
CW
5570 ac_check_lib_save_LIBS=$LIBS
5571LIBS="-lossaudio $LIBS"
5572cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5573/* confdefs.h. */
5574_ACEOF
5575cat confdefs.h >>conftest.$ac_ext
5576cat >>conftest.$ac_ext <<_ACEOF
5577/* end confdefs.h. */
98418dba
CW
5578
5579/* Override any gcc2 internal prototype to avoid an error. */
5580#ifdef __cplusplus
5581extern "C"
f4988be7 5582#endif
98418dba
CW
5583/* We use char because int might match the return type of a gcc2
5584 builtin and then its argument prototype would still apply. */
5585char _oss_ioctl ();
503d2be0
AS
5586int
5587main ()
5588{
98418dba 5589_oss_ioctl ();
503d2be0
AS
5590 ;
5591 return 0;
5592}
5593_ACEOF
98418dba 5594rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 5595if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 5596 (eval $ac_link) 2>conftest.er1
503d2be0 5597 ac_status=$?
edfaf76d
LK
5598 grep -v '^ *+' conftest.er1 >conftest.err
5599 rm -f conftest.er1
5600 cat conftest.err >&5
c0d27fcc 5601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5602 (exit $ac_status); } &&
e143ad11
AS
5603 { ac_try='test -z "$ac_c_werror_flag"
5604 || test ! -s conftest.err'
edfaf76d
LK
5605 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5606 (eval $ac_try) 2>&5
5607 ac_status=$?
5608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5609 (exit $ac_status); }; } &&
5610 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 5611 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5612 (eval $ac_try) 2>&5
5613 ac_status=$?
c0d27fcc 5614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5615 (exit $ac_status); }; }; then
98418dba 5616 ac_cv_lib_ossaudio__oss_ioctl=yes
f4988be7 5617else
503d2be0 5618 echo "$as_me: failed program was:" >&5
19650fd6
AS
5619sed 's/^/| /' conftest.$ac_ext >&5
5620
98418dba 5621ac_cv_lib_ossaudio__oss_ioctl=no
f4988be7 5622fi
edfaf76d
LK
5623rm -f conftest.err conftest.$ac_objext \
5624 conftest$ac_exeext conftest.$ac_ext
98418dba 5625LIBS=$ac_check_lib_save_LIBS
f4988be7 5626fi
c0d27fcc 5627echo "$as_me:$LINENO: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5
98418dba
CW
5628echo "${ECHO_T}$ac_cv_lib_ossaudio__oss_ioctl" >&6
5629if test $ac_cv_lib_ossaudio__oss_ioctl = yes; then
5630 LIBSOUND=-lossaudio
5631else
5632 LIBSOUND=
5633fi
5634
c0d27fcc 5635
439f58ee
JD
5636
5637 ALSA_REQUIRED=1.0.0
5638 ALSA_MODULES="alsa >= $ALSA_REQUIRED"
5639 if test "X${with_pkg_config_prog}" != X; then
5640 PKG_CONFIG="${with_pkg_config_prog}"
5641 fi
5642
5643 succeeded=no
5644
5645 if test -z "$PKG_CONFIG"; then
5646 # Extract the first word of "pkg-config", so it can be a program name with args.
5647set dummy pkg-config; ac_word=$2
5648echo "$as_me:$LINENO: checking for $ac_word" >&5
5649echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5650if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
5651 echo $ECHO_N "(cached) $ECHO_C" >&6
5652else
5653 case $PKG_CONFIG in
5654 [\\/]* | ?:[\\/]*)
5655 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
5656 ;;
5657 *)
5658 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5659for as_dir in $PATH
5660do
5661 IFS=$as_save_IFS
5662 test -z "$as_dir" && as_dir=.
5663 for ac_exec_ext in '' $ac_executable_extensions; do
5664 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5665 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
5666 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5667 break 2
5668 fi
5669done
5670done
5671
5672 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
5673 ;;
5674esac
5675fi
5676PKG_CONFIG=$ac_cv_path_PKG_CONFIG
5677
5678if test -n "$PKG_CONFIG"; then
5679 echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
5680echo "${ECHO_T}$PKG_CONFIG" >&6
5681else
5682 echo "$as_me:$LINENO: result: no" >&5
5683echo "${ECHO_T}no" >&6
5684fi
5685
5686 fi
5687
5688 if test "$PKG_CONFIG" = "no" ; then
5689 HAVE_ALSA=no
5690 else
5691 PKG_CONFIG_MIN_VERSION=0.9.0
5692 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5693 echo "$as_me:$LINENO: checking for $ALSA_MODULES" >&5
5694echo $ECHO_N "checking for $ALSA_MODULES... $ECHO_C" >&6
5695
5696 if $PKG_CONFIG --exists "$ALSA_MODULES" ; then
5697 echo "$as_me:$LINENO: result: yes" >&5
5698echo "${ECHO_T}yes" >&6
5699 succeeded=yes
5700
5701 echo "$as_me:$LINENO: checking ALSA_CFLAGS" >&5
5702echo $ECHO_N "checking ALSA_CFLAGS... $ECHO_C" >&6
5703 ALSA_CFLAGS=`$PKG_CONFIG --cflags "$ALSA_MODULES"`
5704 echo "$as_me:$LINENO: result: $ALSA_CFLAGS" >&5
5705echo "${ECHO_T}$ALSA_CFLAGS" >&6
5706
5707 echo "$as_me:$LINENO: checking ALSA_LIBS" >&5
5708echo $ECHO_N "checking ALSA_LIBS... $ECHO_C" >&6
5709 ALSA_LIBS=`$PKG_CONFIG --libs "$ALSA_MODULES"`
5710 echo "$as_me:$LINENO: result: $ALSA_LIBS" >&5
5711echo "${ECHO_T}$ALSA_LIBS" >&6
5712 else
5713 echo "$as_me:$LINENO: result: no" >&5
5714echo "${ECHO_T}no" >&6
5715 ALSA_CFLAGS=""
5716 ALSA_LIBS=""
5717 ## If we have a custom action on failure, don't print errors, but
5718 ## do set a variable so people can do so.
5719 ALSA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$ALSA_MODULES"`
5720
5721 fi
5722
5723
5724
5725 else
5726 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
5727 echo "*** See http://www.freedesktop.org/software/pkgconfig"
5728 fi
5729 fi
5730
5731 if test $succeeded = yes; then
5732 HAVE_ALSA=yes
5733 else
5734 HAVE_ALSA=no
5735 fi
5736
5737 if test $HAVE_ALSA = yes; then
5738 LIBSOUND="$LIBSOUND $ALSA_LIBS"
5739 CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS"
5740
5741cat >>confdefs.h <<\_ACEOF
5742#define HAVE_ALSA 1
5743_ACEOF
5744
5745 fi
5746
f4988be7 5747fi
c0d27fcc
MR
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
22044edf
DL
5766
5767
973a76b1 5768
cffcede7 5769
551ffc27 5770
226e2359 5771
c0d27fcc 5772
f4988be7 5773
98418dba
CW
5774for ac_header in sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \
5775 linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \
25ca0bca 5776 termcap.h stdio_ext.h fcntl.h strings.h coff.h pty.h sys/mman.h \
551ffc27 5777 sys/param.h sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h \
226e2359 5778 sys/utsname.h pwd.h
98418dba
CW
5779do
5780as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
5781if eval "test \"\${$as_ac_Header+set}\" = set"; then
5782 echo "$as_me:$LINENO: checking for $ac_header" >&5
98418dba
CW
5783echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5784if eval "test \"\${$as_ac_Header+set}\" = set"; then
503d2be0 5785 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
5786fi
5787echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5788echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
f4988be7 5789else
c0d27fcc
MR
5790 # Is the header compilable?
5791echo "$as_me:$LINENO: checking $ac_header usability" >&5
5792echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
5793cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5794/* confdefs.h. */
5795_ACEOF
5796cat confdefs.h >>conftest.$ac_ext
5797cat >>conftest.$ac_ext <<_ACEOF
5798/* end confdefs.h. */
c0d27fcc
MR
5799$ac_includes_default
5800#include <$ac_header>
5801_ACEOF
5802rm -f conftest.$ac_objext
5803if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 5804 (eval $ac_compile) 2>conftest.er1
c0d27fcc 5805 ac_status=$?
edfaf76d
LK
5806 grep -v '^ *+' conftest.er1 >conftest.err
5807 rm -f conftest.er1
5808 cat conftest.err >&5
c0d27fcc
MR
5809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5810 (exit $ac_status); } &&
e143ad11
AS
5811 { ac_try='test -z "$ac_c_werror_flag"
5812 || test ! -s conftest.err'
edfaf76d
LK
5813 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5814 (eval $ac_try) 2>&5
5815 ac_status=$?
5816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5817 (exit $ac_status); }; } &&
5818 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
5819 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5820 (eval $ac_try) 2>&5
5821 ac_status=$?
5822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5823 (exit $ac_status); }; }; then
5824 ac_header_compiler=yes
5825else
5826 echo "$as_me: failed program was:" >&5
19650fd6
AS
5827sed 's/^/| /' conftest.$ac_ext >&5
5828
c0d27fcc
MR
5829ac_header_compiler=no
5830fi
edfaf76d 5831rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
5832echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5833echo "${ECHO_T}$ac_header_compiler" >&6
5834
5835# Is the header present?
5836echo "$as_me:$LINENO: checking $ac_header presence" >&5
5837echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
5838cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5839/* confdefs.h. */
5840_ACEOF
5841cat confdefs.h >>conftest.$ac_ext
5842cat >>conftest.$ac_ext <<_ACEOF
5843/* end confdefs.h. */
98418dba 5844#include <$ac_header>
503d2be0 5845_ACEOF
c0d27fcc 5846if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba 5847 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
503d2be0 5848 ac_status=$?
6bae0ccf 5849 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
5850 rm -f conftest.er1
5851 cat conftest.err >&5
c0d27fcc 5852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
5853 (exit $ac_status); } >/dev/null; then
5854 if test -s conftest.err; then
5855 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 5856 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
5857 else
5858 ac_cpp_err=
5859 fi
5860else
5861 ac_cpp_err=yes
5862fi
5863if test -z "$ac_cpp_err"; then
c0d27fcc 5864 ac_header_preproc=yes
34ec9ebe 5865else
503d2be0 5866 echo "$as_me: failed program was:" >&5
19650fd6
AS
5867sed 's/^/| /' conftest.$ac_ext >&5
5868
c0d27fcc 5869 ac_header_preproc=no
34ec9ebe 5870fi
98418dba 5871rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
5872echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5873echo "${ECHO_T}$ac_header_preproc" >&6
5874
5875# So? What about this header?
edfaf76d
LK
5876case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5877 yes:no: )
c0d27fcc
MR
5878 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5879echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
5880 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5881echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
5882 ac_header_preproc=yes
19650fd6 5883 ;;
edfaf76d 5884 no:yes:* )
c0d27fcc
MR
5885 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5886echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
5887 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5888echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5889 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5890echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5891 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5892echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 5893 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 5894echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
5895 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5896echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
5897 (
5898 cat <<\_ASBOX
edfaf76d
LK
5899## ------------------------------------------ ##
5900## Report this to the AC_PACKAGE_NAME lists. ##
5901## ------------------------------------------ ##
19650fd6
AS
5902_ASBOX
5903 ) |
5904 sed "s/^/$as_me: WARNING: /" >&2
5905 ;;
c0d27fcc
MR
5906esac
5907echo "$as_me:$LINENO: checking for $ac_header" >&5
5908echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5909if eval "test \"\${$as_ac_Header+set}\" = set"; then
5910 echo $ECHO_N "(cached) $ECHO_C" >&6
5911else
edfaf76d 5912 eval "$as_ac_Header=\$ac_header_preproc"
34ec9ebe 5913fi
c0d27fcc 5914echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 5915echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
5916
5917fi
98418dba 5918if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 5919 cat >>confdefs.h <<_ACEOF
98418dba 5920#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 5921_ACEOF
34ec9ebe 5922
98418dba 5923fi
c0d27fcc 5924
98418dba
CW
5925done
5926
22044edf 5927
f17e308a
JD
5928echo "$as_me:$LINENO: checking if personality LINUX32 can be set" >&5
5929echo $ECHO_N "checking if personality LINUX32 can be set... $ECHO_C" >&6
5930cat >conftest.$ac_ext <<_ACEOF
5931/* confdefs.h. */
5932_ACEOF
5933cat confdefs.h >>conftest.$ac_ext
5934cat >>conftest.$ac_ext <<_ACEOF
5935/* end confdefs.h. */
5936#include <sys/personality.h>
5937int
5938main ()
5939{
5940personality (PER_LINUX32)
5941 ;
5942 return 0;
5943}
5944_ACEOF
5945rm -f conftest.$ac_objext
5946if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 5947 (eval $ac_compile) 2>conftest.er1
f17e308a 5948 ac_status=$?
edfaf76d
LK
5949 grep -v '^ *+' conftest.er1 >conftest.err
5950 rm -f conftest.er1
5951 cat conftest.err >&5
f17e308a
JD
5952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5953 (exit $ac_status); } &&
e143ad11
AS
5954 { ac_try='test -z "$ac_c_werror_flag"
5955 || test ! -s conftest.err'
edfaf76d
LK
5956 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5957 (eval $ac_try) 2>&5
5958 ac_status=$?
5959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5960 (exit $ac_status); }; } &&
5961 { ac_try='test -s conftest.$ac_objext'
f17e308a
JD
5962 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5963 (eval $ac_try) 2>&5
5964 ac_status=$?
5965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5966 (exit $ac_status); }; }; then
5967 emacs_cv_personality_linux32=yes
5968else
5969 echo "$as_me: failed program was:" >&5
5970sed 's/^/| /' conftest.$ac_ext >&5
5971
5972emacs_cv_personality_linux32=no
5973fi
edfaf76d 5974rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
f17e308a
JD
5975echo "$as_me:$LINENO: result: $emacs_cv_personality_linux32" >&5
5976echo "${ECHO_T}$emacs_cv_personality_linux32" >&6
5977
5978if test $emacs_cv_personality_linux32 = yes; then
5979
5980cat >>confdefs.h <<\_ACEOF
5981#define HAVE_PERSONALITY_LINUX32 1
5982_ACEOF
5983
5984fi
5985
5986
22044edf
DL
5987for ac_header in term.h
5988do
5989as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5990echo "$as_me:$LINENO: checking for $ac_header" >&5
5991echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5992if eval "test \"\${$as_ac_Header+set}\" = set"; then
5993 echo $ECHO_N "(cached) $ECHO_C" >&6
5994else
5995 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5996/* confdefs.h. */
5997_ACEOF
5998cat confdefs.h >>conftest.$ac_ext
5999cat >>conftest.$ac_ext <<_ACEOF
6000/* end confdefs.h. */
22044edf
DL
6001#include <$ac_header>
6002_ACEOF
6003if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6004 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6005 ac_status=$?
6006 grep -v '^ *+' conftest.er1 >conftest.err
6007 rm -f conftest.er1
6008 cat conftest.err >&5
6009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6010 (exit $ac_status); } >/dev/null; then
6011 if test -s conftest.err; then
6012 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 6013 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
22044edf
DL
6014 else
6015 ac_cpp_err=
6016 fi
6017else
6018 ac_cpp_err=yes
6019fi
6020if test -z "$ac_cpp_err"; then
6021 eval "$as_ac_Header=yes"
6022else
6023 echo "$as_me: failed program was:" >&5
19650fd6
AS
6024sed 's/^/| /' conftest.$ac_ext >&5
6025
22044edf
DL
6026 eval "$as_ac_Header=no"
6027fi
6028rm -f conftest.err conftest.$ac_ext
6029fi
6030echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6031echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6032if test `eval echo '${'$as_ac_Header'}'` = yes; then
6033 cat >>confdefs.h <<_ACEOF
6034#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6035_ACEOF
6036
6037fi
6038
6039done
6040
c0d27fcc 6041echo "$as_me:$LINENO: checking for ANSI C header files" >&5
98418dba
CW
6042echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
6043if test "${ac_cv_header_stdc+set}" = set; then
503d2be0 6044 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6045else
503d2be0 6046 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6047/* confdefs.h. */
6048_ACEOF
6049cat confdefs.h >>conftest.$ac_ext
6050cat >>conftest.$ac_ext <<_ACEOF
6051/* end confdefs.h. */
98418dba
CW
6052#include <stdlib.h>
6053#include <stdarg.h>
6054#include <string.h>
6055#include <float.h>
6056
19650fd6
AS
6057int
6058main ()
6059{
6060
6061 ;
6062 return 0;
6063}
98418dba 6064_ACEOF
19650fd6
AS
6065rm -f conftest.$ac_objext
6066if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 6067 (eval $ac_compile) 2>conftest.er1
cd958eb3 6068 ac_status=$?
edfaf76d
LK
6069 grep -v '^ *+' conftest.er1 >conftest.err
6070 rm -f conftest.er1
6071 cat conftest.err >&5
cd958eb3 6072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19650fd6 6073 (exit $ac_status); } &&
e143ad11
AS
6074 { ac_try='test -z "$ac_c_werror_flag"
6075 || test ! -s conftest.err'
edfaf76d
LK
6076 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6077 (eval $ac_try) 2>&5
6078 ac_status=$?
6079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6080 (exit $ac_status); }; } &&
6081 { ac_try='test -s conftest.$ac_objext'
19650fd6
AS
6082 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6083 (eval $ac_try) 2>&5
6084 ac_status=$?
6085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6086 (exit $ac_status); }; }; then
98418dba 6087 ac_cv_header_stdc=yes
ba4481b5 6088else
503d2be0 6089 echo "$as_me: failed program was:" >&5
19650fd6
AS
6090sed 's/^/| /' conftest.$ac_ext >&5
6091
6092ac_cv_header_stdc=no
ba4481b5 6093fi
edfaf76d 6094rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba
CW
6095
6096if test $ac_cv_header_stdc = yes; then
6097 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6098 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6099/* confdefs.h. */
6100_ACEOF
6101cat confdefs.h >>conftest.$ac_ext
6102cat >>conftest.$ac_ext <<_ACEOF
6103/* end confdefs.h. */
98418dba
CW
6104#include <string.h>
6105
6106_ACEOF
6107if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 6108 $EGREP "memchr" >/dev/null 2>&1; then
98418dba
CW
6109 :
6110else
6111 ac_cv_header_stdc=no
ba4481b5 6112fi
98418dba 6113rm -f conftest*
ba4481b5
DL
6114
6115fi
6116
98418dba
CW
6117if test $ac_cv_header_stdc = yes; then
6118 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6119 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6120/* confdefs.h. */
6121_ACEOF
6122cat confdefs.h >>conftest.$ac_ext
6123cat >>conftest.$ac_ext <<_ACEOF
6124/* end confdefs.h. */
98418dba
CW
6125#include <stdlib.h>
6126
6127_ACEOF
6128if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 6129 $EGREP "free" >/dev/null 2>&1; then
98418dba
CW
6130 :
6131else
6132 ac_cv_header_stdc=no
6133fi
6134rm -f conftest*
6135
6136fi
6137
6138if test $ac_cv_header_stdc = yes; then
6139 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6140 if test "$cross_compiling" = yes; then
6141 :
d42122a3 6142else
503d2be0 6143 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6144/* confdefs.h. */
6145_ACEOF
6146cat confdefs.h >>conftest.$ac_ext
6147cat >>conftest.$ac_ext <<_ACEOF
6148/* end confdefs.h. */
98418dba
CW
6149#include <ctype.h>
6150#if ((' ' & 0x0FF) == 0x020)
6151# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6152# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6153#else
19650fd6 6154# define ISLOWER(c) \
edfaf76d
LK
6155 (('a' <= (c) && (c) <= 'i') \
6156 || ('j' <= (c) && (c) <= 'r') \
6157 || ('s' <= (c) && (c) <= 'z'))
98418dba
CW
6158# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6159#endif
6160
6161#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
503d2be0
AS
6162int
6163main ()
6164{
98418dba
CW
6165 int i;
6166 for (i = 0; i < 256; i++)
6167 if (XOR (islower (i), ISLOWER (i))
edfaf76d 6168 || toupper (i) != TOUPPER (i))
98418dba
CW
6169 exit(2);
6170 exit (0);
503d2be0
AS
6171}
6172_ACEOF
98418dba 6173rm -f conftest$ac_exeext
c0d27fcc 6174if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba 6175 (eval $ac_link) 2>&5
503d2be0 6176 ac_status=$?
c0d27fcc 6177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 6178 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 6179 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
6180 (eval $ac_try) 2>&5
6181 ac_status=$?
c0d27fcc 6182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6183 (exit $ac_status); }; }; then
98418dba 6184 :
d42122a3 6185else
98418dba
CW
6186 echo "$as_me: program exited with status $ac_status" >&5
6187echo "$as_me: failed program was:" >&5
19650fd6
AS
6188sed 's/^/| /' conftest.$ac_ext >&5
6189
c0d27fcc 6190( exit $ac_status )
98418dba 6191ac_cv_header_stdc=no
d42122a3 6192fi
edfaf76d 6193rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
d42122a3 6194fi
98418dba
CW
6195fi
6196fi
c0d27fcc 6197echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
98418dba
CW
6198echo "${ECHO_T}$ac_cv_header_stdc" >&6
6199if test $ac_cv_header_stdc = yes; then
6200
c0d27fcc 6201cat >>confdefs.h <<\_ACEOF
98418dba 6202#define STDC_HEADERS 1
c0d27fcc 6203_ACEOF
d42122a3
DL
6204
6205fi
6206
c0d27fcc 6207echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
98418dba
CW
6208echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
6209if test "${ac_cv_header_time+set}" = set; then
503d2be0 6210 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6211else
503d2be0 6212 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6213/* confdefs.h. */
6214_ACEOF
6215cat confdefs.h >>conftest.$ac_ext
6216cat >>conftest.$ac_ext <<_ACEOF
6217/* end confdefs.h. */
ba4481b5 6218#include <sys/types.h>
98418dba 6219#include <sys/time.h>
ba4481b5 6220#include <time.h>
503d2be0
AS
6221
6222int
6223main ()
6224{
98418dba
CW
6225if ((struct tm *) 0)
6226return 0;
503d2be0
AS
6227 ;
6228 return 0;
6229}
6230_ACEOF
6231rm -f conftest.$ac_objext
c0d27fcc 6232if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 6233 (eval $ac_compile) 2>conftest.er1
503d2be0 6234 ac_status=$?
edfaf76d
LK
6235 grep -v '^ *+' conftest.er1 >conftest.err
6236 rm -f conftest.er1
6237 cat conftest.err >&5
c0d27fcc 6238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6239 (exit $ac_status); } &&
e143ad11
AS
6240 { ac_try='test -z "$ac_c_werror_flag"
6241 || test ! -s conftest.err'
edfaf76d
LK
6242 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6243 (eval $ac_try) 2>&5
6244 ac_status=$?
6245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6246 (exit $ac_status); }; } &&
6247 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6248 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
6249 (eval $ac_try) 2>&5
6250 ac_status=$?
c0d27fcc 6251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6252 (exit $ac_status); }; }; then
98418dba 6253 ac_cv_header_time=yes
ba4481b5 6254else
503d2be0 6255 echo "$as_me: failed program was:" >&5
19650fd6
AS
6256sed 's/^/| /' conftest.$ac_ext >&5
6257
98418dba 6258ac_cv_header_time=no
ba4481b5 6259fi
edfaf76d 6260rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 6261fi
c0d27fcc 6262echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
98418dba
CW
6263echo "${ECHO_T}$ac_cv_header_time" >&6
6264if test $ac_cv_header_time = yes; then
503d2be0 6265
c0d27fcc 6266cat >>confdefs.h <<\_ACEOF
98418dba 6267#define TIME_WITH_SYS_TIME 1
c0d27fcc 6268_ACEOF
ba4481b5
DL
6269
6270fi
6271
cd958eb3
MB
6272echo "$as_me:$LINENO: checking whether sys_siglist is declared" >&5
6273echo $ECHO_N "checking whether sys_siglist is declared... $ECHO_C" >&6
6274if test "${ac_cv_have_decl_sys_siglist+set}" = set; then
503d2be0 6275 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6276else
503d2be0 6277 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6278/* confdefs.h. */
6279_ACEOF
6280cat confdefs.h >>conftest.$ac_ext
6281cat >>conftest.$ac_ext <<_ACEOF
6282/* end confdefs.h. */
cd958eb3
MB
6283$ac_includes_default
6284int
6285main ()
6286{
6287#ifndef sys_siglist
6288 char *p = (char *) sys_siglist;
98418dba 6289#endif
503d2be0 6290
cd958eb3
MB
6291 ;
6292 return 0;
6293}
6294_ACEOF
6295rm -f conftest.$ac_objext
6296if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 6297 (eval $ac_compile) 2>conftest.er1
cd958eb3 6298 ac_status=$?
edfaf76d
LK
6299 grep -v '^ *+' conftest.er1 >conftest.err
6300 rm -f conftest.er1
6301 cat conftest.err >&5
cd958eb3
MB
6302 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6303 (exit $ac_status); } &&
e143ad11
AS
6304 { ac_try='test -z "$ac_c_werror_flag"
6305 || test ! -s conftest.err'
edfaf76d
LK
6306 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6307 (eval $ac_try) 2>&5
6308 ac_status=$?
6309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6310 (exit $ac_status); }; } &&
6311 { ac_try='test -s conftest.$ac_objext'
cd958eb3
MB
6312 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6313 (eval $ac_try) 2>&5
6314 ac_status=$?
6315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6316 (exit $ac_status); }; }; then
6317 ac_cv_have_decl_sys_siglist=yes
6318else
6319 echo "$as_me: failed program was:" >&5
19650fd6
AS
6320sed 's/^/| /' conftest.$ac_ext >&5
6321
cd958eb3
MB
6322ac_cv_have_decl_sys_siglist=no
6323fi
edfaf76d 6324rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
cd958eb3
MB
6325fi
6326echo "$as_me:$LINENO: result: $ac_cv_have_decl_sys_siglist" >&5
6327echo "${ECHO_T}$ac_cv_have_decl_sys_siglist" >&6
6328if test $ac_cv_have_decl_sys_siglist = yes; then
6329
6330cat >>confdefs.h <<_ACEOF
6331#define HAVE_DECL_SYS_SIGLIST 1
6332_ACEOF
6333
6334
6335else
6336 cat >>confdefs.h <<_ACEOF
6337#define HAVE_DECL_SYS_SIGLIST 0
6338_ACEOF
6339
6340
6341fi
6342
6343
6344if test $ac_cv_have_decl_sys_siglist != yes; then
6345 # For Tru64, at least:
6346 echo "$as_me:$LINENO: checking whether __sys_siglist is declared" >&5
6347echo $ECHO_N "checking whether __sys_siglist is declared... $ECHO_C" >&6
6348if test "${ac_cv_have_decl___sys_siglist+set}" = set; then
6349 echo $ECHO_N "(cached) $ECHO_C" >&6
6350else
6351 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6352/* confdefs.h. */
6353_ACEOF
6354cat confdefs.h >>conftest.$ac_ext
6355cat >>conftest.$ac_ext <<_ACEOF
6356/* end confdefs.h. */
cd958eb3 6357$ac_includes_default
503d2be0
AS
6358int
6359main ()
6360{
cd958eb3
MB
6361#ifndef __sys_siglist
6362 char *p = (char *) __sys_siglist;
6363#endif
6364
503d2be0
AS
6365 ;
6366 return 0;
6367}
6368_ACEOF
6369rm -f conftest.$ac_objext
c0d27fcc 6370if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 6371 (eval $ac_compile) 2>conftest.er1
503d2be0 6372 ac_status=$?
edfaf76d
LK
6373 grep -v '^ *+' conftest.er1 >conftest.err
6374 rm -f conftest.er1
6375 cat conftest.err >&5
c0d27fcc 6376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6377 (exit $ac_status); } &&
e143ad11
AS
6378 { ac_try='test -z "$ac_c_werror_flag"
6379 || test ! -s conftest.err'
edfaf76d
LK
6380 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6381 (eval $ac_try) 2>&5
6382 ac_status=$?
6383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6384 (exit $ac_status); }; } &&
6385 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6386 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
6387 (eval $ac_try) 2>&5
6388 ac_status=$?
c0d27fcc 6389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6390 (exit $ac_status); }; }; then
cd958eb3 6391 ac_cv_have_decl___sys_siglist=yes
ba4481b5 6392else
503d2be0 6393 echo "$as_me: failed program was:" >&5
19650fd6
AS
6394sed 's/^/| /' conftest.$ac_ext >&5
6395
cd958eb3 6396ac_cv_have_decl___sys_siglist=no
ba4481b5 6397fi
edfaf76d 6398rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 6399fi
cd958eb3
MB
6400echo "$as_me:$LINENO: result: $ac_cv_have_decl___sys_siglist" >&5
6401echo "${ECHO_T}$ac_cv_have_decl___sys_siglist" >&6
6402if test $ac_cv_have_decl___sys_siglist = yes; then
503d2be0 6403
cd958eb3
MB
6404cat >>confdefs.h <<_ACEOF
6405#define HAVE_DECL___SYS_SIGLIST 1
6406_ACEOF
6407
6408
6409else
6410 cat >>confdefs.h <<_ACEOF
6411#define HAVE_DECL___SYS_SIGLIST 0
c0d27fcc 6412_ACEOF
503d2be0 6413
cd958eb3 6414
ba4481b5
DL
6415fi
6416
cd958eb3
MB
6417
6418 if test $ac_cv_have_decl___sys_siglist = yes; then
6419
6420cat >>confdefs.h <<\_ACEOF
6421#define sys_siglist __sys_siglist
6422_ACEOF
6423
6424 fi
6425fi
c0d27fcc 6426echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
98418dba
CW
6427echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
6428if test "${ac_cv_header_sys_wait_h+set}" = set; then
503d2be0 6429 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6430else
503d2be0 6431 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6432/* confdefs.h. */
6433_ACEOF
6434cat confdefs.h >>conftest.$ac_ext
6435cat >>conftest.$ac_ext <<_ACEOF
6436/* end confdefs.h. */
98418dba
CW
6437#include <sys/types.h>
6438#include <sys/wait.h>
6439#ifndef WEXITSTATUS
6440# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
6441#endif
6442#ifndef WIFEXITED
6443# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
ba4481b5 6444#endif
503d2be0
AS
6445
6446int
6447main ()
6448{
98418dba
CW
6449 int s;
6450 wait (&s);
6451 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
503d2be0
AS
6452 ;
6453 return 0;
6454}
6455_ACEOF
98418dba 6456rm -f conftest.$ac_objext
c0d27fcc 6457if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 6458 (eval $ac_compile) 2>conftest.er1
503d2be0 6459 ac_status=$?
edfaf76d
LK
6460 grep -v '^ *+' conftest.er1 >conftest.err
6461 rm -f conftest.er1
6462 cat conftest.err >&5
c0d27fcc 6463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6464 (exit $ac_status); } &&
e143ad11
AS
6465 { ac_try='test -z "$ac_c_werror_flag"
6466 || test ! -s conftest.err'
edfaf76d
LK
6467 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6468 (eval $ac_try) 2>&5
6469 ac_status=$?
6470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6471 (exit $ac_status); }; } &&
6472 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6473 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
6474 (eval $ac_try) 2>&5
6475 ac_status=$?
c0d27fcc 6476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6477 (exit $ac_status); }; }; then
98418dba 6478 ac_cv_header_sys_wait_h=yes
ba4481b5 6479else
503d2be0 6480 echo "$as_me: failed program was:" >&5
19650fd6
AS
6481sed 's/^/| /' conftest.$ac_ext >&5
6482
98418dba 6483ac_cv_header_sys_wait_h=no
ba4481b5 6484fi
edfaf76d 6485rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 6486fi
c0d27fcc 6487echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
98418dba
CW
6488echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
6489if test $ac_cv_header_sys_wait_h = yes; then
503d2be0 6490
c0d27fcc 6491cat >>confdefs.h <<\_ACEOF
98418dba 6492#define HAVE_SYS_WAIT_H 1
c0d27fcc 6493_ACEOF
ba4481b5 6494
ba4481b5
DL
6495fi
6496
c0d27fcc
MR
6497
6498echo "$as_me:$LINENO: checking for struct utimbuf" >&5
98418dba
CW
6499echo $ECHO_N "checking for struct utimbuf... $ECHO_C" >&6
6500if test "${emacs_cv_struct_utimbuf+set}" = set; then
503d2be0 6501 echo $ECHO_N "(cached) $ECHO_C" >&6
1113b624 6502else
503d2be0 6503 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6504/* confdefs.h. */
6505_ACEOF
6506cat confdefs.h >>conftest.$ac_ext
6507cat >>conftest.$ac_ext <<_ACEOF
6508/* end confdefs.h. */
98418dba
CW
6509#ifdef TIME_WITH_SYS_TIME
6510#include <sys/time.h>
6511#include <time.h>
6512#else
6513#ifdef HAVE_SYS_TIME_H
6514#include <sys/time.h>
6515#else
1113b624 6516#include <time.h>
98418dba
CW
6517#endif
6518#endif
6519#ifdef HAVE_UTIME_H
6520#include <utime.h>
6521#endif
503d2be0
AS
6522int
6523main ()
6524{
98418dba 6525static struct utimbuf x; x.actime = x.modtime;
503d2be0
AS
6526 ;
6527 return 0;
6528}
6529_ACEOF
98418dba 6530rm -f conftest.$ac_objext
c0d27fcc 6531if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 6532 (eval $ac_compile) 2>conftest.er1
503d2be0 6533 ac_status=$?
edfaf76d
LK
6534 grep -v '^ *+' conftest.er1 >conftest.err
6535 rm -f conftest.er1
6536 cat conftest.err >&5
c0d27fcc 6537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6538 (exit $ac_status); } &&
e143ad11
AS
6539 { ac_try='test -z "$ac_c_werror_flag"
6540 || test ! -s conftest.err'
edfaf76d
LK
6541 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6542 (eval $ac_try) 2>&5
6543 ac_status=$?
6544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6545 (exit $ac_status); }; } &&
6546 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6547 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
6548 (eval $ac_try) 2>&5
6549 ac_status=$?
c0d27fcc 6550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6551 (exit $ac_status); }; }; then
98418dba 6552 emacs_cv_struct_utimbuf=yes
1113b624 6553else
503d2be0 6554 echo "$as_me: failed program was:" >&5
19650fd6
AS
6555sed 's/^/| /' conftest.$ac_ext >&5
6556
98418dba 6557emacs_cv_struct_utimbuf=no
1113b624 6558fi
edfaf76d 6559rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
1113b624 6560fi
c0d27fcc 6561echo "$as_me:$LINENO: result: $emacs_cv_struct_utimbuf" >&5
98418dba
CW
6562echo "${ECHO_T}$emacs_cv_struct_utimbuf" >&6
6563if test $emacs_cv_struct_utimbuf = yes; then
b936fae4 6564
c0d27fcc 6565cat >>confdefs.h <<\_ACEOF
98418dba 6566#define HAVE_STRUCT_UTIMBUF 1
c0d27fcc 6567_ACEOF
1113b624
PE
6568
6569fi
ba4481b5 6570
c0d27fcc 6571echo "$as_me:$LINENO: checking return type of signal handlers" >&5
98418dba
CW
6572echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
6573if test "${ac_cv_type_signal+set}" = set; then
503d2be0 6574 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 6575else
98418dba 6576 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6577/* confdefs.h. */
6578_ACEOF
6579cat confdefs.h >>conftest.$ac_ext
6580cat >>conftest.$ac_ext <<_ACEOF
6581/* end confdefs.h. */
7397acc4 6582#include <sys/types.h>
98418dba
CW
6583#include <signal.h>
6584#ifdef signal
6585# undef signal
6586#endif
6587#ifdef __cplusplus
6588extern "C" void (*signal (int, void (*)(int)))(int);
6589#else
6590void (*signal ()) ();
6591#endif
6592
503d2be0
AS
6593int
6594main ()
6595{
98418dba 6596int i;
503d2be0
AS
6597 ;
6598 return 0;
6599}
6600_ACEOF
98418dba 6601rm -f conftest.$ac_objext
c0d27fcc 6602if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 6603 (eval $ac_compile) 2>conftest.er1
503d2be0 6604 ac_status=$?
edfaf76d
LK
6605 grep -v '^ *+' conftest.er1 >conftest.err
6606 rm -f conftest.er1
6607 cat conftest.err >&5
c0d27fcc 6608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6609 (exit $ac_status); } &&
e143ad11
AS
6610 { ac_try='test -z "$ac_c_werror_flag"
6611 || test ! -s conftest.err'
edfaf76d
LK
6612 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6613 (eval $ac_try) 2>&5
6614 ac_status=$?
6615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6616 (exit $ac_status); }; } &&
6617 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6618 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
6619 (eval $ac_try) 2>&5
6620 ac_status=$?
c0d27fcc 6621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6622 (exit $ac_status); }; }; then
98418dba 6623 ac_cv_type_signal=void
503d2be0
AS
6624else
6625 echo "$as_me: failed program was:" >&5
19650fd6
AS
6626sed 's/^/| /' conftest.$ac_ext >&5
6627
98418dba 6628ac_cv_type_signal=int
503d2be0 6629fi
edfaf76d 6630rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 6631fi
c0d27fcc 6632echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
98418dba 6633echo "${ECHO_T}$ac_cv_type_signal" >&6
7397acc4 6634
c0d27fcc 6635cat >>confdefs.h <<_ACEOF
98418dba 6636#define RETSIGTYPE $ac_cv_type_signal
c0d27fcc
MR
6637_ACEOF
6638
503d2be0 6639
c0d27fcc
MR
6640
6641echo "$as_me:$LINENO: checking for speed_t" >&5
98418dba
CW
6642echo $ECHO_N "checking for speed_t... $ECHO_C" >&6
6643if test "${emacs_cv_speed_t+set}" = set; then
6644 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 6645else
98418dba 6646 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6647/* confdefs.h. */
6648_ACEOF
6649cat confdefs.h >>conftest.$ac_ext
6650cat >>conftest.$ac_ext <<_ACEOF
6651/* end confdefs.h. */
98418dba 6652#include <termios.h>
98418dba
CW
6653int
6654main ()
6655{
6656speed_t x = 1;
6657 ;
6658 return 0;
6659}
6660_ACEOF
6661rm -f conftest.$ac_objext
c0d27fcc 6662if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 6663 (eval $ac_compile) 2>conftest.er1
98418dba 6664 ac_status=$?
edfaf76d
LK
6665 grep -v '^ *+' conftest.er1 >conftest.err
6666 rm -f conftest.er1
6667 cat conftest.err >&5
c0d27fcc 6668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 6669 (exit $ac_status); } &&
e143ad11
AS
6670 { ac_try='test -z "$ac_c_werror_flag"
6671 || test ! -s conftest.err'
edfaf76d
LK
6672 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6673 (eval $ac_try) 2>&5
6674 ac_status=$?
6675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6676 (exit $ac_status); }; } &&
6677 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6678 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
6679 (eval $ac_try) 2>&5
6680 ac_status=$?
c0d27fcc 6681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
6682 (exit $ac_status); }; }; then
6683 emacs_cv_speed_t=yes
6684else
6685 echo "$as_me: failed program was:" >&5
19650fd6
AS
6686sed 's/^/| /' conftest.$ac_ext >&5
6687
98418dba
CW
6688emacs_cv_speed_t=no
6689fi
edfaf76d 6690rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 6691fi
c0d27fcc 6692echo "$as_me:$LINENO: result: $emacs_cv_speed_t" >&5
98418dba
CW
6693echo "${ECHO_T}$emacs_cv_speed_t" >&6
6694if test $emacs_cv_speed_t = yes; then
b936fae4 6695
c0d27fcc 6696cat >>confdefs.h <<\_ACEOF
98418dba 6697#define HAVE_SPEED_T 1
c0d27fcc 6698_ACEOF
98418dba 6699
7397acc4
DL
6700fi
6701
c0d27fcc 6702echo "$as_me:$LINENO: checking for struct timeval" >&5
98418dba
CW
6703echo $ECHO_N "checking for struct timeval... $ECHO_C" >&6
6704if test "${emacs_cv_struct_timeval+set}" = set; then
503d2be0 6705 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 6706else
503d2be0 6707 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6708/* confdefs.h. */
6709_ACEOF
6710cat confdefs.h >>conftest.$ac_ext
6711cat >>conftest.$ac_ext <<_ACEOF
6712/* end confdefs.h. */
98418dba
CW
6713#ifdef TIME_WITH_SYS_TIME
6714#include <sys/time.h>
6715#include <time.h>
6716#else
6717#ifdef HAVE_SYS_TIME_H
6718#include <sys/time.h>
6719#else
6720#include <time.h>
6721#endif
6722#endif
503d2be0
AS
6723int
6724main ()
6725{
98418dba 6726static struct timeval x; x.tv_sec = x.tv_usec;
503d2be0
AS
6727 ;
6728 return 0;
6729}
6730_ACEOF
6731rm -f conftest.$ac_objext
c0d27fcc 6732if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 6733 (eval $ac_compile) 2>conftest.er1
503d2be0 6734 ac_status=$?
edfaf76d
LK
6735 grep -v '^ *+' conftest.er1 >conftest.err
6736 rm -f conftest.er1
6737 cat conftest.err >&5
c0d27fcc 6738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6739 (exit $ac_status); } &&
e143ad11
AS
6740 { ac_try='test -z "$ac_c_werror_flag"
6741 || test ! -s conftest.err'
c0d27fcc 6742 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
6743 (eval $ac_try) 2>&5
6744 ac_status=$?
c0d27fcc 6745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
edfaf76d
LK
6746 (exit $ac_status); }; } &&
6747 { ac_try='test -s conftest.$ac_objext'
6748 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6749 (eval $ac_try) 2>&5
6750 ac_status=$?
6751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6752 (exit $ac_status); }; }; then
6753 emacs_cv_struct_timeval=yes
6754else
503d2be0 6755 echo "$as_me: failed program was:" >&5
19650fd6
AS
6756sed 's/^/| /' conftest.$ac_ext >&5
6757
98418dba 6758emacs_cv_struct_timeval=no
7397acc4 6759fi
edfaf76d 6760rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 6761fi
c0d27fcc 6762echo "$as_me:$LINENO: result: $emacs_cv_struct_timeval" >&5
98418dba
CW
6763echo "${ECHO_T}$emacs_cv_struct_timeval" >&6
6764HAVE_TIMEVAL=$emacs_cv_struct_timeval
6765if test $emacs_cv_struct_timeval = yes; then
b936fae4 6766
c0d27fcc 6767cat >>confdefs.h <<\_ACEOF
98418dba 6768#define HAVE_TIMEVAL 1
c0d27fcc 6769_ACEOF
7397acc4
DL
6770
6771fi
6772
c0d27fcc 6773echo "$as_me:$LINENO: checking for struct exception" >&5
98418dba
CW
6774echo $ECHO_N "checking for struct exception... $ECHO_C" >&6
6775if test "${emacs_cv_struct_exception+set}" = set; then
503d2be0 6776 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6777else
503d2be0 6778 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6779/* confdefs.h. */
6780_ACEOF
6781cat confdefs.h >>conftest.$ac_ext
6782cat >>conftest.$ac_ext <<_ACEOF
6783/* end confdefs.h. */
98418dba 6784#include <math.h>
503d2be0
AS
6785int
6786main ()
6787{
98418dba 6788static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1;
503d2be0
AS
6789 ;
6790 return 0;
ba4481b5 6791}
503d2be0
AS
6792_ACEOF
6793rm -f conftest.$ac_objext
c0d27fcc 6794if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 6795 (eval $ac_compile) 2>conftest.er1
503d2be0 6796 ac_status=$?
edfaf76d
LK
6797 grep -v '^ *+' conftest.er1 >conftest.err
6798 rm -f conftest.er1
6799 cat conftest.err >&5
c0d27fcc 6800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6801 (exit $ac_status); } &&
e143ad11
AS
6802 { ac_try='test -z "$ac_c_werror_flag"
6803 || test ! -s conftest.err'
edfaf76d
LK
6804 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6805 (eval $ac_try) 2>&5
6806 ac_status=$?
6807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6808 (exit $ac_status); }; } &&
6809 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6810 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
6811 (eval $ac_try) 2>&5
6812 ac_status=$?
c0d27fcc 6813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6814 (exit $ac_status); }; }; then
98418dba 6815 emacs_cv_struct_exception=yes
ba4481b5 6816else
503d2be0 6817 echo "$as_me: failed program was:" >&5
19650fd6
AS
6818sed 's/^/| /' conftest.$ac_ext >&5
6819
98418dba 6820emacs_cv_struct_exception=no
ba4481b5 6821fi
edfaf76d 6822rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 6823fi
c0d27fcc 6824echo "$as_me:$LINENO: result: $emacs_cv_struct_exception" >&5
98418dba
CW
6825echo "${ECHO_T}$emacs_cv_struct_exception" >&6
6826HAVE_EXCEPTION=$emacs_cv_struct_exception
6827if test $emacs_cv_struct_exception != yes; then
b936fae4 6828
c0d27fcc 6829cat >>confdefs.h <<\_ACEOF
98418dba 6830#define NO_MATHERR 1
c0d27fcc 6831_ACEOF
ba4481b5
DL
6832
6833fi
6834
7862d3a8
AS
6835
6836for ac_header in sys/socket.h
6837do
6838as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6839if eval "test \"\${$as_ac_Header+set}\" = set"; then
6840 echo "$as_me:$LINENO: checking for $ac_header" >&5
6841echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6842if eval "test \"\${$as_ac_Header+set}\" = set"; then
6843 echo $ECHO_N "(cached) $ECHO_C" >&6
6844fi
6845echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6846echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6847else
6848 # Is the header compilable?
6849echo "$as_me:$LINENO: checking $ac_header usability" >&5
6850echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
6851cat >conftest.$ac_ext <<_ACEOF
6852/* confdefs.h. */
6853_ACEOF
6854cat confdefs.h >>conftest.$ac_ext
6855cat >>conftest.$ac_ext <<_ACEOF
6856/* end confdefs.h. */
6857$ac_includes_default
6858#include <$ac_header>
6859_ACEOF
6860rm -f conftest.$ac_objext
6861if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 6862 (eval $ac_compile) 2>conftest.er1
7862d3a8 6863 ac_status=$?
edfaf76d
LK
6864 grep -v '^ *+' conftest.er1 >conftest.err
6865 rm -f conftest.er1
6866 cat conftest.err >&5
7862d3a8
AS
6867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6868 (exit $ac_status); } &&
e143ad11
AS
6869 { ac_try='test -z "$ac_c_werror_flag"
6870 || test ! -s conftest.err'
edfaf76d
LK
6871 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6872 (eval $ac_try) 2>&5
6873 ac_status=$?
6874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6875 (exit $ac_status); }; } &&
6876 { ac_try='test -s conftest.$ac_objext'
7862d3a8
AS
6877 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6878 (eval $ac_try) 2>&5
6879 ac_status=$?
6880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6881 (exit $ac_status); }; }; then
6882 ac_header_compiler=yes
6883else
6884 echo "$as_me: failed program was:" >&5
6885sed 's/^/| /' conftest.$ac_ext >&5
6886
6887ac_header_compiler=no
6888fi
edfaf76d 6889rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7862d3a8
AS
6890echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6891echo "${ECHO_T}$ac_header_compiler" >&6
6892
6893# Is the header present?
6894echo "$as_me:$LINENO: checking $ac_header presence" >&5
6895echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
6896cat >conftest.$ac_ext <<_ACEOF
6897/* confdefs.h. */
6898_ACEOF
6899cat confdefs.h >>conftest.$ac_ext
6900cat >>conftest.$ac_ext <<_ACEOF
6901/* end confdefs.h. */
6902#include <$ac_header>
6903_ACEOF
6904if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6905 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6906 ac_status=$?
6907 grep -v '^ *+' conftest.er1 >conftest.err
6908 rm -f conftest.er1
6909 cat conftest.err >&5
6910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6911 (exit $ac_status); } >/dev/null; then
6912 if test -s conftest.err; then
6913 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 6914 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
7862d3a8
AS
6915 else
6916 ac_cpp_err=
6917 fi
6918else
6919 ac_cpp_err=yes
6920fi
6921if test -z "$ac_cpp_err"; then
6922 ac_header_preproc=yes
6923else
6924 echo "$as_me: failed program was:" >&5
6925sed 's/^/| /' conftest.$ac_ext >&5
6926
6927 ac_header_preproc=no
6928fi
6929rm -f conftest.err conftest.$ac_ext
6930echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6931echo "${ECHO_T}$ac_header_preproc" >&6
6932
6933# So? What about this header?
edfaf76d
LK
6934case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6935 yes:no: )
7862d3a8
AS
6936 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6937echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
6938 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6939echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6940 ac_header_preproc=yes
7862d3a8 6941 ;;
edfaf76d 6942 no:yes:* )
7862d3a8
AS
6943 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6944echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
6945 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
6946echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
6947 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6948echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6949 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
6950echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
7862d3a8
AS
6951 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6952echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
6953 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6954echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
7862d3a8
AS
6955 (
6956 cat <<\_ASBOX
edfaf76d
LK
6957## ------------------------------------------ ##
6958## Report this to the AC_PACKAGE_NAME lists. ##
6959## ------------------------------------------ ##
7862d3a8
AS
6960_ASBOX
6961 ) |
6962 sed "s/^/$as_me: WARNING: /" >&2
6963 ;;
6964esac
6965echo "$as_me:$LINENO: checking for $ac_header" >&5
6966echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6967if eval "test \"\${$as_ac_Header+set}\" = set"; then
6968 echo $ECHO_N "(cached) $ECHO_C" >&6
6969else
edfaf76d 6970 eval "$as_ac_Header=\$ac_header_preproc"
7862d3a8
AS
6971fi
6972echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6973echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6974
6975fi
6976if test `eval echo '${'$as_ac_Header'}'` = yes; then
6977 cat >>confdefs.h <<_ACEOF
6978#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6979_ACEOF
6980
6981fi
6982
6983done
6984
6985
6986for ac_header in net/if.h
6987do
6988as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6989echo "$as_me:$LINENO: checking for $ac_header" >&5
6990echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6991if eval "test \"\${$as_ac_Header+set}\" = set"; then
6992 echo $ECHO_N "(cached) $ECHO_C" >&6
6993else
6994 cat >conftest.$ac_ext <<_ACEOF
6995/* confdefs.h. */
6996_ACEOF
6997cat confdefs.h >>conftest.$ac_ext
6998cat >>conftest.$ac_ext <<_ACEOF
6999/* end confdefs.h. */
7000$ac_includes_default
7001#if HAVE_SYS_SOCKET_H
7002#include <sys/socket.h>
7003#endif
7004
7005#include <$ac_header>
7006_ACEOF
7007rm -f conftest.$ac_objext
7008if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 7009 (eval $ac_compile) 2>conftest.er1
7862d3a8 7010 ac_status=$?
edfaf76d
LK
7011 grep -v '^ *+' conftest.er1 >conftest.err
7012 rm -f conftest.er1
7013 cat conftest.err >&5
7862d3a8
AS
7014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7015 (exit $ac_status); } &&
e143ad11
AS
7016 { ac_try='test -z "$ac_c_werror_flag"
7017 || test ! -s conftest.err'
edfaf76d
LK
7018 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7019 (eval $ac_try) 2>&5
7020 ac_status=$?
7021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7022 (exit $ac_status); }; } &&
7023 { ac_try='test -s conftest.$ac_objext'
7862d3a8
AS
7024 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7025 (eval $ac_try) 2>&5
7026 ac_status=$?
7027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7028 (exit $ac_status); }; }; then
7029 eval "$as_ac_Header=yes"
7030else
7031 echo "$as_me: failed program was:" >&5
7032sed 's/^/| /' conftest.$ac_ext >&5
7033
7034eval "$as_ac_Header=no"
7035fi
edfaf76d 7036rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7862d3a8
AS
7037fi
7038echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7039echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7040if test `eval echo '${'$as_ac_Header'}'` = yes; then
7041 cat >>confdefs.h <<_ACEOF
7042#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7043_ACEOF
7044
7045fi
7046
7047done
7048
7049
c0d27fcc 7050echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
98418dba
CW
7051echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
7052if test "${ac_cv_struct_tm+set}" = set; then
503d2be0 7053 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7054else
503d2be0 7055 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7056/* confdefs.h. */
7057_ACEOF
7058cat confdefs.h >>conftest.$ac_ext
7059cat >>conftest.$ac_ext <<_ACEOF
7060/* end confdefs.h. */
98418dba
CW
7061#include <sys/types.h>
7062#include <time.h>
7397acc4 7063
503d2be0
AS
7064int
7065main ()
7066{
98418dba 7067struct tm *tp; tp->tm_sec;
503d2be0
AS
7068 ;
7069 return 0;
7070}
7071_ACEOF
7072rm -f conftest.$ac_objext
c0d27fcc 7073if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 7074 (eval $ac_compile) 2>conftest.er1
503d2be0 7075 ac_status=$?
edfaf76d
LK
7076 grep -v '^ *+' conftest.er1 >conftest.err
7077 rm -f conftest.er1
7078 cat conftest.err >&5
c0d27fcc 7079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 7080 (exit $ac_status); } &&
e143ad11
AS
7081 { ac_try='test -z "$ac_c_werror_flag"
7082 || test ! -s conftest.err'
edfaf76d
LK
7083 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7084 (eval $ac_try) 2>&5
7085 ac_status=$?
7086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7087 (exit $ac_status); }; } &&
7088 { ac_try='test -s conftest.$ac_objext'
35996d22
AS
7089 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7090 (eval $ac_try) 2>&5
7091 ac_status=$?
7092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7093 (exit $ac_status); }; }; then
7094 ac_cv_struct_tm=time.h
7095else
503d2be0 7096 echo "$as_me: failed program was:" >&5
19650fd6
AS
7097sed 's/^/| /' conftest.$ac_ext >&5
7098
98418dba 7099ac_cv_struct_tm=sys/time.h
7397acc4 7100fi
edfaf76d 7101rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 7102fi
c0d27fcc 7103echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
98418dba
CW
7104echo "${ECHO_T}$ac_cv_struct_tm" >&6
7105if test $ac_cv_struct_tm = sys/time.h; then
7397acc4 7106
c0d27fcc 7107cat >>confdefs.h <<\_ACEOF
98418dba 7108#define TM_IN_SYS_TIME 1
c0d27fcc 7109_ACEOF
7397acc4
DL
7110
7111fi
ba4481b5 7112
c0d27fcc 7113echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
98418dba
CW
7114echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
7115if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
503d2be0 7116 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7117else
98418dba 7118 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7119/* confdefs.h. */
7120_ACEOF
7121cat confdefs.h >>conftest.$ac_ext
7122cat >>conftest.$ac_ext <<_ACEOF
7123/* end confdefs.h. */
98418dba
CW
7124#include <sys/types.h>
7125#include <$ac_cv_struct_tm>
ba4481b5 7126
c0d27fcc 7127
98418dba
CW
7128int
7129main ()
7130{
7131static struct tm ac_aggr;
7132if (ac_aggr.tm_zone)
7133return 0;
7134 ;
7135 return 0;
7136}
7137_ACEOF
7138rm -f conftest.$ac_objext
c0d27fcc 7139if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 7140 (eval $ac_compile) 2>conftest.er1
98418dba 7141 ac_status=$?
edfaf76d
LK
7142 grep -v '^ *+' conftest.er1 >conftest.err
7143 rm -f conftest.er1
7144 cat conftest.err >&5
c0d27fcc 7145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 7146 (exit $ac_status); } &&
e143ad11
AS
7147 { ac_try='test -z "$ac_c_werror_flag"
7148 || test ! -s conftest.err'
edfaf76d
LK
7149 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7150 (eval $ac_try) 2>&5
7151 ac_status=$?
7152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7153 (exit $ac_status); }; } &&
7154 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 7155 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
7156 (eval $ac_try) 2>&5
7157 ac_status=$?
c0d27fcc 7158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7159 (exit $ac_status); }; }; then
7160 ac_cv_member_struct_tm_tm_zone=yes
ba4481b5 7161else
98418dba 7162 echo "$as_me: failed program was:" >&5
19650fd6
AS
7163sed 's/^/| /' conftest.$ac_ext >&5
7164
6bae0ccf 7165cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7166/* confdefs.h. */
7167_ACEOF
7168cat confdefs.h >>conftest.$ac_ext
7169cat >>conftest.$ac_ext <<_ACEOF
7170/* end confdefs.h. */
6bae0ccf
DL
7171#include <sys/types.h>
7172#include <$ac_cv_struct_tm>
7173
7174
7175int
7176main ()
7177{
7178static struct tm ac_aggr;
7179if (sizeof ac_aggr.tm_zone)
7180return 0;
7181 ;
7182 return 0;
7183}
7184_ACEOF
7185rm -f conftest.$ac_objext
7186if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 7187 (eval $ac_compile) 2>conftest.er1
6bae0ccf 7188 ac_status=$?
edfaf76d
LK
7189 grep -v '^ *+' conftest.er1 >conftest.err
7190 rm -f conftest.er1
7191 cat conftest.err >&5
6bae0ccf
DL
7192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7193 (exit $ac_status); } &&
e143ad11
AS
7194 { ac_try='test -z "$ac_c_werror_flag"
7195 || test ! -s conftest.err'
edfaf76d
LK
7196 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7197 (eval $ac_try) 2>&5
7198 ac_status=$?
7199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7200 (exit $ac_status); }; } &&
7201 { ac_try='test -s conftest.$ac_objext'
6bae0ccf
DL
7202 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7203 (eval $ac_try) 2>&5
7204 ac_status=$?
7205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7206 (exit $ac_status); }; }; then
7207 ac_cv_member_struct_tm_tm_zone=yes
7208else
7209 echo "$as_me: failed program was:" >&5
19650fd6
AS
7210sed 's/^/| /' conftest.$ac_ext >&5
7211
98418dba 7212ac_cv_member_struct_tm_tm_zone=no
ba4481b5 7213fi
edfaf76d 7214rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 7215fi
edfaf76d 7216rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 7217fi
c0d27fcc 7218echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
98418dba
CW
7219echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
7220if test $ac_cv_member_struct_tm_tm_zone = yes; then
503d2be0 7221
c0d27fcc 7222cat >>confdefs.h <<_ACEOF
98418dba 7223#define HAVE_STRUCT_TM_TM_ZONE 1
c0d27fcc
MR
7224_ACEOF
7225
ba4481b5 7226
98418dba 7227fi
ba4481b5 7228
98418dba 7229if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
ba4481b5 7230
c0d27fcc 7231cat >>confdefs.h <<\_ACEOF
98418dba 7232#define HAVE_TM_ZONE 1
c0d27fcc 7233_ACEOF
ba4481b5 7234
ba4481b5 7235else
c0d27fcc 7236 echo "$as_me:$LINENO: checking for tzname" >&5
98418dba
CW
7237echo $ECHO_N "checking for tzname... $ECHO_C" >&6
7238if test "${ac_cv_var_tzname+set}" = set; then
503d2be0 7239 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7240else
98418dba 7241 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7242/* confdefs.h. */
7243_ACEOF
7244cat confdefs.h >>conftest.$ac_ext
7245cat >>conftest.$ac_ext <<_ACEOF
7246/* end confdefs.h. */
98418dba
CW
7247#include <time.h>
7248#ifndef tzname /* For SGI. */
7249extern char *tzname[]; /* RS6000 and others reject char **tzname. */
7250#endif
7251
98418dba
CW
7252int
7253main ()
7254{
7255atoi(*tzname);
7256 ;
7257 return 0;
7258}
7259_ACEOF
7260rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 7261if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 7262 (eval $ac_link) 2>conftest.er1
98418dba 7263 ac_status=$?
edfaf76d
LK
7264 grep -v '^ *+' conftest.er1 >conftest.err
7265 rm -f conftest.er1
7266 cat conftest.err >&5
c0d27fcc 7267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 7268 (exit $ac_status); } &&
e143ad11
AS
7269 { ac_try='test -z "$ac_c_werror_flag"
7270 || test ! -s conftest.err'
edfaf76d
LK
7271 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7272 (eval $ac_try) 2>&5
7273 ac_status=$?
7274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7275 (exit $ac_status); }; } &&
7276 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 7277 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
7278 (eval $ac_try) 2>&5
7279 ac_status=$?
c0d27fcc 7280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7281 (exit $ac_status); }; }; then
7282 ac_cv_var_tzname=yes
7283else
7284 echo "$as_me: failed program was:" >&5
19650fd6
AS
7285sed 's/^/| /' conftest.$ac_ext >&5
7286
98418dba 7287ac_cv_var_tzname=no
ba4481b5 7288fi
edfaf76d
LK
7289rm -f conftest.err conftest.$ac_objext \
7290 conftest$ac_exeext conftest.$ac_ext
98418dba 7291fi
c0d27fcc 7292echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
98418dba
CW
7293echo "${ECHO_T}$ac_cv_var_tzname" >&6
7294 if test $ac_cv_var_tzname = yes; then
ba4481b5 7295
c0d27fcc 7296cat >>confdefs.h <<\_ACEOF
98418dba 7297#define HAVE_TZNAME 1
c0d27fcc 7298_ACEOF
503d2be0 7299
98418dba
CW
7300 fi
7301fi
503d2be0 7302
c0d27fcc 7303echo "$as_me:$LINENO: checking for struct tm.tm_gmtoff" >&5
b936fae4
AS
7304echo $ECHO_N "checking for struct tm.tm_gmtoff... $ECHO_C" >&6
7305if test "${ac_cv_member_struct_tm_tm_gmtoff+set}" = set; then
98418dba
CW
7306 echo $ECHO_N "(cached) $ECHO_C" >&6
7307else
7308 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7309/* confdefs.h. */
7310_ACEOF
7311cat confdefs.h >>conftest.$ac_ext
7312cat >>conftest.$ac_ext <<_ACEOF
7313/* end confdefs.h. */
98418dba 7314#include <time.h>
b936fae4 7315
98418dba
CW
7316int
7317main ()
7318{
b936fae4
AS
7319static struct tm ac_aggr;
7320if (ac_aggr.tm_gmtoff)
7321return 0;
98418dba
CW
7322 ;
7323 return 0;
7324}
7325_ACEOF
b936fae4 7326rm -f conftest.$ac_objext
c0d27fcc 7327if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 7328 (eval $ac_compile) 2>conftest.er1
98418dba 7329 ac_status=$?
edfaf76d
LK
7330 grep -v '^ *+' conftest.er1 >conftest.err
7331 rm -f conftest.er1
7332 cat conftest.err >&5
c0d27fcc 7333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 7334 (exit $ac_status); } &&
e143ad11
AS
7335 { ac_try='test -z "$ac_c_werror_flag"
7336 || test ! -s conftest.err'
edfaf76d
LK
7337 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7338 (eval $ac_try) 2>&5
7339 ac_status=$?
7340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7341 (exit $ac_status); }; } &&
7342 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 7343 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
7344 (eval $ac_try) 2>&5
7345 ac_status=$?
c0d27fcc 7346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 7347 (exit $ac_status); }; }; then
b936fae4 7348 ac_cv_member_struct_tm_tm_gmtoff=yes
98418dba
CW
7349else
7350 echo "$as_me: failed program was:" >&5
19650fd6
AS
7351sed 's/^/| /' conftest.$ac_ext >&5
7352
8799b3e4 7353cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7354/* confdefs.h. */
7355_ACEOF
7356cat confdefs.h >>conftest.$ac_ext
7357cat >>conftest.$ac_ext <<_ACEOF
7358/* end confdefs.h. */
6bae0ccf
DL
7359#include <time.h>
7360
8799b3e4
CW
7361int
7362main ()
7363{
6bae0ccf
DL
7364static struct tm ac_aggr;
7365if (sizeof ac_aggr.tm_gmtoff)
7366return 0;
8799b3e4
CW
7367 ;
7368 return 0;
7369}
7370_ACEOF
6bae0ccf 7371rm -f conftest.$ac_objext
c0d27fcc 7372if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 7373 (eval $ac_compile) 2>conftest.er1
8799b3e4 7374 ac_status=$?
edfaf76d
LK
7375 grep -v '^ *+' conftest.er1 >conftest.err
7376 rm -f conftest.er1
7377 cat conftest.err >&5
c0d27fcc 7378 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8799b3e4 7379 (exit $ac_status); } &&
e143ad11
AS
7380 { ac_try='test -z "$ac_c_werror_flag"
7381 || test ! -s conftest.err'
edfaf76d
LK
7382 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7383 (eval $ac_try) 2>&5
7384 ac_status=$?
7385 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7386 (exit $ac_status); }; } &&
7387 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 7388 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8799b3e4
CW
7389 (eval $ac_try) 2>&5
7390 ac_status=$?
c0d27fcc 7391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8799b3e4 7392 (exit $ac_status); }; }; then
6bae0ccf 7393 ac_cv_member_struct_tm_tm_gmtoff=yes
8799b3e4
CW
7394else
7395 echo "$as_me: failed program was:" >&5
19650fd6
AS
7396sed 's/^/| /' conftest.$ac_ext >&5
7397
6bae0ccf 7398ac_cv_member_struct_tm_tm_gmtoff=no
8799b3e4 7399fi
edfaf76d 7400rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 7401fi
edfaf76d 7402rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8799b3e4 7403fi
6bae0ccf
DL
7404echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_gmtoff" >&5
7405echo "${ECHO_T}$ac_cv_member_struct_tm_tm_gmtoff" >&6
7406if test $ac_cv_member_struct_tm_tm_gmtoff = yes; then
7407
7408cat >>confdefs.h <<\_ACEOF
7409#define HAVE_TM_GMTOFF 1
7410_ACEOF
7411
7412fi
7413
96f3a036
DL
7414echo "$as_me:$LINENO: checking for struct ifreq.ifr_flags" >&5
7415echo $ECHO_N "checking for struct ifreq.ifr_flags... $ECHO_C" >&6
7416if test "${ac_cv_member_struct_ifreq_ifr_flags+set}" = set; then
7417 echo $ECHO_N "(cached) $ECHO_C" >&6
7418else
7419 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7420/* confdefs.h. */
7421_ACEOF
7422cat confdefs.h >>conftest.$ac_ext
7423cat >>conftest.$ac_ext <<_ACEOF
7424/* end confdefs.h. */
7862d3a8
AS
7425$ac_includes_default
7426#if HAVE_SYS_SOCKET_H
7427#include <sys/socket.h>
7428#endif
7429#if HAVE_NET_IF_H
96f3a036 7430#include <net/if.h>
7862d3a8 7431#endif
96f3a036
DL
7432
7433int
7434main ()
7435{
7436static struct ifreq ac_aggr;
7437if (ac_aggr.ifr_flags)
7438return 0;
7439 ;
7440 return 0;
7441}
7442_ACEOF
7443rm -f conftest.$ac_objext
7444if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 7445 (eval $ac_compile) 2>conftest.er1
96f3a036 7446 ac_status=$?
edfaf76d
LK
7447 grep -v '^ *+' conftest.er1 >conftest.err
7448 rm -f conftest.er1
7449 cat conftest.err >&5
96f3a036
DL
7450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7451 (exit $ac_status); } &&
e143ad11
AS
7452 { ac_try='test -z "$ac_c_werror_flag"
7453 || test ! -s conftest.err'
edfaf76d
LK
7454 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7455 (eval $ac_try) 2>&5
7456 ac_status=$?
7457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7458 (exit $ac_status); }; } &&
7459 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7460 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7461 (eval $ac_try) 2>&5
7462 ac_status=$?
7463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7464 (exit $ac_status); }; }; then
7465 ac_cv_member_struct_ifreq_ifr_flags=yes
7466else
7467 echo "$as_me: failed program was:" >&5
7468sed 's/^/| /' conftest.$ac_ext >&5
7469
7470cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7471/* confdefs.h. */
7472_ACEOF
7473cat confdefs.h >>conftest.$ac_ext
7474cat >>conftest.$ac_ext <<_ACEOF
7475/* end confdefs.h. */
7862d3a8
AS
7476$ac_includes_default
7477#if HAVE_SYS_SOCKET_H
7478#include <sys/socket.h>
7479#endif
7480#if HAVE_NET_IF_H
96f3a036 7481#include <net/if.h>
7862d3a8 7482#endif
96f3a036
DL
7483
7484int
7485main ()
7486{
7487static struct ifreq ac_aggr;
7488if (sizeof ac_aggr.ifr_flags)
7489return 0;
7490 ;
7491 return 0;
7492}
7493_ACEOF
7494rm -f conftest.$ac_objext
7495if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 7496 (eval $ac_compile) 2>conftest.er1
96f3a036 7497 ac_status=$?
edfaf76d
LK
7498 grep -v '^ *+' conftest.er1 >conftest.err
7499 rm -f conftest.er1
7500 cat conftest.err >&5
96f3a036
DL
7501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7502 (exit $ac_status); } &&
e143ad11
AS
7503 { ac_try='test -z "$ac_c_werror_flag"
7504 || test ! -s conftest.err'
edfaf76d
LK
7505 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7506 (eval $ac_try) 2>&5
7507 ac_status=$?
7508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7509 (exit $ac_status); }; } &&
7510 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7511 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7512 (eval $ac_try) 2>&5
7513 ac_status=$?
7514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7515 (exit $ac_status); }; }; then
7516 ac_cv_member_struct_ifreq_ifr_flags=yes
7517else
7518 echo "$as_me: failed program was:" >&5
7519sed 's/^/| /' conftest.$ac_ext >&5
7520
7521ac_cv_member_struct_ifreq_ifr_flags=no
7522fi
edfaf76d 7523rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 7524fi
edfaf76d 7525rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036
DL
7526fi
7527echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_flags" >&5
7528echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_flags" >&6
7529if test $ac_cv_member_struct_ifreq_ifr_flags = yes; then
7530
7531cat >>confdefs.h <<_ACEOF
7532#define HAVE_STRUCT_IFREQ_IFR_FLAGS 1
7533_ACEOF
7534
7535
7536fi
7537echo "$as_me:$LINENO: checking for struct ifreq.ifr_hwaddr" >&5
7538echo $ECHO_N "checking for struct ifreq.ifr_hwaddr... $ECHO_C" >&6
7539if test "${ac_cv_member_struct_ifreq_ifr_hwaddr+set}" = set; then
7540 echo $ECHO_N "(cached) $ECHO_C" >&6
7541else
7542 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7543/* confdefs.h. */
7544_ACEOF
7545cat confdefs.h >>conftest.$ac_ext
7546cat >>conftest.$ac_ext <<_ACEOF
7547/* end confdefs.h. */
7862d3a8
AS
7548$ac_includes_default
7549#if HAVE_SYS_SOCKET_H
7550#include <sys/socket.h>
7551#endif
7552#if HAVE_NET_IF_H
96f3a036 7553#include <net/if.h>
7862d3a8 7554#endif
96f3a036
DL
7555
7556int
7557main ()
7558{
7559static struct ifreq ac_aggr;
7560if (ac_aggr.ifr_hwaddr)
7561return 0;
7562 ;
7563 return 0;
7564}
7565_ACEOF
7566rm -f conftest.$ac_objext
7567if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 7568 (eval $ac_compile) 2>conftest.er1
96f3a036 7569 ac_status=$?
edfaf76d
LK
7570 grep -v '^ *+' conftest.er1 >conftest.err
7571 rm -f conftest.er1
7572 cat conftest.err >&5
96f3a036
DL
7573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7574 (exit $ac_status); } &&
e143ad11
AS
7575 { ac_try='test -z "$ac_c_werror_flag"
7576 || test ! -s conftest.err'
edfaf76d
LK
7577 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7578 (eval $ac_try) 2>&5
7579 ac_status=$?
7580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7581 (exit $ac_status); }; } &&
7582 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7583 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7584 (eval $ac_try) 2>&5
7585 ac_status=$?
7586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7587 (exit $ac_status); }; }; then
7588 ac_cv_member_struct_ifreq_ifr_hwaddr=yes
7589else
7590 echo "$as_me: failed program was:" >&5
7591sed 's/^/| /' conftest.$ac_ext >&5
7592
7593cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7594/* confdefs.h. */
7595_ACEOF
7596cat confdefs.h >>conftest.$ac_ext
7597cat >>conftest.$ac_ext <<_ACEOF
7598/* end confdefs.h. */
7862d3a8
AS
7599$ac_includes_default
7600#if HAVE_SYS_SOCKET_H
7601#include <sys/socket.h>
7602#endif
7603#if HAVE_NET_IF_H
96f3a036 7604#include <net/if.h>
7862d3a8 7605#endif
96f3a036
DL
7606
7607int
7608main ()
7609{
7610static struct ifreq ac_aggr;
7611if (sizeof ac_aggr.ifr_hwaddr)
7612return 0;
7613 ;
7614 return 0;
7615}
7616_ACEOF
7617rm -f conftest.$ac_objext
7618if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 7619 (eval $ac_compile) 2>conftest.er1
96f3a036 7620 ac_status=$?
edfaf76d
LK
7621 grep -v '^ *+' conftest.er1 >conftest.err
7622 rm -f conftest.er1
7623 cat conftest.err >&5
96f3a036
DL
7624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7625 (exit $ac_status); } &&
e143ad11
AS
7626 { ac_try='test -z "$ac_c_werror_flag"
7627 || test ! -s conftest.err'
edfaf76d
LK
7628 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7629 (eval $ac_try) 2>&5
7630 ac_status=$?
7631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7632 (exit $ac_status); }; } &&
7633 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7634 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7635 (eval $ac_try) 2>&5
7636 ac_status=$?
7637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7638 (exit $ac_status); }; }; then
7639 ac_cv_member_struct_ifreq_ifr_hwaddr=yes
7640else
7641 echo "$as_me: failed program was:" >&5
7642sed 's/^/| /' conftest.$ac_ext >&5
7643
7644ac_cv_member_struct_ifreq_ifr_hwaddr=no
7645fi
edfaf76d 7646rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 7647fi
edfaf76d 7648rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036
DL
7649fi
7650echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_hwaddr" >&5
7651echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_hwaddr" >&6
7652if test $ac_cv_member_struct_ifreq_ifr_hwaddr = yes; then
7653
7654cat >>confdefs.h <<_ACEOF
7655#define HAVE_STRUCT_IFREQ_IFR_HWADDR 1
7656_ACEOF
7657
7658
7659fi
7660echo "$as_me:$LINENO: checking for struct ifreq.ifr_netmask" >&5
7661echo $ECHO_N "checking for struct ifreq.ifr_netmask... $ECHO_C" >&6
7662if test "${ac_cv_member_struct_ifreq_ifr_netmask+set}" = set; then
7663 echo $ECHO_N "(cached) $ECHO_C" >&6
7664else
7665 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7666/* confdefs.h. */
7667_ACEOF
7668cat confdefs.h >>conftest.$ac_ext
7669cat >>conftest.$ac_ext <<_ACEOF
7670/* end confdefs.h. */
7862d3a8
AS
7671$ac_includes_default
7672#if HAVE_SYS_SOCKET_H
7673#include <sys/socket.h>
7674#endif
7675#if HAVE_NET_IF_H
96f3a036 7676#include <net/if.h>
7862d3a8 7677#endif
96f3a036
DL
7678
7679int
7680main ()
7681{
7682static struct ifreq ac_aggr;
7683if (ac_aggr.ifr_netmask)
7684return 0;
7685 ;
7686 return 0;
7687}
7688_ACEOF
7689rm -f conftest.$ac_objext
7690if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 7691 (eval $ac_compile) 2>conftest.er1
96f3a036 7692 ac_status=$?
edfaf76d
LK
7693 grep -v '^ *+' conftest.er1 >conftest.err
7694 rm -f conftest.er1
7695 cat conftest.err >&5
96f3a036
DL
7696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7697 (exit $ac_status); } &&
e143ad11
AS
7698 { ac_try='test -z "$ac_c_werror_flag"
7699 || test ! -s conftest.err'
edfaf76d
LK
7700 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7701 (eval $ac_try) 2>&5
7702 ac_status=$?
7703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7704 (exit $ac_status); }; } &&
7705 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7706 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7707 (eval $ac_try) 2>&5
7708 ac_status=$?
7709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7710 (exit $ac_status); }; }; then
7711 ac_cv_member_struct_ifreq_ifr_netmask=yes
7712else
7713 echo "$as_me: failed program was:" >&5
7714sed 's/^/| /' conftest.$ac_ext >&5
7715
7716cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7717/* confdefs.h. */
7718_ACEOF
7719cat confdefs.h >>conftest.$ac_ext
7720cat >>conftest.$ac_ext <<_ACEOF
7721/* end confdefs.h. */
7862d3a8
AS
7722$ac_includes_default
7723#if HAVE_SYS_SOCKET_H
7724#include <sys/socket.h>
7725#endif
7726#if HAVE_NET_IF_H
96f3a036 7727#include <net/if.h>
7862d3a8 7728#endif
96f3a036
DL
7729
7730int
7731main ()
7732{
7733static struct ifreq ac_aggr;
7734if (sizeof ac_aggr.ifr_netmask)
7735return 0;
7736 ;
7737 return 0;
7738}
7739_ACEOF
7740rm -f conftest.$ac_objext
7741if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 7742 (eval $ac_compile) 2>conftest.er1
96f3a036 7743 ac_status=$?
edfaf76d
LK
7744 grep -v '^ *+' conftest.er1 >conftest.err
7745 rm -f conftest.er1
7746 cat conftest.err >&5
96f3a036
DL
7747 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7748 (exit $ac_status); } &&
e143ad11
AS
7749 { ac_try='test -z "$ac_c_werror_flag"
7750 || test ! -s conftest.err'
edfaf76d
LK
7751 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7752 (eval $ac_try) 2>&5
7753 ac_status=$?
7754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7755 (exit $ac_status); }; } &&
7756 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7757 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7758 (eval $ac_try) 2>&5
7759 ac_status=$?
7760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7761 (exit $ac_status); }; }; then
7762 ac_cv_member_struct_ifreq_ifr_netmask=yes
7763else
7764 echo "$as_me: failed program was:" >&5
7765sed 's/^/| /' conftest.$ac_ext >&5
7766
7767ac_cv_member_struct_ifreq_ifr_netmask=no
7768fi
edfaf76d 7769rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 7770fi
edfaf76d 7771rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036
DL
7772fi
7773echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_netmask" >&5
7774echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_netmask" >&6
7775if test $ac_cv_member_struct_ifreq_ifr_netmask = yes; then
7776
7777cat >>confdefs.h <<_ACEOF
7778#define HAVE_STRUCT_IFREQ_IFR_NETMASK 1
7779_ACEOF
7780
7781
7782fi
7783echo "$as_me:$LINENO: checking for struct ifreq.ifr_broadaddr" >&5
7784echo $ECHO_N "checking for struct ifreq.ifr_broadaddr... $ECHO_C" >&6
7785if test "${ac_cv_member_struct_ifreq_ifr_broadaddr+set}" = set; then
7786 echo $ECHO_N "(cached) $ECHO_C" >&6
7787else
7788 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7789/* confdefs.h. */
7790_ACEOF
7791cat confdefs.h >>conftest.$ac_ext
7792cat >>conftest.$ac_ext <<_ACEOF
7793/* end confdefs.h. */
7862d3a8
AS
7794$ac_includes_default
7795#if HAVE_SYS_SOCKET_H
7796#include <sys/socket.h>
7797#endif
7798#if HAVE_NET_IF_H
96f3a036 7799#include <net/if.h>
7862d3a8 7800#endif
96f3a036
DL
7801
7802int
7803main ()
7804{
7805static struct ifreq ac_aggr;
7806if (ac_aggr.ifr_broadaddr)
7807return 0;
7808 ;
7809 return 0;
7810}
7811_ACEOF
7812rm -f conftest.$ac_objext
7813if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 7814 (eval $ac_compile) 2>conftest.er1
96f3a036 7815 ac_status=$?
edfaf76d
LK
7816 grep -v '^ *+' conftest.er1 >conftest.err
7817 rm -f conftest.er1
7818 cat conftest.err >&5
96f3a036
DL
7819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7820 (exit $ac_status); } &&
e143ad11
AS
7821 { ac_try='test -z "$ac_c_werror_flag"
7822 || test ! -s conftest.err'
edfaf76d
LK
7823 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7824 (eval $ac_try) 2>&5
7825 ac_status=$?
7826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7827 (exit $ac_status); }; } &&
7828 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7829 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7830 (eval $ac_try) 2>&5
7831 ac_status=$?
7832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7833 (exit $ac_status); }; }; then
7834 ac_cv_member_struct_ifreq_ifr_broadaddr=yes
7835else
7836 echo "$as_me: failed program was:" >&5
7837sed 's/^/| /' conftest.$ac_ext >&5
7838
7839cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7840/* confdefs.h. */
7841_ACEOF
7842cat confdefs.h >>conftest.$ac_ext
7843cat >>conftest.$ac_ext <<_ACEOF
7844/* end confdefs.h. */
7862d3a8
AS
7845$ac_includes_default
7846#if HAVE_SYS_SOCKET_H
7847#include <sys/socket.h>
7848#endif
7849#if HAVE_NET_IF_H
96f3a036 7850#include <net/if.h>
7862d3a8 7851#endif
96f3a036
DL
7852
7853int
7854main ()
7855{
7856static struct ifreq ac_aggr;
7857if (sizeof ac_aggr.ifr_broadaddr)
7858return 0;
7859 ;
7860 return 0;
7861}
7862_ACEOF
7863rm -f conftest.$ac_objext
7864if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 7865 (eval $ac_compile) 2>conftest.er1
96f3a036 7866 ac_status=$?
edfaf76d
LK
7867 grep -v '^ *+' conftest.er1 >conftest.err
7868 rm -f conftest.er1
7869 cat conftest.err >&5
96f3a036
DL
7870 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7871 (exit $ac_status); } &&
e143ad11
AS
7872 { ac_try='test -z "$ac_c_werror_flag"
7873 || test ! -s conftest.err'
edfaf76d
LK
7874 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7875 (eval $ac_try) 2>&5
7876 ac_status=$?
7877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7878 (exit $ac_status); }; } &&
7879 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7880 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7881 (eval $ac_try) 2>&5
7882 ac_status=$?
7883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7884 (exit $ac_status); }; }; then
7885 ac_cv_member_struct_ifreq_ifr_broadaddr=yes
7886else
7887 echo "$as_me: failed program was:" >&5
7888sed 's/^/| /' conftest.$ac_ext >&5
7889
7890ac_cv_member_struct_ifreq_ifr_broadaddr=no
7891fi
edfaf76d 7892rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 7893fi
edfaf76d 7894rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036
DL
7895fi
7896echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_broadaddr" >&5
7897echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_broadaddr" >&6
7898if test $ac_cv_member_struct_ifreq_ifr_broadaddr = yes; then
7899
7900cat >>confdefs.h <<_ACEOF
7901#define HAVE_STRUCT_IFREQ_IFR_BROADADDR 1
7902_ACEOF
7903
7904
7905fi
7906echo "$as_me:$LINENO: checking for struct ifreq.ifr_addr" >&5
7907echo $ECHO_N "checking for struct ifreq.ifr_addr... $ECHO_C" >&6
7908if test "${ac_cv_member_struct_ifreq_ifr_addr+set}" = set; then
7909 echo $ECHO_N "(cached) $ECHO_C" >&6
7910else
7911 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7912/* confdefs.h. */
7913_ACEOF
7914cat confdefs.h >>conftest.$ac_ext
7915cat >>conftest.$ac_ext <<_ACEOF
7916/* end confdefs.h. */
7862d3a8
AS
7917$ac_includes_default
7918#if HAVE_SYS_SOCKET_H
7919#include <sys/socket.h>
7920#endif
7921#if HAVE_NET_IF_H
96f3a036 7922#include <net/if.h>
7862d3a8 7923#endif
96f3a036
DL
7924
7925int
7926main ()
7927{
7928static struct ifreq ac_aggr;
7929if (ac_aggr.ifr_addr)
7930return 0;
7931 ;
7932 return 0;
7933}
7934_ACEOF
7935rm -f conftest.$ac_objext
7936if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 7937 (eval $ac_compile) 2>conftest.er1
96f3a036 7938 ac_status=$?
edfaf76d
LK
7939 grep -v '^ *+' conftest.er1 >conftest.err
7940 rm -f conftest.er1
7941 cat conftest.err >&5
96f3a036
DL
7942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7943 (exit $ac_status); } &&
e143ad11
AS
7944 { ac_try='test -z "$ac_c_werror_flag"
7945 || test ! -s conftest.err'
edfaf76d
LK
7946 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7947 (eval $ac_try) 2>&5
7948 ac_status=$?
7949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7950 (exit $ac_status); }; } &&
7951 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7952 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7953 (eval $ac_try) 2>&5
7954 ac_status=$?
7955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7956 (exit $ac_status); }; }; then
7957 ac_cv_member_struct_ifreq_ifr_addr=yes
7958else
7959 echo "$as_me: failed program was:" >&5
7960sed 's/^/| /' conftest.$ac_ext >&5
7961
7962cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7963/* confdefs.h. */
7964_ACEOF
7965cat confdefs.h >>conftest.$ac_ext
7966cat >>conftest.$ac_ext <<_ACEOF
7967/* end confdefs.h. */
7862d3a8
AS
7968$ac_includes_default
7969#if HAVE_SYS_SOCKET_H
7970#include <sys/socket.h>
7971#endif
7972#if HAVE_NET_IF_H
96f3a036 7973#include <net/if.h>
7862d3a8 7974#endif
96f3a036
DL
7975
7976int
7977main ()
7978{
7979static struct ifreq ac_aggr;
7980if (sizeof ac_aggr.ifr_addr)
7981return 0;
7982 ;
7983 return 0;
7984}
7985_ACEOF
7986rm -f conftest.$ac_objext
7987if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 7988 (eval $ac_compile) 2>conftest.er1
96f3a036 7989 ac_status=$?
edfaf76d
LK
7990 grep -v '^ *+' conftest.er1 >conftest.err
7991 rm -f conftest.er1
7992 cat conftest.err >&5
96f3a036
DL
7993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7994 (exit $ac_status); } &&
e143ad11
AS
7995 { ac_try='test -z "$ac_c_werror_flag"
7996 || test ! -s conftest.err'
edfaf76d
LK
7997 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7998 (eval $ac_try) 2>&5
7999 ac_status=$?
8000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8001 (exit $ac_status); }; } &&
8002 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
8003 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8004 (eval $ac_try) 2>&5
8005 ac_status=$?
8006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8007 (exit $ac_status); }; }; then
8008 ac_cv_member_struct_ifreq_ifr_addr=yes
8009else
8010 echo "$as_me: failed program was:" >&5
8011sed 's/^/| /' conftest.$ac_ext >&5
8012
8013ac_cv_member_struct_ifreq_ifr_addr=no
8014fi
edfaf76d 8015rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8016fi
edfaf76d 8017rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036
DL
8018fi
8019echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_addr" >&5
8020echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_addr" >&6
8021if test $ac_cv_member_struct_ifreq_ifr_addr = yes; then
8022
8023cat >>confdefs.h <<_ACEOF
8024#define HAVE_STRUCT_IFREQ_IFR_ADDR 1
8025_ACEOF
8026
8027
8028fi
8029
8799b3e4 8030
8799b3e4 8031
c0d27fcc 8032echo "$as_me:$LINENO: checking for function prototypes" >&5
98418dba
CW
8033echo $ECHO_N "checking for function prototypes... $ECHO_C" >&6
8034if test "$ac_cv_prog_cc_stdc" != no; then
c0d27fcc 8035 echo "$as_me:$LINENO: result: yes" >&5
98418dba
CW
8036echo "${ECHO_T}yes" >&6
8037
c0d27fcc 8038cat >>confdefs.h <<\_ACEOF
98418dba 8039#define PROTOTYPES 1
c0d27fcc
MR
8040_ACEOF
8041
8042
8043cat >>confdefs.h <<\_ACEOF
8044#define __PROTOTYPES 1
8045_ACEOF
98418dba
CW
8046
8047else
c0d27fcc 8048 echo "$as_me:$LINENO: result: no" >&5
98418dba
CW
8049echo "${ECHO_T}no" >&6
8050fi
8051
c0d27fcc 8052echo "$as_me:$LINENO: checking for working volatile" >&5
98418dba
CW
8053echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
8054if test "${ac_cv_c_volatile+set}" = set; then
8055 echo $ECHO_N "(cached) $ECHO_C" >&6
8056else
8057 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8058/* confdefs.h. */
8059_ACEOF
8060cat confdefs.h >>conftest.$ac_ext
8061cat >>conftest.$ac_ext <<_ACEOF
8062/* end confdefs.h. */
98418dba 8063
98418dba
CW
8064int
8065main ()
8066{
8067
8068volatile int x;
8069int * volatile y;
8070 ;
8071 return 0;
8072}
8073_ACEOF
8074rm -f conftest.$ac_objext
c0d27fcc 8075if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 8076 (eval $ac_compile) 2>conftest.er1
98418dba 8077 ac_status=$?
edfaf76d
LK
8078 grep -v '^ *+' conftest.er1 >conftest.err
8079 rm -f conftest.er1
8080 cat conftest.err >&5
c0d27fcc 8081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8082 (exit $ac_status); } &&
e143ad11
AS
8083 { ac_try='test -z "$ac_c_werror_flag"
8084 || test ! -s conftest.err'
edfaf76d
LK
8085 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8086 (eval $ac_try) 2>&5
8087 ac_status=$?
8088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8089 (exit $ac_status); }; } &&
8090 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 8091 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8092 (eval $ac_try) 2>&5
8093 ac_status=$?
c0d27fcc 8094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8095 (exit $ac_status); }; }; then
8096 ac_cv_c_volatile=yes
8097else
8098 echo "$as_me: failed program was:" >&5
19650fd6
AS
8099sed 's/^/| /' conftest.$ac_ext >&5
8100
98418dba
CW
8101ac_cv_c_volatile=no
8102fi
edfaf76d 8103rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 8104fi
c0d27fcc 8105echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5
98418dba
CW
8106echo "${ECHO_T}$ac_cv_c_volatile" >&6
8107if test $ac_cv_c_volatile = no; then
8108
c0d27fcc 8109cat >>confdefs.h <<\_ACEOF
98418dba 8110#define volatile
c0d27fcc 8111_ACEOF
98418dba
CW
8112
8113fi
8114
c0d27fcc 8115echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
98418dba
CW
8116echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
8117if test "${ac_cv_c_const+set}" = set; then
8118 echo $ECHO_N "(cached) $ECHO_C" >&6
8119else
8120 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8121/* confdefs.h. */
8122_ACEOF
8123cat confdefs.h >>conftest.$ac_ext
8124cat >>conftest.$ac_ext <<_ACEOF
8125/* end confdefs.h. */
98418dba 8126
98418dba
CW
8127int
8128main ()
8129{
8130/* FIXME: Include the comments suggested by Paul. */
8131#ifndef __cplusplus
8132 /* Ultrix mips cc rejects this. */
8133 typedef int charset[2];
8134 const charset x;
8135 /* SunOS 4.1.1 cc rejects this. */
8136 char const *const *ccp;
8137 char **p;
8138 /* NEC SVR4.0.2 mips cc rejects this. */
8139 struct point {int x, y;};
8140 static struct point const zero = {0,0};
8141 /* AIX XL C 1.02.0.0 rejects this.
8142 It does not let you subtract one const X* pointer from another in
8143 an arm of an if-expression whose if-part is not a constant
8144 expression */
8145 const char *g = "string";
8146 ccp = &g + (g ? g-g : 0);
8147 /* HPUX 7.0 cc rejects these. */
8148 ++ccp;
8149 p = (char**) ccp;
8150 ccp = (char const *const *) p;
8151 { /* SCO 3.2v4 cc rejects this. */
8152 char *t;
8153 char const *s = 0 ? (char *) 0 : (char const *) 0;
8154
8155 *t++ = 0;
8156 }
8157 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
8158 int x[] = {25, 17};
8159 const int *foo = &x[0];
8160 ++foo;
8161 }
8162 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
8163 typedef const int *iptr;
8164 iptr p = 0;
8165 ++p;
8166 }
8167 { /* AIX XL C 1.02.0.0 rejects this saying
8168 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
8169 struct s { int j; const int *ap[3]; };
8170 struct s *b; b->j = 5;
8171 }
8172 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
8173 const int foo = 10;
8174 }
8175#endif
8176
8177 ;
8178 return 0;
8179}
8180_ACEOF
8181rm -f conftest.$ac_objext
c0d27fcc 8182if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 8183 (eval $ac_compile) 2>conftest.er1
98418dba 8184 ac_status=$?
edfaf76d
LK
8185 grep -v '^ *+' conftest.er1 >conftest.err
8186 rm -f conftest.er1
8187 cat conftest.err >&5
c0d27fcc 8188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8189 (exit $ac_status); } &&
e143ad11
AS
8190 { ac_try='test -z "$ac_c_werror_flag"
8191 || test ! -s conftest.err'
edfaf76d
LK
8192 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8193 (eval $ac_try) 2>&5
8194 ac_status=$?
8195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8196 (exit $ac_status); }; } &&
8197 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 8198 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8199 (eval $ac_try) 2>&5
8200 ac_status=$?
c0d27fcc 8201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8202 (exit $ac_status); }; }; then
8203 ac_cv_c_const=yes
8204else
8205 echo "$as_me: failed program was:" >&5
19650fd6
AS
8206sed 's/^/| /' conftest.$ac_ext >&5
8207
98418dba
CW
8208ac_cv_c_const=no
8209fi
edfaf76d 8210rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 8211fi
c0d27fcc 8212echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
98418dba
CW
8213echo "${ECHO_T}$ac_cv_c_const" >&6
8214if test $ac_cv_c_const = no; then
8215
c0d27fcc 8216cat >>confdefs.h <<\_ACEOF
98418dba 8217#define const
c0d27fcc 8218_ACEOF
98418dba
CW
8219
8220fi
8221
c0d27fcc 8222echo "$as_me:$LINENO: checking for void * support" >&5
98418dba
CW
8223echo $ECHO_N "checking for void * support... $ECHO_C" >&6
8224if test "${emacs_cv_void_star+set}" = set; then
8225 echo $ECHO_N "(cached) $ECHO_C" >&6
8226else
8227 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8228/* confdefs.h. */
8229_ACEOF
8230cat confdefs.h >>conftest.$ac_ext
8231cat >>conftest.$ac_ext <<_ACEOF
8232/* end confdefs.h. */
98418dba 8233
98418dba
CW
8234int
8235main ()
8236{
8237void * foo;
8238 ;
8239 return 0;
8240}
8241_ACEOF
8242rm -f conftest.$ac_objext
c0d27fcc 8243if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 8244 (eval $ac_compile) 2>conftest.er1
98418dba 8245 ac_status=$?
edfaf76d
LK
8246 grep -v '^ *+' conftest.er1 >conftest.err
8247 rm -f conftest.er1
8248 cat conftest.err >&5
c0d27fcc 8249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8250 (exit $ac_status); } &&
e143ad11
AS
8251 { ac_try='test -z "$ac_c_werror_flag"
8252 || test ! -s conftest.err'
edfaf76d
LK
8253 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8254 (eval $ac_try) 2>&5
8255 ac_status=$?
8256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8257 (exit $ac_status); }; } &&
8258 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 8259 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8260 (eval $ac_try) 2>&5
8261 ac_status=$?
c0d27fcc 8262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8263 (exit $ac_status); }; }; then
8264 emacs_cv_void_star=yes
8265else
8266 echo "$as_me: failed program was:" >&5
19650fd6
AS
8267sed 's/^/| /' conftest.$ac_ext >&5
8268
98418dba
CW
8269emacs_cv_void_star=no
8270fi
edfaf76d 8271rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 8272fi
c0d27fcc 8273echo "$as_me:$LINENO: result: $emacs_cv_void_star" >&5
98418dba
CW
8274echo "${ECHO_T}$emacs_cv_void_star" >&6
8275if test $emacs_cv_void_star = yes; then
c0d27fcc 8276 cat >>confdefs.h <<\_ACEOF
98418dba 8277#define POINTER_TYPE void
c0d27fcc 8278_ACEOF
98418dba
CW
8279
8280else
c0d27fcc 8281 cat >>confdefs.h <<\_ACEOF
98418dba 8282#define POINTER_TYPE char
c0d27fcc 8283_ACEOF
98418dba
CW
8284
8285fi
8286
c0d27fcc 8287
4494a266
JD
8288
8289
cd958eb3 8290
19650fd6
AS
8291echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
8292echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
edfaf76d 8293set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
98418dba
CW
8294if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
8295 echo $ECHO_N "(cached) $ECHO_C" >&6
8296else
c0d27fcc 8297 cat >conftest.make <<\_ACEOF
98418dba 8298all:
19650fd6 8299 @echo 'ac_maketemp="$(MAKE)"'
c0d27fcc 8300_ACEOF
98418dba
CW
8301# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
8302eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
8303if test -n "$ac_maketemp"; then
8304 eval ac_cv_prog_make_${ac_make}_set=yes
8305else
8306 eval ac_cv_prog_make_${ac_make}_set=no
8307fi
8308rm -f conftest.make
8309fi
8310if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
c0d27fcc 8311 echo "$as_me:$LINENO: result: yes" >&5
98418dba
CW
8312echo "${ECHO_T}yes" >&6
8313 SET_MAKE=
8314else
c0d27fcc 8315 echo "$as_me:$LINENO: result: no" >&5
98418dba
CW
8316echo "${ECHO_T}no" >&6
8317 SET_MAKE="MAKE=${MAKE-make}"
8318fi
8319
c0d27fcc
MR
8320
8321echo "$as_me:$LINENO: checking for long file names" >&5
98418dba
CW
8322echo $ECHO_N "checking for long file names... $ECHO_C" >&6
8323if test "${ac_cv_sys_long_file_names+set}" = set; then
8324 echo $ECHO_N "(cached) $ECHO_C" >&6
8325else
8326 ac_cv_sys_long_file_names=yes
8327# Test for long file names in all the places we know might matter:
8328# . the current directory, where building will happen
8329# $prefix/lib where we will be installing things
8330# $exec_prefix/lib likewise
8331# eval it to expand exec_prefix.
8332# $TMPDIR if set, where it might want to write temporary files
8333# if $TMPDIR is not set:
8334# /tmp where it might want to write temporary files
8335# /var/tmp likewise
8336# /usr/tmp likewise
8337if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
8338 ac_tmpdirs=$TMPDIR
8339else
8340 ac_tmpdirs='/tmp /var/tmp /usr/tmp'
8341fi
8342for ac_dir in . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
8343 test -d $ac_dir || continue
8344 test -w $ac_dir || continue # It is less confusing to not echo anything here.
8345 ac_xdir=$ac_dir/cf$$
8346 (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
8347 ac_tf1=$ac_xdir/conftest9012345
8348 ac_tf2=$ac_xdir/conftest9012346
8349 (echo 1 >$ac_tf1) 2>/dev/null
8350 (echo 2 >$ac_tf2) 2>/dev/null
8351 ac_val=`cat $ac_tf1 2>/dev/null`
8352 if test ! -f $ac_tf1 || test "$ac_val" != 1; then
8353 ac_cv_sys_long_file_names=no
8354 rm -rf $ac_xdir 2>/dev/null
8355 break
8356 fi
8357 rm -rf $ac_xdir 2>/dev/null
8358done
8359fi
c0d27fcc 8360echo "$as_me:$LINENO: result: $ac_cv_sys_long_file_names" >&5
98418dba
CW
8361echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
8362if test $ac_cv_sys_long_file_names = yes; then
8363
c0d27fcc 8364cat >>confdefs.h <<\_ACEOF
98418dba 8365#define HAVE_LONG_FILE_NAMES 1
c0d27fcc 8366_ACEOF
98418dba
CW
8367
8368fi
8369
c0d27fcc 8370
98418dba
CW
8371#### Choose a window system.
8372
c0d27fcc 8373echo "$as_me:$LINENO: checking for X" >&5
98418dba
CW
8374echo $ECHO_N "checking for X... $ECHO_C" >&6
8375
c0d27fcc 8376
98418dba
CW
8377# Check whether --with-x or --without-x was given.
8378if test "${with_x+set}" = set; then
8379 withval="$with_x"
8380
8381fi;
8382# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
8383if test "x$with_x" = xno; then
8384 # The user explicitly disabled X.
8385 have_x=disabled
8386else
8387 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
8388 # Both variables are already set.
8389 have_x=yes
8390 else
8391 if test "${ac_cv_have_x+set}" = set; then
8392 echo $ECHO_N "(cached) $ECHO_C" >&6
8393else
8394 # One or both of the vars are not set, and there is no cached value.
8395ac_x_includes=no ac_x_libraries=no
8396rm -fr conftest.dir
8397if mkdir conftest.dir; then
8398 cd conftest.dir
8399 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
c0d27fcc 8400 cat >Imakefile <<'_ACEOF'
98418dba
CW
8401acfindx:
8402 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
c0d27fcc 8403_ACEOF
98418dba
CW
8404 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
8405 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
8406 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
8407 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
8408 for ac_extension in a so sl; do
8409 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
edfaf76d
LK
8410 test -f $ac_im_libdir/libX11.$ac_extension; then
8411 ac_im_usrlibdir=$ac_im_libdir; break
98418dba
CW
8412 fi
8413 done
8414 # Screen out bogus values from the imake configuration. They are
8415 # bogus both because they are the default anyway, and because
8416 # using them would break gcc on systems where it needs fixed includes.
8417 case $ac_im_incroot in
8418 /usr/include) ;;
8419 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
8420 esac
8421 case $ac_im_usrlibdir in
8422 /usr/lib | /lib) ;;
8423 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
8424 esac
8425 fi
8426 cd ..
8427 rm -fr conftest.dir
8428fi
8429
8430# Standard set of common directories for X headers.
8431# Check X11 before X11Rn because it is often a symlink to the current release.
8432ac_x_header_dirs='
8433/usr/X11/include
8434/usr/X11R6/include
8435/usr/X11R5/include
8436/usr/X11R4/include
8437
8438/usr/include/X11
8439/usr/include/X11R6
8440/usr/include/X11R5
8441/usr/include/X11R4
8442
8443/usr/local/X11/include
8444/usr/local/X11R6/include
8445/usr/local/X11R5/include
8446/usr/local/X11R4/include
8447
8448/usr/local/include/X11
8449/usr/local/include/X11R6
8450/usr/local/include/X11R5
8451/usr/local/include/X11R4
8452
8453/usr/X386/include
8454/usr/x386/include
8455/usr/XFree86/include/X11
8456
8457/usr/include
8458/usr/local/include
8459/usr/unsupported/include
8460/usr/athena/include
8461/usr/local/x11r5/include
8462/usr/lpp/Xamples/include
8463
8464/usr/openwin/include
8465/usr/openwin/share/include'
8466
8467if test "$ac_x_includes" = no; then
e143ad11 8468 # Guess where to find include files, by looking for Intrinsic.h.
98418dba
CW
8469 # First, try using that file with no special directory specified.
8470 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8471/* confdefs.h. */
8472_ACEOF
8473cat confdefs.h >>conftest.$ac_ext
8474cat >>conftest.$ac_ext <<_ACEOF
8475/* end confdefs.h. */
01abe918 8476#include <X11/Intrinsic.h>
98418dba 8477_ACEOF
c0d27fcc 8478if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
8479 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8480 ac_status=$?
6bae0ccf 8481 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
8482 rm -f conftest.er1
8483 cat conftest.err >&5
c0d27fcc 8484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8485 (exit $ac_status); } >/dev/null; then
8486 if test -s conftest.err; then
8487 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 8488 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
8489 else
8490 ac_cpp_err=
8491 fi
8492else
8493 ac_cpp_err=yes
8494fi
8495if test -z "$ac_cpp_err"; then
8496 # We can compile using X headers with no special include directory.
8497ac_x_includes=
8498else
8499 echo "$as_me: failed program was:" >&5
19650fd6
AS
8500sed 's/^/| /' conftest.$ac_ext >&5
8501
98418dba 8502 for ac_dir in $ac_x_header_dirs; do
01abe918 8503 if test -r "$ac_dir/X11/Intrinsic.h"; then
98418dba
CW
8504 ac_x_includes=$ac_dir
8505 break
8506 fi
8507done
8508fi
8509rm -f conftest.err conftest.$ac_ext
8510fi # $ac_x_includes = no
8511
8512if test "$ac_x_libraries" = no; then
8513 # Check for the libraries.
8514 # See if we find them without any special options.
8515 # Don't add to $LIBS permanently.
8516 ac_save_LIBS=$LIBS
01abe918 8517 LIBS="-lXt $LIBS"
98418dba 8518 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8519/* confdefs.h. */
8520_ACEOF
8521cat confdefs.h >>conftest.$ac_ext
8522cat >>conftest.$ac_ext <<_ACEOF
8523/* end confdefs.h. */
01abe918 8524#include <X11/Intrinsic.h>
98418dba
CW
8525int
8526main ()
8527{
01abe918 8528XtMalloc (0)
98418dba
CW
8529 ;
8530 return 0;
8531}
8532_ACEOF
8533rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8534if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 8535 (eval $ac_link) 2>conftest.er1
98418dba 8536 ac_status=$?
edfaf76d
LK
8537 grep -v '^ *+' conftest.er1 >conftest.err
8538 rm -f conftest.er1
8539 cat conftest.err >&5
c0d27fcc 8540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8541 (exit $ac_status); } &&
e143ad11
AS
8542 { ac_try='test -z "$ac_c_werror_flag"
8543 || test ! -s conftest.err'
edfaf76d
LK
8544 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8545 (eval $ac_try) 2>&5
8546 ac_status=$?
8547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8548 (exit $ac_status); }; } &&
8549 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8550 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8551 (eval $ac_try) 2>&5
8552 ac_status=$?
c0d27fcc 8553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8554 (exit $ac_status); }; }; then
8555 LIBS=$ac_save_LIBS
8556# We can link X programs with no special library path.
8557ac_x_libraries=
8558else
8559 echo "$as_me: failed program was:" >&5
19650fd6
AS
8560sed 's/^/| /' conftest.$ac_ext >&5
8561
98418dba
CW
8562LIBS=$ac_save_LIBS
8563for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
8564do
8565 # Don't even attempt the hair of trying to link an X program!
8566 for ac_extension in a so sl; do
01abe918 8567 if test -r $ac_dir/libXt.$ac_extension; then
98418dba
CW
8568 ac_x_libraries=$ac_dir
8569 break 2
8570 fi
8571 done
8572done
8573fi
edfaf76d
LK
8574rm -f conftest.err conftest.$ac_objext \
8575 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
8576fi # $ac_x_libraries = no
8577
8578if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
8579 # Didn't find X anywhere. Cache the known absence of X.
8580 ac_cv_have_x="have_x=no"
8581else
8582 # Record where we found X for the cache.
8583 ac_cv_have_x="have_x=yes \
edfaf76d 8584 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
98418dba
CW
8585fi
8586fi
8587
8588 fi
8589 eval "$ac_cv_have_x"
8590fi # $with_x != no
8591
8592if test "$have_x" != yes; then
c0d27fcc 8593 echo "$as_me:$LINENO: result: $have_x" >&5
98418dba
CW
8594echo "${ECHO_T}$have_x" >&6
8595 no_x=yes
8596else
8597 # If each of the values was on the command line, it overrides each guess.
8598 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
8599 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
8600 # Update the cache value to reflect the command line values.
8601 ac_cv_have_x="have_x=yes \
8602 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
e143ad11
AS
8603 echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
8604echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
98418dba
CW
8605fi
8606
8607if test "$no_x" = yes; then
8608 window_system=none
8609else
8610 window_system=x11
8611fi
8612
8613if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
8614 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
8615 LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"`
8616 x_default_search_path=""
8617 for x_library in `echo ${x_libraries} | sed -e "s/:/ /g"`; do
8618 x_search_path="\
8619${x_library}/X11/%L/%T/%N%C%S:\
8620${x_library}/X11/%l/%T/%N%C%S:\
8621${x_library}/X11/%T/%N%C%S:\
8622${x_library}/X11/%L/%T/%N%S:\
8623${x_library}/X11/%l/%T/%N%S:\
8624${x_library}/X11/%T/%N%S"
8625 if test x"${x_default_search_path}" = x; then
8626 x_default_search_path=${x_search_path}
8627 else
8628 x_default_search_path="${x_search_path}:${x_default_search_path}"
8629 fi
8630 done
8631fi
8632if test "${x_includes}" != NONE && test -n "${x_includes}"; then
8633 C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"`
8634fi
8635
8636if test x"${x_includes}" = x; then
8637 bitmapdir=/usr/include/X11/bitmaps
8638else
8639 # accumulate include directories that have X11 bitmap subdirectories
8640 bmd_acc="dummyval"
8641 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
8642 if test -d "${bmd}/X11/bitmaps"; then
8643 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
8644 fi
8645 if test -d "${bmd}/bitmaps"; then
8646 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
8647 fi
8648 done
8649 if test ${bmd_acc} != "dummyval"; then
8650 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
8651 fi
8652fi
8653
5d6da11e 8654HAVE_CARBON=no
1d4d5604
YM
8655if test "${with_carbon}" != no; then
8656 if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
5d6da11e
YM
8657 echo "$as_me:$LINENO: checking for Carbon/Carbon.h" >&5
8658echo $ECHO_N "checking for Carbon/Carbon.h... $ECHO_C" >&6
8659if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
8660 echo $ECHO_N "(cached) $ECHO_C" >&6
8661fi
8662echo "$as_me:$LINENO: result: $ac_cv_header_Carbon_Carbon_h" >&5
8663echo "${ECHO_T}$ac_cv_header_Carbon_Carbon_h" >&6
8664else
8665 # Is the header compilable?
8666echo "$as_me:$LINENO: checking Carbon/Carbon.h usability" >&5
8667echo $ECHO_N "checking Carbon/Carbon.h usability... $ECHO_C" >&6
8668cat >conftest.$ac_ext <<_ACEOF
8669/* confdefs.h. */
8670_ACEOF
8671cat confdefs.h >>conftest.$ac_ext
8672cat >>conftest.$ac_ext <<_ACEOF
8673/* end confdefs.h. */
8674$ac_includes_default
8675#include <Carbon/Carbon.h>
8676_ACEOF
8677rm -f conftest.$ac_objext
8678if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 8679 (eval $ac_compile) 2>conftest.er1
5d6da11e 8680 ac_status=$?
edfaf76d
LK
8681 grep -v '^ *+' conftest.er1 >conftest.err
8682 rm -f conftest.er1
8683 cat conftest.err >&5
5d6da11e
YM
8684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8685 (exit $ac_status); } &&
e143ad11
AS
8686 { ac_try='test -z "$ac_c_werror_flag"
8687 || test ! -s conftest.err'
edfaf76d
LK
8688 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8689 (eval $ac_try) 2>&5
8690 ac_status=$?
8691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8692 (exit $ac_status); }; } &&
8693 { ac_try='test -s conftest.$ac_objext'
5d6da11e
YM
8694 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8695 (eval $ac_try) 2>&5
8696 ac_status=$?
8697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8698 (exit $ac_status); }; }; then
8699 ac_header_compiler=yes
8700else
8701 echo "$as_me: failed program was:" >&5
8702sed 's/^/| /' conftest.$ac_ext >&5
8703
8704ac_header_compiler=no
8705fi
edfaf76d 8706rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5d6da11e
YM
8707echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8708echo "${ECHO_T}$ac_header_compiler" >&6
8709
8710# Is the header present?
8711echo "$as_me:$LINENO: checking Carbon/Carbon.h presence" >&5
8712echo $ECHO_N "checking Carbon/Carbon.h presence... $ECHO_C" >&6
8713cat >conftest.$ac_ext <<_ACEOF
8714/* confdefs.h. */
8715_ACEOF
8716cat confdefs.h >>conftest.$ac_ext
8717cat >>conftest.$ac_ext <<_ACEOF
8718/* end confdefs.h. */
8719#include <Carbon/Carbon.h>
8720_ACEOF
8721if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8722 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8723 ac_status=$?
8724 grep -v '^ *+' conftest.er1 >conftest.err
8725 rm -f conftest.er1
8726 cat conftest.err >&5
8727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8728 (exit $ac_status); } >/dev/null; then
8729 if test -s conftest.err; then
8730 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 8731 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
5d6da11e
YM
8732 else
8733 ac_cpp_err=
8734 fi
8735else
8736 ac_cpp_err=yes
8737fi
8738if test -z "$ac_cpp_err"; then
8739 ac_header_preproc=yes
8740else
8741 echo "$as_me: failed program was:" >&5
8742sed 's/^/| /' conftest.$ac_ext >&5
8743
8744 ac_header_preproc=no
8745fi
8746rm -f conftest.err conftest.$ac_ext
8747echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8748echo "${ECHO_T}$ac_header_preproc" >&6
8749
8750# So? What about this header?
edfaf76d
LK
8751case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8752 yes:no: )
5d6da11e
YM
8753 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: accepted by the compiler, rejected by the preprocessor!" >&5
8754echo "$as_me: WARNING: Carbon/Carbon.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
8755 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: proceeding with the compiler's result" >&5
8756echo "$as_me: WARNING: Carbon/Carbon.h: proceeding with the compiler's result" >&2;}
8757 ac_header_preproc=yes
5d6da11e 8758 ;;
edfaf76d 8759 no:yes:* )
5d6da11e
YM
8760 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: present but cannot be compiled" >&5
8761echo "$as_me: WARNING: Carbon/Carbon.h: present but cannot be compiled" >&2;}
edfaf76d
LK
8762 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: check for missing prerequisite headers?" >&5
8763echo "$as_me: WARNING: Carbon/Carbon.h: check for missing prerequisite headers?" >&2;}
8764 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: see the Autoconf documentation" >&5
8765echo "$as_me: WARNING: Carbon/Carbon.h: see the Autoconf documentation" >&2;}
8766 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: section \"Present But Cannot Be Compiled\"" >&5
8767echo "$as_me: WARNING: Carbon/Carbon.h: section \"Present But Cannot Be Compiled\"" >&2;}
5d6da11e
YM
8768 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: proceeding with the preprocessor's result" >&5
8769echo "$as_me: WARNING: Carbon/Carbon.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
8770 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: in the future, the compiler will take precedence" >&5
8771echo "$as_me: WARNING: Carbon/Carbon.h: in the future, the compiler will take precedence" >&2;}
5d6da11e
YM
8772 (
8773 cat <<\_ASBOX
edfaf76d
LK
8774## ------------------------------------------ ##
8775## Report this to the AC_PACKAGE_NAME lists. ##
8776## ------------------------------------------ ##
5d6da11e
YM
8777_ASBOX
8778 ) |
8779 sed "s/^/$as_me: WARNING: /" >&2
8780 ;;
8781esac
8782echo "$as_me:$LINENO: checking for Carbon/Carbon.h" >&5
8783echo $ECHO_N "checking for Carbon/Carbon.h... $ECHO_C" >&6
8784if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
8785 echo $ECHO_N "(cached) $ECHO_C" >&6
8786else
8787 ac_cv_header_Carbon_Carbon_h=$ac_header_preproc
8788fi
8789echo "$as_me:$LINENO: result: $ac_cv_header_Carbon_Carbon_h" >&5
8790echo "${ECHO_T}$ac_cv_header_Carbon_Carbon_h" >&6
8791
8792fi
8793if test $ac_cv_header_Carbon_Carbon_h = yes; then
8794 HAVE_CARBON=yes
8795fi
8796
8797
1d4d5604
YM
8798fi
8799if test "${window_system}" = x11 && test "${HAVE_CARBON}" = yes; then
8800 if test "${with_carbon+set}" != set \
8801 && test "${carbon_appdir_x+set}" != set; then
8802 HAVE_CARBON=no
5d6da11e
YM
8803 fi
8804fi
1d4d5604
YM
8805if test "${HAVE_CARBON}" = yes; then
8806 window_system=mac
8807fi
8808
8809case "${window_system}" in
8810 x11 )
8811 HAVE_X_WINDOWS=yes
8812 HAVE_X11=yes
8813 case "${with_x_toolkit}" in
8814 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
8815 motif ) USE_X_TOOLKIT=MOTIF ;;
8816 gtk ) with_gtk=yes
8817 USE_X_TOOLKIT=none ;;
8818 no ) USE_X_TOOLKIT=none ;;
8819 * ) USE_X_TOOLKIT=maybe ;;
8820 esac
8821 ;;
8822 mac | none )
8823 HAVE_X_WINDOWS=no
8824 HAVE_X11=no
8825 USE_X_TOOLKIT=none
8826 ;;
8827esac
8828
8829### If we're using X11, we should use the X menu package.
8830HAVE_MENUS=no
8831case ${HAVE_X11} in
8832 yes ) HAVE_MENUS=yes ;;
8833esac
8834
8835if test "${opsys}" = "hpux9"; then
8836 case "${x_libraries}" in
8837 *X11R4* )
8838 opsysfile="s/hpux9-x11r4.h"
8839 ;;
8840 esac
8841fi
8842
8843if test "${opsys}" = "hpux9shr"; then
8844 case "${x_libraries}" in
8845 *X11R4* )
8846 opsysfile="s/hpux9shxr4.h"
8847 ;;
8848 esac
8849fi
5d6da11e 8850
98418dba
CW
8851### Compute the unexec source name from the object name.
8852UNEXEC_SRC="`echo ${unexec} | sed 's/\.o/.c/'`"
8853
8854# Do the opsystem or machine files prohibit the use of the GNU malloc?
8855# Assume not, until told otherwise.
8856GNU_MALLOC=yes
8857doug_lea_malloc=yes
c0d27fcc 8858echo "$as_me:$LINENO: checking for malloc_get_state" >&5
98418dba
CW
8859echo $ECHO_N "checking for malloc_get_state... $ECHO_C" >&6
8860if test "${ac_cv_func_malloc_get_state+set}" = set; then
8861 echo $ECHO_N "(cached) $ECHO_C" >&6
8862else
8863 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8864/* confdefs.h. */
8865_ACEOF
8866cat confdefs.h >>conftest.$ac_ext
8867cat >>conftest.$ac_ext <<_ACEOF
8868/* end confdefs.h. */
edfaf76d
LK
8869/* Define malloc_get_state to an innocuous variant, in case <limits.h> declares malloc_get_state.
8870 For example, HP-UX 11i <limits.h> declares gettimeofday. */
8871#define malloc_get_state innocuous_malloc_get_state
8872
98418dba 8873/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
8874 which can conflict with char malloc_get_state (); below.
8875 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8876 <limits.h> exists even on freestanding compilers. */
edfaf76d 8877
19650fd6
AS
8878#ifdef __STDC__
8879# include <limits.h>
8880#else
8881# include <assert.h>
8882#endif
edfaf76d
LK
8883
8884#undef malloc_get_state
8885
98418dba
CW
8886/* Override any gcc2 internal prototype to avoid an error. */
8887#ifdef __cplusplus
8888extern "C"
19650fd6 8889{
98418dba
CW
8890#endif
8891/* We use char because int might match the return type of a gcc2
8892 builtin and then its argument prototype would still apply. */
8893char malloc_get_state ();
98418dba
CW
8894/* The GNU C library defines this for functions which it implements
8895 to always fail with ENOSYS. Some functions are actually named
8896 something starting with __ and the normal name is an alias. */
8897#if defined (__stub_malloc_get_state) || defined (__stub___malloc_get_state)
8898choke me
8899#else
19650fd6
AS
8900char (*f) () = malloc_get_state;
8901#endif
8902#ifdef __cplusplus
8903}
98418dba
CW
8904#endif
8905
19650fd6
AS
8906int
8907main ()
8908{
8909return f != malloc_get_state;
98418dba
CW
8910 ;
8911 return 0;
8912}
8913_ACEOF
8914rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8915if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 8916 (eval $ac_link) 2>conftest.er1
98418dba 8917 ac_status=$?
edfaf76d
LK
8918 grep -v '^ *+' conftest.er1 >conftest.err
8919 rm -f conftest.er1
8920 cat conftest.err >&5
c0d27fcc 8921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8922 (exit $ac_status); } &&
e143ad11
AS
8923 { ac_try='test -z "$ac_c_werror_flag"
8924 || test ! -s conftest.err'
edfaf76d
LK
8925 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8926 (eval $ac_try) 2>&5
8927 ac_status=$?
8928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8929 (exit $ac_status); }; } &&
8930 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8931 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8932 (eval $ac_try) 2>&5
8933 ac_status=$?
c0d27fcc 8934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8935 (exit $ac_status); }; }; then
8936 ac_cv_func_malloc_get_state=yes
8937else
8938 echo "$as_me: failed program was:" >&5
19650fd6
AS
8939sed 's/^/| /' conftest.$ac_ext >&5
8940
98418dba
CW
8941ac_cv_func_malloc_get_state=no
8942fi
edfaf76d
LK
8943rm -f conftest.err conftest.$ac_objext \
8944 conftest$ac_exeext conftest.$ac_ext
98418dba 8945fi
c0d27fcc 8946echo "$as_me:$LINENO: result: $ac_cv_func_malloc_get_state" >&5
98418dba
CW
8947echo "${ECHO_T}$ac_cv_func_malloc_get_state" >&6
8948if test $ac_cv_func_malloc_get_state = yes; then
8949 :
8950else
8951 doug_lea_malloc=no
8952fi
8953
c0d27fcc 8954echo "$as_me:$LINENO: checking for malloc_set_state" >&5
98418dba
CW
8955echo $ECHO_N "checking for malloc_set_state... $ECHO_C" >&6
8956if test "${ac_cv_func_malloc_set_state+set}" = set; then
8957 echo $ECHO_N "(cached) $ECHO_C" >&6
8958else
8959 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8960/* confdefs.h. */
8961_ACEOF
8962cat confdefs.h >>conftest.$ac_ext
8963cat >>conftest.$ac_ext <<_ACEOF
8964/* end confdefs.h. */
edfaf76d
LK
8965/* Define malloc_set_state to an innocuous variant, in case <limits.h> declares malloc_set_state.
8966 For example, HP-UX 11i <limits.h> declares gettimeofday. */
8967#define malloc_set_state innocuous_malloc_set_state
8968
98418dba 8969/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
8970 which can conflict with char malloc_set_state (); below.
8971 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8972 <limits.h> exists even on freestanding compilers. */
edfaf76d 8973
19650fd6
AS
8974#ifdef __STDC__
8975# include <limits.h>
8976#else
8977# include <assert.h>
8978#endif
edfaf76d
LK
8979
8980#undef malloc_set_state
8981
98418dba
CW
8982/* Override any gcc2 internal prototype to avoid an error. */
8983#ifdef __cplusplus
8984extern "C"
19650fd6 8985{
98418dba
CW
8986#endif
8987/* We use char because int might match the return type of a gcc2
8988 builtin and then its argument prototype would still apply. */
8989char malloc_set_state ();
98418dba
CW
8990/* The GNU C library defines this for functions which it implements
8991 to always fail with ENOSYS. Some functions are actually named
8992 something starting with __ and the normal name is an alias. */
8993#if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
8994choke me
8995#else
19650fd6
AS
8996char (*f) () = malloc_set_state;
8997#endif
8998#ifdef __cplusplus
8999}
98418dba
CW
9000#endif
9001
19650fd6
AS
9002int
9003main ()
9004{
9005return f != malloc_set_state;
98418dba
CW
9006 ;
9007 return 0;
9008}
9009_ACEOF
9010rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9011if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 9012 (eval $ac_link) 2>conftest.er1
98418dba 9013 ac_status=$?
edfaf76d
LK
9014 grep -v '^ *+' conftest.er1 >conftest.err
9015 rm -f conftest.er1
9016 cat conftest.err >&5
c0d27fcc 9017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9018 (exit $ac_status); } &&
e143ad11
AS
9019 { ac_try='test -z "$ac_c_werror_flag"
9020 || test ! -s conftest.err'
edfaf76d
LK
9021 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9022 (eval $ac_try) 2>&5
9023 ac_status=$?
9024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9025 (exit $ac_status); }; } &&
9026 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9027 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9028 (eval $ac_try) 2>&5
9029 ac_status=$?
c0d27fcc 9030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9031 (exit $ac_status); }; }; then
9032 ac_cv_func_malloc_set_state=yes
9033else
9034 echo "$as_me: failed program was:" >&5
19650fd6
AS
9035sed 's/^/| /' conftest.$ac_ext >&5
9036
98418dba
CW
9037ac_cv_func_malloc_set_state=no
9038fi
edfaf76d
LK
9039rm -f conftest.err conftest.$ac_objext \
9040 conftest$ac_exeext conftest.$ac_ext
98418dba 9041fi
c0d27fcc 9042echo "$as_me:$LINENO: result: $ac_cv_func_malloc_set_state" >&5
98418dba
CW
9043echo "${ECHO_T}$ac_cv_func_malloc_set_state" >&6
9044if test $ac_cv_func_malloc_set_state = yes; then
9045 :
9046else
9047 doug_lea_malloc=no
9048fi
9049
c0d27fcc 9050echo "$as_me:$LINENO: checking whether __after_morecore_hook exists" >&5
98418dba
CW
9051echo $ECHO_N "checking whether __after_morecore_hook exists... $ECHO_C" >&6
9052if test "${emacs_cv_var___after_morecore_hook+set}" = set; then
9053 echo $ECHO_N "(cached) $ECHO_C" >&6
9054else
9055 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9056/* confdefs.h. */
9057_ACEOF
9058cat confdefs.h >>conftest.$ac_ext
9059cat >>conftest.$ac_ext <<_ACEOF
9060/* end confdefs.h. */
98418dba 9061extern void (* __after_morecore_hook)();
98418dba
CW
9062int
9063main ()
9064{
9065__after_morecore_hook = 0
9066 ;
9067 return 0;
9068}
9069_ACEOF
9070rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9071if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 9072 (eval $ac_link) 2>conftest.er1
98418dba 9073 ac_status=$?
edfaf76d
LK
9074 grep -v '^ *+' conftest.er1 >conftest.err
9075 rm -f conftest.er1
9076 cat conftest.err >&5
c0d27fcc 9077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9078 (exit $ac_status); } &&
e143ad11
AS
9079 { ac_try='test -z "$ac_c_werror_flag"
9080 || test ! -s conftest.err'
edfaf76d
LK
9081 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9082 (eval $ac_try) 2>&5
9083 ac_status=$?
9084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9085 (exit $ac_status); }; } &&
9086 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9087 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9088 (eval $ac_try) 2>&5
9089 ac_status=$?
c0d27fcc 9090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9091 (exit $ac_status); }; }; then
9092 emacs_cv_var___after_morecore_hook=yes
9093else
9094 echo "$as_me: failed program was:" >&5
19650fd6
AS
9095sed 's/^/| /' conftest.$ac_ext >&5
9096
98418dba
CW
9097emacs_cv_var___after_morecore_hook=no
9098fi
edfaf76d
LK
9099rm -f conftest.err conftest.$ac_objext \
9100 conftest$ac_exeext conftest.$ac_ext
98418dba 9101fi
c0d27fcc 9102echo "$as_me:$LINENO: result: $emacs_cv_var___after_morecore_hook" >&5
98418dba
CW
9103echo "${ECHO_T}$emacs_cv_var___after_morecore_hook" >&6
9104if test $emacs_cv_var___after_morecore_hook = no; then
9105 doug_lea_malloc=no
9106fi
9107if test "${system_malloc}" = "yes"; then
9108 GNU_MALLOC=no
9109 GNU_MALLOC_reason="
9110 (The GNU allocators don't work with this system configuration.)"
9111fi
9112if test "$doug_lea_malloc" = "yes" ; then
9113 if test "$GNU_MALLOC" = yes ; then
9114 GNU_MALLOC_reason="
9115 (Using Doug Lea's new malloc from the GNU C Library.)"
9116 fi
b936fae4 9117
c0d27fcc 9118cat >>confdefs.h <<\_ACEOF
98418dba 9119#define DOUG_LEA_MALLOC 1
c0d27fcc 9120_ACEOF
98418dba
CW
9121
9122fi
9123
9124if test x"${REL_ALLOC}" = x; then
9125 REL_ALLOC=${GNU_MALLOC}
9126fi
9127
9128
c0d27fcc
MR
9129
9130
9131for ac_header in stdlib.h unistd.h
98418dba
CW
9132do
9133as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
9134if eval "test \"\${$as_ac_Header+set}\" = set"; then
9135 echo "$as_me:$LINENO: checking for $ac_header" >&5
98418dba
CW
9136echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9137if eval "test \"\${$as_ac_Header+set}\" = set"; then
9138 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
9139fi
9140echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9141echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 9142else
c0d27fcc
MR
9143 # Is the header compilable?
9144echo "$as_me:$LINENO: checking $ac_header usability" >&5
9145echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
9146cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9147/* confdefs.h. */
9148_ACEOF
9149cat confdefs.h >>conftest.$ac_ext
9150cat >>conftest.$ac_ext <<_ACEOF
9151/* end confdefs.h. */
98418dba
CW
9152$ac_includes_default
9153#include <$ac_header>
9154_ACEOF
9155rm -f conftest.$ac_objext
c0d27fcc 9156if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 9157 (eval $ac_compile) 2>conftest.er1
98418dba 9158 ac_status=$?
edfaf76d
LK
9159 grep -v '^ *+' conftest.er1 >conftest.err
9160 rm -f conftest.er1
9161 cat conftest.err >&5
c0d27fcc 9162 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9163 (exit $ac_status); } &&
e143ad11
AS
9164 { ac_try='test -z "$ac_c_werror_flag"
9165 || test ! -s conftest.err'
edfaf76d
LK
9166 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9167 (eval $ac_try) 2>&5
9168 ac_status=$?
9169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9170 (exit $ac_status); }; } &&
9171 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 9172 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9173 (eval $ac_try) 2>&5
9174 ac_status=$?
c0d27fcc 9175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9176 (exit $ac_status); }; }; then
c0d27fcc 9177 ac_header_compiler=yes
98418dba
CW
9178else
9179 echo "$as_me: failed program was:" >&5
19650fd6
AS
9180sed 's/^/| /' conftest.$ac_ext >&5
9181
c0d27fcc 9182ac_header_compiler=no
98418dba 9183fi
edfaf76d 9184rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
9185echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9186echo "${ECHO_T}$ac_header_compiler" >&6
98418dba 9187
c0d27fcc
MR
9188# Is the header present?
9189echo "$as_me:$LINENO: checking $ac_header presence" >&5
9190echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9191cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9192/* confdefs.h. */
9193_ACEOF
9194cat confdefs.h >>conftest.$ac_ext
9195cat >>conftest.$ac_ext <<_ACEOF
9196/* end confdefs.h. */
98418dba
CW
9197#include <$ac_header>
9198_ACEOF
c0d27fcc 9199if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
9200 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9201 ac_status=$?
6bae0ccf 9202 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
9203 rm -f conftest.er1
9204 cat conftest.err >&5
c0d27fcc 9205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9206 (exit $ac_status); } >/dev/null; then
9207 if test -s conftest.err; then
9208 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 9209 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
9210 else
9211 ac_cpp_err=
9212 fi
9213else
9214 ac_cpp_err=yes
9215fi
9216if test -z "$ac_cpp_err"; then
c0d27fcc 9217 ac_header_preproc=yes
98418dba
CW
9218else
9219 echo "$as_me: failed program was:" >&5
19650fd6
AS
9220sed 's/^/| /' conftest.$ac_ext >&5
9221
c0d27fcc 9222 ac_header_preproc=no
98418dba
CW
9223fi
9224rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
9225echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9226echo "${ECHO_T}$ac_header_preproc" >&6
9227
9228# So? What about this header?
edfaf76d
LK
9229case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9230 yes:no: )
c0d27fcc
MR
9231 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9232echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
9233 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9234echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9235 ac_header_preproc=yes
9236 ;;
9237 no:yes:* )
9238 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9239echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9240 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
9241echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
9242 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9243echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9244 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
9245echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
7c9e5167
JD
9246 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9247echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
9248 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9249echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
7c9e5167
JD
9250 (
9251 cat <<\_ASBOX
edfaf76d
LK
9252## ------------------------------------------ ##
9253## Report this to the AC_PACKAGE_NAME lists. ##
9254## ------------------------------------------ ##
19650fd6
AS
9255_ASBOX
9256 ) |
9257 sed "s/^/$as_me: WARNING: /" >&2
9258 ;;
c0d27fcc
MR
9259esac
9260echo "$as_me:$LINENO: checking for $ac_header" >&5
9261echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9262if eval "test \"\${$as_ac_Header+set}\" = set"; then
9263 echo $ECHO_N "(cached) $ECHO_C" >&6
9264else
edfaf76d 9265 eval "$as_ac_Header=\$ac_header_preproc"
98418dba 9266fi
c0d27fcc 9267echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 9268echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
9269
9270fi
98418dba 9271if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 9272 cat >>confdefs.h <<_ACEOF
98418dba 9273#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 9274_ACEOF
98418dba
CW
9275
9276fi
c0d27fcc 9277
98418dba
CW
9278done
9279
c0d27fcc 9280
98418dba
CW
9281for ac_func in getpagesize
9282do
9283as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 9284echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
9285echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9286if eval "test \"\${$as_ac_var+set}\" = set"; then
9287 echo $ECHO_N "(cached) $ECHO_C" >&6
9288else
9289 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9290/* confdefs.h. */
9291_ACEOF
9292cat confdefs.h >>conftest.$ac_ext
9293cat >>conftest.$ac_ext <<_ACEOF
9294/* end confdefs.h. */
edfaf76d
LK
9295/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9296 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9297#define $ac_func innocuous_$ac_func
9298
98418dba 9299/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
9300 which can conflict with char $ac_func (); below.
9301 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9302 <limits.h> exists even on freestanding compilers. */
edfaf76d 9303
19650fd6
AS
9304#ifdef __STDC__
9305# include <limits.h>
9306#else
9307# include <assert.h>
9308#endif
edfaf76d
LK
9309
9310#undef $ac_func
9311
98418dba
CW
9312/* Override any gcc2 internal prototype to avoid an error. */
9313#ifdef __cplusplus
9314extern "C"
19650fd6 9315{
98418dba
CW
9316#endif
9317/* We use char because int might match the return type of a gcc2
9318 builtin and then its argument prototype would still apply. */
9319char $ac_func ();
98418dba
CW
9320/* The GNU C library defines this for functions which it implements
9321 to always fail with ENOSYS. Some functions are actually named
9322 something starting with __ and the normal name is an alias. */
9323#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9324choke me
9325#else
19650fd6
AS
9326char (*f) () = $ac_func;
9327#endif
9328#ifdef __cplusplus
9329}
98418dba
CW
9330#endif
9331
19650fd6
AS
9332int
9333main ()
9334{
9335return f != $ac_func;
98418dba
CW
9336 ;
9337 return 0;
9338}
9339_ACEOF
9340rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9341if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 9342 (eval $ac_link) 2>conftest.er1
98418dba 9343 ac_status=$?
edfaf76d
LK
9344 grep -v '^ *+' conftest.er1 >conftest.err
9345 rm -f conftest.er1
9346 cat conftest.err >&5
c0d27fcc 9347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9348 (exit $ac_status); } &&
e143ad11
AS
9349 { ac_try='test -z "$ac_c_werror_flag"
9350 || test ! -s conftest.err'
edfaf76d
LK
9351 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9352 (eval $ac_try) 2>&5
9353 ac_status=$?
9354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9355 (exit $ac_status); }; } &&
9356 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9357 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9358 (eval $ac_try) 2>&5
9359 ac_status=$?
c0d27fcc 9360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9361 (exit $ac_status); }; }; then
9362 eval "$as_ac_var=yes"
9363else
9364 echo "$as_me: failed program was:" >&5
19650fd6
AS
9365sed 's/^/| /' conftest.$ac_ext >&5
9366
98418dba
CW
9367eval "$as_ac_var=no"
9368fi
edfaf76d
LK
9369rm -f conftest.err conftest.$ac_objext \
9370 conftest$ac_exeext conftest.$ac_ext
98418dba 9371fi
c0d27fcc 9372echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
9373echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9374if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 9375 cat >>confdefs.h <<_ACEOF
98418dba 9376#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 9377_ACEOF
98418dba
CW
9378
9379fi
9380done
9381
c0d27fcc 9382echo "$as_me:$LINENO: checking for working mmap" >&5
98418dba
CW
9383echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
9384if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
9385 echo $ECHO_N "(cached) $ECHO_C" >&6
9386else
9387 if test "$cross_compiling" = yes; then
9388 ac_cv_func_mmap_fixed_mapped=no
9389else
9390 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9391/* confdefs.h. */
9392_ACEOF
9393cat confdefs.h >>conftest.$ac_ext
9394cat >>conftest.$ac_ext <<_ACEOF
9395/* end confdefs.h. */
98418dba 9396$ac_includes_default
c0d27fcc
MR
9397/* malloc might have been renamed as rpl_malloc. */
9398#undef malloc
9399
98418dba
CW
9400/* Thanks to Mike Haertel and Jim Avera for this test.
9401 Here is a matrix of mmap possibilities:
9402 mmap private not fixed
9403 mmap private fixed at somewhere currently unmapped
9404 mmap private fixed at somewhere already mapped
9405 mmap shared not fixed
9406 mmap shared fixed at somewhere currently unmapped
9407 mmap shared fixed at somewhere already mapped
9408 For private mappings, we should verify that changes cannot be read()
9409 back from the file, nor mmap's back from the file at a different
9410 address. (There have been systems where private was not correctly
9411 implemented like the infamous i386 svr4.0, and systems where the
9412 VM page cache was not coherent with the file system buffer cache
9413 like early versions of FreeBSD and possibly contemporary NetBSD.)
9414 For shared mappings, we should conversely verify that changes get
c0d27fcc 9415 propagated back to all the places they're supposed to be.
98418dba
CW
9416
9417 Grep wants private fixed already mapped.
9418 The main things grep needs to know about mmap are:
9419 * does it exist and is it safe to write into the mmap'd area
9420 * how to use it (BSD variants) */
9421
9422#include <fcntl.h>
9423#include <sys/mman.h>
9424
9425#if !STDC_HEADERS && !HAVE_STDLIB_H
9426char *malloc ();
9427#endif
9428
9429/* This mess was copied from the GNU getpagesize.h. */
9430#if !HAVE_GETPAGESIZE
9431/* Assume that all systems that can run configure have sys/param.h. */
9432# if !HAVE_SYS_PARAM_H
9433# define HAVE_SYS_PARAM_H 1
9434# endif
9435
9436# ifdef _SC_PAGESIZE
9437# define getpagesize() sysconf(_SC_PAGESIZE)
9438# else /* no _SC_PAGESIZE */
9439# if HAVE_SYS_PARAM_H
9440# include <sys/param.h>
9441# ifdef EXEC_PAGESIZE
9442# define getpagesize() EXEC_PAGESIZE
9443# else /* no EXEC_PAGESIZE */
9444# ifdef NBPG
9445# define getpagesize() NBPG * CLSIZE
9446# ifndef CLSIZE
9447# define CLSIZE 1
9448# endif /* no CLSIZE */
9449# else /* no NBPG */
9450# ifdef NBPC
9451# define getpagesize() NBPC
9452# else /* no NBPC */
9453# ifdef PAGESIZE
9454# define getpagesize() PAGESIZE
9455# endif /* PAGESIZE */
9456# endif /* no NBPC */
9457# endif /* no NBPG */
9458# endif /* no EXEC_PAGESIZE */
9459# else /* no HAVE_SYS_PARAM_H */
9460# define getpagesize() 8192 /* punt totally */
9461# endif /* no HAVE_SYS_PARAM_H */
9462# endif /* no _SC_PAGESIZE */
9463
9464#endif /* no HAVE_GETPAGESIZE */
9465
9466int
9467main ()
9468{
9469 char *data, *data2, *data3;
9470 int i, pagesize;
9471 int fd;
9472
9473 pagesize = getpagesize ();
9474
9475 /* First, make a file with some known garbage in it. */
9476 data = (char *) malloc (pagesize);
9477 if (!data)
9478 exit (1);
9479 for (i = 0; i < pagesize; ++i)
9480 *(data + i) = rand ();
9481 umask (0);
9482 fd = creat ("conftest.mmap", 0600);
9483 if (fd < 0)
9484 exit (1);
9485 if (write (fd, data, pagesize) != pagesize)
9486 exit (1);
9487 close (fd);
9488
9489 /* Next, try to mmap the file at a fixed address which already has
9490 something else allocated at it. If we can, also make sure that
9491 we see the same garbage. */
9492 fd = open ("conftest.mmap", O_RDWR);
9493 if (fd < 0)
9494 exit (1);
9495 data2 = (char *) malloc (2 * pagesize);
9496 if (!data2)
9497 exit (1);
edfaf76d 9498 data2 += (pagesize - ((long) data2 & (pagesize - 1))) & (pagesize - 1);
98418dba 9499 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
edfaf76d 9500 MAP_PRIVATE | MAP_FIXED, fd, 0L))
98418dba
CW
9501 exit (1);
9502 for (i = 0; i < pagesize; ++i)
9503 if (*(data + i) != *(data2 + i))
9504 exit (1);
9505
9506 /* Finally, make sure that changes to the mapped area do not
9507 percolate back to the file as seen by read(). (This is a bug on
9508 some variants of i386 svr4.0.) */
9509 for (i = 0; i < pagesize; ++i)
9510 *(data2 + i) = *(data2 + i) + 1;
9511 data3 = (char *) malloc (pagesize);
9512 if (!data3)
9513 exit (1);
9514 if (read (fd, data3, pagesize) != pagesize)
9515 exit (1);
9516 for (i = 0; i < pagesize; ++i)
9517 if (*(data + i) != *(data3 + i))
9518 exit (1);
9519 close (fd);
9520 exit (0);
9521}
9522_ACEOF
9523rm -f conftest$ac_exeext
c0d27fcc 9524if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
9525 (eval $ac_link) 2>&5
9526 ac_status=$?
c0d27fcc 9527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9528 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 9529 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9530 (eval $ac_try) 2>&5
9531 ac_status=$?
c0d27fcc 9532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9533 (exit $ac_status); }; }; then
9534 ac_cv_func_mmap_fixed_mapped=yes
9535else
9536 echo "$as_me: program exited with status $ac_status" >&5
9537echo "$as_me: failed program was:" >&5
19650fd6
AS
9538sed 's/^/| /' conftest.$ac_ext >&5
9539
c0d27fcc 9540( exit $ac_status )
98418dba
CW
9541ac_cv_func_mmap_fixed_mapped=no
9542fi
edfaf76d 9543rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
98418dba
CW
9544fi
9545fi
c0d27fcc 9546echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
98418dba
CW
9547echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
9548if test $ac_cv_func_mmap_fixed_mapped = yes; then
9549
c0d27fcc 9550cat >>confdefs.h <<\_ACEOF
98418dba 9551#define HAVE_MMAP 1
c0d27fcc 9552_ACEOF
98418dba
CW
9553
9554fi
9555rm -f conftest.mmap
9556
9557if test $use_mmap_for_buffers = yes; then
9558 REL_ALLOC=no
9559fi
9560
9561LIBS="$libsrc_libs $LIBS"
9562
c0d27fcc
MR
9563
9564echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
98418dba
CW
9565echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
9566if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
9567 echo $ECHO_N "(cached) $ECHO_C" >&6
9568else
9569 ac_check_lib_save_LIBS=$LIBS
9570LIBS="-ldnet $LIBS"
9571cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9572/* confdefs.h. */
9573_ACEOF
9574cat confdefs.h >>conftest.$ac_ext
9575cat >>conftest.$ac_ext <<_ACEOF
9576/* end confdefs.h. */
98418dba
CW
9577
9578/* Override any gcc2 internal prototype to avoid an error. */
9579#ifdef __cplusplus
9580extern "C"
9581#endif
9582/* We use char because int might match the return type of a gcc2
9583 builtin and then its argument prototype would still apply. */
9584char dnet_ntoa ();
98418dba
CW
9585int
9586main ()
9587{
9588dnet_ntoa ();
9589 ;
9590 return 0;
9591}
9592_ACEOF
9593rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9594if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 9595 (eval $ac_link) 2>conftest.er1
98418dba 9596 ac_status=$?
edfaf76d
LK
9597 grep -v '^ *+' conftest.er1 >conftest.err
9598 rm -f conftest.er1
9599 cat conftest.err >&5
c0d27fcc 9600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9601 (exit $ac_status); } &&
e143ad11
AS
9602 { ac_try='test -z "$ac_c_werror_flag"
9603 || test ! -s conftest.err'
edfaf76d
LK
9604 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9605 (eval $ac_try) 2>&5
9606 ac_status=$?
9607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9608 (exit $ac_status); }; } &&
9609 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9610 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9611 (eval $ac_try) 2>&5
9612 ac_status=$?
c0d27fcc 9613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9614 (exit $ac_status); }; }; then
9615 ac_cv_lib_dnet_dnet_ntoa=yes
9616else
9617 echo "$as_me: failed program was:" >&5
19650fd6
AS
9618sed 's/^/| /' conftest.$ac_ext >&5
9619
98418dba
CW
9620ac_cv_lib_dnet_dnet_ntoa=no
9621fi
edfaf76d
LK
9622rm -f conftest.err conftest.$ac_objext \
9623 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9624LIBS=$ac_check_lib_save_LIBS
9625fi
c0d27fcc 9626echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
98418dba
CW
9627echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
9628if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
c0d27fcc 9629 cat >>confdefs.h <<_ACEOF
98418dba 9630#define HAVE_LIBDNET 1
c0d27fcc 9631_ACEOF
98418dba
CW
9632
9633 LIBS="-ldnet $LIBS"
9634
9635fi
9636
c0d27fcc
MR
9637
9638echo "$as_me:$LINENO: checking for main in -lXbsd" >&5
98418dba
CW
9639echo $ECHO_N "checking for main in -lXbsd... $ECHO_C" >&6
9640if test "${ac_cv_lib_Xbsd_main+set}" = set; then
9641 echo $ECHO_N "(cached) $ECHO_C" >&6
9642else
9643 ac_check_lib_save_LIBS=$LIBS
9644LIBS="-lXbsd $LIBS"
9645cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9646/* confdefs.h. */
9647_ACEOF
9648cat confdefs.h >>conftest.$ac_ext
9649cat >>conftest.$ac_ext <<_ACEOF
9650/* end confdefs.h. */
98418dba 9651
c0d27fcc 9652
98418dba
CW
9653int
9654main ()
9655{
9656main ();
9657 ;
9658 return 0;
9659}
9660_ACEOF
9661rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9662if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 9663 (eval $ac_link) 2>conftest.er1
98418dba 9664 ac_status=$?
edfaf76d
LK
9665 grep -v '^ *+' conftest.er1 >conftest.err
9666 rm -f conftest.er1
9667 cat conftest.err >&5
c0d27fcc 9668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9669 (exit $ac_status); } &&
e143ad11
AS
9670 { ac_try='test -z "$ac_c_werror_flag"
9671 || test ! -s conftest.err'
edfaf76d
LK
9672 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9673 (eval $ac_try) 2>&5
9674 ac_status=$?
9675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9676 (exit $ac_status); }; } &&
9677 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9678 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9679 (eval $ac_try) 2>&5
9680 ac_status=$?
c0d27fcc 9681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9682 (exit $ac_status); }; }; then
9683 ac_cv_lib_Xbsd_main=yes
9684else
9685 echo "$as_me: failed program was:" >&5
19650fd6
AS
9686sed 's/^/| /' conftest.$ac_ext >&5
9687
98418dba
CW
9688ac_cv_lib_Xbsd_main=no
9689fi
edfaf76d
LK
9690rm -f conftest.err conftest.$ac_objext \
9691 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9692LIBS=$ac_check_lib_save_LIBS
9693fi
c0d27fcc 9694echo "$as_me:$LINENO: result: $ac_cv_lib_Xbsd_main" >&5
98418dba
CW
9695echo "${ECHO_T}$ac_cv_lib_Xbsd_main" >&6
9696if test $ac_cv_lib_Xbsd_main = yes; then
9697 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
9698fi
9699
c0d27fcc
MR
9700
9701
9702echo "$as_me:$LINENO: checking for cma_open in -lpthreads" >&5
98418dba
CW
9703echo $ECHO_N "checking for cma_open in -lpthreads... $ECHO_C" >&6
9704if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then
9705 echo $ECHO_N "(cached) $ECHO_C" >&6
9706else
9707 ac_check_lib_save_LIBS=$LIBS
9708LIBS="-lpthreads $LIBS"
9709cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9710/* confdefs.h. */
9711_ACEOF
9712cat confdefs.h >>conftest.$ac_ext
9713cat >>conftest.$ac_ext <<_ACEOF
9714/* end confdefs.h. */
98418dba
CW
9715
9716/* Override any gcc2 internal prototype to avoid an error. */
9717#ifdef __cplusplus
9718extern "C"
9719#endif
9720/* We use char because int might match the return type of a gcc2
9721 builtin and then its argument prototype would still apply. */
9722char cma_open ();
98418dba
CW
9723int
9724main ()
9725{
9726cma_open ();
9727 ;
9728 return 0;
9729}
9730_ACEOF
9731rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9732if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 9733 (eval $ac_link) 2>conftest.er1
98418dba 9734 ac_status=$?
edfaf76d
LK
9735 grep -v '^ *+' conftest.er1 >conftest.err
9736 rm -f conftest.er1
9737 cat conftest.err >&5
c0d27fcc 9738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9739 (exit $ac_status); } &&
e143ad11
AS
9740 { ac_try='test -z "$ac_c_werror_flag"
9741 || test ! -s conftest.err'
edfaf76d
LK
9742 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9743 (eval $ac_try) 2>&5
9744 ac_status=$?
9745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9746 (exit $ac_status); }; } &&
9747 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9748 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9749 (eval $ac_try) 2>&5
9750 ac_status=$?
c0d27fcc 9751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9752 (exit $ac_status); }; }; then
9753 ac_cv_lib_pthreads_cma_open=yes
9754else
9755 echo "$as_me: failed program was:" >&5
19650fd6
AS
9756sed 's/^/| /' conftest.$ac_ext >&5
9757
98418dba
CW
9758ac_cv_lib_pthreads_cma_open=no
9759fi
edfaf76d
LK
9760rm -f conftest.err conftest.$ac_objext \
9761 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9762LIBS=$ac_check_lib_save_LIBS
9763fi
c0d27fcc 9764echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_cma_open" >&5
98418dba
CW
9765echo "${ECHO_T}$ac_cv_lib_pthreads_cma_open" >&6
9766if test $ac_cv_lib_pthreads_cma_open = yes; then
c0d27fcc 9767 cat >>confdefs.h <<_ACEOF
98418dba 9768#define HAVE_LIBPTHREADS 1
c0d27fcc 9769_ACEOF
98418dba
CW
9770
9771 LIBS="-lpthreads $LIBS"
9772
9773fi
9774
c0d27fcc
MR
9775
9776echo "$as_me:$LINENO: checking for XFree86 in /usr/X386" >&5
98418dba
CW
9777echo $ECHO_N "checking for XFree86 in /usr/X386... $ECHO_C" >&6
9778if test -d /usr/X386/include; then
9779 HAVE_XFREE386=yes
9780 : ${C_SWITCH_X_SITE="-I/usr/X386/include"}
9781else
9782 HAVE_XFREE386=no
9783fi
c0d27fcc 9784echo "$as_me:$LINENO: result: $HAVE_XFREE386" >&5
98418dba
CW
9785echo "${ECHO_T}$HAVE_XFREE386" >&6
9786
55597d70
DL
9787
9788case ${host_os} in
9789aix*)
9790 echo "$as_me:$LINENO: checking for -bbigtoc option" >&5
9791echo $ECHO_N "checking for -bbigtoc option... $ECHO_C" >&6
9792if test "${gdb_cv_bigtoc+set}" = set; then
9793 echo $ECHO_N "(cached) $ECHO_C" >&6
9794else
9795
9796 case $GCC in
9797 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
9798 *) gdb_cv_bigtoc=-bbigtoc ;;
9799 esac
9800
9801 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
9802 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9803/* confdefs.h. */
9804_ACEOF
9805cat confdefs.h >>conftest.$ac_ext
9806cat >>conftest.$ac_ext <<_ACEOF
9807/* end confdefs.h. */
55597d70
DL
9808
9809int
9810main ()
9811{
9812int i;
9813 ;
9814 return 0;
9815}
9816_ACEOF
9817rm -f conftest.$ac_objext conftest$ac_exeext
9818if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 9819 (eval $ac_link) 2>conftest.er1
55597d70 9820 ac_status=$?
edfaf76d
LK
9821 grep -v '^ *+' conftest.er1 >conftest.err
9822 rm -f conftest.er1
9823 cat conftest.err >&5
55597d70
DL
9824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9825 (exit $ac_status); } &&
e143ad11
AS
9826 { ac_try='test -z "$ac_c_werror_flag"
9827 || test ! -s conftest.err'
edfaf76d
LK
9828 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9829 (eval $ac_try) 2>&5
9830 ac_status=$?
9831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9832 (exit $ac_status); }; } &&
9833 { ac_try='test -s conftest$ac_exeext'
55597d70
DL
9834 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9835 (eval $ac_try) 2>&5
9836 ac_status=$?
9837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9838 (exit $ac_status); }; }; then
9839 :
9840else
9841 echo "$as_me: failed program was:" >&5
19650fd6
AS
9842sed 's/^/| /' conftest.$ac_ext >&5
9843
55597d70
DL
9844gdb_cv_bigtoc=
9845fi
edfaf76d
LK
9846rm -f conftest.err conftest.$ac_objext \
9847 conftest$ac_exeext conftest.$ac_ext
55597d70
DL
9848
9849fi
9850echo "$as_me:$LINENO: result: $gdb_cv_bigtoc" >&5
9851echo "${ECHO_T}$gdb_cv_bigtoc" >&6
9852 ;;
9853esac
9854
ae1a998c
RS
9855# Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets
9856# used for the tests that follow. We set them back to REAL_CFLAGS and
9857# REAL_CPPFLAGS later on.
98418dba
CW
9858
9859REAL_CPPFLAGS="$CPPFLAGS"
9860
9861if test "${HAVE_X11}" = "yes"; then
9862 DEFS="$C_SWITCH_X_SITE $DEFS"
9863 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
9864 LIBS="$LIBX $LIBS"
9865 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
9866 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
9867
9868 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
9869 # This is handled by LD_SWITCH_X_SITE_AUX during the real build,
9870 # but it's more convenient here to set LD_RUN_PATH
9871 # since this also works on hosts that don't understand LD_SWITCH_X_SITE_AUX.
9872 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
9873 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
9874 export LD_RUN_PATH
9875 fi
9876
9877 if test "${opsys}" = "gnu-linux"; then
c0d27fcc 9878 echo "$as_me:$LINENO: checking whether X on GNU/Linux needs -b to link" >&5
98418dba
CW
9879echo $ECHO_N "checking whether X on GNU/Linux needs -b to link... $ECHO_C" >&6
9880 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9881/* confdefs.h. */
9882_ACEOF
9883cat confdefs.h >>conftest.$ac_ext
9884cat >>conftest.$ac_ext <<_ACEOF
9885/* end confdefs.h. */
98418dba 9886
98418dba
CW
9887int
9888main ()
9889{
9890XOpenDisplay ("foo");
9891 ;
9892 return 0;
9893}
9894_ACEOF
9895rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9896if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 9897 (eval $ac_link) 2>conftest.er1
98418dba 9898 ac_status=$?
edfaf76d
LK
9899 grep -v '^ *+' conftest.er1 >conftest.err
9900 rm -f conftest.er1
9901 cat conftest.err >&5
c0d27fcc 9902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9903 (exit $ac_status); } &&
e143ad11
AS
9904 { ac_try='test -z "$ac_c_werror_flag"
9905 || test ! -s conftest.err'
edfaf76d
LK
9906 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9907 (eval $ac_try) 2>&5
9908 ac_status=$?
9909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9910 (exit $ac_status); }; } &&
9911 { ac_try='test -s conftest$ac_exeext'
35996d22
AS
9912 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9913 (eval $ac_try) 2>&5
9914 ac_status=$?
9915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9916 (exit $ac_status); }; }; then
9917 xlinux_first_failure=no
98418dba
CW
9918else
9919 echo "$as_me: failed program was:" >&5
19650fd6
AS
9920sed 's/^/| /' conftest.$ac_ext >&5
9921
98418dba
CW
9922xlinux_first_failure=yes
9923fi
edfaf76d
LK
9924rm -f conftest.err conftest.$ac_objext \
9925 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9926 if test "${xlinux_first_failure}" = "yes"; then
9927 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
9928 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
9929 OLD_CPPFLAGS="$CPPFLAGS"
9930 OLD_LIBS="$LIBS"
9931 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
9932 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
9933 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
9934 LIBS="$LIBS -b i486-linuxaout"
9935 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9936/* confdefs.h. */
9937_ACEOF
9938cat confdefs.h >>conftest.$ac_ext
9939cat >>conftest.$ac_ext <<_ACEOF
9940/* end confdefs.h. */
98418dba 9941
98418dba
CW
9942int
9943main ()
9944{
9945XOpenDisplay ("foo");
9946 ;
9947 return 0;
9948}
9949_ACEOF
9950rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9951if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 9952 (eval $ac_link) 2>conftest.er1
98418dba 9953 ac_status=$?
edfaf76d
LK
9954 grep -v '^ *+' conftest.er1 >conftest.err
9955 rm -f conftest.er1
9956 cat conftest.err >&5
c0d27fcc 9957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9958 (exit $ac_status); } &&
e143ad11
AS
9959 { ac_try='test -z "$ac_c_werror_flag"
9960 || test ! -s conftest.err'
edfaf76d
LK
9961 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9962 (eval $ac_try) 2>&5
9963 ac_status=$?
9964 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9965 (exit $ac_status); }; } &&
9966 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9967 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9968 (eval $ac_try) 2>&5
9969 ac_status=$?
c0d27fcc 9970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9971 (exit $ac_status); }; }; then
9972 xlinux_second_failure=no
9973else
9974 echo "$as_me: failed program was:" >&5
19650fd6
AS
9975sed 's/^/| /' conftest.$ac_ext >&5
9976
98418dba
CW
9977xlinux_second_failure=yes
9978fi
edfaf76d
LK
9979rm -f conftest.err conftest.$ac_objext \
9980 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9981 if test "${xlinux_second_failure}" = "yes"; then
9982 # If we get the same failure with -b, there is no use adding -b.
9983 # So take it out. This plays safe.
9984 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
9985 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
9986 CPPFLAGS="$OLD_CPPFLAGS"
9987 LIBS="$OLD_LIBS"
c0d27fcc 9988 echo "$as_me:$LINENO: result: no" >&5
98418dba
CW
9989echo "${ECHO_T}no" >&6
9990 else
c0d27fcc 9991 echo "$as_me:$LINENO: result: yes" >&5
98418dba
CW
9992echo "${ECHO_T}yes" >&6
9993 fi
9994 else
c0d27fcc 9995 echo "$as_me:$LINENO: result: no" >&5
98418dba
CW
9996echo "${ECHO_T}no" >&6
9997 fi
9998 fi
9999
10000 # Reportedly, some broken Solaris systems have XKBlib.h but are missing
10001 # header files included from there.
c0d27fcc 10002 echo "$as_me:$LINENO: checking for Xkb" >&5
98418dba
CW
10003echo $ECHO_N "checking for Xkb... $ECHO_C" >&6
10004 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10005/* confdefs.h. */
10006_ACEOF
10007cat confdefs.h >>conftest.$ac_ext
10008cat >>conftest.$ac_ext <<_ACEOF
10009/* end confdefs.h. */
98418dba
CW
10010#include <X11/Xlib.h>
10011#include <X11/XKBlib.h>
98418dba
CW
10012int
10013main ()
10014{
10015XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);
10016 ;
10017 return 0;
10018}
10019_ACEOF
10020rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10021if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 10022 (eval $ac_link) 2>conftest.er1
98418dba 10023 ac_status=$?
edfaf76d
LK
10024 grep -v '^ *+' conftest.er1 >conftest.err
10025 rm -f conftest.er1
10026 cat conftest.err >&5
c0d27fcc 10027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10028 (exit $ac_status); } &&
e143ad11
AS
10029 { ac_try='test -z "$ac_c_werror_flag"
10030 || test ! -s conftest.err'
edfaf76d
LK
10031 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10032 (eval $ac_try) 2>&5
10033 ac_status=$?
10034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10035 (exit $ac_status); }; } &&
10036 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10037 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
10038 (eval $ac_try) 2>&5
10039 ac_status=$?
c0d27fcc 10040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10041 (exit $ac_status); }; }; then
10042 emacs_xkb=yes
10043else
10044 echo "$as_me: failed program was:" >&5
19650fd6
AS
10045sed 's/^/| /' conftest.$ac_ext >&5
10046
98418dba
CW
10047emacs_xkb=no
10048fi
edfaf76d
LK
10049rm -f conftest.err conftest.$ac_objext \
10050 conftest$ac_exeext conftest.$ac_ext
c0d27fcc 10051 echo "$as_me:$LINENO: result: $emacs_xkb" >&5
98418dba
CW
10052echo "${ECHO_T}$emacs_xkb" >&6
10053 if test $emacs_xkb = yes; then
b936fae4 10054
c0d27fcc 10055cat >>confdefs.h <<\_ACEOF
98418dba 10056#define HAVE_XKBGETKEYBOARD 1
c0d27fcc 10057_ACEOF
98418dba
CW
10058
10059 fi
10060
c0d27fcc
MR
10061
10062
10063
10064
98418dba
CW
10065for ac_func in XrmSetDatabase XScreenResourceString \
10066XScreenNumberOfScreen XSetWMProtocols
10067do
10068as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 10069echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
10070echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10071if eval "test \"\${$as_ac_var+set}\" = set"; then
10072 echo $ECHO_N "(cached) $ECHO_C" >&6
10073else
10074 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10075/* confdefs.h. */
10076_ACEOF
10077cat confdefs.h >>conftest.$ac_ext
10078cat >>conftest.$ac_ext <<_ACEOF
10079/* end confdefs.h. */
edfaf76d
LK
10080/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10081 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10082#define $ac_func innocuous_$ac_func
10083
98418dba 10084/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
10085 which can conflict with char $ac_func (); below.
10086 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10087 <limits.h> exists even on freestanding compilers. */
edfaf76d 10088
19650fd6
AS
10089#ifdef __STDC__
10090# include <limits.h>
10091#else
10092# include <assert.h>
10093#endif
edfaf76d
LK
10094
10095#undef $ac_func
10096
98418dba
CW
10097/* Override any gcc2 internal prototype to avoid an error. */
10098#ifdef __cplusplus
10099extern "C"
19650fd6 10100{
98418dba
CW
10101#endif
10102/* We use char because int might match the return type of a gcc2
10103 builtin and then its argument prototype would still apply. */
10104char $ac_func ();
98418dba
CW
10105/* The GNU C library defines this for functions which it implements
10106 to always fail with ENOSYS. Some functions are actually named
10107 something starting with __ and the normal name is an alias. */
10108#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10109choke me
10110#else
19650fd6
AS
10111char (*f) () = $ac_func;
10112#endif
10113#ifdef __cplusplus
10114}
98418dba
CW
10115#endif
10116
19650fd6
AS
10117int
10118main ()
10119{
10120return f != $ac_func;
98418dba
CW
10121 ;
10122 return 0;
10123}
10124_ACEOF
10125rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10126if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 10127 (eval $ac_link) 2>conftest.er1
98418dba 10128 ac_status=$?
edfaf76d
LK
10129 grep -v '^ *+' conftest.er1 >conftest.err
10130 rm -f conftest.er1
10131 cat conftest.err >&5
c0d27fcc 10132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10133 (exit $ac_status); } &&
e143ad11
AS
10134 { ac_try='test -z "$ac_c_werror_flag"
10135 || test ! -s conftest.err'
edfaf76d
LK
10136 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10137 (eval $ac_try) 2>&5
10138 ac_status=$?
10139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10140 (exit $ac_status); }; } &&
10141 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10142 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
10143 (eval $ac_try) 2>&5
10144 ac_status=$?
c0d27fcc 10145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10146 (exit $ac_status); }; }; then
10147 eval "$as_ac_var=yes"
10148else
10149 echo "$as_me: failed program was:" >&5
19650fd6
AS
10150sed 's/^/| /' conftest.$ac_ext >&5
10151
98418dba
CW
10152eval "$as_ac_var=no"
10153fi
edfaf76d
LK
10154rm -f conftest.err conftest.$ac_objext \
10155 conftest$ac_exeext conftest.$ac_ext
98418dba 10156fi
c0d27fcc 10157echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
10158echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10159if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 10160 cat >>confdefs.h <<_ACEOF
98418dba 10161#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 10162_ACEOF
98418dba
CW
10163
10164fi
10165done
10166
10167fi
10168
10169if test "${window_system}" = "x11"; then
c0d27fcc 10170 echo "$as_me:$LINENO: checking X11 version 6" >&5
98418dba
CW
10171echo $ECHO_N "checking X11 version 6... $ECHO_C" >&6
10172 if test "${emacs_cv_x11_version_6+set}" = set; then
10173 echo $ECHO_N "(cached) $ECHO_C" >&6
10174else
10175 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10176/* confdefs.h. */
10177_ACEOF
10178cat confdefs.h >>conftest.$ac_ext
10179cat >>conftest.$ac_ext <<_ACEOF
10180/* end confdefs.h. */
98418dba 10181#include <X11/Xlib.h>
98418dba
CW
10182int
10183main ()
10184{
10185#if XlibSpecificationRelease < 6
10186fail;
10187#endif
10188
10189 ;
10190 return 0;
10191}
10192_ACEOF
10193rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10194if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 10195 (eval $ac_link) 2>conftest.er1
98418dba 10196 ac_status=$?
edfaf76d
LK
10197 grep -v '^ *+' conftest.er1 >conftest.err
10198 rm -f conftest.er1
10199 cat conftest.err >&5
c0d27fcc 10200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10201 (exit $ac_status); } &&
e143ad11
AS
10202 { ac_try='test -z "$ac_c_werror_flag"
10203 || test ! -s conftest.err'
edfaf76d
LK
10204 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10205 (eval $ac_try) 2>&5
10206 ac_status=$?
10207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10208 (exit $ac_status); }; } &&
10209 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10210 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
10211 (eval $ac_try) 2>&5
10212 ac_status=$?
c0d27fcc 10213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10214 (exit $ac_status); }; }; then
10215 emacs_cv_x11_version_6=yes
10216else
10217 echo "$as_me: failed program was:" >&5
19650fd6
AS
10218sed 's/^/| /' conftest.$ac_ext >&5
10219
98418dba
CW
10220emacs_cv_x11_version_6=no
10221fi
edfaf76d
LK
10222rm -f conftest.err conftest.$ac_objext \
10223 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10224fi
10225
10226 if test $emacs_cv_x11_version_6 = yes; then
c0d27fcc 10227 echo "$as_me:$LINENO: result: 6 or newer" >&5
98418dba 10228echo "${ECHO_T}6 or newer" >&6
b936fae4 10229
c0d27fcc 10230cat >>confdefs.h <<\_ACEOF
98418dba 10231#define HAVE_X11R6 1
c0d27fcc 10232_ACEOF
98418dba
CW
10233
10234 else
c0d27fcc 10235 echo "$as_me:$LINENO: result: before 6" >&5
98418dba
CW
10236echo "${ECHO_T}before 6" >&6
10237 fi
10238fi
10239
10240if test "${window_system}" = "x11"; then
c0d27fcc 10241 echo "$as_me:$LINENO: checking X11 version 5" >&5
98418dba
CW
10242echo $ECHO_N "checking X11 version 5... $ECHO_C" >&6
10243 if test "${emacs_cv_x11_version_5+set}" = set; then
10244 echo $ECHO_N "(cached) $ECHO_C" >&6
10245else
10246 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10247/* confdefs.h. */
10248_ACEOF
10249cat confdefs.h >>conftest.$ac_ext
10250cat >>conftest.$ac_ext <<_ACEOF
10251/* end confdefs.h. */
98418dba 10252#include <X11/Xlib.h>
98418dba
CW
10253int
10254main ()
10255{
10256#if XlibSpecificationRelease < 5
10257fail;
10258#endif
10259
10260 ;
10261 return 0;
10262}
10263_ACEOF
10264rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10265if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 10266 (eval $ac_link) 2>conftest.er1
98418dba 10267 ac_status=$?
edfaf76d
LK
10268 grep -v '^ *+' conftest.er1 >conftest.err
10269 rm -f conftest.er1
10270 cat conftest.err >&5
c0d27fcc 10271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10272 (exit $ac_status); } &&
e143ad11
AS
10273 { ac_try='test -z "$ac_c_werror_flag"
10274 || test ! -s conftest.err'
edfaf76d
LK
10275 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10276 (eval $ac_try) 2>&5
10277 ac_status=$?
10278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10279 (exit $ac_status); }; } &&
10280 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10281 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
10282 (eval $ac_try) 2>&5
10283 ac_status=$?
c0d27fcc 10284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10285 (exit $ac_status); }; }; then
10286 emacs_cv_x11_version_5=yes
10287else
10288 echo "$as_me: failed program was:" >&5
19650fd6
AS
10289sed 's/^/| /' conftest.$ac_ext >&5
10290
98418dba
CW
10291emacs_cv_x11_version_5=no
10292fi
edfaf76d
LK
10293rm -f conftest.err conftest.$ac_objext \
10294 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10295fi
10296
10297 if test $emacs_cv_x11_version_5 = yes; then
c0d27fcc 10298 echo "$as_me:$LINENO: result: 5 or newer" >&5
98418dba
CW
10299echo "${ECHO_T}5 or newer" >&6
10300 HAVE_X11R5=yes
b936fae4 10301
c0d27fcc 10302cat >>confdefs.h <<\_ACEOF
98418dba 10303#define HAVE_X11R5 1
c0d27fcc 10304_ACEOF
98418dba
CW
10305
10306 else
10307 HAVE_X11R5=no
c0d27fcc 10308 echo "$as_me:$LINENO: result: before 5" >&5
98418dba
CW
10309echo "${ECHO_T}before 5" >&6
10310 fi
10311fi
10312
488dd4c4
JD
10313HAVE_GTK=no
10314if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "gtk"; then
cd890796 10315 if test "$USE_X_TOOLKIT" != "none" && test "$USE_X_TOOLKIT" != "maybe"; then
488dd4c4
JD
10316 { { echo "$as_me:$LINENO: error: Conflicting options, --with-gtk is incompatible with --with-x-toolkit=${with_x_toolkit}" >&5
10317echo "$as_me: error: Conflicting options, --with-gtk is incompatible with --with-x-toolkit=${with_x_toolkit}" >&2;}
10318 { (exit 1); exit 1; }; };
10319 fi
448541bc
JD
10320 GLIB_REQUIRED=2.4
10321 GTK_REQUIRED=2.4
488dd4c4
JD
10322 GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
10323
10324 if test "X${with_pkg_config_prog}" != X; then
10325 PKG_CONFIG="${with_pkg_config_prog}"
10326 fi
10327
10328 succeeded=no
10329
10330 if test -z "$PKG_CONFIG"; then
10331 # Extract the first word of "pkg-config", so it can be a program name with args.
10332set dummy pkg-config; ac_word=$2
10333echo "$as_me:$LINENO: checking for $ac_word" >&5
10334echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10335if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
10336 echo $ECHO_N "(cached) $ECHO_C" >&6
10337else
10338 case $PKG_CONFIG in
10339 [\\/]* | ?:[\\/]*)
10340 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10341 ;;
10342 *)
10343 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10344for as_dir in $PATH
10345do
10346 IFS=$as_save_IFS
10347 test -z "$as_dir" && as_dir=.
10348 for ac_exec_ext in '' $ac_executable_extensions; do
10349 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10350 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10351 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
10352 break 2
10353 fi
10354done
10355done
10356
10357 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
10358 ;;
10359esac
10360fi
10361PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10362
10363if test -n "$PKG_CONFIG"; then
10364 echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
10365echo "${ECHO_T}$PKG_CONFIG" >&6
10366else
10367 echo "$as_me:$LINENO: result: no" >&5
10368echo "${ECHO_T}no" >&6
10369fi
10370
10371 fi
10372
10373 if test "$PKG_CONFIG" = "no" ; then
439f58ee
JD
10374 { { echo "$as_me:$LINENO: error:
10375 *** 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
10376echo "$as_me: error:
10377 *** 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;}
10378 { (exit 1); exit 1; }; }
488dd4c4
JD
10379 else
10380 PKG_CONFIG_MIN_VERSION=0.9.0
10381 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
10382 echo "$as_me:$LINENO: checking for $GTK_MODULES" >&5
10383echo $ECHO_N "checking for $GTK_MODULES... $ECHO_C" >&6
10384
10385 if $PKG_CONFIG --exists "$GTK_MODULES" ; then
10386 echo "$as_me:$LINENO: result: yes" >&5
10387echo "${ECHO_T}yes" >&6
10388 succeeded=yes
10389
10390 echo "$as_me:$LINENO: checking GTK_CFLAGS" >&5
10391echo $ECHO_N "checking GTK_CFLAGS... $ECHO_C" >&6
10392 GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES"`
10393 echo "$as_me:$LINENO: result: $GTK_CFLAGS" >&5
10394echo "${ECHO_T}$GTK_CFLAGS" >&6
10395
10396 echo "$as_me:$LINENO: checking GTK_LIBS" >&5
10397echo $ECHO_N "checking GTK_LIBS... $ECHO_C" >&6
10398 GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES"`
10399 echo "$as_me:$LINENO: result: $GTK_LIBS" >&5
10400echo "${ECHO_T}$GTK_LIBS" >&6
10401 else
439f58ee
JD
10402 echo "$as_me:$LINENO: result: no" >&5
10403echo "${ECHO_T}no" >&6
488dd4c4
JD
10404 GTK_CFLAGS=""
10405 GTK_LIBS=""
10406 ## If we have a custom action on failure, don't print errors, but
10407 ## do set a variable so people can do so.
10408 GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"`
10409 echo $GTK_PKG_ERRORS
10410 fi
10411
10412
10413
10414 else
10415 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10416 echo "*** See http://www.freedesktop.org/software/pkgconfig"
10417 fi
10418 fi
10419
10420 if test $succeeded = yes; then
10421 :
10422 else
10423 { { 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
10424echo "$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;}
10425 { (exit 1); exit 1; }; }
10426 fi
10427
10428
10429
10430 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS"
57669b57
JD
10431 CFLAGS="$CFLAGS $GTK_CFLAGS"
10432 LIBS="$GTK_LIBS $LIBS"
488dd4c4
JD
10433 HAVE_GTK=yes
10434
10435cat >>confdefs.h <<\_ACEOF
10436#define HAVE_GTK 1
10437_ACEOF
10438
10439 USE_X_TOOLKIT=none
10440
d0a80c21
JD
10441 if test "$with_toolkit_scroll_bars" != no; then
10442 with_toolkit_scroll_bars=yes
10443 fi
57669b57
JD
10444
10445 HAVE_GTK_MULTIDISPLAY=no
10446
10447for ac_func in gdk_display_open
10448do
10449as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10450echo "$as_me:$LINENO: checking for $ac_func" >&5
10451echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10452if eval "test \"\${$as_ac_var+set}\" = set"; then
10453 echo $ECHO_N "(cached) $ECHO_C" >&6
10454else
10455 cat >conftest.$ac_ext <<_ACEOF
57669b57
JD
10456/* confdefs.h. */
10457_ACEOF
10458cat confdefs.h >>conftest.$ac_ext
10459cat >>conftest.$ac_ext <<_ACEOF
10460/* end confdefs.h. */
edfaf76d
LK
10461/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10462 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10463#define $ac_func innocuous_$ac_func
10464
57669b57
JD
10465/* System header to define __stub macros and hopefully few prototypes,
10466 which can conflict with char $ac_func (); below.
10467 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10468 <limits.h> exists even on freestanding compilers. */
edfaf76d 10469
57669b57
JD
10470#ifdef __STDC__
10471# include <limits.h>
10472#else
10473# include <assert.h>
10474#endif
edfaf76d
LK
10475
10476#undef $ac_func
10477
57669b57
JD
10478/* Override any gcc2 internal prototype to avoid an error. */
10479#ifdef __cplusplus
10480extern "C"
10481{
10482#endif
10483/* We use char because int might match the return type of a gcc2
10484 builtin and then its argument prototype would still apply. */
10485char $ac_func ();
10486/* The GNU C library defines this for functions which it implements
10487 to always fail with ENOSYS. Some functions are actually named
10488 something starting with __ and the normal name is an alias. */
10489#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10490choke me
10491#else
10492char (*f) () = $ac_func;
10493#endif
10494#ifdef __cplusplus
10495}
10496#endif
10497
10498int
10499main ()
10500{
10501return f != $ac_func;
10502 ;
10503 return 0;
10504}
10505_ACEOF
10506rm -f conftest.$ac_objext conftest$ac_exeext
10507if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 10508 (eval $ac_link) 2>conftest.er1
57669b57 10509 ac_status=$?
edfaf76d
LK
10510 grep -v '^ *+' conftest.er1 >conftest.err
10511 rm -f conftest.er1
10512 cat conftest.err >&5
57669b57
JD
10513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10514 (exit $ac_status); } &&
e143ad11
AS
10515 { ac_try='test -z "$ac_c_werror_flag"
10516 || test ! -s conftest.err'
edfaf76d
LK
10517 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10518 (eval $ac_try) 2>&5
10519 ac_status=$?
10520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10521 (exit $ac_status); }; } &&
10522 { ac_try='test -s conftest$ac_exeext'
57669b57
JD
10523 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10524 (eval $ac_try) 2>&5
10525 ac_status=$?
10526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10527 (exit $ac_status); }; }; then
10528 eval "$as_ac_var=yes"
10529else
10530 echo "$as_me: failed program was:" >&5
10531sed 's/^/| /' conftest.$ac_ext >&5
10532
10533eval "$as_ac_var=no"
10534fi
edfaf76d
LK
10535rm -f conftest.err conftest.$ac_objext \
10536 conftest$ac_exeext conftest.$ac_ext
57669b57
JD
10537fi
10538echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10539echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10540if test `eval echo '${'$as_ac_var'}'` = yes; then
10541 cat >>confdefs.h <<_ACEOF
10542#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10543_ACEOF
10544 HAVE_GTK_MULTIDISPLAY=yes
10545fi
10546done
10547
10548 if test "${HAVE_GTK_MULTIDISPLAY}" = "yes"; then
10549
10550cat >>confdefs.h <<\_ACEOF
10551#define HAVE_GTK_MULTIDISPLAY 1
572a3cc2
JD
10552_ACEOF
10553
10554 fi
10555 HAVE_GTK_FILE_SELECTION=no
10556
10557for ac_func in gtk_file_selection_new
10558do
10559as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10560echo "$as_me:$LINENO: checking for $ac_func" >&5
10561echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10562if eval "test \"\${$as_ac_var+set}\" = set"; then
10563 echo $ECHO_N "(cached) $ECHO_C" >&6
10564else
10565 cat >conftest.$ac_ext <<_ACEOF
10566/* confdefs.h. */
10567_ACEOF
10568cat confdefs.h >>conftest.$ac_ext
10569cat >>conftest.$ac_ext <<_ACEOF
10570/* end confdefs.h. */
edfaf76d
LK
10571/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10572 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10573#define $ac_func innocuous_$ac_func
10574
572a3cc2
JD
10575/* System header to define __stub macros and hopefully few prototypes,
10576 which can conflict with char $ac_func (); below.
10577 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10578 <limits.h> exists even on freestanding compilers. */
edfaf76d 10579
572a3cc2
JD
10580#ifdef __STDC__
10581# include <limits.h>
10582#else
10583# include <assert.h>
10584#endif
edfaf76d
LK
10585
10586#undef $ac_func
10587
572a3cc2
JD
10588/* Override any gcc2 internal prototype to avoid an error. */
10589#ifdef __cplusplus
10590extern "C"
10591{
10592#endif
10593/* We use char because int might match the return type of a gcc2
10594 builtin and then its argument prototype would still apply. */
10595char $ac_func ();
10596/* The GNU C library defines this for functions which it implements
10597 to always fail with ENOSYS. Some functions are actually named
10598 something starting with __ and the normal name is an alias. */
10599#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10600choke me
10601#else
10602char (*f) () = $ac_func;
10603#endif
10604#ifdef __cplusplus
10605}
10606#endif
10607
10608int
10609main ()
10610{
10611return f != $ac_func;
10612 ;
10613 return 0;
10614}
10615_ACEOF
10616rm -f conftest.$ac_objext conftest$ac_exeext
10617if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 10618 (eval $ac_link) 2>conftest.er1
572a3cc2 10619 ac_status=$?
edfaf76d
LK
10620 grep -v '^ *+' conftest.er1 >conftest.err
10621 rm -f conftest.er1
10622 cat conftest.err >&5
572a3cc2
JD
10623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10624 (exit $ac_status); } &&
e143ad11
AS
10625 { ac_try='test -z "$ac_c_werror_flag"
10626 || test ! -s conftest.err'
edfaf76d
LK
10627 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10628 (eval $ac_try) 2>&5
10629 ac_status=$?
10630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10631 (exit $ac_status); }; } &&
10632 { ac_try='test -s conftest$ac_exeext'
572a3cc2
JD
10633 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10634 (eval $ac_try) 2>&5
10635 ac_status=$?
10636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10637 (exit $ac_status); }; }; then
10638 eval "$as_ac_var=yes"
10639else
10640 echo "$as_me: failed program was:" >&5
10641sed 's/^/| /' conftest.$ac_ext >&5
10642
10643eval "$as_ac_var=no"
10644fi
edfaf76d
LK
10645rm -f conftest.err conftest.$ac_objext \
10646 conftest$ac_exeext conftest.$ac_ext
572a3cc2
JD
10647fi
10648echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10649echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10650if test `eval echo '${'$as_ac_var'}'` = yes; then
10651 cat >>confdefs.h <<_ACEOF
10652#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10653_ACEOF
10654 HAVE_GTK_FILE_SELECTION=yes
10655fi
10656done
10657
10658
10659 HAVE_GTK_FILE_CHOOSER=no
10660
10661for ac_func in gtk_file_chooser_dialog_new
10662do
10663as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10664echo "$as_me:$LINENO: checking for $ac_func" >&5
10665echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10666if eval "test \"\${$as_ac_var+set}\" = set"; then
10667 echo $ECHO_N "(cached) $ECHO_C" >&6
10668else
10669 cat >conftest.$ac_ext <<_ACEOF
10670/* confdefs.h. */
10671_ACEOF
10672cat confdefs.h >>conftest.$ac_ext
10673cat >>conftest.$ac_ext <<_ACEOF
10674/* end confdefs.h. */
edfaf76d
LK
10675/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10676 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10677#define $ac_func innocuous_$ac_func
10678
572a3cc2
JD
10679/* System header to define __stub macros and hopefully few prototypes,
10680 which can conflict with char $ac_func (); below.
10681 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10682 <limits.h> exists even on freestanding compilers. */
edfaf76d 10683
572a3cc2
JD
10684#ifdef __STDC__
10685# include <limits.h>
10686#else
10687# include <assert.h>
10688#endif
edfaf76d
LK
10689
10690#undef $ac_func
10691
572a3cc2
JD
10692/* Override any gcc2 internal prototype to avoid an error. */
10693#ifdef __cplusplus
10694extern "C"
10695{
10696#endif
10697/* We use char because int might match the return type of a gcc2
10698 builtin and then its argument prototype would still apply. */
10699char $ac_func ();
10700/* The GNU C library defines this for functions which it implements
10701 to always fail with ENOSYS. Some functions are actually named
10702 something starting with __ and the normal name is an alias. */
10703#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10704choke me
10705#else
10706char (*f) () = $ac_func;
10707#endif
10708#ifdef __cplusplus
10709}
10710#endif
10711
10712int
10713main ()
10714{
10715return f != $ac_func;
10716 ;
10717 return 0;
10718}
10719_ACEOF
10720rm -f conftest.$ac_objext conftest$ac_exeext
10721if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 10722 (eval $ac_link) 2>conftest.er1
572a3cc2 10723 ac_status=$?
edfaf76d
LK
10724 grep -v '^ *+' conftest.er1 >conftest.err
10725 rm -f conftest.er1
10726 cat conftest.err >&5
572a3cc2
JD
10727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10728 (exit $ac_status); } &&
e143ad11
AS
10729 { ac_try='test -z "$ac_c_werror_flag"
10730 || test ! -s conftest.err'
edfaf76d
LK
10731 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10732 (eval $ac_try) 2>&5
10733 ac_status=$?
10734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10735 (exit $ac_status); }; } &&
10736 { ac_try='test -s conftest$ac_exeext'
572a3cc2
JD
10737 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10738 (eval $ac_try) 2>&5
10739 ac_status=$?
10740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10741 (exit $ac_status); }; }; then
10742 eval "$as_ac_var=yes"
10743else
10744 echo "$as_me: failed program was:" >&5
10745sed 's/^/| /' conftest.$ac_ext >&5
10746
10747eval "$as_ac_var=no"
10748fi
edfaf76d
LK
10749rm -f conftest.err conftest.$ac_objext \
10750 conftest$ac_exeext conftest.$ac_ext
572a3cc2
JD
10751fi
10752echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10753echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10754if test `eval echo '${'$as_ac_var'}'` = yes; then
10755 cat >>confdefs.h <<_ACEOF
10756#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10757_ACEOF
10758 HAVE_GTK_FILE_CHOOSER=yes
10759fi
10760done
10761
10762
10763 if test "$HAVE_GTK_FILE_SELECTION" = yes \
10764 && test "$HAVE_GTK_FILE_CHOOSER" = yes; then
10765
10766cat >>confdefs.h <<\_ACEOF
10767#define HAVE_GTK_FILE_BOTH 1
57669b57
JD
10768_ACEOF
10769
b8bdffbe
JD
10770 fi
10771
10772 if test "$HAVE_GTK_FILE_CHOOSER" = yes; then
10773 HAVE_GTK_AND_PTHREAD=no
10774
10775for ac_header in pthread.h
10776do
10777as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10778if eval "test \"\${$as_ac_Header+set}\" = set"; then
10779 echo "$as_me:$LINENO: checking for $ac_header" >&5
10780echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10781if eval "test \"\${$as_ac_Header+set}\" = set"; then
10782 echo $ECHO_N "(cached) $ECHO_C" >&6
10783fi
10784echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10785echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10786else
10787 # Is the header compilable?
10788echo "$as_me:$LINENO: checking $ac_header usability" >&5
10789echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
10790cat >conftest.$ac_ext <<_ACEOF
10791/* confdefs.h. */
10792_ACEOF
10793cat confdefs.h >>conftest.$ac_ext
10794cat >>conftest.$ac_ext <<_ACEOF
10795/* end confdefs.h. */
10796$ac_includes_default
10797#include <$ac_header>
10798_ACEOF
10799rm -f conftest.$ac_objext
10800if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 10801 (eval $ac_compile) 2>conftest.er1
b8bdffbe 10802 ac_status=$?
edfaf76d
LK
10803 grep -v '^ *+' conftest.er1 >conftest.err
10804 rm -f conftest.er1
10805 cat conftest.err >&5
b8bdffbe
JD
10806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10807 (exit $ac_status); } &&
e143ad11
AS
10808 { ac_try='test -z "$ac_c_werror_flag"
10809 || test ! -s conftest.err'
edfaf76d
LK
10810 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10811 (eval $ac_try) 2>&5
10812 ac_status=$?
10813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10814 (exit $ac_status); }; } &&
10815 { ac_try='test -s conftest.$ac_objext'
b8bdffbe
JD
10816 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10817 (eval $ac_try) 2>&5
10818 ac_status=$?
10819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10820 (exit $ac_status); }; }; then
10821 ac_header_compiler=yes
10822else
10823 echo "$as_me: failed program was:" >&5
10824sed 's/^/| /' conftest.$ac_ext >&5
10825
10826ac_header_compiler=no
10827fi
edfaf76d 10828rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b8bdffbe
JD
10829echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10830echo "${ECHO_T}$ac_header_compiler" >&6
10831
10832# Is the header present?
10833echo "$as_me:$LINENO: checking $ac_header presence" >&5
10834echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
10835cat >conftest.$ac_ext <<_ACEOF
10836/* confdefs.h. */
10837_ACEOF
10838cat confdefs.h >>conftest.$ac_ext
10839cat >>conftest.$ac_ext <<_ACEOF
10840/* end confdefs.h. */
10841#include <$ac_header>
10842_ACEOF
10843if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10844 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10845 ac_status=$?
10846 grep -v '^ *+' conftest.er1 >conftest.err
10847 rm -f conftest.er1
10848 cat conftest.err >&5
10849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10850 (exit $ac_status); } >/dev/null; then
10851 if test -s conftest.err; then
10852 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 10853 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
b8bdffbe
JD
10854 else
10855 ac_cpp_err=
10856 fi
10857else
10858 ac_cpp_err=yes
10859fi
10860if test -z "$ac_cpp_err"; then
10861 ac_header_preproc=yes
10862else
10863 echo "$as_me: failed program was:" >&5
10864sed 's/^/| /' conftest.$ac_ext >&5
10865
10866 ac_header_preproc=no
10867fi
10868rm -f conftest.err conftest.$ac_ext
10869echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10870echo "${ECHO_T}$ac_header_preproc" >&6
10871
10872# So? What about this header?
edfaf76d
LK
10873case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10874 yes:no: )
b8bdffbe
JD
10875 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10876echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
10877 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10878echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10879 ac_header_preproc=yes
b8bdffbe 10880 ;;
edfaf76d 10881 no:yes:* )
b8bdffbe
JD
10882 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10883echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
10884 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
10885echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
10886 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10887echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10888 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
10889echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
b8bdffbe
JD
10890 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10891echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
10892 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10893echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
b8bdffbe
JD
10894 (
10895 cat <<\_ASBOX
edfaf76d
LK
10896## ------------------------------------------ ##
10897## Report this to the AC_PACKAGE_NAME lists. ##
10898## ------------------------------------------ ##
b8bdffbe
JD
10899_ASBOX
10900 ) |
10901 sed "s/^/$as_me: WARNING: /" >&2
10902 ;;
10903esac
10904echo "$as_me:$LINENO: checking for $ac_header" >&5
10905echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10906if eval "test \"\${$as_ac_Header+set}\" = set"; then
10907 echo $ECHO_N "(cached) $ECHO_C" >&6
10908else
edfaf76d 10909 eval "$as_ac_Header=\$ac_header_preproc"
b8bdffbe
JD
10910fi
10911echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10912echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10913
10914fi
10915if test `eval echo '${'$as_ac_Header'}'` = yes; then
10916 cat >>confdefs.h <<_ACEOF
10917#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10918_ACEOF
10919
10920fi
10921
10922done
10923
10924 if test "$ac_cv_header_pthread_h"; then
10925 echo "$as_me:$LINENO: checking for pthread_self in -lpthread" >&5
10926echo $ECHO_N "checking for pthread_self in -lpthread... $ECHO_C" >&6
10927if test "${ac_cv_lib_pthread_pthread_self+set}" = set; then
10928 echo $ECHO_N "(cached) $ECHO_C" >&6
10929else
10930 ac_check_lib_save_LIBS=$LIBS
10931LIBS="-lpthread $LIBS"
10932cat >conftest.$ac_ext <<_ACEOF
10933/* confdefs.h. */
10934_ACEOF
10935cat confdefs.h >>conftest.$ac_ext
10936cat >>conftest.$ac_ext <<_ACEOF
10937/* end confdefs.h. */
10938
10939/* Override any gcc2 internal prototype to avoid an error. */
10940#ifdef __cplusplus
10941extern "C"
10942#endif
10943/* We use char because int might match the return type of a gcc2
10944 builtin and then its argument prototype would still apply. */
10945char pthread_self ();
10946int
10947main ()
10948{
10949pthread_self ();
10950 ;
10951 return 0;
10952}
10953_ACEOF
10954rm -f conftest.$ac_objext conftest$ac_exeext
10955if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 10956 (eval $ac_link) 2>conftest.er1
b8bdffbe 10957 ac_status=$?
edfaf76d
LK
10958 grep -v '^ *+' conftest.er1 >conftest.err
10959 rm -f conftest.er1
10960 cat conftest.err >&5
b8bdffbe
JD
10961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10962 (exit $ac_status); } &&
e143ad11
AS
10963 { ac_try='test -z "$ac_c_werror_flag"
10964 || test ! -s conftest.err'
edfaf76d
LK
10965 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10966 (eval $ac_try) 2>&5
10967 ac_status=$?
10968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10969 (exit $ac_status); }; } &&
10970 { ac_try='test -s conftest$ac_exeext'
b8bdffbe
JD
10971 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10972 (eval $ac_try) 2>&5
10973 ac_status=$?
10974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10975 (exit $ac_status); }; }; then
10976 ac_cv_lib_pthread_pthread_self=yes
10977else
10978 echo "$as_me: failed program was:" >&5
10979sed 's/^/| /' conftest.$ac_ext >&5
10980
10981ac_cv_lib_pthread_pthread_self=no
10982fi
edfaf76d
LK
10983rm -f conftest.err conftest.$ac_objext \
10984 conftest$ac_exeext conftest.$ac_ext
b8bdffbe
JD
10985LIBS=$ac_check_lib_save_LIBS
10986fi
10987echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_self" >&5
10988echo "${ECHO_T}$ac_cv_lib_pthread_pthread_self" >&6
10989if test $ac_cv_lib_pthread_pthread_self = yes; then
10990 HAVE_GTK_AND_PTHREAD=yes
10991fi
10992
10993 fi
10994 if test "$HAVE_GTK_AND_PTHREAD" = yes; then
10995 GTK_LIBS="$GTK_LIBS -lpthread"
10996
10997cat >>confdefs.h <<\_ACEOF
10998#define HAVE_GTK_AND_PTHREAD 1
10999_ACEOF
11000
11001 fi
57669b57 11002 fi
488dd4c4
JD
11003fi
11004
98418dba
CW
11005if test x"${USE_X_TOOLKIT}" = xmaybe; then
11006 if test x"${HAVE_X11R5}" = xyes; then
c0d27fcc 11007 echo "$as_me:$LINENO: checking X11 version 5 with Xaw" >&5
98418dba
CW
11008echo $ECHO_N "checking X11 version 5 with Xaw... $ECHO_C" >&6
11009 if test "${emacs_cv_x11_version_5_with_xaw+set}" = set; then
11010 echo $ECHO_N "(cached) $ECHO_C" >&6
11011else
11012 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11013/* confdefs.h. */
11014_ACEOF
11015cat confdefs.h >>conftest.$ac_ext
11016cat >>conftest.$ac_ext <<_ACEOF
11017/* end confdefs.h. */
98418dba
CW
11018
11019#include <X11/Intrinsic.h>
11020#include <X11/Xaw/Simple.h>
98418dba
CW
11021int
11022main ()
11023{
11024
11025 ;
11026 return 0;
11027}
11028_ACEOF
11029rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 11030if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 11031 (eval $ac_link) 2>conftest.er1
98418dba 11032 ac_status=$?
edfaf76d
LK
11033 grep -v '^ *+' conftest.er1 >conftest.err
11034 rm -f conftest.er1
11035 cat conftest.err >&5
c0d27fcc 11036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 11037 (exit $ac_status); } &&
e143ad11
AS
11038 { ac_try='test -z "$ac_c_werror_flag"
11039 || test ! -s conftest.err'
edfaf76d
LK
11040 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11041 (eval $ac_try) 2>&5
11042 ac_status=$?
11043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11044 (exit $ac_status); }; } &&
11045 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 11046 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
11047 (eval $ac_try) 2>&5
11048 ac_status=$?
c0d27fcc 11049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
11050 (exit $ac_status); }; }; then
11051 emacs_cv_x11_version_5_with_xaw=yes
11052else
11053 echo "$as_me: failed program was:" >&5
19650fd6
AS
11054sed 's/^/| /' conftest.$ac_ext >&5
11055
98418dba
CW
11056emacs_cv_x11_version_5_with_xaw=no
11057fi
edfaf76d
LK
11058rm -f conftest.err conftest.$ac_objext \
11059 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
11060fi
11061
11062 if test $emacs_cv_x11_version_5_with_xaw = yes; then
c0d27fcc 11063 echo "$as_me:$LINENO: result: 5 or newer, with Xaw; use toolkit by default" >&5
98418dba
CW
11064echo "${ECHO_T}5 or newer, with Xaw; use toolkit by default" >&6
11065 USE_X_TOOLKIT=LUCID
11066 else
c0d27fcc 11067 echo "$as_me:$LINENO: result: before 5 or no Xaw; do not use toolkit by default" >&5
98418dba
CW
11068echo "${ECHO_T}before 5 or no Xaw; do not use toolkit by default" >&6
11069 USE_X_TOOLKIT=none
11070 fi
11071 else
11072 USE_X_TOOLKIT=none
11073 fi
11074fi
11075
11076X_TOOLKIT_TYPE=$USE_X_TOOLKIT
11077
11078if test "${USE_X_TOOLKIT}" != "none"; then
c0d27fcc 11079 echo "$as_me:$LINENO: checking X11 toolkit version" >&5
98418dba
CW
11080echo $ECHO_N "checking X11 toolkit version... $ECHO_C" >&6
11081 if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then
11082 echo $ECHO_N "(cached) $ECHO_C" >&6
11083else
11084 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11085/* confdefs.h. */
11086_ACEOF
11087cat confdefs.h >>conftest.$ac_ext
11088cat >>conftest.$ac_ext <<_ACEOF
11089/* end confdefs.h. */
98418dba 11090#include <X11/Intrinsic.h>
98418dba
CW
11091int
11092main ()
11093{
11094#if XtSpecificationRelease < 6
11095fail;
11096#endif
11097
11098 ;
11099 return 0;
11100}
11101_ACEOF
11102rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 11103if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 11104 (eval $ac_link) 2>conftest.er1
98418dba 11105 ac_status=$?
edfaf76d
LK
11106 grep -v '^ *+' conftest.er1 >conftest.err
11107 rm -f conftest.er1
11108 cat conftest.err >&5
c0d27fcc 11109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 11110 (exit $ac_status); } &&
e143ad11
AS
11111 { ac_try='test -z "$ac_c_werror_flag"
11112 || test ! -s conftest.err'
edfaf76d
LK
11113 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11114 (eval $ac_try) 2>&5
11115 ac_status=$?
11116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11117 (exit $ac_status); }; } &&
11118 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 11119 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
11120 (eval $ac_try) 2>&5
11121 ac_status=$?
c0d27fcc 11122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
11123 (exit $ac_status); }; }; then
11124 emacs_cv_x11_toolkit_version_6=yes
11125else
11126 echo "$as_me: failed program was:" >&5
19650fd6
AS
11127sed 's/^/| /' conftest.$ac_ext >&5
11128
98418dba
CW
11129emacs_cv_x11_toolkit_version_6=no
11130fi
edfaf76d
LK
11131rm -f conftest.err conftest.$ac_objext \
11132 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
11133fi
11134
11135 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
11136 if test $emacs_cv_x11_toolkit_version_6 = yes; then
c0d27fcc 11137 echo "$as_me:$LINENO: result: 6 or newer" >&5
98418dba 11138echo "${ECHO_T}6 or newer" >&6
b936fae4 11139
c0d27fcc 11140cat >>confdefs.h <<\_ACEOF
98418dba 11141#define HAVE_X11XTR6 1
c0d27fcc 11142_ACEOF
98418dba
CW
11143
11144 else
c0d27fcc 11145 echo "$as_me:$LINENO: result: before 6" >&5
98418dba
CW
11146echo "${ECHO_T}before 6" >&6
11147 fi
11148
11149 OLDLIBS="$LIBS"
11150 if test x$HAVE_X11XTR6 = xyes; then
11151 LIBS="-lXt -lSM -lICE $LIBS"
11152 else
11153 LIBS="-lXt $LIBS"
11154 fi
11155
c0d27fcc 11156echo "$as_me:$LINENO: checking for XmuConvertStandardSelection in -lXmu" >&5
98418dba
CW
11157echo $ECHO_N "checking for XmuConvertStandardSelection in -lXmu... $ECHO_C" >&6
11158if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then
11159 echo $ECHO_N "(cached) $ECHO_C" >&6
11160else
11161 ac_check_lib_save_LIBS=$LIBS
11162LIBS="-lXmu $LIBS"
11163cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11164/* confdefs.h. */
11165_ACEOF
11166cat confdefs.h >>conftest.$ac_ext
11167cat >>conftest.$ac_ext <<_ACEOF
11168/* end confdefs.h. */
98418dba
CW
11169
11170/* Override any gcc2 internal prototype to avoid an error. */
11171#ifdef __cplusplus
11172extern "C"
11173#endif
11174/* We use char because int might match the return type of a gcc2
11175 builtin and then its argument prototype would still apply. */
11176char XmuConvertStandardSelection ();
98418dba
CW
11177int
11178main ()
11179{
11180XmuConvertStandardSelection ();
11181 ;
11182 return 0;
11183}
11184_ACEOF
11185rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 11186if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 11187 (eval $ac_link) 2>conftest.er1
98418dba 11188 ac_status=$?
edfaf76d
LK
11189 grep -v '^ *+' conftest.er1 >conftest.err
11190 rm -f conftest.er1
11191 cat conftest.err >&5
c0d27fcc 11192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 11193 (exit $ac_status); } &&
e143ad11
AS
11194 { ac_try='test -z "$ac_c_werror_flag"
11195 || test ! -s conftest.err'
edfaf76d
LK
11196 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11197 (eval $ac_try) 2>&5
11198 ac_status=$?
11199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11200 (exit $ac_status); }; } &&
11201 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 11202 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
11203 (eval $ac_try) 2>&5
11204 ac_status=$?
c0d27fcc 11205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
11206 (exit $ac_status); }; }; then
11207 ac_cv_lib_Xmu_XmuConvertStandardSelection=yes
11208else
11209 echo "$as_me: failed program was:" >&5
19650fd6
AS
11210sed 's/^/| /' conftest.$ac_ext >&5
11211
98418dba
CW
11212ac_cv_lib_Xmu_XmuConvertStandardSelection=no
11213fi
edfaf76d
LK
11214rm -f conftest.err conftest.$ac_objext \
11215 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
11216LIBS=$ac_check_lib_save_LIBS
11217fi
c0d27fcc 11218echo "$as_me:$LINENO: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5
98418dba
CW
11219echo "${ECHO_T}$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6
11220if test $ac_cv_lib_Xmu_XmuConvertStandardSelection = yes; then
c0d27fcc 11221 cat >>confdefs.h <<_ACEOF
98418dba 11222#define HAVE_LIBXMU 1
c0d27fcc 11223_ACEOF
98418dba
CW
11224
11225 LIBS="-lXmu $LIBS"
11226
11227fi
11228
11229 test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
11230fi
11231
11232# On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D.
11233if test "${HAVE_X11}" = "yes"; then
11234 if test "${USE_X_TOOLKIT}" != "none"; then
11235
c0d27fcc 11236echo "$as_me:$LINENO: checking for XShapeQueryExtension in -lXext" >&5
98418dba
CW
11237echo $ECHO_N "checking for XShapeQueryExtension in -lXext... $ECHO_C" >&6
11238if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then
11239 echo $ECHO_N "(cached) $ECHO_C" >&6
11240else
11241 ac_check_lib_save_LIBS=$LIBS
11242LIBS="-lXext $LIBS"
11243cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11244/* confdefs.h. */
11245_ACEOF
11246cat confdefs.h >>conftest.$ac_ext
11247cat >>conftest.$ac_ext <<_ACEOF
11248/* end confdefs.h. */
98418dba
CW
11249
11250/* Override any gcc2 internal prototype to avoid an error. */
11251#ifdef __cplusplus
11252extern "C"
11253#endif
11254/* We use char because int might match the return type of a gcc2
11255 builtin and then its argument prototype would still apply. */
11256char XShapeQueryExtension ();
98418dba
CW
11257int
11258main ()
11259{
11260XShapeQueryExtension ();
11261 ;
11262 return 0;
11263}
11264_ACEOF
11265rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 11266if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 11267 (eval $ac_link) 2>conftest.er1
98418dba 11268 ac_status=$?
edfaf76d
LK
11269 grep -v '^ *+' conftest.er1 >conftest.err
11270 rm -f conftest.er1
11271 cat conftest.err >&5
c0d27fcc 11272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 11273 (exit $ac_status); } &&
e143ad11
AS
11274 { ac_try='test -z "$ac_c_werror_flag"
11275 || test ! -s conftest.err'
edfaf76d
LK
11276 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11277 (eval $ac_try) 2>&5
11278 ac_status=$?
11279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11280 (exit $ac_status); }; } &&
11281 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 11282 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
11283 (eval $ac_try) 2>&5
11284 ac_status=$?
c0d27fcc 11285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
11286 (exit $ac_status); }; }; then
11287 ac_cv_lib_Xext_XShapeQueryExtension=yes
11288else
11289 echo "$as_me: failed program was:" >&5
19650fd6
AS
11290sed 's/^/| /' conftest.$ac_ext >&5
11291
98418dba
CW
11292ac_cv_lib_Xext_XShapeQueryExtension=no
11293fi
edfaf76d
LK
11294rm -f conftest.err conftest.$ac_objext \
11295 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
11296LIBS=$ac_check_lib_save_LIBS
11297fi
c0d27fcc 11298echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
98418dba
CW
11299echo "${ECHO_T}$ac_cv_lib_Xext_XShapeQueryExtension" >&6
11300if test $ac_cv_lib_Xext_XShapeQueryExtension = yes; then
c0d27fcc 11301 cat >>confdefs.h <<_ACEOF
98418dba 11302#define HAVE_LIBXEXT 1
c0d27fcc 11303_ACEOF
98418dba
CW
11304
11305 LIBS="-lXext $LIBS"
11306
11307fi
11308
11309 fi
11310fi
11311
11312if test "${USE_X_TOOLKIT}" = "MOTIF"; then
c0d27fcc 11313 echo "$as_me:$LINENO: checking for Motif version 2.1" >&5
98418dba
CW
11314echo $ECHO_N "checking for Motif version 2.1... $ECHO_C" >&6
11315if test "${emacs_cv_motif_version_2_1+set}" = set; then
11316 echo $ECHO_N "(cached) $ECHO_C" >&6
11317else
11318 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11319/* confdefs.h. */
11320_ACEOF
11321cat confdefs.h >>conftest.$ac_ext
11322cat >>conftest.$ac_ext <<_ACEOF
11323/* end confdefs.h. */
98418dba 11324#include <Xm/Xm.h>
98418dba
CW
11325int
11326main ()
11327{
11328#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
11329int x = 5;
11330#else
11331Motif version prior to 2.1.
11332#endif
11333 ;
11334 return 0;
11335}
11336_ACEOF
11337rm -f conftest.$ac_objext
c0d27fcc 11338if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 11339 (eval $ac_compile) 2>conftest.er1
98418dba 11340 ac_status=$?
edfaf76d
LK
11341 grep -v '^ *+' conftest.er1 >conftest.err
11342 rm -f conftest.er1
11343 cat conftest.err >&5
c0d27fcc 11344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 11345 (exit $ac_status); } &&
e143ad11
AS
11346 { ac_try='test -z "$ac_c_werror_flag"
11347 || test ! -s conftest.err'
edfaf76d
LK
11348 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11349 (eval $ac_try) 2>&5
11350 ac_status=$?
11351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11352 (exit $ac_status); }; } &&
11353 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 11354 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
11355 (eval $ac_try) 2>&5
11356 ac_status=$?
c0d27fcc 11357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
11358 (exit $ac_status); }; }; then
11359 emacs_cv_motif_version_2_1=yes
11360else
11361 echo "$as_me: failed program was:" >&5
19650fd6
AS
11362sed 's/^/| /' conftest.$ac_ext >&5
11363
98418dba
CW
11364emacs_cv_motif_version_2_1=no
11365fi
edfaf76d 11366rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 11367fi
c0d27fcc 11368echo "$as_me:$LINENO: result: $emacs_cv_motif_version_2_1" >&5
98418dba
CW
11369echo "${ECHO_T}$emacs_cv_motif_version_2_1" >&6
11370 HAVE_MOTIF_2_1=$emacs_cv_motif_version_2_1
11371 if test $emacs_cv_motif_version_2_1 = yes; then
11372 HAVE_LIBXP=no
b936fae4 11373
c0d27fcc 11374cat >>confdefs.h <<\_ACEOF
98418dba 11375#define HAVE_MOTIF_2_1 1
c0d27fcc 11376_ACEOF
98418dba 11377
c0d27fcc 11378 echo "$as_me:$LINENO: checking for XpCreateContext in -lXp" >&5
98418dba
CW
11379echo $ECHO_N "checking for XpCreateContext in -lXp... $ECHO_C" >&6
11380if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then
11381 echo $ECHO_N "(cached) $ECHO_C" >&6
11382else
11383 ac_check_lib_save_LIBS=$LIBS
11384LIBS="-lXp $LIBS"
11385cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11386/* confdefs.h. */
11387_ACEOF
11388cat confdefs.h >>conftest.$ac_ext
11389cat >>conftest.$ac_ext <<_ACEOF
11390/* end confdefs.h. */
98418dba
CW
11391
11392/* Override any gcc2 internal prototype to avoid an error. */
11393#ifdef __cplusplus
11394extern "C"
11395#endif
11396/* We use char because int might match the return type of a gcc2
11397 builtin and then its argument prototype would still apply. */
11398char XpCreateContext ();
98418dba
CW
11399int
11400main ()
11401{
11402XpCreateContext ();
11403 ;
11404 return 0;
11405}
11406_ACEOF
11407rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 11408if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 11409 (eval $ac_link) 2>conftest.er1
98418dba 11410 ac_status=$?
edfaf76d
LK
11411 grep -v '^ *+' conftest.er1 >conftest.err
11412 rm -f conftest.er1
11413 cat conftest.err >&5
c0d27fcc 11414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 11415 (exit $ac_status); } &&
e143ad11
AS
11416 { ac_try='test -z "$ac_c_werror_flag"
11417 || test ! -s conftest.err'
edfaf76d
LK
11418 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11419 (eval $ac_try) 2>&5
11420 ac_status=$?
11421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11422 (exit $ac_status); }; } &&
11423 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 11424 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
11425 (eval $ac_try) 2>&5
11426 ac_status=$?
c0d27fcc 11427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
11428 (exit $ac_status); }; }; then
11429 ac_cv_lib_Xp_XpCreateContext=yes
11430else
11431 echo "$as_me: failed program was:" >&5
19650fd6
AS
11432sed 's/^/| /' conftest.$ac_ext >&5
11433
98418dba
CW
11434ac_cv_lib_Xp_XpCreateContext=no
11435fi
edfaf76d
LK
11436rm -f conftest.err conftest.$ac_objext \
11437 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
11438LIBS=$ac_check_lib_save_LIBS
11439fi
c0d27fcc 11440echo "$as_me:$LINENO: result: $ac_cv_lib_Xp_XpCreateContext" >&5
98418dba
CW
11441echo "${ECHO_T}$ac_cv_lib_Xp_XpCreateContext" >&6
11442if test $ac_cv_lib_Xp_XpCreateContext = yes; then
11443 HAVE_LIBXP=yes
11444fi
503d2be0 11445
98418dba 11446 if test ${HAVE_LIBXP} = yes; then
b936fae4 11447
c0d27fcc 11448cat >>confdefs.h <<\_ACEOF
98418dba 11449#define HAVE_LIBXP 1
c0d27fcc 11450_ACEOF
503d2be0 11451
98418dba 11452 fi
4693dbc9
SM
11453 else
11454 echo "$as_me:$LINENO: checking for LessTif where some systems put it" >&5
11455echo $ECHO_N "checking for LessTif where some systems put it... $ECHO_C" >&6
11456if test "${emacs_cv_lesstif+set}" = set; then
11457 echo $ECHO_N "(cached) $ECHO_C" >&6
11458else
11459 # We put this in CFLAGS temporarily to precede other -I options
11460 # that might be in CFLAGS temporarily.
11461 # We put this in CPPFLAGS where it precedes the other -I options.
11462 OLD_CPPFLAGS=$CPPFLAGS
11463 OLD_CFLAGS=$CFLAGS
11464 CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS"
11465 CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS"
11466 cat >conftest.$ac_ext <<_ACEOF
11467/* confdefs.h. */
11468_ACEOF
11469cat confdefs.h >>conftest.$ac_ext
11470cat >>conftest.$ac_ext <<_ACEOF
11471/* end confdefs.h. */
11472#include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h>
11473int
11474main ()
11475{
11476int x = 5;
11477 ;
11478 return 0;
11479}
11480_ACEOF
11481rm -f conftest.$ac_objext
11482if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 11483 (eval $ac_compile) 2>conftest.er1
4693dbc9 11484 ac_status=$?
edfaf76d
LK
11485 grep -v '^ *+' conftest.er1 >conftest.err
11486 rm -f conftest.er1
11487 cat conftest.err >&5
4693dbc9
SM
11488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11489 (exit $ac_status); } &&
e143ad11
AS
11490 { ac_try='test -z "$ac_c_werror_flag"
11491 || test ! -s conftest.err'
edfaf76d
LK
11492 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11493 (eval $ac_try) 2>&5
11494 ac_status=$?
11495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11496 (exit $ac_status); }; } &&
11497 { ac_try='test -s conftest.$ac_objext'
4693dbc9
SM
11498 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11499 (eval $ac_try) 2>&5
11500 ac_status=$?
11501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11502 (exit $ac_status); }; }; then
11503 emacs_cv_lesstif=yes
11504else
11505 echo "$as_me: failed program was:" >&5
11506sed 's/^/| /' conftest.$ac_ext >&5
11507
11508emacs_cv_lesstif=no
11509fi
edfaf76d 11510rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4693dbc9
SM
11511fi
11512echo "$as_me:$LINENO: result: $emacs_cv_lesstif" >&5
11513echo "${ECHO_T}$emacs_cv_lesstif" >&6
11514 if test $emacs_cv_lesstif = yes; then
11515 # Make sure this -I option remains in CPPFLAGS after it is set
11516 # back to REAL_CPPFLAGS.
11517 # There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not
11518 # have those other -I options anyway. Ultimately, having this
11519 # directory ultimately in CPPFLAGS will be enough.
11520 REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS"
11521 LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS"
11522 else
11523 CFLAGS=$OLD_CFLAGS
11524 CPPFLAGS=$OLD_CPPFLAGS
11525 fi
98418dba
CW
11526 fi
11527fi
11528
11529### Is -lXaw3d available?
11530HAVE_XAW3D=no
11531if test "${HAVE_X11}" = "yes"; then
7c00e1e9 11532 if test "${USE_X_TOOLKIT}" != "none" && test "${with_toolkit_scroll_bars}" != "no"; then
22044edf 11533 echo "$as_me:$LINENO: checking for X11/Xaw3d/Scrollbar.h" >&5
98418dba
CW
11534echo $ECHO_N "checking for X11/Xaw3d/Scrollbar.h... $ECHO_C" >&6
11535if test "${ac_cv_header_X11_Xaw3d_Scrollbar_h+set}" = set; then
11536 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba 11537else
22044edf 11538 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11539/* confdefs.h. */
11540_ACEOF
11541cat confdefs.h >>conftest.$ac_ext
11542cat >>conftest.$ac_ext <<_ACEOF
11543/* end confdefs.h. */
98418dba 11544#include <X11/Xaw3d/Scrollbar.h>
503d2be0 11545_ACEOF
c0d27fcc 11546if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
11547 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11548 ac_status=$?
6bae0ccf 11549 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
11550 rm -f conftest.er1
11551 cat conftest.err >&5
c0d27fcc 11552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
11553 (exit $ac_status); } >/dev/null; then
11554 if test -s conftest.err; then
11555 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 11556 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
11557 else
11558 ac_cpp_err=
11559 fi
11560else
11561 ac_cpp_err=yes
11562fi
11563if test -z "$ac_cpp_err"; then
22044edf 11564 ac_cv_header_X11_Xaw3d_Scrollbar_h=yes
ba4481b5 11565else
503d2be0 11566 echo "$as_me: failed program was:" >&5
19650fd6
AS
11567sed 's/^/| /' conftest.$ac_ext >&5
11568
22044edf 11569 ac_cv_header_X11_Xaw3d_Scrollbar_h=no
ba4481b5 11570fi
503d2be0 11571rm -f conftest.err conftest.$ac_ext
98418dba 11572fi
c0d27fcc 11573echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xaw3d_Scrollbar_h" >&5
98418dba 11574echo "${ECHO_T}$ac_cv_header_X11_Xaw3d_Scrollbar_h" >&6
98418dba 11575if test $ac_cv_header_X11_Xaw3d_Scrollbar_h = yes; then
c0d27fcc 11576 echo "$as_me:$LINENO: checking for XawScrollbarSetThumb in -lXaw3d" >&5
98418dba
CW
11577echo $ECHO_N "checking for XawScrollbarSetThumb in -lXaw3d... $ECHO_C" >&6
11578if test "${ac_cv_lib_Xaw3d_XawScrollbarSetThumb+set}" = set; then
11579 echo $ECHO_N "(cached) $ECHO_C" >&6
11580else
11581 ac_check_lib_save_LIBS=$LIBS
11582LIBS="-lXaw3d $LIBS"
11583cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11584/* confdefs.h. */
11585_ACEOF
11586cat confdefs.h >>conftest.$ac_ext
11587cat >>conftest.$ac_ext <<_ACEOF
11588/* end confdefs.h. */
98418dba
CW
11589
11590/* Override any gcc2 internal prototype to avoid an error. */
11591#ifdef __cplusplus
11592extern "C"
11593#endif
11594/* We use char because int might match the return type of a gcc2
11595 builtin and then its argument prototype would still apply. */
11596char XawScrollbarSetThumb ();
503d2be0
AS
11597int
11598main ()
11599{
98418dba 11600XawScrollbarSetThumb ();
503d2be0
AS
11601 ;
11602 return 0;
11603}
11604_ACEOF
11605rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 11606if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 11607 (eval $ac_link) 2>conftest.er1
503d2be0 11608 ac_status=$?
edfaf76d
LK
11609 grep -v '^ *+' conftest.er1 >conftest.err
11610 rm -f conftest.er1
11611 cat conftest.err >&5
c0d27fcc 11612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 11613 (exit $ac_status); } &&
e143ad11
AS
11614 { ac_try='test -z "$ac_c_werror_flag"
11615 || test ! -s conftest.err'
edfaf76d
LK
11616 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11617 (eval $ac_try) 2>&5
11618 ac_status=$?
11619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11620 (exit $ac_status); }; } &&
11621 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 11622 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
11623 (eval $ac_try) 2>&5
11624 ac_status=$?
c0d27fcc 11625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 11626 (exit $ac_status); }; }; then
98418dba 11627 ac_cv_lib_Xaw3d_XawScrollbarSetThumb=yes
ba4481b5 11628else
503d2be0 11629 echo "$as_me: failed program was:" >&5
19650fd6
AS
11630sed 's/^/| /' conftest.$ac_ext >&5
11631
98418dba 11632ac_cv_lib_Xaw3d_XawScrollbarSetThumb=no
ba4481b5 11633fi
edfaf76d
LK
11634rm -f conftest.err conftest.$ac_objext \
11635 conftest$ac_exeext conftest.$ac_ext
98418dba 11636LIBS=$ac_check_lib_save_LIBS
ba4481b5 11637fi
c0d27fcc 11638echo "$as_me:$LINENO: result: $ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&5
98418dba
CW
11639echo "${ECHO_T}$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&6
11640if test $ac_cv_lib_Xaw3d_XawScrollbarSetThumb = yes; then
11641 HAVE_XAW3D=yes
ba4481b5 11642fi
503d2be0 11643
ba4481b5
DL
11644fi
11645
c0d27fcc 11646
98418dba 11647 if test "${HAVE_XAW3D}" = "yes"; then
b936fae4 11648
c0d27fcc 11649cat >>confdefs.h <<\_ACEOF
98418dba 11650#define HAVE_XAW3D 1
c0d27fcc 11651_ACEOF
98418dba 11652
ba4481b5 11653 fi
98418dba 11654 fi
ba4481b5
DL
11655fi
11656
c0d27fcc
MR
11657
11658
98418dba
CW
11659USE_TOOLKIT_SCROLL_BARS=no
11660if test "${with_toolkit_scroll_bars}" != "no"; then
11661 if test "${USE_X_TOOLKIT}" != "none"; then
11662 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
c0d27fcc 11663 cat >>confdefs.h <<\_ACEOF
98418dba 11664#define USE_TOOLKIT_SCROLL_BARS 1
c0d27fcc 11665_ACEOF
98418dba
CW
11666
11667 HAVE_XAW3D=no
11668 USE_TOOLKIT_SCROLL_BARS=yes
11669 elif test "${HAVE_XAW3D}" = "yes"; then
c0d27fcc 11670 cat >>confdefs.h <<\_ACEOF
98418dba 11671#define USE_TOOLKIT_SCROLL_BARS 1
c0d27fcc 11672_ACEOF
98418dba
CW
11673
11674 USE_TOOLKIT_SCROLL_BARS=yes
ba4481b5 11675 fi
488dd4c4
JD
11676 elif test "${HAVE_GTK}" = "yes"; then
11677 cat >>confdefs.h <<\_ACEOF
11678#define USE_TOOLKIT_SCROLL_BARS 1
5d6da11e
YM
11679_ACEOF
11680
11681 USE_TOOLKIT_SCROLL_BARS=yes
11682 elif test "${HAVE_CARBON}" = "yes"; then
11683 cat >>confdefs.h <<\_ACEOF
11684#define USE_TOOLKIT_SCROLL_BARS 1
488dd4c4
JD
11685_ACEOF
11686
11687 USE_TOOLKIT_SCROLL_BARS=yes
ba4481b5
DL
11688 fi
11689fi
11690
abd39b57 11691cat >conftest.$ac_ext <<_ACEOF
abd39b57
AC
11692/* confdefs.h. */
11693_ACEOF
11694cat confdefs.h >>conftest.$ac_ext
11695cat >>conftest.$ac_ext <<_ACEOF
11696/* end confdefs.h. */
11697
11698 #include <X11/Xlib.h>
11699 #include <X11/Xresource.h>
11700int
11701main ()
11702{
11703XIMProc callback;
11704 ;
11705 return 0;
11706}
11707_ACEOF
11708rm -f conftest.$ac_objext
11709if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 11710 (eval $ac_compile) 2>conftest.er1
abd39b57 11711 ac_status=$?
edfaf76d
LK
11712 grep -v '^ *+' conftest.er1 >conftest.err
11713 rm -f conftest.er1
11714 cat conftest.err >&5
abd39b57
AC
11715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11716 (exit $ac_status); } &&
e143ad11
AS
11717 { ac_try='test -z "$ac_c_werror_flag"
11718 || test ! -s conftest.err'
edfaf76d
LK
11719 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11720 (eval $ac_try) 2>&5
11721 ac_status=$?
11722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11723 (exit $ac_status); }; } &&
11724 { ac_try='test -s conftest.$ac_objext'
abd39b57
AC
11725 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11726 (eval $ac_try) 2>&5
11727 ac_status=$?
11728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11729 (exit $ac_status); }; }; then
11730 HAVE_XIM=yes
11731
11732cat >>confdefs.h <<\_ACEOF
11733#define HAVE_XIM 1
11734_ACEOF
11735
11736else
11737 echo "$as_me: failed program was:" >&5
11738sed 's/^/| /' conftest.$ac_ext >&5
11739
11740HAVE_XIM=no
11741fi
edfaf76d 11742rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
abd39b57 11743
c0d27fcc 11744
98418dba 11745if test "${with_xim}" != "no"; then
b936fae4 11746
c0d27fcc 11747cat >>confdefs.h <<\_ACEOF
98418dba 11748#define USE_XIM 1
c0d27fcc 11749_ACEOF
98418dba 11750
793fa0d7 11751fi
abd39b57
AC
11752
11753
11754if test "${HAVE_XIM}" != "no"; then
849d80cf
DL
11755 late_CFLAGS=$CFLAGS
11756 if test "$GCC" = yes; then
11757 CFLAGS="$CFLAGS --pedantic-errors"
11758 fi
cffcede7 11759 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11760/* confdefs.h. */
11761_ACEOF
11762cat confdefs.h >>conftest.$ac_ext
11763cat >>conftest.$ac_ext <<_ACEOF
11764/* end confdefs.h. */
cffcede7
JD
11765
11766#include <X11/Xlib.h>
11767#include <X11/Xresource.h>
11768int
11769main ()
11770{
11771Display *display;
11772XrmDatabase db;
11773char *res_name;
11774char *res_class;
11775XIMProc callback;
11776XPointer *client_data;
849d80cf
DL
11777#ifndef __GNUC__
11778/* If we're not using GCC, it's probably not XFree86, and this is
11779 probably right, but we can't use something like --pedantic-errors. */
11780extern Bool XRegisterIMInstantiateCallback(Display*, XrmDatabase, char*,
11781 char*, XIMProc, XPointer*);
11782#endif
cffcede7
JD
11783(void)XRegisterIMInstantiateCallback(display, db, res_name, res_class, callback,
11784 client_data);
11785 ;
11786 return 0;
11787}
11788_ACEOF
11789rm -f conftest.$ac_objext
11790if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 11791 (eval $ac_compile) 2>conftest.er1
cffcede7 11792 ac_status=$?
edfaf76d
LK
11793 grep -v '^ *+' conftest.er1 >conftest.err
11794 rm -f conftest.er1
11795 cat conftest.err >&5
cffcede7
JD
11796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11797 (exit $ac_status); } &&
e143ad11
AS
11798 { ac_try='test -z "$ac_c_werror_flag"
11799 || test ! -s conftest.err'
edfaf76d
LK
11800 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11801 (eval $ac_try) 2>&5
11802 ac_status=$?
11803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11804 (exit $ac_status); }; } &&
11805 { ac_try='test -s conftest.$ac_objext'
cffcede7
JD
11806 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11807 (eval $ac_try) 2>&5
11808 ac_status=$?
11809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11810 (exit $ac_status); }; }; then
11811 emacs_cv_arg6_star=yes
11812else
11813 echo "$as_me: failed program was:" >&5
19650fd6
AS
11814sed 's/^/| /' conftest.$ac_ext >&5
11815
cffcede7 11816fi
edfaf76d 11817rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
cffcede7
JD
11818
11819 if test "$emacs_cv_arg6_star" = yes; then
f57bd967 11820 cat >>confdefs.h <<\_ACEOF
cffcede7
JD
11821#define XRegisterIMInstantiateCallback_arg6 XPointer*
11822_ACEOF
11823
11824 else
f57bd967 11825 cat >>confdefs.h <<\_ACEOF
cffcede7
JD
11826#define XRegisterIMInstantiateCallback_arg6 XPointer
11827_ACEOF
11828
11829 fi
849d80cf 11830 CFLAGS=$late_CFLAGS
98418dba
CW
11831fi
11832
11833### Use -lXpm if available, unless `--with-xpm=no'.
11834HAVE_XPM=no
11835if test "${HAVE_X11}" = "yes"; then
11836 if test "${with_xpm}" != "no"; then
c0d27fcc
MR
11837 if test "${ac_cv_header_X11_xpm_h+set}" = set; then
11838 echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
98418dba
CW
11839echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6
11840if test "${ac_cv_header_X11_xpm_h+set}" = set; then
11841 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
11842fi
11843echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
11844echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6
98418dba 11845else
c0d27fcc
MR
11846 # Is the header compilable?
11847echo "$as_me:$LINENO: checking X11/xpm.h usability" >&5
11848echo $ECHO_N "checking X11/xpm.h usability... $ECHO_C" >&6
11849cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11850/* confdefs.h. */
11851_ACEOF
11852cat confdefs.h >>conftest.$ac_ext
11853cat >>conftest.$ac_ext <<_ACEOF
11854/* end confdefs.h. */
c0d27fcc
MR
11855$ac_includes_default
11856#include <X11/xpm.h>
11857_ACEOF
11858rm -f conftest.$ac_objext
11859if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 11860 (eval $ac_compile) 2>conftest.er1
c0d27fcc 11861 ac_status=$?
edfaf76d
LK
11862 grep -v '^ *+' conftest.er1 >conftest.err
11863 rm -f conftest.er1
11864 cat conftest.err >&5
c0d27fcc
MR
11865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11866 (exit $ac_status); } &&
e143ad11
AS
11867 { ac_try='test -z "$ac_c_werror_flag"
11868 || test ! -s conftest.err'
edfaf76d
LK
11869 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11870 (eval $ac_try) 2>&5
11871 ac_status=$?
11872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11873 (exit $ac_status); }; } &&
11874 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
11875 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11876 (eval $ac_try) 2>&5
11877 ac_status=$?
11878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11879 (exit $ac_status); }; }; then
11880 ac_header_compiler=yes
11881else
11882 echo "$as_me: failed program was:" >&5
19650fd6
AS
11883sed 's/^/| /' conftest.$ac_ext >&5
11884
c0d27fcc
MR
11885ac_header_compiler=no
11886fi
edfaf76d 11887rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
11888echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11889echo "${ECHO_T}$ac_header_compiler" >&6
11890
11891# Is the header present?
11892echo "$as_me:$LINENO: checking X11/xpm.h presence" >&5
11893echo $ECHO_N "checking X11/xpm.h presence... $ECHO_C" >&6
11894cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11895/* confdefs.h. */
11896_ACEOF
11897cat confdefs.h >>conftest.$ac_ext
11898cat >>conftest.$ac_ext <<_ACEOF
11899/* end confdefs.h. */
98418dba
CW
11900#include <X11/xpm.h>
11901_ACEOF
c0d27fcc 11902if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
11903 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11904 ac_status=$?
6bae0ccf 11905 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
11906 rm -f conftest.er1
11907 cat conftest.err >&5
c0d27fcc 11908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
11909 (exit $ac_status); } >/dev/null; then
11910 if test -s conftest.err; then
11911 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 11912 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
11913 else
11914 ac_cpp_err=
11915 fi
11916else
11917 ac_cpp_err=yes
11918fi
11919if test -z "$ac_cpp_err"; then
c0d27fcc 11920 ac_header_preproc=yes
98418dba
CW
11921else
11922 echo "$as_me: failed program was:" >&5
19650fd6
AS
11923sed 's/^/| /' conftest.$ac_ext >&5
11924
c0d27fcc 11925 ac_header_preproc=no
98418dba
CW
11926fi
11927rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
11928echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11929echo "${ECHO_T}$ac_header_preproc" >&6
11930
11931# So? What about this header?
edfaf76d
LK
11932case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11933 yes:no: )
c0d27fcc
MR
11934 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: accepted by the compiler, rejected by the preprocessor!" >&5
11935echo "$as_me: WARNING: X11/xpm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
11936 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: proceeding with the compiler's result" >&5
11937echo "$as_me: WARNING: X11/xpm.h: proceeding with the compiler's result" >&2;}
11938 ac_header_preproc=yes
11939 ;;
11940 no:yes:* )
11941 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: present but cannot be compiled" >&5
11942echo "$as_me: WARNING: X11/xpm.h: present but cannot be compiled" >&2;}
11943 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: check for missing prerequisite headers?" >&5
11944echo "$as_me: WARNING: X11/xpm.h: check for missing prerequisite headers?" >&2;}
11945 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: see the Autoconf documentation" >&5
11946echo "$as_me: WARNING: X11/xpm.h: see the Autoconf documentation" >&2;}
11947 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: section \"Present But Cannot Be Compiled\"" >&5
11948echo "$as_me: WARNING: X11/xpm.h: section \"Present But Cannot Be Compiled\"" >&2;}
7c9e5167
JD
11949 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&5
11950echo "$as_me: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
11951 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: in the future, the compiler will take precedence" >&5
11952echo "$as_me: WARNING: X11/xpm.h: in the future, the compiler will take precedence" >&2;}
7c9e5167
JD
11953 (
11954 cat <<\_ASBOX
edfaf76d
LK
11955## ------------------------------------------ ##
11956## Report this to the AC_PACKAGE_NAME lists. ##
11957## ------------------------------------------ ##
19650fd6
AS
11958_ASBOX
11959 ) |
11960 sed "s/^/$as_me: WARNING: /" >&2
11961 ;;
c0d27fcc
MR
11962esac
11963echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
11964echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6
11965if test "${ac_cv_header_X11_xpm_h+set}" = set; then
11966 echo $ECHO_N "(cached) $ECHO_C" >&6
11967else
11968 ac_cv_header_X11_xpm_h=$ac_header_preproc
ba4481b5 11969fi
c0d27fcc 11970echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
98418dba 11971echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6
c0d27fcc
MR
11972
11973fi
98418dba 11974if test $ac_cv_header_X11_xpm_h = yes; then
c0d27fcc 11975 echo "$as_me:$LINENO: checking for XpmReadFileToPixmap in -lXpm" >&5
98418dba
CW
11976echo $ECHO_N "checking for XpmReadFileToPixmap in -lXpm... $ECHO_C" >&6
11977if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then
503d2be0 11978 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 11979else
98418dba
CW
11980 ac_check_lib_save_LIBS=$LIBS
11981LIBS="-lXpm -lX11 $LIBS"
11982cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11983/* confdefs.h. */
11984_ACEOF
11985cat confdefs.h >>conftest.$ac_ext
11986cat >>conftest.$ac_ext <<_ACEOF
11987/* end confdefs.h. */
98418dba 11988
ba4481b5 11989/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
11990#ifdef __cplusplus
11991extern "C"
11992#endif
ba4481b5 11993/* We use char because int might match the return type of a gcc2
503d2be0 11994 builtin and then its argument prototype would still apply. */
98418dba 11995char XpmReadFileToPixmap ();
503d2be0
AS
11996int
11997main ()
11998{
98418dba 11999XpmReadFileToPixmap ();
503d2be0
AS
12000 ;
12001 return 0;
12002}
12003_ACEOF
12004rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 12005if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 12006 (eval $ac_link) 2>conftest.er1
503d2be0 12007 ac_status=$?
edfaf76d
LK
12008 grep -v '^ *+' conftest.er1 >conftest.err
12009 rm -f conftest.er1
12010 cat conftest.err >&5
c0d27fcc 12011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12012 (exit $ac_status); } &&
e143ad11
AS
12013 { ac_try='test -z "$ac_c_werror_flag"
12014 || test ! -s conftest.err'
edfaf76d
LK
12015 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12016 (eval $ac_try) 2>&5
12017 ac_status=$?
12018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12019 (exit $ac_status); }; } &&
12020 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 12021 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
12022 (eval $ac_try) 2>&5
12023 ac_status=$?
c0d27fcc 12024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12025 (exit $ac_status); }; }; then
98418dba 12026 ac_cv_lib_Xpm_XpmReadFileToPixmap=yes
503d2be0
AS
12027else
12028 echo "$as_me: failed program was:" >&5
19650fd6
AS
12029sed 's/^/| /' conftest.$ac_ext >&5
12030
98418dba 12031ac_cv_lib_Xpm_XpmReadFileToPixmap=no
503d2be0 12032fi
edfaf76d
LK
12033rm -f conftest.err conftest.$ac_objext \
12034 conftest$ac_exeext conftest.$ac_ext
98418dba 12035LIBS=$ac_check_lib_save_LIBS
503d2be0 12036fi
c0d27fcc 12037echo "$as_me:$LINENO: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5
98418dba
CW
12038echo "${ECHO_T}$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6
12039if test $ac_cv_lib_Xpm_XpmReadFileToPixmap = yes; then
12040 HAVE_XPM=yes
ba4481b5
DL
12041fi
12042
98418dba
CW
12043fi
12044
c0d27fcc 12045
98418dba 12046 if test "${HAVE_XPM}" = "yes"; then
c0d27fcc 12047 echo "$as_me:$LINENO: checking for XpmReturnAllocPixels preprocessor define" >&5
98418dba
CW
12048echo $ECHO_N "checking for XpmReturnAllocPixels preprocessor define... $ECHO_C" >&6
12049 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12050/* confdefs.h. */
12051_ACEOF
12052cat confdefs.h >>conftest.$ac_ext
12053cat >>conftest.$ac_ext <<_ACEOF
12054/* end confdefs.h. */
98418dba
CW
12055#include "X11/xpm.h"
12056#ifndef XpmReturnAllocPixels
12057no_return_alloc_pixels
503d2be0 12058#endif
ba4481b5 12059
98418dba
CW
12060_ACEOF
12061if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 12062 $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then
98418dba
CW
12063 HAVE_XPM=no
12064else
12065 HAVE_XPM=yes
12066fi
12067rm -f conftest*
ba4481b5 12068
c0d27fcc 12069
98418dba 12070 if test "${HAVE_XPM}" = "yes"; then
c0d27fcc 12071 echo "$as_me:$LINENO: result: yes" >&5
98418dba
CW
12072echo "${ECHO_T}yes" >&6
12073 else
c0d27fcc 12074 echo "$as_me:$LINENO: result: no" >&5
98418dba
CW
12075echo "${ECHO_T}no" >&6
12076 fi
12077 fi
12078 fi
12079
12080 if test "${HAVE_XPM}" = "yes"; then
b936fae4 12081
c0d27fcc 12082cat >>confdefs.h <<\_ACEOF
98418dba 12083#define HAVE_XPM 1
c0d27fcc 12084_ACEOF
98418dba
CW
12085
12086 fi
12087fi
12088
12089### Use -ljpeg if available, unless `--with-jpeg=no'.
12090HAVE_JPEG=no
12091if test "${HAVE_X11}" = "yes"; then
12092 if test "${with_jpeg}" != "no"; then
c0d27fcc
MR
12093 if test "${ac_cv_header_jerror_h+set}" = set; then
12094 echo "$as_me:$LINENO: checking for jerror.h" >&5
98418dba
CW
12095echo $ECHO_N "checking for jerror.h... $ECHO_C" >&6
12096if test "${ac_cv_header_jerror_h+set}" = set; then
12097 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
12098fi
12099echo "$as_me:$LINENO: result: $ac_cv_header_jerror_h" >&5
12100echo "${ECHO_T}$ac_cv_header_jerror_h" >&6
503d2be0 12101else
c0d27fcc
MR
12102 # Is the header compilable?
12103echo "$as_me:$LINENO: checking jerror.h usability" >&5
12104echo $ECHO_N "checking jerror.h usability... $ECHO_C" >&6
12105cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12106/* confdefs.h. */
12107_ACEOF
12108cat confdefs.h >>conftest.$ac_ext
12109cat >>conftest.$ac_ext <<_ACEOF
12110/* end confdefs.h. */
c0d27fcc
MR
12111$ac_includes_default
12112#include <jerror.h>
12113_ACEOF
12114rm -f conftest.$ac_objext
12115if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 12116 (eval $ac_compile) 2>conftest.er1
c0d27fcc 12117 ac_status=$?
edfaf76d
LK
12118 grep -v '^ *+' conftest.er1 >conftest.err
12119 rm -f conftest.er1
12120 cat conftest.err >&5
c0d27fcc
MR
12121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12122 (exit $ac_status); } &&
e143ad11
AS
12123 { ac_try='test -z "$ac_c_werror_flag"
12124 || test ! -s conftest.err'
edfaf76d
LK
12125 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12126 (eval $ac_try) 2>&5
12127 ac_status=$?
12128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12129 (exit $ac_status); }; } &&
12130 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
12131 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12132 (eval $ac_try) 2>&5
12133 ac_status=$?
12134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12135 (exit $ac_status); }; }; then
12136 ac_header_compiler=yes
12137else
12138 echo "$as_me: failed program was:" >&5
19650fd6
AS
12139sed 's/^/| /' conftest.$ac_ext >&5
12140
c0d27fcc
MR
12141ac_header_compiler=no
12142fi
edfaf76d 12143rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
12144echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12145echo "${ECHO_T}$ac_header_compiler" >&6
12146
12147# Is the header present?
12148echo "$as_me:$LINENO: checking jerror.h presence" >&5
12149echo $ECHO_N "checking jerror.h presence... $ECHO_C" >&6
12150cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12151/* confdefs.h. */
12152_ACEOF
12153cat confdefs.h >>conftest.$ac_ext
12154cat >>conftest.$ac_ext <<_ACEOF
12155/* end confdefs.h. */
98418dba
CW
12156#include <jerror.h>
12157_ACEOF
c0d27fcc 12158if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
12159 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12160 ac_status=$?
6bae0ccf 12161 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
12162 rm -f conftest.er1
12163 cat conftest.err >&5
c0d27fcc 12164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
12165 (exit $ac_status); } >/dev/null; then
12166 if test -s conftest.err; then
12167 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 12168 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
12169 else
12170 ac_cpp_err=
12171 fi
12172else
12173 ac_cpp_err=yes
503d2be0 12174fi
98418dba 12175if test -z "$ac_cpp_err"; then
c0d27fcc 12176 ac_header_preproc=yes
ba4481b5 12177else
98418dba 12178 echo "$as_me: failed program was:" >&5
19650fd6
AS
12179sed 's/^/| /' conftest.$ac_ext >&5
12180
c0d27fcc 12181 ac_header_preproc=no
98418dba
CW
12182fi
12183rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
12184echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12185echo "${ECHO_T}$ac_header_preproc" >&6
12186
12187# So? What about this header?
edfaf76d
LK
12188case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12189 yes:no: )
c0d27fcc
MR
12190 { echo "$as_me:$LINENO: WARNING: jerror.h: accepted by the compiler, rejected by the preprocessor!" >&5
12191echo "$as_me: WARNING: jerror.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
12192 { echo "$as_me:$LINENO: WARNING: jerror.h: proceeding with the compiler's result" >&5
12193echo "$as_me: WARNING: jerror.h: proceeding with the compiler's result" >&2;}
12194 ac_header_preproc=yes
19650fd6 12195 ;;
edfaf76d 12196 no:yes:* )
c0d27fcc
MR
12197 { echo "$as_me:$LINENO: WARNING: jerror.h: present but cannot be compiled" >&5
12198echo "$as_me: WARNING: jerror.h: present but cannot be compiled" >&2;}
edfaf76d
LK
12199 { echo "$as_me:$LINENO: WARNING: jerror.h: check for missing prerequisite headers?" >&5
12200echo "$as_me: WARNING: jerror.h: check for missing prerequisite headers?" >&2;}
12201 { echo "$as_me:$LINENO: WARNING: jerror.h: see the Autoconf documentation" >&5
12202echo "$as_me: WARNING: jerror.h: see the Autoconf documentation" >&2;}
12203 { echo "$as_me:$LINENO: WARNING: jerror.h: section \"Present But Cannot Be Compiled\"" >&5
12204echo "$as_me: WARNING: jerror.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 12205 { echo "$as_me:$LINENO: WARNING: jerror.h: proceeding with the preprocessor's result" >&5
19650fd6 12206echo "$as_me: WARNING: jerror.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
12207 { echo "$as_me:$LINENO: WARNING: jerror.h: in the future, the compiler will take precedence" >&5
12208echo "$as_me: WARNING: jerror.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
12209 (
12210 cat <<\_ASBOX
edfaf76d
LK
12211## ------------------------------------------ ##
12212## Report this to the AC_PACKAGE_NAME lists. ##
12213## ------------------------------------------ ##
19650fd6
AS
12214_ASBOX
12215 ) |
12216 sed "s/^/$as_me: WARNING: /" >&2
12217 ;;
c0d27fcc
MR
12218esac
12219echo "$as_me:$LINENO: checking for jerror.h" >&5
12220echo $ECHO_N "checking for jerror.h... $ECHO_C" >&6
12221if test "${ac_cv_header_jerror_h+set}" = set; then
12222 echo $ECHO_N "(cached) $ECHO_C" >&6
12223else
12224 ac_cv_header_jerror_h=$ac_header_preproc
ba4481b5 12225fi
c0d27fcc 12226echo "$as_me:$LINENO: result: $ac_cv_header_jerror_h" >&5
98418dba 12227echo "${ECHO_T}$ac_cv_header_jerror_h" >&6
c0d27fcc
MR
12228
12229fi
98418dba 12230if test $ac_cv_header_jerror_h = yes; then
c0d27fcc 12231 echo "$as_me:$LINENO: checking for jpeg_destroy_compress in -ljpeg" >&5
98418dba
CW
12232echo $ECHO_N "checking for jpeg_destroy_compress in -ljpeg... $ECHO_C" >&6
12233if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then
503d2be0 12234 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 12235else
98418dba
CW
12236 ac_check_lib_save_LIBS=$LIBS
12237LIBS="-ljpeg $LIBS"
12238cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12239/* confdefs.h. */
12240_ACEOF
12241cat confdefs.h >>conftest.$ac_ext
12242cat >>conftest.$ac_ext <<_ACEOF
12243/* end confdefs.h. */
98418dba
CW
12244
12245/* Override any gcc2 internal prototype to avoid an error. */
12246#ifdef __cplusplus
12247extern "C"
12248#endif
12249/* We use char because int might match the return type of a gcc2
12250 builtin and then its argument prototype would still apply. */
12251char jpeg_destroy_compress ();
503d2be0
AS
12252int
12253main ()
12254{
98418dba 12255jpeg_destroy_compress ();
503d2be0
AS
12256 ;
12257 return 0;
12258}
12259_ACEOF
12260rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 12261if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 12262 (eval $ac_link) 2>conftest.er1
503d2be0 12263 ac_status=$?
edfaf76d
LK
12264 grep -v '^ *+' conftest.er1 >conftest.err
12265 rm -f conftest.er1
12266 cat conftest.err >&5
c0d27fcc 12267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12268 (exit $ac_status); } &&
e143ad11
AS
12269 { ac_try='test -z "$ac_c_werror_flag"
12270 || test ! -s conftest.err'
edfaf76d
LK
12271 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12272 (eval $ac_try) 2>&5
12273 ac_status=$?
12274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12275 (exit $ac_status); }; } &&
12276 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 12277 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
12278 (eval $ac_try) 2>&5
12279 ac_status=$?
c0d27fcc 12280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12281 (exit $ac_status); }; }; then
98418dba 12282 ac_cv_lib_jpeg_jpeg_destroy_compress=yes
ba4481b5 12283else
503d2be0 12284 echo "$as_me: failed program was:" >&5
19650fd6
AS
12285sed 's/^/| /' conftest.$ac_ext >&5
12286
98418dba 12287ac_cv_lib_jpeg_jpeg_destroy_compress=no
ba4481b5 12288fi
edfaf76d
LK
12289rm -f conftest.err conftest.$ac_objext \
12290 conftest$ac_exeext conftest.$ac_ext
98418dba 12291LIBS=$ac_check_lib_save_LIBS
ba4481b5 12292fi
c0d27fcc 12293echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5
98418dba
CW
12294echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6
12295if test $ac_cv_lib_jpeg_jpeg_destroy_compress = yes; then
12296 HAVE_JPEG=yes
ba4481b5 12297fi
98418dba 12298
ba4481b5 12299fi
98418dba 12300
c0d27fcc 12301
ba4481b5 12302 fi
ba4481b5 12303
c0d27fcc 12304
98418dba 12305 if test "${HAVE_JPEG}" = "yes"; then
c0d27fcc 12306 cat >>confdefs.h <<\_ACEOF
98418dba 12307#define HAVE_JPEG 1
c0d27fcc 12308_ACEOF
98418dba
CW
12309
12310 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12311/* confdefs.h. */
12312_ACEOF
12313cat confdefs.h >>conftest.$ac_ext
12314cat >>conftest.$ac_ext <<_ACEOF
12315/* end confdefs.h. */
22044edf 12316#include <jpeglib.h>
98418dba
CW
12317 version=JPEG_LIB_VERSION
12318
12319_ACEOF
12320if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 12321 $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then
c0d27fcc 12322 cat >>confdefs.h <<\_ACEOF
98418dba 12323#define HAVE_JPEG 1
c0d27fcc 12324_ACEOF
ba4481b5 12325
98418dba 12326else
c0d27fcc 12327 { echo "$as_me:$LINENO: WARNING: libjpeg found, but not version 6b or later" >&5
98418dba
CW
12328echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;}
12329 HAVE_JPEG=no
ba4481b5 12330fi
98418dba 12331rm -f conftest*
ba4481b5 12332
98418dba
CW
12333 fi
12334fi
503d2be0 12335
98418dba
CW
12336### Use -lpng if available, unless `--with-png=no'.
12337HAVE_PNG=no
12338if test "${HAVE_X11}" = "yes"; then
12339 if test "${with_png}" != "no"; then
f57bd967
DL
12340 # Debian unstable as of July 2003 has multiple libpngs, and puts png.h
12341 # in /usr/include/libpng.
12342
12343
12344for ac_header in png.h libpng/png.h
12345do
12346as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12347if eval "test \"\${$as_ac_Header+set}\" = set"; then
12348 echo "$as_me:$LINENO: checking for $ac_header" >&5
12349echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12350if eval "test \"\${$as_ac_Header+set}\" = set"; then
503d2be0 12351 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 12352fi
f57bd967
DL
12353echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12354echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
503d2be0 12355else
c0d27fcc 12356 # Is the header compilable?
f57bd967
DL
12357echo "$as_me:$LINENO: checking $ac_header usability" >&5
12358echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
c0d27fcc 12359cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12360/* confdefs.h. */
12361_ACEOF
12362cat confdefs.h >>conftest.$ac_ext
12363cat >>conftest.$ac_ext <<_ACEOF
12364/* end confdefs.h. */
c0d27fcc 12365$ac_includes_default
f57bd967 12366#include <$ac_header>
c0d27fcc
MR
12367_ACEOF
12368rm -f conftest.$ac_objext
12369if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 12370 (eval $ac_compile) 2>conftest.er1
c0d27fcc 12371 ac_status=$?
edfaf76d
LK
12372 grep -v '^ *+' conftest.er1 >conftest.err
12373 rm -f conftest.er1
12374 cat conftest.err >&5
c0d27fcc
MR
12375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12376 (exit $ac_status); } &&
e143ad11
AS
12377 { ac_try='test -z "$ac_c_werror_flag"
12378 || test ! -s conftest.err'
edfaf76d
LK
12379 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12380 (eval $ac_try) 2>&5
12381 ac_status=$?
12382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12383 (exit $ac_status); }; } &&
12384 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
12385 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12386 (eval $ac_try) 2>&5
12387 ac_status=$?
12388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12389 (exit $ac_status); }; }; then
12390 ac_header_compiler=yes
12391else
12392 echo "$as_me: failed program was:" >&5
19650fd6
AS
12393sed 's/^/| /' conftest.$ac_ext >&5
12394
c0d27fcc
MR
12395ac_header_compiler=no
12396fi
edfaf76d 12397rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
12398echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12399echo "${ECHO_T}$ac_header_compiler" >&6
12400
12401# Is the header present?
f57bd967
DL
12402echo "$as_me:$LINENO: checking $ac_header presence" >&5
12403echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
c0d27fcc 12404cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12405/* confdefs.h. */
12406_ACEOF
12407cat confdefs.h >>conftest.$ac_ext
12408cat >>conftest.$ac_ext <<_ACEOF
12409/* end confdefs.h. */
f57bd967 12410#include <$ac_header>
503d2be0 12411_ACEOF
c0d27fcc 12412if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
12413 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12414 ac_status=$?
6bae0ccf 12415 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
12416 rm -f conftest.er1
12417 cat conftest.err >&5
c0d27fcc 12418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
12419 (exit $ac_status); } >/dev/null; then
12420 if test -s conftest.err; then
12421 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 12422 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
12423 else
12424 ac_cpp_err=
12425 fi
12426else
12427 ac_cpp_err=yes
12428fi
12429if test -z "$ac_cpp_err"; then
c0d27fcc 12430 ac_header_preproc=yes
503d2be0
AS
12431else
12432 echo "$as_me: failed program was:" >&5
19650fd6
AS
12433sed 's/^/| /' conftest.$ac_ext >&5
12434
c0d27fcc 12435 ac_header_preproc=no
ba4481b5 12436fi
503d2be0 12437rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
12438echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12439echo "${ECHO_T}$ac_header_preproc" >&6
12440
12441# So? What about this header?
edfaf76d
LK
12442case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12443 yes:no: )
f57bd967
DL
12444 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
12445echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
12446 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
12447echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
12448 ac_header_preproc=yes
19650fd6 12449 ;;
edfaf76d 12450 no:yes:* )
f57bd967
DL
12451 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
12452echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
12453 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
12454echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
12455 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
12456echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
12457 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
12458echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
f57bd967 12459 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 12460echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
12461 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
12462echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
12463 (
12464 cat <<\_ASBOX
edfaf76d
LK
12465## ------------------------------------------ ##
12466## Report this to the AC_PACKAGE_NAME lists. ##
12467## ------------------------------------------ ##
19650fd6
AS
12468_ASBOX
12469 ) |
12470 sed "s/^/$as_me: WARNING: /" >&2
12471 ;;
c0d27fcc 12472esac
f57bd967
DL
12473echo "$as_me:$LINENO: checking for $ac_header" >&5
12474echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12475if eval "test \"\${$as_ac_Header+set}\" = set"; then
c0d27fcc
MR
12476 echo $ECHO_N "(cached) $ECHO_C" >&6
12477else
edfaf76d 12478 eval "$as_ac_Header=\$ac_header_preproc"
f57bd967
DL
12479fi
12480echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12481echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12482
ba4481b5 12483fi
f57bd967
DL
12484if test `eval echo '${'$as_ac_Header'}'` = yes; then
12485 cat >>confdefs.h <<_ACEOF
12486#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12487_ACEOF
c0d27fcc
MR
12488
12489fi
f57bd967
DL
12490
12491done
12492
12493 if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then
12494 echo "$as_me:$LINENO: checking for png_get_channels in -lpng" >&5
98418dba
CW
12495echo $ECHO_N "checking for png_get_channels in -lpng... $ECHO_C" >&6
12496if test "${ac_cv_lib_png_png_get_channels+set}" = set; then
503d2be0 12497 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 12498else
98418dba
CW
12499 ac_check_lib_save_LIBS=$LIBS
12500LIBS="-lpng -lz -lm $LIBS"
12501cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12502/* confdefs.h. */
12503_ACEOF
12504cat confdefs.h >>conftest.$ac_ext
12505cat >>conftest.$ac_ext <<_ACEOF
12506/* end confdefs.h. */
98418dba 12507
ba4481b5 12508/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
12509#ifdef __cplusplus
12510extern "C"
12511#endif
ba4481b5 12512/* We use char because int might match the return type of a gcc2
503d2be0 12513 builtin and then its argument prototype would still apply. */
98418dba 12514char png_get_channels ();
503d2be0
AS
12515int
12516main ()
12517{
98418dba 12518png_get_channels ();
503d2be0
AS
12519 ;
12520 return 0;
12521}
12522_ACEOF
12523rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 12524if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 12525 (eval $ac_link) 2>conftest.er1
503d2be0 12526 ac_status=$?
edfaf76d
LK
12527 grep -v '^ *+' conftest.er1 >conftest.err
12528 rm -f conftest.er1
12529 cat conftest.err >&5
c0d27fcc 12530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 12531 (exit $ac_status); } &&
e143ad11
AS
12532 { ac_try='test -z "$ac_c_werror_flag"
12533 || test ! -s conftest.err'
edfaf76d
LK
12534 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12535 (eval $ac_try) 2>&5
12536 ac_status=$?
12537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12538 (exit $ac_status); }; } &&
12539 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 12540 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
12541 (eval $ac_try) 2>&5
12542 ac_status=$?
c0d27fcc 12543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12544 (exit $ac_status); }; }; then
98418dba 12545 ac_cv_lib_png_png_get_channels=yes
73b77ee5 12546else
98418dba 12547 echo "$as_me: failed program was:" >&5
19650fd6
AS
12548sed 's/^/| /' conftest.$ac_ext >&5
12549
98418dba 12550ac_cv_lib_png_png_get_channels=no
73b77ee5 12551fi
edfaf76d
LK
12552rm -f conftest.err conftest.$ac_objext \
12553 conftest$ac_exeext conftest.$ac_ext
98418dba 12554LIBS=$ac_check_lib_save_LIBS
73b77ee5 12555fi
c0d27fcc 12556echo "$as_me:$LINENO: result: $ac_cv_lib_png_png_get_channels" >&5
98418dba
CW
12557echo "${ECHO_T}$ac_cv_lib_png_png_get_channels" >&6
12558if test $ac_cv_lib_png_png_get_channels = yes; then
12559 HAVE_PNG=yes
73b77ee5 12560fi
503d2be0 12561
f57bd967 12562 fi
98418dba
CW
12563 fi
12564
12565 if test "${HAVE_PNG}" = "yes"; then
b936fae4 12566
c0d27fcc 12567cat >>confdefs.h <<\_ACEOF
98418dba 12568#define HAVE_PNG 1
c0d27fcc 12569_ACEOF
73b77ee5 12570
98418dba 12571 fi
73b77ee5
GM
12572fi
12573
98418dba
CW
12574### Use -ltiff if available, unless `--with-tiff=no'.
12575HAVE_TIFF=no
12576if test "${HAVE_X11}" = "yes"; then
12577 if test "${with_tiff}" != "no"; then
c0d27fcc
MR
12578 if test "${ac_cv_header_tiffio_h+set}" = set; then
12579 echo "$as_me:$LINENO: checking for tiffio.h" >&5
98418dba
CW
12580echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6
12581if test "${ac_cv_header_tiffio_h+set}" = set; then
12582 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
12583fi
12584echo "$as_me:$LINENO: result: $ac_cv_header_tiffio_h" >&5
12585echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6
98418dba 12586else
c0d27fcc
MR
12587 # Is the header compilable?
12588echo "$as_me:$LINENO: checking tiffio.h usability" >&5
12589echo $ECHO_N "checking tiffio.h usability... $ECHO_C" >&6
12590cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12591/* confdefs.h. */
12592_ACEOF
12593cat confdefs.h >>conftest.$ac_ext
12594cat >>conftest.$ac_ext <<_ACEOF
12595/* end confdefs.h. */
c0d27fcc
MR
12596$ac_includes_default
12597#include <tiffio.h>
12598_ACEOF
12599rm -f conftest.$ac_objext
12600if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 12601 (eval $ac_compile) 2>conftest.er1
c0d27fcc 12602 ac_status=$?
edfaf76d
LK
12603 grep -v '^ *+' conftest.er1 >conftest.err
12604 rm -f conftest.er1
12605 cat conftest.err >&5
c0d27fcc
MR
12606 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12607 (exit $ac_status); } &&
e143ad11
AS
12608 { ac_try='test -z "$ac_c_werror_flag"
12609 || test ! -s conftest.err'
edfaf76d
LK
12610 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12611 (eval $ac_try) 2>&5
12612 ac_status=$?
12613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12614 (exit $ac_status); }; } &&
12615 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
12616 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12617 (eval $ac_try) 2>&5
12618 ac_status=$?
12619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12620 (exit $ac_status); }; }; then
12621 ac_header_compiler=yes
12622else
12623 echo "$as_me: failed program was:" >&5
19650fd6
AS
12624sed 's/^/| /' conftest.$ac_ext >&5
12625
c0d27fcc
MR
12626ac_header_compiler=no
12627fi
edfaf76d 12628rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
12629echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12630echo "${ECHO_T}$ac_header_compiler" >&6
12631
12632# Is the header present?
12633echo "$as_me:$LINENO: checking tiffio.h presence" >&5
12634echo $ECHO_N "checking tiffio.h presence... $ECHO_C" >&6
12635cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12636/* confdefs.h. */
12637_ACEOF
12638cat confdefs.h >>conftest.$ac_ext
12639cat >>conftest.$ac_ext <<_ACEOF
12640/* end confdefs.h. */
98418dba
CW
12641#include <tiffio.h>
12642_ACEOF
c0d27fcc 12643if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
12644 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12645 ac_status=$?
6bae0ccf 12646 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
12647 rm -f conftest.er1
12648 cat conftest.err >&5
c0d27fcc 12649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
12650 (exit $ac_status); } >/dev/null; then
12651 if test -s conftest.err; then
12652 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 12653 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
12654 else
12655 ac_cpp_err=
12656 fi
12657else
12658 ac_cpp_err=yes
12659fi
12660if test -z "$ac_cpp_err"; then
c0d27fcc 12661 ac_header_preproc=yes
98418dba
CW
12662else
12663 echo "$as_me: failed program was:" >&5
19650fd6
AS
12664sed 's/^/| /' conftest.$ac_ext >&5
12665
c0d27fcc 12666 ac_header_preproc=no
98418dba
CW
12667fi
12668rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
12669echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12670echo "${ECHO_T}$ac_header_preproc" >&6
12671
12672# So? What about this header?
edfaf76d
LK
12673case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12674 yes:no: )
c0d27fcc
MR
12675 { echo "$as_me:$LINENO: WARNING: tiffio.h: accepted by the compiler, rejected by the preprocessor!" >&5
12676echo "$as_me: WARNING: tiffio.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
12677 { echo "$as_me:$LINENO: WARNING: tiffio.h: proceeding with the compiler's result" >&5
12678echo "$as_me: WARNING: tiffio.h: proceeding with the compiler's result" >&2;}
12679 ac_header_preproc=yes
19650fd6 12680 ;;
edfaf76d 12681 no:yes:* )
c0d27fcc
MR
12682 { echo "$as_me:$LINENO: WARNING: tiffio.h: present but cannot be compiled" >&5
12683echo "$as_me: WARNING: tiffio.h: present but cannot be compiled" >&2;}
edfaf76d
LK
12684 { echo "$as_me:$LINENO: WARNING: tiffio.h: check for missing prerequisite headers?" >&5
12685echo "$as_me: WARNING: tiffio.h: check for missing prerequisite headers?" >&2;}
12686 { echo "$as_me:$LINENO: WARNING: tiffio.h: see the Autoconf documentation" >&5
12687echo "$as_me: WARNING: tiffio.h: see the Autoconf documentation" >&2;}
12688 { echo "$as_me:$LINENO: WARNING: tiffio.h: section \"Present But Cannot Be Compiled\"" >&5
12689echo "$as_me: WARNING: tiffio.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 12690 { echo "$as_me:$LINENO: WARNING: tiffio.h: proceeding with the preprocessor's result" >&5
19650fd6 12691echo "$as_me: WARNING: tiffio.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
12692 { echo "$as_me:$LINENO: WARNING: tiffio.h: in the future, the compiler will take precedence" >&5
12693echo "$as_me: WARNING: tiffio.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
12694 (
12695 cat <<\_ASBOX
edfaf76d
LK
12696## ------------------------------------------ ##
12697## Report this to the AC_PACKAGE_NAME lists. ##
12698## ------------------------------------------ ##
19650fd6
AS
12699_ASBOX
12700 ) |
12701 sed "s/^/$as_me: WARNING: /" >&2
12702 ;;
c0d27fcc
MR
12703esac
12704echo "$as_me:$LINENO: checking for tiffio.h" >&5
12705echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6
12706if test "${ac_cv_header_tiffio_h+set}" = set; then
12707 echo $ECHO_N "(cached) $ECHO_C" >&6
12708else
12709 ac_cv_header_tiffio_h=$ac_header_preproc
98418dba 12710fi
c0d27fcc 12711echo "$as_me:$LINENO: result: $ac_cv_header_tiffio_h" >&5
98418dba 12712echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6
c0d27fcc
MR
12713
12714fi
98418dba
CW
12715if test $ac_cv_header_tiffio_h = yes; then
12716 tifflibs="-lz -lm"
12717 # At least one tiff package requires the jpeg library.
12718 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
c0d27fcc 12719 echo "$as_me:$LINENO: checking for TIFFGetVersion in -ltiff" >&5
98418dba
CW
12720echo $ECHO_N "checking for TIFFGetVersion in -ltiff... $ECHO_C" >&6
12721if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then
503d2be0 12722 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 12723else
503d2be0 12724 ac_check_lib_save_LIBS=$LIBS
98418dba 12725LIBS="-ltiff $tifflibs $LIBS"
503d2be0 12726cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12727/* confdefs.h. */
12728_ACEOF
12729cat confdefs.h >>conftest.$ac_ext
12730cat >>conftest.$ac_ext <<_ACEOF
12731/* end confdefs.h. */
503d2be0 12732
73b77ee5 12733/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
12734#ifdef __cplusplus
12735extern "C"
12736#endif
73b77ee5 12737/* We use char because int might match the return type of a gcc2
503d2be0 12738 builtin and then its argument prototype would still apply. */
98418dba 12739char TIFFGetVersion ();
503d2be0
AS
12740int
12741main ()
12742{
98418dba 12743TIFFGetVersion ();
503d2be0
AS
12744 ;
12745 return 0;
12746}
12747_ACEOF
12748rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 12749if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 12750 (eval $ac_link) 2>conftest.er1
503d2be0 12751 ac_status=$?
edfaf76d
LK
12752 grep -v '^ *+' conftest.er1 >conftest.err
12753 rm -f conftest.er1
12754 cat conftest.err >&5
c0d27fcc 12755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12756 (exit $ac_status); } &&
e143ad11
AS
12757 { ac_try='test -z "$ac_c_werror_flag"
12758 || test ! -s conftest.err'
edfaf76d
LK
12759 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12760 (eval $ac_try) 2>&5
12761 ac_status=$?
12762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12763 (exit $ac_status); }; } &&
12764 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 12765 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
12766 (eval $ac_try) 2>&5
12767 ac_status=$?
c0d27fcc 12768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12769 (exit $ac_status); }; }; then
98418dba 12770 ac_cv_lib_tiff_TIFFGetVersion=yes
503d2be0
AS
12771else
12772 echo "$as_me: failed program was:" >&5
19650fd6
AS
12773sed 's/^/| /' conftest.$ac_ext >&5
12774
98418dba 12775ac_cv_lib_tiff_TIFFGetVersion=no
503d2be0 12776fi
edfaf76d
LK
12777rm -f conftest.err conftest.$ac_objext \
12778 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
12779LIBS=$ac_check_lib_save_LIBS
12780fi
c0d27fcc 12781echo "$as_me:$LINENO: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5
98418dba
CW
12782echo "${ECHO_T}$ac_cv_lib_tiff_TIFFGetVersion" >&6
12783if test $ac_cv_lib_tiff_TIFFGetVersion = yes; then
12784 HAVE_TIFF=yes
12785fi
12786
12787fi
73b77ee5 12788
c0d27fcc 12789
98418dba
CW
12790 fi
12791
12792 if test "${HAVE_TIFF}" = "yes"; then
b936fae4 12793
c0d27fcc 12794cat >>confdefs.h <<\_ACEOF
98418dba 12795#define HAVE_TIFF 1
c0d27fcc 12796_ACEOF
98418dba
CW
12797
12798 fi
73b77ee5
GM
12799fi
12800
98418dba
CW
12801### Use -lgif if available, unless `--with-gif=no'.
12802HAVE_GIF=no
12803if test "${HAVE_X11}" = "yes"; then
12804 if test "${with_gif}" != "no"; then
c0d27fcc
MR
12805 if test "${ac_cv_header_gif_lib_h+set}" = set; then
12806 echo "$as_me:$LINENO: checking for gif_lib.h" >&5
98418dba
CW
12807echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6
12808if test "${ac_cv_header_gif_lib_h+set}" = set; then
12809 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
12810fi
12811echo "$as_me:$LINENO: result: $ac_cv_header_gif_lib_h" >&5
12812echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6
98418dba 12813else
c0d27fcc
MR
12814 # Is the header compilable?
12815echo "$as_me:$LINENO: checking gif_lib.h usability" >&5
12816echo $ECHO_N "checking gif_lib.h usability... $ECHO_C" >&6
12817cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12818/* confdefs.h. */
12819_ACEOF
12820cat confdefs.h >>conftest.$ac_ext
12821cat >>conftest.$ac_ext <<_ACEOF
12822/* end confdefs.h. */
c0d27fcc
MR
12823$ac_includes_default
12824#include <gif_lib.h>
12825_ACEOF
12826rm -f conftest.$ac_objext
12827if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 12828 (eval $ac_compile) 2>conftest.er1
c0d27fcc 12829 ac_status=$?
edfaf76d
LK
12830 grep -v '^ *+' conftest.er1 >conftest.err
12831 rm -f conftest.er1
12832 cat conftest.err >&5
c0d27fcc
MR
12833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12834 (exit $ac_status); } &&
e143ad11
AS
12835 { ac_try='test -z "$ac_c_werror_flag"
12836 || test ! -s conftest.err'
edfaf76d
LK
12837 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12838 (eval $ac_try) 2>&5
12839 ac_status=$?
12840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12841 (exit $ac_status); }; } &&
12842 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
12843 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12844 (eval $ac_try) 2>&5
12845 ac_status=$?
12846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12847 (exit $ac_status); }; }; then
12848 ac_header_compiler=yes
12849else
12850 echo "$as_me: failed program was:" >&5
19650fd6
AS
12851sed 's/^/| /' conftest.$ac_ext >&5
12852
c0d27fcc
MR
12853ac_header_compiler=no
12854fi
edfaf76d 12855rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
12856echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12857echo "${ECHO_T}$ac_header_compiler" >&6
12858
12859# Is the header present?
12860echo "$as_me:$LINENO: checking gif_lib.h presence" >&5
12861echo $ECHO_N "checking gif_lib.h presence... $ECHO_C" >&6
12862cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12863/* confdefs.h. */
12864_ACEOF
12865cat confdefs.h >>conftest.$ac_ext
12866cat >>conftest.$ac_ext <<_ACEOF
12867/* end confdefs.h. */
98418dba
CW
12868#include <gif_lib.h>
12869_ACEOF
c0d27fcc 12870if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
12871 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12872 ac_status=$?
6bae0ccf 12873 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
12874 rm -f conftest.er1
12875 cat conftest.err >&5
c0d27fcc 12876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
12877 (exit $ac_status); } >/dev/null; then
12878 if test -s conftest.err; then
12879 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 12880 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
12881 else
12882 ac_cpp_err=
12883 fi
12884else
12885 ac_cpp_err=yes
12886fi
12887if test -z "$ac_cpp_err"; then
c0d27fcc 12888 ac_header_preproc=yes
98418dba
CW
12889else
12890 echo "$as_me: failed program was:" >&5
19650fd6
AS
12891sed 's/^/| /' conftest.$ac_ext >&5
12892
c0d27fcc 12893 ac_header_preproc=no
98418dba
CW
12894fi
12895rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
12896echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12897echo "${ECHO_T}$ac_header_preproc" >&6
12898
12899# So? What about this header?
edfaf76d
LK
12900case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12901 yes:no: )
c0d27fcc
MR
12902 { echo "$as_me:$LINENO: WARNING: gif_lib.h: accepted by the compiler, rejected by the preprocessor!" >&5
12903echo "$as_me: WARNING: gif_lib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
12904 { echo "$as_me:$LINENO: WARNING: gif_lib.h: proceeding with the compiler's result" >&5
12905echo "$as_me: WARNING: gif_lib.h: proceeding with the compiler's result" >&2;}
12906 ac_header_preproc=yes
19650fd6 12907 ;;
edfaf76d 12908 no:yes:* )
c0d27fcc
MR
12909 { echo "$as_me:$LINENO: WARNING: gif_lib.h: present but cannot be compiled" >&5
12910echo "$as_me: WARNING: gif_lib.h: present but cannot be compiled" >&2;}
edfaf76d
LK
12911 { echo "$as_me:$LINENO: WARNING: gif_lib.h: check for missing prerequisite headers?" >&5
12912echo "$as_me: WARNING: gif_lib.h: check for missing prerequisite headers?" >&2;}
12913 { echo "$as_me:$LINENO: WARNING: gif_lib.h: see the Autoconf documentation" >&5
12914echo "$as_me: WARNING: gif_lib.h: see the Autoconf documentation" >&2;}
12915 { echo "$as_me:$LINENO: WARNING: gif_lib.h: section \"Present But Cannot Be Compiled\"" >&5
12916echo "$as_me: WARNING: gif_lib.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 12917 { echo "$as_me:$LINENO: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&5
19650fd6 12918echo "$as_me: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
12919 { echo "$as_me:$LINENO: WARNING: gif_lib.h: in the future, the compiler will take precedence" >&5
12920echo "$as_me: WARNING: gif_lib.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
12921 (
12922 cat <<\_ASBOX
edfaf76d
LK
12923## ------------------------------------------ ##
12924## Report this to the AC_PACKAGE_NAME lists. ##
12925## ------------------------------------------ ##
19650fd6
AS
12926_ASBOX
12927 ) |
12928 sed "s/^/$as_me: WARNING: /" >&2
12929 ;;
c0d27fcc
MR
12930esac
12931echo "$as_me:$LINENO: checking for gif_lib.h" >&5
12932echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6
12933if test "${ac_cv_header_gif_lib_h+set}" = set; then
12934 echo $ECHO_N "(cached) $ECHO_C" >&6
12935else
12936 ac_cv_header_gif_lib_h=$ac_header_preproc
98418dba 12937fi
c0d27fcc 12938echo "$as_me:$LINENO: result: $ac_cv_header_gif_lib_h" >&5
98418dba 12939echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6
c0d27fcc
MR
12940
12941fi
98418dba
CW
12942if test $ac_cv_header_gif_lib_h = yes; then
12943 # EGifPutExtensionLast only exists from version libungif-4.1.0b1.
12944# Earlier versions can crash Emacs.
c0d27fcc 12945 echo "$as_me:$LINENO: checking for EGifPutExtensionLast in -lungif" >&5
98418dba
CW
12946echo $ECHO_N "checking for EGifPutExtensionLast in -lungif... $ECHO_C" >&6
12947if test "${ac_cv_lib_ungif_EGifPutExtensionLast+set}" = set; then
503d2be0 12948 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 12949else
503d2be0 12950 ac_check_lib_save_LIBS=$LIBS
98418dba 12951LIBS="-lungif $LIBS"
503d2be0 12952cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12953/* confdefs.h. */
12954_ACEOF
12955cat confdefs.h >>conftest.$ac_ext
12956cat >>conftest.$ac_ext <<_ACEOF
12957/* end confdefs.h. */
73b77ee5 12958
98418dba
CW
12959/* Override any gcc2 internal prototype to avoid an error. */
12960#ifdef __cplusplus
12961extern "C"
12962#endif
12963/* We use char because int might match the return type of a gcc2
12964 builtin and then its argument prototype would still apply. */
12965char EGifPutExtensionLast ();
503d2be0
AS
12966int
12967main ()
12968{
98418dba 12969EGifPutExtensionLast ();
503d2be0
AS
12970 ;
12971 return 0;
12972}
12973_ACEOF
12974rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 12975if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 12976 (eval $ac_link) 2>conftest.er1
503d2be0 12977 ac_status=$?
edfaf76d
LK
12978 grep -v '^ *+' conftest.er1 >conftest.err
12979 rm -f conftest.er1
12980 cat conftest.err >&5
c0d27fcc 12981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 12982 (exit $ac_status); } &&
e143ad11
AS
12983 { ac_try='test -z "$ac_c_werror_flag"
12984 || test ! -s conftest.err'
edfaf76d
LK
12985 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12986 (eval $ac_try) 2>&5
12987 ac_status=$?
12988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12989 (exit $ac_status); }; } &&
12990 { ac_try='test -s conftest$ac_exeext'
35996d22
AS
12991 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12992 (eval $ac_try) 2>&5
12993 ac_status=$?
12994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12995 (exit $ac_status); }; }; then
12996 ac_cv_lib_ungif_EGifPutExtensionLast=yes
12997else
98418dba 12998 echo "$as_me: failed program was:" >&5
19650fd6
AS
12999sed 's/^/| /' conftest.$ac_ext >&5
13000
98418dba
CW
13001ac_cv_lib_ungif_EGifPutExtensionLast=no
13002fi
edfaf76d
LK
13003rm -f conftest.err conftest.$ac_objext \
13004 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
13005LIBS=$ac_check_lib_save_LIBS
13006fi
c0d27fcc 13007echo "$as_me:$LINENO: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5
98418dba
CW
13008echo "${ECHO_T}$ac_cv_lib_ungif_EGifPutExtensionLast" >&6
13009if test $ac_cv_lib_ungif_EGifPutExtensionLast = yes; then
13010 HAVE_GIF=yes
13011fi
13012
13013fi
13014
c0d27fcc 13015
98418dba
CW
13016 fi
13017
13018 if test "${HAVE_GIF}" = "yes"; then
b936fae4 13019
c0d27fcc 13020cat >>confdefs.h <<\_ACEOF
98418dba 13021#define HAVE_GIF 1
c0d27fcc 13022_ACEOF
98418dba
CW
13023
13024 fi
13025fi
13026
cef11da2
ST
13027if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
13028 echo "$as_me:$LINENO: checking for malloc/malloc.h" >&5
13029echo $ECHO_N "checking for malloc/malloc.h... $ECHO_C" >&6
13030if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
13031 echo $ECHO_N "(cached) $ECHO_C" >&6
13032fi
13033echo "$as_me:$LINENO: result: $ac_cv_header_malloc_malloc_h" >&5
13034echo "${ECHO_T}$ac_cv_header_malloc_malloc_h" >&6
13035else
13036 # Is the header compilable?
13037echo "$as_me:$LINENO: checking malloc/malloc.h usability" >&5
13038echo $ECHO_N "checking malloc/malloc.h usability... $ECHO_C" >&6
13039cat >conftest.$ac_ext <<_ACEOF
13040/* confdefs.h. */
13041_ACEOF
13042cat confdefs.h >>conftest.$ac_ext
13043cat >>conftest.$ac_ext <<_ACEOF
13044/* end confdefs.h. */
13045$ac_includes_default
13046#include <malloc/malloc.h>
13047_ACEOF
13048rm -f conftest.$ac_objext
13049if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 13050 (eval $ac_compile) 2>conftest.er1
cef11da2 13051 ac_status=$?
edfaf76d
LK
13052 grep -v '^ *+' conftest.er1 >conftest.err
13053 rm -f conftest.er1
13054 cat conftest.err >&5
cef11da2
ST
13055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13056 (exit $ac_status); } &&
e143ad11
AS
13057 { ac_try='test -z "$ac_c_werror_flag"
13058 || test ! -s conftest.err'
edfaf76d
LK
13059 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13060 (eval $ac_try) 2>&5
13061 ac_status=$?
13062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13063 (exit $ac_status); }; } &&
13064 { ac_try='test -s conftest.$ac_objext'
cef11da2
ST
13065 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13066 (eval $ac_try) 2>&5
13067 ac_status=$?
13068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13069 (exit $ac_status); }; }; then
13070 ac_header_compiler=yes
13071else
13072 echo "$as_me: failed program was:" >&5
13073sed 's/^/| /' conftest.$ac_ext >&5
13074
13075ac_header_compiler=no
13076fi
edfaf76d 13077rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
cef11da2
ST
13078echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13079echo "${ECHO_T}$ac_header_compiler" >&6
13080
13081# Is the header present?
13082echo "$as_me:$LINENO: checking malloc/malloc.h presence" >&5
13083echo $ECHO_N "checking malloc/malloc.h presence... $ECHO_C" >&6
13084cat >conftest.$ac_ext <<_ACEOF
13085/* confdefs.h. */
13086_ACEOF
13087cat confdefs.h >>conftest.$ac_ext
13088cat >>conftest.$ac_ext <<_ACEOF
13089/* end confdefs.h. */
13090#include <malloc/malloc.h>
13091_ACEOF
13092if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
13093 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13094 ac_status=$?
13095 grep -v '^ *+' conftest.er1 >conftest.err
13096 rm -f conftest.er1
13097 cat conftest.err >&5
13098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13099 (exit $ac_status); } >/dev/null; then
13100 if test -s conftest.err; then
13101 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 13102 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
cef11da2
ST
13103 else
13104 ac_cpp_err=
13105 fi
13106else
13107 ac_cpp_err=yes
13108fi
13109if test -z "$ac_cpp_err"; then
13110 ac_header_preproc=yes
13111else
13112 echo "$as_me: failed program was:" >&5
13113sed 's/^/| /' conftest.$ac_ext >&5
13114
13115 ac_header_preproc=no
13116fi
13117rm -f conftest.err conftest.$ac_ext
13118echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13119echo "${ECHO_T}$ac_header_preproc" >&6
13120
13121# So? What about this header?
edfaf76d
LK
13122case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13123 yes:no: )
cef11da2
ST
13124 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: accepted by the compiler, rejected by the preprocessor!" >&5
13125echo "$as_me: WARNING: malloc/malloc.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
13126 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: proceeding with the compiler's result" >&5
13127echo "$as_me: WARNING: malloc/malloc.h: proceeding with the compiler's result" >&2;}
13128 ac_header_preproc=yes
cef11da2 13129 ;;
edfaf76d 13130 no:yes:* )
cef11da2
ST
13131 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: present but cannot be compiled" >&5
13132echo "$as_me: WARNING: malloc/malloc.h: present but cannot be compiled" >&2;}
edfaf76d
LK
13133 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: check for missing prerequisite headers?" >&5
13134echo "$as_me: WARNING: malloc/malloc.h: check for missing prerequisite headers?" >&2;}
13135 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: see the Autoconf documentation" >&5
13136echo "$as_me: WARNING: malloc/malloc.h: see the Autoconf documentation" >&2;}
13137 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: section \"Present But Cannot Be Compiled\"" >&5
13138echo "$as_me: WARNING: malloc/malloc.h: section \"Present But Cannot Be Compiled\"" >&2;}
cef11da2
ST
13139 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: proceeding with the preprocessor's result" >&5
13140echo "$as_me: WARNING: malloc/malloc.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
13141 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: in the future, the compiler will take precedence" >&5
13142echo "$as_me: WARNING: malloc/malloc.h: in the future, the compiler will take precedence" >&2;}
cef11da2
ST
13143 (
13144 cat <<\_ASBOX
edfaf76d
LK
13145## ------------------------------------------ ##
13146## Report this to the AC_PACKAGE_NAME lists. ##
13147## ------------------------------------------ ##
cef11da2
ST
13148_ASBOX
13149 ) |
13150 sed "s/^/$as_me: WARNING: /" >&2
13151 ;;
13152esac
13153echo "$as_me:$LINENO: checking for malloc/malloc.h" >&5
13154echo $ECHO_N "checking for malloc/malloc.h... $ECHO_C" >&6
13155if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
13156 echo $ECHO_N "(cached) $ECHO_C" >&6
13157else
13158 ac_cv_header_malloc_malloc_h=$ac_header_preproc
13159fi
13160echo "$as_me:$LINENO: result: $ac_cv_header_malloc_malloc_h" >&5
13161echo "${ECHO_T}$ac_cv_header_malloc_malloc_h" >&6
13162
13163fi
13164if test $ac_cv_header_malloc_malloc_h = yes; then
13165
13166cat >>confdefs.h <<\_ACEOF
13167#define HAVE_MALLOC_MALLOC_H 1
13168_ACEOF
13169
13170fi
13171
13172
13173
5d6da11e 13174### Use Mac OS X Carbon API to implement GUI.
e0f712ba 13175if test "${HAVE_CARBON}" = "yes"; then
e3ba1015 13176
c0d27fcc 13177cat >>confdefs.h <<\_ACEOF
e0f712ba 13178#define HAVE_CARBON 1
c0d27fcc 13179_ACEOF
e0f712ba 13180
6a3a24fa
JD
13181 ## Specify the install directory
13182 carbon_appdir=
13183 if test "${carbon_appdir_x}" != ""; then
13184 case ${carbon_appdir_x} in
13185 y | ye | yes) carbon_appdir=/Applications ;;
13186 * ) carbon_appdir=${carbon_appdir_x} ;;
13187 esac
13188 fi
8f417b3b
AS
13189 # We also have mouse menus.
13190 HAVE_MENUS=yes
7c9e5167
JD
13191
13192 tmp_CFLAGS="$CFLAGS"
13193 CFLAGS="$CFLAGS -framework Carbon"
13194 echo "$as_me:$LINENO: checking for CancelMenuTracking" >&5
13195echo $ECHO_N "checking for CancelMenuTracking... $ECHO_C" >&6
13196if test "${ac_cv_func_CancelMenuTracking+set}" = set; then
13197 echo $ECHO_N "(cached) $ECHO_C" >&6
13198else
13199 cat >conftest.$ac_ext <<_ACEOF
7c9e5167
JD
13200/* confdefs.h. */
13201_ACEOF
13202cat confdefs.h >>conftest.$ac_ext
13203cat >>conftest.$ac_ext <<_ACEOF
13204/* end confdefs.h. */
edfaf76d
LK
13205/* Define CancelMenuTracking to an innocuous variant, in case <limits.h> declares CancelMenuTracking.
13206 For example, HP-UX 11i <limits.h> declares gettimeofday. */
13207#define CancelMenuTracking innocuous_CancelMenuTracking
13208
7c9e5167
JD
13209/* System header to define __stub macros and hopefully few prototypes,
13210 which can conflict with char CancelMenuTracking (); below.
13211 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13212 <limits.h> exists even on freestanding compilers. */
edfaf76d 13213
7c9e5167
JD
13214#ifdef __STDC__
13215# include <limits.h>
13216#else
13217# include <assert.h>
13218#endif
edfaf76d
LK
13219
13220#undef CancelMenuTracking
13221
7c9e5167
JD
13222/* Override any gcc2 internal prototype to avoid an error. */
13223#ifdef __cplusplus
13224extern "C"
13225{
13226#endif
13227/* We use char because int might match the return type of a gcc2
13228 builtin and then its argument prototype would still apply. */
13229char CancelMenuTracking ();
13230/* The GNU C library defines this for functions which it implements
13231 to always fail with ENOSYS. Some functions are actually named
13232 something starting with __ and the normal name is an alias. */
13233#if defined (__stub_CancelMenuTracking) || defined (__stub___CancelMenuTracking)
13234choke me
13235#else
13236char (*f) () = CancelMenuTracking;
13237#endif
13238#ifdef __cplusplus
13239}
13240#endif
13241
13242int
13243main ()
13244{
13245return f != CancelMenuTracking;
13246 ;
13247 return 0;
13248}
13249_ACEOF
13250rm -f conftest.$ac_objext conftest$ac_exeext
13251if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 13252 (eval $ac_link) 2>conftest.er1
7c9e5167 13253 ac_status=$?
edfaf76d
LK
13254 grep -v '^ *+' conftest.er1 >conftest.err
13255 rm -f conftest.er1
13256 cat conftest.err >&5
7c9e5167
JD
13257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13258 (exit $ac_status); } &&
e143ad11
AS
13259 { ac_try='test -z "$ac_c_werror_flag"
13260 || test ! -s conftest.err'
edfaf76d
LK
13261 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13262 (eval $ac_try) 2>&5
13263 ac_status=$?
13264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13265 (exit $ac_status); }; } &&
13266 { ac_try='test -s conftest$ac_exeext'
7c9e5167
JD
13267 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13268 (eval $ac_try) 2>&5
13269 ac_status=$?
13270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13271 (exit $ac_status); }; }; then
13272 ac_cv_func_CancelMenuTracking=yes
13273else
13274 echo "$as_me: failed program was:" >&5
13275sed 's/^/| /' conftest.$ac_ext >&5
13276
13277ac_cv_func_CancelMenuTracking=no
13278fi
edfaf76d
LK
13279rm -f conftest.err conftest.$ac_objext \
13280 conftest$ac_exeext conftest.$ac_ext
7c9e5167
JD
13281fi
13282echo "$as_me:$LINENO: result: $ac_cv_func_CancelMenuTracking" >&5
13283echo "${ECHO_T}$ac_cv_func_CancelMenuTracking" >&6
13284if test $ac_cv_func_CancelMenuTracking = yes; then
13285 have_cmt=yes
13286else
13287 have_cmt=no
13288fi
13289
13290 if test "$have_cmt" = yes; then
13291
13292cat >>confdefs.h <<\_ACEOF
13293#define HAVE_CANCELMENUTRACKING 1
13294_ACEOF
13295
13296 fi
13297 CFLAGS="$tmp_CFLAGS"
e0f712ba
AC
13298fi
13299
98418dba
CW
13300### Use session management (-lSM -lICE) if available
13301HAVE_X_SM=no
13302if test "${HAVE_X11}" = "yes"; then
c0d27fcc
MR
13303 if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
13304 echo "$as_me:$LINENO: checking for X11/SM/SMlib.h" >&5
98418dba
CW
13305echo $ECHO_N "checking for X11/SM/SMlib.h... $ECHO_C" >&6
13306if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
13307 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
13308fi
13309echo "$as_me:$LINENO: result: $ac_cv_header_X11_SM_SMlib_h" >&5
13310echo "${ECHO_T}$ac_cv_header_X11_SM_SMlib_h" >&6
503d2be0 13311else
c0d27fcc
MR
13312 # Is the header compilable?
13313echo "$as_me:$LINENO: checking X11/SM/SMlib.h usability" >&5
13314echo $ECHO_N "checking X11/SM/SMlib.h usability... $ECHO_C" >&6
13315cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13316/* confdefs.h. */
13317_ACEOF
13318cat confdefs.h >>conftest.$ac_ext
13319cat >>conftest.$ac_ext <<_ACEOF
13320/* end confdefs.h. */
c0d27fcc
MR
13321$ac_includes_default
13322#include <X11/SM/SMlib.h>
13323_ACEOF
13324rm -f conftest.$ac_objext
13325if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 13326 (eval $ac_compile) 2>conftest.er1
c0d27fcc 13327 ac_status=$?
edfaf76d
LK
13328 grep -v '^ *+' conftest.er1 >conftest.err
13329 rm -f conftest.er1
13330 cat conftest.err >&5
c0d27fcc
MR
13331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13332 (exit $ac_status); } &&
e143ad11
AS
13333 { ac_try='test -z "$ac_c_werror_flag"
13334 || test ! -s conftest.err'
edfaf76d
LK
13335 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13336 (eval $ac_try) 2>&5
13337 ac_status=$?
13338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13339 (exit $ac_status); }; } &&
13340 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
13341 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13342 (eval $ac_try) 2>&5
13343 ac_status=$?
13344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13345 (exit $ac_status); }; }; then
13346 ac_header_compiler=yes
13347else
13348 echo "$as_me: failed program was:" >&5
19650fd6
AS
13349sed 's/^/| /' conftest.$ac_ext >&5
13350
c0d27fcc
MR
13351ac_header_compiler=no
13352fi
edfaf76d 13353rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
13354echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13355echo "${ECHO_T}$ac_header_compiler" >&6
13356
13357# Is the header present?
13358echo "$as_me:$LINENO: checking X11/SM/SMlib.h presence" >&5
13359echo $ECHO_N "checking X11/SM/SMlib.h presence... $ECHO_C" >&6
13360cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13361/* confdefs.h. */
13362_ACEOF
13363cat confdefs.h >>conftest.$ac_ext
13364cat >>conftest.$ac_ext <<_ACEOF
13365/* end confdefs.h. */
98418dba
CW
13366#include <X11/SM/SMlib.h>
13367_ACEOF
c0d27fcc 13368if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
13369 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13370 ac_status=$?
6bae0ccf 13371 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
13372 rm -f conftest.er1
13373 cat conftest.err >&5
c0d27fcc 13374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
13375 (exit $ac_status); } >/dev/null; then
13376 if test -s conftest.err; then
13377 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 13378 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
13379 else
13380 ac_cpp_err=
13381 fi
13382else
13383 ac_cpp_err=yes
503d2be0 13384fi
98418dba 13385if test -z "$ac_cpp_err"; then
c0d27fcc 13386 ac_header_preproc=yes
98418dba
CW
13387else
13388 echo "$as_me: failed program was:" >&5
19650fd6
AS
13389sed 's/^/| /' conftest.$ac_ext >&5
13390
c0d27fcc 13391 ac_header_preproc=no
98418dba
CW
13392fi
13393rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
13394echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13395echo "${ECHO_T}$ac_header_preproc" >&6
13396
13397# So? What about this header?
edfaf76d
LK
13398case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13399 yes:no: )
c0d27fcc
MR
13400 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
13401echo "$as_me: WARNING: X11/SM/SMlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
13402 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: proceeding with the compiler's result" >&5
13403echo "$as_me: WARNING: X11/SM/SMlib.h: proceeding with the compiler's result" >&2;}
13404 ac_header_preproc=yes
19650fd6 13405 ;;
edfaf76d 13406 no:yes:* )
c0d27fcc
MR
13407 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: present but cannot be compiled" >&5
13408echo "$as_me: WARNING: X11/SM/SMlib.h: present but cannot be compiled" >&2;}
edfaf76d
LK
13409 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: check for missing prerequisite headers?" >&5
13410echo "$as_me: WARNING: X11/SM/SMlib.h: check for missing prerequisite headers?" >&2;}
13411 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: see the Autoconf documentation" >&5
13412echo "$as_me: WARNING: X11/SM/SMlib.h: see the Autoconf documentation" >&2;}
13413 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: section \"Present But Cannot Be Compiled\"" >&5
13414echo "$as_me: WARNING: X11/SM/SMlib.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 13415 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&5
19650fd6 13416echo "$as_me: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
13417 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: in the future, the compiler will take precedence" >&5
13418echo "$as_me: WARNING: X11/SM/SMlib.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
13419 (
13420 cat <<\_ASBOX
edfaf76d
LK
13421## ------------------------------------------ ##
13422## Report this to the AC_PACKAGE_NAME lists. ##
13423## ------------------------------------------ ##
19650fd6
AS
13424_ASBOX
13425 ) |
13426 sed "s/^/$as_me: WARNING: /" >&2
13427 ;;
c0d27fcc
MR
13428esac
13429echo "$as_me:$LINENO: checking for X11/SM/SMlib.h" >&5
13430echo $ECHO_N "checking for X11/SM/SMlib.h... $ECHO_C" >&6
13431if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
13432 echo $ECHO_N "(cached) $ECHO_C" >&6
13433else
13434 ac_cv_header_X11_SM_SMlib_h=$ac_header_preproc
73b77ee5 13435fi
c0d27fcc 13436echo "$as_me:$LINENO: result: $ac_cv_header_X11_SM_SMlib_h" >&5
98418dba 13437echo "${ECHO_T}$ac_cv_header_X11_SM_SMlib_h" >&6
c0d27fcc
MR
13438
13439fi
98418dba 13440if test $ac_cv_header_X11_SM_SMlib_h = yes; then
c0d27fcc 13441 echo "$as_me:$LINENO: checking for SmcOpenConnection in -lSM" >&5
98418dba
CW
13442echo $ECHO_N "checking for SmcOpenConnection in -lSM... $ECHO_C" >&6
13443if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then
503d2be0 13444 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 13445else
503d2be0 13446 ac_check_lib_save_LIBS=$LIBS
1660500f 13447LIBS="-lSM -lICE $LIBS"
503d2be0 13448cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13449/* confdefs.h. */
13450_ACEOF
13451cat confdefs.h >>conftest.$ac_ext
13452cat >>conftest.$ac_ext <<_ACEOF
13453/* end confdefs.h. */
503d2be0 13454
73b77ee5 13455/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
13456#ifdef __cplusplus
13457extern "C"
13458#endif
73b77ee5 13459/* We use char because int might match the return type of a gcc2
503d2be0 13460 builtin and then its argument prototype would still apply. */
98418dba 13461char SmcOpenConnection ();
503d2be0
AS
13462int
13463main ()
13464{
98418dba 13465SmcOpenConnection ();
503d2be0
AS
13466 ;
13467 return 0;
13468}
13469_ACEOF
13470rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13471if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 13472 (eval $ac_link) 2>conftest.er1
503d2be0 13473 ac_status=$?
edfaf76d
LK
13474 grep -v '^ *+' conftest.er1 >conftest.err
13475 rm -f conftest.er1
13476 cat conftest.err >&5
c0d27fcc 13477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13478 (exit $ac_status); } &&
e143ad11
AS
13479 { ac_try='test -z "$ac_c_werror_flag"
13480 || test ! -s conftest.err'
edfaf76d
LK
13481 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13482 (eval $ac_try) 2>&5
13483 ac_status=$?
13484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13485 (exit $ac_status); }; } &&
13486 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13487 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13488 (eval $ac_try) 2>&5
13489 ac_status=$?
c0d27fcc 13490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13491 (exit $ac_status); }; }; then
98418dba 13492 ac_cv_lib_SM_SmcOpenConnection=yes
503d2be0
AS
13493else
13494 echo "$as_me: failed program was:" >&5
19650fd6
AS
13495sed 's/^/| /' conftest.$ac_ext >&5
13496
98418dba 13497ac_cv_lib_SM_SmcOpenConnection=no
503d2be0 13498fi
edfaf76d
LK
13499rm -f conftest.err conftest.$ac_objext \
13500 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
13501LIBS=$ac_check_lib_save_LIBS
13502fi
c0d27fcc 13503echo "$as_me:$LINENO: result: $ac_cv_lib_SM_SmcOpenConnection" >&5
98418dba
CW
13504echo "${ECHO_T}$ac_cv_lib_SM_SmcOpenConnection" >&6
13505if test $ac_cv_lib_SM_SmcOpenConnection = yes; then
13506 HAVE_X_SM=yes
73b77ee5
GM
13507fi
13508
73b77ee5 13509fi
73b77ee5 13510
c0d27fcc
MR
13511
13512
98418dba 13513 if test "${HAVE_X_SM}" = "yes"; then
b936fae4 13514
c0d27fcc 13515cat >>confdefs.h <<\_ACEOF
98418dba 13516#define HAVE_X_SM 1
c0d27fcc 13517_ACEOF
73b77ee5 13518
98418dba
CW
13519 case "$LIBS" in
13520 *-lSM*) ;;
13521 *) LIBS="-lSM -lICE $LIBS" ;;
13522 esac
73b77ee5 13523 fi
98418dba 13524fi
73b77ee5 13525
98418dba 13526# If netdb.h doesn't declare h_errno, we must declare it by hand.
c0d27fcc 13527echo "$as_me:$LINENO: checking whether netdb declares h_errno" >&5
98418dba
CW
13528echo $ECHO_N "checking whether netdb declares h_errno... $ECHO_C" >&6
13529if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then
13530 echo $ECHO_N "(cached) $ECHO_C" >&6
13531else
13532 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13533/* confdefs.h. */
13534_ACEOF
13535cat confdefs.h >>conftest.$ac_ext
13536cat >>conftest.$ac_ext <<_ACEOF
13537/* end confdefs.h. */
98418dba 13538#include <netdb.h>
503d2be0
AS
13539int
13540main ()
13541{
98418dba 13542return h_errno;
503d2be0
AS
13543 ;
13544 return 0;
13545}
13546_ACEOF
13547rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13548if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 13549 (eval $ac_link) 2>conftest.er1
503d2be0 13550 ac_status=$?
edfaf76d
LK
13551 grep -v '^ *+' conftest.er1 >conftest.err
13552 rm -f conftest.er1
13553 cat conftest.err >&5
c0d27fcc 13554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13555 (exit $ac_status); } &&
e143ad11
AS
13556 { ac_try='test -z "$ac_c_werror_flag"
13557 || test ! -s conftest.err'
edfaf76d
LK
13558 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13559 (eval $ac_try) 2>&5
13560 ac_status=$?
13561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13562 (exit $ac_status); }; } &&
13563 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13564 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13565 (eval $ac_try) 2>&5
13566 ac_status=$?
c0d27fcc 13567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13568 (exit $ac_status); }; }; then
98418dba 13569 emacs_cv_netdb_declares_h_errno=yes
73b77ee5 13570else
503d2be0 13571 echo "$as_me: failed program was:" >&5
19650fd6
AS
13572sed 's/^/| /' conftest.$ac_ext >&5
13573
98418dba 13574emacs_cv_netdb_declares_h_errno=no
73b77ee5 13575fi
edfaf76d
LK
13576rm -f conftest.err conftest.$ac_objext \
13577 conftest$ac_exeext conftest.$ac_ext
98418dba 13578fi
c0d27fcc 13579echo "$as_me:$LINENO: result: $emacs_cv_netdb_declares_h_errno" >&5
98418dba
CW
13580echo "${ECHO_T}$emacs_cv_netdb_declares_h_errno" >&6
13581if test $emacs_cv_netdb_declares_h_errno = yes; then
b936fae4 13582
c0d27fcc 13583cat >>confdefs.h <<\_ACEOF
98418dba 13584#define HAVE_H_ERRNO 1
c0d27fcc 13585_ACEOF
73b77ee5 13586
98418dba
CW
13587fi
13588
13589# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
13590# for constant arguments. Useless!
c0d27fcc 13591echo "$as_me:$LINENO: checking for working alloca.h" >&5
98418dba
CW
13592echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
13593if test "${ac_cv_working_alloca_h+set}" = set; then
13594 echo $ECHO_N "(cached) $ECHO_C" >&6
13595else
13596 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13597/* confdefs.h. */
13598_ACEOF
13599cat confdefs.h >>conftest.$ac_ext
13600cat >>conftest.$ac_ext <<_ACEOF
13601/* end confdefs.h. */
98418dba 13602#include <alloca.h>
503d2be0
AS
13603int
13604main ()
13605{
98418dba 13606char *p = (char *) alloca (2 * sizeof (int));
503d2be0
AS
13607 ;
13608 return 0;
13609}
13610_ACEOF
13611rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13612if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 13613 (eval $ac_link) 2>conftest.er1
503d2be0 13614 ac_status=$?
edfaf76d
LK
13615 grep -v '^ *+' conftest.er1 >conftest.err
13616 rm -f conftest.er1
13617 cat conftest.err >&5
c0d27fcc 13618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13619 (exit $ac_status); } &&
e143ad11
AS
13620 { ac_try='test -z "$ac_c_werror_flag"
13621 || test ! -s conftest.err'
edfaf76d
LK
13622 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13623 (eval $ac_try) 2>&5
13624 ac_status=$?
13625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13626 (exit $ac_status); }; } &&
13627 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13628 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13629 (eval $ac_try) 2>&5
13630 ac_status=$?
c0d27fcc 13631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13632 (exit $ac_status); }; }; then
98418dba 13633 ac_cv_working_alloca_h=yes
73b77ee5 13634else
503d2be0 13635 echo "$as_me: failed program was:" >&5
19650fd6
AS
13636sed 's/^/| /' conftest.$ac_ext >&5
13637
98418dba 13638ac_cv_working_alloca_h=no
73b77ee5 13639fi
edfaf76d
LK
13640rm -f conftest.err conftest.$ac_objext \
13641 conftest$ac_exeext conftest.$ac_ext
98418dba 13642fi
c0d27fcc 13643echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
98418dba
CW
13644echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
13645if test $ac_cv_working_alloca_h = yes; then
73b77ee5 13646
c0d27fcc 13647cat >>confdefs.h <<\_ACEOF
98418dba 13648#define HAVE_ALLOCA_H 1
c0d27fcc 13649_ACEOF
98418dba
CW
13650
13651fi
13652
c0d27fcc 13653echo "$as_me:$LINENO: checking for alloca" >&5
98418dba
CW
13654echo $ECHO_N "checking for alloca... $ECHO_C" >&6
13655if test "${ac_cv_func_alloca_works+set}" = set; then
13656 echo $ECHO_N "(cached) $ECHO_C" >&6
13657else
503d2be0 13658 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13659/* confdefs.h. */
13660_ACEOF
13661cat confdefs.h >>conftest.$ac_ext
13662cat >>conftest.$ac_ext <<_ACEOF
13663/* end confdefs.h. */
98418dba
CW
13664#ifdef __GNUC__
13665# define alloca __builtin_alloca
13666#else
13667# ifdef _MSC_VER
13668# include <malloc.h>
13669# define alloca _alloca
13670# else
13671# if HAVE_ALLOCA_H
13672# include <alloca.h>
13673# else
13674# ifdef _AIX
13675 #pragma alloca
13676# else
13677# ifndef alloca /* predefined by HP cc +Olibcalls */
13678char *alloca ();
13679# endif
13680# endif
13681# endif
13682# endif
13683#endif
13684
503d2be0
AS
13685int
13686main ()
13687{
98418dba 13688char *p = (char *) alloca (1);
503d2be0
AS
13689 ;
13690 return 0;
13691}
13692_ACEOF
13693rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13694if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 13695 (eval $ac_link) 2>conftest.er1
503d2be0 13696 ac_status=$?
edfaf76d
LK
13697 grep -v '^ *+' conftest.er1 >conftest.err
13698 rm -f conftest.er1
13699 cat conftest.err >&5
c0d27fcc 13700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13701 (exit $ac_status); } &&
e143ad11
AS
13702 { ac_try='test -z "$ac_c_werror_flag"
13703 || test ! -s conftest.err'
edfaf76d
LK
13704 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13705 (eval $ac_try) 2>&5
13706 ac_status=$?
13707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13708 (exit $ac_status); }; } &&
13709 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13710 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13711 (eval $ac_try) 2>&5
13712 ac_status=$?
c0d27fcc 13713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13714 (exit $ac_status); }; }; then
98418dba 13715 ac_cv_func_alloca_works=yes
ac95a621 13716else
503d2be0 13717 echo "$as_me: failed program was:" >&5
19650fd6
AS
13718sed 's/^/| /' conftest.$ac_ext >&5
13719
98418dba 13720ac_cv_func_alloca_works=no
ac95a621 13721fi
edfaf76d
LK
13722rm -f conftest.err conftest.$ac_objext \
13723 conftest$ac_exeext conftest.$ac_ext
98418dba 13724fi
c0d27fcc 13725echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
98418dba 13726echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
ac95a621 13727
98418dba
CW
13728if test $ac_cv_func_alloca_works = yes; then
13729
c0d27fcc 13730cat >>confdefs.h <<\_ACEOF
98418dba 13731#define HAVE_ALLOCA 1
c0d27fcc 13732_ACEOF
98418dba
CW
13733
13734else
13735 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
13736# that cause trouble. Some versions do not even contain alloca or
13737# contain a buggy version. If you still want to use their alloca,
13738# use ar to extract alloca.o from them instead of compiling alloca.c.
13739
13740ALLOCA=alloca.$ac_objext
13741
c0d27fcc 13742cat >>confdefs.h <<\_ACEOF
98418dba 13743#define C_ALLOCA 1
c0d27fcc 13744_ACEOF
98418dba 13745
c0d27fcc
MR
13746
13747echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
98418dba
CW
13748echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
13749if test "${ac_cv_os_cray+set}" = set; then
13750 echo $ECHO_N "(cached) $ECHO_C" >&6
13751else
13752 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13753/* confdefs.h. */
13754_ACEOF
13755cat confdefs.h >>conftest.$ac_ext
13756cat >>conftest.$ac_ext <<_ACEOF
13757/* end confdefs.h. */
98418dba
CW
13758#if defined(CRAY) && ! defined(CRAY2)
13759webecray
13760#else
13761wenotbecray
13762#endif
13763
13764_ACEOF
13765if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 13766 $EGREP "webecray" >/dev/null 2>&1; then
98418dba
CW
13767 ac_cv_os_cray=yes
13768else
13769 ac_cv_os_cray=no
13770fi
13771rm -f conftest*
ac95a621 13772
98418dba 13773fi
c0d27fcc 13774echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
98418dba
CW
13775echo "${ECHO_T}$ac_cv_os_cray" >&6
13776if test $ac_cv_os_cray = yes; then
13777 for ac_func in _getb67 GETB67 getb67; do
13778 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 13779echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
13780echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13781if eval "test \"\${$as_ac_var+set}\" = set"; then
13782 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 13783else
503d2be0 13784 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13785/* confdefs.h. */
13786_ACEOF
13787cat confdefs.h >>conftest.$ac_ext
13788cat >>conftest.$ac_ext <<_ACEOF
13789/* end confdefs.h. */
edfaf76d
LK
13790/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
13791 For example, HP-UX 11i <limits.h> declares gettimeofday. */
13792#define $ac_func innocuous_$ac_func
13793
73b77ee5 13794/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
13795 which can conflict with char $ac_func (); below.
13796 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13797 <limits.h> exists even on freestanding compilers. */
edfaf76d 13798
19650fd6
AS
13799#ifdef __STDC__
13800# include <limits.h>
13801#else
13802# include <assert.h>
13803#endif
edfaf76d
LK
13804
13805#undef $ac_func
13806
73b77ee5 13807/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
13808#ifdef __cplusplus
13809extern "C"
19650fd6 13810{
503d2be0 13811#endif
73b77ee5 13812/* We use char because int might match the return type of a gcc2
503d2be0
AS
13813 builtin and then its argument prototype would still apply. */
13814char $ac_func ();
73b77ee5
GM
13815/* The GNU C library defines this for functions which it implements
13816 to always fail with ENOSYS. Some functions are actually named
13817 something starting with __ and the normal name is an alias. */
13818#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13819choke me
13820#else
19650fd6
AS
13821char (*f) () = $ac_func;
13822#endif
13823#ifdef __cplusplus
13824}
73b77ee5
GM
13825#endif
13826
19650fd6
AS
13827int
13828main ()
13829{
13830return f != $ac_func;
503d2be0
AS
13831 ;
13832 return 0;
13833}
13834_ACEOF
13835rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13836if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 13837 (eval $ac_link) 2>conftest.er1
503d2be0 13838 ac_status=$?
edfaf76d
LK
13839 grep -v '^ *+' conftest.er1 >conftest.err
13840 rm -f conftest.er1
13841 cat conftest.err >&5
c0d27fcc 13842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13843 (exit $ac_status); } &&
e143ad11
AS
13844 { ac_try='test -z "$ac_c_werror_flag"
13845 || test ! -s conftest.err'
edfaf76d
LK
13846 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13847 (eval $ac_try) 2>&5
13848 ac_status=$?
13849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13850 (exit $ac_status); }; } &&
13851 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13852 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13853 (eval $ac_try) 2>&5
13854 ac_status=$?
c0d27fcc 13855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
13856 (exit $ac_status); }; }; then
13857 eval "$as_ac_var=yes"
13858else
13859 echo "$as_me: failed program was:" >&5
19650fd6
AS
13860sed 's/^/| /' conftest.$ac_ext >&5
13861
503d2be0
AS
13862eval "$as_ac_var=no"
13863fi
edfaf76d
LK
13864rm -f conftest.err conftest.$ac_objext \
13865 conftest$ac_exeext conftest.$ac_ext
503d2be0 13866fi
c0d27fcc 13867echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
13868echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13869if test `eval echo '${'$as_ac_var'}'` = yes; then
73b77ee5 13870
c0d27fcc 13871cat >>confdefs.h <<_ACEOF
98418dba 13872#define CRAY_STACKSEG_END $ac_func
c0d27fcc 13873_ACEOF
98418dba
CW
13874
13875 break
73b77ee5 13876fi
73b77ee5 13877
98418dba 13878 done
73b77ee5
GM
13879fi
13880
c0d27fcc 13881echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
98418dba
CW
13882echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
13883if test "${ac_cv_c_stack_direction+set}" = set; then
503d2be0 13884 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
13885else
13886 if test "$cross_compiling" = yes; then
13887 ac_cv_c_stack_direction=0
73b77ee5 13888else
503d2be0 13889 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13890/* confdefs.h. */
13891_ACEOF
13892cat confdefs.h >>conftest.$ac_ext
13893cat >>conftest.$ac_ext <<_ACEOF
13894/* end confdefs.h. */
503d2be0 13895int
98418dba 13896find_stack_direction ()
503d2be0 13897{
98418dba
CW
13898 static char *addr = 0;
13899 auto char dummy;
13900 if (addr == 0)
13901 {
13902 addr = &dummy;
13903 return find_stack_direction ();
13904 }
73b77ee5 13905 else
98418dba
CW
13906 return (&dummy > addr) ? 1 : -1;
13907}
ba4481b5 13908
503d2be0
AS
13909int
13910main ()
13911{
98418dba 13912 exit (find_stack_direction () < 0);
503d2be0
AS
13913}
13914_ACEOF
98418dba 13915rm -f conftest$ac_exeext
c0d27fcc 13916if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
13917 (eval $ac_link) 2>&5
13918 ac_status=$?
c0d27fcc 13919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 13920 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 13921 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13922 (eval $ac_try) 2>&5
13923 ac_status=$?
c0d27fcc 13924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13925 (exit $ac_status); }; }; then
98418dba 13926 ac_cv_c_stack_direction=1
ba4481b5 13927else
98418dba
CW
13928 echo "$as_me: program exited with status $ac_status" >&5
13929echo "$as_me: failed program was:" >&5
19650fd6
AS
13930sed 's/^/| /' conftest.$ac_ext >&5
13931
c0d27fcc 13932( exit $ac_status )
98418dba 13933ac_cv_c_stack_direction=-1
ba4481b5 13934fi
edfaf76d 13935rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 13936fi
98418dba 13937fi
c0d27fcc 13938echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
98418dba
CW
13939echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
13940
c0d27fcc 13941cat >>confdefs.h <<_ACEOF
98418dba 13942#define STACK_DIRECTION $ac_cv_c_stack_direction
c0d27fcc
MR
13943_ACEOF
13944
ba4481b5 13945
ba4481b5
DL
13946fi
13947
c0d27fcc 13948
98418dba
CW
13949# fmod, logb, and frexp are found in -lm on most systems.
13950# On HPUX 9.01, -lm does not contain logb, so check for sqrt.
13951
c0d27fcc 13952echo "$as_me:$LINENO: checking for sqrt in -lm" >&5
98418dba
CW
13953echo $ECHO_N "checking for sqrt in -lm... $ECHO_C" >&6
13954if test "${ac_cv_lib_m_sqrt+set}" = set; then
503d2be0 13955 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13956else
98418dba
CW
13957 ac_check_lib_save_LIBS=$LIBS
13958LIBS="-lm $LIBS"
13959cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13960/* confdefs.h. */
13961_ACEOF
13962cat confdefs.h >>conftest.$ac_ext
13963cat >>conftest.$ac_ext <<_ACEOF
13964/* end confdefs.h. */
ba4481b5 13965
98418dba
CW
13966/* Override any gcc2 internal prototype to avoid an error. */
13967#ifdef __cplusplus
13968extern "C"
13969#endif
13970/* We use char because int might match the return type of a gcc2
13971 builtin and then its argument prototype would still apply. */
13972char sqrt ();
503d2be0
AS
13973int
13974main ()
13975{
98418dba 13976sqrt ();
503d2be0
AS
13977 ;
13978 return 0;
13979}
13980_ACEOF
13981rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13982if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 13983 (eval $ac_link) 2>conftest.er1
503d2be0 13984 ac_status=$?
edfaf76d
LK
13985 grep -v '^ *+' conftest.er1 >conftest.err
13986 rm -f conftest.er1
13987 cat conftest.err >&5
c0d27fcc 13988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13989 (exit $ac_status); } &&
e143ad11
AS
13990 { ac_try='test -z "$ac_c_werror_flag"
13991 || test ! -s conftest.err'
edfaf76d
LK
13992 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13993 (eval $ac_try) 2>&5
13994 ac_status=$?
13995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13996 (exit $ac_status); }; } &&
13997 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13998 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13999 (eval $ac_try) 2>&5
14000 ac_status=$?
c0d27fcc 14001 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14002 (exit $ac_status); }; }; then
98418dba 14003 ac_cv_lib_m_sqrt=yes
ba4481b5 14004else
503d2be0 14005 echo "$as_me: failed program was:" >&5
19650fd6
AS
14006sed 's/^/| /' conftest.$ac_ext >&5
14007
98418dba 14008ac_cv_lib_m_sqrt=no
ba4481b5 14009fi
edfaf76d
LK
14010rm -f conftest.err conftest.$ac_objext \
14011 conftest$ac_exeext conftest.$ac_ext
98418dba 14012LIBS=$ac_check_lib_save_LIBS
ba4481b5 14013fi
c0d27fcc 14014echo "$as_me:$LINENO: result: $ac_cv_lib_m_sqrt" >&5
98418dba
CW
14015echo "${ECHO_T}$ac_cv_lib_m_sqrt" >&6
14016if test $ac_cv_lib_m_sqrt = yes; then
c0d27fcc 14017 cat >>confdefs.h <<_ACEOF
98418dba 14018#define HAVE_LIBM 1
c0d27fcc 14019_ACEOF
98418dba
CW
14020
14021 LIBS="-lm $LIBS"
ba4481b5 14022
ba4481b5
DL
14023fi
14024
c0d27fcc 14025
55597d70
DL
14026# Check for mail-locking functions in a "mail" library. Probably this should
14027# have the same check as for liblockfile below.
98418dba 14028
c0d27fcc 14029echo "$as_me:$LINENO: checking for maillock in -lmail" >&5
98418dba
CW
14030echo $ECHO_N "checking for maillock in -lmail... $ECHO_C" >&6
14031if test "${ac_cv_lib_mail_maillock+set}" = set; then
503d2be0 14032 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 14033else
98418dba
CW
14034 ac_check_lib_save_LIBS=$LIBS
14035LIBS="-lmail $LIBS"
14036cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14037/* confdefs.h. */
14038_ACEOF
14039cat confdefs.h >>conftest.$ac_ext
14040cat >>conftest.$ac_ext <<_ACEOF
14041/* end confdefs.h. */
98418dba
CW
14042
14043/* Override any gcc2 internal prototype to avoid an error. */
14044#ifdef __cplusplus
14045extern "C"
14046#endif
14047/* We use char because int might match the return type of a gcc2
14048 builtin and then its argument prototype would still apply. */
14049char maillock ();
503d2be0
AS
14050int
14051main ()
14052{
98418dba 14053maillock ();
503d2be0
AS
14054 ;
14055 return 0;
14056}
14057_ACEOF
14058rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14059if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 14060 (eval $ac_link) 2>conftest.er1
503d2be0 14061 ac_status=$?
edfaf76d
LK
14062 grep -v '^ *+' conftest.er1 >conftest.err
14063 rm -f conftest.er1
14064 cat conftest.err >&5
c0d27fcc 14065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14066 (exit $ac_status); } &&
e143ad11
AS
14067 { ac_try='test -z "$ac_c_werror_flag"
14068 || test ! -s conftest.err'
edfaf76d
LK
14069 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14070 (eval $ac_try) 2>&5
14071 ac_status=$?
14072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14073 (exit $ac_status); }; } &&
14074 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14075 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
14076 (eval $ac_try) 2>&5
14077 ac_status=$?
c0d27fcc 14078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14079 (exit $ac_status); }; }; then
98418dba 14080 ac_cv_lib_mail_maillock=yes
ba4481b5 14081else
503d2be0 14082 echo "$as_me: failed program was:" >&5
19650fd6
AS
14083sed 's/^/| /' conftest.$ac_ext >&5
14084
98418dba 14085ac_cv_lib_mail_maillock=no
ba4481b5 14086fi
edfaf76d
LK
14087rm -f conftest.err conftest.$ac_objext \
14088 conftest$ac_exeext conftest.$ac_ext
98418dba 14089LIBS=$ac_check_lib_save_LIBS
ba4481b5 14090fi
c0d27fcc 14091echo "$as_me:$LINENO: result: $ac_cv_lib_mail_maillock" >&5
98418dba
CW
14092echo "${ECHO_T}$ac_cv_lib_mail_maillock" >&6
14093if test $ac_cv_lib_mail_maillock = yes; then
c0d27fcc 14094 cat >>confdefs.h <<_ACEOF
98418dba 14095#define HAVE_LIBMAIL 1
c0d27fcc 14096_ACEOF
ba4481b5 14097
98418dba 14098 LIBS="-lmail $LIBS"
ba4481b5 14099
98418dba 14100fi
ba4481b5 14101
c0d27fcc
MR
14102
14103echo "$as_me:$LINENO: checking for maillock in -llockfile" >&5
98418dba
CW
14104echo $ECHO_N "checking for maillock in -llockfile... $ECHO_C" >&6
14105if test "${ac_cv_lib_lockfile_maillock+set}" = set; then
503d2be0 14106 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 14107else
503d2be0 14108 ac_check_lib_save_LIBS=$LIBS
98418dba 14109LIBS="-llockfile $LIBS"
503d2be0 14110cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14111/* confdefs.h. */
14112_ACEOF
14113cat confdefs.h >>conftest.$ac_ext
14114cat >>conftest.$ac_ext <<_ACEOF
14115/* end confdefs.h. */
503d2be0 14116
ba4481b5 14117/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
14118#ifdef __cplusplus
14119extern "C"
14120#endif
ba4481b5 14121/* We use char because int might match the return type of a gcc2
503d2be0 14122 builtin and then its argument prototype would still apply. */
98418dba 14123char maillock ();
503d2be0
AS
14124int
14125main ()
14126{
98418dba 14127maillock ();
503d2be0
AS
14128 ;
14129 return 0;
14130}
14131_ACEOF
14132rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14133if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 14134 (eval $ac_link) 2>conftest.er1
503d2be0 14135 ac_status=$?
edfaf76d
LK
14136 grep -v '^ *+' conftest.er1 >conftest.err
14137 rm -f conftest.er1
14138 cat conftest.err >&5
c0d27fcc 14139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14140 (exit $ac_status); } &&
e143ad11
AS
14141 { ac_try='test -z "$ac_c_werror_flag"
14142 || test ! -s conftest.err'
edfaf76d
LK
14143 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14144 (eval $ac_try) 2>&5
14145 ac_status=$?
14146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14147 (exit $ac_status); }; } &&
14148 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14149 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
14150 (eval $ac_try) 2>&5
14151 ac_status=$?
c0d27fcc 14152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14153 (exit $ac_status); }; }; then
98418dba 14154 ac_cv_lib_lockfile_maillock=yes
503d2be0
AS
14155else
14156 echo "$as_me: failed program was:" >&5
19650fd6
AS
14157sed 's/^/| /' conftest.$ac_ext >&5
14158
98418dba
CW
14159ac_cv_lib_lockfile_maillock=no
14160fi
edfaf76d
LK
14161rm -f conftest.err conftest.$ac_objext \
14162 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
14163LIBS=$ac_check_lib_save_LIBS
14164fi
c0d27fcc 14165echo "$as_me:$LINENO: result: $ac_cv_lib_lockfile_maillock" >&5
98418dba
CW
14166echo "${ECHO_T}$ac_cv_lib_lockfile_maillock" >&6
14167if test $ac_cv_lib_lockfile_maillock = yes; then
c0d27fcc 14168 cat >>confdefs.h <<_ACEOF
98418dba 14169#define HAVE_LIBLOCKFILE 1
c0d27fcc 14170_ACEOF
98418dba
CW
14171
14172 LIBS="-llockfile $LIBS"
14173
14174fi
14175
14176# If we have the shared liblockfile, assume we must use it for mail
14177# locking (e.g. Debian). If we couldn't link against liblockfile
14178# (no liblockfile.a installed), ensure that we don't need to.
14179if test "$ac_cv_lib_lockfile_maillock" = no; then
14180 # Extract the first word of "liblockfile.so", so it can be a program name with args.
14181set dummy liblockfile.so; ac_word=$2
c0d27fcc 14182echo "$as_me:$LINENO: checking for $ac_word" >&5
98418dba
CW
14183echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14184if test "${ac_cv_prog_liblockfile+set}" = set; then
14185 echo $ECHO_N "(cached) $ECHO_C" >&6
14186else
14187 if test -n "$liblockfile"; then
14188 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
14189else
c0d27fcc 14190as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6bae0ccf
DL
14191as_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
14192for as_dir in $as_dummy
c0d27fcc
MR
14193do
14194 IFS=$as_save_IFS
14195 test -z "$as_dir" && as_dir=.
14196 for ac_exec_ext in '' $ac_executable_extensions; do
14197 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14198 ac_cv_prog_liblockfile="yes"
14199 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
14200 break 2
14201 fi
14202done
98418dba
CW
14203done
14204
14205 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
503d2be0 14206fi
503d2be0 14207fi
98418dba
CW
14208liblockfile=$ac_cv_prog_liblockfile
14209if test -n "$liblockfile"; then
c0d27fcc 14210 echo "$as_me:$LINENO: result: $liblockfile" >&5
98418dba
CW
14211echo "${ECHO_T}$liblockfile" >&6
14212else
c0d27fcc 14213 echo "$as_me:$LINENO: result: no" >&5
98418dba 14214echo "${ECHO_T}no" >&6
ba4481b5
DL
14215fi
14216
98418dba 14217 if test $ac_cv_prog_liblockfile = yes; then
c0d27fcc 14218 { { echo "$as_me:$LINENO: error: Shared liblockfile found but can't link against it.
98418dba
CW
14219This probably means that movemail could lose mail.
14220There may be a \`development' package to install containing liblockfile." >&5
14221echo "$as_me: error: Shared liblockfile found but can't link against it.
14222This probably means that movemail could lose mail.
14223There may be a \`development' package to install containing liblockfile." >&2;}
14224 { (exit 1); exit 1; }; }
98418dba 14225 else :
55597d70 14226 fi
98418dba 14227fi
503d2be0 14228
98418dba
CW
14229for ac_func in touchlock
14230do
14231as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 14232echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
14233echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14234if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 14235 echo $ECHO_N "(cached) $ECHO_C" >&6
457b792c 14236else
98418dba 14237 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14238/* confdefs.h. */
14239_ACEOF
14240cat confdefs.h >>conftest.$ac_ext
14241cat >>conftest.$ac_ext <<_ACEOF
14242/* end confdefs.h. */
edfaf76d
LK
14243/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14244 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14245#define $ac_func innocuous_$ac_func
14246
98418dba 14247/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
14248 which can conflict with char $ac_func (); below.
14249 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14250 <limits.h> exists even on freestanding compilers. */
edfaf76d 14251
19650fd6
AS
14252#ifdef __STDC__
14253# include <limits.h>
14254#else
14255# include <assert.h>
14256#endif
edfaf76d
LK
14257
14258#undef $ac_func
14259
457b792c 14260/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
14261#ifdef __cplusplus
14262extern "C"
19650fd6 14263{
503d2be0 14264#endif
457b792c 14265/* We use char because int might match the return type of a gcc2
503d2be0 14266 builtin and then its argument prototype would still apply. */
98418dba 14267char $ac_func ();
98418dba
CW
14268/* The GNU C library defines this for functions which it implements
14269 to always fail with ENOSYS. Some functions are actually named
14270 something starting with __ and the normal name is an alias. */
14271#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14272choke me
14273#else
19650fd6
AS
14274char (*f) () = $ac_func;
14275#endif
14276#ifdef __cplusplus
14277}
cd958eb3
MB
14278#endif
14279
19650fd6
AS
14280int
14281main ()
14282{
14283return f != $ac_func;
503d2be0
AS
14284 ;
14285 return 0;
14286}
14287_ACEOF
14288rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14289if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 14290 (eval $ac_link) 2>conftest.er1
503d2be0 14291 ac_status=$?
edfaf76d
LK
14292 grep -v '^ *+' conftest.er1 >conftest.err
14293 rm -f conftest.er1
14294 cat conftest.err >&5
c0d27fcc 14295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14296 (exit $ac_status); } &&
e143ad11
AS
14297 { ac_try='test -z "$ac_c_werror_flag"
14298 || test ! -s conftest.err'
edfaf76d
LK
14299 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14300 (eval $ac_try) 2>&5
14301 ac_status=$?
14302 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14303 (exit $ac_status); }; } &&
14304 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14305 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
14306 (eval $ac_try) 2>&5
14307 ac_status=$?
c0d27fcc 14308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14309 (exit $ac_status); }; }; then
98418dba 14310 eval "$as_ac_var=yes"
503d2be0
AS
14311else
14312 echo "$as_me: failed program was:" >&5
19650fd6
AS
14313sed 's/^/| /' conftest.$ac_ext >&5
14314
98418dba 14315eval "$as_ac_var=no"
503d2be0 14316fi
edfaf76d
LK
14317rm -f conftest.err conftest.$ac_objext \
14318 conftest$ac_exeext conftest.$ac_ext
503d2be0 14319fi
c0d27fcc 14320echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
14321echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14322if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 14323 cat >>confdefs.h <<_ACEOF
98418dba 14324#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 14325_ACEOF
457b792c 14326
457b792c 14327fi
98418dba 14328done
457b792c 14329
c0d27fcc 14330
98418dba
CW
14331for ac_header in maillock.h
14332do
14333as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
14334if eval "test \"\${$as_ac_Header+set}\" = set"; then
14335 echo "$as_me:$LINENO: checking for $ac_header" >&5
98418dba
CW
14336echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14337if eval "test \"\${$as_ac_Header+set}\" = set"; then
503d2be0 14338 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
14339fi
14340echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14341echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
ba4481b5 14342else
c0d27fcc
MR
14343 # Is the header compilable?
14344echo "$as_me:$LINENO: checking $ac_header usability" >&5
14345echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
14346cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14347/* confdefs.h. */
14348_ACEOF
14349cat confdefs.h >>conftest.$ac_ext
14350cat >>conftest.$ac_ext <<_ACEOF
14351/* end confdefs.h. */
c0d27fcc
MR
14352$ac_includes_default
14353#include <$ac_header>
14354_ACEOF
14355rm -f conftest.$ac_objext
14356if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 14357 (eval $ac_compile) 2>conftest.er1
c0d27fcc 14358 ac_status=$?
edfaf76d
LK
14359 grep -v '^ *+' conftest.er1 >conftest.err
14360 rm -f conftest.er1
14361 cat conftest.err >&5
c0d27fcc
MR
14362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14363 (exit $ac_status); } &&
e143ad11
AS
14364 { ac_try='test -z "$ac_c_werror_flag"
14365 || test ! -s conftest.err'
edfaf76d
LK
14366 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14367 (eval $ac_try) 2>&5
14368 ac_status=$?
14369 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14370 (exit $ac_status); }; } &&
14371 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
14372 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14373 (eval $ac_try) 2>&5
14374 ac_status=$?
14375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14376 (exit $ac_status); }; }; then
14377 ac_header_compiler=yes
14378else
14379 echo "$as_me: failed program was:" >&5
19650fd6
AS
14380sed 's/^/| /' conftest.$ac_ext >&5
14381
c0d27fcc
MR
14382ac_header_compiler=no
14383fi
edfaf76d 14384rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
14385echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14386echo "${ECHO_T}$ac_header_compiler" >&6
14387
14388# Is the header present?
14389echo "$as_me:$LINENO: checking $ac_header presence" >&5
14390echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
14391cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14392/* confdefs.h. */
14393_ACEOF
14394cat confdefs.h >>conftest.$ac_ext
14395cat >>conftest.$ac_ext <<_ACEOF
14396/* end confdefs.h. */
98418dba 14397#include <$ac_header>
503d2be0 14398_ACEOF
c0d27fcc 14399if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba 14400 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
503d2be0 14401 ac_status=$?
6bae0ccf 14402 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
14403 rm -f conftest.er1
14404 cat conftest.err >&5
c0d27fcc 14405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
14406 (exit $ac_status); } >/dev/null; then
14407 if test -s conftest.err; then
14408 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 14409 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
14410 else
14411 ac_cpp_err=
14412 fi
503d2be0 14413else
98418dba 14414 ac_cpp_err=yes
503d2be0 14415fi
98418dba 14416if test -z "$ac_cpp_err"; then
c0d27fcc 14417 ac_header_preproc=yes
98418dba
CW
14418else
14419 echo "$as_me: failed program was:" >&5
19650fd6
AS
14420sed 's/^/| /' conftest.$ac_ext >&5
14421
c0d27fcc 14422 ac_header_preproc=no
503d2be0 14423fi
98418dba 14424rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
14425echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14426echo "${ECHO_T}$ac_header_preproc" >&6
14427
14428# So? What about this header?
edfaf76d
LK
14429case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14430 yes:no: )
c0d27fcc
MR
14431 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
14432echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
14433 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
14434echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
14435 ac_header_preproc=yes
19650fd6 14436 ;;
edfaf76d 14437 no:yes:* )
c0d27fcc
MR
14438 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
14439echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
14440 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
14441echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
14442 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
14443echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
14444 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
14445echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 14446 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 14447echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
14448 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
14449echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
14450 (
14451 cat <<\_ASBOX
edfaf76d
LK
14452## ------------------------------------------ ##
14453## Report this to the AC_PACKAGE_NAME lists. ##
14454## ------------------------------------------ ##
19650fd6
AS
14455_ASBOX
14456 ) |
14457 sed "s/^/$as_me: WARNING: /" >&2
14458 ;;
c0d27fcc
MR
14459esac
14460echo "$as_me:$LINENO: checking for $ac_header" >&5
14461echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14462if eval "test \"\${$as_ac_Header+set}\" = set"; then
14463 echo $ECHO_N "(cached) $ECHO_C" >&6
14464else
edfaf76d 14465 eval "$as_ac_Header=\$ac_header_preproc"
ba4481b5 14466fi
c0d27fcc 14467echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 14468echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
14469
14470fi
98418dba 14471if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 14472 cat >>confdefs.h <<_ACEOF
98418dba 14473#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 14474_ACEOF
48d4b120 14475
ba4481b5 14476fi
c0d27fcc 14477
98418dba
CW
14478done
14479
c0d27fcc
MR
14480
14481
14482
14483
14484
14485
14486
14487
14488
14489
14490
14491
14492
14493
14494
14495
14496
14497
14498
14499
14500
14501
14502
14503
14504
14505
14506
14507
14508
14509
14510
14511
14512
14513
14514
14515
14516
14517
14518
14519
14520
14521
14522
14523
14524
14525
14526
14527
14528
14529
14530
14531
14532
14533
14534
22044edf
DL
14535
14536
c0d27fcc 14537
b0e44248
RB
14538
14539
973a76b1
DL
14540
14541
14542
cd958eb3 14543
25ca0bca 14544
ea92fc9f 14545
e2fcf543 14546
c0d27fcc
MR
14547
14548
98418dba 14549for ac_func in gethostname getdomainname dup2 \
e2fcf543 14550rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \
98418dba
CW
14551random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime res_init setsid \
14552strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \
973a76b1 14553utimes setrlimit setpgid getcwd getwd shutdown getaddrinfo \
98418dba
CW
14554__fpending mblen mbrlen mbsinit strsignal setitimer ualarm index rindex \
14555sendto recvfrom getsockopt setsockopt getsockname getpeername \
b0e44248 14556gai_strerror mkstemp getline getdelim mremap memmove fsync bzero \
4489ece2 14557memset memcmp difftime memcpy mempcpy mblen mbrlen posix_memalign
98418dba
CW
14558do
14559as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 14560echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
14561echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14562if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 14563 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 14564else
503d2be0 14565 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14566/* confdefs.h. */
14567_ACEOF
14568cat confdefs.h >>conftest.$ac_ext
14569cat >>conftest.$ac_ext <<_ACEOF
14570/* end confdefs.h. */
edfaf76d
LK
14571/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14572 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14573#define $ac_func innocuous_$ac_func
14574
98418dba 14575/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
14576 which can conflict with char $ac_func (); below.
14577 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14578 <limits.h> exists even on freestanding compilers. */
edfaf76d 14579
19650fd6
AS
14580#ifdef __STDC__
14581# include <limits.h>
14582#else
14583# include <assert.h>
14584#endif
edfaf76d
LK
14585
14586#undef $ac_func
14587
ba4481b5 14588/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
14589#ifdef __cplusplus
14590extern "C"
19650fd6 14591{
503d2be0 14592#endif
ba4481b5 14593/* We use char because int might match the return type of a gcc2
503d2be0 14594 builtin and then its argument prototype would still apply. */
98418dba 14595char $ac_func ();
98418dba
CW
14596/* The GNU C library defines this for functions which it implements
14597 to always fail with ENOSYS. Some functions are actually named
14598 something starting with __ and the normal name is an alias. */
14599#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14600choke me
14601#else
19650fd6
AS
14602char (*f) () = $ac_func;
14603#endif
14604#ifdef __cplusplus
14605}
98418dba
CW
14606#endif
14607
19650fd6
AS
14608int
14609main ()
14610{
14611return f != $ac_func;
503d2be0
AS
14612 ;
14613 return 0;
14614}
14615_ACEOF
14616rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14617if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 14618 (eval $ac_link) 2>conftest.er1
503d2be0 14619 ac_status=$?
edfaf76d
LK
14620 grep -v '^ *+' conftest.er1 >conftest.err
14621 rm -f conftest.er1
14622 cat conftest.err >&5
c0d27fcc 14623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14624 (exit $ac_status); } &&
e143ad11
AS
14625 { ac_try='test -z "$ac_c_werror_flag"
14626 || test ! -s conftest.err'
c0d27fcc 14627 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
14628 (eval $ac_try) 2>&5
14629 ac_status=$?
c0d27fcc 14630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
edfaf76d
LK
14631 (exit $ac_status); }; } &&
14632 { ac_try='test -s conftest$ac_exeext'
14633 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14634 (eval $ac_try) 2>&5
14635 ac_status=$?
14636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14637 (exit $ac_status); }; }; then
98418dba 14638 eval "$as_ac_var=yes"
503d2be0
AS
14639else
14640 echo "$as_me: failed program was:" >&5
19650fd6
AS
14641sed 's/^/| /' conftest.$ac_ext >&5
14642
98418dba 14643eval "$as_ac_var=no"
503d2be0 14644fi
edfaf76d
LK
14645rm -f conftest.err conftest.$ac_objext \
14646 conftest$ac_exeext conftest.$ac_ext
ba4481b5 14647fi
c0d27fcc 14648echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
14649echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14650if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 14651 cat >>confdefs.h <<_ACEOF
98418dba 14652#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 14653_ACEOF
ba4481b5 14654
ba4481b5 14655fi
98418dba 14656done
ba4481b5 14657
c0d27fcc
MR
14658
14659
98418dba
CW
14660for ac_header in sys/un.h
14661do
14662as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
14663if eval "test \"\${$as_ac_Header+set}\" = set"; then
14664 echo "$as_me:$LINENO: checking for $ac_header" >&5
98418dba
CW
14665echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14666if eval "test \"\${$as_ac_Header+set}\" = set"; then
14667 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
14668fi
14669echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14670echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 14671else
c0d27fcc
MR
14672 # Is the header compilable?
14673echo "$as_me:$LINENO: checking $ac_header usability" >&5
14674echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
14675cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14676/* confdefs.h. */
14677_ACEOF
14678cat confdefs.h >>conftest.$ac_ext
14679cat >>conftest.$ac_ext <<_ACEOF
14680/* end confdefs.h. */
c0d27fcc
MR
14681$ac_includes_default
14682#include <$ac_header>
14683_ACEOF
14684rm -f conftest.$ac_objext
14685if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 14686 (eval $ac_compile) 2>conftest.er1
c0d27fcc 14687 ac_status=$?
edfaf76d
LK
14688 grep -v '^ *+' conftest.er1 >conftest.err
14689 rm -f conftest.er1
14690 cat conftest.err >&5
c0d27fcc
MR
14691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14692 (exit $ac_status); } &&
e143ad11
AS
14693 { ac_try='test -z "$ac_c_werror_flag"
14694 || test ! -s conftest.err'
edfaf76d
LK
14695 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14696 (eval $ac_try) 2>&5
14697 ac_status=$?
14698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14699 (exit $ac_status); }; } &&
14700 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
14701 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14702 (eval $ac_try) 2>&5
14703 ac_status=$?
14704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14705 (exit $ac_status); }; }; then
14706 ac_header_compiler=yes
14707else
14708 echo "$as_me: failed program was:" >&5
19650fd6
AS
14709sed 's/^/| /' conftest.$ac_ext >&5
14710
c0d27fcc
MR
14711ac_header_compiler=no
14712fi
edfaf76d 14713rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
14714echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14715echo "${ECHO_T}$ac_header_compiler" >&6
14716
14717# Is the header present?
14718echo "$as_me:$LINENO: checking $ac_header presence" >&5
14719echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
14720cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14721/* confdefs.h. */
14722_ACEOF
14723cat confdefs.h >>conftest.$ac_ext
14724cat >>conftest.$ac_ext <<_ACEOF
14725/* end confdefs.h. */
98418dba 14726#include <$ac_header>
503d2be0 14727_ACEOF
c0d27fcc 14728if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
14729 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14730 ac_status=$?
6bae0ccf 14731 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
14732 rm -f conftest.er1
14733 cat conftest.err >&5
c0d27fcc 14734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
14735 (exit $ac_status); } >/dev/null; then
14736 if test -s conftest.err; then
14737 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 14738 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
14739 else
14740 ac_cpp_err=
14741 fi
14742else
14743 ac_cpp_err=yes
14744fi
14745if test -z "$ac_cpp_err"; then
c0d27fcc 14746 ac_header_preproc=yes
ba4481b5 14747else
503d2be0 14748 echo "$as_me: failed program was:" >&5
19650fd6
AS
14749sed 's/^/| /' conftest.$ac_ext >&5
14750
c0d27fcc 14751 ac_header_preproc=no
ba4481b5 14752fi
503d2be0 14753rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
14754echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14755echo "${ECHO_T}$ac_header_preproc" >&6
14756
14757# So? What about this header?
edfaf76d
LK
14758case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14759 yes:no: )
c0d27fcc
MR
14760 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
14761echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
14762 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
14763echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
14764 ac_header_preproc=yes
19650fd6 14765 ;;
edfaf76d 14766 no:yes:* )
c0d27fcc
MR
14767 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
14768echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
14769 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
14770echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
14771 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
14772echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
14773 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
14774echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 14775 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 14776echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
14777 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
14778echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
14779 (
14780 cat <<\_ASBOX
edfaf76d
LK
14781## ------------------------------------------ ##
14782## Report this to the AC_PACKAGE_NAME lists. ##
14783## ------------------------------------------ ##
19650fd6
AS
14784_ASBOX
14785 ) |
14786 sed "s/^/$as_me: WARNING: /" >&2
14787 ;;
c0d27fcc
MR
14788esac
14789echo "$as_me:$LINENO: checking for $ac_header" >&5
14790echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14791if eval "test \"\${$as_ac_Header+set}\" = set"; then
14792 echo $ECHO_N "(cached) $ECHO_C" >&6
14793else
edfaf76d 14794 eval "$as_ac_Header=\$ac_header_preproc"
ba4481b5 14795fi
c0d27fcc 14796echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
925c2f3f 14797echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
14798
14799fi
925c2f3f 14800if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 14801 cat >>confdefs.h <<_ACEOF
925c2f3f 14802#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 14803_ACEOF
503d2be0 14804
925c2f3f 14805fi
c0d27fcc 14806
925c2f3f
EZ
14807done
14808
c0d27fcc
MR
14809
14810
14811
edfaf76d
LK
14812
14813for ac_header in stdlib.h sys/time.h unistd.h
925c2f3f
EZ
14814do
14815as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
14816if eval "test \"\${$as_ac_Header+set}\" = set"; then
14817 echo "$as_me:$LINENO: checking for $ac_header" >&5
925c2f3f
EZ
14818echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14819if eval "test \"\${$as_ac_Header+set}\" = set"; then
14820 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
14821fi
14822echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14823echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
925c2f3f 14824else
c0d27fcc
MR
14825 # Is the header compilable?
14826echo "$as_me:$LINENO: checking $ac_header usability" >&5
14827echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
14828cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14829/* confdefs.h. */
14830_ACEOF
14831cat confdefs.h >>conftest.$ac_ext
14832cat >>conftest.$ac_ext <<_ACEOF
14833/* end confdefs.h. */
c0d27fcc
MR
14834$ac_includes_default
14835#include <$ac_header>
14836_ACEOF
14837rm -f conftest.$ac_objext
14838if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 14839 (eval $ac_compile) 2>conftest.er1
c0d27fcc 14840 ac_status=$?
edfaf76d
LK
14841 grep -v '^ *+' conftest.er1 >conftest.err
14842 rm -f conftest.er1
14843 cat conftest.err >&5
c0d27fcc
MR
14844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14845 (exit $ac_status); } &&
e143ad11
AS
14846 { ac_try='test -z "$ac_c_werror_flag"
14847 || test ! -s conftest.err'
edfaf76d
LK
14848 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14849 (eval $ac_try) 2>&5
14850 ac_status=$?
14851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14852 (exit $ac_status); }; } &&
14853 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
14854 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14855 (eval $ac_try) 2>&5
14856 ac_status=$?
14857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14858 (exit $ac_status); }; }; then
14859 ac_header_compiler=yes
14860else
14861 echo "$as_me: failed program was:" >&5
19650fd6
AS
14862sed 's/^/| /' conftest.$ac_ext >&5
14863
c0d27fcc
MR
14864ac_header_compiler=no
14865fi
edfaf76d 14866rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
14867echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14868echo "${ECHO_T}$ac_header_compiler" >&6
14869
14870# Is the header present?
14871echo "$as_me:$LINENO: checking $ac_header presence" >&5
14872echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
14873cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14874/* confdefs.h. */
14875_ACEOF
14876cat confdefs.h >>conftest.$ac_ext
14877cat >>conftest.$ac_ext <<_ACEOF
14878/* end confdefs.h. */
98418dba 14879#include <$ac_header>
503d2be0 14880_ACEOF
c0d27fcc 14881if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
14882 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14883 ac_status=$?
6bae0ccf 14884 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
14885 rm -f conftest.er1
14886 cat conftest.err >&5
c0d27fcc 14887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
14888 (exit $ac_status); } >/dev/null; then
14889 if test -s conftest.err; then
14890 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 14891 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
14892 else
14893 ac_cpp_err=
14894 fi
14895else
14896 ac_cpp_err=yes
14897fi
14898if test -z "$ac_cpp_err"; then
c0d27fcc 14899 ac_header_preproc=yes
98418dba
CW
14900else
14901 echo "$as_me: failed program was:" >&5
19650fd6
AS
14902sed 's/^/| /' conftest.$ac_ext >&5
14903
c0d27fcc 14904 ac_header_preproc=no
98418dba
CW
14905fi
14906rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
14907echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14908echo "${ECHO_T}$ac_header_preproc" >&6
14909
14910# So? What about this header?
edfaf76d
LK
14911case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14912 yes:no: )
c0d27fcc
MR
14913 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
14914echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
14915 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
14916echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
14917 ac_header_preproc=yes
19650fd6 14918 ;;
edfaf76d 14919 no:yes:* )
c0d27fcc
MR
14920 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
14921echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
14922 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
14923echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
14924 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
14925echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
14926 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
14927echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 14928 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 14929echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
14930 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
14931echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
14932 (
14933 cat <<\_ASBOX
edfaf76d
LK
14934## ------------------------------------------ ##
14935## Report this to the AC_PACKAGE_NAME lists. ##
14936## ------------------------------------------ ##
19650fd6
AS
14937_ASBOX
14938 ) |
14939 sed "s/^/$as_me: WARNING: /" >&2
14940 ;;
c0d27fcc
MR
14941esac
14942echo "$as_me:$LINENO: checking for $ac_header" >&5
14943echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14944if eval "test \"\${$as_ac_Header+set}\" = set"; then
14945 echo $ECHO_N "(cached) $ECHO_C" >&6
14946else
edfaf76d 14947 eval "$as_ac_Header=\$ac_header_preproc"
ffe36136 14948fi
c0d27fcc 14949echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 14950echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
14951
14952fi
98418dba 14953if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 14954 cat >>confdefs.h <<_ACEOF
98418dba 14955#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 14956_ACEOF
98418dba
CW
14957
14958fi
c0d27fcc 14959
98418dba
CW
14960done
14961
c0d27fcc 14962
98418dba
CW
14963for ac_func in alarm
14964do
14965as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 14966echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
14967echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14968if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 14969 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 14970else
98418dba 14971 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14972/* confdefs.h. */
14973_ACEOF
14974cat confdefs.h >>conftest.$ac_ext
14975cat >>conftest.$ac_ext <<_ACEOF
14976/* end confdefs.h. */
edfaf76d
LK
14977/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14978 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14979#define $ac_func innocuous_$ac_func
14980
98418dba 14981/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
14982 which can conflict with char $ac_func (); below.
14983 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14984 <limits.h> exists even on freestanding compilers. */
edfaf76d 14985
19650fd6
AS
14986#ifdef __STDC__
14987# include <limits.h>
14988#else
14989# include <assert.h>
14990#endif
edfaf76d
LK
14991
14992#undef $ac_func
14993
ba4481b5 14994/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
14995#ifdef __cplusplus
14996extern "C"
19650fd6 14997{
503d2be0 14998#endif
ba4481b5 14999/* We use char because int might match the return type of a gcc2
503d2be0 15000 builtin and then its argument prototype would still apply. */
98418dba 15001char $ac_func ();
98418dba
CW
15002/* The GNU C library defines this for functions which it implements
15003 to always fail with ENOSYS. Some functions are actually named
15004 something starting with __ and the normal name is an alias. */
15005#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15006choke me
15007#else
19650fd6
AS
15008char (*f) () = $ac_func;
15009#endif
15010#ifdef __cplusplus
15011}
98418dba
CW
15012#endif
15013
19650fd6
AS
15014int
15015main ()
15016{
15017return f != $ac_func;
503d2be0
AS
15018 ;
15019 return 0;
15020}
15021_ACEOF
15022rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15023if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 15024 (eval $ac_link) 2>conftest.er1
503d2be0 15025 ac_status=$?
edfaf76d
LK
15026 grep -v '^ *+' conftest.er1 >conftest.err
15027 rm -f conftest.er1
15028 cat conftest.err >&5
c0d27fcc 15029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15030 (exit $ac_status); } &&
e143ad11
AS
15031 { ac_try='test -z "$ac_c_werror_flag"
15032 || test ! -s conftest.err'
edfaf76d
LK
15033 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15034 (eval $ac_try) 2>&5
15035 ac_status=$?
15036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15037 (exit $ac_status); }; } &&
15038 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 15039 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
15040 (eval $ac_try) 2>&5
15041 ac_status=$?
c0d27fcc 15042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15043 (exit $ac_status); }; }; then
98418dba 15044 eval "$as_ac_var=yes"
503d2be0
AS
15045else
15046 echo "$as_me: failed program was:" >&5
19650fd6
AS
15047sed 's/^/| /' conftest.$ac_ext >&5
15048
98418dba 15049eval "$as_ac_var=no"
503d2be0 15050fi
edfaf76d
LK
15051rm -f conftest.err conftest.$ac_objext \
15052 conftest$ac_exeext conftest.$ac_ext
ffe36136 15053fi
c0d27fcc 15054echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
15055echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15056if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 15057 cat >>confdefs.h <<_ACEOF
98418dba 15058#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 15059_ACEOF
ffe36136 15060
ba4481b5 15061fi
98418dba 15062done
ba4481b5 15063
c0d27fcc 15064echo "$as_me:$LINENO: checking for working mktime" >&5
98418dba
CW
15065echo $ECHO_N "checking for working mktime... $ECHO_C" >&6
15066if test "${ac_cv_func_working_mktime+set}" = set; then
15067 echo $ECHO_N "(cached) $ECHO_C" >&6
15068else
15069 if test "$cross_compiling" = yes; then
15070 ac_cv_func_working_mktime=no
15071else
15072 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15073/* confdefs.h. */
15074_ACEOF
15075cat confdefs.h >>conftest.$ac_ext
15076cat >>conftest.$ac_ext <<_ACEOF
15077/* end confdefs.h. */
98418dba
CW
15078/* Test program from Paul Eggert and Tony Leneis. */
15079#if TIME_WITH_SYS_TIME
15080# include <sys/time.h>
15081# include <time.h>
15082#else
15083# if HAVE_SYS_TIME_H
15084# include <sys/time.h>
15085# else
15086# include <time.h>
15087# endif
15088#endif
ba4481b5 15089
edfaf76d
LK
15090#if HAVE_STDLIB_H
15091# include <stdlib.h>
15092#endif
15093
98418dba
CW
15094#if HAVE_UNISTD_H
15095# include <unistd.h>
15096#endif
ba4481b5 15097
98418dba
CW
15098#if !HAVE_ALARM
15099# define alarm(X) /* empty */
15100#endif
df645f7c 15101
98418dba
CW
15102/* Work around redefinition to rpl_putenv by other config tests. */
15103#undef putenv
df645f7c 15104
98418dba 15105static time_t time_t_max;
edfaf76d 15106static time_t time_t_min;
df645f7c 15107
98418dba 15108/* Values we'll use to set the TZ environment variable. */
edfaf76d
LK
15109static char *tz_strings[] = {
15110 (char *) 0, "TZ=GMT0", "TZ=JST-9",
98418dba
CW
15111 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
15112};
15113#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
503d2be0 15114
98418dba
CW
15115/* Fail if mktime fails to convert a date in the spring-forward gap.
15116 Based on a problem report from Andreas Jaeger. */
15117static void
15118spring_forward_gap ()
15119{
15120 /* glibc (up to about 1998-10-07) failed this test. */
15121 struct tm tm;
15122
15123 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
15124 instead of "TZ=America/Vancouver" in order to detect the bug even
15125 on systems that don't support the Olson extension, or don't have the
15126 full zoneinfo tables installed. */
15127 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
15128
15129 tm.tm_year = 98;
15130 tm.tm_mon = 3;
15131 tm.tm_mday = 5;
15132 tm.tm_hour = 2;
15133 tm.tm_min = 0;
15134 tm.tm_sec = 0;
15135 tm.tm_isdst = -1;
15136 if (mktime (&tm) == (time_t)-1)
15137 exit (1);
15138}
15139
15140static void
edfaf76d 15141mktime_test1 (now)
98418dba
CW
15142 time_t now;
15143{
15144 struct tm *lt;
15145 if ((lt = localtime (&now)) && mktime (lt) != now)
15146 exit (1);
edfaf76d
LK
15147}
15148
15149static void
15150mktime_test (now)
15151 time_t now;
15152{
15153 mktime_test1 (now);
15154 mktime_test1 ((time_t) (time_t_max - now));
15155 mktime_test1 ((time_t) (time_t_min + now));
98418dba
CW
15156}
15157
15158static void
15159irix_6_4_bug ()
15160{
15161 /* Based on code from Ariel Faigon. */
15162 struct tm tm;
15163 tm.tm_year = 96;
15164 tm.tm_mon = 3;
15165 tm.tm_mday = 0;
15166 tm.tm_hour = 0;
15167 tm.tm_min = 0;
15168 tm.tm_sec = 0;
15169 tm.tm_isdst = -1;
15170 mktime (&tm);
15171 if (tm.tm_mon != 2 || tm.tm_mday != 31)
15172 exit (1);
15173}
15174
15175static void
15176bigtime_test (j)
15177 int j;
15178{
15179 struct tm tm;
15180 time_t now;
15181 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
15182 now = mktime (&tm);
15183 if (now != (time_t) -1)
15184 {
15185 struct tm *lt = localtime (&now);
15186 if (! (lt
15187 && lt->tm_year == tm.tm_year
15188 && lt->tm_mon == tm.tm_mon
15189 && lt->tm_mday == tm.tm_mday
15190 && lt->tm_hour == tm.tm_hour
15191 && lt->tm_min == tm.tm_min
15192 && lt->tm_sec == tm.tm_sec
15193 && lt->tm_yday == tm.tm_yday
15194 && lt->tm_wday == tm.tm_wday
15195 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
15196 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
15197 exit (1);
15198 }
15199}
15200
15201int
15202main ()
15203{
15204 time_t t, delta;
15205 int i, j;
15206
15207 /* This test makes some buggy mktime implementations loop.
15208 Give up after 60 seconds; a mktime slower than that
15209 isn't worth using anyway. */
15210 alarm (60);
15211
15212 for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2)
15213 continue;
15214 time_t_max--;
edfaf76d
LK
15215 if ((time_t) -1 < 0)
15216 for (time_t_min = -1; (time_t) (time_t_min * 2) < 0; time_t_min *= 2)
15217 continue;
98418dba
CW
15218 delta = time_t_max / 997; /* a suitable prime number */
15219 for (i = 0; i < N_STRINGS; i++)
15220 {
15221 if (tz_strings[i])
15222 putenv (tz_strings[i]);
503d2be0 15223
98418dba
CW
15224 for (t = 0; t <= time_t_max - delta; t += delta)
15225 mktime_test (t);
edfaf76d
LK
15226 mktime_test ((time_t) 1);
15227 mktime_test ((time_t) (60 * 60));
15228 mktime_test ((time_t) (60 * 60 * 24));
98418dba
CW
15229
15230 for (j = 1; 0 < j; j *= 2)
edfaf76d 15231 bigtime_test (j);
98418dba
CW
15232 bigtime_test (j - 1);
15233 }
15234 irix_6_4_bug ();
15235 spring_forward_gap ();
15236 exit (0);
503d2be0
AS
15237}
15238_ACEOF
98418dba 15239rm -f conftest$ac_exeext
c0d27fcc 15240if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
15241 (eval $ac_link) 2>&5
15242 ac_status=$?
c0d27fcc 15243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 15244 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 15245 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
15246 (eval $ac_try) 2>&5
15247 ac_status=$?
c0d27fcc 15248 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15249 (exit $ac_status); }; }; then
98418dba 15250 ac_cv_func_working_mktime=yes
503d2be0 15251else
98418dba
CW
15252 echo "$as_me: program exited with status $ac_status" >&5
15253echo "$as_me: failed program was:" >&5
19650fd6
AS
15254sed 's/^/| /' conftest.$ac_ext >&5
15255
c0d27fcc 15256( exit $ac_status )
98418dba 15257ac_cv_func_working_mktime=no
503d2be0 15258fi
edfaf76d 15259rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
503d2be0 15260fi
ba4481b5 15261fi
c0d27fcc 15262echo "$as_me:$LINENO: result: $ac_cv_func_working_mktime" >&5
98418dba
CW
15263echo "${ECHO_T}$ac_cv_func_working_mktime" >&6
15264if test $ac_cv_func_working_mktime = no; then
edfaf76d
LK
15265 case $LIBOBJS in
15266 "mktime.$ac_objext" | \
15267 *" mktime.$ac_objext" | \
15268 "mktime.$ac_objext "* | \
15269 *" mktime.$ac_objext "* ) ;;
15270 *) LIBOBJS="$LIBOBJS mktime.$ac_objext" ;;
15271esac
15272
ba4481b5
DL
15273fi
15274
98418dba 15275if test "$ac_cv_func_working_mktime" = no; then
b936fae4 15276
c0d27fcc 15277cat >>confdefs.h <<\_ACEOF
98418dba 15278#define BROKEN_MKTIME 1
c0d27fcc 15279_ACEOF
ba4481b5 15280
ba4481b5 15281fi
503d2be0 15282
98418dba
CW
15283ac_have_func=no # yes means we've found a way to get the load average.
15284
6bae0ccf
DL
15285# Make sure getloadavg.c is where it belongs, at configure-time.
15286test -f "$srcdir/$ac_config_libobj_dir/getloadavg.c" ||
15287 { { echo "$as_me:$LINENO: error: $srcdir/$ac_config_libobj_dir/getloadavg.c is missing" >&5
15288echo "$as_me: error: $srcdir/$ac_config_libobj_dir/getloadavg.c is missing" >&2;}
15289 { (exit 1); exit 1; }; }
15290
98418dba
CW
15291ac_save_LIBS=$LIBS
15292
15293# Check for getloadavg, but be sure not to touch the cache variable.
c0d27fcc 15294(echo "$as_me:$LINENO: checking for getloadavg" >&5
98418dba
CW
15295echo $ECHO_N "checking for getloadavg... $ECHO_C" >&6
15296if test "${ac_cv_func_getloadavg+set}" = set; then
503d2be0 15297 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15298else
503d2be0 15299 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15300/* confdefs.h. */
15301_ACEOF
15302cat confdefs.h >>conftest.$ac_ext
15303cat >>conftest.$ac_ext <<_ACEOF
15304/* end confdefs.h. */
edfaf76d
LK
15305/* Define getloadavg to an innocuous variant, in case <limits.h> declares getloadavg.
15306 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15307#define getloadavg innocuous_getloadavg
15308
98418dba 15309/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
15310 which can conflict with char getloadavg (); below.
15311 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15312 <limits.h> exists even on freestanding compilers. */
edfaf76d 15313
19650fd6
AS
15314#ifdef __STDC__
15315# include <limits.h>
15316#else
15317# include <assert.h>
15318#endif
edfaf76d
LK
15319
15320#undef getloadavg
15321
ba4481b5 15322/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
15323#ifdef __cplusplus
15324extern "C"
19650fd6 15325{
503d2be0 15326#endif
ba4481b5 15327/* We use char because int might match the return type of a gcc2
503d2be0 15328 builtin and then its argument prototype would still apply. */
98418dba 15329char getloadavg ();
98418dba
CW
15330/* The GNU C library defines this for functions which it implements
15331 to always fail with ENOSYS. Some functions are actually named
15332 something starting with __ and the normal name is an alias. */
15333#if defined (__stub_getloadavg) || defined (__stub___getloadavg)
15334choke me
15335#else
19650fd6
AS
15336char (*f) () = getloadavg;
15337#endif
15338#ifdef __cplusplus
15339}
cd958eb3
MB
15340#endif
15341
19650fd6
AS
15342int
15343main ()
15344{
15345return f != getloadavg;
503d2be0
AS
15346 ;
15347 return 0;
15348}
15349_ACEOF
15350rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15351if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 15352 (eval $ac_link) 2>conftest.er1
503d2be0 15353 ac_status=$?
edfaf76d
LK
15354 grep -v '^ *+' conftest.er1 >conftest.err
15355 rm -f conftest.er1
15356 cat conftest.err >&5
c0d27fcc 15357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15358 (exit $ac_status); } &&
e143ad11
AS
15359 { ac_try='test -z "$ac_c_werror_flag"
15360 || test ! -s conftest.err'
edfaf76d
LK
15361 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15362 (eval $ac_try) 2>&5
15363 ac_status=$?
15364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15365 (exit $ac_status); }; } &&
15366 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 15367 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
15368 (eval $ac_try) 2>&5
15369 ac_status=$?
c0d27fcc 15370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15371 (exit $ac_status); }; }; then
98418dba 15372 ac_cv_func_getloadavg=yes
503d2be0
AS
15373else
15374 echo "$as_me: failed program was:" >&5
19650fd6
AS
15375sed 's/^/| /' conftest.$ac_ext >&5
15376
98418dba 15377ac_cv_func_getloadavg=no
503d2be0 15378fi
edfaf76d
LK
15379rm -f conftest.err conftest.$ac_objext \
15380 conftest$ac_exeext conftest.$ac_ext
ba4481b5 15381fi
c0d27fcc 15382echo "$as_me:$LINENO: result: $ac_cv_func_getloadavg" >&5
98418dba
CW
15383echo "${ECHO_T}$ac_cv_func_getloadavg" >&6
15384if test $ac_cv_func_getloadavg = yes; then
15385 exit 0
15386else
15387 exit 1
ba4481b5 15388fi
98418dba 15389) && ac_have_func=yes
ba4481b5 15390
98418dba 15391# On HPUX9, an unprivileged user can get load averages through this function.
503d2be0 15392
98418dba
CW
15393for ac_func in pstat_getdynamic
15394do
15395as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 15396echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
15397echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15398if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 15399 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15400else
503d2be0 15401 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15402/* confdefs.h. */
15403_ACEOF
15404cat confdefs.h >>conftest.$ac_ext
15405cat >>conftest.$ac_ext <<_ACEOF
15406/* end confdefs.h. */
edfaf76d
LK
15407/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15408 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15409#define $ac_func innocuous_$ac_func
15410
98418dba 15411/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
15412 which can conflict with char $ac_func (); below.
15413 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15414 <limits.h> exists even on freestanding compilers. */
edfaf76d 15415
19650fd6
AS
15416#ifdef __STDC__
15417# include <limits.h>
15418#else
15419# include <assert.h>
15420#endif
edfaf76d
LK
15421
15422#undef $ac_func
15423
ba4481b5 15424/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
15425#ifdef __cplusplus
15426extern "C"
19650fd6 15427{
503d2be0 15428#endif
ba4481b5 15429/* We use char because int might match the return type of a gcc2
503d2be0 15430 builtin and then its argument prototype would still apply. */
98418dba 15431char $ac_func ();
98418dba
CW
15432/* The GNU C library defines this for functions which it implements
15433 to always fail with ENOSYS. Some functions are actually named
15434 something starting with __ and the normal name is an alias. */
15435#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15436choke me
15437#else
19650fd6
AS
15438char (*f) () = $ac_func;
15439#endif
15440#ifdef __cplusplus
15441}
98418dba
CW
15442#endif
15443
19650fd6
AS
15444int
15445main ()
15446{
15447return f != $ac_func;
98418dba
CW
15448 ;
15449 return 0;
15450}
f21fadcc 15451_ACEOF
98418dba 15452rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15453if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 15454 (eval $ac_link) 2>conftest.er1
f21fadcc 15455 ac_status=$?
edfaf76d
LK
15456 grep -v '^ *+' conftest.er1 >conftest.err
15457 rm -f conftest.er1
15458 cat conftest.err >&5
c0d27fcc 15459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 15460 (exit $ac_status); } &&
e143ad11
AS
15461 { ac_try='test -z "$ac_c_werror_flag"
15462 || test ! -s conftest.err'
edfaf76d
LK
15463 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15464 (eval $ac_try) 2>&5
15465 ac_status=$?
15466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15467 (exit $ac_status); }; } &&
15468 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 15469 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
15470 (eval $ac_try) 2>&5
15471 ac_status=$?
c0d27fcc 15472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
15473 (exit $ac_status); }; }; then
15474 eval "$as_ac_var=yes"
f21fadcc
JD
15475else
15476 echo "$as_me: failed program was:" >&5
19650fd6
AS
15477sed 's/^/| /' conftest.$ac_ext >&5
15478
98418dba 15479eval "$as_ac_var=no"
f21fadcc 15480fi
edfaf76d
LK
15481rm -f conftest.err conftest.$ac_objext \
15482 conftest$ac_exeext conftest.$ac_ext
f21fadcc 15483fi
c0d27fcc 15484echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
15485echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15486if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 15487 cat >>confdefs.h <<_ACEOF
98418dba 15488#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 15489_ACEOF
98418dba
CW
15490
15491fi
15492done
15493
c0d27fcc 15494
98418dba
CW
15495# Solaris has libkstat which does not require root.
15496
c0d27fcc 15497echo "$as_me:$LINENO: checking for kstat_open in -lkstat" >&5
98418dba
CW
15498echo $ECHO_N "checking for kstat_open in -lkstat... $ECHO_C" >&6
15499if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then
f21fadcc
JD
15500 echo $ECHO_N "(cached) $ECHO_C" >&6
15501else
15502 ac_check_lib_save_LIBS=$LIBS
98418dba 15503LIBS="-lkstat $LIBS"
f21fadcc 15504cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15505/* confdefs.h. */
15506_ACEOF
15507cat confdefs.h >>conftest.$ac_ext
15508cat >>conftest.$ac_ext <<_ACEOF
15509/* end confdefs.h. */
f21fadcc
JD
15510
15511/* Override any gcc2 internal prototype to avoid an error. */
15512#ifdef __cplusplus
15513extern "C"
15514#endif
15515/* We use char because int might match the return type of a gcc2
15516 builtin and then its argument prototype would still apply. */
98418dba 15517char kstat_open ();
f21fadcc
JD
15518int
15519main ()
15520{
98418dba 15521kstat_open ();
f21fadcc
JD
15522 ;
15523 return 0;
15524}
15525_ACEOF
15526rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15527if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 15528 (eval $ac_link) 2>conftest.er1
f21fadcc 15529 ac_status=$?
edfaf76d
LK
15530 grep -v '^ *+' conftest.er1 >conftest.err
15531 rm -f conftest.er1
15532 cat conftest.err >&5
c0d27fcc 15533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f21fadcc 15534 (exit $ac_status); } &&
e143ad11
AS
15535 { ac_try='test -z "$ac_c_werror_flag"
15536 || test ! -s conftest.err'
edfaf76d
LK
15537 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15538 (eval $ac_try) 2>&5
15539 ac_status=$?
15540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15541 (exit $ac_status); }; } &&
15542 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 15543 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
f21fadcc
JD
15544 (eval $ac_try) 2>&5
15545 ac_status=$?
c0d27fcc 15546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f21fadcc 15547 (exit $ac_status); }; }; then
98418dba 15548 ac_cv_lib_kstat_kstat_open=yes
f21fadcc
JD
15549else
15550 echo "$as_me: failed program was:" >&5
19650fd6
AS
15551sed 's/^/| /' conftest.$ac_ext >&5
15552
98418dba 15553ac_cv_lib_kstat_kstat_open=no
f21fadcc 15554fi
edfaf76d
LK
15555rm -f conftest.err conftest.$ac_objext \
15556 conftest$ac_exeext conftest.$ac_ext
f21fadcc
JD
15557LIBS=$ac_check_lib_save_LIBS
15558fi
c0d27fcc 15559echo "$as_me:$LINENO: result: $ac_cv_lib_kstat_kstat_open" >&5
98418dba
CW
15560echo "${ECHO_T}$ac_cv_lib_kstat_kstat_open" >&6
15561if test $ac_cv_lib_kstat_kstat_open = yes; then
c0d27fcc 15562 cat >>confdefs.h <<_ACEOF
98418dba 15563#define HAVE_LIBKSTAT 1
c0d27fcc 15564_ACEOF
f21fadcc 15565
98418dba 15566 LIBS="-lkstat $LIBS"
f21fadcc 15567
f21fadcc
JD
15568fi
15569
98418dba
CW
15570test $ac_cv_lib_kstat_kstat_open = yes && ac_have_func=yes
15571
15572# Some systems with -lutil have (and need) -lkvm as well, some do not.
15573# On Solaris, -lkvm requires nlist from -lelf, so check that first
15574# to get the right answer into the cache.
15575# For kstat on solaris, we need libelf to force the definition of SVR4 below.
15576if test $ac_have_func = no; then
c0d27fcc 15577 echo "$as_me:$LINENO: checking for elf_begin in -lelf" >&5
98418dba
CW
15578echo $ECHO_N "checking for elf_begin in -lelf... $ECHO_C" >&6
15579if test "${ac_cv_lib_elf_elf_begin+set}" = set; then
503d2be0 15580 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15581else
98418dba
CW
15582 ac_check_lib_save_LIBS=$LIBS
15583LIBS="-lelf $LIBS"
15584cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15585/* confdefs.h. */
15586_ACEOF
15587cat confdefs.h >>conftest.$ac_ext
15588cat >>conftest.$ac_ext <<_ACEOF
15589/* end confdefs.h. */
98418dba
CW
15590
15591/* Override any gcc2 internal prototype to avoid an error. */
15592#ifdef __cplusplus
15593extern "C"
15594#endif
15595/* We use char because int might match the return type of a gcc2
15596 builtin and then its argument prototype would still apply. */
15597char elf_begin ();
503d2be0
AS
15598int
15599main ()
15600{
98418dba 15601elf_begin ();
503d2be0
AS
15602 ;
15603 return 0;
15604}
15605_ACEOF
15606rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15607if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 15608 (eval $ac_link) 2>conftest.er1
503d2be0 15609 ac_status=$?
edfaf76d
LK
15610 grep -v '^ *+' conftest.er1 >conftest.err
15611 rm -f conftest.er1
15612 cat conftest.err >&5
c0d27fcc 15613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15614 (exit $ac_status); } &&
e143ad11
AS
15615 { ac_try='test -z "$ac_c_werror_flag"
15616 || test ! -s conftest.err'
edfaf76d
LK
15617 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15618 (eval $ac_try) 2>&5
15619 ac_status=$?
15620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15621 (exit $ac_status); }; } &&
15622 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 15623 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
15624 (eval $ac_try) 2>&5
15625 ac_status=$?
c0d27fcc 15626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15627 (exit $ac_status); }; }; then
98418dba 15628 ac_cv_lib_elf_elf_begin=yes
ba4481b5 15629else
503d2be0 15630 echo "$as_me: failed program was:" >&5
19650fd6
AS
15631sed 's/^/| /' conftest.$ac_ext >&5
15632
98418dba 15633ac_cv_lib_elf_elf_begin=no
ba4481b5 15634fi
edfaf76d
LK
15635rm -f conftest.err conftest.$ac_objext \
15636 conftest$ac_exeext conftest.$ac_ext
98418dba 15637LIBS=$ac_check_lib_save_LIBS
ba4481b5 15638fi
c0d27fcc 15639echo "$as_me:$LINENO: result: $ac_cv_lib_elf_elf_begin" >&5
98418dba
CW
15640echo "${ECHO_T}$ac_cv_lib_elf_elf_begin" >&6
15641if test $ac_cv_lib_elf_elf_begin = yes; then
15642 LIBS="-lelf $LIBS"
ba4481b5
DL
15643fi
15644
98418dba
CW
15645fi
15646if test $ac_have_func = no; then
c0d27fcc 15647 echo "$as_me:$LINENO: checking for kvm_open in -lkvm" >&5
98418dba
CW
15648echo $ECHO_N "checking for kvm_open in -lkvm... $ECHO_C" >&6
15649if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then
503d2be0 15650 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15651else
98418dba
CW
15652 ac_check_lib_save_LIBS=$LIBS
15653LIBS="-lkvm $LIBS"
15654cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15655/* confdefs.h. */
15656_ACEOF
15657cat confdefs.h >>conftest.$ac_ext
15658cat >>conftest.$ac_ext <<_ACEOF
15659/* end confdefs.h. */
98418dba
CW
15660
15661/* Override any gcc2 internal prototype to avoid an error. */
15662#ifdef __cplusplus
15663extern "C"
15664#endif
15665/* We use char because int might match the return type of a gcc2
15666 builtin and then its argument prototype would still apply. */
15667char kvm_open ();
503d2be0
AS
15668int
15669main ()
15670{
98418dba 15671kvm_open ();
503d2be0
AS
15672 ;
15673 return 0;
15674}
15675_ACEOF
15676rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15677if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 15678 (eval $ac_link) 2>conftest.er1
503d2be0 15679 ac_status=$?
edfaf76d
LK
15680 grep -v '^ *+' conftest.er1 >conftest.err
15681 rm -f conftest.er1
15682 cat conftest.err >&5
c0d27fcc 15683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15684 (exit $ac_status); } &&
e143ad11
AS
15685 { ac_try='test -z "$ac_c_werror_flag"
15686 || test ! -s conftest.err'
edfaf76d
LK
15687 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15688 (eval $ac_try) 2>&5
15689 ac_status=$?
15690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15691 (exit $ac_status); }; } &&
15692 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 15693 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
15694 (eval $ac_try) 2>&5
15695 ac_status=$?
c0d27fcc 15696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15697 (exit $ac_status); }; }; then
98418dba 15698 ac_cv_lib_kvm_kvm_open=yes
503d2be0
AS
15699else
15700 echo "$as_me: failed program was:" >&5
19650fd6
AS
15701sed 's/^/| /' conftest.$ac_ext >&5
15702
98418dba 15703ac_cv_lib_kvm_kvm_open=no
503d2be0 15704fi
edfaf76d
LK
15705rm -f conftest.err conftest.$ac_objext \
15706 conftest$ac_exeext conftest.$ac_ext
98418dba 15707LIBS=$ac_check_lib_save_LIBS
503d2be0 15708fi
c0d27fcc 15709echo "$as_me:$LINENO: result: $ac_cv_lib_kvm_kvm_open" >&5
98418dba
CW
15710echo "${ECHO_T}$ac_cv_lib_kvm_kvm_open" >&6
15711if test $ac_cv_lib_kvm_kvm_open = yes; then
15712 LIBS="-lkvm $LIBS"
ba4481b5
DL
15713fi
15714
98418dba 15715 # Check for the 4.4BSD definition of getloadavg.
c0d27fcc 15716 echo "$as_me:$LINENO: checking for getloadavg in -lutil" >&5
98418dba
CW
15717echo $ECHO_N "checking for getloadavg in -lutil... $ECHO_C" >&6
15718if test "${ac_cv_lib_util_getloadavg+set}" = set; then
503d2be0 15719 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15720else
98418dba
CW
15721 ac_check_lib_save_LIBS=$LIBS
15722LIBS="-lutil $LIBS"
15723cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15724/* confdefs.h. */
15725_ACEOF
15726cat confdefs.h >>conftest.$ac_ext
15727cat >>conftest.$ac_ext <<_ACEOF
15728/* end confdefs.h. */
98418dba
CW
15729
15730/* Override any gcc2 internal prototype to avoid an error. */
15731#ifdef __cplusplus
15732extern "C"
15733#endif
15734/* We use char because int might match the return type of a gcc2
15735 builtin and then its argument prototype would still apply. */
15736char getloadavg ();
503d2be0
AS
15737int
15738main ()
15739{
98418dba 15740getloadavg ();
503d2be0
AS
15741 ;
15742 return 0;
15743}
15744_ACEOF
15745rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15746if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 15747 (eval $ac_link) 2>conftest.er1
503d2be0 15748 ac_status=$?
edfaf76d
LK
15749 grep -v '^ *+' conftest.er1 >conftest.err
15750 rm -f conftest.er1
15751 cat conftest.err >&5
c0d27fcc 15752 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15753 (exit $ac_status); } &&
e143ad11
AS
15754 { ac_try='test -z "$ac_c_werror_flag"
15755 || test ! -s conftest.err'
edfaf76d
LK
15756 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15757 (eval $ac_try) 2>&5
15758 ac_status=$?
15759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15760 (exit $ac_status); }; } &&
15761 { ac_try='test -s conftest$ac_exeext'
35996d22
AS
15762 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15763 (eval $ac_try) 2>&5
15764 ac_status=$?
15765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15766 (exit $ac_status); }; }; then
15767 ac_cv_lib_util_getloadavg=yes
15768else
503d2be0 15769 echo "$as_me: failed program was:" >&5
19650fd6
AS
15770sed 's/^/| /' conftest.$ac_ext >&5
15771
98418dba 15772ac_cv_lib_util_getloadavg=no
ba4481b5 15773fi
edfaf76d
LK
15774rm -f conftest.err conftest.$ac_objext \
15775 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
15776LIBS=$ac_check_lib_save_LIBS
15777fi
c0d27fcc 15778echo "$as_me:$LINENO: result: $ac_cv_lib_util_getloadavg" >&5
98418dba
CW
15779echo "${ECHO_T}$ac_cv_lib_util_getloadavg" >&6
15780if test $ac_cv_lib_util_getloadavg = yes; then
15781 LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes
ba4481b5 15782fi
503d2be0 15783
98418dba 15784fi
ba4481b5 15785
98418dba
CW
15786if test $ac_have_func = no; then
15787 # There is a commonly available library for RS/6000 AIX.
15788 # Since it is not a standard part of AIX, it might be installed locally.
15789 ac_getloadavg_LIBS=$LIBS
15790 LIBS="-L/usr/local/lib $LIBS"
c0d27fcc 15791 echo "$as_me:$LINENO: checking for getloadavg in -lgetloadavg" >&5
98418dba
CW
15792echo $ECHO_N "checking for getloadavg in -lgetloadavg... $ECHO_C" >&6
15793if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then
503d2be0 15794 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15795else
98418dba
CW
15796 ac_check_lib_save_LIBS=$LIBS
15797LIBS="-lgetloadavg $LIBS"
15798cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15799/* confdefs.h. */
15800_ACEOF
15801cat confdefs.h >>conftest.$ac_ext
15802cat >>conftest.$ac_ext <<_ACEOF
15803/* end confdefs.h. */
ba4481b5 15804
98418dba
CW
15805/* Override any gcc2 internal prototype to avoid an error. */
15806#ifdef __cplusplus
15807extern "C"
15808#endif
15809/* We use char because int might match the return type of a gcc2
15810 builtin and then its argument prototype would still apply. */
15811char getloadavg ();
98418dba
CW
15812int
15813main ()
15814{
15815getloadavg ();
15816 ;
15817 return 0;
15818}
503d2be0 15819_ACEOF
98418dba 15820rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15821if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 15822 (eval $ac_link) 2>conftest.er1
98418dba 15823 ac_status=$?
edfaf76d
LK
15824 grep -v '^ *+' conftest.er1 >conftest.err
15825 rm -f conftest.er1
15826 cat conftest.err >&5
c0d27fcc 15827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 15828 (exit $ac_status); } &&
e143ad11
AS
15829 { ac_try='test -z "$ac_c_werror_flag"
15830 || test ! -s conftest.err'
edfaf76d
LK
15831 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15832 (eval $ac_try) 2>&5
15833 ac_status=$?
15834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15835 (exit $ac_status); }; } &&
15836 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 15837 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
15838 (eval $ac_try) 2>&5
15839 ac_status=$?
c0d27fcc 15840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
15841 (exit $ac_status); }; }; then
15842 ac_cv_lib_getloadavg_getloadavg=yes
ba4481b5 15843else
98418dba 15844 echo "$as_me: failed program was:" >&5
19650fd6
AS
15845sed 's/^/| /' conftest.$ac_ext >&5
15846
98418dba
CW
15847ac_cv_lib_getloadavg_getloadavg=no
15848fi
edfaf76d
LK
15849rm -f conftest.err conftest.$ac_objext \
15850 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
15851LIBS=$ac_check_lib_save_LIBS
15852fi
c0d27fcc 15853echo "$as_me:$LINENO: result: $ac_cv_lib_getloadavg_getloadavg" >&5
98418dba
CW
15854echo "${ECHO_T}$ac_cv_lib_getloadavg_getloadavg" >&6
15855if test $ac_cv_lib_getloadavg_getloadavg = yes; then
15856 LIBS="-lgetloadavg $LIBS"
15857else
15858 LIBS=$ac_getloadavg_LIBS
ba4481b5 15859fi
ba4481b5
DL
15860
15861fi
98418dba
CW
15862
15863# Make sure it is really in the library, if we think we found it,
15864# otherwise set up the replacement function.
15865
15866for ac_func in getloadavg
15867do
15868as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 15869echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
15870echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15871if eval "test \"\${$as_ac_var+set}\" = set"; then
15872 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15873else
503d2be0 15874 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15875/* confdefs.h. */
15876_ACEOF
15877cat confdefs.h >>conftest.$ac_ext
15878cat >>conftest.$ac_ext <<_ACEOF
15879/* end confdefs.h. */
edfaf76d
LK
15880/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15881 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15882#define $ac_func innocuous_$ac_func
15883
ba4481b5 15884/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
15885 which can conflict with char $ac_func (); below.
15886 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15887 <limits.h> exists even on freestanding compilers. */
edfaf76d 15888
19650fd6
AS
15889#ifdef __STDC__
15890# include <limits.h>
15891#else
15892# include <assert.h>
15893#endif
edfaf76d
LK
15894
15895#undef $ac_func
15896
ba4481b5 15897/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
15898#ifdef __cplusplus
15899extern "C"
19650fd6 15900{
503d2be0 15901#endif
ba4481b5 15902/* We use char because int might match the return type of a gcc2
503d2be0
AS
15903 builtin and then its argument prototype would still apply. */
15904char $ac_func ();
ba4481b5
DL
15905/* The GNU C library defines this for functions which it implements
15906 to always fail with ENOSYS. Some functions are actually named
15907 something starting with __ and the normal name is an alias. */
15908#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15909choke me
15910#else
19650fd6
AS
15911char (*f) () = $ac_func;
15912#endif
15913#ifdef __cplusplus
15914}
cd958eb3
MB
15915#endif
15916
19650fd6
AS
15917int
15918main ()
15919{
15920return f != $ac_func;
503d2be0
AS
15921 ;
15922 return 0;
15923}
15924_ACEOF
15925rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15926if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 15927 (eval $ac_link) 2>conftest.er1
503d2be0 15928 ac_status=$?
edfaf76d
LK
15929 grep -v '^ *+' conftest.er1 >conftest.err
15930 rm -f conftest.er1
15931 cat conftest.err >&5
c0d27fcc 15932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15933 (exit $ac_status); } &&
e143ad11
AS
15934 { ac_try='test -z "$ac_c_werror_flag"
15935 || test ! -s conftest.err'
edfaf76d
LK
15936 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15937 (eval $ac_try) 2>&5
15938 ac_status=$?
15939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15940 (exit $ac_status); }; } &&
15941 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 15942 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
15943 (eval $ac_try) 2>&5
15944 ac_status=$?
c0d27fcc 15945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
15946 (exit $ac_status); }; }; then
15947 eval "$as_ac_var=yes"
15948else
15949 echo "$as_me: failed program was:" >&5
19650fd6
AS
15950sed 's/^/| /' conftest.$ac_ext >&5
15951
503d2be0
AS
15952eval "$as_ac_var=no"
15953fi
edfaf76d
LK
15954rm -f conftest.err conftest.$ac_objext \
15955 conftest$ac_exeext conftest.$ac_ext
503d2be0 15956fi
c0d27fcc 15957echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
15958echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15959if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 15960 cat >>confdefs.h <<_ACEOF
98418dba 15961#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 15962_ACEOF
503d2be0 15963
98418dba 15964else
edfaf76d
LK
15965 case $LIBOBJS in
15966 "getloadavg.$ac_objext" | \
15967 *" getloadavg.$ac_objext" | \
15968 "getloadavg.$ac_objext "* | \
15969 *" getloadavg.$ac_objext "* ) ;;
15970 *) LIBOBJS="$LIBOBJS getloadavg.$ac_objext" ;;
15971esac
15972
ba4481b5 15973
c0d27fcc 15974cat >>confdefs.h <<\_ACEOF
98418dba 15975#define C_GETLOADAVG 1
c0d27fcc 15976_ACEOF
ba4481b5 15977
98418dba
CW
15978# Figure out what our getloadavg.c needs.
15979ac_have_func=no
c0d27fcc
MR
15980if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
15981 echo "$as_me:$LINENO: checking for sys/dg_sys_info.h" >&5
98418dba
CW
15982echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6
15983if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
503d2be0 15984 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
15985fi
15986echo "$as_me:$LINENO: result: $ac_cv_header_sys_dg_sys_info_h" >&5
15987echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6
ba4481b5 15988else
c0d27fcc
MR
15989 # Is the header compilable?
15990echo "$as_me:$LINENO: checking sys/dg_sys_info.h usability" >&5
15991echo $ECHO_N "checking sys/dg_sys_info.h usability... $ECHO_C" >&6
15992cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15993/* confdefs.h. */
15994_ACEOF
15995cat confdefs.h >>conftest.$ac_ext
15996cat >>conftest.$ac_ext <<_ACEOF
15997/* end confdefs.h. */
c0d27fcc
MR
15998$ac_includes_default
15999#include <sys/dg_sys_info.h>
16000_ACEOF
16001rm -f conftest.$ac_objext
16002if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 16003 (eval $ac_compile) 2>conftest.er1
c0d27fcc 16004 ac_status=$?
edfaf76d
LK
16005 grep -v '^ *+' conftest.er1 >conftest.err
16006 rm -f conftest.er1
16007 cat conftest.err >&5
c0d27fcc
MR
16008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16009 (exit $ac_status); } &&
e143ad11
AS
16010 { ac_try='test -z "$ac_c_werror_flag"
16011 || test ! -s conftest.err'
edfaf76d
LK
16012 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16013 (eval $ac_try) 2>&5
16014 ac_status=$?
16015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16016 (exit $ac_status); }; } &&
16017 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
16018 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16019 (eval $ac_try) 2>&5
16020 ac_status=$?
16021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16022 (exit $ac_status); }; }; then
16023 ac_header_compiler=yes
16024else
16025 echo "$as_me: failed program was:" >&5
19650fd6
AS
16026sed 's/^/| /' conftest.$ac_ext >&5
16027
c0d27fcc
MR
16028ac_header_compiler=no
16029fi
edfaf76d 16030rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
16031echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16032echo "${ECHO_T}$ac_header_compiler" >&6
16033
16034# Is the header present?
16035echo "$as_me:$LINENO: checking sys/dg_sys_info.h presence" >&5
16036echo $ECHO_N "checking sys/dg_sys_info.h presence... $ECHO_C" >&6
16037cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16038/* confdefs.h. */
16039_ACEOF
16040cat confdefs.h >>conftest.$ac_ext
16041cat >>conftest.$ac_ext <<_ACEOF
16042/* end confdefs.h. */
98418dba
CW
16043#include <sys/dg_sys_info.h>
16044_ACEOF
c0d27fcc 16045if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
16046 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16047 ac_status=$?
6bae0ccf 16048 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
16049 rm -f conftest.er1
16050 cat conftest.err >&5
c0d27fcc 16051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
16052 (exit $ac_status); } >/dev/null; then
16053 if test -s conftest.err; then
16054 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 16055 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
16056 else
16057 ac_cpp_err=
16058 fi
16059else
16060 ac_cpp_err=yes
ba4481b5 16061fi
98418dba 16062if test -z "$ac_cpp_err"; then
c0d27fcc 16063 ac_header_preproc=yes
98418dba
CW
16064else
16065 echo "$as_me: failed program was:" >&5
19650fd6
AS
16066sed 's/^/| /' conftest.$ac_ext >&5
16067
c0d27fcc 16068 ac_header_preproc=no
ba4481b5 16069fi
98418dba 16070rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
16071echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16072echo "${ECHO_T}$ac_header_preproc" >&6
16073
16074# So? What about this header?
edfaf76d
LK
16075case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16076 yes:no: )
c0d27fcc
MR
16077 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: accepted by the compiler, rejected by the preprocessor!" >&5
16078echo "$as_me: WARNING: sys/dg_sys_info.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
16079 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: proceeding with the compiler's result" >&5
16080echo "$as_me: WARNING: sys/dg_sys_info.h: proceeding with the compiler's result" >&2;}
16081 ac_header_preproc=yes
19650fd6 16082 ;;
edfaf76d 16083 no:yes:* )
c0d27fcc
MR
16084 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: present but cannot be compiled" >&5
16085echo "$as_me: WARNING: sys/dg_sys_info.h: present but cannot be compiled" >&2;}
edfaf76d
LK
16086 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: check for missing prerequisite headers?" >&5
16087echo "$as_me: WARNING: sys/dg_sys_info.h: check for missing prerequisite headers?" >&2;}
16088 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: see the Autoconf documentation" >&5
16089echo "$as_me: WARNING: sys/dg_sys_info.h: see the Autoconf documentation" >&2;}
16090 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: section \"Present But Cannot Be Compiled\"" >&5
16091echo "$as_me: WARNING: sys/dg_sys_info.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16092 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&5
19650fd6 16093echo "$as_me: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
16094 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: in the future, the compiler will take precedence" >&5
16095echo "$as_me: WARNING: sys/dg_sys_info.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
16096 (
16097 cat <<\_ASBOX
edfaf76d
LK
16098## ------------------------------------------ ##
16099## Report this to the AC_PACKAGE_NAME lists. ##
16100## ------------------------------------------ ##
19650fd6
AS
16101_ASBOX
16102 ) |
16103 sed "s/^/$as_me: WARNING: /" >&2
16104 ;;
c0d27fcc
MR
16105esac
16106echo "$as_me:$LINENO: checking for sys/dg_sys_info.h" >&5
16107echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6
16108if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
16109 echo $ECHO_N "(cached) $ECHO_C" >&6
16110else
16111 ac_cv_header_sys_dg_sys_info_h=$ac_header_preproc
98418dba 16112fi
c0d27fcc 16113echo "$as_me:$LINENO: result: $ac_cv_header_sys_dg_sys_info_h" >&5
98418dba 16114echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6
c0d27fcc
MR
16115
16116fi
98418dba
CW
16117if test $ac_cv_header_sys_dg_sys_info_h = yes; then
16118 ac_have_func=yes
ba4481b5 16119
c0d27fcc 16120cat >>confdefs.h <<\_ACEOF
98418dba 16121#define DGUX 1
c0d27fcc
MR
16122_ACEOF
16123
503d2be0 16124
c0d27fcc 16125echo "$as_me:$LINENO: checking for dg_sys_info in -ldgc" >&5
98418dba
CW
16126echo $ECHO_N "checking for dg_sys_info in -ldgc... $ECHO_C" >&6
16127if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then
503d2be0 16128 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16129else
503d2be0 16130 ac_check_lib_save_LIBS=$LIBS
98418dba 16131LIBS="-ldgc $LIBS"
503d2be0 16132cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16133/* confdefs.h. */
16134_ACEOF
16135cat confdefs.h >>conftest.$ac_ext
16136cat >>conftest.$ac_ext <<_ACEOF
16137/* end confdefs.h. */
503d2be0 16138
ba4481b5 16139/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
16140#ifdef __cplusplus
16141extern "C"
16142#endif
ba4481b5 16143/* We use char because int might match the return type of a gcc2
503d2be0 16144 builtin and then its argument prototype would still apply. */
98418dba 16145char dg_sys_info ();
503d2be0
AS
16146int
16147main ()
16148{
98418dba 16149dg_sys_info ();
503d2be0
AS
16150 ;
16151 return 0;
16152}
16153_ACEOF
16154rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 16155if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 16156 (eval $ac_link) 2>conftest.er1
503d2be0 16157 ac_status=$?
edfaf76d
LK
16158 grep -v '^ *+' conftest.er1 >conftest.err
16159 rm -f conftest.er1
16160 cat conftest.err >&5
c0d27fcc 16161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16162 (exit $ac_status); } &&
e143ad11
AS
16163 { ac_try='test -z "$ac_c_werror_flag"
16164 || test ! -s conftest.err'
edfaf76d
LK
16165 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16166 (eval $ac_try) 2>&5
16167 ac_status=$?
16168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16169 (exit $ac_status); }; } &&
16170 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 16171 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
16172 (eval $ac_try) 2>&5
16173 ac_status=$?
c0d27fcc 16174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16175 (exit $ac_status); }; }; then
98418dba 16176 ac_cv_lib_dgc_dg_sys_info=yes
503d2be0
AS
16177else
16178 echo "$as_me: failed program was:" >&5
19650fd6
AS
16179sed 's/^/| /' conftest.$ac_ext >&5
16180
98418dba 16181ac_cv_lib_dgc_dg_sys_info=no
503d2be0 16182fi
edfaf76d
LK
16183rm -f conftest.err conftest.$ac_objext \
16184 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
16185LIBS=$ac_check_lib_save_LIBS
16186fi
c0d27fcc 16187echo "$as_me:$LINENO: result: $ac_cv_lib_dgc_dg_sys_info" >&5
98418dba
CW
16188echo "${ECHO_T}$ac_cv_lib_dgc_dg_sys_info" >&6
16189if test $ac_cv_lib_dgc_dg_sys_info = yes; then
c0d27fcc 16190 cat >>confdefs.h <<_ACEOF
98418dba 16191#define HAVE_LIBDGC 1
c0d27fcc 16192_ACEOF
ba4481b5 16193
98418dba 16194 LIBS="-ldgc $LIBS"
ba4481b5 16195
ba4481b5
DL
16196fi
16197
98418dba 16198fi
503d2be0 16199
c0d27fcc
MR
16200
16201
16202if test "${ac_cv_header_locale_h+set}" = set; then
16203 echo "$as_me:$LINENO: checking for locale.h" >&5
98418dba
CW
16204echo $ECHO_N "checking for locale.h... $ECHO_C" >&6
16205if test "${ac_cv_header_locale_h+set}" = set; then
503d2be0 16206 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
16207fi
16208echo "$as_me:$LINENO: result: $ac_cv_header_locale_h" >&5
16209echo "${ECHO_T}$ac_cv_header_locale_h" >&6
503d2be0 16210else
c0d27fcc
MR
16211 # Is the header compilable?
16212echo "$as_me:$LINENO: checking locale.h usability" >&5
16213echo $ECHO_N "checking locale.h usability... $ECHO_C" >&6
16214cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16215/* confdefs.h. */
16216_ACEOF
16217cat confdefs.h >>conftest.$ac_ext
16218cat >>conftest.$ac_ext <<_ACEOF
16219/* end confdefs.h. */
c0d27fcc
MR
16220$ac_includes_default
16221#include <locale.h>
16222_ACEOF
16223rm -f conftest.$ac_objext
16224if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 16225 (eval $ac_compile) 2>conftest.er1
c0d27fcc 16226 ac_status=$?
edfaf76d
LK
16227 grep -v '^ *+' conftest.er1 >conftest.err
16228 rm -f conftest.er1
16229 cat conftest.err >&5
c0d27fcc
MR
16230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16231 (exit $ac_status); } &&
e143ad11
AS
16232 { ac_try='test -z "$ac_c_werror_flag"
16233 || test ! -s conftest.err'
edfaf76d
LK
16234 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16235 (eval $ac_try) 2>&5
16236 ac_status=$?
16237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16238 (exit $ac_status); }; } &&
16239 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
16240 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16241 (eval $ac_try) 2>&5
16242 ac_status=$?
16243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16244 (exit $ac_status); }; }; then
16245 ac_header_compiler=yes
16246else
16247 echo "$as_me: failed program was:" >&5
19650fd6
AS
16248sed 's/^/| /' conftest.$ac_ext >&5
16249
c0d27fcc
MR
16250ac_header_compiler=no
16251fi
edfaf76d 16252rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
16253echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16254echo "${ECHO_T}$ac_header_compiler" >&6
16255
16256# Is the header present?
16257echo "$as_me:$LINENO: checking locale.h presence" >&5
16258echo $ECHO_N "checking locale.h presence... $ECHO_C" >&6
16259cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16260/* confdefs.h. */
16261_ACEOF
16262cat confdefs.h >>conftest.$ac_ext
16263cat >>conftest.$ac_ext <<_ACEOF
16264/* end confdefs.h. */
98418dba 16265#include <locale.h>
503d2be0 16266_ACEOF
c0d27fcc 16267if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba 16268 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
503d2be0 16269 ac_status=$?
6bae0ccf 16270 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
16271 rm -f conftest.er1
16272 cat conftest.err >&5
c0d27fcc 16273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
16274 (exit $ac_status); } >/dev/null; then
16275 if test -s conftest.err; then
16276 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 16277 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
16278 else
16279 ac_cpp_err=
16280 fi
503d2be0 16281else
98418dba 16282 ac_cpp_err=yes
503d2be0 16283fi
98418dba 16284if test -z "$ac_cpp_err"; then
c0d27fcc 16285 ac_header_preproc=yes
98418dba
CW
16286else
16287 echo "$as_me: failed program was:" >&5
19650fd6
AS
16288sed 's/^/| /' conftest.$ac_ext >&5
16289
c0d27fcc 16290 ac_header_preproc=no
ba4481b5 16291fi
98418dba 16292rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
16293echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16294echo "${ECHO_T}$ac_header_preproc" >&6
16295
16296# So? What about this header?
edfaf76d
LK
16297case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16298 yes:no: )
c0d27fcc
MR
16299 { echo "$as_me:$LINENO: WARNING: locale.h: accepted by the compiler, rejected by the preprocessor!" >&5
16300echo "$as_me: WARNING: locale.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
16301 { echo "$as_me:$LINENO: WARNING: locale.h: proceeding with the compiler's result" >&5
16302echo "$as_me: WARNING: locale.h: proceeding with the compiler's result" >&2;}
16303 ac_header_preproc=yes
19650fd6 16304 ;;
edfaf76d 16305 no:yes:* )
c0d27fcc
MR
16306 { echo "$as_me:$LINENO: WARNING: locale.h: present but cannot be compiled" >&5
16307echo "$as_me: WARNING: locale.h: present but cannot be compiled" >&2;}
edfaf76d
LK
16308 { echo "$as_me:$LINENO: WARNING: locale.h: check for missing prerequisite headers?" >&5
16309echo "$as_me: WARNING: locale.h: check for missing prerequisite headers?" >&2;}
16310 { echo "$as_me:$LINENO: WARNING: locale.h: see the Autoconf documentation" >&5
16311echo "$as_me: WARNING: locale.h: see the Autoconf documentation" >&2;}
16312 { echo "$as_me:$LINENO: WARNING: locale.h: section \"Present But Cannot Be Compiled\"" >&5
16313echo "$as_me: WARNING: locale.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16314 { echo "$as_me:$LINENO: WARNING: locale.h: proceeding with the preprocessor's result" >&5
19650fd6 16315echo "$as_me: WARNING: locale.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
16316 { echo "$as_me:$LINENO: WARNING: locale.h: in the future, the compiler will take precedence" >&5
16317echo "$as_me: WARNING: locale.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
16318 (
16319 cat <<\_ASBOX
edfaf76d
LK
16320## ------------------------------------------ ##
16321## Report this to the AC_PACKAGE_NAME lists. ##
16322## ------------------------------------------ ##
19650fd6
AS
16323_ASBOX
16324 ) |
16325 sed "s/^/$as_me: WARNING: /" >&2
16326 ;;
c0d27fcc
MR
16327esac
16328echo "$as_me:$LINENO: checking for locale.h" >&5
16329echo $ECHO_N "checking for locale.h... $ECHO_C" >&6
16330if test "${ac_cv_header_locale_h+set}" = set; then
16331 echo $ECHO_N "(cached) $ECHO_C" >&6
16332else
16333 ac_cv_header_locale_h=$ac_header_preproc
ba4481b5 16334fi
c0d27fcc 16335echo "$as_me:$LINENO: result: $ac_cv_header_locale_h" >&5
98418dba
CW
16336echo "${ECHO_T}$ac_cv_header_locale_h" >&6
16337
c0d27fcc
MR
16338fi
16339
16340
16341
98418dba 16342for ac_func in setlocale
ba4481b5 16343do
503d2be0 16344as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 16345echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
16346echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16347if eval "test \"\${$as_ac_var+set}\" = set"; then
16348 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16349else
503d2be0 16350 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16351/* confdefs.h. */
16352_ACEOF
16353cat confdefs.h >>conftest.$ac_ext
16354cat >>conftest.$ac_ext <<_ACEOF
16355/* end confdefs.h. */
edfaf76d
LK
16356/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16357 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16358#define $ac_func innocuous_$ac_func
16359
ba4481b5 16360/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
16361 which can conflict with char $ac_func (); below.
16362 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16363 <limits.h> exists even on freestanding compilers. */
edfaf76d 16364
19650fd6
AS
16365#ifdef __STDC__
16366# include <limits.h>
16367#else
16368# include <assert.h>
16369#endif
edfaf76d
LK
16370
16371#undef $ac_func
16372
ba4481b5 16373/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
16374#ifdef __cplusplus
16375extern "C"
19650fd6 16376{
503d2be0 16377#endif
ba4481b5 16378/* We use char because int might match the return type of a gcc2
503d2be0
AS
16379 builtin and then its argument prototype would still apply. */
16380char $ac_func ();
ba4481b5
DL
16381/* The GNU C library defines this for functions which it implements
16382 to always fail with ENOSYS. Some functions are actually named
16383 something starting with __ and the normal name is an alias. */
16384#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16385choke me
16386#else
19650fd6
AS
16387char (*f) () = $ac_func;
16388#endif
16389#ifdef __cplusplus
16390}
ba4481b5
DL
16391#endif
16392
19650fd6
AS
16393int
16394main ()
16395{
16396return f != $ac_func;
503d2be0
AS
16397 ;
16398 return 0;
16399}
16400_ACEOF
16401rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 16402if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 16403 (eval $ac_link) 2>conftest.er1
503d2be0 16404 ac_status=$?
edfaf76d
LK
16405 grep -v '^ *+' conftest.er1 >conftest.err
16406 rm -f conftest.er1
16407 cat conftest.err >&5
c0d27fcc 16408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16409 (exit $ac_status); } &&
e143ad11
AS
16410 { ac_try='test -z "$ac_c_werror_flag"
16411 || test ! -s conftest.err'
edfaf76d
LK
16412 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16413 (eval $ac_try) 2>&5
16414 ac_status=$?
16415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16416 (exit $ac_status); }; } &&
16417 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 16418 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
16419 (eval $ac_try) 2>&5
16420 ac_status=$?
c0d27fcc 16421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
16422 (exit $ac_status); }; }; then
16423 eval "$as_ac_var=yes"
16424else
16425 echo "$as_me: failed program was:" >&5
19650fd6
AS
16426sed 's/^/| /' conftest.$ac_ext >&5
16427
503d2be0
AS
16428eval "$as_ac_var=no"
16429fi
edfaf76d
LK
16430rm -f conftest.err conftest.$ac_objext \
16431 conftest$ac_exeext conftest.$ac_ext
503d2be0 16432fi
c0d27fcc 16433echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
16434echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16435if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 16436 cat >>confdefs.h <<_ACEOF
503d2be0 16437#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 16438_ACEOF
ba4481b5 16439
ba4481b5
DL
16440fi
16441done
16442
c0d27fcc 16443
98418dba
CW
16444# We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
16445# uses stabs), but it is still SVR4. We cannot check for <elf.h> because
16446# Irix 4.0.5F has the header but not the library.
16447if test $ac_have_func = no && test "$ac_cv_lib_elf_elf_begin" = yes; then
16448 ac_have_func=yes
16449
c0d27fcc 16450cat >>confdefs.h <<\_ACEOF
98418dba 16451#define SVR4 1
c0d27fcc 16452_ACEOF
98418dba
CW
16453
16454fi
16455
16456if test $ac_have_func = no; then
c0d27fcc
MR
16457 if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
16458 echo "$as_me:$LINENO: checking for inq_stats/cpustats.h" >&5
98418dba
CW
16459echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6
16460if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
503d2be0 16461 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
16462fi
16463echo "$as_me:$LINENO: result: $ac_cv_header_inq_stats_cpustats_h" >&5
16464echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6
98418dba 16465else
c0d27fcc
MR
16466 # Is the header compilable?
16467echo "$as_me:$LINENO: checking inq_stats/cpustats.h usability" >&5
16468echo $ECHO_N "checking inq_stats/cpustats.h usability... $ECHO_C" >&6
16469cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16470/* confdefs.h. */
16471_ACEOF
16472cat confdefs.h >>conftest.$ac_ext
16473cat >>conftest.$ac_ext <<_ACEOF
16474/* end confdefs.h. */
c0d27fcc
MR
16475$ac_includes_default
16476#include <inq_stats/cpustats.h>
16477_ACEOF
16478rm -f conftest.$ac_objext
16479if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 16480 (eval $ac_compile) 2>conftest.er1
c0d27fcc 16481 ac_status=$?
edfaf76d
LK
16482 grep -v '^ *+' conftest.er1 >conftest.err
16483 rm -f conftest.er1
16484 cat conftest.err >&5
c0d27fcc
MR
16485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16486 (exit $ac_status); } &&
e143ad11
AS
16487 { ac_try='test -z "$ac_c_werror_flag"
16488 || test ! -s conftest.err'
edfaf76d
LK
16489 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16490 (eval $ac_try) 2>&5
16491 ac_status=$?
16492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16493 (exit $ac_status); }; } &&
16494 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
16495 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16496 (eval $ac_try) 2>&5
16497 ac_status=$?
16498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16499 (exit $ac_status); }; }; then
16500 ac_header_compiler=yes
16501else
16502 echo "$as_me: failed program was:" >&5
19650fd6
AS
16503sed 's/^/| /' conftest.$ac_ext >&5
16504
c0d27fcc
MR
16505ac_header_compiler=no
16506fi
edfaf76d 16507rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
16508echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16509echo "${ECHO_T}$ac_header_compiler" >&6
16510
16511# Is the header present?
16512echo "$as_me:$LINENO: checking inq_stats/cpustats.h presence" >&5
16513echo $ECHO_N "checking inq_stats/cpustats.h presence... $ECHO_C" >&6
16514cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16515/* confdefs.h. */
16516_ACEOF
16517cat confdefs.h >>conftest.$ac_ext
16518cat >>conftest.$ac_ext <<_ACEOF
16519/* end confdefs.h. */
98418dba 16520#include <inq_stats/cpustats.h>
503d2be0 16521_ACEOF
c0d27fcc 16522if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
16523 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16524 ac_status=$?
6bae0ccf 16525 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
16526 rm -f conftest.er1
16527 cat conftest.err >&5
c0d27fcc 16528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
16529 (exit $ac_status); } >/dev/null; then
16530 if test -s conftest.err; then
16531 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 16532 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
16533 else
16534 ac_cpp_err=
16535 fi
16536else
16537 ac_cpp_err=yes
16538fi
16539if test -z "$ac_cpp_err"; then
c0d27fcc 16540 ac_header_preproc=yes
503d2be0
AS
16541else
16542 echo "$as_me: failed program was:" >&5
19650fd6
AS
16543sed 's/^/| /' conftest.$ac_ext >&5
16544
c0d27fcc 16545 ac_header_preproc=no
ba4481b5 16546fi
503d2be0 16547rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
16548echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16549echo "${ECHO_T}$ac_header_preproc" >&6
16550
16551# So? What about this header?
edfaf76d
LK
16552case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16553 yes:no: )
c0d27fcc
MR
16554 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&5
16555echo "$as_me: WARNING: inq_stats/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
16556 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: proceeding with the compiler's result" >&5
16557echo "$as_me: WARNING: inq_stats/cpustats.h: proceeding with the compiler's result" >&2;}
16558 ac_header_preproc=yes
19650fd6 16559 ;;
edfaf76d 16560 no:yes:* )
c0d27fcc
MR
16561 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: present but cannot be compiled" >&5
16562echo "$as_me: WARNING: inq_stats/cpustats.h: present but cannot be compiled" >&2;}
edfaf76d
LK
16563 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: check for missing prerequisite headers?" >&5
16564echo "$as_me: WARNING: inq_stats/cpustats.h: check for missing prerequisite headers?" >&2;}
16565 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: see the Autoconf documentation" >&5
16566echo "$as_me: WARNING: inq_stats/cpustats.h: see the Autoconf documentation" >&2;}
16567 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: section \"Present But Cannot Be Compiled\"" >&5
16568echo "$as_me: WARNING: inq_stats/cpustats.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16569 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&5
19650fd6 16570echo "$as_me: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
16571 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: in the future, the compiler will take precedence" >&5
16572echo "$as_me: WARNING: inq_stats/cpustats.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
16573 (
16574 cat <<\_ASBOX
edfaf76d
LK
16575## ------------------------------------------ ##
16576## Report this to the AC_PACKAGE_NAME lists. ##
16577## ------------------------------------------ ##
19650fd6
AS
16578_ASBOX
16579 ) |
16580 sed "s/^/$as_me: WARNING: /" >&2
16581 ;;
c0d27fcc
MR
16582esac
16583echo "$as_me:$LINENO: checking for inq_stats/cpustats.h" >&5
16584echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6
16585if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
16586 echo $ECHO_N "(cached) $ECHO_C" >&6
16587else
16588 ac_cv_header_inq_stats_cpustats_h=$ac_header_preproc
ba4481b5 16589fi
c0d27fcc 16590echo "$as_me:$LINENO: result: $ac_cv_header_inq_stats_cpustats_h" >&5
98418dba 16591echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6
c0d27fcc
MR
16592
16593fi
98418dba
CW
16594if test $ac_cv_header_inq_stats_cpustats_h = yes; then
16595 ac_have_func=yes
ba4481b5 16596
c0d27fcc 16597cat >>confdefs.h <<\_ACEOF
98418dba 16598#define UMAX 1
c0d27fcc 16599_ACEOF
98418dba 16600
c0d27fcc
MR
16601
16602cat >>confdefs.h <<\_ACEOF
98418dba 16603#define UMAX4_3 1
c0d27fcc 16604_ACEOF
98418dba
CW
16605
16606fi
16607
c0d27fcc 16608
98418dba
CW
16609fi
16610
16611if test $ac_have_func = no; then
c0d27fcc
MR
16612 if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
16613 echo "$as_me:$LINENO: checking for sys/cpustats.h" >&5
98418dba
CW
16614echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6
16615if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
503d2be0 16616 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
16617fi
16618echo "$as_me:$LINENO: result: $ac_cv_header_sys_cpustats_h" >&5
16619echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6
503d2be0 16620else
c0d27fcc
MR
16621 # Is the header compilable?
16622echo "$as_me:$LINENO: checking sys/cpustats.h usability" >&5
16623echo $ECHO_N "checking sys/cpustats.h usability... $ECHO_C" >&6
16624cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16625/* confdefs.h. */
16626_ACEOF
16627cat confdefs.h >>conftest.$ac_ext
16628cat >>conftest.$ac_ext <<_ACEOF
16629/* end confdefs.h. */
c0d27fcc
MR
16630$ac_includes_default
16631#include <sys/cpustats.h>
16632_ACEOF
16633rm -f conftest.$ac_objext
16634if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 16635 (eval $ac_compile) 2>conftest.er1
c0d27fcc 16636 ac_status=$?
edfaf76d
LK
16637 grep -v '^ *+' conftest.er1 >conftest.err
16638 rm -f conftest.er1
16639 cat conftest.err >&5
c0d27fcc
MR
16640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16641 (exit $ac_status); } &&
e143ad11
AS
16642 { ac_try='test -z "$ac_c_werror_flag"
16643 || test ! -s conftest.err'
edfaf76d
LK
16644 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16645 (eval $ac_try) 2>&5
16646 ac_status=$?
16647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16648 (exit $ac_status); }; } &&
16649 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
16650 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16651 (eval $ac_try) 2>&5
16652 ac_status=$?
16653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16654 (exit $ac_status); }; }; then
16655 ac_header_compiler=yes
16656else
16657 echo "$as_me: failed program was:" >&5
19650fd6
AS
16658sed 's/^/| /' conftest.$ac_ext >&5
16659
c0d27fcc
MR
16660ac_header_compiler=no
16661fi
edfaf76d 16662rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
16663echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16664echo "${ECHO_T}$ac_header_compiler" >&6
16665
16666# Is the header present?
16667echo "$as_me:$LINENO: checking sys/cpustats.h presence" >&5
16668echo $ECHO_N "checking sys/cpustats.h presence... $ECHO_C" >&6
16669cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16670/* confdefs.h. */
16671_ACEOF
16672cat confdefs.h >>conftest.$ac_ext
16673cat >>conftest.$ac_ext <<_ACEOF
16674/* end confdefs.h. */
98418dba
CW
16675#include <sys/cpustats.h>
16676_ACEOF
c0d27fcc 16677if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
16678 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16679 ac_status=$?
6bae0ccf 16680 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
16681 rm -f conftest.er1
16682 cat conftest.err >&5
c0d27fcc 16683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
16684 (exit $ac_status); } >/dev/null; then
16685 if test -s conftest.err; then
16686 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 16687 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
16688 else
16689 ac_cpp_err=
16690 fi
16691else
16692 ac_cpp_err=yes
503d2be0 16693fi
98418dba 16694if test -z "$ac_cpp_err"; then
c0d27fcc 16695 ac_header_preproc=yes
98418dba
CW
16696else
16697 echo "$as_me: failed program was:" >&5
19650fd6
AS
16698sed 's/^/| /' conftest.$ac_ext >&5
16699
c0d27fcc 16700 ac_header_preproc=no
98418dba
CW
16701fi
16702rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
16703echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16704echo "${ECHO_T}$ac_header_preproc" >&6
16705
16706# So? What about this header?
edfaf76d
LK
16707case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16708 yes:no: )
c0d27fcc
MR
16709 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&5
16710echo "$as_me: WARNING: sys/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
16711 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: proceeding with the compiler's result" >&5
16712echo "$as_me: WARNING: sys/cpustats.h: proceeding with the compiler's result" >&2;}
16713 ac_header_preproc=yes
19650fd6 16714 ;;
edfaf76d 16715 no:yes:* )
c0d27fcc
MR
16716 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: present but cannot be compiled" >&5
16717echo "$as_me: WARNING: sys/cpustats.h: present but cannot be compiled" >&2;}
edfaf76d
LK
16718 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: check for missing prerequisite headers?" >&5
16719echo "$as_me: WARNING: sys/cpustats.h: check for missing prerequisite headers?" >&2;}
16720 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: see the Autoconf documentation" >&5
16721echo "$as_me: WARNING: sys/cpustats.h: see the Autoconf documentation" >&2;}
16722 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: section \"Present But Cannot Be Compiled\"" >&5
16723echo "$as_me: WARNING: sys/cpustats.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16724 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&5
19650fd6 16725echo "$as_me: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
16726 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: in the future, the compiler will take precedence" >&5
16727echo "$as_me: WARNING: sys/cpustats.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
16728 (
16729 cat <<\_ASBOX
edfaf76d
LK
16730## ------------------------------------------ ##
16731## Report this to the AC_PACKAGE_NAME lists. ##
16732## ------------------------------------------ ##
19650fd6
AS
16733_ASBOX
16734 ) |
16735 sed "s/^/$as_me: WARNING: /" >&2
16736 ;;
c0d27fcc
MR
16737esac
16738echo "$as_me:$LINENO: checking for sys/cpustats.h" >&5
16739echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6
16740if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
16741 echo $ECHO_N "(cached) $ECHO_C" >&6
16742else
16743 ac_cv_header_sys_cpustats_h=$ac_header_preproc
98418dba 16744fi
c0d27fcc 16745echo "$as_me:$LINENO: result: $ac_cv_header_sys_cpustats_h" >&5
98418dba 16746echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6
c0d27fcc
MR
16747
16748fi
98418dba 16749if test $ac_cv_header_sys_cpustats_h = yes; then
c0d27fcc 16750 ac_have_func=yes; cat >>confdefs.h <<\_ACEOF
98418dba 16751#define UMAX 1
c0d27fcc 16752_ACEOF
ba4481b5 16753
98418dba
CW
16754fi
16755
c0d27fcc 16756
98418dba
CW
16757fi
16758
16759if test $ac_have_func = no; then
16760
16761for ac_header in mach/mach.h
2c9dccc9
PJ
16762do
16763as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
16764if eval "test \"\${$as_ac_Header+set}\" = set"; then
16765 echo "$as_me:$LINENO: checking for $ac_header" >&5
2c9dccc9
PJ
16766echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16767if eval "test \"\${$as_ac_Header+set}\" = set"; then
16768 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
16769fi
16770echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
16771echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 16772else
c0d27fcc
MR
16773 # Is the header compilable?
16774echo "$as_me:$LINENO: checking $ac_header usability" >&5
16775echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
16776cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16777/* confdefs.h. */
16778_ACEOF
16779cat confdefs.h >>conftest.$ac_ext
16780cat >>conftest.$ac_ext <<_ACEOF
16781/* end confdefs.h. */
c0d27fcc
MR
16782$ac_includes_default
16783#include <$ac_header>
16784_ACEOF
16785rm -f conftest.$ac_objext
16786if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 16787 (eval $ac_compile) 2>conftest.er1
c0d27fcc 16788 ac_status=$?
edfaf76d
LK
16789 grep -v '^ *+' conftest.er1 >conftest.err
16790 rm -f conftest.er1
16791 cat conftest.err >&5
c0d27fcc
MR
16792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16793 (exit $ac_status); } &&
e143ad11
AS
16794 { ac_try='test -z "$ac_c_werror_flag"
16795 || test ! -s conftest.err'
edfaf76d
LK
16796 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16797 (eval $ac_try) 2>&5
16798 ac_status=$?
16799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16800 (exit $ac_status); }; } &&
16801 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
16802 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16803 (eval $ac_try) 2>&5
16804 ac_status=$?
16805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16806 (exit $ac_status); }; }; then
16807 ac_header_compiler=yes
16808else
16809 echo "$as_me: failed program was:" >&5
19650fd6
AS
16810sed 's/^/| /' conftest.$ac_ext >&5
16811
c0d27fcc
MR
16812ac_header_compiler=no
16813fi
edfaf76d 16814rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
16815echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16816echo "${ECHO_T}$ac_header_compiler" >&6
16817
16818# Is the header present?
16819echo "$as_me:$LINENO: checking $ac_header presence" >&5
16820echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
16821cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16822/* confdefs.h. */
16823_ACEOF
16824cat confdefs.h >>conftest.$ac_ext
16825cat >>conftest.$ac_ext <<_ACEOF
16826/* end confdefs.h. */
2c9dccc9
PJ
16827#include <$ac_header>
16828_ACEOF
c0d27fcc 16829if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2c9dccc9
PJ
16830 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16831 ac_status=$?
6bae0ccf 16832 grep -v '^ *+' conftest.er1 >conftest.err
2c9dccc9
PJ
16833 rm -f conftest.er1
16834 cat conftest.err >&5
c0d27fcc 16835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2c9dccc9
PJ
16836 (exit $ac_status); } >/dev/null; then
16837 if test -s conftest.err; then
16838 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 16839 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2c9dccc9
PJ
16840 else
16841 ac_cpp_err=
16842 fi
16843else
16844 ac_cpp_err=yes
16845fi
16846if test -z "$ac_cpp_err"; then
c0d27fcc
MR
16847 ac_header_preproc=yes
16848else
16849 echo "$as_me: failed program was:" >&5
19650fd6
AS
16850sed 's/^/| /' conftest.$ac_ext >&5
16851
c0d27fcc
MR
16852 ac_header_preproc=no
16853fi
16854rm -f conftest.err conftest.$ac_ext
16855echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16856echo "${ECHO_T}$ac_header_preproc" >&6
16857
16858# So? What about this header?
edfaf76d
LK
16859case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16860 yes:no: )
c0d27fcc
MR
16861 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16862echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
16863 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
16864echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
16865 ac_header_preproc=yes
19650fd6 16866 ;;
edfaf76d 16867 no:yes:* )
c0d27fcc
MR
16868 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16869echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
16870 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
16871echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
16872 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
16873echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
16874 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
16875echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16876 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 16877echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
16878 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
16879echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
16880 (
16881 cat <<\_ASBOX
edfaf76d
LK
16882## ------------------------------------------ ##
16883## Report this to the AC_PACKAGE_NAME lists. ##
16884## ------------------------------------------ ##
19650fd6
AS
16885_ASBOX
16886 ) |
16887 sed "s/^/$as_me: WARNING: /" >&2
16888 ;;
c0d27fcc
MR
16889esac
16890echo "$as_me:$LINENO: checking for $ac_header" >&5
16891echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16892if eval "test \"\${$as_ac_Header+set}\" = set"; then
16893 echo $ECHO_N "(cached) $ECHO_C" >&6
16894else
edfaf76d 16895 eval "$as_ac_Header=\$ac_header_preproc"
c0d27fcc
MR
16896fi
16897echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
16898echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16899
16900fi
16901if test `eval echo '${'$as_ac_Header'}'` = yes; then
16902 cat >>confdefs.h <<_ACEOF
16903#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16904_ACEOF
16905
16906fi
16907
16908done
16909
16910fi
16911
16912
16913for ac_header in nlist.h
16914do
16915as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16916if eval "test \"\${$as_ac_Header+set}\" = set"; then
16917 echo "$as_me:$LINENO: checking for $ac_header" >&5
16918echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16919if eval "test \"\${$as_ac_Header+set}\" = set"; then
16920 echo $ECHO_N "(cached) $ECHO_C" >&6
16921fi
16922echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
16923echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16924else
16925 # Is the header compilable?
16926echo "$as_me:$LINENO: checking $ac_header usability" >&5
16927echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
16928cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16929/* confdefs.h. */
16930_ACEOF
16931cat confdefs.h >>conftest.$ac_ext
16932cat >>conftest.$ac_ext <<_ACEOF
16933/* end confdefs.h. */
c0d27fcc
MR
16934$ac_includes_default
16935#include <$ac_header>
16936_ACEOF
16937rm -f conftest.$ac_objext
16938if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 16939 (eval $ac_compile) 2>conftest.er1
c0d27fcc 16940 ac_status=$?
edfaf76d
LK
16941 grep -v '^ *+' conftest.er1 >conftest.err
16942 rm -f conftest.er1
16943 cat conftest.err >&5
c0d27fcc
MR
16944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16945 (exit $ac_status); } &&
e143ad11
AS
16946 { ac_try='test -z "$ac_c_werror_flag"
16947 || test ! -s conftest.err'
edfaf76d
LK
16948 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16949 (eval $ac_try) 2>&5
16950 ac_status=$?
16951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16952 (exit $ac_status); }; } &&
16953 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
16954 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16955 (eval $ac_try) 2>&5
16956 ac_status=$?
16957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16958 (exit $ac_status); }; }; then
16959 ac_header_compiler=yes
2c9dccc9
PJ
16960else
16961 echo "$as_me: failed program was:" >&5
19650fd6
AS
16962sed 's/^/| /' conftest.$ac_ext >&5
16963
c0d27fcc 16964ac_header_compiler=no
98418dba 16965fi
edfaf76d 16966rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
16967echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16968echo "${ECHO_T}$ac_header_compiler" >&6
98418dba 16969
c0d27fcc
MR
16970# Is the header present?
16971echo "$as_me:$LINENO: checking $ac_header presence" >&5
16972echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
16973cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16974/* confdefs.h. */
16975_ACEOF
16976cat confdefs.h >>conftest.$ac_ext
16977cat >>conftest.$ac_ext <<_ACEOF
16978/* end confdefs.h. */
503d2be0
AS
16979#include <$ac_header>
16980_ACEOF
c0d27fcc 16981if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
16982 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16983 ac_status=$?
6bae0ccf 16984 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
16985 rm -f conftest.er1
16986 cat conftest.err >&5
c0d27fcc 16987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
16988 (exit $ac_status); } >/dev/null; then
16989 if test -s conftest.err; then
16990 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 16991 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
16992 else
16993 ac_cpp_err=
16994 fi
16995else
16996 ac_cpp_err=yes
16997fi
16998if test -z "$ac_cpp_err"; then
c0d27fcc 16999 ac_header_preproc=yes
503d2be0
AS
17000else
17001 echo "$as_me: failed program was:" >&5
19650fd6
AS
17002sed 's/^/| /' conftest.$ac_ext >&5
17003
c0d27fcc 17004 ac_header_preproc=no
b5de8dc0 17005fi
503d2be0 17006rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
17007echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17008echo "${ECHO_T}$ac_header_preproc" >&6
17009
17010# So? What about this header?
edfaf76d
LK
17011case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17012 yes:no: )
c0d27fcc
MR
17013 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
17014echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
17015 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
17016echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
17017 ac_header_preproc=yes
19650fd6 17018 ;;
edfaf76d 17019 no:yes:* )
c0d27fcc
MR
17020 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
17021echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
17022 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
17023echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
17024 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
17025echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
17026 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
17027echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 17028 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 17029echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
17030 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
17031echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
17032 (
17033 cat <<\_ASBOX
edfaf76d
LK
17034## ------------------------------------------ ##
17035## Report this to the AC_PACKAGE_NAME lists. ##
17036## ------------------------------------------ ##
19650fd6
AS
17037_ASBOX
17038 ) |
17039 sed "s/^/$as_me: WARNING: /" >&2
17040 ;;
c0d27fcc
MR
17041esac
17042echo "$as_me:$LINENO: checking for $ac_header" >&5
17043echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17044if eval "test \"\${$as_ac_Header+set}\" = set"; then
17045 echo $ECHO_N "(cached) $ECHO_C" >&6
17046else
edfaf76d 17047 eval "$as_ac_Header=\$ac_header_preproc"
b5de8dc0 17048fi
c0d27fcc 17049echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 17050echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
17051
17052fi
98418dba 17053if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 17054 cat >>confdefs.h <<_ACEOF
98418dba 17055#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc
MR
17056_ACEOF
17057 echo "$as_me:$LINENO: checking for struct nlist.n_un.n_name" >&5
98418dba
CW
17058echo $ECHO_N "checking for struct nlist.n_un.n_name... $ECHO_C" >&6
17059if test "${ac_cv_member_struct_nlist_n_un_n_name+set}" = set; then
503d2be0 17060 echo $ECHO_N "(cached) $ECHO_C" >&6
b5de8dc0 17061else
503d2be0 17062 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17063/* confdefs.h. */
17064_ACEOF
17065cat confdefs.h >>conftest.$ac_ext
17066cat >>conftest.$ac_ext <<_ACEOF
17067/* end confdefs.h. */
98418dba 17068#include <nlist.h>
b5de8dc0 17069
503d2be0
AS
17070int
17071main ()
17072{
98418dba
CW
17073static struct nlist ac_aggr;
17074if (ac_aggr.n_un.n_name)
17075return 0;
503d2be0
AS
17076 ;
17077 return 0;
17078}
17079_ACEOF
98418dba 17080rm -f conftest.$ac_objext
c0d27fcc 17081if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 17082 (eval $ac_compile) 2>conftest.er1
503d2be0 17083 ac_status=$?
edfaf76d
LK
17084 grep -v '^ *+' conftest.er1 >conftest.err
17085 rm -f conftest.er1
17086 cat conftest.err >&5
c0d27fcc 17087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 17088 (exit $ac_status); } &&
e143ad11
AS
17089 { ac_try='test -z "$ac_c_werror_flag"
17090 || test ! -s conftest.err'
c0d27fcc 17091 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
17092 (eval $ac_try) 2>&5
17093 ac_status=$?
c0d27fcc 17094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
edfaf76d
LK
17095 (exit $ac_status); }; } &&
17096 { ac_try='test -s conftest.$ac_objext'
17097 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17098 (eval $ac_try) 2>&5
17099 ac_status=$?
17100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17101 (exit $ac_status); }; }; then
17102 ac_cv_member_struct_nlist_n_un_n_name=yes
503d2be0
AS
17103else
17104 echo "$as_me: failed program was:" >&5
19650fd6
AS
17105sed 's/^/| /' conftest.$ac_ext >&5
17106
6bae0ccf 17107cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17108/* confdefs.h. */
17109_ACEOF
17110cat confdefs.h >>conftest.$ac_ext
17111cat >>conftest.$ac_ext <<_ACEOF
17112/* end confdefs.h. */
6bae0ccf
DL
17113#include <nlist.h>
17114
17115int
17116main ()
17117{
17118static struct nlist ac_aggr;
17119if (sizeof ac_aggr.n_un.n_name)
17120return 0;
17121 ;
17122 return 0;
17123}
17124_ACEOF
17125rm -f conftest.$ac_objext
17126if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 17127 (eval $ac_compile) 2>conftest.er1
6bae0ccf 17128 ac_status=$?
edfaf76d
LK
17129 grep -v '^ *+' conftest.er1 >conftest.err
17130 rm -f conftest.er1
17131 cat conftest.err >&5
6bae0ccf
DL
17132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17133 (exit $ac_status); } &&
e143ad11
AS
17134 { ac_try='test -z "$ac_c_werror_flag"
17135 || test ! -s conftest.err'
edfaf76d
LK
17136 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17137 (eval $ac_try) 2>&5
17138 ac_status=$?
17139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17140 (exit $ac_status); }; } &&
17141 { ac_try='test -s conftest.$ac_objext'
6bae0ccf
DL
17142 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17143 (eval $ac_try) 2>&5
17144 ac_status=$?
17145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17146 (exit $ac_status); }; }; then
17147 ac_cv_member_struct_nlist_n_un_n_name=yes
17148else
17149 echo "$as_me: failed program was:" >&5
19650fd6
AS
17150sed 's/^/| /' conftest.$ac_ext >&5
17151
98418dba 17152ac_cv_member_struct_nlist_n_un_n_name=no
503d2be0 17153fi
edfaf76d 17154rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b5de8dc0 17155fi
edfaf76d 17156rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 17157fi
c0d27fcc 17158echo "$as_me:$LINENO: result: $ac_cv_member_struct_nlist_n_un_n_name" >&5
98418dba
CW
17159echo "${ECHO_T}$ac_cv_member_struct_nlist_n_un_n_name" >&6
17160if test $ac_cv_member_struct_nlist_n_un_n_name = yes; then
b5de8dc0 17161
c0d27fcc 17162cat >>confdefs.h <<_ACEOF
98418dba 17163#define HAVE_STRUCT_NLIST_N_UN_N_NAME 1
c0d27fcc 17164_ACEOF
b5de8dc0 17165
c0d27fcc
MR
17166
17167cat >>confdefs.h <<\_ACEOF
98418dba 17168#define NLIST_NAME_UNION 1
c0d27fcc 17169_ACEOF
b5de8dc0 17170
98418dba 17171fi
b5de8dc0 17172
c0d27fcc 17173
98418dba 17174fi
c0d27fcc 17175
98418dba 17176done
b5de8dc0 17177
98418dba
CW
17178fi
17179done
b5de8dc0 17180
c0d27fcc 17181
98418dba 17182# Some definitions of getloadavg require that the program be installed setgid.
c0d27fcc 17183echo "$as_me:$LINENO: checking whether getloadavg requires setgid" >&5
98418dba
CW
17184echo $ECHO_N "checking whether getloadavg requires setgid... $ECHO_C" >&6
17185if test "${ac_cv_func_getloadavg_setgid+set}" = set; then
17186 echo $ECHO_N "(cached) $ECHO_C" >&6
17187else
17188 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17189/* confdefs.h. */
17190_ACEOF
17191cat confdefs.h >>conftest.$ac_ext
17192cat >>conftest.$ac_ext <<_ACEOF
17193/* end confdefs.h. */
6bae0ccf 17194#include "$srcdir/$ac_config_libobj_dir/getloadavg.c"
98418dba
CW
17195#ifdef LDAV_PRIVILEGED
17196Yowza Am I SETGID yet
17197#endif
17198_ACEOF
17199if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 17200 $EGREP "Yowza Am I SETGID yet" >/dev/null 2>&1; then
98418dba
CW
17201 ac_cv_func_getloadavg_setgid=yes
17202else
17203 ac_cv_func_getloadavg_setgid=no
17204fi
17205rm -f conftest*
b5de8dc0 17206
98418dba 17207fi
c0d27fcc 17208echo "$as_me:$LINENO: result: $ac_cv_func_getloadavg_setgid" >&5
98418dba
CW
17209echo "${ECHO_T}$ac_cv_func_getloadavg_setgid" >&6
17210if test $ac_cv_func_getloadavg_setgid = yes; then
17211 NEED_SETGID=true
b5de8dc0 17212
c0d27fcc 17213cat >>confdefs.h <<\_ACEOF
98418dba 17214#define GETLOADAVG_PRIVILEGED 1
c0d27fcc 17215_ACEOF
98418dba 17216
b5de8dc0 17217else
98418dba 17218 NEED_SETGID=false
b5de8dc0 17219fi
98418dba
CW
17220
17221if test $ac_cv_func_getloadavg_setgid = yes; then
c0d27fcc 17222 echo "$as_me:$LINENO: checking group of /dev/kmem" >&5
98418dba
CW
17223echo $ECHO_N "checking group of /dev/kmem... $ECHO_C" >&6
17224if test "${ac_cv_group_kmem+set}" = set; then
17225 echo $ECHO_N "(cached) $ECHO_C" >&6
17226else
17227 # On Solaris, /dev/kmem is a symlink. Get info on the real file.
17228 ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null`
17229 # If we got an error (system does not support symlinks), try without -L.
17230 test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem`
17231 ac_cv_group_kmem=`echo $ac_ls_output \
edfaf76d 17232 | sed -ne 's/[ ][ ]*/ /g;
98418dba
CW
17233 s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/;
17234 / /s/.* //;p;'`
17235
b5de8dc0 17236fi
c0d27fcc 17237echo "$as_me:$LINENO: result: $ac_cv_group_kmem" >&5
98418dba
CW
17238echo "${ECHO_T}$ac_cv_group_kmem" >&6
17239 KMEM_GROUP=$ac_cv_group_kmem
b5de8dc0 17240fi
98418dba
CW
17241if test "x$ac_save_LIBS" = x; then
17242 GETLOADAVG_LIBS=$LIBS
17243else
17244 GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$ac_save_LIBS!!"`
b5de8dc0 17245fi
98418dba 17246LIBS=$ac_save_LIBS
b5de8dc0 17247
c0d27fcc
MR
17248
17249
17250echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5
b936fae4
AS
17251echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
17252if test "${ac_cv_sys_largefile_source+set}" = set; then
503d2be0 17253 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 17254else
b936fae4
AS
17255 while :; do
17256 ac_cv_sys_largefile_source=no
503d2be0 17257 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17258/* confdefs.h. */
17259_ACEOF
17260cat confdefs.h >>conftest.$ac_ext
17261cat >>conftest.$ac_ext <<_ACEOF
17262/* end confdefs.h. */
b936fae4 17263#include <stdio.h>
503d2be0
AS
17264int
17265main ()
17266{
b936fae4
AS
17267return !fseeko;
17268 ;
17269 return 0;
17270}
17271_ACEOF
17272rm -f conftest.$ac_objext
c0d27fcc 17273if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 17274 (eval $ac_compile) 2>conftest.er1
b936fae4 17275 ac_status=$?
edfaf76d
LK
17276 grep -v '^ *+' conftest.er1 >conftest.err
17277 rm -f conftest.er1
17278 cat conftest.err >&5
c0d27fcc 17279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b936fae4 17280 (exit $ac_status); } &&
e143ad11
AS
17281 { ac_try='test -z "$ac_c_werror_flag"
17282 || test ! -s conftest.err'
edfaf76d
LK
17283 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17284 (eval $ac_try) 2>&5
17285 ac_status=$?
17286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17287 (exit $ac_status); }; } &&
17288 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 17289 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
b936fae4
AS
17290 (eval $ac_try) 2>&5
17291 ac_status=$?
c0d27fcc 17292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b936fae4
AS
17293 (exit $ac_status); }; }; then
17294 break
17295else
17296 echo "$as_me: failed program was:" >&5
19650fd6
AS
17297sed 's/^/| /' conftest.$ac_ext >&5
17298
b936fae4 17299fi
edfaf76d 17300rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b936fae4 17301 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17302/* confdefs.h. */
17303_ACEOF
17304cat confdefs.h >>conftest.$ac_ext
17305cat >>conftest.$ac_ext <<_ACEOF
17306/* end confdefs.h. */
b936fae4
AS
17307#define _LARGEFILE_SOURCE 1
17308#include <stdio.h>
b936fae4
AS
17309int
17310main ()
17311{
17312return !fseeko;
17313 ;
17314 return 0;
17315}
17316_ACEOF
17317rm -f conftest.$ac_objext
c0d27fcc 17318if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 17319 (eval $ac_compile) 2>conftest.er1
b936fae4 17320 ac_status=$?
edfaf76d
LK
17321 grep -v '^ *+' conftest.er1 >conftest.err
17322 rm -f conftest.er1
17323 cat conftest.err >&5
c0d27fcc 17324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b936fae4 17325 (exit $ac_status); } &&
e143ad11
AS
17326 { ac_try='test -z "$ac_c_werror_flag"
17327 || test ! -s conftest.err'
edfaf76d
LK
17328 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17329 (eval $ac_try) 2>&5
17330 ac_status=$?
17331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17332 (exit $ac_status); }; } &&
17333 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 17334 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
b936fae4
AS
17335 (eval $ac_try) 2>&5
17336 ac_status=$?
c0d27fcc 17337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b936fae4
AS
17338 (exit $ac_status); }; }; then
17339 ac_cv_sys_largefile_source=1; break
17340else
17341 echo "$as_me: failed program was:" >&5
19650fd6
AS
17342sed 's/^/| /' conftest.$ac_ext >&5
17343
b936fae4 17344fi
edfaf76d 17345rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b936fae4
AS
17346 break
17347done
17348fi
c0d27fcc 17349echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5
b936fae4
AS
17350echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
17351if test "$ac_cv_sys_largefile_source" != no; then
17352
c0d27fcc 17353cat >>confdefs.h <<_ACEOF
b936fae4 17354#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
c0d27fcc 17355_ACEOF
b936fae4
AS
17356
17357fi
17358rm -f conftest*
4c343001 17359
b936fae4
AS
17360# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
17361# in glibc 2.1.3, but that breaks too many other things.
17362# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
c0d27fcc 17363echo "$as_me:$LINENO: checking for fseeko" >&5
b936fae4
AS
17364echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
17365if test "${ac_cv_func_fseeko+set}" = set; then
17366 echo $ECHO_N "(cached) $ECHO_C" >&6
17367else
17368 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17369/* confdefs.h. */
17370_ACEOF
17371cat confdefs.h >>conftest.$ac_ext
17372cat >>conftest.$ac_ext <<_ACEOF
17373/* end confdefs.h. */
b936fae4 17374#include <stdio.h>
b936fae4
AS
17375int
17376main ()
17377{
17378return fseeko && fseeko (stdin, 0, 0);
503d2be0
AS
17379 ;
17380 return 0;
17381}
17382_ACEOF
17383rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17384if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 17385 (eval $ac_link) 2>conftest.er1
503d2be0 17386 ac_status=$?
edfaf76d
LK
17387 grep -v '^ *+' conftest.er1 >conftest.err
17388 rm -f conftest.er1
17389 cat conftest.err >&5
c0d27fcc 17390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 17391 (exit $ac_status); } &&
e143ad11
AS
17392 { ac_try='test -z "$ac_c_werror_flag"
17393 || test ! -s conftest.err'
edfaf76d
LK
17394 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17395 (eval $ac_try) 2>&5
17396 ac_status=$?
17397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17398 (exit $ac_status); }; } &&
17399 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17400 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
17401 (eval $ac_try) 2>&5
17402 ac_status=$?
c0d27fcc 17403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 17404 (exit $ac_status); }; }; then
b936fae4 17405 ac_cv_func_fseeko=yes
503d2be0
AS
17406else
17407 echo "$as_me: failed program was:" >&5
19650fd6
AS
17408sed 's/^/| /' conftest.$ac_ext >&5
17409
b936fae4 17410ac_cv_func_fseeko=no
503d2be0 17411fi
edfaf76d
LK
17412rm -f conftest.err conftest.$ac_objext \
17413 conftest$ac_exeext conftest.$ac_ext
503d2be0 17414fi
c0d27fcc 17415echo "$as_me:$LINENO: result: $ac_cv_func_fseeko" >&5
b936fae4
AS
17416echo "${ECHO_T}$ac_cv_func_fseeko" >&6
17417if test $ac_cv_func_fseeko = yes; then
17418
c0d27fcc 17419cat >>confdefs.h <<\_ACEOF
b936fae4 17420#define HAVE_FSEEKO 1
c0d27fcc 17421_ACEOF
b936fae4 17422
4c343001
DL
17423fi
17424
c0d27fcc 17425
52dbaac8
PE
17426# Configure getopt.
17427# getopt.m4 serial 10
17428
17429# The getopt module assume you want GNU getopt, with getopt_long etc,
17430# rather than vanilla POSIX getopt. This means your your code should
17431# always include <getopt.h> for the getopt prototypes.
17432
17433
17434
17435
17436
17437
17438
17439
17440
17441
17442
17443# Prerequisites of lib/getopt*.
17444
17445
17446
10a3b1a1 17447
52dbaac8
PE
17448 GETOPT_H=
17449
17450for ac_header in getopt.h
17451do
17452as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17453if eval "test \"\${$as_ac_Header+set}\" = set"; then
17454 echo "$as_me:$LINENO: checking for $ac_header" >&5
17455echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17456if eval "test \"\${$as_ac_Header+set}\" = set"; then
17457 echo $ECHO_N "(cached) $ECHO_C" >&6
17458fi
17459echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
17460echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17461else
17462 # Is the header compilable?
17463echo "$as_me:$LINENO: checking $ac_header usability" >&5
17464echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
17465cat >conftest.$ac_ext <<_ACEOF
17466/* confdefs.h. */
17467_ACEOF
17468cat confdefs.h >>conftest.$ac_ext
17469cat >>conftest.$ac_ext <<_ACEOF
17470/* end confdefs.h. */
17471$ac_includes_default
17472#include <$ac_header>
17473_ACEOF
17474rm -f conftest.$ac_objext
17475if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17476 (eval $ac_compile) 2>conftest.er1
17477 ac_status=$?
17478 grep -v '^ *+' conftest.er1 >conftest.err
17479 rm -f conftest.er1
17480 cat conftest.err >&5
17481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17482 (exit $ac_status); } &&
e143ad11
AS
17483 { ac_try='test -z "$ac_c_werror_flag"
17484 || test ! -s conftest.err'
52dbaac8
PE
17485 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17486 (eval $ac_try) 2>&5
17487 ac_status=$?
17488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17489 (exit $ac_status); }; } &&
17490 { ac_try='test -s conftest.$ac_objext'
17491 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17492 (eval $ac_try) 2>&5
17493 ac_status=$?
17494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17495 (exit $ac_status); }; }; then
17496 ac_header_compiler=yes
17497else
17498 echo "$as_me: failed program was:" >&5
17499sed 's/^/| /' conftest.$ac_ext >&5
17500
17501ac_header_compiler=no
17502fi
17503rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17504echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17505echo "${ECHO_T}$ac_header_compiler" >&6
17506
17507# Is the header present?
17508echo "$as_me:$LINENO: checking $ac_header presence" >&5
17509echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
17510cat >conftest.$ac_ext <<_ACEOF
17511/* confdefs.h. */
17512_ACEOF
17513cat confdefs.h >>conftest.$ac_ext
17514cat >>conftest.$ac_ext <<_ACEOF
17515/* end confdefs.h. */
17516#include <$ac_header>
17517_ACEOF
17518if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17519 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17520 ac_status=$?
17521 grep -v '^ *+' conftest.er1 >conftest.err
17522 rm -f conftest.er1
17523 cat conftest.err >&5
17524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17525 (exit $ac_status); } >/dev/null; then
17526 if test -s conftest.err; then
17527 ac_cpp_err=$ac_c_preproc_warn_flag
17528 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
17529 else
17530 ac_cpp_err=
17531 fi
17532else
17533 ac_cpp_err=yes
17534fi
17535if test -z "$ac_cpp_err"; then
17536 ac_header_preproc=yes
17537else
17538 echo "$as_me: failed program was:" >&5
17539sed 's/^/| /' conftest.$ac_ext >&5
17540
17541 ac_header_preproc=no
17542fi
17543rm -f conftest.err conftest.$ac_ext
17544echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17545echo "${ECHO_T}$ac_header_preproc" >&6
17546
17547# So? What about this header?
17548case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17549 yes:no: )
17550 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
17551echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
17552 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
17553echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
17554 ac_header_preproc=yes
17555 ;;
17556 no:yes:* )
17557 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
17558echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
17559 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
17560echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
17561 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
17562echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
17563 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
17564echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
17565 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
17566echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
17567 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
17568echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
17569 (
17570 cat <<\_ASBOX
17571## ------------------------------------------ ##
17572## Report this to the AC_PACKAGE_NAME lists. ##
17573## ------------------------------------------ ##
17574_ASBOX
17575 ) |
17576 sed "s/^/$as_me: WARNING: /" >&2
17577 ;;
17578esac
17579echo "$as_me:$LINENO: checking for $ac_header" >&5
17580echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17581if eval "test \"\${$as_ac_Header+set}\" = set"; then
17582 echo $ECHO_N "(cached) $ECHO_C" >&6
17583else
17584 eval "$as_ac_Header=\$ac_header_preproc"
17585fi
17586echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
17587echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17588
17589fi
17590if test `eval echo '${'$as_ac_Header'}'` = yes; then
17591 cat >>confdefs.h <<_ACEOF
17592#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17593_ACEOF
17594
17595else
17596 GETOPT_H=getopt.h
17597fi
17598
17599done
17600
17601 if test -z "$GETOPT_H"; then
17602
17603for ac_func in getopt_long_only
17604do
17605as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17606echo "$as_me:$LINENO: checking for $ac_func" >&5
17607echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17608if eval "test \"\${$as_ac_var+set}\" = set"; then
17609 echo $ECHO_N "(cached) $ECHO_C" >&6
17610else
17611 cat >conftest.$ac_ext <<_ACEOF
17612/* confdefs.h. */
17613_ACEOF
17614cat confdefs.h >>conftest.$ac_ext
17615cat >>conftest.$ac_ext <<_ACEOF
17616/* end confdefs.h. */
17617/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17618 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17619#define $ac_func innocuous_$ac_func
17620
17621/* System header to define __stub macros and hopefully few prototypes,
17622 which can conflict with char $ac_func (); below.
17623 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17624 <limits.h> exists even on freestanding compilers. */
17625
17626#ifdef __STDC__
17627# include <limits.h>
17628#else
17629# include <assert.h>
17630#endif
17631
17632#undef $ac_func
17633
17634/* Override any gcc2 internal prototype to avoid an error. */
17635#ifdef __cplusplus
17636extern "C"
17637{
17638#endif
17639/* We use char because int might match the return type of a gcc2
17640 builtin and then its argument prototype would still apply. */
17641char $ac_func ();
17642/* The GNU C library defines this for functions which it implements
17643 to always fail with ENOSYS. Some functions are actually named
17644 something starting with __ and the normal name is an alias. */
17645#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17646choke me
17647#else
17648char (*f) () = $ac_func;
17649#endif
17650#ifdef __cplusplus
17651}
17652#endif
17653
17654int
17655main ()
17656{
17657return f != $ac_func;
17658 ;
17659 return 0;
17660}
17661_ACEOF
17662rm -f conftest.$ac_objext conftest$ac_exeext
17663if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17664 (eval $ac_link) 2>conftest.er1
17665 ac_status=$?
17666 grep -v '^ *+' conftest.er1 >conftest.err
17667 rm -f conftest.er1
17668 cat conftest.err >&5
17669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17670 (exit $ac_status); } &&
e143ad11
AS
17671 { ac_try='test -z "$ac_c_werror_flag"
17672 || test ! -s conftest.err'
52dbaac8
PE
17673 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17674 (eval $ac_try) 2>&5
17675 ac_status=$?
17676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17677 (exit $ac_status); }; } &&
17678 { ac_try='test -s conftest$ac_exeext'
17679 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17680 (eval $ac_try) 2>&5
17681 ac_status=$?
17682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17683 (exit $ac_status); }; }; then
17684 eval "$as_ac_var=yes"
17685else
17686 echo "$as_me: failed program was:" >&5
17687sed 's/^/| /' conftest.$ac_ext >&5
17688
17689eval "$as_ac_var=no"
17690fi
17691rm -f conftest.err conftest.$ac_objext \
17692 conftest$ac_exeext conftest.$ac_ext
17693fi
17694echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
17695echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17696if test `eval echo '${'$as_ac_var'}'` = yes; then
17697 cat >>confdefs.h <<_ACEOF
17698#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17699_ACEOF
17700
17701else
17702 GETOPT_H=getopt.h
17703fi
17704done
17705
17706 fi
17707
17708 if test -z "$GETOPT_H"; then
17709 echo "$as_me:$LINENO: checking whether optreset is declared" >&5
17710echo $ECHO_N "checking whether optreset is declared... $ECHO_C" >&6
17711if test "${ac_cv_have_decl_optreset+set}" = set; then
17712 echo $ECHO_N "(cached) $ECHO_C" >&6
17713else
17714 cat >conftest.$ac_ext <<_ACEOF
17715/* confdefs.h. */
17716_ACEOF
17717cat confdefs.h >>conftest.$ac_ext
17718cat >>conftest.$ac_ext <<_ACEOF
17719/* end confdefs.h. */
17720#include <getopt.h>
17721
17722int
17723main ()
17724{
17725#ifndef optreset
17726 char *p = (char *) optreset;
17727#endif
17728
17729 ;
17730 return 0;
17731}
17732_ACEOF
17733rm -f conftest.$ac_objext
17734if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17735 (eval $ac_compile) 2>conftest.er1
17736 ac_status=$?
17737 grep -v '^ *+' conftest.er1 >conftest.err
17738 rm -f conftest.er1
17739 cat conftest.err >&5
17740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17741 (exit $ac_status); } &&
e143ad11
AS
17742 { ac_try='test -z "$ac_c_werror_flag"
17743 || test ! -s conftest.err'
52dbaac8
PE
17744 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17745 (eval $ac_try) 2>&5
17746 ac_status=$?
17747 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17748 (exit $ac_status); }; } &&
17749 { ac_try='test -s conftest.$ac_objext'
17750 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17751 (eval $ac_try) 2>&5
17752 ac_status=$?
17753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17754 (exit $ac_status); }; }; then
17755 ac_cv_have_decl_optreset=yes
17756else
17757 echo "$as_me: failed program was:" >&5
17758sed 's/^/| /' conftest.$ac_ext >&5
17759
17760ac_cv_have_decl_optreset=no
17761fi
17762rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17763fi
17764echo "$as_me:$LINENO: result: $ac_cv_have_decl_optreset" >&5
17765echo "${ECHO_T}$ac_cv_have_decl_optreset" >&6
17766if test $ac_cv_have_decl_optreset = yes; then
17767 GETOPT_H=getopt.h
17768fi
17769
17770 fi
17771
17772 if test -z "$GETOPT_H"; then
17773 echo "$as_me:$LINENO: checking for working GNU getopt function" >&5
17774echo $ECHO_N "checking for working GNU getopt function... $ECHO_C" >&6
17775if test "${gl_cv_func_gnu_getopt+set}" = set; then
17776 echo $ECHO_N "(cached) $ECHO_C" >&6
17777else
17778 if test "$cross_compiling" = yes; then
17779 echo "$as_me:$LINENO: checking whether getopt_clip is declared" >&5
17780echo $ECHO_N "checking whether getopt_clip is declared... $ECHO_C" >&6
17781if test "${ac_cv_have_decl_getopt_clip+set}" = set; then
17782 echo $ECHO_N "(cached) $ECHO_C" >&6
17783else
17784 cat >conftest.$ac_ext <<_ACEOF
17785/* confdefs.h. */
17786_ACEOF
17787cat confdefs.h >>conftest.$ac_ext
17788cat >>conftest.$ac_ext <<_ACEOF
17789/* end confdefs.h. */
17790#include <getopt.h>
17791
17792int
17793main ()
17794{
17795#ifndef getopt_clip
17796 char *p = (char *) getopt_clip;
17797#endif
17798
17799 ;
17800 return 0;
17801}
17802_ACEOF
17803rm -f conftest.$ac_objext
17804if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17805 (eval $ac_compile) 2>conftest.er1
17806 ac_status=$?
17807 grep -v '^ *+' conftest.er1 >conftest.err
17808 rm -f conftest.er1
17809 cat conftest.err >&5
17810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17811 (exit $ac_status); } &&
e143ad11
AS
17812 { ac_try='test -z "$ac_c_werror_flag"
17813 || test ! -s conftest.err'
52dbaac8
PE
17814 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17815 (eval $ac_try) 2>&5
17816 ac_status=$?
17817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17818 (exit $ac_status); }; } &&
17819 { ac_try='test -s conftest.$ac_objext'
17820 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17821 (eval $ac_try) 2>&5
17822 ac_status=$?
17823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17824 (exit $ac_status); }; }; then
17825 ac_cv_have_decl_getopt_clip=yes
17826else
17827 echo "$as_me: failed program was:" >&5
17828sed 's/^/| /' conftest.$ac_ext >&5
17829
17830ac_cv_have_decl_getopt_clip=no
17831fi
17832rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17833fi
17834echo "$as_me:$LINENO: result: $ac_cv_have_decl_getopt_clip" >&5
17835echo "${ECHO_T}$ac_cv_have_decl_getopt_clip" >&6
17836if test $ac_cv_have_decl_getopt_clip = yes; then
17837 gl_cv_func_gnu_getopt=no
17838else
17839 gl_cv_func_gnu_getopt=yes
17840fi
17841
17842else
17843 cat >conftest.$ac_ext <<_ACEOF
17844/* confdefs.h. */
17845_ACEOF
17846cat confdefs.h >>conftest.$ac_ext
17847cat >>conftest.$ac_ext <<_ACEOF
17848/* end confdefs.h. */
17849#include <getopt.h>
17850int
17851main ()
17852{
17853
17854 char *myargv[3];
17855 myargv[0] = "conftest";
17856 myargv[1] = "-+";
17857 myargv[2] = 0;
17858 return getopt (2, myargv, "+a") != '?';
17859
17860 ;
17861 return 0;
17862}
17863_ACEOF
17864rm -f conftest$ac_exeext
17865if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17866 (eval $ac_link) 2>&5
17867 ac_status=$?
17868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17869 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17870 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17871 (eval $ac_try) 2>&5
17872 ac_status=$?
17873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17874 (exit $ac_status); }; }; then
17875 gl_cv_func_gnu_getopt=yes
17876else
17877 echo "$as_me: program exited with status $ac_status" >&5
17878echo "$as_me: failed program was:" >&5
17879sed 's/^/| /' conftest.$ac_ext >&5
17880
17881( exit $ac_status )
17882gl_cv_func_gnu_getopt=no
17883fi
17884rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17885fi
17886fi
17887echo "$as_me:$LINENO: result: $gl_cv_func_gnu_getopt" >&5
17888echo "${ECHO_T}$gl_cv_func_gnu_getopt" >&6
17889 if test "$gl_cv_func_gnu_getopt" = "no"; then
17890 GETOPT_H=getopt.h
17891 fi
17892 fi
17893
17894
17895
17896 if test -n "$GETOPT_H"; then
17897
17898
17899 GETOPT_H=getopt.h
17900
17901cat >>confdefs.h <<\_ACEOF
17902#define __GETOPT_PREFIX rpl_
17903_ACEOF
17904
17905
17906
17907 :
17908 GETOPTOBJS='getopt.o getopt1.o'
17909
17910fi
17911
17912
17913
17914
cd958eb3
MB
17915echo "$as_me:$LINENO: checking whether getpgrp requires zero arguments" >&5
17916echo $ECHO_N "checking whether getpgrp requires zero arguments... $ECHO_C" >&6
17917if test "${ac_cv_func_getpgrp_void+set}" = set; then
17918 echo $ECHO_N "(cached) $ECHO_C" >&6
17919else
17920 # Use it with a single arg.
17921cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17922/* confdefs.h. */
17923_ACEOF
17924cat confdefs.h >>conftest.$ac_ext
17925cat >>conftest.$ac_ext <<_ACEOF
17926/* end confdefs.h. */
cd958eb3
MB
17927$ac_includes_default
17928int
17929main ()
17930{
17931getpgrp (0);
17932 ;
17933 return 0;
17934}
17935_ACEOF
17936rm -f conftest.$ac_objext
17937if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 17938 (eval $ac_compile) 2>conftest.er1
cd958eb3 17939 ac_status=$?
edfaf76d
LK
17940 grep -v '^ *+' conftest.er1 >conftest.err
17941 rm -f conftest.er1
17942 cat conftest.err >&5
cd958eb3
MB
17943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17944 (exit $ac_status); } &&
e143ad11
AS
17945 { ac_try='test -z "$ac_c_werror_flag"
17946 || test ! -s conftest.err'
edfaf76d
LK
17947 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17948 (eval $ac_try) 2>&5
17949 ac_status=$?
17950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17951 (exit $ac_status); }; } &&
17952 { ac_try='test -s conftest.$ac_objext'
cd958eb3
MB
17953 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17954 (eval $ac_try) 2>&5
17955 ac_status=$?
17956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17957 (exit $ac_status); }; }; then
17958 ac_cv_func_getpgrp_void=no
17959else
17960 echo "$as_me: failed program was:" >&5
19650fd6
AS
17961sed 's/^/| /' conftest.$ac_ext >&5
17962
cd958eb3
MB
17963ac_cv_func_getpgrp_void=yes
17964fi
edfaf76d 17965rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
cd958eb3
MB
17966
17967fi
17968echo "$as_me:$LINENO: result: $ac_cv_func_getpgrp_void" >&5
17969echo "${ECHO_T}$ac_cv_func_getpgrp_void" >&6
17970if test $ac_cv_func_getpgrp_void = yes; then
17971
17972cat >>confdefs.h <<\_ACEOF
17973#define GETPGRP_VOID 1
17974_ACEOF
17975
17976fi
17977
17978
973a76b1
DL
17979
17980for ac_func in strftime
17981do
17982as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17983echo "$as_me:$LINENO: checking for $ac_func" >&5
17984echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17985if eval "test \"\${$as_ac_var+set}\" = set"; then
17986 echo $ECHO_N "(cached) $ECHO_C" >&6
17987else
17988 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17989/* confdefs.h. */
17990_ACEOF
17991cat confdefs.h >>conftest.$ac_ext
17992cat >>conftest.$ac_ext <<_ACEOF
17993/* end confdefs.h. */
edfaf76d
LK
17994/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17995 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17996#define $ac_func innocuous_$ac_func
17997
973a76b1 17998/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17999 which can conflict with char $ac_func (); below.
18000 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18001 <limits.h> exists even on freestanding compilers. */
edfaf76d 18002
19650fd6
AS
18003#ifdef __STDC__
18004# include <limits.h>
18005#else
18006# include <assert.h>
18007#endif
edfaf76d
LK
18008
18009#undef $ac_func
18010
973a76b1
DL
18011/* Override any gcc2 internal prototype to avoid an error. */
18012#ifdef __cplusplus
18013extern "C"
19650fd6 18014{
973a76b1
DL
18015#endif
18016/* We use char because int might match the return type of a gcc2
18017 builtin and then its argument prototype would still apply. */
18018char $ac_func ();
18019/* The GNU C library defines this for functions which it implements
18020 to always fail with ENOSYS. Some functions are actually named
18021 something starting with __ and the normal name is an alias. */
18022#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18023choke me
18024#else
19650fd6
AS
18025char (*f) () = $ac_func;
18026#endif
18027#ifdef __cplusplus
18028}
973a76b1
DL
18029#endif
18030
19650fd6
AS
18031int
18032main ()
18033{
18034return f != $ac_func;
973a76b1
DL
18035 ;
18036 return 0;
18037}
18038_ACEOF
18039rm -f conftest.$ac_objext conftest$ac_exeext
18040if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 18041 (eval $ac_link) 2>conftest.er1
973a76b1 18042 ac_status=$?
edfaf76d
LK
18043 grep -v '^ *+' conftest.er1 >conftest.err
18044 rm -f conftest.er1
18045 cat conftest.err >&5
973a76b1
DL
18046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18047 (exit $ac_status); } &&
e143ad11
AS
18048 { ac_try='test -z "$ac_c_werror_flag"
18049 || test ! -s conftest.err'
edfaf76d
LK
18050 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18051 (eval $ac_try) 2>&5
18052 ac_status=$?
18053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18054 (exit $ac_status); }; } &&
18055 { ac_try='test -s conftest$ac_exeext'
973a76b1
DL
18056 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18057 (eval $ac_try) 2>&5
18058 ac_status=$?
18059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18060 (exit $ac_status); }; }; then
18061 eval "$as_ac_var=yes"
18062else
18063 echo "$as_me: failed program was:" >&5
19650fd6
AS
18064sed 's/^/| /' conftest.$ac_ext >&5
18065
973a76b1
DL
18066eval "$as_ac_var=no"
18067fi
edfaf76d
LK
18068rm -f conftest.err conftest.$ac_objext \
18069 conftest$ac_exeext conftest.$ac_ext
973a76b1
DL
18070fi
18071echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
18072echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18073if test `eval echo '${'$as_ac_var'}'` = yes; then
18074 cat >>confdefs.h <<_ACEOF
18075#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18076_ACEOF
18077
18078else
18079 # strftime is in -lintl on SCO UNIX.
18080echo "$as_me:$LINENO: checking for strftime in -lintl" >&5
18081echo $ECHO_N "checking for strftime in -lintl... $ECHO_C" >&6
18082if test "${ac_cv_lib_intl_strftime+set}" = set; then
18083 echo $ECHO_N "(cached) $ECHO_C" >&6
18084else
18085 ac_check_lib_save_LIBS=$LIBS
18086LIBS="-lintl $LIBS"
18087cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18088/* confdefs.h. */
18089_ACEOF
18090cat confdefs.h >>conftest.$ac_ext
18091cat >>conftest.$ac_ext <<_ACEOF
18092/* end confdefs.h. */
973a76b1
DL
18093
18094/* Override any gcc2 internal prototype to avoid an error. */
18095#ifdef __cplusplus
18096extern "C"
18097#endif
18098/* We use char because int might match the return type of a gcc2
18099 builtin and then its argument prototype would still apply. */
18100char strftime ();
18101int
18102main ()
18103{
18104strftime ();
18105 ;
18106 return 0;
18107}
18108_ACEOF
18109rm -f conftest.$ac_objext conftest$ac_exeext
18110if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 18111 (eval $ac_link) 2>conftest.er1
973a76b1 18112 ac_status=$?
edfaf76d
LK
18113 grep -v '^ *+' conftest.er1 >conftest.err
18114 rm -f conftest.er1
18115 cat conftest.err >&5
973a76b1
DL
18116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18117 (exit $ac_status); } &&
e143ad11
AS
18118 { ac_try='test -z "$ac_c_werror_flag"
18119 || test ! -s conftest.err'
edfaf76d
LK
18120 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18121 (eval $ac_try) 2>&5
18122 ac_status=$?
18123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18124 (exit $ac_status); }; } &&
18125 { ac_try='test -s conftest$ac_exeext'
973a76b1
DL
18126 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18127 (eval $ac_try) 2>&5
18128 ac_status=$?
18129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18130 (exit $ac_status); }; }; then
18131 ac_cv_lib_intl_strftime=yes
18132else
18133 echo "$as_me: failed program was:" >&5
19650fd6
AS
18134sed 's/^/| /' conftest.$ac_ext >&5
18135
973a76b1
DL
18136ac_cv_lib_intl_strftime=no
18137fi
edfaf76d
LK
18138rm -f conftest.err conftest.$ac_objext \
18139 conftest$ac_exeext conftest.$ac_ext
973a76b1
DL
18140LIBS=$ac_check_lib_save_LIBS
18141fi
18142echo "$as_me:$LINENO: result: $ac_cv_lib_intl_strftime" >&5
18143echo "${ECHO_T}$ac_cv_lib_intl_strftime" >&6
18144if test $ac_cv_lib_intl_strftime = yes; then
18145 cat >>confdefs.h <<\_ACEOF
18146#define HAVE_STRFTIME 1
18147_ACEOF
18148
18149LIBS="-lintl $LIBS"
18150fi
18151
18152fi
18153done
18154
18155
b936fae4
AS
18156# UNIX98 PTYs.
18157
18158for ac_func in grantpt
503d2be0
AS
18159do
18160as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 18161echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
18162echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18163if eval "test \"\${$as_ac_var+set}\" = set"; then
18164 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 18165else
503d2be0 18166 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18167/* confdefs.h. */
18168_ACEOF
18169cat confdefs.h >>conftest.$ac_ext
18170cat >>conftest.$ac_ext <<_ACEOF
18171/* end confdefs.h. */
edfaf76d
LK
18172/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18173 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18174#define $ac_func innocuous_$ac_func
18175
503d2be0 18176/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
18177 which can conflict with char $ac_func (); below.
18178 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18179 <limits.h> exists even on freestanding compilers. */
edfaf76d 18180
19650fd6
AS
18181#ifdef __STDC__
18182# include <limits.h>
18183#else
18184# include <assert.h>
18185#endif
edfaf76d
LK
18186
18187#undef $ac_func
18188
4c343001 18189/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
18190#ifdef __cplusplus
18191extern "C"
19650fd6 18192{
503d2be0 18193#endif
4c343001 18194/* We use char because int might match the return type of a gcc2
503d2be0
AS
18195 builtin and then its argument prototype would still apply. */
18196char $ac_func ();
503d2be0
AS
18197/* The GNU C library defines this for functions which it implements
18198 to always fail with ENOSYS. Some functions are actually named
18199 something starting with __ and the normal name is an alias. */
18200#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18201choke me
18202#else
19650fd6
AS
18203char (*f) () = $ac_func;
18204#endif
18205#ifdef __cplusplus
18206}
503d2be0 18207#endif
4c343001 18208
19650fd6
AS
18209int
18210main ()
18211{
18212return f != $ac_func;
503d2be0
AS
18213 ;
18214 return 0;
18215}
18216_ACEOF
18217rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18218if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 18219 (eval $ac_link) 2>conftest.er1
503d2be0 18220 ac_status=$?
edfaf76d
LK
18221 grep -v '^ *+' conftest.er1 >conftest.err
18222 rm -f conftest.er1
18223 cat conftest.err >&5
c0d27fcc 18224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 18225 (exit $ac_status); } &&
e143ad11
AS
18226 { ac_try='test -z "$ac_c_werror_flag"
18227 || test ! -s conftest.err'
edfaf76d
LK
18228 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18229 (eval $ac_try) 2>&5
18230 ac_status=$?
18231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18232 (exit $ac_status); }; } &&
18233 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18234 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
18235 (eval $ac_try) 2>&5
18236 ac_status=$?
c0d27fcc 18237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18238 (exit $ac_status); }; }; then
18239 eval "$as_ac_var=yes"
18240else
18241 echo "$as_me: failed program was:" >&5
19650fd6
AS
18242sed 's/^/| /' conftest.$ac_ext >&5
18243
503d2be0
AS
18244eval "$as_ac_var=no"
18245fi
edfaf76d
LK
18246rm -f conftest.err conftest.$ac_objext \
18247 conftest$ac_exeext conftest.$ac_ext
503d2be0 18248fi
c0d27fcc 18249echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
18250echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18251if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 18252 cat >>confdefs.h <<_ACEOF
503d2be0 18253#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 18254_ACEOF
4c343001
DL
18255
18256fi
503d2be0
AS
18257done
18258
c0d27fcc 18259
b936fae4 18260# PTY-related GNU extensions.
4c343001 18261
b936fae4
AS
18262for ac_func in getpt
18263do
18264as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 18265echo "$as_me:$LINENO: checking for $ac_func" >&5
b936fae4
AS
18266echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18267if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 18268 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 18269else
b936fae4 18270 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18271/* confdefs.h. */
18272_ACEOF
18273cat confdefs.h >>conftest.$ac_ext
18274cat >>conftest.$ac_ext <<_ACEOF
18275/* end confdefs.h. */
edfaf76d
LK
18276/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18277 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18278#define $ac_func innocuous_$ac_func
18279
087121cc 18280/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
18281 which can conflict with char $ac_func (); below.
18282 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18283 <limits.h> exists even on freestanding compilers. */
edfaf76d 18284
19650fd6
AS
18285#ifdef __STDC__
18286# include <limits.h>
18287#else
18288# include <assert.h>
18289#endif
edfaf76d
LK
18290
18291#undef $ac_func
18292
087121cc 18293/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
18294#ifdef __cplusplus
18295extern "C"
19650fd6 18296{
503d2be0 18297#endif
087121cc 18298/* We use char because int might match the return type of a gcc2
503d2be0
AS
18299 builtin and then its argument prototype would still apply. */
18300char $ac_func ();
087121cc
GM
18301/* The GNU C library defines this for functions which it implements
18302 to always fail with ENOSYS. Some functions are actually named
18303 something starting with __ and the normal name is an alias. */
18304#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18305choke me
18306#else
19650fd6
AS
18307char (*f) () = $ac_func;
18308#endif
18309#ifdef __cplusplus
18310}
087121cc
GM
18311#endif
18312
19650fd6
AS
18313int
18314main ()
18315{
18316return f != $ac_func;
503d2be0
AS
18317 ;
18318 return 0;
18319}
18320_ACEOF
18321rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18322if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 18323 (eval $ac_link) 2>conftest.er1
503d2be0 18324 ac_status=$?
edfaf76d
LK
18325 grep -v '^ *+' conftest.er1 >conftest.err
18326 rm -f conftest.er1
18327 cat conftest.err >&5
c0d27fcc 18328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 18329 (exit $ac_status); } &&
e143ad11
AS
18330 { ac_try='test -z "$ac_c_werror_flag"
18331 || test ! -s conftest.err'
edfaf76d
LK
18332 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18333 (eval $ac_try) 2>&5
18334 ac_status=$?
18335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18336 (exit $ac_status); }; } &&
18337 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18338 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
18339 (eval $ac_try) 2>&5
18340 ac_status=$?
c0d27fcc 18341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18342 (exit $ac_status); }; }; then
18343 eval "$as_ac_var=yes"
18344else
18345 echo "$as_me: failed program was:" >&5
19650fd6
AS
18346sed 's/^/| /' conftest.$ac_ext >&5
18347
503d2be0
AS
18348eval "$as_ac_var=no"
18349fi
edfaf76d
LK
18350rm -f conftest.err conftest.$ac_objext \
18351 conftest$ac_exeext conftest.$ac_ext
503d2be0 18352fi
c0d27fcc 18353echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
18354echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18355if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 18356 cat >>confdefs.h <<_ACEOF
503d2be0 18357#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 18358_ACEOF
087121cc 18359
087121cc
GM
18360fi
18361done
18362
c0d27fcc 18363
ba4481b5
DL
18364# Check this now, so that we will NOT find the above functions in ncurses.
18365# That is because we have not set up to link ncurses in lib-src.
18366# It's better to believe a function is not available
18367# than to expect to find it in ncurses.
503d2be0 18368
c0d27fcc 18369echo "$as_me:$LINENO: checking for tparm in -lncurses" >&5
503d2be0
AS
18370echo $ECHO_N "checking for tparm in -lncurses... $ECHO_C" >&6
18371if test "${ac_cv_lib_ncurses_tparm+set}" = set; then
18372 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 18373else
503d2be0 18374 ac_check_lib_save_LIBS=$LIBS
ba4481b5 18375LIBS="-lncurses $LIBS"
503d2be0 18376cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18377/* confdefs.h. */
18378_ACEOF
18379cat confdefs.h >>conftest.$ac_ext
18380cat >>conftest.$ac_ext <<_ACEOF
18381/* end confdefs.h. */
503d2be0 18382
ba4481b5 18383/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
18384#ifdef __cplusplus
18385extern "C"
18386#endif
ba4481b5 18387/* We use char because int might match the return type of a gcc2
503d2be0
AS
18388 builtin and then its argument prototype would still apply. */
18389char tparm ();
18390int
18391main ()
18392{
18393tparm ();
18394 ;
18395 return 0;
18396}
18397_ACEOF
18398rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18399if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 18400 (eval $ac_link) 2>conftest.er1
503d2be0 18401 ac_status=$?
edfaf76d
LK
18402 grep -v '^ *+' conftest.er1 >conftest.err
18403 rm -f conftest.er1
18404 cat conftest.err >&5
c0d27fcc 18405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 18406 (exit $ac_status); } &&
e143ad11
AS
18407 { ac_try='test -z "$ac_c_werror_flag"
18408 || test ! -s conftest.err'
edfaf76d
LK
18409 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18410 (eval $ac_try) 2>&5
18411 ac_status=$?
18412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18413 (exit $ac_status); }; } &&
18414 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18415 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
18416 (eval $ac_try) 2>&5
18417 ac_status=$?
c0d27fcc 18418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18419 (exit $ac_status); }; }; then
18420 ac_cv_lib_ncurses_tparm=yes
18421else
18422 echo "$as_me: failed program was:" >&5
19650fd6
AS
18423sed 's/^/| /' conftest.$ac_ext >&5
18424
503d2be0
AS
18425ac_cv_lib_ncurses_tparm=no
18426fi
edfaf76d
LK
18427rm -f conftest.err conftest.$ac_objext \
18428 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
18429LIBS=$ac_check_lib_save_LIBS
18430fi
c0d27fcc 18431echo "$as_me:$LINENO: result: $ac_cv_lib_ncurses_tparm" >&5
503d2be0
AS
18432echo "${ECHO_T}$ac_cv_lib_ncurses_tparm" >&6
18433if test $ac_cv_lib_ncurses_tparm = yes; then
c0d27fcc 18434 cat >>confdefs.h <<_ACEOF
503d2be0 18435#define HAVE_LIBNCURSES 1
c0d27fcc 18436_ACEOF
ba4481b5
DL
18437
18438 LIBS="-lncurses $LIBS"
18439
ba4481b5
DL
18440fi
18441
c0d27fcc 18442
84e70f78
KR
18443# Do we need the Hesiod library to provide the support routines?
18444if test "$with_hesiod" = yes ; then
18445 # Don't set $LIBS here -- see comments above.
18446 resolv=no
c0d27fcc 18447 echo "$as_me:$LINENO: checking for res_send" >&5
84e70f78
KR
18448echo $ECHO_N "checking for res_send... $ECHO_C" >&6
18449if test "${ac_cv_func_res_send+set}" = set; then
18450 echo $ECHO_N "(cached) $ECHO_C" >&6
18451else
18452 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18453/* confdefs.h. */
18454_ACEOF
18455cat confdefs.h >>conftest.$ac_ext
18456cat >>conftest.$ac_ext <<_ACEOF
18457/* end confdefs.h. */
edfaf76d
LK
18458/* Define res_send to an innocuous variant, in case <limits.h> declares res_send.
18459 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18460#define res_send innocuous_res_send
18461
84e70f78 18462/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
18463 which can conflict with char res_send (); below.
18464 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18465 <limits.h> exists even on freestanding compilers. */
edfaf76d 18466
19650fd6
AS
18467#ifdef __STDC__
18468# include <limits.h>
18469#else
18470# include <assert.h>
18471#endif
edfaf76d
LK
18472
18473#undef res_send
18474
84e70f78
KR
18475/* Override any gcc2 internal prototype to avoid an error. */
18476#ifdef __cplusplus
18477extern "C"
19650fd6 18478{
84e70f78
KR
18479#endif
18480/* We use char because int might match the return type of a gcc2
18481 builtin and then its argument prototype would still apply. */
18482char res_send ();
84e70f78
KR
18483/* The GNU C library defines this for functions which it implements
18484 to always fail with ENOSYS. Some functions are actually named
18485 something starting with __ and the normal name is an alias. */
18486#if defined (__stub_res_send) || defined (__stub___res_send)
18487choke me
18488#else
19650fd6
AS
18489char (*f) () = res_send;
18490#endif
18491#ifdef __cplusplus
18492}
cd958eb3
MB
18493#endif
18494
19650fd6
AS
18495int
18496main ()
18497{
18498return f != res_send;
84e70f78
KR
18499 ;
18500 return 0;
18501}
18502_ACEOF
18503rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18504if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 18505 (eval $ac_link) 2>conftest.er1
84e70f78 18506 ac_status=$?
edfaf76d
LK
18507 grep -v '^ *+' conftest.er1 >conftest.err
18508 rm -f conftest.er1
18509 cat conftest.err >&5
c0d27fcc 18510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78 18511 (exit $ac_status); } &&
e143ad11
AS
18512 { ac_try='test -z "$ac_c_werror_flag"
18513 || test ! -s conftest.err'
edfaf76d
LK
18514 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18515 (eval $ac_try) 2>&5
18516 ac_status=$?
18517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18518 (exit $ac_status); }; } &&
18519 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18520 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
18521 (eval $ac_try) 2>&5
18522 ac_status=$?
c0d27fcc 18523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
18524 (exit $ac_status); }; }; then
18525 ac_cv_func_res_send=yes
18526else
18527 echo "$as_me: failed program was:" >&5
19650fd6
AS
18528sed 's/^/| /' conftest.$ac_ext >&5
18529
84e70f78
KR
18530ac_cv_func_res_send=no
18531fi
edfaf76d
LK
18532rm -f conftest.err conftest.$ac_objext \
18533 conftest$ac_exeext conftest.$ac_ext
84e70f78 18534fi
c0d27fcc 18535echo "$as_me:$LINENO: result: $ac_cv_func_res_send" >&5
84e70f78
KR
18536echo "${ECHO_T}$ac_cv_func_res_send" >&6
18537if test $ac_cv_func_res_send = yes; then
18538 :
18539else
c0d27fcc 18540 echo "$as_me:$LINENO: checking for __res_send" >&5
84e70f78
KR
18541echo $ECHO_N "checking for __res_send... $ECHO_C" >&6
18542if test "${ac_cv_func___res_send+set}" = set; then
18543 echo $ECHO_N "(cached) $ECHO_C" >&6
18544else
18545 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18546/* confdefs.h. */
18547_ACEOF
18548cat confdefs.h >>conftest.$ac_ext
18549cat >>conftest.$ac_ext <<_ACEOF
18550/* end confdefs.h. */
edfaf76d
LK
18551/* Define __res_send to an innocuous variant, in case <limits.h> declares __res_send.
18552 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18553#define __res_send innocuous___res_send
18554
84e70f78 18555/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
18556 which can conflict with char __res_send (); below.
18557 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18558 <limits.h> exists even on freestanding compilers. */
edfaf76d 18559
19650fd6
AS
18560#ifdef __STDC__
18561# include <limits.h>
18562#else
18563# include <assert.h>
18564#endif
edfaf76d
LK
18565
18566#undef __res_send
18567
84e70f78
KR
18568/* Override any gcc2 internal prototype to avoid an error. */
18569#ifdef __cplusplus
18570extern "C"
19650fd6 18571{
84e70f78
KR
18572#endif
18573/* We use char because int might match the return type of a gcc2
18574 builtin and then its argument prototype would still apply. */
18575char __res_send ();
84e70f78
KR
18576/* The GNU C library defines this for functions which it implements
18577 to always fail with ENOSYS. Some functions are actually named
18578 something starting with __ and the normal name is an alias. */
18579#if defined (__stub___res_send) || defined (__stub_____res_send)
18580choke me
18581#else
19650fd6
AS
18582char (*f) () = __res_send;
18583#endif
18584#ifdef __cplusplus
18585}
84e70f78
KR
18586#endif
18587
19650fd6
AS
18588int
18589main ()
18590{
18591return f != __res_send;
84e70f78
KR
18592 ;
18593 return 0;
18594}
18595_ACEOF
18596rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18597if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 18598 (eval $ac_link) 2>conftest.er1
84e70f78 18599 ac_status=$?
edfaf76d
LK
18600 grep -v '^ *+' conftest.er1 >conftest.err
18601 rm -f conftest.er1
18602 cat conftest.err >&5
c0d27fcc 18603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78 18604 (exit $ac_status); } &&
e143ad11
AS
18605 { ac_try='test -z "$ac_c_werror_flag"
18606 || test ! -s conftest.err'
edfaf76d
LK
18607 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18608 (eval $ac_try) 2>&5
18609 ac_status=$?
18610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18611 (exit $ac_status); }; } &&
18612 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18613 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
18614 (eval $ac_try) 2>&5
18615 ac_status=$?
c0d27fcc 18616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
18617 (exit $ac_status); }; }; then
18618 ac_cv_func___res_send=yes
18619else
18620 echo "$as_me: failed program was:" >&5
19650fd6
AS
18621sed 's/^/| /' conftest.$ac_ext >&5
18622
84e70f78
KR
18623ac_cv_func___res_send=no
18624fi
edfaf76d
LK
18625rm -f conftest.err conftest.$ac_objext \
18626 conftest$ac_exeext conftest.$ac_ext
84e70f78 18627fi
c0d27fcc 18628echo "$as_me:$LINENO: result: $ac_cv_func___res_send" >&5
84e70f78
KR
18629echo "${ECHO_T}$ac_cv_func___res_send" >&6
18630if test $ac_cv_func___res_send = yes; then
18631 :
18632else
c0d27fcc 18633 echo "$as_me:$LINENO: checking for res_send in -lresolv" >&5
84e70f78
KR
18634echo $ECHO_N "checking for res_send in -lresolv... $ECHO_C" >&6
18635if test "${ac_cv_lib_resolv_res_send+set}" = set; then
18636 echo $ECHO_N "(cached) $ECHO_C" >&6
18637else
18638 ac_check_lib_save_LIBS=$LIBS
18639LIBS="-lresolv $LIBS"
18640cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18641/* confdefs.h. */
18642_ACEOF
18643cat confdefs.h >>conftest.$ac_ext
18644cat >>conftest.$ac_ext <<_ACEOF
18645/* end confdefs.h. */
84e70f78
KR
18646
18647/* Override any gcc2 internal prototype to avoid an error. */
18648#ifdef __cplusplus
18649extern "C"
18650#endif
18651/* We use char because int might match the return type of a gcc2
18652 builtin and then its argument prototype would still apply. */
18653char res_send ();
18654int
18655main ()
18656{
18657res_send ();
18658 ;
18659 return 0;
18660}
18661_ACEOF
18662rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18663if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 18664 (eval $ac_link) 2>conftest.er1
84e70f78 18665 ac_status=$?
edfaf76d
LK
18666 grep -v '^ *+' conftest.er1 >conftest.err
18667 rm -f conftest.er1
18668 cat conftest.err >&5
c0d27fcc 18669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78 18670 (exit $ac_status); } &&
e143ad11
AS
18671 { ac_try='test -z "$ac_c_werror_flag"
18672 || test ! -s conftest.err'
edfaf76d
LK
18673 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18674 (eval $ac_try) 2>&5
18675 ac_status=$?
18676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18677 (exit $ac_status); }; } &&
18678 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18679 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
18680 (eval $ac_try) 2>&5
18681 ac_status=$?
c0d27fcc 18682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
18683 (exit $ac_status); }; }; then
18684 ac_cv_lib_resolv_res_send=yes
18685else
18686 echo "$as_me: failed program was:" >&5
19650fd6
AS
18687sed 's/^/| /' conftest.$ac_ext >&5
18688
84e70f78
KR
18689ac_cv_lib_resolv_res_send=no
18690fi
edfaf76d
LK
18691rm -f conftest.err conftest.$ac_objext \
18692 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
18693LIBS=$ac_check_lib_save_LIBS
18694fi
c0d27fcc 18695echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_send" >&5
84e70f78
KR
18696echo "${ECHO_T}$ac_cv_lib_resolv_res_send" >&6
18697if test $ac_cv_lib_resolv_res_send = yes; then
18698 resolv=yes
18699else
c0d27fcc 18700 echo "$as_me:$LINENO: checking for __res_send in -lresolv" >&5
84e70f78
KR
18701echo $ECHO_N "checking for __res_send in -lresolv... $ECHO_C" >&6
18702if test "${ac_cv_lib_resolv___res_send+set}" = set; then
18703 echo $ECHO_N "(cached) $ECHO_C" >&6
18704else
18705 ac_check_lib_save_LIBS=$LIBS
18706LIBS="-lresolv $LIBS"
18707cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18708/* confdefs.h. */
18709_ACEOF
18710cat confdefs.h >>conftest.$ac_ext
18711cat >>conftest.$ac_ext <<_ACEOF
18712/* end confdefs.h. */
84e70f78
KR
18713
18714/* Override any gcc2 internal prototype to avoid an error. */
18715#ifdef __cplusplus
18716extern "C"
18717#endif
18718/* We use char because int might match the return type of a gcc2
18719 builtin and then its argument prototype would still apply. */
18720char __res_send ();
18721int
18722main ()
18723{
18724__res_send ();
18725 ;
18726 return 0;
18727}
18728_ACEOF
18729rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18730if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 18731 (eval $ac_link) 2>conftest.er1
84e70f78 18732 ac_status=$?
edfaf76d
LK
18733 grep -v '^ *+' conftest.er1 >conftest.err
18734 rm -f conftest.er1
18735 cat conftest.err >&5
c0d27fcc 18736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78 18737 (exit $ac_status); } &&
e143ad11
AS
18738 { ac_try='test -z "$ac_c_werror_flag"
18739 || test ! -s conftest.err'
edfaf76d
LK
18740 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18741 (eval $ac_try) 2>&5
18742 ac_status=$?
18743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18744 (exit $ac_status); }; } &&
18745 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18746 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
18747 (eval $ac_try) 2>&5
18748 ac_status=$?
c0d27fcc 18749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
18750 (exit $ac_status); }; }; then
18751 ac_cv_lib_resolv___res_send=yes
18752else
18753 echo "$as_me: failed program was:" >&5
19650fd6
AS
18754sed 's/^/| /' conftest.$ac_ext >&5
18755
84e70f78
KR
18756ac_cv_lib_resolv___res_send=no
18757fi
edfaf76d
LK
18758rm -f conftest.err conftest.$ac_objext \
18759 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
18760LIBS=$ac_check_lib_save_LIBS
18761fi
c0d27fcc 18762echo "$as_me:$LINENO: result: $ac_cv_lib_resolv___res_send" >&5
84e70f78
KR
18763echo "${ECHO_T}$ac_cv_lib_resolv___res_send" >&6
18764if test $ac_cv_lib_resolv___res_send = yes; then
18765 resolv=yes
18766fi
18767
18768fi
18769
18770fi
18771
18772fi
18773
18774 if test "$resolv" = yes ; then
18775 RESOLVLIB=-lresolv
b936fae4 18776
c0d27fcc 18777cat >>confdefs.h <<\_ACEOF
84e70f78 18778#define HAVE_LIBRESOLV 1
c0d27fcc 18779_ACEOF
84e70f78
KR
18780
18781 else
18782 RESOLVLIB=
18783 fi
c0d27fcc 18784 echo "$as_me:$LINENO: checking for hes_getmailhost" >&5
84e70f78
KR
18785echo $ECHO_N "checking for hes_getmailhost... $ECHO_C" >&6
18786if test "${ac_cv_func_hes_getmailhost+set}" = set; then
18787 echo $ECHO_N "(cached) $ECHO_C" >&6
18788else
18789 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18790/* confdefs.h. */
18791_ACEOF
18792cat confdefs.h >>conftest.$ac_ext
18793cat >>conftest.$ac_ext <<_ACEOF
18794/* end confdefs.h. */
edfaf76d
LK
18795/* Define hes_getmailhost to an innocuous variant, in case <limits.h> declares hes_getmailhost.
18796 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18797#define hes_getmailhost innocuous_hes_getmailhost
18798
84e70f78 18799/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
18800 which can conflict with char hes_getmailhost (); below.
18801 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18802 <limits.h> exists even on freestanding compilers. */
edfaf76d 18803
19650fd6
AS
18804#ifdef __STDC__
18805# include <limits.h>
18806#else
18807# include <assert.h>
18808#endif
edfaf76d
LK
18809
18810#undef hes_getmailhost
18811
84e70f78
KR
18812/* Override any gcc2 internal prototype to avoid an error. */
18813#ifdef __cplusplus
18814extern "C"
19650fd6 18815{
84e70f78
KR
18816#endif
18817/* We use char because int might match the return type of a gcc2
18818 builtin and then its argument prototype would still apply. */
18819char hes_getmailhost ();
84e70f78
KR
18820/* The GNU C library defines this for functions which it implements
18821 to always fail with ENOSYS. Some functions are actually named
18822 something starting with __ and the normal name is an alias. */
18823#if defined (__stub_hes_getmailhost) || defined (__stub___hes_getmailhost)
18824choke me
18825#else
19650fd6
AS
18826char (*f) () = hes_getmailhost;
18827#endif
18828#ifdef __cplusplus
18829}
cd958eb3
MB
18830#endif
18831
19650fd6
AS
18832int
18833main ()
18834{
18835return f != hes_getmailhost;
84e70f78
KR
18836 ;
18837 return 0;
18838}
18839_ACEOF
18840rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18841if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 18842 (eval $ac_link) 2>conftest.er1
84e70f78 18843 ac_status=$?
edfaf76d
LK
18844 grep -v '^ *+' conftest.er1 >conftest.err
18845 rm -f conftest.er1
18846 cat conftest.err >&5
c0d27fcc 18847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78 18848 (exit $ac_status); } &&
e143ad11
AS
18849 { ac_try='test -z "$ac_c_werror_flag"
18850 || test ! -s conftest.err'
edfaf76d
LK
18851 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18852 (eval $ac_try) 2>&5
18853 ac_status=$?
18854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18855 (exit $ac_status); }; } &&
18856 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18857 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
18858 (eval $ac_try) 2>&5
18859 ac_status=$?
c0d27fcc 18860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
18861 (exit $ac_status); }; }; then
18862 ac_cv_func_hes_getmailhost=yes
18863else
18864 echo "$as_me: failed program was:" >&5
19650fd6
AS
18865sed 's/^/| /' conftest.$ac_ext >&5
18866
84e70f78
KR
18867ac_cv_func_hes_getmailhost=no
18868fi
edfaf76d
LK
18869rm -f conftest.err conftest.$ac_objext \
18870 conftest$ac_exeext conftest.$ac_ext
84e70f78 18871fi
c0d27fcc 18872echo "$as_me:$LINENO: result: $ac_cv_func_hes_getmailhost" >&5
84e70f78
KR
18873echo "${ECHO_T}$ac_cv_func_hes_getmailhost" >&6
18874if test $ac_cv_func_hes_getmailhost = yes; then
18875 :
18876else
c0d27fcc 18877 echo "$as_me:$LINENO: checking for hes_getmailhost in -lhesiod" >&5
84e70f78
KR
18878echo $ECHO_N "checking for hes_getmailhost in -lhesiod... $ECHO_C" >&6
18879if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then
18880 echo $ECHO_N "(cached) $ECHO_C" >&6
18881else
18882 ac_check_lib_save_LIBS=$LIBS
18883LIBS="-lhesiod $RESOLVLIB $LIBS"
18884cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18885/* confdefs.h. */
18886_ACEOF
18887cat confdefs.h >>conftest.$ac_ext
18888cat >>conftest.$ac_ext <<_ACEOF
18889/* end confdefs.h. */
84e70f78
KR
18890
18891/* Override any gcc2 internal prototype to avoid an error. */
18892#ifdef __cplusplus
18893extern "C"
18894#endif
18895/* We use char because int might match the return type of a gcc2
18896 builtin and then its argument prototype would still apply. */
18897char hes_getmailhost ();
18898int
18899main ()
18900{
18901hes_getmailhost ();
18902 ;
18903 return 0;
18904}
18905_ACEOF
18906rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18907if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 18908 (eval $ac_link) 2>conftest.er1
84e70f78 18909 ac_status=$?
edfaf76d
LK
18910 grep -v '^ *+' conftest.er1 >conftest.err
18911 rm -f conftest.er1
18912 cat conftest.err >&5
c0d27fcc 18913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78 18914 (exit $ac_status); } &&
e143ad11
AS
18915 { ac_try='test -z "$ac_c_werror_flag"
18916 || test ! -s conftest.err'
edfaf76d
LK
18917 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18918 (eval $ac_try) 2>&5
18919 ac_status=$?
18920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18921 (exit $ac_status); }; } &&
18922 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18923 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
18924 (eval $ac_try) 2>&5
18925 ac_status=$?
c0d27fcc 18926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
18927 (exit $ac_status); }; }; then
18928 ac_cv_lib_hesiod_hes_getmailhost=yes
18929else
18930 echo "$as_me: failed program was:" >&5
19650fd6
AS
18931sed 's/^/| /' conftest.$ac_ext >&5
18932
84e70f78
KR
18933ac_cv_lib_hesiod_hes_getmailhost=no
18934fi
edfaf76d
LK
18935rm -f conftest.err conftest.$ac_objext \
18936 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
18937LIBS=$ac_check_lib_save_LIBS
18938fi
c0d27fcc 18939echo "$as_me:$LINENO: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5
84e70f78
KR
18940echo "${ECHO_T}$ac_cv_lib_hesiod_hes_getmailhost" >&6
18941if test $ac_cv_lib_hesiod_hes_getmailhost = yes; then
b936fae4 18942
c0d27fcc 18943cat >>confdefs.h <<\_ACEOF
84e70f78 18944#define HAVE_LIBHESIOD 1
c0d27fcc 18945_ACEOF
84e70f78
KR
18946
18947else
18948 :
18949fi
18950
18951fi
18952
18953fi
18954
a21616bd
KR
18955# These tell us which Kerberos-related libraries to use.
18956if test "${with_kerberos+set}" = set; then
503d2be0 18957
c0d27fcc 18958echo "$as_me:$LINENO: checking for com_err in -lcom_err" >&5
503d2be0
AS
18959echo $ECHO_N "checking for com_err in -lcom_err... $ECHO_C" >&6
18960if test "${ac_cv_lib_com_err_com_err+set}" = set; then
18961 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 18962else
503d2be0 18963 ac_check_lib_save_LIBS=$LIBS
a21616bd 18964LIBS="-lcom_err $LIBS"
503d2be0 18965cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18966/* confdefs.h. */
18967_ACEOF
18968cat confdefs.h >>conftest.$ac_ext
18969cat >>conftest.$ac_ext <<_ACEOF
18970/* end confdefs.h. */
503d2be0 18971
a21616bd 18972/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
18973#ifdef __cplusplus
18974extern "C"
18975#endif
a21616bd 18976/* We use char because int might match the return type of a gcc2
503d2be0
AS
18977 builtin and then its argument prototype would still apply. */
18978char com_err ();
18979int
18980main ()
18981{
18982com_err ();
18983 ;
18984 return 0;
18985}
18986_ACEOF
18987rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18988if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 18989 (eval $ac_link) 2>conftest.er1
503d2be0 18990 ac_status=$?
edfaf76d
LK
18991 grep -v '^ *+' conftest.er1 >conftest.err
18992 rm -f conftest.er1
18993 cat conftest.err >&5
c0d27fcc 18994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 18995 (exit $ac_status); } &&
e143ad11
AS
18996 { ac_try='test -z "$ac_c_werror_flag"
18997 || test ! -s conftest.err'
edfaf76d
LK
18998 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18999 (eval $ac_try) 2>&5
19000 ac_status=$?
19001 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19002 (exit $ac_status); }; } &&
19003 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 19004 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
19005 (eval $ac_try) 2>&5
19006 ac_status=$?
c0d27fcc 19007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19008 (exit $ac_status); }; }; then
19009 ac_cv_lib_com_err_com_err=yes
19010else
19011 echo "$as_me: failed program was:" >&5
19650fd6
AS
19012sed 's/^/| /' conftest.$ac_ext >&5
19013
503d2be0
AS
19014ac_cv_lib_com_err_com_err=no
19015fi
edfaf76d
LK
19016rm -f conftest.err conftest.$ac_objext \
19017 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
19018LIBS=$ac_check_lib_save_LIBS
19019fi
c0d27fcc 19020echo "$as_me:$LINENO: result: $ac_cv_lib_com_err_com_err" >&5
503d2be0
AS
19021echo "${ECHO_T}$ac_cv_lib_com_err_com_err" >&6
19022if test $ac_cv_lib_com_err_com_err = yes; then
c0d27fcc 19023 cat >>confdefs.h <<_ACEOF
503d2be0 19024#define HAVE_LIBCOM_ERR 1
c0d27fcc 19025_ACEOF
a21616bd
KR
19026
19027 LIBS="-lcom_err $LIBS"
19028
a21616bd
KR
19029fi
19030
c0d27fcc
MR
19031
19032echo "$as_me:$LINENO: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
503d2be0
AS
19033echo $ECHO_N "checking for mit_des_cbc_encrypt in -lk5crypto... $ECHO_C" >&6
19034if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then
19035 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 19036else
503d2be0 19037 ac_check_lib_save_LIBS=$LIBS
a21616bd 19038LIBS="-lk5crypto $LIBS"
503d2be0 19039cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19040/* confdefs.h. */
19041_ACEOF
19042cat confdefs.h >>conftest.$ac_ext
19043cat >>conftest.$ac_ext <<_ACEOF
19044/* end confdefs.h. */
503d2be0 19045
a21616bd 19046/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
19047#ifdef __cplusplus
19048extern "C"
19049#endif
a21616bd 19050/* We use char because int might match the return type of a gcc2
503d2be0
AS
19051 builtin and then its argument prototype would still apply. */
19052char mit_des_cbc_encrypt ();
19053int
19054main ()
19055{
19056mit_des_cbc_encrypt ();
19057 ;
19058 return 0;
19059}
19060_ACEOF
19061rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 19062if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 19063 (eval $ac_link) 2>conftest.er1
503d2be0 19064 ac_status=$?
edfaf76d
LK
19065 grep -v '^ *+' conftest.er1 >conftest.err
19066 rm -f conftest.er1
19067 cat conftest.err >&5
c0d27fcc 19068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 19069 (exit $ac_status); } &&
e143ad11
AS
19070 { ac_try='test -z "$ac_c_werror_flag"
19071 || test ! -s conftest.err'
edfaf76d
LK
19072 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19073 (eval $ac_try) 2>&5
19074 ac_status=$?
19075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19076 (exit $ac_status); }; } &&
19077 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 19078 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
19079 (eval $ac_try) 2>&5
19080 ac_status=$?
c0d27fcc 19081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19082 (exit $ac_status); }; }; then
19083 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes
19084else
19085 echo "$as_me: failed program was:" >&5
19650fd6
AS
19086sed 's/^/| /' conftest.$ac_ext >&5
19087
503d2be0
AS
19088ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no
19089fi
edfaf76d
LK
19090rm -f conftest.err conftest.$ac_objext \
19091 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
19092LIBS=$ac_check_lib_save_LIBS
19093fi
c0d27fcc 19094echo "$as_me:$LINENO: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5
503d2be0
AS
19095echo "${ECHO_T}$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6
19096if test $ac_cv_lib_k5crypto_mit_des_cbc_encrypt = yes; then
c0d27fcc 19097 cat >>confdefs.h <<_ACEOF
503d2be0 19098#define HAVE_LIBK5CRYPTO 1
c0d27fcc 19099_ACEOF
a21616bd
KR
19100
19101 LIBS="-lk5crypto $LIBS"
19102
a21616bd
KR
19103fi
19104
c0d27fcc
MR
19105
19106echo "$as_me:$LINENO: checking for mit_des_cbc_encrypt in -lcrypto" >&5
503d2be0
AS
19107echo $ECHO_N "checking for mit_des_cbc_encrypt in -lcrypto... $ECHO_C" >&6
19108if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then
19109 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 19110else
503d2be0 19111 ac_check_lib_save_LIBS=$LIBS
a21616bd 19112LIBS="-lcrypto $LIBS"
503d2be0 19113cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19114/* confdefs.h. */
19115_ACEOF
19116cat confdefs.h >>conftest.$ac_ext
19117cat >>conftest.$ac_ext <<_ACEOF
19118/* end confdefs.h. */
503d2be0 19119
a21616bd 19120/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
19121#ifdef __cplusplus
19122extern "C"
19123#endif
a21616bd 19124/* We use char because int might match the return type of a gcc2
503d2be0
AS
19125 builtin and then its argument prototype would still apply. */
19126char mit_des_cbc_encrypt ();
19127int
19128main ()
19129{
19130mit_des_cbc_encrypt ();
19131 ;
19132 return 0;
19133}
19134_ACEOF
19135rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 19136if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 19137 (eval $ac_link) 2>conftest.er1
503d2be0 19138 ac_status=$?
edfaf76d
LK
19139 grep -v '^ *+' conftest.er1 >conftest.err
19140 rm -f conftest.er1
19141 cat conftest.err >&5
c0d27fcc 19142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 19143 (exit $ac_status); } &&
e143ad11
AS
19144 { ac_try='test -z "$ac_c_werror_flag"
19145 || test ! -s conftest.err'
edfaf76d
LK
19146 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19147 (eval $ac_try) 2>&5
19148 ac_status=$?
19149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19150 (exit $ac_status); }; } &&
19151 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 19152 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
19153 (eval $ac_try) 2>&5
19154 ac_status=$?
c0d27fcc 19155 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19156 (exit $ac_status); }; }; then
19157 ac_cv_lib_crypto_mit_des_cbc_encrypt=yes
19158else
19159 echo "$as_me: failed program was:" >&5
19650fd6
AS
19160sed 's/^/| /' conftest.$ac_ext >&5
19161
503d2be0
AS
19162ac_cv_lib_crypto_mit_des_cbc_encrypt=no
19163fi
edfaf76d
LK
19164rm -f conftest.err conftest.$ac_objext \
19165 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
19166LIBS=$ac_check_lib_save_LIBS
19167fi
c0d27fcc 19168echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5
503d2be0
AS
19169echo "${ECHO_T}$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6
19170if test $ac_cv_lib_crypto_mit_des_cbc_encrypt = yes; then
c0d27fcc 19171 cat >>confdefs.h <<_ACEOF
503d2be0 19172#define HAVE_LIBCRYPTO 1
c0d27fcc 19173_ACEOF
a21616bd
KR
19174
19175 LIBS="-lcrypto $LIBS"
19176
a21616bd
KR
19177fi
19178
c0d27fcc
MR
19179
19180echo "$as_me:$LINENO: checking for krb5_init_context in -lkrb5" >&5
503d2be0
AS
19181echo $ECHO_N "checking for krb5_init_context in -lkrb5... $ECHO_C" >&6
19182if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then
19183 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 19184else
503d2be0 19185 ac_check_lib_save_LIBS=$LIBS
a21616bd 19186LIBS="-lkrb5 $LIBS"
503d2be0 19187cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19188/* confdefs.h. */
19189_ACEOF
19190cat confdefs.h >>conftest.$ac_ext
19191cat >>conftest.$ac_ext <<_ACEOF
19192/* end confdefs.h. */
a21616bd 19193
503d2be0
AS
19194/* Override any gcc2 internal prototype to avoid an error. */
19195#ifdef __cplusplus
19196extern "C"
19197#endif
19198/* We use char because int might match the return type of a gcc2
19199 builtin and then its argument prototype would still apply. */
19200char krb5_init_context ();
19201int
19202main ()
19203{
19204krb5_init_context ();
19205 ;
19206 return 0;
19207}
19208_ACEOF
19209rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 19210if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 19211 (eval $ac_link) 2>conftest.er1
503d2be0 19212 ac_status=$?
edfaf76d
LK
19213 grep -v '^ *+' conftest.er1 >conftest.err
19214 rm -f conftest.er1
19215 cat conftest.err >&5
c0d27fcc 19216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 19217 (exit $ac_status); } &&
e143ad11
AS
19218 { ac_try='test -z "$ac_c_werror_flag"
19219 || test ! -s conftest.err'
edfaf76d
LK
19220 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19221 (eval $ac_try) 2>&5
19222 ac_status=$?
19223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19224 (exit $ac_status); }; } &&
19225 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 19226 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
19227 (eval $ac_try) 2>&5
19228 ac_status=$?
c0d27fcc 19229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19230 (exit $ac_status); }; }; then
19231 ac_cv_lib_krb5_krb5_init_context=yes
19232else
19233 echo "$as_me: failed program was:" >&5
19650fd6
AS
19234sed 's/^/| /' conftest.$ac_ext >&5
19235
503d2be0
AS
19236ac_cv_lib_krb5_krb5_init_context=no
19237fi
edfaf76d
LK
19238rm -f conftest.err conftest.$ac_objext \
19239 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
19240LIBS=$ac_check_lib_save_LIBS
19241fi
c0d27fcc 19242echo "$as_me:$LINENO: result: $ac_cv_lib_krb5_krb5_init_context" >&5
503d2be0
AS
19243echo "${ECHO_T}$ac_cv_lib_krb5_krb5_init_context" >&6
19244if test $ac_cv_lib_krb5_krb5_init_context = yes; then
c0d27fcc 19245 cat >>confdefs.h <<_ACEOF
503d2be0 19246#define HAVE_LIBKRB5 1
c0d27fcc 19247_ACEOF
a21616bd
KR
19248
19249 LIBS="-lkrb5 $LIBS"
19250
a21616bd
KR
19251fi
19252
19253 if test "${with_kerberos5+set}" != set; then
503d2be0 19254
c0d27fcc 19255echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes425" >&5
503d2be0
AS
19256echo $ECHO_N "checking for des_cbc_encrypt in -ldes425... $ECHO_C" >&6
19257if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then
19258 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 19259else
503d2be0 19260 ac_check_lib_save_LIBS=$LIBS
a21616bd 19261LIBS="-ldes425 $LIBS"
503d2be0 19262cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19263/* confdefs.h. */
19264_ACEOF
19265cat confdefs.h >>conftest.$ac_ext
19266cat >>conftest.$ac_ext <<_ACEOF
19267/* end confdefs.h. */
503d2be0 19268
a21616bd 19269/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
19270#ifdef __cplusplus
19271extern "C"
19272#endif
a21616bd 19273/* We use char because int might match the return type of a gcc2
503d2be0
AS
19274 builtin and then its argument prototype would still apply. */
19275char des_cbc_encrypt ();
19276int
19277main ()
19278{
19279des_cbc_encrypt ();
19280 ;
19281 return 0;
19282}
19283_ACEOF
19284rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 19285if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 19286 (eval $ac_link) 2>conftest.er1
503d2be0 19287 ac_status=$?
edfaf76d
LK
19288 grep -v '^ *+' conftest.er1 >conftest.err
19289 rm -f conftest.er1
19290 cat conftest.err >&5
c0d27fcc 19291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 19292 (exit $ac_status); } &&
e143ad11
AS
19293 { ac_try='test -z "$ac_c_werror_flag"
19294 || test ! -s conftest.err'
edfaf76d
LK
19295 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19296 (eval $ac_try) 2>&5
19297 ac_status=$?
19298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19299 (exit $ac_status); }; } &&
19300 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 19301 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
19302 (eval $ac_try) 2>&5
19303 ac_status=$?
c0d27fcc 19304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19305 (exit $ac_status); }; }; then
19306 ac_cv_lib_des425_des_cbc_encrypt=yes
19307else
19308 echo "$as_me: failed program was:" >&5
19650fd6
AS
19309sed 's/^/| /' conftest.$ac_ext >&5
19310
503d2be0
AS
19311ac_cv_lib_des425_des_cbc_encrypt=no
19312fi
edfaf76d
LK
19313rm -f conftest.err conftest.$ac_objext \
19314 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
19315LIBS=$ac_check_lib_save_LIBS
19316fi
c0d27fcc 19317echo "$as_me:$LINENO: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
503d2be0
AS
19318echo "${ECHO_T}$ac_cv_lib_des425_des_cbc_encrypt" >&6
19319if test $ac_cv_lib_des425_des_cbc_encrypt = yes; then
c0d27fcc 19320 cat >>confdefs.h <<_ACEOF
503d2be0 19321#define HAVE_LIBDES425 1
c0d27fcc 19322_ACEOF
a21616bd
KR
19323
19324 LIBS="-ldes425 $LIBS"
19325
19326else
503d2be0 19327
c0d27fcc 19328echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes" >&5
503d2be0
AS
19329echo $ECHO_N "checking for des_cbc_encrypt in -ldes... $ECHO_C" >&6
19330if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then
19331 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 19332else
503d2be0 19333 ac_check_lib_save_LIBS=$LIBS
a21616bd 19334LIBS="-ldes $LIBS"
503d2be0 19335cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19336/* confdefs.h. */
19337_ACEOF
19338cat confdefs.h >>conftest.$ac_ext
19339cat >>conftest.$ac_ext <<_ACEOF
19340/* end confdefs.h. */
503d2be0 19341
a21616bd 19342/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
19343#ifdef __cplusplus
19344extern "C"
19345#endif
a21616bd 19346/* We use char because int might match the return type of a gcc2
503d2be0
AS
19347 builtin and then its argument prototype would still apply. */
19348char des_cbc_encrypt ();
19349int
19350main ()
19351{
19352des_cbc_encrypt ();
19353 ;
19354 return 0;
19355}
19356_ACEOF
19357rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 19358if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 19359 (eval $ac_link) 2>conftest.er1
503d2be0 19360 ac_status=$?
edfaf76d
LK
19361 grep -v '^ *+' conftest.er1 >conftest.err
19362 rm -f conftest.er1
19363 cat conftest.err >&5
c0d27fcc 19364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 19365 (exit $ac_status); } &&
e143ad11
AS
19366 { ac_try='test -z "$ac_c_werror_flag"
19367 || test ! -s conftest.err'
edfaf76d
LK
19368 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19369 (eval $ac_try) 2>&5
19370 ac_status=$?
19371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19372 (exit $ac_status); }; } &&
19373 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 19374 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
19375 (eval $ac_try) 2>&5
19376 ac_status=$?
c0d27fcc 19377 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19378 (exit $ac_status); }; }; then
19379 ac_cv_lib_des_des_cbc_encrypt=yes
19380else
19381 echo "$as_me: failed program was:" >&5
19650fd6
AS
19382sed 's/^/| /' conftest.$ac_ext >&5
19383
503d2be0
AS
19384ac_cv_lib_des_des_cbc_encrypt=no
19385fi
edfaf76d
LK
19386rm -f conftest.err conftest.$ac_objext \
19387 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
19388LIBS=$ac_check_lib_save_LIBS
19389fi
c0d27fcc 19390echo "$as_me:$LINENO: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
503d2be0
AS
19391echo "${ECHO_T}$ac_cv_lib_des_des_cbc_encrypt" >&6
19392if test $ac_cv_lib_des_des_cbc_encrypt = yes; then
c0d27fcc 19393 cat >>confdefs.h <<_ACEOF
503d2be0 19394#define HAVE_LIBDES 1
c0d27fcc 19395_ACEOF
a21616bd
KR
19396
19397 LIBS="-ldes $LIBS"
19398
a21616bd
KR
19399fi
19400
19401fi
19402
c0d27fcc
MR
19403
19404echo "$as_me:$LINENO: checking for krb_get_cred in -lkrb4" >&5
503d2be0
AS
19405echo $ECHO_N "checking for krb_get_cred in -lkrb4... $ECHO_C" >&6
19406if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then
19407 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 19408else
503d2be0 19409 ac_check_lib_save_LIBS=$LIBS
a21616bd 19410LIBS="-lkrb4 $LIBS"
503d2be0 19411cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19412/* confdefs.h. */
19413_ACEOF
19414cat confdefs.h >>conftest.$ac_ext
19415cat >>conftest.$ac_ext <<_ACEOF
19416/* end confdefs.h. */
503d2be0 19417
a21616bd 19418/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
19419#ifdef __cplusplus
19420extern "C"
19421#endif
a21616bd 19422/* We use char because int might match the return type of a gcc2
503d2be0
AS
19423 builtin and then its argument prototype would still apply. */
19424char krb_get_cred ();
19425int
19426main ()
19427{
19428krb_get_cred ();
19429 ;
19430 return 0;
19431}
19432_ACEOF
19433rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 19434if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 19435 (eval $ac_link) 2>conftest.er1
503d2be0 19436 ac_status=$?
edfaf76d
LK
19437 grep -v '^ *+' conftest.er1 >conftest.err
19438 rm -f conftest.er1
19439 cat conftest.err >&5
c0d27fcc 19440 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 19441 (exit $ac_status); } &&
e143ad11
AS
19442 { ac_try='test -z "$ac_c_werror_flag"
19443 || test ! -s conftest.err'
edfaf76d
LK
19444 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19445 (eval $ac_try) 2>&5
19446 ac_status=$?
19447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19448 (exit $ac_status); }; } &&
19449 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 19450 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
19451 (eval $ac_try) 2>&5
19452 ac_status=$?
c0d27fcc 19453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19454 (exit $ac_status); }; }; then
19455 ac_cv_lib_krb4_krb_get_cred=yes
19456else
19457 echo "$as_me: failed program was:" >&5
19650fd6
AS
19458sed 's/^/| /' conftest.$ac_ext >&5
19459
503d2be0
AS
19460ac_cv_lib_krb4_krb_get_cred=no
19461fi
edfaf76d
LK
19462rm -f conftest.err conftest.$ac_objext \
19463 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
19464LIBS=$ac_check_lib_save_LIBS
19465fi
c0d27fcc 19466echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_krb_get_cred" >&5
503d2be0
AS
19467echo "${ECHO_T}$ac_cv_lib_krb4_krb_get_cred" >&6
19468if test $ac_cv_lib_krb4_krb_get_cred = yes; then
c0d27fcc 19469 cat >>confdefs.h <<_ACEOF
503d2be0 19470#define HAVE_LIBKRB4 1
c0d27fcc 19471_ACEOF
a21616bd
KR
19472
19473 LIBS="-lkrb4 $LIBS"
19474
19475else
503d2be0 19476
c0d27fcc 19477echo "$as_me:$LINENO: checking for krb_get_cred in -lkrb" >&5
503d2be0
AS
19478echo $ECHO_N "checking for krb_get_cred in -lkrb... $ECHO_C" >&6
19479if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then
19480 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 19481else
503d2be0 19482 ac_check_lib_save_LIBS=$LIBS
a21616bd 19483LIBS="-lkrb $LIBS"
503d2be0 19484cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19485/* confdefs.h. */
19486_ACEOF
19487cat confdefs.h >>conftest.$ac_ext
19488cat >>conftest.$ac_ext <<_ACEOF
19489/* end confdefs.h. */
503d2be0 19490
a21616bd 19491/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
19492#ifdef __cplusplus
19493extern "C"
19494#endif
a21616bd 19495/* We use char because int might match the return type of a gcc2
503d2be0
AS
19496 builtin and then its argument prototype would still apply. */
19497char krb_get_cred ();
19498int
19499main ()
19500{
19501krb_get_cred ();
19502 ;
19503 return 0;
19504}
19505_ACEOF
19506rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 19507if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 19508 (eval $ac_link) 2>conftest.er1
503d2be0 19509 ac_status=$?
edfaf76d
LK
19510 grep -v '^ *+' conftest.er1 >conftest.err
19511 rm -f conftest.er1
19512 cat conftest.err >&5
c0d27fcc 19513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 19514 (exit $ac_status); } &&
e143ad11
AS
19515 { ac_try='test -z "$ac_c_werror_flag"
19516 || test ! -s conftest.err'
edfaf76d
LK
19517 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19518 (eval $ac_try) 2>&5
19519 ac_status=$?
19520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19521 (exit $ac_status); }; } &&
19522 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 19523 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
19524 (eval $ac_try) 2>&5
19525 ac_status=$?
c0d27fcc 19526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19527 (exit $ac_status); }; }; then
19528 ac_cv_lib_krb_krb_get_cred=yes
19529else
19530 echo "$as_me: failed program was:" >&5
19650fd6
AS
19531sed 's/^/| /' conftest.$ac_ext >&5
19532
503d2be0
AS
19533ac_cv_lib_krb_krb_get_cred=no
19534fi
edfaf76d
LK
19535rm -f conftest.err conftest.$ac_objext \
19536 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
19537LIBS=$ac_check_lib_save_LIBS
19538fi
c0d27fcc 19539echo "$as_me:$LINENO: result: $ac_cv_lib_krb_krb_get_cred" >&5
503d2be0
AS
19540echo "${ECHO_T}$ac_cv_lib_krb_krb_get_cred" >&6
19541if test $ac_cv_lib_krb_krb_get_cred = yes; then
c0d27fcc 19542 cat >>confdefs.h <<_ACEOF
503d2be0 19543#define HAVE_LIBKRB 1
c0d27fcc 19544_ACEOF
a21616bd
KR
19545
19546 LIBS="-lkrb $LIBS"
19547
a21616bd
KR
19548fi
19549
19550fi
19551
19552 fi
19553
19554 if test "${with_kerberos5+set}" = set; then
503d2be0
AS
19555
19556for ac_header in krb5.h
a21616bd 19557do
503d2be0 19558as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
19559if eval "test \"\${$as_ac_Header+set}\" = set"; then
19560 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
19561echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19562if eval "test \"\${$as_ac_Header+set}\" = set"; then
19563 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
19564fi
19565echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
19566echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 19567else
c0d27fcc
MR
19568 # Is the header compilable?
19569echo "$as_me:$LINENO: checking $ac_header usability" >&5
19570echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
19571cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19572/* confdefs.h. */
19573_ACEOF
19574cat confdefs.h >>conftest.$ac_ext
19575cat >>conftest.$ac_ext <<_ACEOF
19576/* end confdefs.h. */
c0d27fcc
MR
19577$ac_includes_default
19578#include <$ac_header>
19579_ACEOF
19580rm -f conftest.$ac_objext
19581if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 19582 (eval $ac_compile) 2>conftest.er1
c0d27fcc 19583 ac_status=$?
edfaf76d
LK
19584 grep -v '^ *+' conftest.er1 >conftest.err
19585 rm -f conftest.er1
19586 cat conftest.err >&5
c0d27fcc
MR
19587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19588 (exit $ac_status); } &&
e143ad11
AS
19589 { ac_try='test -z "$ac_c_werror_flag"
19590 || test ! -s conftest.err'
edfaf76d
LK
19591 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19592 (eval $ac_try) 2>&5
19593 ac_status=$?
19594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19595 (exit $ac_status); }; } &&
19596 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
19597 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19598 (eval $ac_try) 2>&5
19599 ac_status=$?
19600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19601 (exit $ac_status); }; }; then
19602 ac_header_compiler=yes
19603else
19604 echo "$as_me: failed program was:" >&5
19650fd6
AS
19605sed 's/^/| /' conftest.$ac_ext >&5
19606
c0d27fcc
MR
19607ac_header_compiler=no
19608fi
edfaf76d 19609rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
19610echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19611echo "${ECHO_T}$ac_header_compiler" >&6
19612
19613# Is the header present?
19614echo "$as_me:$LINENO: checking $ac_header presence" >&5
19615echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
19616cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19617/* confdefs.h. */
19618_ACEOF
19619cat confdefs.h >>conftest.$ac_ext
19620cat >>conftest.$ac_ext <<_ACEOF
19621/* end confdefs.h. */
503d2be0
AS
19622#include <$ac_header>
19623_ACEOF
c0d27fcc 19624if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
19625 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19626 ac_status=$?
6bae0ccf 19627 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
19628 rm -f conftest.er1
19629 cat conftest.err >&5
c0d27fcc 19630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19631 (exit $ac_status); } >/dev/null; then
19632 if test -s conftest.err; then
19633 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 19634 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
19635 else
19636 ac_cpp_err=
19637 fi
19638else
19639 ac_cpp_err=yes
19640fi
19641if test -z "$ac_cpp_err"; then
c0d27fcc 19642 ac_header_preproc=yes
503d2be0
AS
19643else
19644 echo "$as_me: failed program was:" >&5
19650fd6
AS
19645sed 's/^/| /' conftest.$ac_ext >&5
19646
c0d27fcc 19647 ac_header_preproc=no
a21616bd 19648fi
503d2be0 19649rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
19650echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19651echo "${ECHO_T}$ac_header_preproc" >&6
19652
19653# So? What about this header?
edfaf76d
LK
19654case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19655 yes:no: )
c0d27fcc
MR
19656 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19657echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
19658 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
19659echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
19660 ac_header_preproc=yes
19650fd6 19661 ;;
edfaf76d 19662 no:yes:* )
c0d27fcc
MR
19663 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19664echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
19665 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
19666echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
19667 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19668echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19669 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
19670echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 19671 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 19672echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
19673 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
19674echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
19675 (
19676 cat <<\_ASBOX
edfaf76d
LK
19677## ------------------------------------------ ##
19678## Report this to the AC_PACKAGE_NAME lists. ##
19679## ------------------------------------------ ##
19650fd6
AS
19680_ASBOX
19681 ) |
19682 sed "s/^/$as_me: WARNING: /" >&2
19683 ;;
c0d27fcc
MR
19684esac
19685echo "$as_me:$LINENO: checking for $ac_header" >&5
19686echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19687if eval "test \"\${$as_ac_Header+set}\" = set"; then
19688 echo $ECHO_N "(cached) $ECHO_C" >&6
19689else
edfaf76d 19690 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 19691fi
c0d27fcc 19692echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 19693echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
19694
19695fi
503d2be0 19696if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 19697 cat >>confdefs.h <<_ACEOF
503d2be0 19698#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 19699_ACEOF
503d2be0 19700
a21616bd 19701fi
c0d27fcc 19702
a21616bd
KR
19703done
19704
19705 else
503d2be0
AS
19706
19707for ac_header in des.h
a21616bd 19708do
503d2be0 19709as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
19710if eval "test \"\${$as_ac_Header+set}\" = set"; then
19711 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
19712echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19713if eval "test \"\${$as_ac_Header+set}\" = set"; then
19714 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
19715fi
19716echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
19717echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 19718else
c0d27fcc
MR
19719 # Is the header compilable?
19720echo "$as_me:$LINENO: checking $ac_header usability" >&5
19721echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
19722cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19723/* confdefs.h. */
19724_ACEOF
19725cat confdefs.h >>conftest.$ac_ext
19726cat >>conftest.$ac_ext <<_ACEOF
19727/* end confdefs.h. */
c0d27fcc
MR
19728$ac_includes_default
19729#include <$ac_header>
19730_ACEOF
19731rm -f conftest.$ac_objext
19732if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 19733 (eval $ac_compile) 2>conftest.er1
c0d27fcc 19734 ac_status=$?
edfaf76d
LK
19735 grep -v '^ *+' conftest.er1 >conftest.err
19736 rm -f conftest.er1
19737 cat conftest.err >&5
c0d27fcc
MR
19738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19739 (exit $ac_status); } &&
e143ad11
AS
19740 { ac_try='test -z "$ac_c_werror_flag"
19741 || test ! -s conftest.err'
edfaf76d
LK
19742 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19743 (eval $ac_try) 2>&5
19744 ac_status=$?
19745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19746 (exit $ac_status); }; } &&
19747 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
19748 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19749 (eval $ac_try) 2>&5
19750 ac_status=$?
19751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19752 (exit $ac_status); }; }; then
19753 ac_header_compiler=yes
19754else
19755 echo "$as_me: failed program was:" >&5
19650fd6
AS
19756sed 's/^/| /' conftest.$ac_ext >&5
19757
c0d27fcc
MR
19758ac_header_compiler=no
19759fi
edfaf76d 19760rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
19761echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19762echo "${ECHO_T}$ac_header_compiler" >&6
19763
19764# Is the header present?
19765echo "$as_me:$LINENO: checking $ac_header presence" >&5
19766echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
19767cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19768/* confdefs.h. */
19769_ACEOF
19770cat confdefs.h >>conftest.$ac_ext
19771cat >>conftest.$ac_ext <<_ACEOF
19772/* end confdefs.h. */
503d2be0
AS
19773#include <$ac_header>
19774_ACEOF
c0d27fcc 19775if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
19776 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19777 ac_status=$?
6bae0ccf 19778 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
19779 rm -f conftest.er1
19780 cat conftest.err >&5
c0d27fcc 19781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19782 (exit $ac_status); } >/dev/null; then
19783 if test -s conftest.err; then
19784 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 19785 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
19786 else
19787 ac_cpp_err=
19788 fi
19789else
19790 ac_cpp_err=yes
19791fi
19792if test -z "$ac_cpp_err"; then
c0d27fcc 19793 ac_header_preproc=yes
503d2be0
AS
19794else
19795 echo "$as_me: failed program was:" >&5
19650fd6
AS
19796sed 's/^/| /' conftest.$ac_ext >&5
19797
c0d27fcc 19798 ac_header_preproc=no
a21616bd 19799fi
503d2be0 19800rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
19801echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19802echo "${ECHO_T}$ac_header_preproc" >&6
19803
19804# So? What about this header?
edfaf76d
LK
19805case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19806 yes:no: )
c0d27fcc
MR
19807 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19808echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
19809 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
19810echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
19811 ac_header_preproc=yes
19650fd6 19812 ;;
edfaf76d 19813 no:yes:* )
c0d27fcc
MR
19814 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19815echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
19816 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
19817echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
19818 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19819echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19820 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
19821echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 19822 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 19823echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
19824 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
19825echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
19826 (
19827 cat <<\_ASBOX
edfaf76d
LK
19828## ------------------------------------------ ##
19829## Report this to the AC_PACKAGE_NAME lists. ##
19830## ------------------------------------------ ##
19650fd6
AS
19831_ASBOX
19832 ) |
19833 sed "s/^/$as_me: WARNING: /" >&2
19834 ;;
c0d27fcc
MR
19835esac
19836echo "$as_me:$LINENO: checking for $ac_header" >&5
19837echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19838if eval "test \"\${$as_ac_Header+set}\" = set"; then
19839 echo $ECHO_N "(cached) $ECHO_C" >&6
19840else
edfaf76d 19841 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 19842fi
c0d27fcc 19843echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 19844echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
19845
19846fi
503d2be0 19847if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 19848 cat >>confdefs.h <<_ACEOF
503d2be0 19849#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 19850_ACEOF
503d2be0 19851
a21616bd 19852else
503d2be0
AS
19853
19854for ac_header in kerberosIV/des.h
a21616bd 19855do
503d2be0 19856as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
19857if eval "test \"\${$as_ac_Header+set}\" = set"; then
19858 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
19859echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19860if eval "test \"\${$as_ac_Header+set}\" = set"; then
19861 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
19862fi
19863echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
19864echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 19865else
c0d27fcc
MR
19866 # Is the header compilable?
19867echo "$as_me:$LINENO: checking $ac_header usability" >&5
19868echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
19869cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19870/* confdefs.h. */
19871_ACEOF
19872cat confdefs.h >>conftest.$ac_ext
19873cat >>conftest.$ac_ext <<_ACEOF
19874/* end confdefs.h. */
c0d27fcc
MR
19875$ac_includes_default
19876#include <$ac_header>
19877_ACEOF
19878rm -f conftest.$ac_objext
19879if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 19880 (eval $ac_compile) 2>conftest.er1
c0d27fcc 19881 ac_status=$?
edfaf76d
LK
19882 grep -v '^ *+' conftest.er1 >conftest.err
19883 rm -f conftest.er1
19884 cat conftest.err >&5
c0d27fcc
MR
19885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19886 (exit $ac_status); } &&
e143ad11
AS
19887 { ac_try='test -z "$ac_c_werror_flag"
19888 || test ! -s conftest.err'
edfaf76d
LK
19889 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19890 (eval $ac_try) 2>&5
19891 ac_status=$?
19892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19893 (exit $ac_status); }; } &&
19894 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
19895 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19896 (eval $ac_try) 2>&5
19897 ac_status=$?
19898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19899 (exit $ac_status); }; }; then
19900 ac_header_compiler=yes
19901else
19902 echo "$as_me: failed program was:" >&5
19650fd6
AS
19903sed 's/^/| /' conftest.$ac_ext >&5
19904
c0d27fcc
MR
19905ac_header_compiler=no
19906fi
edfaf76d 19907rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
19908echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19909echo "${ECHO_T}$ac_header_compiler" >&6
19910
19911# Is the header present?
19912echo "$as_me:$LINENO: checking $ac_header presence" >&5
19913echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
19914cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19915/* confdefs.h. */
19916_ACEOF
19917cat confdefs.h >>conftest.$ac_ext
19918cat >>conftest.$ac_ext <<_ACEOF
19919/* end confdefs.h. */
503d2be0
AS
19920#include <$ac_header>
19921_ACEOF
c0d27fcc 19922if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
19923 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19924 ac_status=$?
6bae0ccf 19925 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
19926 rm -f conftest.er1
19927 cat conftest.err >&5
c0d27fcc 19928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19929 (exit $ac_status); } >/dev/null; then
19930 if test -s conftest.err; then
19931 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 19932 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
19933 else
19934 ac_cpp_err=
19935 fi
19936else
19937 ac_cpp_err=yes
19938fi
19939if test -z "$ac_cpp_err"; then
c0d27fcc 19940 ac_header_preproc=yes
503d2be0
AS
19941else
19942 echo "$as_me: failed program was:" >&5
19650fd6
AS
19943sed 's/^/| /' conftest.$ac_ext >&5
19944
c0d27fcc 19945 ac_header_preproc=no
a21616bd 19946fi
503d2be0 19947rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
19948echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19949echo "${ECHO_T}$ac_header_preproc" >&6
19950
19951# So? What about this header?
edfaf76d
LK
19952case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19953 yes:no: )
c0d27fcc
MR
19954 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19955echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
19956 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
19957echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
19958 ac_header_preproc=yes
19650fd6 19959 ;;
edfaf76d 19960 no:yes:* )
c0d27fcc
MR
19961 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19962echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
19963 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
19964echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
19965 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19966echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19967 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
19968echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 19969 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 19970echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
19971 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
19972echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
19973 (
19974 cat <<\_ASBOX
edfaf76d
LK
19975## ------------------------------------------ ##
19976## Report this to the AC_PACKAGE_NAME lists. ##
19977## ------------------------------------------ ##
19650fd6
AS
19978_ASBOX
19979 ) |
19980 sed "s/^/$as_me: WARNING: /" >&2
19981 ;;
c0d27fcc
MR
19982esac
19983echo "$as_me:$LINENO: checking for $ac_header" >&5
19984echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19985if eval "test \"\${$as_ac_Header+set}\" = set"; then
19986 echo $ECHO_N "(cached) $ECHO_C" >&6
19987else
edfaf76d 19988 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 19989fi
c0d27fcc 19990echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 19991echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
19992
19993fi
503d2be0 19994if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 19995 cat >>confdefs.h <<_ACEOF
503d2be0 19996#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 19997_ACEOF
503d2be0 19998
a21616bd 19999else
503d2be0
AS
20000
20001for ac_header in kerberos/des.h
a21616bd 20002do
503d2be0 20003as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
20004if eval "test \"\${$as_ac_Header+set}\" = set"; then
20005 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
20006echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20007if eval "test \"\${$as_ac_Header+set}\" = set"; then
20008 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
20009fi
20010echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
20011echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 20012else
c0d27fcc
MR
20013 # Is the header compilable?
20014echo "$as_me:$LINENO: checking $ac_header usability" >&5
20015echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
20016cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20017/* confdefs.h. */
20018_ACEOF
20019cat confdefs.h >>conftest.$ac_ext
20020cat >>conftest.$ac_ext <<_ACEOF
20021/* end confdefs.h. */
c0d27fcc
MR
20022$ac_includes_default
20023#include <$ac_header>
20024_ACEOF
20025rm -f conftest.$ac_objext
20026if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 20027 (eval $ac_compile) 2>conftest.er1
c0d27fcc 20028 ac_status=$?
edfaf76d
LK
20029 grep -v '^ *+' conftest.er1 >conftest.err
20030 rm -f conftest.er1
20031 cat conftest.err >&5
c0d27fcc
MR
20032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20033 (exit $ac_status); } &&
e143ad11
AS
20034 { ac_try='test -z "$ac_c_werror_flag"
20035 || test ! -s conftest.err'
edfaf76d
LK
20036 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20037 (eval $ac_try) 2>&5
20038 ac_status=$?
20039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20040 (exit $ac_status); }; } &&
20041 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
20042 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20043 (eval $ac_try) 2>&5
20044 ac_status=$?
20045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20046 (exit $ac_status); }; }; then
20047 ac_header_compiler=yes
20048else
20049 echo "$as_me: failed program was:" >&5
19650fd6
AS
20050sed 's/^/| /' conftest.$ac_ext >&5
20051
c0d27fcc
MR
20052ac_header_compiler=no
20053fi
edfaf76d 20054rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
20055echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20056echo "${ECHO_T}$ac_header_compiler" >&6
20057
20058# Is the header present?
20059echo "$as_me:$LINENO: checking $ac_header presence" >&5
20060echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
20061cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20062/* confdefs.h. */
20063_ACEOF
20064cat confdefs.h >>conftest.$ac_ext
20065cat >>conftest.$ac_ext <<_ACEOF
20066/* end confdefs.h. */
503d2be0
AS
20067#include <$ac_header>
20068_ACEOF
c0d27fcc 20069if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
20070 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20071 ac_status=$?
6bae0ccf 20072 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
20073 rm -f conftest.er1
20074 cat conftest.err >&5
c0d27fcc 20075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
20076 (exit $ac_status); } >/dev/null; then
20077 if test -s conftest.err; then
20078 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 20079 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
20080 else
20081 ac_cpp_err=
20082 fi
20083else
20084 ac_cpp_err=yes
20085fi
20086if test -z "$ac_cpp_err"; then
c0d27fcc 20087 ac_header_preproc=yes
503d2be0
AS
20088else
20089 echo "$as_me: failed program was:" >&5
19650fd6
AS
20090sed 's/^/| /' conftest.$ac_ext >&5
20091
c0d27fcc 20092 ac_header_preproc=no
a21616bd 20093fi
503d2be0 20094rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
20095echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20096echo "${ECHO_T}$ac_header_preproc" >&6
20097
20098# So? What about this header?
edfaf76d
LK
20099case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20100 yes:no: )
c0d27fcc
MR
20101 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
20102echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
20103 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
20104echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
20105 ac_header_preproc=yes
19650fd6 20106 ;;
edfaf76d 20107 no:yes:* )
c0d27fcc
MR
20108 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
20109echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
20110 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
20111echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
20112 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
20113echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
20114 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
20115echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 20116 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 20117echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
20118 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
20119echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
20120 (
20121 cat <<\_ASBOX
edfaf76d
LK
20122## ------------------------------------------ ##
20123## Report this to the AC_PACKAGE_NAME lists. ##
20124## ------------------------------------------ ##
19650fd6
AS
20125_ASBOX
20126 ) |
20127 sed "s/^/$as_me: WARNING: /" >&2
20128 ;;
c0d27fcc
MR
20129esac
20130echo "$as_me:$LINENO: checking for $ac_header" >&5
20131echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20132if eval "test \"\${$as_ac_Header+set}\" = set"; then
20133 echo $ECHO_N "(cached) $ECHO_C" >&6
20134else
edfaf76d 20135 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 20136fi
c0d27fcc 20137echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 20138echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
20139
20140fi
503d2be0 20141if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 20142 cat >>confdefs.h <<_ACEOF
503d2be0 20143#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 20144_ACEOF
a21616bd
KR
20145
20146fi
c0d27fcc 20147
a21616bd
KR
20148done
20149
98418dba 20150fi
c0d27fcc 20151
925c2f3f
EZ
20152done
20153
98418dba 20154fi
c0d27fcc 20155
925c2f3f 20156done
98418dba 20157
c0d27fcc 20158
925c2f3f
EZ
20159for ac_header in krb.h
20160do
20161as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
20162if eval "test \"\${$as_ac_Header+set}\" = set"; then
20163 echo "$as_me:$LINENO: checking for $ac_header" >&5
925c2f3f
EZ
20164echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20165if eval "test \"\${$as_ac_Header+set}\" = set"; then
20166 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
20167fi
20168echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
20169echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20170else
20171 # Is the header compilable?
20172echo "$as_me:$LINENO: checking $ac_header usability" >&5
20173echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
20174cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20175/* confdefs.h. */
20176_ACEOF
20177cat confdefs.h >>conftest.$ac_ext
20178cat >>conftest.$ac_ext <<_ACEOF
20179/* end confdefs.h. */
c0d27fcc
MR
20180$ac_includes_default
20181#include <$ac_header>
20182_ACEOF
20183rm -f conftest.$ac_objext
20184if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 20185 (eval $ac_compile) 2>conftest.er1
c0d27fcc 20186 ac_status=$?
edfaf76d
LK
20187 grep -v '^ *+' conftest.er1 >conftest.err
20188 rm -f conftest.er1
20189 cat conftest.err >&5
c0d27fcc
MR
20190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20191 (exit $ac_status); } &&
e143ad11
AS
20192 { ac_try='test -z "$ac_c_werror_flag"
20193 || test ! -s conftest.err'
edfaf76d
LK
20194 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20195 (eval $ac_try) 2>&5
20196 ac_status=$?
20197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20198 (exit $ac_status); }; } &&
20199 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
20200 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20201 (eval $ac_try) 2>&5
20202 ac_status=$?
20203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20204 (exit $ac_status); }; }; then
20205 ac_header_compiler=yes
925c2f3f 20206else
c0d27fcc 20207 echo "$as_me: failed program was:" >&5
19650fd6
AS
20208sed 's/^/| /' conftest.$ac_ext >&5
20209
c0d27fcc
MR
20210ac_header_compiler=no
20211fi
edfaf76d 20212rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
20213echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20214echo "${ECHO_T}$ac_header_compiler" >&6
20215
20216# Is the header present?
20217echo "$as_me:$LINENO: checking $ac_header presence" >&5
20218echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
20219cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20220/* confdefs.h. */
20221_ACEOF
20222cat confdefs.h >>conftest.$ac_ext
20223cat >>conftest.$ac_ext <<_ACEOF
20224/* end confdefs.h. */
503d2be0
AS
20225#include <$ac_header>
20226_ACEOF
c0d27fcc 20227if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
20228 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20229 ac_status=$?
6bae0ccf 20230 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
20231 rm -f conftest.er1
20232 cat conftest.err >&5
c0d27fcc 20233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
20234 (exit $ac_status); } >/dev/null; then
20235 if test -s conftest.err; then
20236 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 20237 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
20238 else
20239 ac_cpp_err=
20240 fi
20241else
20242 ac_cpp_err=yes
20243fi
20244if test -z "$ac_cpp_err"; then
c0d27fcc 20245 ac_header_preproc=yes
503d2be0
AS
20246else
20247 echo "$as_me: failed program was:" >&5
19650fd6
AS
20248sed 's/^/| /' conftest.$ac_ext >&5
20249
c0d27fcc 20250 ac_header_preproc=no
a21616bd 20251fi
503d2be0 20252rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
20253echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20254echo "${ECHO_T}$ac_header_preproc" >&6
20255
20256# So? What about this header?
edfaf76d
LK
20257case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20258 yes:no: )
c0d27fcc
MR
20259 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
20260echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
20261 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
20262echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
20263 ac_header_preproc=yes
19650fd6 20264 ;;
edfaf76d 20265 no:yes:* )
c0d27fcc
MR
20266 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
20267echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
20268 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
20269echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
20270 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
20271echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
20272 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
20273echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 20274 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 20275echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
20276 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
20277echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
20278 (
20279 cat <<\_ASBOX
edfaf76d
LK
20280## ------------------------------------------ ##
20281## Report this to the AC_PACKAGE_NAME lists. ##
20282## ------------------------------------------ ##
19650fd6
AS
20283_ASBOX
20284 ) |
20285 sed "s/^/$as_me: WARNING: /" >&2
20286 ;;
c0d27fcc
MR
20287esac
20288echo "$as_me:$LINENO: checking for $ac_header" >&5
20289echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20290if eval "test \"\${$as_ac_Header+set}\" = set"; then
20291 echo $ECHO_N "(cached) $ECHO_C" >&6
20292else
edfaf76d 20293 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 20294fi
c0d27fcc 20295echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 20296echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
20297
20298fi
503d2be0 20299if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 20300 cat >>confdefs.h <<_ACEOF
503d2be0 20301#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 20302_ACEOF
503d2be0 20303
a21616bd 20304else
503d2be0
AS
20305
20306for ac_header in kerberosIV/krb.h
a21616bd 20307do
503d2be0 20308as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
20309if eval "test \"\${$as_ac_Header+set}\" = set"; then
20310 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
20311echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20312if eval "test \"\${$as_ac_Header+set}\" = set"; then
20313 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
20314fi
20315echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
20316echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 20317else
c0d27fcc
MR
20318 # Is the header compilable?
20319echo "$as_me:$LINENO: checking $ac_header usability" >&5
20320echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
20321cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20322/* confdefs.h. */
20323_ACEOF
20324cat confdefs.h >>conftest.$ac_ext
20325cat >>conftest.$ac_ext <<_ACEOF
20326/* end confdefs.h. */
c0d27fcc
MR
20327$ac_includes_default
20328#include <$ac_header>
20329_ACEOF
20330rm -f conftest.$ac_objext
20331if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 20332 (eval $ac_compile) 2>conftest.er1
c0d27fcc 20333 ac_status=$?
edfaf76d
LK
20334 grep -v '^ *+' conftest.er1 >conftest.err
20335 rm -f conftest.er1
20336 cat conftest.err >&5
c0d27fcc
MR
20337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20338 (exit $ac_status); } &&
e143ad11
AS
20339 { ac_try='test -z "$ac_c_werror_flag"
20340 || test ! -s conftest.err'
edfaf76d
LK
20341 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20342 (eval $ac_try) 2>&5
20343 ac_status=$?
20344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20345 (exit $ac_status); }; } &&
20346 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
20347 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20348 (eval $ac_try) 2>&5
20349 ac_status=$?
20350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20351 (exit $ac_status); }; }; then
20352 ac_header_compiler=yes
20353else
20354 echo "$as_me: failed program was:" >&5
19650fd6
AS
20355sed 's/^/| /' conftest.$ac_ext >&5
20356
c0d27fcc
MR
20357ac_header_compiler=no
20358fi
edfaf76d 20359rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
20360echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20361echo "${ECHO_T}$ac_header_compiler" >&6
20362
20363# Is the header present?
20364echo "$as_me:$LINENO: checking $ac_header presence" >&5
20365echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
20366cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20367/* confdefs.h. */
20368_ACEOF
20369cat confdefs.h >>conftest.$ac_ext
20370cat >>conftest.$ac_ext <<_ACEOF
20371/* end confdefs.h. */
503d2be0
AS
20372#include <$ac_header>
20373_ACEOF
c0d27fcc 20374if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
20375 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20376 ac_status=$?
6bae0ccf 20377 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
20378 rm -f conftest.er1
20379 cat conftest.err >&5
c0d27fcc 20380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
20381 (exit $ac_status); } >/dev/null; then
20382 if test -s conftest.err; then
20383 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 20384 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
20385 else
20386 ac_cpp_err=
20387 fi
20388else
20389 ac_cpp_err=yes
20390fi
20391if test -z "$ac_cpp_err"; then
c0d27fcc 20392 ac_header_preproc=yes
503d2be0
AS
20393else
20394 echo "$as_me: failed program was:" >&5
19650fd6
AS
20395sed 's/^/| /' conftest.$ac_ext >&5
20396
c0d27fcc 20397 ac_header_preproc=no
a21616bd 20398fi
503d2be0 20399rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
20400echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20401echo "${ECHO_T}$ac_header_preproc" >&6
20402
20403# So? What about this header?
edfaf76d
LK
20404case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20405 yes:no: )
c0d27fcc
MR
20406 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
20407echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
20408 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
20409echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
20410 ac_header_preproc=yes
19650fd6 20411 ;;
edfaf76d 20412 no:yes:* )
c0d27fcc
MR
20413 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
20414echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
20415 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
20416echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
20417 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
20418echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
20419 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
20420echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 20421 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 20422echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
20423 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
20424echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
20425 (
20426 cat <<\_ASBOX
edfaf76d
LK
20427## ------------------------------------------ ##
20428## Report this to the AC_PACKAGE_NAME lists. ##
20429## ------------------------------------------ ##
19650fd6
AS
20430_ASBOX
20431 ) |
20432 sed "s/^/$as_me: WARNING: /" >&2
20433 ;;
c0d27fcc
MR
20434esac
20435echo "$as_me:$LINENO: checking for $ac_header" >&5
20436echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20437if eval "test \"\${$as_ac_Header+set}\" = set"; then
20438 echo $ECHO_N "(cached) $ECHO_C" >&6
20439else
edfaf76d 20440 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 20441fi
c0d27fcc 20442echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 20443echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
20444
20445fi
503d2be0 20446if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 20447 cat >>confdefs.h <<_ACEOF
503d2be0 20448#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 20449_ACEOF
503d2be0 20450
a21616bd 20451else
503d2be0
AS
20452
20453for ac_header in kerberos/krb.h
a21616bd 20454do
503d2be0 20455as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
20456if eval "test \"\${$as_ac_Header+set}\" = set"; then
20457 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
20458echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20459if eval "test \"\${$as_ac_Header+set}\" = set"; then
20460 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
20461fi
20462echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
20463echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 20464else
c0d27fcc
MR
20465 # Is the header compilable?
20466echo "$as_me:$LINENO: checking $ac_header usability" >&5
20467echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
20468cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20469/* confdefs.h. */
20470_ACEOF
20471cat confdefs.h >>conftest.$ac_ext
20472cat >>conftest.$ac_ext <<_ACEOF
20473/* end confdefs.h. */
c0d27fcc
MR
20474$ac_includes_default
20475#include <$ac_header>
20476_ACEOF
20477rm -f conftest.$ac_objext
20478if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 20479 (eval $ac_compile) 2>conftest.er1
c0d27fcc 20480 ac_status=$?
edfaf76d
LK
20481 grep -v '^ *+' conftest.er1 >conftest.err
20482 rm -f conftest.er1
20483 cat conftest.err >&5
c0d27fcc
MR
20484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20485 (exit $ac_status); } &&
e143ad11
AS
20486 { ac_try='test -z "$ac_c_werror_flag"
20487 || test ! -s conftest.err'
edfaf76d
LK
20488 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20489 (eval $ac_try) 2>&5
20490 ac_status=$?
20491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20492 (exit $ac_status); }; } &&
20493 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
20494 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20495 (eval $ac_try) 2>&5
20496 ac_status=$?
20497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20498 (exit $ac_status); }; }; then
20499 ac_header_compiler=yes
20500else
20501 echo "$as_me: failed program was:" >&5
19650fd6
AS
20502sed 's/^/| /' conftest.$ac_ext >&5
20503
c0d27fcc
MR
20504ac_header_compiler=no
20505fi
edfaf76d 20506rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
20507echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20508echo "${ECHO_T}$ac_header_compiler" >&6
20509
20510# Is the header present?
20511echo "$as_me:$LINENO: checking $ac_header presence" >&5
20512echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
20513cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20514/* confdefs.h. */
20515_ACEOF
20516cat confdefs.h >>conftest.$ac_ext
20517cat >>conftest.$ac_ext <<_ACEOF
20518/* end confdefs.h. */
503d2be0
AS
20519#include <$ac_header>
20520_ACEOF
c0d27fcc 20521if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
20522 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20523 ac_status=$?
6bae0ccf 20524 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
20525 rm -f conftest.er1
20526 cat conftest.err >&5
c0d27fcc 20527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
20528 (exit $ac_status); } >/dev/null; then
20529 if test -s conftest.err; then
20530 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 20531 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
20532 else
20533 ac_cpp_err=
20534 fi
20535else
20536 ac_cpp_err=yes
20537fi
20538if test -z "$ac_cpp_err"; then
c0d27fcc 20539 ac_header_preproc=yes
503d2be0
AS
20540else
20541 echo "$as_me: failed program was:" >&5
19650fd6
AS
20542sed 's/^/| /' conftest.$ac_ext >&5
20543
c0d27fcc 20544 ac_header_preproc=no
a21616bd 20545fi
503d2be0 20546rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
20547echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20548echo "${ECHO_T}$ac_header_preproc" >&6
35996d22
AS
20549
20550# So? What about this header?
edfaf76d
LK
20551case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20552 yes:no: )
35996d22
AS
20553 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
20554echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
20555 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
20556echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
20557 ac_header_preproc=yes
19650fd6 20558 ;;
edfaf76d 20559 no:yes:* )
c0d27fcc
MR
20560 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
20561echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
20562 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
20563echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
20564 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
20565echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
20566 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
20567echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 20568 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 20569echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
20570 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
20571echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
20572 (
20573 cat <<\_ASBOX
edfaf76d
LK
20574## ------------------------------------------ ##
20575## Report this to the AC_PACKAGE_NAME lists. ##
20576## ------------------------------------------ ##
19650fd6
AS
20577_ASBOX
20578 ) |
20579 sed "s/^/$as_me: WARNING: /" >&2
20580 ;;
c0d27fcc
MR
20581esac
20582echo "$as_me:$LINENO: checking for $ac_header" >&5
20583echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20584if eval "test \"\${$as_ac_Header+set}\" = set"; then
20585 echo $ECHO_N "(cached) $ECHO_C" >&6
20586else
edfaf76d 20587 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 20588fi
c0d27fcc 20589echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 20590echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
20591
20592fi
503d2be0 20593if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 20594 cat >>confdefs.h <<_ACEOF
503d2be0 20595#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 20596_ACEOF
503d2be0 20597
a21616bd 20598fi
c0d27fcc 20599
a21616bd
KR
20600done
20601
20602fi
c0d27fcc 20603
a21616bd
KR
20604done
20605
20606fi
c0d27fcc 20607
a21616bd
KR
20608done
20609
20610 fi
503d2be0
AS
20611
20612for ac_header in com_err.h
a21616bd 20613do
503d2be0 20614as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
20615if eval "test \"\${$as_ac_Header+set}\" = set"; then
20616 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
20617echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20618if eval "test \"\${$as_ac_Header+set}\" = set"; then
20619 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
20620fi
20621echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
20622echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 20623else
c0d27fcc
MR
20624 # Is the header compilable?
20625echo "$as_me:$LINENO: checking $ac_header usability" >&5
20626echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
20627cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20628/* confdefs.h. */
20629_ACEOF
20630cat confdefs.h >>conftest.$ac_ext
20631cat >>conftest.$ac_ext <<_ACEOF
20632/* end confdefs.h. */
c0d27fcc
MR
20633$ac_includes_default
20634#include <$ac_header>
20635_ACEOF
20636rm -f conftest.$ac_objext
20637if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d
LK
20638 (eval $ac_compile) 2>conftest.er1
20639 ac_status=$?
20640 grep -v '^ *+' conftest.er1 >conftest.err
20641 rm -f conftest.er1
20642 cat conftest.err >&5
20643 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20644 (exit $ac_status); } &&
e143ad11
AS
20645 { ac_try='test -z "$ac_c_werror_flag"
20646 || test ! -s conftest.err'
edfaf76d
LK
20647 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20648 (eval $ac_try) 2>&5
35996d22
AS
20649 ac_status=$?
20650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
edfaf76d
LK
20651 (exit $ac_status); }; } &&
20652 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
20653 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20654 (eval $ac_try) 2>&5
20655 ac_status=$?
20656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20657 (exit $ac_status); }; }; then
20658 ac_header_compiler=yes
20659else
20660 echo "$as_me: failed program was:" >&5
19650fd6
AS
20661sed 's/^/| /' conftest.$ac_ext >&5
20662
c0d27fcc
MR
20663ac_header_compiler=no
20664fi
edfaf76d 20665rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
20666echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20667echo "${ECHO_T}$ac_header_compiler" >&6
20668
20669# Is the header present?
20670echo "$as_me:$LINENO: checking $ac_header presence" >&5
20671echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
20672cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20673/* confdefs.h. */
20674_ACEOF
20675cat confdefs.h >>conftest.$ac_ext
20676cat >>conftest.$ac_ext <<_ACEOF
20677/* end confdefs.h. */
503d2be0
AS
20678#include <$ac_header>
20679_ACEOF
c0d27fcc 20680if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
20681 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20682 ac_status=$?
6bae0ccf 20683 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
20684 rm -f conftest.er1
20685 cat conftest.err >&5
c0d27fcc 20686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
20687 (exit $ac_status); } >/dev/null; then
20688 if test -s conftest.err; then
20689 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 20690 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
20691 else
20692 ac_cpp_err=
20693 fi
20694else
20695 ac_cpp_err=yes
20696fi
20697if test -z "$ac_cpp_err"; then
c0d27fcc 20698 ac_header_preproc=yes
503d2be0
AS
20699else
20700 echo "$as_me: failed program was:" >&5
19650fd6
AS
20701sed 's/^/| /' conftest.$ac_ext >&5
20702
c0d27fcc 20703 ac_header_preproc=no
a21616bd 20704fi
503d2be0 20705rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
20706echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20707echo "${ECHO_T}$ac_header_preproc" >&6
20708
20709# So? What about this header?
edfaf76d
LK
20710case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20711 yes:no: )
c0d27fcc
MR
20712 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
20713echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
20714 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
20715echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
20716 ac_header_preproc=yes
19650fd6 20717 ;;
edfaf76d 20718 no:yes:* )
c0d27fcc
MR
20719 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
20720echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
20721 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
20722echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
20723 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
20724echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
20725 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
20726echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 20727 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 20728echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
20729 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
20730echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
20731 (
20732 cat <<\_ASBOX
edfaf76d
LK
20733## ------------------------------------------ ##
20734## Report this to the AC_PACKAGE_NAME lists. ##
20735## ------------------------------------------ ##
19650fd6
AS
20736_ASBOX
20737 ) |
20738 sed "s/^/$as_me: WARNING: /" >&2
20739 ;;
c0d27fcc
MR
20740esac
20741echo "$as_me:$LINENO: checking for $ac_header" >&5
20742echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20743if eval "test \"\${$as_ac_Header+set}\" = set"; then
20744 echo $ECHO_N "(cached) $ECHO_C" >&6
20745else
edfaf76d 20746 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 20747fi
c0d27fcc 20748echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 20749echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
20750
20751fi
503d2be0 20752if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 20753 cat >>confdefs.h <<_ACEOF
503d2be0 20754#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 20755_ACEOF
503d2be0 20756
a21616bd 20757fi
c0d27fcc 20758
a21616bd
KR
20759done
20760
20761fi
20762
ba4481b5
DL
20763# Solaris requires -lintl if you want strerror (which calls dgettext)
20764# to return localized messages.
503d2be0 20765
c0d27fcc 20766echo "$as_me:$LINENO: checking for dgettext in -lintl" >&5
503d2be0
AS
20767echo $ECHO_N "checking for dgettext in -lintl... $ECHO_C" >&6
20768if test "${ac_cv_lib_intl_dgettext+set}" = set; then
20769 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 20770else
503d2be0 20771 ac_check_lib_save_LIBS=$LIBS
ba4481b5 20772LIBS="-lintl $LIBS"
503d2be0 20773cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20774/* confdefs.h. */
20775_ACEOF
20776cat confdefs.h >>conftest.$ac_ext
20777cat >>conftest.$ac_ext <<_ACEOF
20778/* end confdefs.h. */
503d2be0 20779
ba4481b5 20780/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
20781#ifdef __cplusplus
20782extern "C"
20783#endif
ba4481b5 20784/* We use char because int might match the return type of a gcc2
503d2be0
AS
20785 builtin and then its argument prototype would still apply. */
20786char dgettext ();
20787int
20788main ()
20789{
20790dgettext ();
20791 ;
20792 return 0;
20793}
20794_ACEOF
20795rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 20796if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 20797 (eval $ac_link) 2>conftest.er1
503d2be0 20798 ac_status=$?
edfaf76d
LK
20799 grep -v '^ *+' conftest.er1 >conftest.err
20800 rm -f conftest.er1
20801 cat conftest.err >&5
c0d27fcc 20802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 20803 (exit $ac_status); } &&
e143ad11
AS
20804 { ac_try='test -z "$ac_c_werror_flag"
20805 || test ! -s conftest.err'
edfaf76d
LK
20806 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20807 (eval $ac_try) 2>&5
20808 ac_status=$?
20809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20810 (exit $ac_status); }; } &&
20811 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 20812 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
20813 (eval $ac_try) 2>&5
20814 ac_status=$?
c0d27fcc 20815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
20816 (exit $ac_status); }; }; then
20817 ac_cv_lib_intl_dgettext=yes
20818else
20819 echo "$as_me: failed program was:" >&5
19650fd6
AS
20820sed 's/^/| /' conftest.$ac_ext >&5
20821
503d2be0
AS
20822ac_cv_lib_intl_dgettext=no
20823fi
edfaf76d
LK
20824rm -f conftest.err conftest.$ac_objext \
20825 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20826LIBS=$ac_check_lib_save_LIBS
20827fi
c0d27fcc 20828echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dgettext" >&5
503d2be0
AS
20829echo "${ECHO_T}$ac_cv_lib_intl_dgettext" >&6
20830if test $ac_cv_lib_intl_dgettext = yes; then
c0d27fcc 20831 cat >>confdefs.h <<_ACEOF
503d2be0 20832#define HAVE_LIBINTL 1
c0d27fcc 20833_ACEOF
ba4481b5
DL
20834
20835 LIBS="-lintl $LIBS"
20836
ba4481b5
DL
20837fi
20838
c0d27fcc
MR
20839
20840echo "$as_me:$LINENO: checking whether localtime caches TZ" >&5
503d2be0
AS
20841echo $ECHO_N "checking whether localtime caches TZ... $ECHO_C" >&6
20842if test "${emacs_cv_localtime_cache+set}" = set; then
20843 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
20844else
20845 if test x$ac_cv_func_tzset = xyes; then
20846if test "$cross_compiling" = yes; then
20847 # If we have tzset, assume the worst when cross-compiling.
20848emacs_cv_localtime_cache=yes
20849else
503d2be0 20850 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20851/* confdefs.h. */
20852_ACEOF
20853cat confdefs.h >>conftest.$ac_ext
20854cat >>conftest.$ac_ext <<_ACEOF
20855/* end confdefs.h. */
ba4481b5 20856#include <time.h>
ba4481b5
DL
20857extern char **environ;
20858unset_TZ ()
20859{
20860 char **from, **to;
20861 for (to = from = environ; (*to = *from); from++)
20862 if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
20863 to++;
20864}
20865char TZ_GMT0[] = "TZ=GMT0";
20866char TZ_PST8[] = "TZ=PST8";
20867main()
20868{
20869 time_t now = time ((time_t *) 0);
20870 int hour_GMT0, hour_unset;
20871 if (putenv (TZ_GMT0) != 0)
20872 exit (1);
20873 hour_GMT0 = localtime (&now)->tm_hour;
20874 unset_TZ ();
20875 hour_unset = localtime (&now)->tm_hour;
20876 if (putenv (TZ_PST8) != 0)
20877 exit (1);
20878 if (localtime (&now)->tm_hour == hour_GMT0)
20879 exit (1);
20880 unset_TZ ();
20881 if (localtime (&now)->tm_hour != hour_unset)
20882 exit (1);
20883 exit (0);
20884}
503d2be0
AS
20885_ACEOF
20886rm -f conftest$ac_exeext
c0d27fcc 20887if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
20888 (eval $ac_link) 2>&5
20889 ac_status=$?
c0d27fcc 20890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 20891 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 20892 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
20893 (eval $ac_try) 2>&5
20894 ac_status=$?
c0d27fcc 20895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 20896 (exit $ac_status); }; }; then
ba4481b5
DL
20897 emacs_cv_localtime_cache=no
20898else
503d2be0
AS
20899 echo "$as_me: program exited with status $ac_status" >&5
20900echo "$as_me: failed program was:" >&5
19650fd6
AS
20901sed 's/^/| /' conftest.$ac_ext >&5
20902
c0d27fcc 20903( exit $ac_status )
503d2be0 20904emacs_cv_localtime_cache=yes
ba4481b5 20905fi
edfaf76d 20906rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 20907fi
ba4481b5
DL
20908else
20909 # If we lack tzset, report that localtime does not cache TZ,
20910 # since we can't invalidate the cache if we don't have tzset.
20911 emacs_cv_localtime_cache=no
20912fi
20913fi
c0d27fcc 20914echo "$as_me:$LINENO: result: $emacs_cv_localtime_cache" >&5
503d2be0 20915echo "${ECHO_T}$emacs_cv_localtime_cache" >&6
ba4481b5 20916if test $emacs_cv_localtime_cache = yes; then
b936fae4 20917
c0d27fcc 20918cat >>confdefs.h <<\_ACEOF
ba4481b5 20919#define LOCALTIME_CACHE 1
c0d27fcc 20920_ACEOF
ba4481b5
DL
20921
20922fi
20923
20924if test "x$HAVE_TIMEVAL" = xyes; then
503d2be0
AS
20925
20926for ac_func in gettimeofday
48d4b120 20927do
503d2be0 20928as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 20929echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
20930echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20931if eval "test \"\${$as_ac_var+set}\" = set"; then
20932 echo $ECHO_N "(cached) $ECHO_C" >&6
48d4b120 20933else
503d2be0 20934 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20935/* confdefs.h. */
20936_ACEOF
20937cat confdefs.h >>conftest.$ac_ext
20938cat >>conftest.$ac_ext <<_ACEOF
20939/* end confdefs.h. */
edfaf76d
LK
20940/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20941 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20942#define $ac_func innocuous_$ac_func
20943
48d4b120 20944/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
20945 which can conflict with char $ac_func (); below.
20946 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20947 <limits.h> exists even on freestanding compilers. */
edfaf76d 20948
19650fd6
AS
20949#ifdef __STDC__
20950# include <limits.h>
20951#else
20952# include <assert.h>
20953#endif
edfaf76d
LK
20954
20955#undef $ac_func
20956
48d4b120 20957/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
20958#ifdef __cplusplus
20959extern "C"
19650fd6 20960{
503d2be0 20961#endif
48d4b120 20962/* We use char because int might match the return type of a gcc2
503d2be0
AS
20963 builtin and then its argument prototype would still apply. */
20964char $ac_func ();
48d4b120
DL
20965/* The GNU C library defines this for functions which it implements
20966 to always fail with ENOSYS. Some functions are actually named
20967 something starting with __ and the normal name is an alias. */
20968#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
20969choke me
20970#else
19650fd6
AS
20971char (*f) () = $ac_func;
20972#endif
20973#ifdef __cplusplus
20974}
cd958eb3
MB
20975#endif
20976
19650fd6
AS
20977int
20978main ()
20979{
20980return f != $ac_func;
503d2be0
AS
20981 ;
20982 return 0;
20983}
20984_ACEOF
20985rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 20986if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 20987 (eval $ac_link) 2>conftest.er1
503d2be0 20988 ac_status=$?
edfaf76d
LK
20989 grep -v '^ *+' conftest.er1 >conftest.err
20990 rm -f conftest.er1
20991 cat conftest.err >&5
c0d27fcc 20992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 20993 (exit $ac_status); } &&
e143ad11
AS
20994 { ac_try='test -z "$ac_c_werror_flag"
20995 || test ! -s conftest.err'
edfaf76d
LK
20996 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20997 (eval $ac_try) 2>&5
20998 ac_status=$?
20999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21000 (exit $ac_status); }; } &&
21001 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 21002 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
21003 (eval $ac_try) 2>&5
21004 ac_status=$?
c0d27fcc 21005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
21006 (exit $ac_status); }; }; then
21007 eval "$as_ac_var=yes"
21008else
21009 echo "$as_me: failed program was:" >&5
19650fd6
AS
21010sed 's/^/| /' conftest.$ac_ext >&5
21011
503d2be0
AS
21012eval "$as_ac_var=no"
21013fi
edfaf76d
LK
21014rm -f conftest.err conftest.$ac_objext \
21015 conftest$ac_exeext conftest.$ac_ext
503d2be0 21016fi
c0d27fcc 21017echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
21018echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
21019if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 21020 cat >>confdefs.h <<_ACEOF
503d2be0 21021#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 21022_ACEOF
48d4b120 21023
48d4b120
DL
21024fi
21025done
21026
b936fae4 21027 if test $ac_cv_func_gettimeofday = yes; then
c0d27fcc 21028 echo "$as_me:$LINENO: checking whether gettimeofday can accept two arguments" >&5
503d2be0
AS
21029echo $ECHO_N "checking whether gettimeofday can accept two arguments... $ECHO_C" >&6
21030if test "${emacs_cv_gettimeofday_two_arguments+set}" = set; then
21031 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 21032else
503d2be0 21033 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21034/* confdefs.h. */
21035_ACEOF
21036cat confdefs.h >>conftest.$ac_ext
21037cat >>conftest.$ac_ext <<_ACEOF
21038/* end confdefs.h. */
ba4481b5 21039
a3f08d9e
DL
21040#ifdef TIME_WITH_SYS_TIME
21041#include <sys/time.h>
21042#include <time.h>
21043#else
21044#ifdef HAVE_SYS_TIME_H
21045#include <sys/time.h>
21046#else
21047#include <time.h>
21048#endif
21049#endif
503d2be0
AS
21050int
21051main ()
21052{
a3f08d9e 21053struct timeval time;
b936fae4 21054 gettimeofday (&time, 0);
503d2be0
AS
21055 ;
21056 return 0;
21057}
21058_ACEOF
21059rm -f conftest.$ac_objext
c0d27fcc 21060if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 21061 (eval $ac_compile) 2>conftest.er1
503d2be0 21062 ac_status=$?
edfaf76d
LK
21063 grep -v '^ *+' conftest.er1 >conftest.err
21064 rm -f conftest.er1
21065 cat conftest.err >&5
c0d27fcc 21066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21067 (exit $ac_status); } &&
e143ad11
AS
21068 { ac_try='test -z "$ac_c_werror_flag"
21069 || test ! -s conftest.err'
edfaf76d
LK
21070 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21071 (eval $ac_try) 2>&5
21072 ac_status=$?
21073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21074 (exit $ac_status); }; } &&
21075 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 21076 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
21077 (eval $ac_try) 2>&5
21078 ac_status=$?
c0d27fcc 21079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21080 (exit $ac_status); }; }; then
ba4481b5
DL
21081 emacs_cv_gettimeofday_two_arguments=yes
21082else
503d2be0 21083 echo "$as_me: failed program was:" >&5
19650fd6
AS
21084sed 's/^/| /' conftest.$ac_ext >&5
21085
503d2be0 21086emacs_cv_gettimeofday_two_arguments=no
ba4481b5 21087fi
edfaf76d 21088rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 21089fi
c0d27fcc 21090echo "$as_me:$LINENO: result: $emacs_cv_gettimeofday_two_arguments" >&5
503d2be0 21091echo "${ECHO_T}$emacs_cv_gettimeofday_two_arguments" >&6
b936fae4
AS
21092 if test $emacs_cv_gettimeofday_two_arguments = no; then
21093
c0d27fcc 21094cat >>confdefs.h <<\_ACEOF
ba4481b5 21095#define GETTIMEOFDAY_ONE_ARGUMENT 1
c0d27fcc 21096_ACEOF
ba4481b5 21097
b936fae4 21098 fi
ba4481b5
DL
21099 fi
21100fi
21101
973a76b1
DL
21102# This defines (or not) HAVE_TZNAME and HAVE_TM_ZONE.
21103echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
21104echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
21105if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
21106 echo $ECHO_N "(cached) $ECHO_C" >&6
21107else
21108 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21109/* confdefs.h. */
21110_ACEOF
21111cat confdefs.h >>conftest.$ac_ext
21112cat >>conftest.$ac_ext <<_ACEOF
21113/* end confdefs.h. */
973a76b1
DL
21114#include <sys/types.h>
21115#include <$ac_cv_struct_tm>
21116
21117
21118int
21119main ()
21120{
21121static struct tm ac_aggr;
21122if (ac_aggr.tm_zone)
21123return 0;
21124 ;
21125 return 0;
21126}
21127_ACEOF
21128rm -f conftest.$ac_objext
21129if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 21130 (eval $ac_compile) 2>conftest.er1
973a76b1 21131 ac_status=$?
edfaf76d
LK
21132 grep -v '^ *+' conftest.er1 >conftest.err
21133 rm -f conftest.er1
21134 cat conftest.err >&5
973a76b1
DL
21135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21136 (exit $ac_status); } &&
e143ad11
AS
21137 { ac_try='test -z "$ac_c_werror_flag"
21138 || test ! -s conftest.err'
edfaf76d
LK
21139 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21140 (eval $ac_try) 2>&5
21141 ac_status=$?
21142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21143 (exit $ac_status); }; } &&
21144 { ac_try='test -s conftest.$ac_objext'
973a76b1
DL
21145 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21146 (eval $ac_try) 2>&5
21147 ac_status=$?
21148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21149 (exit $ac_status); }; }; then
21150 ac_cv_member_struct_tm_tm_zone=yes
21151else
21152 echo "$as_me: failed program was:" >&5
19650fd6
AS
21153sed 's/^/| /' conftest.$ac_ext >&5
21154
973a76b1 21155cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21156/* confdefs.h. */
21157_ACEOF
21158cat confdefs.h >>conftest.$ac_ext
21159cat >>conftest.$ac_ext <<_ACEOF
21160/* end confdefs.h. */
973a76b1
DL
21161#include <sys/types.h>
21162#include <$ac_cv_struct_tm>
21163
21164
21165int
21166main ()
21167{
21168static struct tm ac_aggr;
21169if (sizeof ac_aggr.tm_zone)
21170return 0;
21171 ;
21172 return 0;
21173}
21174_ACEOF
21175rm -f conftest.$ac_objext
21176if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 21177 (eval $ac_compile) 2>conftest.er1
973a76b1 21178 ac_status=$?
edfaf76d
LK
21179 grep -v '^ *+' conftest.er1 >conftest.err
21180 rm -f conftest.er1
21181 cat conftest.err >&5
973a76b1
DL
21182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21183 (exit $ac_status); } &&
e143ad11
AS
21184 { ac_try='test -z "$ac_c_werror_flag"
21185 || test ! -s conftest.err'
edfaf76d
LK
21186 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21187 (eval $ac_try) 2>&5
21188 ac_status=$?
21189 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21190 (exit $ac_status); }; } &&
21191 { ac_try='test -s conftest.$ac_objext'
973a76b1
DL
21192 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21193 (eval $ac_try) 2>&5
21194 ac_status=$?
21195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21196 (exit $ac_status); }; }; then
21197 ac_cv_member_struct_tm_tm_zone=yes
21198else
21199 echo "$as_me: failed program was:" >&5
19650fd6
AS
21200sed 's/^/| /' conftest.$ac_ext >&5
21201
973a76b1
DL
21202ac_cv_member_struct_tm_tm_zone=no
21203fi
edfaf76d 21204rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
973a76b1 21205fi
edfaf76d 21206rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
973a76b1
DL
21207fi
21208echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
21209echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
21210if test $ac_cv_member_struct_tm_tm_zone = yes; then
21211
21212cat >>confdefs.h <<_ACEOF
21213#define HAVE_STRUCT_TM_TM_ZONE 1
21214_ACEOF
21215
21216
21217fi
21218
21219if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
21220
21221cat >>confdefs.h <<\_ACEOF
21222#define HAVE_TM_ZONE 1
21223_ACEOF
21224
21225else
21226 echo "$as_me:$LINENO: checking for tzname" >&5
21227echo $ECHO_N "checking for tzname... $ECHO_C" >&6
21228if test "${ac_cv_var_tzname+set}" = set; then
21229 echo $ECHO_N "(cached) $ECHO_C" >&6
21230else
21231 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21232/* confdefs.h. */
21233_ACEOF
21234cat confdefs.h >>conftest.$ac_ext
21235cat >>conftest.$ac_ext <<_ACEOF
21236/* end confdefs.h. */
973a76b1
DL
21237#include <time.h>
21238#ifndef tzname /* For SGI. */
21239extern char *tzname[]; /* RS6000 and others reject char **tzname. */
21240#endif
21241
21242int
21243main ()
21244{
21245atoi(*tzname);
21246 ;
21247 return 0;
21248}
21249_ACEOF
21250rm -f conftest.$ac_objext conftest$ac_exeext
21251if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 21252 (eval $ac_link) 2>conftest.er1
973a76b1 21253 ac_status=$?
edfaf76d
LK
21254 grep -v '^ *+' conftest.er1 >conftest.err
21255 rm -f conftest.er1
21256 cat conftest.err >&5
973a76b1
DL
21257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21258 (exit $ac_status); } &&
e143ad11
AS
21259 { ac_try='test -z "$ac_c_werror_flag"
21260 || test ! -s conftest.err'
edfaf76d
LK
21261 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21262 (eval $ac_try) 2>&5
21263 ac_status=$?
21264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21265 (exit $ac_status); }; } &&
21266 { ac_try='test -s conftest$ac_exeext'
973a76b1
DL
21267 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21268 (eval $ac_try) 2>&5
21269 ac_status=$?
21270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21271 (exit $ac_status); }; }; then
21272 ac_cv_var_tzname=yes
21273else
21274 echo "$as_me: failed program was:" >&5
19650fd6
AS
21275sed 's/^/| /' conftest.$ac_ext >&5
21276
973a76b1
DL
21277ac_cv_var_tzname=no
21278fi
edfaf76d
LK
21279rm -f conftest.err conftest.$ac_objext \
21280 conftest$ac_exeext conftest.$ac_ext
973a76b1
DL
21281fi
21282echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
21283echo "${ECHO_T}$ac_cv_var_tzname" >&6
21284 if test $ac_cv_var_tzname = yes; then
21285
21286cat >>confdefs.h <<\_ACEOF
21287#define HAVE_TZNAME 1
21288_ACEOF
21289
21290 fi
21291fi
21292
21293
48d4b120 21294if test "$ac_cv_func_gettimeofday" = yes; then
c0d27fcc 21295 echo "$as_me:$LINENO: checking for struct timezone" >&5
503d2be0
AS
21296echo $ECHO_N "checking for struct timezone... $ECHO_C" >&6
21297if test "${emacs_cv_struct_timezone+set}" = set; then
21298 echo $ECHO_N "(cached) $ECHO_C" >&6
48d4b120 21299else
503d2be0 21300 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21301/* confdefs.h. */
21302_ACEOF
21303cat confdefs.h >>conftest.$ac_ext
21304cat >>conftest.$ac_ext <<_ACEOF
21305/* end confdefs.h. */
48d4b120 21306#include <sys/time.h>
503d2be0
AS
21307int
21308main ()
21309{
48d4b120 21310struct timezone tz;
503d2be0
AS
21311 ;
21312 return 0;
21313}
21314_ACEOF
21315rm -f conftest.$ac_objext
c0d27fcc 21316if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 21317 (eval $ac_compile) 2>conftest.er1
503d2be0 21318 ac_status=$?
edfaf76d
LK
21319 grep -v '^ *+' conftest.er1 >conftest.err
21320 rm -f conftest.er1
21321 cat conftest.err >&5
c0d27fcc 21322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21323 (exit $ac_status); } &&
e143ad11
AS
21324 { ac_try='test -z "$ac_c_werror_flag"
21325 || test ! -s conftest.err'
edfaf76d
LK
21326 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21327 (eval $ac_try) 2>&5
21328 ac_status=$?
21329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21330 (exit $ac_status); }; } &&
21331 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 21332 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
21333 (eval $ac_try) 2>&5
21334 ac_status=$?
c0d27fcc 21335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21336 (exit $ac_status); }; }; then
48d4b120
DL
21337 if test "$cross_compiling" = yes; then
21338 emacs_cv_struct_timezone=yes
21339else
503d2be0 21340 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21341/* confdefs.h. */
21342_ACEOF
21343cat confdefs.h >>conftest.$ac_ext
21344cat >>conftest.$ac_ext <<_ACEOF
21345/* end confdefs.h. */
48d4b120
DL
21346
21347#ifdef TIME_WITH_SYS_TIME
21348#include <sys/time.h>
21349#include <time.h>
21350#else
21351#ifdef HAVE_SYS_TIME_H
21352#include <sys/time.h>
21353#else
21354#include <time.h>
21355#endif
21356#endif
21357main () {
21358 struct timeval time;
21359 struct timezone dummy;
21360 exit (gettimeofday (&time, &dummy));
21361}
503d2be0
AS
21362_ACEOF
21363rm -f conftest$ac_exeext
c0d27fcc 21364if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
21365 (eval $ac_link) 2>&5
21366 ac_status=$?
c0d27fcc 21367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21368 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 21369 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
21370 (eval $ac_try) 2>&5
21371 ac_status=$?
c0d27fcc 21372 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21373 (exit $ac_status); }; }; then
48d4b120
DL
21374 emacs_cv_struct_timezone=yes
21375else
503d2be0
AS
21376 echo "$as_me: program exited with status $ac_status" >&5
21377echo "$as_me: failed program was:" >&5
19650fd6
AS
21378sed 's/^/| /' conftest.$ac_ext >&5
21379
c0d27fcc 21380( exit $ac_status )
503d2be0 21381emacs_cv_struct_timezone=no
48d4b120 21382fi
edfaf76d 21383rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
48d4b120 21384fi
48d4b120 21385else
503d2be0 21386 echo "$as_me: failed program was:" >&5
19650fd6
AS
21387sed 's/^/| /' conftest.$ac_ext >&5
21388
503d2be0 21389emacs_cv_struct_timezone=no
48d4b120 21390fi
edfaf76d 21391rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
48d4b120 21392fi
c0d27fcc 21393echo "$as_me:$LINENO: result: $emacs_cv_struct_timezone" >&5
503d2be0 21394echo "${ECHO_T}$emacs_cv_struct_timezone" >&6
48d4b120
DL
21395fi
21396
ba4481b5 21397ok_so_far=yes
c0d27fcc 21398echo "$as_me:$LINENO: checking for socket" >&5
503d2be0
AS
21399echo $ECHO_N "checking for socket... $ECHO_C" >&6
21400if test "${ac_cv_func_socket+set}" = set; then
21401 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 21402else
503d2be0 21403 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21404/* confdefs.h. */
21405_ACEOF
21406cat confdefs.h >>conftest.$ac_ext
21407cat >>conftest.$ac_ext <<_ACEOF
21408/* end confdefs.h. */
edfaf76d
LK
21409/* Define socket to an innocuous variant, in case <limits.h> declares socket.
21410 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21411#define socket innocuous_socket
21412
ba4481b5 21413/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
21414 which can conflict with char socket (); below.
21415 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
21416 <limits.h> exists even on freestanding compilers. */
edfaf76d 21417
19650fd6
AS
21418#ifdef __STDC__
21419# include <limits.h>
21420#else
21421# include <assert.h>
21422#endif
edfaf76d
LK
21423
21424#undef socket
21425
ba4481b5 21426/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
21427#ifdef __cplusplus
21428extern "C"
19650fd6 21429{
503d2be0 21430#endif
ba4481b5 21431/* We use char because int might match the return type of a gcc2
503d2be0
AS
21432 builtin and then its argument prototype would still apply. */
21433char socket ();
ba4481b5
DL
21434/* The GNU C library defines this for functions which it implements
21435 to always fail with ENOSYS. Some functions are actually named
21436 something starting with __ and the normal name is an alias. */
21437#if defined (__stub_socket) || defined (__stub___socket)
21438choke me
21439#else
19650fd6
AS
21440char (*f) () = socket;
21441#endif
21442#ifdef __cplusplus
21443}
cd958eb3
MB
21444#endif
21445
19650fd6
AS
21446int
21447main ()
21448{
21449return f != socket;
503d2be0
AS
21450 ;
21451 return 0;
21452}
21453_ACEOF
21454rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 21455if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 21456 (eval $ac_link) 2>conftest.er1
503d2be0 21457 ac_status=$?
edfaf76d
LK
21458 grep -v '^ *+' conftest.er1 >conftest.err
21459 rm -f conftest.er1
21460 cat conftest.err >&5
c0d27fcc 21461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21462 (exit $ac_status); } &&
e143ad11
AS
21463 { ac_try='test -z "$ac_c_werror_flag"
21464 || test ! -s conftest.err'
edfaf76d
LK
21465 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21466 (eval $ac_try) 2>&5
21467 ac_status=$?
21468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21469 (exit $ac_status); }; } &&
21470 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 21471 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
21472 (eval $ac_try) 2>&5
21473 ac_status=$?
c0d27fcc 21474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
21475 (exit $ac_status); }; }; then
21476 ac_cv_func_socket=yes
21477else
21478 echo "$as_me: failed program was:" >&5
19650fd6
AS
21479sed 's/^/| /' conftest.$ac_ext >&5
21480
503d2be0
AS
21481ac_cv_func_socket=no
21482fi
edfaf76d
LK
21483rm -f conftest.err conftest.$ac_objext \
21484 conftest$ac_exeext conftest.$ac_ext
503d2be0 21485fi
c0d27fcc 21486echo "$as_me:$LINENO: result: $ac_cv_func_socket" >&5
503d2be0
AS
21487echo "${ECHO_T}$ac_cv_func_socket" >&6
21488if test $ac_cv_func_socket = yes; then
ba4481b5
DL
21489 :
21490else
503d2be0 21491 ok_so_far=no
ba4481b5
DL
21492fi
21493
21494if test $ok_so_far = yes; then
c0d27fcc
MR
21495 if test "${ac_cv_header_netinet_in_h+set}" = set; then
21496 echo "$as_me:$LINENO: checking for netinet/in.h" >&5
503d2be0
AS
21497echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6
21498if test "${ac_cv_header_netinet_in_h+set}" = set; then
21499 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
21500fi
21501echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5
21502echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6
98418dba 21503else
c0d27fcc
MR
21504 # Is the header compilable?
21505echo "$as_me:$LINENO: checking netinet/in.h usability" >&5
21506echo $ECHO_N "checking netinet/in.h usability... $ECHO_C" >&6
21507cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21508/* confdefs.h. */
21509_ACEOF
21510cat confdefs.h >>conftest.$ac_ext
21511cat >>conftest.$ac_ext <<_ACEOF
21512/* end confdefs.h. */
c0d27fcc
MR
21513$ac_includes_default
21514#include <netinet/in.h>
21515_ACEOF
21516rm -f conftest.$ac_objext
21517if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 21518 (eval $ac_compile) 2>conftest.er1
c0d27fcc 21519 ac_status=$?
edfaf76d
LK
21520 grep -v '^ *+' conftest.er1 >conftest.err
21521 rm -f conftest.er1
21522 cat conftest.err >&5
c0d27fcc
MR
21523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21524 (exit $ac_status); } &&
e143ad11
AS
21525 { ac_try='test -z "$ac_c_werror_flag"
21526 || test ! -s conftest.err'
edfaf76d
LK
21527 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21528 (eval $ac_try) 2>&5
21529 ac_status=$?
21530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21531 (exit $ac_status); }; } &&
21532 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
21533 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21534 (eval $ac_try) 2>&5
21535 ac_status=$?
21536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21537 (exit $ac_status); }; }; then
21538 ac_header_compiler=yes
21539else
21540 echo "$as_me: failed program was:" >&5
19650fd6
AS
21541sed 's/^/| /' conftest.$ac_ext >&5
21542
c0d27fcc
MR
21543ac_header_compiler=no
21544fi
edfaf76d 21545rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
21546echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21547echo "${ECHO_T}$ac_header_compiler" >&6
21548
21549# Is the header present?
21550echo "$as_me:$LINENO: checking netinet/in.h presence" >&5
21551echo $ECHO_N "checking netinet/in.h presence... $ECHO_C" >&6
21552cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21553/* confdefs.h. */
21554_ACEOF
21555cat confdefs.h >>conftest.$ac_ext
21556cat >>conftest.$ac_ext <<_ACEOF
21557/* end confdefs.h. */
ba4481b5 21558#include <netinet/in.h>
503d2be0 21559_ACEOF
c0d27fcc 21560if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
21561 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21562 ac_status=$?
6bae0ccf 21563 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21564 rm -f conftest.er1
21565 cat conftest.err >&5
c0d27fcc 21566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
21567 (exit $ac_status); } >/dev/null; then
21568 if test -s conftest.err; then
21569 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 21570 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
21571 else
21572 ac_cpp_err=
21573 fi
21574else
21575 ac_cpp_err=yes
21576fi
21577if test -z "$ac_cpp_err"; then
c0d27fcc 21578 ac_header_preproc=yes
ba4481b5 21579else
503d2be0 21580 echo "$as_me: failed program was:" >&5
19650fd6
AS
21581sed 's/^/| /' conftest.$ac_ext >&5
21582
c0d27fcc 21583 ac_header_preproc=no
ba4481b5 21584fi
503d2be0 21585rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
21586echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21587echo "${ECHO_T}$ac_header_preproc" >&6
21588
21589# So? What about this header?
edfaf76d
LK
21590case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21591 yes:no: )
c0d27fcc
MR
21592 { echo "$as_me:$LINENO: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&5
21593echo "$as_me: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21594 { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the compiler's result" >&5
21595echo "$as_me: WARNING: netinet/in.h: proceeding with the compiler's result" >&2;}
21596 ac_header_preproc=yes
19650fd6 21597 ;;
edfaf76d 21598 no:yes:* )
c0d27fcc
MR
21599 { echo "$as_me:$LINENO: WARNING: netinet/in.h: present but cannot be compiled" >&5
21600echo "$as_me: WARNING: netinet/in.h: present but cannot be compiled" >&2;}
edfaf76d
LK
21601 { echo "$as_me:$LINENO: WARNING: netinet/in.h: check for missing prerequisite headers?" >&5
21602echo "$as_me: WARNING: netinet/in.h: check for missing prerequisite headers?" >&2;}
21603 { echo "$as_me:$LINENO: WARNING: netinet/in.h: see the Autoconf documentation" >&5
21604echo "$as_me: WARNING: netinet/in.h: see the Autoconf documentation" >&2;}
21605 { echo "$as_me:$LINENO: WARNING: netinet/in.h: section \"Present But Cannot Be Compiled\"" >&5
21606echo "$as_me: WARNING: netinet/in.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21607 { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&5
19650fd6 21608echo "$as_me: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21609 { echo "$as_me:$LINENO: WARNING: netinet/in.h: in the future, the compiler will take precedence" >&5
21610echo "$as_me: WARNING: netinet/in.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
21611 (
21612 cat <<\_ASBOX
edfaf76d
LK
21613## ------------------------------------------ ##
21614## Report this to the AC_PACKAGE_NAME lists. ##
21615## ------------------------------------------ ##
19650fd6
AS
21616_ASBOX
21617 ) |
21618 sed "s/^/$as_me: WARNING: /" >&2
21619 ;;
c0d27fcc
MR
21620esac
21621echo "$as_me:$LINENO: checking for netinet/in.h" >&5
21622echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6
21623if test "${ac_cv_header_netinet_in_h+set}" = set; then
21624 echo $ECHO_N "(cached) $ECHO_C" >&6
21625else
21626 ac_cv_header_netinet_in_h=$ac_header_preproc
ba4481b5 21627fi
c0d27fcc 21628echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5
503d2be0 21629echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6
c0d27fcc
MR
21630
21631fi
503d2be0 21632if test $ac_cv_header_netinet_in_h = yes; then
ba4481b5
DL
21633 :
21634else
503d2be0 21635 ok_so_far=no
ba4481b5
DL
21636fi
21637
c0d27fcc 21638
ba4481b5
DL
21639fi
21640if test $ok_so_far = yes; then
c0d27fcc
MR
21641 if test "${ac_cv_header_arpa_inet_h+set}" = set; then
21642 echo "$as_me:$LINENO: checking for arpa/inet.h" >&5
503d2be0
AS
21643echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6
21644if test "${ac_cv_header_arpa_inet_h+set}" = set; then
21645 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
21646fi
21647echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5
21648echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6
98418dba 21649else
c0d27fcc
MR
21650 # Is the header compilable?
21651echo "$as_me:$LINENO: checking arpa/inet.h usability" >&5
21652echo $ECHO_N "checking arpa/inet.h usability... $ECHO_C" >&6
21653cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21654/* confdefs.h. */
21655_ACEOF
21656cat confdefs.h >>conftest.$ac_ext
21657cat >>conftest.$ac_ext <<_ACEOF
21658/* end confdefs.h. */
c0d27fcc
MR
21659$ac_includes_default
21660#include <arpa/inet.h>
21661_ACEOF
21662rm -f conftest.$ac_objext
21663if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 21664 (eval $ac_compile) 2>conftest.er1
c0d27fcc 21665 ac_status=$?
edfaf76d
LK
21666 grep -v '^ *+' conftest.er1 >conftest.err
21667 rm -f conftest.er1
21668 cat conftest.err >&5
c0d27fcc
MR
21669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21670 (exit $ac_status); } &&
e143ad11
AS
21671 { ac_try='test -z "$ac_c_werror_flag"
21672 || test ! -s conftest.err'
edfaf76d
LK
21673 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21674 (eval $ac_try) 2>&5
21675 ac_status=$?
21676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21677 (exit $ac_status); }; } &&
21678 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
21679 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21680 (eval $ac_try) 2>&5
21681 ac_status=$?
21682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21683 (exit $ac_status); }; }; then
21684 ac_header_compiler=yes
21685else
21686 echo "$as_me: failed program was:" >&5
19650fd6
AS
21687sed 's/^/| /' conftest.$ac_ext >&5
21688
c0d27fcc
MR
21689ac_header_compiler=no
21690fi
edfaf76d 21691rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
21692echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21693echo "${ECHO_T}$ac_header_compiler" >&6
21694
21695# Is the header present?
21696echo "$as_me:$LINENO: checking arpa/inet.h presence" >&5
21697echo $ECHO_N "checking arpa/inet.h presence... $ECHO_C" >&6
21698cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21699/* confdefs.h. */
21700_ACEOF
21701cat confdefs.h >>conftest.$ac_ext
21702cat >>conftest.$ac_ext <<_ACEOF
21703/* end confdefs.h. */
ba4481b5 21704#include <arpa/inet.h>
503d2be0 21705_ACEOF
c0d27fcc 21706if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
21707 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21708 ac_status=$?
6bae0ccf 21709 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21710 rm -f conftest.er1
21711 cat conftest.err >&5
c0d27fcc 21712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
21713 (exit $ac_status); } >/dev/null; then
21714 if test -s conftest.err; then
21715 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 21716 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
21717 else
21718 ac_cpp_err=
21719 fi
21720else
21721 ac_cpp_err=yes
21722fi
21723if test -z "$ac_cpp_err"; then
c0d27fcc 21724 ac_header_preproc=yes
ba4481b5 21725else
503d2be0 21726 echo "$as_me: failed program was:" >&5
19650fd6
AS
21727sed 's/^/| /' conftest.$ac_ext >&5
21728
c0d27fcc 21729 ac_header_preproc=no
ba4481b5 21730fi
503d2be0 21731rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
21732echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21733echo "${ECHO_T}$ac_header_preproc" >&6
21734
21735# So? What about this header?
edfaf76d
LK
21736case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21737 yes:no: )
c0d27fcc
MR
21738 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&5
21739echo "$as_me: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21740 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the compiler's result" >&5
21741echo "$as_me: WARNING: arpa/inet.h: proceeding with the compiler's result" >&2;}
21742 ac_header_preproc=yes
19650fd6 21743 ;;
edfaf76d 21744 no:yes:* )
c0d27fcc
MR
21745 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: present but cannot be compiled" >&5
21746echo "$as_me: WARNING: arpa/inet.h: present but cannot be compiled" >&2;}
edfaf76d
LK
21747 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: check for missing prerequisite headers?" >&5
21748echo "$as_me: WARNING: arpa/inet.h: check for missing prerequisite headers?" >&2;}
21749 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: see the Autoconf documentation" >&5
21750echo "$as_me: WARNING: arpa/inet.h: see the Autoconf documentation" >&2;}
21751 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: section \"Present But Cannot Be Compiled\"" >&5
21752echo "$as_me: WARNING: arpa/inet.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21753 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&5
19650fd6 21754echo "$as_me: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21755 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: in the future, the compiler will take precedence" >&5
21756echo "$as_me: WARNING: arpa/inet.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
21757 (
21758 cat <<\_ASBOX
edfaf76d
LK
21759## ------------------------------------------ ##
21760## Report this to the AC_PACKAGE_NAME lists. ##
21761## ------------------------------------------ ##
19650fd6
AS
21762_ASBOX
21763 ) |
21764 sed "s/^/$as_me: WARNING: /" >&2
21765 ;;
c0d27fcc
MR
21766esac
21767echo "$as_me:$LINENO: checking for arpa/inet.h" >&5
21768echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6
21769if test "${ac_cv_header_arpa_inet_h+set}" = set; then
21770 echo $ECHO_N "(cached) $ECHO_C" >&6
21771else
21772 ac_cv_header_arpa_inet_h=$ac_header_preproc
ba4481b5 21773fi
c0d27fcc 21774echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5
503d2be0 21775echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6
c0d27fcc
MR
21776
21777fi
503d2be0 21778if test $ac_cv_header_arpa_inet_h = yes; then
ba4481b5
DL
21779 :
21780else
503d2be0 21781 ok_so_far=no
ba4481b5
DL
21782fi
21783
c0d27fcc 21784
ba4481b5
DL
21785fi
21786if test $ok_so_far = yes; then
b936fae4 21787
c0d27fcc 21788cat >>confdefs.h <<\_ACEOF
ba4481b5 21789#define HAVE_INET_SOCKETS 1
c0d27fcc 21790_ACEOF
ba4481b5
DL
21791
21792fi
21793
2d2b6695 21794
7862d3a8 21795for ac_header in sys/ioctl.h
2d2b6695
KS
21796do
21797as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
21798if eval "test \"\${$as_ac_Header+set}\" = set"; then
21799 echo "$as_me:$LINENO: checking for $ac_header" >&5
21800echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21801if eval "test \"\${$as_ac_Header+set}\" = set"; then
21802 echo $ECHO_N "(cached) $ECHO_C" >&6
21803fi
21804echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
21805echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
21806else
21807 # Is the header compilable?
21808echo "$as_me:$LINENO: checking $ac_header usability" >&5
21809echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
21810cat >conftest.$ac_ext <<_ACEOF
2d2b6695
KS
21811/* confdefs.h. */
21812_ACEOF
21813cat confdefs.h >>conftest.$ac_ext
21814cat >>conftest.$ac_ext <<_ACEOF
21815/* end confdefs.h. */
21816$ac_includes_default
21817#include <$ac_header>
21818_ACEOF
21819rm -f conftest.$ac_objext
21820if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 21821 (eval $ac_compile) 2>conftest.er1
2d2b6695 21822 ac_status=$?
edfaf76d
LK
21823 grep -v '^ *+' conftest.er1 >conftest.err
21824 rm -f conftest.er1
21825 cat conftest.err >&5
2d2b6695
KS
21826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21827 (exit $ac_status); } &&
e143ad11
AS
21828 { ac_try='test -z "$ac_c_werror_flag"
21829 || test ! -s conftest.err'
edfaf76d
LK
21830 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21831 (eval $ac_try) 2>&5
21832 ac_status=$?
21833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21834 (exit $ac_status); }; } &&
21835 { ac_try='test -s conftest.$ac_objext'
2d2b6695
KS
21836 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21837 (eval $ac_try) 2>&5
21838 ac_status=$?
21839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21840 (exit $ac_status); }; }; then
21841 ac_header_compiler=yes
21842else
21843 echo "$as_me: failed program was:" >&5
21844sed 's/^/| /' conftest.$ac_ext >&5
21845
21846ac_header_compiler=no
21847fi
edfaf76d 21848rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2d2b6695
KS
21849echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21850echo "${ECHO_T}$ac_header_compiler" >&6
21851
21852# Is the header present?
21853echo "$as_me:$LINENO: checking $ac_header presence" >&5
21854echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
21855cat >conftest.$ac_ext <<_ACEOF
2d2b6695
KS
21856/* confdefs.h. */
21857_ACEOF
21858cat confdefs.h >>conftest.$ac_ext
21859cat >>conftest.$ac_ext <<_ACEOF
21860/* end confdefs.h. */
21861#include <$ac_header>
21862_ACEOF
21863if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
21864 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21865 ac_status=$?
21866 grep -v '^ *+' conftest.er1 >conftest.err
21867 rm -f conftest.er1
21868 cat conftest.err >&5
21869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21870 (exit $ac_status); } >/dev/null; then
21871 if test -s conftest.err; then
21872 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 21873 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2d2b6695
KS
21874 else
21875 ac_cpp_err=
21876 fi
21877else
21878 ac_cpp_err=yes
21879fi
21880if test -z "$ac_cpp_err"; then
21881 ac_header_preproc=yes
21882else
21883 echo "$as_me: failed program was:" >&5
21884sed 's/^/| /' conftest.$ac_ext >&5
21885
21886 ac_header_preproc=no
21887fi
21888rm -f conftest.err conftest.$ac_ext
21889echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21890echo "${ECHO_T}$ac_header_preproc" >&6
21891
21892# So? What about this header?
edfaf76d
LK
21893case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21894 yes:no: )
2d2b6695
KS
21895 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21896echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21897 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21898echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21899 ac_header_preproc=yes
2d2b6695 21900 ;;
edfaf76d 21901 no:yes:* )
2d2b6695
KS
21902 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21903echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21904 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21905echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21906 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21907echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21908 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21909echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
2d2b6695
KS
21910 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
21911echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21912 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21913echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
2d2b6695
KS
21914 (
21915 cat <<\_ASBOX
edfaf76d
LK
21916## ------------------------------------------ ##
21917## Report this to the AC_PACKAGE_NAME lists. ##
21918## ------------------------------------------ ##
2d2b6695
KS
21919_ASBOX
21920 ) |
21921 sed "s/^/$as_me: WARNING: /" >&2
21922 ;;
21923esac
21924echo "$as_me:$LINENO: checking for $ac_header" >&5
21925echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21926if eval "test \"\${$as_ac_Header+set}\" = set"; then
21927 echo $ECHO_N "(cached) $ECHO_C" >&6
21928else
edfaf76d 21929 eval "$as_ac_Header=\$ac_header_preproc"
2d2b6695
KS
21930fi
21931echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
21932echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
21933
21934fi
21935if test `eval echo '${'$as_ac_Header'}'` = yes; then
21936 cat >>confdefs.h <<_ACEOF
21937#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
21938_ACEOF
21939
21940fi
21941
21942done
21943
21944
ba4481b5 21945if test -f /usr/lpp/X11/bin/smt.exp; then
b936fae4 21946
c0d27fcc 21947cat >>confdefs.h <<\_ACEOF
ba4481b5 21948#define HAVE_AIX_SMT_EXP 1
c0d27fcc 21949_ACEOF
ba4481b5
DL
21950
21951fi
21952
c0d27fcc 21953echo "$as_me:$LINENO: checking whether system supports dynamic ptys" >&5
503d2be0 21954echo $ECHO_N "checking whether system supports dynamic ptys... $ECHO_C" >&6
3d9fec71 21955if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then
c0d27fcc 21956 echo "$as_me:$LINENO: result: yes" >&5
503d2be0 21957echo "${ECHO_T}yes" >&6
b936fae4 21958
c0d27fcc 21959cat >>confdefs.h <<\_ACEOF
3d9fec71 21960#define HAVE_DEV_PTMX 1
c0d27fcc 21961_ACEOF
3d9fec71
DL
21962
21963else
c0d27fcc 21964 echo "$as_me:$LINENO: result: no" >&5
503d2be0 21965echo "${ECHO_T}no" >&6
3d9fec71
DL
21966fi
21967
c0d27fcc 21968echo "$as_me:$LINENO: checking for pid_t" >&5
503d2be0
AS
21969echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
21970if test "${ac_cv_type_pid_t+set}" = set; then
21971 echo $ECHO_N "(cached) $ECHO_C" >&6
647847ea 21972else
503d2be0 21973 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21974/* confdefs.h. */
21975_ACEOF
21976cat confdefs.h >>conftest.$ac_ext
21977cat >>conftest.$ac_ext <<_ACEOF
21978/* end confdefs.h. */
503d2be0
AS
21979$ac_includes_default
21980int
21981main ()
21982{
21983if ((pid_t *) 0)
21984 return 0;
21985if (sizeof (pid_t))
21986 return 0;
21987 ;
21988 return 0;
21989}
21990_ACEOF
21991rm -f conftest.$ac_objext
c0d27fcc 21992if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 21993 (eval $ac_compile) 2>conftest.er1
503d2be0 21994 ac_status=$?
edfaf76d
LK
21995 grep -v '^ *+' conftest.er1 >conftest.err
21996 rm -f conftest.er1
21997 cat conftest.err >&5
c0d27fcc 21998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21999 (exit $ac_status); } &&
e143ad11
AS
22000 { ac_try='test -z "$ac_c_werror_flag"
22001 || test ! -s conftest.err'
edfaf76d
LK
22002 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22003 (eval $ac_try) 2>&5
22004 ac_status=$?
22005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22006 (exit $ac_status); }; } &&
22007 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 22008 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
22009 (eval $ac_try) 2>&5
22010 ac_status=$?
c0d27fcc 22011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 22012 (exit $ac_status); }; }; then
647847ea
DL
22013 ac_cv_type_pid_t=yes
22014else
503d2be0 22015 echo "$as_me: failed program was:" >&5
19650fd6
AS
22016sed 's/^/| /' conftest.$ac_ext >&5
22017
503d2be0 22018ac_cv_type_pid_t=no
647847ea 22019fi
edfaf76d 22020rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
647847ea 22021fi
c0d27fcc 22022echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
503d2be0
AS
22023echo "${ECHO_T}$ac_cv_type_pid_t" >&6
22024if test $ac_cv_type_pid_t = yes; then
22025 :
22026else
22027
c0d27fcc 22028cat >>confdefs.h <<_ACEOF
647847ea 22029#define pid_t int
c0d27fcc 22030_ACEOF
647847ea
DL
22031
22032fi
22033
c0d27fcc
MR
22034
22035
503d2be0
AS
22036for ac_header in unistd.h vfork.h
22037do
22038as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
22039if eval "test \"\${$as_ac_Header+set}\" = set"; then
22040 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
22041echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22042if eval "test \"\${$as_ac_Header+set}\" = set"; then
22043 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
22044fi
22045echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
22046echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 22047else
c0d27fcc
MR
22048 # Is the header compilable?
22049echo "$as_me:$LINENO: checking $ac_header usability" >&5
22050echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
22051cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22052/* confdefs.h. */
22053_ACEOF
22054cat confdefs.h >>conftest.$ac_ext
22055cat >>conftest.$ac_ext <<_ACEOF
22056/* end confdefs.h. */
c0d27fcc
MR
22057$ac_includes_default
22058#include <$ac_header>
22059_ACEOF
22060rm -f conftest.$ac_objext
22061if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 22062 (eval $ac_compile) 2>conftest.er1
c0d27fcc 22063 ac_status=$?
edfaf76d
LK
22064 grep -v '^ *+' conftest.er1 >conftest.err
22065 rm -f conftest.er1
22066 cat conftest.err >&5
c0d27fcc
MR
22067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22068 (exit $ac_status); } &&
e143ad11
AS
22069 { ac_try='test -z "$ac_c_werror_flag"
22070 || test ! -s conftest.err'
edfaf76d
LK
22071 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22072 (eval $ac_try) 2>&5
22073 ac_status=$?
22074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22075 (exit $ac_status); }; } &&
22076 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
22077 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22078 (eval $ac_try) 2>&5
22079 ac_status=$?
22080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22081 (exit $ac_status); }; }; then
22082 ac_header_compiler=yes
22083else
22084 echo "$as_me: failed program was:" >&5
19650fd6
AS
22085sed 's/^/| /' conftest.$ac_ext >&5
22086
c0d27fcc
MR
22087ac_header_compiler=no
22088fi
edfaf76d 22089rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
22090echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22091echo "${ECHO_T}$ac_header_compiler" >&6
22092
22093# Is the header present?
22094echo "$as_me:$LINENO: checking $ac_header presence" >&5
22095echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
22096cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22097/* confdefs.h. */
22098_ACEOF
22099cat confdefs.h >>conftest.$ac_ext
22100cat >>conftest.$ac_ext <<_ACEOF
22101/* end confdefs.h. */
503d2be0
AS
22102#include <$ac_header>
22103_ACEOF
c0d27fcc 22104if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
22105 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22106 ac_status=$?
6bae0ccf 22107 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
22108 rm -f conftest.er1
22109 cat conftest.err >&5
c0d27fcc 22110 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
22111 (exit $ac_status); } >/dev/null; then
22112 if test -s conftest.err; then
22113 ac_cpp_err=$ac_c_preproc_warn_flag
edfaf76d 22114 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
22115 else
22116 ac_cpp_err=
22117 fi
647847ea 22118else
503d2be0
AS
22119 ac_cpp_err=yes
22120fi
22121if test -z "$ac_cpp_err"; then
c0d27fcc 22122 ac_header_preproc=yes
647847ea 22123else
503d2be0 22124 echo "$as_me: failed program was:" >&5
19650fd6
AS
22125sed 's/^/| /' conftest.$ac_ext >&5
22126
c0d27fcc 22127 ac_header_preproc=no
647847ea 22128fi
503d2be0 22129rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
22130echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22131echo "${ECHO_T}$ac_header_preproc" >&6
22132
22133# So? What about this header?
edfaf76d
LK
22134case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22135 yes:no: )
c0d27fcc
MR
22136 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
22137echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
22138 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
22139echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
22140 ac_header_preproc=yes
19650fd6 22141 ;;
edfaf76d 22142 no:yes:* )
c0d27fcc
MR
22143 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
22144echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
22145 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
22146echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
22147 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
22148echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
22149 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
22150echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 22151 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 22152echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
22153 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
22154echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
22155 (
22156 cat <<\_ASBOX
edfaf76d
LK
22157## ------------------------------------------ ##
22158## Report this to the AC_PACKAGE_NAME lists. ##
22159## ------------------------------------------ ##
19650fd6
AS
22160_ASBOX
22161 ) |
22162 sed "s/^/$as_me: WARNING: /" >&2
22163 ;;
c0d27fcc
MR
22164esac
22165echo "$as_me:$LINENO: checking for $ac_header" >&5
22166echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22167if eval "test \"\${$as_ac_Header+set}\" = set"; then
22168 echo $ECHO_N "(cached) $ECHO_C" >&6
22169else
edfaf76d 22170 eval "$as_ac_Header=\$ac_header_preproc"
647847ea 22171fi
c0d27fcc 22172echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 22173echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
22174
22175fi
503d2be0 22176if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 22177 cat >>confdefs.h <<_ACEOF
503d2be0 22178#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 22179_ACEOF
647847ea 22180
73b77ee5 22181fi
c0d27fcc 22182
503d2be0 22183done
73b77ee5 22184
c0d27fcc
MR
22185
22186
503d2be0
AS
22187for ac_func in fork vfork
22188do
22189as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 22190echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
22191echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
22192if eval "test \"\${$as_ac_var+set}\" = set"; then
22193 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 22194else
503d2be0 22195 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22196/* confdefs.h. */
22197_ACEOF
22198cat confdefs.h >>conftest.$ac_ext
22199cat >>conftest.$ac_ext <<_ACEOF
22200/* end confdefs.h. */
edfaf76d
LK
22201/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22202 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22203#define $ac_func innocuous_$ac_func
22204
fa0b693c 22205/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
22206 which can conflict with char $ac_func (); below.
22207 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22208 <limits.h> exists even on freestanding compilers. */
edfaf76d 22209
19650fd6
AS
22210#ifdef __STDC__
22211# include <limits.h>
22212#else
22213# include <assert.h>
22214#endif
edfaf76d
LK
22215
22216#undef $ac_func
22217
fa0b693c 22218/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
22219#ifdef __cplusplus
22220extern "C"
19650fd6 22221{
503d2be0 22222#endif
fa0b693c 22223/* We use char because int might match the return type of a gcc2
503d2be0
AS
22224 builtin and then its argument prototype would still apply. */
22225char $ac_func ();
fa0b693c
GM
22226/* The GNU C library defines this for functions which it implements
22227 to always fail with ENOSYS. Some functions are actually named
22228 something starting with __ and the normal name is an alias. */
503d2be0 22229#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
fa0b693c
GM
22230choke me
22231#else
19650fd6
AS
22232char (*f) () = $ac_func;
22233#endif
22234#ifdef __cplusplus
22235}
fa0b693c
GM
22236#endif
22237
19650fd6
AS
22238int
22239main ()
22240{
22241return f != $ac_func;
503d2be0
AS
22242 ;
22243 return 0;
22244}
22245_ACEOF
22246rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 22247if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 22248 (eval $ac_link) 2>conftest.er1
503d2be0 22249 ac_status=$?
edfaf76d
LK
22250 grep -v '^ *+' conftest.er1 >conftest.err
22251 rm -f conftest.er1
22252 cat conftest.err >&5
c0d27fcc 22253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 22254 (exit $ac_status); } &&
e143ad11
AS
22255 { ac_try='test -z "$ac_c_werror_flag"
22256 || test ! -s conftest.err'
edfaf76d
LK
22257 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22258 (eval $ac_try) 2>&5
22259 ac_status=$?
22260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22261 (exit $ac_status); }; } &&
22262 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 22263 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
22264 (eval $ac_try) 2>&5
22265 ac_status=$?
c0d27fcc 22266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
22267 (exit $ac_status); }; }; then
22268 eval "$as_ac_var=yes"
22269else
22270 echo "$as_me: failed program was:" >&5
19650fd6
AS
22271sed 's/^/| /' conftest.$ac_ext >&5
22272
503d2be0
AS
22273eval "$as_ac_var=no"
22274fi
edfaf76d
LK
22275rm -f conftest.err conftest.$ac_objext \
22276 conftest$ac_exeext conftest.$ac_ext
503d2be0 22277fi
c0d27fcc 22278echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
22279echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
22280if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 22281 cat >>confdefs.h <<_ACEOF
503d2be0 22282#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 22283_ACEOF
503d2be0 22284
fa0b693c 22285fi
503d2be0 22286done
fa0b693c 22287
503d2be0 22288if test "x$ac_cv_func_fork" = xyes; then
c0d27fcc 22289 echo "$as_me:$LINENO: checking for working fork" >&5
503d2be0
AS
22290echo $ECHO_N "checking for working fork... $ECHO_C" >&6
22291if test "${ac_cv_func_fork_works+set}" = set; then
22292 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 22293else
503d2be0
AS
22294 if test "$cross_compiling" = yes; then
22295 ac_cv_func_fork_works=cross
22296else
22297 cat >conftest.$ac_ext <<_ACEOF
01abe918
CY
22298/* By Ruediger Kuhlmann. */
22299 #include <sys/types.h>
22300 #if HAVE_UNISTD_H
22301 # include <unistd.h>
22302 #endif
22303 /* Some systems only have a dummy stub for fork() */
22304 int main ()
22305 {
22306 if (fork() < 0)
22307 exit (1);
22308 exit (0);
22309 }
503d2be0
AS
22310_ACEOF
22311rm -f conftest$ac_exeext
c0d27fcc 22312if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
22313 (eval $ac_link) 2>&5
22314 ac_status=$?
c0d27fcc 22315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 22316 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 22317 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
22318 (eval $ac_try) 2>&5
22319 ac_status=$?
c0d27fcc 22320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
22321 (exit $ac_status); }; }; then
22322 ac_cv_func_fork_works=yes
22323else
22324 echo "$as_me: program exited with status $ac_status" >&5
22325echo "$as_me: failed program was:" >&5
19650fd6
AS
22326sed 's/^/| /' conftest.$ac_ext >&5
22327
c0d27fcc 22328( exit $ac_status )
503d2be0
AS
22329ac_cv_func_fork_works=no
22330fi
edfaf76d 22331rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
22332fi
22333fi
c0d27fcc 22334echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
503d2be0
AS
22335echo "${ECHO_T}$ac_cv_func_fork_works" >&6
22336
6bae0ccf
DL
22337else
22338 ac_cv_func_fork_works=$ac_cv_func_fork
503d2be0
AS
22339fi
22340if test "x$ac_cv_func_fork_works" = xcross; then
22341 case $host in
22342 *-*-amigaos* | *-*-msdosdjgpp*)
22343 # Override, as these systems have only a dummy fork() stub
22344 ac_cv_func_fork_works=no
22345 ;;
22346 *)
22347 ac_cv_func_fork_works=yes
22348 ;;
22349 esac
c0d27fcc
MR
22350 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
22351echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
fa0b693c 22352fi
73b77ee5 22353ac_cv_func_vfork_works=$ac_cv_func_vfork
503d2be0 22354if test "x$ac_cv_func_vfork" = xyes; then
c0d27fcc 22355 echo "$as_me:$LINENO: checking for working vfork" >&5
503d2be0
AS
22356echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
22357if test "${ac_cv_func_vfork_works+set}" = set; then
22358 echo $ECHO_N "(cached) $ECHO_C" >&6
22359else
22360 if test "$cross_compiling" = yes; then
22361 ac_cv_func_vfork_works=cross
fa0b693c 22362else
503d2be0 22363 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22364/* confdefs.h. */
22365_ACEOF
22366cat confdefs.h >>conftest.$ac_ext
22367cat >>conftest.$ac_ext <<_ACEOF
22368/* end confdefs.h. */
73b77ee5
GM
22369/* Thanks to Paul Eggert for this test. */
22370#include <stdio.h>
19650fd6 22371#include <stdlib.h>
fa0b693c 22372#include <sys/types.h>
73b77ee5 22373#include <sys/stat.h>
19650fd6 22374#include <sys/wait.h>
503d2be0
AS
22375#if HAVE_UNISTD_H
22376# include <unistd.h>
73b77ee5 22377#endif
503d2be0
AS
22378#if HAVE_VFORK_H
22379# include <vfork.h>
73b77ee5
GM
22380#endif
22381/* On some sparc systems, changes by the child to local and incoming
503d2be0
AS
22382 argument registers are propagated back to the parent. The compiler
22383 is told about this with #include <vfork.h>, but some compilers
22384 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
22385 static variable whose address is put into a register that is
22386 clobbered by the vfork. */
19650fd6 22387static void
fa0b693c 22388#ifdef __cplusplus
73b77ee5 22389sparc_address_test (int arg)
503d2be0 22390# else
73b77ee5 22391sparc_address_test (arg) int arg;
fa0b693c 22392#endif
fa0b693c 22393{
73b77ee5
GM
22394 static pid_t child;
22395 if (!child) {
22396 child = vfork ();
22397 if (child < 0) {
22398 perror ("vfork");
22399 _exit(2);
22400 }
22401 if (!child) {
22402 arg = getpid();
22403 write(-1, "", 0);
22404 _exit (arg);
22405 }
22406 }
22407}
503d2be0
AS
22408
22409int
22410main ()
22411{
73b77ee5
GM
22412 pid_t parent = getpid ();
22413 pid_t child;
fa0b693c 22414
19650fd6 22415 sparc_address_test (0);
fa0b693c 22416
73b77ee5 22417 child = vfork ();
fa0b693c 22418
73b77ee5 22419 if (child == 0) {
503d2be0
AS
22420 /* Here is another test for sparc vfork register problems. This
22421 test uses lots of local variables, at least as many local
22422 variables as main has allocated so far including compiler
22423 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
22424 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
22425 reuse the register of parent for one of the local variables,
22426 since it will think that parent can't possibly be used any more
22427 in this routine. Assigning to the local variable will thus
22428 munge parent in the parent process. */
73b77ee5
GM
22429 pid_t
22430 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
22431 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
22432 /* Convince the compiler that p..p7 are live; otherwise, it might
22433 use the same hardware register for all 8 local variables. */
22434 if (p != p1 || p != p2 || p != p3 || p != p4
22435 || p != p5 || p != p6 || p != p7)
22436 _exit(1);
fa0b693c 22437
503d2be0
AS
22438 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
22439 from child file descriptors. If the child closes a descriptor
22440 before it execs or exits, this munges the parent's descriptor
22441 as well. Test for this by closing stdout in the child. */
73b77ee5
GM
22442 _exit(close(fileno(stdout)) != 0);
22443 } else {
22444 int status;
22445 struct stat st;
22446
22447 while (wait(&status) != child)
22448 ;
22449 exit(
22450 /* Was there some problem with vforking? */
22451 child < 0
22452
22453 /* Did the child fail? (This shouldn't happen.) */
22454 || status
22455
22456 /* Did the vfork/compiler bug occur? */
22457 || parent != getpid()
fa0b693c 22458
73b77ee5
GM
22459 /* Did the file descriptor bug occur? */
22460 || fstat(fileno(stdout), &st) != 0
22461 );
22462 }
22463}
503d2be0
AS
22464_ACEOF
22465rm -f conftest$ac_exeext
c0d27fcc 22466if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
22467 (eval $ac_link) 2>&5
22468 ac_status=$?
c0d27fcc 22469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 22470 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 22471 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
22472 (eval $ac_try) 2>&5
22473 ac_status=$?
c0d27fcc 22474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 22475 (exit $ac_status); }; }; then
73b77ee5 22476 ac_cv_func_vfork_works=yes
fa0b693c 22477else
503d2be0
AS
22478 echo "$as_me: program exited with status $ac_status" >&5
22479echo "$as_me: failed program was:" >&5
19650fd6
AS
22480sed 's/^/| /' conftest.$ac_ext >&5
22481
c0d27fcc 22482( exit $ac_status )
503d2be0
AS
22483ac_cv_func_vfork_works=no
22484fi
edfaf76d 22485rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fa0b693c 22486fi
fa0b693c 22487fi
c0d27fcc 22488echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
503d2be0 22489echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
fa0b693c 22490
503d2be0
AS
22491fi;
22492if test "x$ac_cv_func_fork_works" = xcross; then
edfaf76d 22493 ac_cv_func_vfork_works=$ac_cv_func_vfork
c0d27fcc
MR
22494 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
22495echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
fa0b693c
GM
22496fi
22497
503d2be0
AS
22498if test "x$ac_cv_func_vfork_works" = xyes; then
22499
c0d27fcc 22500cat >>confdefs.h <<\_ACEOF
503d2be0 22501#define HAVE_WORKING_VFORK 1
c0d27fcc 22502_ACEOF
503d2be0
AS
22503
22504else
22505
c0d27fcc 22506cat >>confdefs.h <<\_ACEOF
73b77ee5 22507#define vfork fork
c0d27fcc 22508_ACEOF
fa0b693c
GM
22509
22510fi
503d2be0
AS
22511if test "x$ac_cv_func_fork_works" = xyes; then
22512
c0d27fcc 22513cat >>confdefs.h <<\_ACEOF
503d2be0 22514#define HAVE_WORKING_FORK 1
c0d27fcc 22515_ACEOF
fa0b693c 22516
503d2be0 22517fi
647847ea 22518
c0d27fcc 22519
6a3a24fa
JD
22520echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5
22521echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
22522if test "${emacs_cv_langinfo_codeset+set}" = set; then
22523 echo $ECHO_N "(cached) $ECHO_C" >&6
22524else
22525 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22526/* confdefs.h. */
22527_ACEOF
22528cat confdefs.h >>conftest.$ac_ext
22529cat >>conftest.$ac_ext <<_ACEOF
22530/* end confdefs.h. */
6a3a24fa
JD
22531#include <langinfo.h>
22532int
22533main ()
22534{
22535char* cs = nl_langinfo(CODESET);
22536 ;
22537 return 0;
22538}
22539_ACEOF
22540rm -f conftest.$ac_objext conftest$ac_exeext
22541if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
edfaf76d 22542 (eval $ac_link) 2>conftest.er1
6a3a24fa 22543 ac_status=$?
edfaf76d
LK
22544 grep -v '^ *+' conftest.er1 >conftest.err
22545 rm -f conftest.er1
22546 cat conftest.err >&5
6a3a24fa
JD
22547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22548 (exit $ac_status); } &&
e143ad11
AS
22549 { ac_try='test -z "$ac_c_werror_flag"
22550 || test ! -s conftest.err'
edfaf76d
LK
22551 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22552 (eval $ac_try) 2>&5
22553 ac_status=$?
22554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22555 (exit $ac_status); }; } &&
22556 { ac_try='test -s conftest$ac_exeext'
6a3a24fa
JD
22557 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22558 (eval $ac_try) 2>&5
22559 ac_status=$?
22560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22561 (exit $ac_status); }; }; then
22562 emacs_cv_langinfo_codeset=yes
22563else
22564 echo "$as_me: failed program was:" >&5
19650fd6
AS
22565sed 's/^/| /' conftest.$ac_ext >&5
22566
6a3a24fa
JD
22567emacs_cv_langinfo_codeset=no
22568fi
edfaf76d
LK
22569rm -f conftest.err conftest.$ac_objext \
22570 conftest$ac_exeext conftest.$ac_ext
6a3a24fa
JD
22571
22572fi
22573echo "$as_me:$LINENO: result: $emacs_cv_langinfo_codeset" >&5
22574echo "${ECHO_T}$emacs_cv_langinfo_codeset" >&6
22575if test $emacs_cv_langinfo_codeset = yes; then
22576
22577cat >>confdefs.h <<\_ACEOF
22578#define HAVE_LANGINFO_CODESET 1
22579_ACEOF
22580
22581fi
22582
c0d27fcc 22583echo "$as_me:$LINENO: checking for size_t" >&5
503d2be0
AS
22584echo $ECHO_N "checking for size_t... $ECHO_C" >&6
22585if test "${ac_cv_type_size_t+set}" = set; then
22586 echo $ECHO_N "(cached) $ECHO_C" >&6
8730a8da 22587else
503d2be0 22588 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22589/* confdefs.h. */
22590_ACEOF
22591cat confdefs.h >>conftest.$ac_ext
22592cat >>conftest.$ac_ext <<_ACEOF
22593/* end confdefs.h. */
503d2be0
AS
22594$ac_includes_default
22595int
22596main ()
22597{
22598if ((size_t *) 0)
22599 return 0;
22600if (sizeof (size_t))
22601 return 0;
22602 ;
22603 return 0;
22604}
22605_ACEOF
22606rm -f conftest.$ac_objext
c0d27fcc 22607if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 22608 (eval $ac_compile) 2>conftest.er1
503d2be0 22609 ac_status=$?
edfaf76d
LK
22610 grep -v '^ *+' conftest.er1 >conftest.err
22611 rm -f conftest.er1
22612 cat conftest.err >&5
c0d27fcc 22613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 22614 (exit $ac_status); } &&
e143ad11
AS
22615 { ac_try='test -z "$ac_c_werror_flag"
22616 || test ! -s conftest.err'
edfaf76d
LK
22617 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22618 (eval $ac_try) 2>&5
22619 ac_status=$?
22620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22621 (exit $ac_status); }; } &&
22622 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 22623 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
22624 (eval $ac_try) 2>&5
22625 ac_status=$?
c0d27fcc 22626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 22627 (exit $ac_status); }; }; then
8730a8da
DL
22628 ac_cv_type_size_t=yes
22629else
503d2be0 22630 echo "$as_me: failed program was:" >&5
19650fd6
AS
22631sed 's/^/| /' conftest.$ac_ext >&5
22632
503d2be0 22633ac_cv_type_size_t=no
8730a8da 22634fi
edfaf76d 22635rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8730a8da 22636fi
c0d27fcc 22637echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
503d2be0
AS
22638echo "${ECHO_T}$ac_cv_type_size_t" >&6
22639if test $ac_cv_type_size_t = yes; then
503d2be0 22640
c0d27fcc
MR
22641cat >>confdefs.h <<_ACEOF
22642#define HAVE_SIZE_T 1
22643_ACEOF
22644
8730a8da
DL
22645
22646fi
22647
c0d27fcc 22648
973a76b1
DL
22649echo "$as_me:$LINENO: checking for mbstate_t" >&5
22650echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6
22651if test "${ac_cv_type_mbstate_t+set}" = set; then
22652 echo $ECHO_N "(cached) $ECHO_C" >&6
22653else
22654 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22655/* confdefs.h. */
22656_ACEOF
22657cat confdefs.h >>conftest.$ac_ext
22658cat >>conftest.$ac_ext <<_ACEOF
22659/* end confdefs.h. */
973a76b1
DL
22660$ac_includes_default
22661# include <wchar.h>
22662int
22663main ()
22664{
22665mbstate_t x; return sizeof x;
22666 ;
22667 return 0;
22668}
22669_ACEOF
22670rm -f conftest.$ac_objext
22671if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 22672 (eval $ac_compile) 2>conftest.er1
973a76b1 22673 ac_status=$?
edfaf76d
LK
22674 grep -v '^ *+' conftest.er1 >conftest.err
22675 rm -f conftest.er1
22676 cat conftest.err >&5
973a76b1
DL
22677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22678 (exit $ac_status); } &&
e143ad11
AS
22679 { ac_try='test -z "$ac_c_werror_flag"
22680 || test ! -s conftest.err'
edfaf76d
LK
22681 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22682 (eval $ac_try) 2>&5
22683 ac_status=$?
22684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22685 (exit $ac_status); }; } &&
22686 { ac_try='test -s conftest.$ac_objext'
973a76b1
DL
22687 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22688 (eval $ac_try) 2>&5
22689 ac_status=$?
22690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22691 (exit $ac_status); }; }; then
22692 ac_cv_type_mbstate_t=yes
22693else
22694 echo "$as_me: failed program was:" >&5
19650fd6
AS
22695sed 's/^/| /' conftest.$ac_ext >&5
22696
973a76b1
DL
22697ac_cv_type_mbstate_t=no
22698fi
edfaf76d 22699rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
973a76b1
DL
22700fi
22701echo "$as_me:$LINENO: result: $ac_cv_type_mbstate_t" >&5
22702echo "${ECHO_T}$ac_cv_type_mbstate_t" >&6
22703 if test $ac_cv_type_mbstate_t = yes; then
22704
22705cat >>confdefs.h <<\_ACEOF
22706#define HAVE_MBSTATE_T 1
22707_ACEOF
22708
22709 else
22710
22711cat >>confdefs.h <<\_ACEOF
22712#define mbstate_t int
22713_ACEOF
22714
22715 fi
22716
22044edf
DL
22717echo "$as_me:$LINENO: checking for C restrict keyword" >&5
22718echo $ECHO_N "checking for C restrict keyword... $ECHO_C" >&6
22719if test "${emacs_cv_c_restrict+set}" = set; then
22720 echo $ECHO_N "(cached) $ECHO_C" >&6
22721else
22722 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22723/* confdefs.h. */
22724_ACEOF
22725cat confdefs.h >>conftest.$ac_ext
22726cat >>conftest.$ac_ext <<_ACEOF
22727/* end confdefs.h. */
22044edf
DL
22728void fred (int *restrict x);
22729int
22730main ()
22731{
b936fae4 22732
22044edf
DL
22733 ;
22734 return 0;
22735}
c0d27fcc 22736_ACEOF
22044edf
DL
22737rm -f conftest.$ac_objext
22738if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 22739 (eval $ac_compile) 2>conftest.er1
22044edf 22740 ac_status=$?
edfaf76d
LK
22741 grep -v '^ *+' conftest.er1 >conftest.err
22742 rm -f conftest.er1
22743 cat conftest.err >&5
22044edf
DL
22744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22745 (exit $ac_status); } &&
e143ad11
AS
22746 { ac_try='test -z "$ac_c_werror_flag"
22747 || test ! -s conftest.err'
edfaf76d
LK
22748 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22749 (eval $ac_try) 2>&5
22750 ac_status=$?
22751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22752 (exit $ac_status); }; } &&
22753 { ac_try='test -s conftest.$ac_objext'
22044edf
DL
22754 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22755 (eval $ac_try) 2>&5
22756 ac_status=$?
22757 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22758 (exit $ac_status); }; }; then
22759 emacs_cv_c_restrict=yes
22760else
22761 echo "$as_me: failed program was:" >&5
19650fd6
AS
22762sed 's/^/| /' conftest.$ac_ext >&5
22763
22044edf 22764cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22765/* confdefs.h. */
22766_ACEOF
22767cat confdefs.h >>conftest.$ac_ext
22768cat >>conftest.$ac_ext <<_ACEOF
22769/* end confdefs.h. */
22044edf
DL
22770void fred (int *__restrict x);
22771int
22772main ()
22773{
c0d27fcc 22774
22044edf
DL
22775 ;
22776 return 0;
22777}
c0d27fcc 22778_ACEOF
22044edf
DL
22779rm -f conftest.$ac_objext
22780if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 22781 (eval $ac_compile) 2>conftest.er1
22044edf 22782 ac_status=$?
edfaf76d
LK
22783 grep -v '^ *+' conftest.er1 >conftest.err
22784 rm -f conftest.er1
22785 cat conftest.err >&5
22044edf
DL
22786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22787 (exit $ac_status); } &&
e143ad11
AS
22788 { ac_try='test -z "$ac_c_werror_flag"
22789 || test ! -s conftest.err'
edfaf76d
LK
22790 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22791 (eval $ac_try) 2>&5
22792 ac_status=$?
22793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22794 (exit $ac_status); }; } &&
22795 { ac_try='test -s conftest.$ac_objext'
22044edf
DL
22796 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22797 (eval $ac_try) 2>&5
22798 ac_status=$?
22799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22800 (exit $ac_status); }; }; then
22801 emacs_cv_c_restrict=__restrict
22802else
22803 echo "$as_me: failed program was:" >&5
19650fd6
AS
22804sed 's/^/| /' conftest.$ac_ext >&5
22805
22044edf 22806emacs_cv_c_restrict=no
ba4481b5 22807fi
edfaf76d 22808rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 22809fi
edfaf76d 22810rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 22811fi
22044edf
DL
22812echo "$as_me:$LINENO: result: $emacs_cv_c_restrict" >&5
22813echo "${ECHO_T}$emacs_cv_c_restrict" >&6
22814case "$emacs_cv_c_restrict" in
22815 yes) emacs_restrict=restrict;;
22816 no) emacs_restrict="";;
22817 *) emacs_restrict="$emacs_cv_c_restrict";;
22818esac
22819if test "$emacs_restrict" != __restrict; then
b936fae4 22820
22044edf
DL
22821cat >>confdefs.h <<_ACEOF
22822#define __restrict $emacs_restrict
c0d27fcc 22823_ACEOF
ba4481b5
DL
22824
22825fi
ba4481b5 22826
22044edf
DL
22827echo "$as_me:$LINENO: checking for C restricted array declarations" >&5
22828echo $ECHO_N "checking for C restricted array declarations... $ECHO_C" >&6
22829if test "${emacs_cv_c_restrict_arr+set}" = set; then
22830 echo $ECHO_N "(cached) $ECHO_C" >&6
22831else
22832 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22833/* confdefs.h. */
22834_ACEOF
22835cat confdefs.h >>conftest.$ac_ext
22836cat >>conftest.$ac_ext <<_ACEOF
22837/* end confdefs.h. */
22044edf
DL
22838void fred (int x[__restrict]);
22839int
22840main ()
22841{
b936fae4 22842
22044edf
DL
22843 ;
22844 return 0;
22845}
c0d27fcc 22846_ACEOF
22044edf
DL
22847rm -f conftest.$ac_objext
22848if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
edfaf76d 22849 (eval $ac_compile) 2>conftest.er1
22044edf 22850 ac_status=$?
edfaf76d
LK
22851 grep -v '^ *+' conftest.er1 >conftest.err
22852 rm -f conftest.er1
22853 cat conftest.err >&5
22044edf
DL
22854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22855 (exit $ac_status); } &&
e143ad11
AS
22856 { ac_try='test -z "$ac_c_werror_flag"
22857 || test ! -s conftest.err'
edfaf76d
LK
22858 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22859 (eval $ac_try) 2>&5
22860 ac_status=$?
22861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22862 (exit $ac_status); }; } &&
22863 { ac_try='test -s conftest.$ac_objext'
22044edf
DL
22864 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22865 (eval $ac_try) 2>&5
22866 ac_status=$?
22867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22868 (exit $ac_status); }; }; then
22869 emacs_cv_c_restrict_arr=yes
22870else
22871 echo "$as_me: failed program was:" >&5
19650fd6
AS
22872sed 's/^/| /' conftest.$ac_ext >&5
22873
22044edf 22874emacs_cv_c_restrict_arr=no
ba4481b5 22875fi
edfaf76d 22876rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
22044edf
DL
22877fi
22878echo "$as_me:$LINENO: result: $emacs_cv_c_restrict_arr" >&5
22879echo "${ECHO_T}$emacs_cv_c_restrict_arr" >&6
22880if test "$emacs_cv_c_restrict_arr" = yes; then
b936fae4 22881
c0d27fcc 22882cat >>confdefs.h <<\_ACEOF
22044edf 22883#define __restrict_arr __restrict
c0d27fcc 22884_ACEOF
ba4481b5 22885
ba4481b5
DL
22886fi
22887
c0d27fcc 22888
c0d27fcc 22889
22044edf
DL
22890# Set up the CFLAGS for real compilation, so we can substitute it.
22891CFLAGS="$REAL_CFLAGS"
22892CPPFLAGS="$REAL_CPPFLAGS"
22893
22894#### Find out which version of Emacs this is.
22895version=`grep 'defconst[ ]*emacs-version' ${srcdir}/lisp/version.el \
22896 | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`
22897if test x"${version}" = x; then
22898 { { echo "$as_me:$LINENO: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." >&5
22899echo "$as_me: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." >&2;}
22900 { (exit 1); exit 1; }; }
22901fi
22902
22903### Specify what sort of things we'll be editing into Makefile and config.h.
22904### Use configuration here uncanonicalized to avoid exceeding size limits.
22905
22906
22907
22908
22909
22910
22911
22912
22913
22914
22915
22916
22917
22918
22919
22920
22921
22922
22923
22924
22925
22926
22927
22928
22929
22930
22931
22932
22933
22934
22935
22936
6a3a24fa 22937
22044edf
DL
22938
22939
22940cat >>confdefs.h <<_ACEOF
22941#define EMACS_CONFIGURATION "${canonical}"
22942_ACEOF
22943
22944
22945cat >>confdefs.h <<_ACEOF
22946#define EMACS_CONFIG_OPTIONS "${ac_configure_args}"
22947_ACEOF
22948
22949
22950cat >>confdefs.h <<_ACEOF
22951#define config_machfile "${machfile}"
22952_ACEOF
22953
22954
22955cat >>confdefs.h <<_ACEOF
22956#define config_opsysfile "${opsysfile}"
22957_ACEOF
22958
22959
22960cat >>confdefs.h <<_ACEOF
22961#define LD_SWITCH_X_SITE ${LD_SWITCH_X_SITE}
22962_ACEOF
22963
22964
22965cat >>confdefs.h <<_ACEOF
22966#define LD_SWITCH_X_SITE_AUX ${LD_SWITCH_X_SITE_AUX}
22967_ACEOF
22968
22969
22970cat >>confdefs.h <<_ACEOF
22971#define C_SWITCH_X_SITE ${C_SWITCH_X_SITE}
22972_ACEOF
22973
22974
22975cat >>confdefs.h <<_ACEOF
22976#define UNEXEC_SRC ${UNEXEC_SRC}
22977_ACEOF
22978
22979
22980if test "${HAVE_X_WINDOWS}" = "yes" ; then
22981
22982cat >>confdefs.h <<\_ACEOF
22983#define HAVE_X_WINDOWS 1
22984_ACEOF
22985
22986fi
22987if test "${USE_X_TOOLKIT}" != "none" ; then
22988
22989cat >>confdefs.h <<\_ACEOF
22990#define USE_X_TOOLKIT 1
22991_ACEOF
22992
22993fi
22994if test "${HAVE_X11}" = "yes" ; then
22995
22996cat >>confdefs.h <<\_ACEOF
22997#define HAVE_X11 1
22998_ACEOF
22999
23000fi
23001if test "${HAVE_XFREE386}" = "yes" ; then
23002
23003cat >>confdefs.h <<\_ACEOF
23004#define HAVE_XFREE386 1
23005_ACEOF
23006
23007fi
23008if test "${HAVE_MENUS}" = "yes" ; then
23009
23010cat >>confdefs.h <<\_ACEOF
23011#define HAVE_MENUS 1
23012_ACEOF
23013
23014fi
23015if test "${GNU_MALLOC}" = "yes" ; then
23016
23017cat >>confdefs.h <<\_ACEOF
23018#define GNU_MALLOC 1
23019_ACEOF
23020
23021fi
23022if test "${REL_ALLOC}" = "yes" ; then
23023
23024cat >>confdefs.h <<\_ACEOF
23025#define REL_ALLOC 1
23026_ACEOF
23027
23028fi
23029
23030
23031
c0d27fcc
MR
23032
23033
ba4481b5 23034#### Report on what we decided to do.
488dd4c4
JD
23035#### Report GTK as a toolkit, even if it doesn't use Xt.
23036#### It makes printing result more understandable as using GTK sets
23037#### toolkit_scroll_bars to yes by default.
23038if test "${HAVE_GTK}" = "yes"; then
23039 USE_X_TOOLKIT=GTK
23040fi
23041
ba4481b5
DL
23042echo "
23043Configured for \`${canonical}'.
23044
23045 Where should the build process find the source code? ${srcdir}
23046 What operating system and machine description files should Emacs use?
23047 \`${opsysfile}' and \`${machfile}'
23048 What compiler should emacs be built with? ${CC} ${CFLAGS}
23049 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
73b77ee5 23050 Should Emacs use a relocating allocator for buffers? ${REL_ALLOC}
ef9e4345 23051 Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers
ba4481b5 23052 What window system should Emacs use? ${window_system}
8e967cf7 23053 What toolkit should Emacs use? ${USE_X_TOOLKIT}"
ba4481b5
DL
23054
23055if test -n "${x_includes}"; then
23056echo " Where do we find X Windows header files? ${x_includes}"
23057else
23058echo " Where do we find X Windows header files? Standard dirs"
23059fi
23060if test -n "${x_libraries}"; then
23061echo " Where do we find X Windows libraries? ${x_libraries}"
23062else
23063echo " Where do we find X Windows libraries? Standard dirs"
23064fi
23065
23066echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}"
23067echo " Does Emacs use -lXpm? ${HAVE_XPM}"
23068echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
23069echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
23070echo " Does Emacs use -lungif? ${HAVE_GIF}"
23071echo " Does Emacs use -lpng? ${HAVE_PNG}"
23072echo " Does Emacs use X toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}"
23073echo
23074
d0098f13
JD
23075if test $USE_XASSERTS = yes; then
23076 echo " Compiling with asserts turned on."
d0098f13
JD
23077 CPPFLAGS="$CPPFLAGS -DXASSERTS=1"
23078 echo
23079fi
05cf15c6 23080
05cf15c6 23081
05cf15c6 23082
ba4481b5
DL
23083# Remove any trailing slashes in these variables.
23084test "${prefix}" != NONE &&
23085 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
23086test "${exec_prefix}" != NONE &&
23087 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
23088
d0e9bfd2
GM
23089## Check if the C preprocessor will convert `..' to `. .'. If so, set
23090## CPP_NEED_TRADITIONAL to `yes' so that the code to generate Makefile
23091## from Makefile.c can correctly provide the arg `-traditional' to the
23092## C preprocessor.
23093
503d2be0 23094cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23095/* confdefs.h. */
23096_ACEOF
23097cat confdefs.h >>conftest.$ac_ext
23098cat >>conftest.$ac_ext <<_ACEOF
23099/* end confdefs.h. */
d0e9bfd2 23100yes..yes
503d2be0 23101_ACEOF
d0e9bfd2 23102if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 23103 $EGREP "yes..yes" >/dev/null 2>&1; then
d0e9bfd2
GM
23104 CPP_NEED_TRADITIONAL=no
23105else
d0e9bfd2
GM
23106 CPP_NEED_TRADITIONAL=yes
23107fi
23108rm -f conftest*
23109
c0d27fcc 23110
6bae0ccf
DL
23111 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"
23112 ac_config_commands="$ac_config_commands default"
503d2be0 23113cat >confcache <<\_ACEOF
ba4481b5
DL
23114# This file is a shell script that caches the results of configure
23115# tests run on this system so they can be shared between configure
503d2be0
AS
23116# scripts and configure runs, see configure's option --config-cache.
23117# It is not useful on other systems. If it contains results you don't
23118# want to keep, you may remove or edit it.
ba4481b5 23119#
503d2be0
AS
23120# config.status only pays attention to the cache file if you give it
23121# the --recheck option to rerun configure.
ba4481b5 23122#
6bae0ccf 23123# `ac_cv_env_foo' variables (set or unset) will be overridden when
503d2be0
AS
23124# loading this file, other *unset* `ac_cv_foo' will be assigned the
23125# following values.
23126
23127_ACEOF
23128
ba4481b5
DL
23129# The following way of writing the cache mishandles newlines in values,
23130# but we know of no workaround that is simple, portable, and efficient.
23131# So, don't put newlines in cache variables' values.
23132# Ultrix sh set writes to stderr and can't be redirected directly,
23133# and sets the high bit in the cache file unless we assign to the vars.
503d2be0
AS
23134{
23135 (set) 2>&1 |
23136 case `(ac_space=' '; set | grep ac_space) 2>&1` in
23137 *ac_space=\ *)
23138 # `set' does not quote correctly, so add quotes (double-quote
23139 # substitution turns \\\\ into \\, and sed turns \\ into \).
23140 sed -n \
edfaf76d
LK
23141 "s/'/'\\\\''/g;
23142 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
503d2be0
AS
23143 ;;
23144 *)
23145 # `set' quotes correctly as required by POSIX, so do not add quotes.
23146 sed -n \
edfaf76d 23147 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
503d2be0
AS
23148 ;;
23149 esac;
23150} |
23151 sed '
23152 t clear
23153 : clear
23154 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
23155 t end
23156 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
23157 : end' >>confcache
19650fd6 23158if diff $cache_file confcache >/dev/null 2>&1; then :; else
ba4481b5 23159 if test -w $cache_file; then
503d2be0
AS
23160 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
23161 cat confcache >$cache_file
ba4481b5
DL
23162 else
23163 echo "not updating unwritable cache $cache_file"
23164 fi
23165fi
23166rm -f confcache
23167
ba4481b5
DL
23168test "x$prefix" = xNONE && prefix=$ac_default_prefix
23169# Let make expand exec_prefix.
23170test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
23171
503d2be0
AS
23172# VPATH may cause trouble with some makes, so we remove $(srcdir),
23173# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
23174# trailing colons and then remove the whole line if VPATH becomes empty
23175# (actually we leave an empty line to preserve line numbers).
ba4481b5 23176if test "x$srcdir" = x.; then
edfaf76d 23177 ac_vpsub='/^[ ]*VPATH[ ]*=/{
503d2be0
AS
23178s/:*\$(srcdir):*/:/;
23179s/:*\${srcdir}:*/:/;
23180s/:*@srcdir@:*/:/;
edfaf76d 23181s/^\([^=]*=[ ]*\):*/\1/;
503d2be0 23182s/:*$//;
edfaf76d 23183s/^[^=]*=[ ]*$//;
503d2be0 23184}'
ba4481b5
DL
23185fi
23186
ba4481b5
DL
23187DEFS=-DHAVE_CONFIG_H
23188
6bae0ccf
DL
23189ac_libobjs=
23190ac_ltlibobjs=
23191for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
23192 # 1. Remove the extension, and $U if already installed.
23193 ac_i=`echo "$ac_i" |
edfaf76d 23194 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
6bae0ccf
DL
23195 # 2. Add them.
23196 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
23197 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
23198done
23199LIBOBJS=$ac_libobjs
23200
23201LTLIBOBJS=$ac_ltlibobjs
23202
23203
c0d27fcc 23204
ba4481b5 23205: ${CONFIG_STATUS=./config.status}
503d2be0
AS
23206ac_clean_files_save=$ac_clean_files
23207ac_clean_files="$ac_clean_files $CONFIG_STATUS"
c0d27fcc 23208{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
503d2be0
AS
23209echo "$as_me: creating $CONFIG_STATUS" >&6;}
23210cat >$CONFIG_STATUS <<_ACEOF
23211#! $SHELL
c0d27fcc 23212# Generated by $as_me.
ba4481b5 23213# Run this file to recreate the current configuration.
ba4481b5 23214# Compiler output produced by configure, useful for debugging
503d2be0 23215# configure, is in config.log if it exists.
ba4481b5 23216
503d2be0 23217debug=false
19650fd6
AS
23218ac_cs_recheck=false
23219ac_cs_silent=false
503d2be0 23220SHELL=\${CONFIG_SHELL-$SHELL}
503d2be0
AS
23221_ACEOF
23222
23223cat >>$CONFIG_STATUS <<\_ACEOF
c0d27fcc
MR
23224## --------------------- ##
23225## M4sh Initialization. ##
23226## --------------------- ##
23227
503d2be0
AS
23228# Be Bourne compatible
23229if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
23230 emulate sh
23231 NULLCMD=:
6bae0ccf
DL
23232 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
23233 # is contrary to our usage. Disable this feature.
23234 alias -g '${1+"$@"}'='"$@"'
503d2be0
AS
23235elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
23236 set -o posix
23237fi
edfaf76d 23238DUALCASE=1; export DUALCASE # for MKS sh
503d2be0 23239
c0d27fcc 23240# Support unset when possible.
edfaf76d 23241if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
c0d27fcc
MR
23242 as_unset=unset
23243else
23244 as_unset=false
23245fi
23246
6bae0ccf
DL
23247
23248# Work around bugs in pre-3.0 UWIN ksh.
23249$as_unset ENV MAIL MAILPATH
23250PS1='$ '
23251PS2='> '
23252PS4='+ '
23253
23254# NLS nuisances.
19650fd6
AS
23255for as_var in \
23256 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
23257 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
23258 LC_TELEPHONE LC_TIME
6bae0ccf 23259do
edfaf76d 23260 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
6bae0ccf
DL
23261 eval $as_var=C; export $as_var
23262 else
23263 $as_unset $as_var
23264 fi
23265done
23266
23267# Required to use basename.
23268if expr a : '\(a\)' >/dev/null 2>&1; then
23269 as_expr=expr
23270else
23271 as_expr=false
23272fi
23273
23274if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
23275 as_basename=basename
23276else
23277 as_basename=false
23278fi
c0d27fcc
MR
23279
23280
503d2be0 23281# Name of the executable.
6bae0ccf 23282as_me=`$as_basename "$0" ||
c0d27fcc
MR
23283$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
23284 X"$0" : 'X\(//\)$' \| \
23285 X"$0" : 'X\(/\)$' \| \
23286 . : '\(.\)' 2>/dev/null ||
23287echo X/"$0" |
23288 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
23289 /^X\/\(\/\/\)$/{ s//\1/; q; }
23290 /^X\/\(\/\).*/{ s//\1/; q; }
23291 s/.*/./; q'`
23292
6bae0ccf 23293
c0d27fcc
MR
23294# PATH needs CR, and LINENO needs CR and PATH.
23295# Avoid depending upon Character Ranges.
23296as_cr_letters='abcdefghijklmnopqrstuvwxyz'
23297as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
23298as_cr_Letters=$as_cr_letters$as_cr_LETTERS
23299as_cr_digits='0123456789'
23300as_cr_alnum=$as_cr_Letters$as_cr_digits
23301
23302# The user is always right.
23303if test "${PATH_SEPARATOR+set}" != set; then
19650fd6
AS
23304 echo "#! /bin/sh" >conf$$.sh
23305 echo "exit 0" >>conf$$.sh
23306 chmod +x conf$$.sh
23307 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
c0d27fcc
MR
23308 PATH_SEPARATOR=';'
23309 else
23310 PATH_SEPARATOR=:
23311 fi
19650fd6 23312 rm -f conf$$.sh
c0d27fcc
MR
23313fi
23314
23315
23316 as_lineno_1=$LINENO
23317 as_lineno_2=$LINENO
23318 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
23319 test "x$as_lineno_1" != "x$as_lineno_2" &&
23320 test "x$as_lineno_3" = "x$as_lineno_2" || {
23321 # Find who we are. Look in the path if we contain no path at all
23322 # relative or not.
23323 case $0 in
23324 *[\\/]* ) as_myself=$0 ;;
23325 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23326for as_dir in $PATH
23327do
23328 IFS=$as_save_IFS
23329 test -z "$as_dir" && as_dir=.
23330 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
23331done
23332
23333 ;;
23334 esac
23335 # We did not find ourselves, most probably we were run as `sh COMMAND'
23336 # in which case we are not to be found in the path.
23337 if test "x$as_myself" = x; then
23338 as_myself=$0
23339 fi
23340 if test ! -f "$as_myself"; then
23341 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
23342echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
23343 { (exit 1); exit 1; }; }
23344 fi
23345 case $CONFIG_SHELL in
23346 '')
23347 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23348for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
23349do
23350 IFS=$as_save_IFS
23351 test -z "$as_dir" && as_dir=.
23352 for as_base in sh bash ksh sh5; do
23353 case $as_dir in
23354 /*)
23355 if ("$as_dir/$as_base" -c '
23356 as_lineno_1=$LINENO
23357 as_lineno_2=$LINENO
23358 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
23359 test "x$as_lineno_1" != "x$as_lineno_2" &&
23360 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
6bae0ccf
DL
23361 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
23362 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
c0d27fcc
MR
23363 CONFIG_SHELL=$as_dir/$as_base
23364 export CONFIG_SHELL
23365 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
23366 fi;;
23367 esac
23368 done
23369done
23370;;
23371 esac
23372
23373 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
23374 # uniformly replaced by the line number. The first 'sed' inserts a
23375 # line-number line before each line; the second 'sed' does the real
23376 # work. The second script uses 'N' to pair each line-number line
23377 # with the numbered line, and appends trailing '-' during
23378 # substitution so that $LINENO is not a special case at line end.
23379 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
23380 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
23381 sed '=' <$as_myself |
23382 sed '
23383 N
23384 s,$,-,
23385 : loop
23386 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
23387 t loop
23388 s,-$,,
23389 s,^['$as_cr_digits']*\n,,
23390 ' >$as_me.lineno &&
23391 chmod +x $as_me.lineno ||
23392 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
23393echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
23394 { (exit 1); exit 1; }; }
23395
23396 # Don't try to exec as it changes $[0], causing all sort of problems
23397 # (the dirname of $[0] is not the place where we might find the
23398 # original and so on. Autoconf is especially sensible to this).
23399 . ./$as_me.lineno
23400 # Exit status is that of the last command.
23401 exit
23402}
23403
23404
23405case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
23406 *c*,-n*) ECHO_N= ECHO_C='
23407' ECHO_T=' ' ;;
23408 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
23409 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
23410esac
503d2be0
AS
23411
23412if expr a : '\(a\)' >/dev/null 2>&1; then
23413 as_expr=expr
23414else
23415 as_expr=false
23416fi
23417
23418rm -f conf$$ conf$$.exe conf$$.file
23419echo >conf$$.file
23420if ln -s conf$$.file conf$$ 2>/dev/null; then
23421 # We could just check for DJGPP; but this test a) works b) is more generic
23422 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
23423 if test -f conf$$.exe; then
23424 # Don't use ln at all; we don't have any links
23425 as_ln_s='cp -p'
23426 else
23427 as_ln_s='ln -s'
23428 fi
23429elif ln conf$$.file conf$$ 2>/dev/null; then
23430 as_ln_s=ln
23431else
23432 as_ln_s='cp -p'
23433fi
23434rm -f conf$$ conf$$.exe conf$$.file
23435
6bae0ccf
DL
23436if mkdir -p . 2>/dev/null; then
23437 as_mkdir_p=:
23438else
edfaf76d 23439 test -d ./-p && rmdir ./-p
6bae0ccf
DL
23440 as_mkdir_p=false
23441fi
23442
503d2be0
AS
23443as_executable_p="test -f"
23444
c0d27fcc 23445# Sed expression to map a string onto a valid CPP name.
edfaf76d 23446as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
c0d27fcc
MR
23447
23448# Sed expression to map a string onto a valid variable name.
edfaf76d 23449as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
503d2be0 23450
503d2be0
AS
23451
23452# IFS
23453# We need space, tab and new line, in precisely that order.
23454as_nl='
23455'
23456IFS=" $as_nl"
23457
23458# CDPATH.
6bae0ccf 23459$as_unset CDPATH
503d2be0
AS
23460
23461exec 6>&1
23462
c0d27fcc
MR
23463# Open the log real soon, to keep \$[0] and so on meaningful, and to
23464# report actual input values of CONFIG_FILES etc. instead of their
23465# values after options handling. Logging --version etc. is OK.
23466exec 5>>config.log
23467{
23468 echo
23469 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
23470## Running $as_me. ##
23471_ASBOX
23472} >&5
23473cat >&5 <<_CSEOF
23474
23475This file was extended by $as_me, which was
edfaf76d 23476generated by GNU Autoconf 2.59. Invocation command line was
c0d27fcc
MR
23477
23478 CONFIG_FILES = $CONFIG_FILES
23479 CONFIG_HEADERS = $CONFIG_HEADERS
23480 CONFIG_LINKS = $CONFIG_LINKS
23481 CONFIG_COMMANDS = $CONFIG_COMMANDS
23482 $ $0 $@
23483
23484_CSEOF
23485echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
23486echo >&5
503d2be0
AS
23487_ACEOF
23488
23489# Files that config.status was made for.
23490if test -n "$ac_config_files"; then
23491 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
23492fi
23493
23494if test -n "$ac_config_headers"; then
23495 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
23496fi
23497
23498if test -n "$ac_config_links"; then
23499 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
23500fi
23501
23502if test -n "$ac_config_commands"; then
23503 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
23504fi
23505
c0d27fcc 23506cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
23507
23508ac_cs_usage="\
23509\`$as_me' instantiates files from templates according to the
23510current configuration.
23511
23512Usage: $0 [OPTIONS] [FILE]...
23513
23514 -h, --help print this help, then exit
23515 -V, --version print version number, then exit
19650fd6 23516 -q, --quiet do not print progress messages
503d2be0
AS
23517 -d, --debug don't remove temporary files
23518 --recheck update $as_me by reconfiguring in the same conditions
23519 --file=FILE[:TEMPLATE]
edfaf76d 23520 instantiate the configuration file FILE
503d2be0 23521 --header=FILE[:TEMPLATE]
edfaf76d 23522 instantiate the configuration header FILE
503d2be0
AS
23523
23524Configuration files:
23525$config_files
23526
23527Configuration headers:
23528$config_headers
23529
23530Configuration commands:
23531$config_commands
23532
23533Report bugs to <bug-autoconf@gnu.org>."
c0d27fcc 23534_ACEOF
503d2be0 23535
c0d27fcc 23536cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
23537ac_cs_version="\\
23538config.status
edfaf76d 23539configured by $0, generated by GNU Autoconf 2.59,
503d2be0
AS
23540 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
23541
edfaf76d 23542Copyright (C) 2003 Free Software Foundation, Inc.
503d2be0
AS
23543This config.status script is free software; the Free Software Foundation
23544gives unlimited permission to copy, distribute and modify it."
23545srcdir=$srcdir
23546INSTALL="$INSTALL"
c0d27fcc 23547_ACEOF
503d2be0 23548
c0d27fcc 23549cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
23550# If no file are specified by the user, then we need to provide default
23551# value. By we need to know if files were specified by the user.
23552ac_need_defaults=:
23553while test $# != 0
ba4481b5 23554do
503d2be0
AS
23555 case $1 in
23556 --*=*)
23557 ac_option=`expr "x$1" : 'x\([^=]*\)='`
23558 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
6bae0ccf
DL
23559 ac_shift=:
23560 ;;
23561 -*)
23562 ac_option=$1
23563 ac_optarg=$2
23564 ac_shift=shift
503d2be0 23565 ;;
503d2be0
AS
23566 *) # This is not an option, so the user has probably given explicit
23567 # arguments.
6bae0ccf 23568 ac_option=$1
503d2be0
AS
23569 ac_need_defaults=false;;
23570 esac
23571
6bae0ccf 23572 case $ac_option in
503d2be0 23573 # Handling of the options.
c0d27fcc 23574_ACEOF
f57bd967 23575cat >>$CONFIG_STATUS <<\_ACEOF
19650fd6
AS
23576 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23577 ac_cs_recheck=: ;;
503d2be0
AS
23578 --version | --vers* | -V )
23579 echo "$ac_cs_version"; exit 0 ;;
23580 --he | --h)
23581 # Conflict between --help and --header
c0d27fcc 23582 { { echo "$as_me:$LINENO: error: ambiguous option: $1
503d2be0
AS
23583Try \`$0 --help' for more information." >&5
23584echo "$as_me: error: ambiguous option: $1
23585Try \`$0 --help' for more information." >&2;}
23586 { (exit 1); exit 1; }; };;
23587 --help | --hel | -h )
23588 echo "$ac_cs_usage"; exit 0 ;;
23589 --debug | --d* | -d )
23590 debug=: ;;
23591 --file | --fil | --fi | --f )
6bae0ccf
DL
23592 $ac_shift
23593 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
503d2be0
AS
23594 ac_need_defaults=false;;
23595 --header | --heade | --head | --hea )
6bae0ccf
DL
23596 $ac_shift
23597 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
503d2be0 23598 ac_need_defaults=false;;
19650fd6
AS
23599 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
23600 | -silent | --silent | --silen | --sile | --sil | --si | --s)
23601 ac_cs_silent=: ;;
503d2be0
AS
23602
23603 # This is an error.
c0d27fcc 23604 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
503d2be0
AS
23605Try \`$0 --help' for more information." >&5
23606echo "$as_me: error: unrecognized option: $1
23607Try \`$0 --help' for more information." >&2;}
23608 { (exit 1); exit 1; }; } ;;
23609
23610 *) ac_config_targets="$ac_config_targets $1" ;;
23611
ba4481b5 23612 esac
503d2be0 23613 shift
ba4481b5
DL
23614done
23615
19650fd6
AS
23616ac_configure_extra_args=
23617
23618if $ac_cs_silent; then
23619 exec 6>/dev/null
23620 ac_configure_extra_args="$ac_configure_extra_args --silent"
23621fi
23622
23623_ACEOF
23624cat >>$CONFIG_STATUS <<_ACEOF
23625if \$ac_cs_recheck; then
23626 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
23627 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
23628fi
23629
503d2be0 23630_ACEOF
ba4481b5 23631
c0d27fcc 23632cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
23633#
23634# INIT-COMMANDS section.
23635#
ba4481b5 23636
503d2be0
AS
23637GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPP_NEED_TRADITIONAL="$CPP_NEED_TRADITIONAL" CPPFLAGS="$CPPFLAGS"
23638
c0d27fcc
MR
23639_ACEOF
23640
503d2be0 23641
c0d27fcc
MR
23642
23643cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
23644for ac_config_target in $ac_config_targets
23645do
23646 case "$ac_config_target" in
23647 # Handling of arguments.
23648 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
23649 "lib-src/Makefile.c" ) CONFIG_FILES="$CONFIG_FILES lib-src/Makefile.c:lib-src/Makefile.in" ;;
23650 "oldXMenu/Makefile" ) CONFIG_FILES="$CONFIG_FILES oldXMenu/Makefile" ;;
23651 "man/Makefile" ) CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
23652 "lwlib/Makefile" ) CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;;
23653 "src/Makefile.c" ) CONFIG_FILES="$CONFIG_FILES src/Makefile.c:src/Makefile.in" ;;
23654 "lisp/Makefile" ) CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;;
23b24859 23655 "lispref/Makefile" ) CONFIG_FILES="$CONFIG_FILES lispref/Makefile" ;;
981626b7 23656 "lispintro/Makefile" ) CONFIG_FILES="$CONFIG_FILES lispintro/Makefile" ;;
503d2be0
AS
23657 "leim/Makefile" ) CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;;
23658 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
23659 "src/config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:src/config.in" ;;
c0d27fcc 23660 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
503d2be0
AS
23661echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
23662 { (exit 1); exit 1; }; };;
23663 esac
ba4481b5 23664done
503d2be0
AS
23665
23666# If the user did not use the arguments to specify the items to instantiate,
23667# then the envvar interface is used. Set only those that are not.
23668# We use the long form for the default assignment because of an extremely
23669# bizarre bug on SunOS 4.1.3.
23670if $ac_need_defaults; then
23671 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
23672 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
23673 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
ba4481b5 23674fi
503d2be0 23675
19650fd6
AS
23676# Have a temporary directory for convenience. Make it in the build tree
23677# simply because there is no reason to put it here, and in addition,
23678# creating and moving files from /tmp can sometimes cause problems.
503d2be0
AS
23679# Create a temporary directory, and hook for its removal unless debugging.
23680$debug ||
23681{
23682 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
23683 trap '{ (exit 1); exit 1; }' 1 2 13 15
23684}
23685
23686# Create a (secure) tmp directory for tmp files.
19650fd6 23687
503d2be0 23688{
19650fd6 23689 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
503d2be0
AS
23690 test -n "$tmp" && test -d "$tmp"
23691} ||
23692{
19650fd6 23693 tmp=./confstat$$-$RANDOM
503d2be0
AS
23694 (umask 077 && mkdir $tmp)
23695} ||
23696{
19650fd6 23697 echo "$me: cannot create a temporary directory in ." >&2
503d2be0
AS
23698 { (exit 1); exit 1; }
23699}
23700
c0d27fcc 23701_ACEOF
503d2be0 23702
c0d27fcc 23703cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
23704
23705#
23706# CONFIG_FILES section.
23707#
23708
23709# No need to generate the scripts if there are no CONFIG_FILES.
23710# This happens for instance when ./config.status config.h
23711if test -n "\$CONFIG_FILES"; then
23712 # Protect against being on the right side of a sed subst in config.status.
23713 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
23714 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
23715s,@SHELL@,$SHELL,;t t
c0d27fcc
MR
23716s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
23717s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
23718s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
23719s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
23720s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
23721s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
503d2be0
AS
23722s,@exec_prefix@,$exec_prefix,;t t
23723s,@prefix@,$prefix,;t t
23724s,@program_transform_name@,$program_transform_name,;t t
23725s,@bindir@,$bindir,;t t
23726s,@sbindir@,$sbindir,;t t
23727s,@libexecdir@,$libexecdir,;t t
23728s,@datadir@,$datadir,;t t
23729s,@sysconfdir@,$sysconfdir,;t t
23730s,@sharedstatedir@,$sharedstatedir,;t t
23731s,@localstatedir@,$localstatedir,;t t
23732s,@libdir@,$libdir,;t t
23733s,@includedir@,$includedir,;t t
23734s,@oldincludedir@,$oldincludedir,;t t
23735s,@infodir@,$infodir,;t t
23736s,@mandir@,$mandir,;t t
503d2be0
AS
23737s,@build_alias@,$build_alias,;t t
23738s,@host_alias@,$host_alias,;t t
23739s,@target_alias@,$target_alias,;t t
c0d27fcc 23740s,@DEFS@,$DEFS,;t t
503d2be0
AS
23741s,@ECHO_C@,$ECHO_C,;t t
23742s,@ECHO_N@,$ECHO_N,;t t
23743s,@ECHO_T@,$ECHO_T,;t t
503d2be0 23744s,@LIBS@,$LIBS,;t t
19650fd6 23745s,@MAINT@,$MAINT,;t t
503d2be0
AS
23746s,@build@,$build,;t t
23747s,@build_cpu@,$build_cpu,;t t
23748s,@build_vendor@,$build_vendor,;t t
23749s,@build_os@,$build_os,;t t
23750s,@host@,$host,;t t
23751s,@host_cpu@,$host_cpu,;t t
23752s,@host_vendor@,$host_vendor,;t t
23753s,@host_os@,$host_os,;t t
23754s,@CC@,$CC,;t t
23755s,@CFLAGS@,$CFLAGS,;t t
23756s,@LDFLAGS@,$LDFLAGS,;t t
23757s,@CPPFLAGS@,$CPPFLAGS,;t t
23758s,@ac_ct_CC@,$ac_ct_CC,;t t
23759s,@EXEEXT@,$EXEEXT,;t t
23760s,@OBJEXT@,$OBJEXT,;t t
503d2be0 23761s,@CPP@,$CPP,;t t
e143ad11
AS
23762s,@EGREP@,$EGREP,;t t
23763s,@LN_S@,$LN_S,;t t
503d2be0
AS
23764s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
23765s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
23766s,@INSTALL_DATA@,$INSTALL_DATA,;t t
503d2be0
AS
23767s,@RANLIB@,$RANLIB,;t t
23768s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
9e71690e 23769s,@INSTALL_INFO@,$INSTALL_INFO,;t t
46e35e9f 23770s,@GZIP_PROG@,$GZIP_PROG,;t t
503d2be0 23771s,@LIBSOUND@,$LIBSOUND,;t t
488dd4c4 23772s,@PKG_CONFIG@,$PKG_CONFIG,;t t
439f58ee
JD
23773s,@ALSA_CFLAGS@,$ALSA_CFLAGS,;t t
23774s,@ALSA_LIBS@,$ALSA_LIBS,;t t
23775s,@CFLAGS_SOUND@,$CFLAGS_SOUND,;t t
23776s,@SET_MAKE@,$SET_MAKE,;t t
488dd4c4
JD
23777s,@GTK_CFLAGS@,$GTK_CFLAGS,;t t
23778s,@GTK_LIBS@,$GTK_LIBS,;t t
503d2be0
AS
23779s,@ALLOCA@,$ALLOCA,;t t
23780s,@liblockfile@,$liblockfile,;t t
23781s,@LIBOBJS@,$LIBOBJS,;t t
23782s,@NEED_SETGID@,$NEED_SETGID,;t t
23783s,@KMEM_GROUP@,$KMEM_GROUP,;t t
23784s,@GETLOADAVG_LIBS@,$GETLOADAVG_LIBS,;t t
52dbaac8
PE
23785s,@GETOPT_H@,$GETOPT_H,;t t
23786s,@GETOPTOBJS@,$GETOPTOBJS,;t t
503d2be0
AS
23787s,@version@,$version,;t t
23788s,@configuration@,$configuration,;t t
23789s,@canonical@,$canonical,;t t
23790s,@srcdir@,$srcdir,;t t
23791s,@lispdir@,$lispdir,;t t
23792s,@locallisppath@,$locallisppath,;t t
23793s,@lisppath@,$lisppath,;t t
23794s,@x_default_search_path@,$x_default_search_path,;t t
23795s,@etcdir@,$etcdir,;t t
23796s,@archlibdir@,$archlibdir,;t t
23797s,@docdir@,$docdir,;t t
23798s,@bitmapdir@,$bitmapdir,;t t
98418dba
CW
23799s,@gamedir@,$gamedir,;t t
23800s,@gameuser@,$gameuser,;t t
503d2be0
AS
23801s,@c_switch_system@,$c_switch_system,;t t
23802s,@c_switch_machine@,$c_switch_machine,;t t
23803s,@LD_SWITCH_X_SITE@,$LD_SWITCH_X_SITE,;t t
23804s,@LD_SWITCH_X_SITE_AUX@,$LD_SWITCH_X_SITE_AUX,;t t
23805s,@C_SWITCH_X_SITE@,$C_SWITCH_X_SITE,;t t
23806s,@X_TOOLKIT_TYPE@,$X_TOOLKIT_TYPE,;t t
23807s,@machfile@,$machfile,;t t
23808s,@opsysfile@,$opsysfile,;t t
6a3a24fa 23809s,@carbon_appdir@,$carbon_appdir,;t t
6bae0ccf 23810s,@LTLIBOBJS@,$LTLIBOBJS,;t t
503d2be0
AS
23811CEOF
23812
c0d27fcc 23813_ACEOF
ba4481b5 23814
c0d27fcc 23815 cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
23816 # Split the substitutions into bite-sized pieces for seds with
23817 # small command number limits, like on Digital OSF/1 and HP-UX.
23818 ac_max_sed_lines=48
23819 ac_sed_frag=1 # Number of current file.
23820 ac_beg=1 # First line for current file.
23821 ac_end=$ac_max_sed_lines # Line after last line for current file.
23822 ac_more_lines=:
23823 ac_sed_cmds=
23824 while $ac_more_lines; do
23825 if test $ac_beg -gt 1; then
23826 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23827 else
23828 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23829 fi
23830 if test ! -s $tmp/subs.frag; then
23831 ac_more_lines=false
23832 else
23833 # The purpose of the label and of the branching condition is to
23834 # speed up the sed processing (if there are no `@' at all, there
23835 # is no need to browse any of the substitutions).
23836 # These are the two extra sed commands mentioned above.
23837 (echo ':t
23838 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
23839 if test -z "$ac_sed_cmds"; then
edfaf76d 23840 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
503d2be0 23841 else
edfaf76d 23842 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
503d2be0
AS
23843 fi
23844 ac_sed_frag=`expr $ac_sed_frag + 1`
23845 ac_beg=$ac_end
23846 ac_end=`expr $ac_end + $ac_max_sed_lines`
23847 fi
23848 done
23849 if test -z "$ac_sed_cmds"; then
23850 ac_sed_cmds=cat
23851 fi
23852fi # test -n "$CONFIG_FILES"
ba4481b5 23853
c0d27fcc
MR
23854_ACEOF
23855cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0 23856for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
ba4481b5 23857 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
503d2be0
AS
23858 case $ac_file in
23859 - | *:- | *:-:* ) # input from stdin
edfaf76d
LK
23860 cat >$tmp/stdin
23861 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23862 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
503d2be0 23863 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
edfaf76d 23864 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
503d2be0 23865 * ) ac_file_in=$ac_file.in ;;
ba4481b5
DL
23866 esac
23867
503d2be0 23868 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
c0d27fcc
MR
23869 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
23870$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
23871 X"$ac_file" : 'X\(//\)[^/]' \| \
23872 X"$ac_file" : 'X\(//\)$' \| \
23873 X"$ac_file" : 'X\(/\)' \| \
23874 . : '\(.\)' 2>/dev/null ||
503d2be0
AS
23875echo X"$ac_file" |
23876 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23877 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23878 /^X\(\/\/\)$/{ s//\1/; q; }
23879 /^X\(\/\).*/{ s//\1/; q; }
23880 s/.*/./; q'`
6bae0ccf
DL
23881 { if $as_mkdir_p; then
23882 mkdir -p "$ac_dir"
23883 else
23884 as_dir="$ac_dir"
23885 as_dirs=
23886 while test ! -d "$as_dir"; do
23887 as_dirs="$as_dir $as_dirs"
23888 as_dir=`(dirname "$as_dir") 2>/dev/null ||
23889$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
23890 X"$as_dir" : 'X\(//\)[^/]' \| \
23891 X"$as_dir" : 'X\(//\)$' \| \
23892 X"$as_dir" : 'X\(/\)' \| \
23893 . : '\(.\)' 2>/dev/null ||
6bae0ccf
DL
23894echo X"$as_dir" |
23895 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23896 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23897 /^X\(\/\/\)$/{ s//\1/; q; }
23898 /^X\(\/\).*/{ s//\1/; q; }
23899 s/.*/./; q'`
23900 done
23901 test ! -n "$as_dirs" || mkdir $as_dirs
23902 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
23903echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
23904 { (exit 1); exit 1; }; }; }
503d2be0 23905
c0d27fcc 23906 ac_builddir=.
98418dba 23907
c0d27fcc
MR
23908if test "$ac_dir" != .; then
23909 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
23910 # A "../" for each directory in $ac_dir_suffix.
23911 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
23912else
23913 ac_dir_suffix= ac_top_builddir=
23914fi
23915
23916case $srcdir in
23917 .) # No --srcdir option. We are building in place.
23918 ac_srcdir=.
23919 if test -z "$ac_top_builddir"; then
23920 ac_top_srcdir=.
23921 else
23922 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
23923 fi ;;
23924 [\\/]* | ?:[\\/]* ) # Absolute path.
23925 ac_srcdir=$srcdir$ac_dir_suffix;
23926 ac_top_srcdir=$srcdir ;;
ba4481b5 23927 *) # Relative path.
c0d27fcc
MR
23928 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
23929 ac_top_srcdir=$ac_top_builddir$srcdir ;;
23930esac
edfaf76d
LK
23931
23932# Do not use `cd foo && pwd` to compute absolute paths, because
23933# the directories may not exist.
23934case `pwd` in
23935.) ac_abs_builddir="$ac_dir";;
23936*)
23937 case "$ac_dir" in
23938 .) ac_abs_builddir=`pwd`;;
23939 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
23940 *) ac_abs_builddir=`pwd`/"$ac_dir";;
23941 esac;;
23942esac
23943case $ac_abs_builddir in
23944.) ac_abs_top_builddir=${ac_top_builddir}.;;
23945*)
23946 case ${ac_top_builddir}. in
23947 .) ac_abs_top_builddir=$ac_abs_builddir;;
23948 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
23949 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
23950 esac;;
23951esac
23952case $ac_abs_builddir in
23953.) ac_abs_srcdir=$ac_srcdir;;
23954*)
23955 case $ac_srcdir in
23956 .) ac_abs_srcdir=$ac_abs_builddir;;
23957 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
23958 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
23959 esac;;
23960esac
23961case $ac_abs_builddir in
23962.) ac_abs_top_srcdir=$ac_top_srcdir;;
23963*)
23964 case $ac_top_srcdir in
23965 .) ac_abs_top_srcdir=$ac_abs_builddir;;
23966 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
23967 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
23968 esac;;
23969esac
c0d27fcc 23970
ba4481b5 23971
503d2be0
AS
23972 case $INSTALL in
23973 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
c0d27fcc 23974 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
ba4481b5
DL
23975 esac
23976
e143ad11
AS
23977 if test x"$ac_file" != x-; then
23978 { echo "$as_me:$LINENO: creating $ac_file" >&5
23979echo "$as_me: creating $ac_file" >&6;}
23980 rm -f "$ac_file"
23981 fi
503d2be0
AS
23982 # Let's still pretend it is `configure' which instantiates (i.e., don't
23983 # use $as_me), people would be surprised to read:
c0d27fcc
MR
23984 # /* config.h. Generated by config.status. */
23985 if test x"$ac_file" = x-; then
23986 configure_input=
23987 else
23988 configure_input="$ac_file. "
23989 fi
23990 configure_input=$configure_input"Generated from `echo $ac_file_in |
edfaf76d 23991 sed 's,.*/,,'` by configure."
503d2be0
AS
23992
23993 # First look for the input files in the build tree, otherwise in the
23994 # src tree.
23995 ac_file_inputs=`IFS=:
23996 for f in $ac_file_in; do
23997 case $f in
23998 -) echo $tmp/stdin ;;
23999 [\\/$]*)
edfaf76d
LK
24000 # Absolute (can't be DOS-style, as IFS=:)
24001 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
503d2be0
AS
24002echo "$as_me: error: cannot find input file: $f" >&2;}
24003 { (exit 1); exit 1; }; }
edfaf76d 24004 echo "$f";;
503d2be0 24005 *) # Relative
edfaf76d
LK
24006 if test -f "$f"; then
24007 # Build tree
24008 echo "$f"
24009 elif test -f "$srcdir/$f"; then
24010 # Source tree
24011 echo "$srcdir/$f"
24012 else
24013 # /dev/null tree
24014 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
503d2be0
AS
24015echo "$as_me: error: cannot find input file: $f" >&2;}
24016 { (exit 1); exit 1; }; }
edfaf76d 24017 fi;;
503d2be0
AS
24018 esac
24019 done` || { (exit 1); exit 1; }
c0d27fcc
MR
24020_ACEOF
24021cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
24022 sed "$ac_vpsub
24023$extrasub
c0d27fcc
MR
24024_ACEOF
24025cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
24026:t
24027/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
24028s,@configure_input@,$configure_input,;t t
24029s,@srcdir@,$ac_srcdir,;t t
c0d27fcc 24030s,@abs_srcdir@,$ac_abs_srcdir,;t t
503d2be0 24031s,@top_srcdir@,$ac_top_srcdir,;t t
c0d27fcc
MR
24032s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
24033s,@builddir@,$ac_builddir,;t t
24034s,@abs_builddir@,$ac_abs_builddir,;t t
24035s,@top_builddir@,$ac_top_builddir,;t t
24036s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
503d2be0
AS
24037s,@INSTALL@,$ac_INSTALL,;t t
24038" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
24039 rm -f $tmp/stdin
24040 if test x"$ac_file" != x-; then
24041 mv $tmp/out $ac_file
24042 else
24043 cat $tmp/out
24044 rm -f $tmp/out
24045 fi
24046
24047done
c0d27fcc
MR
24048_ACEOF
24049cat >>$CONFIG_STATUS <<\_ACEOF
ba4481b5 24050
503d2be0
AS
24051#
24052# CONFIG_HEADER section.
24053#
ba4481b5
DL
24054
24055# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
24056# NAME is the cpp macro being defined and VALUE is the value it is being given.
24057#
24058# ac_d sets the value in "#define NAME VALUE" lines.
edfaf76d
LK
24059ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
24060ac_dB='[ ].*$,\1#\2'
503d2be0
AS
24061ac_dC=' '
24062ac_dD=',;t'
24063# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
edfaf76d 24064ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
503d2be0 24065ac_uB='$,\1#\2define\3'
ba4481b5 24066ac_uC=' '
503d2be0 24067ac_uD=',;t'
ba4481b5 24068
503d2be0 24069for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
ba4481b5 24070 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
503d2be0
AS
24071 case $ac_file in
24072 - | *:- | *:-:* ) # input from stdin
edfaf76d
LK
24073 cat >$tmp/stdin
24074 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24075 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
503d2be0 24076 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
edfaf76d 24077 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
503d2be0 24078 * ) ac_file_in=$ac_file.in ;;
ba4481b5
DL
24079 esac
24080
c0d27fcc 24081 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
503d2be0
AS
24082echo "$as_me: creating $ac_file" >&6;}
24083
24084 # First look for the input files in the build tree, otherwise in the
24085 # src tree.
24086 ac_file_inputs=`IFS=:
24087 for f in $ac_file_in; do
24088 case $f in
24089 -) echo $tmp/stdin ;;
24090 [\\/$]*)
edfaf76d
LK
24091 # Absolute (can't be DOS-style, as IFS=:)
24092 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
503d2be0
AS
24093echo "$as_me: error: cannot find input file: $f" >&2;}
24094 { (exit 1); exit 1; }; }
edfaf76d
LK
24095 # Do quote $f, to prevent DOS paths from being IFS'd.
24096 echo "$f";;
503d2be0 24097 *) # Relative
edfaf76d
LK
24098 if test -f "$f"; then
24099 # Build tree
24100 echo "$f"
24101 elif test -f "$srcdir/$f"; then
24102 # Source tree
24103 echo "$srcdir/$f"
24104 else
24105 # /dev/null tree
24106 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
503d2be0
AS
24107echo "$as_me: error: cannot find input file: $f" >&2;}
24108 { (exit 1); exit 1; }; }
edfaf76d 24109 fi;;
503d2be0
AS
24110 esac
24111 done` || { (exit 1); exit 1; }
24112 # Remove the trailing spaces.
edfaf76d 24113 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
503d2be0 24114
c0d27fcc 24115_ACEOF
503d2be0
AS
24116
24117# Transform confdefs.h into two sed scripts, `conftest.defines' and
24118# `conftest.undefs', that substitutes the proper values into
24119# config.h.in to produce config.h. The first handles `#define'
24120# templates, and the second `#undef' templates.
24121# And first: Protect against being on the right side of a sed subst in
24122# config.status. Protect against being in an unquoted here document
24123# in config.status.
24124rm -f conftest.defines conftest.undefs
24125# Using a here document instead of a string reduces the quoting nightmare.
24126# Putting comments in sed scripts is not portable.
24127#
24128# `end' is used to avoid that the second main sed command (meant for
24129# 0-ary CPP macros) applies to n-ary macro definitions.
24130# See the Autoconf documentation for `clear'.
c0d27fcc 24131cat >confdef2sed.sed <<\_ACEOF
503d2be0
AS
24132s/[\\&,]/\\&/g
24133s,[\\$`],\\&,g
24134t clear
24135: clear
edfaf76d 24136s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
503d2be0 24137t end
edfaf76d 24138s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
503d2be0 24139: end
c0d27fcc 24140_ACEOF
503d2be0
AS
24141# If some macros were called several times there might be several times
24142# the same #defines, which is useless. Nevertheless, we may not want to
24143# sort them, since we want the *last* AC-DEFINE to be honored.
24144uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
24145sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
24146rm -f confdef2sed.sed
ba4481b5
DL
24147
24148# This sed command replaces #undef with comments. This is necessary, for
24149# example, in the case of _POSIX_SOURCE, which is predefined and required
24150# on some systems where configure will not decide to define it.
c0d27fcc 24151cat >>conftest.undefs <<\_ACEOF
edfaf76d 24152s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
c0d27fcc 24153_ACEOF
ba4481b5 24154
503d2be0
AS
24155# Break up conftest.defines because some shells have a limit on the size
24156# of here documents, and old seds have small limits too (100 cmds).
24157echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
edfaf76d 24158echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
503d2be0
AS
24159echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
24160echo ' :' >>$CONFIG_STATUS
24161rm -f conftest.tail
24162while grep . conftest.defines >/dev/null
24163do
24164 # Write a limited-size here document to $tmp/defines.sed.
24165 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
24166 # Speed up: don't consider the non `#define' lines.
edfaf76d 24167 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
503d2be0
AS
24168 # Work around the forget-to-reset-the-flag bug.
24169 echo 't clr' >>$CONFIG_STATUS
24170 echo ': clr' >>$CONFIG_STATUS
24171 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
24172 echo 'CEOF
24173 sed -f $tmp/defines.sed $tmp/in >$tmp/out
24174 rm -f $tmp/in
24175 mv $tmp/out $tmp/in
24176' >>$CONFIG_STATUS
24177 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
24178 rm -f conftest.defines
24179 mv conftest.tail conftest.defines
24180done
24181rm -f conftest.defines
6bae0ccf 24182echo ' fi # grep' >>$CONFIG_STATUS
503d2be0 24183echo >>$CONFIG_STATUS
ba4481b5 24184
503d2be0
AS
24185# Break up conftest.undefs because some shells have a limit on the size
24186# of here documents, and old seds have small limits too (100 cmds).
24187echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
ba4481b5 24188rm -f conftest.tail
503d2be0 24189while grep . conftest.undefs >/dev/null
ba4481b5 24190do
503d2be0
AS
24191 # Write a limited-size here document to $tmp/undefs.sed.
24192 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
24193 # Speed up: don't consider the non `#undef'
edfaf76d 24194 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
503d2be0
AS
24195 # Work around the forget-to-reset-the-flag bug.
24196 echo 't clr' >>$CONFIG_STATUS
24197 echo ': clr' >>$CONFIG_STATUS
24198 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
ba4481b5 24199 echo 'CEOF
503d2be0
AS
24200 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
24201 rm -f $tmp/in
24202 mv $tmp/out $tmp/in
24203' >>$CONFIG_STATUS
24204 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
24205 rm -f conftest.undefs
24206 mv conftest.tail conftest.undefs
ba4481b5 24207done
503d2be0
AS
24208rm -f conftest.undefs
24209
c0d27fcc 24210cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
24211 # Let's still pretend it is `configure' which instantiates (i.e., don't
24212 # use $as_me), people would be surprised to read:
c0d27fcc 24213 # /* config.h. Generated by config.status. */
503d2be0 24214 if test x"$ac_file" = x-; then
c0d27fcc 24215 echo "/* Generated by configure. */" >$tmp/config.h
ba4481b5 24216 else
c0d27fcc 24217 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
503d2be0
AS
24218 fi
24219 cat $tmp/in >>$tmp/config.h
24220 rm -f $tmp/in
24221 if test x"$ac_file" != x-; then
19650fd6 24222 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
c0d27fcc 24223 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
503d2be0
AS
24224echo "$as_me: $ac_file is unchanged" >&6;}
24225 else
c0d27fcc
MR
24226 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
24227$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
24228 X"$ac_file" : 'X\(//\)[^/]' \| \
24229 X"$ac_file" : 'X\(//\)$' \| \
24230 X"$ac_file" : 'X\(/\)' \| \
24231 . : '\(.\)' 2>/dev/null ||
503d2be0
AS
24232echo X"$ac_file" |
24233 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24234 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24235 /^X\(\/\/\)$/{ s//\1/; q; }
24236 /^X\(\/\).*/{ s//\1/; q; }
24237 s/.*/./; q'`
6bae0ccf
DL
24238 { if $as_mkdir_p; then
24239 mkdir -p "$ac_dir"
24240 else
24241 as_dir="$ac_dir"
24242 as_dirs=
24243 while test ! -d "$as_dir"; do
24244 as_dirs="$as_dir $as_dirs"
24245 as_dir=`(dirname "$as_dir") 2>/dev/null ||
24246$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
24247 X"$as_dir" : 'X\(//\)[^/]' \| \
24248 X"$as_dir" : 'X\(//\)$' \| \
24249 X"$as_dir" : 'X\(/\)' \| \
24250 . : '\(.\)' 2>/dev/null ||
6bae0ccf
DL
24251echo X"$as_dir" |
24252 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24253 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24254 /^X\(\/\/\)$/{ s//\1/; q; }
24255 /^X\(\/\).*/{ s//\1/; q; }
24256 s/.*/./; q'`
24257 done
24258 test ! -n "$as_dirs" || mkdir $as_dirs
24259 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
24260echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
24261 { (exit 1); exit 1; }; }; }
503d2be0 24262
503d2be0
AS
24263 rm -f $ac_file
24264 mv $tmp/config.h $ac_file
ba4481b5 24265 fi
503d2be0
AS
24266 else
24267 cat $tmp/config.h
24268 rm -f $tmp/config.h
ba4481b5 24269 fi
503d2be0 24270done
c0d27fcc
MR
24271_ACEOF
24272cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
24273
24274#
24275# CONFIG_COMMANDS section.
24276#
24277for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
24278 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
24279 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
c0d27fcc
MR
24280 ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
24281$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
24282 X"$ac_dest" : 'X\(//\)[^/]' \| \
24283 X"$ac_dest" : 'X\(//\)$' \| \
24284 X"$ac_dest" : 'X\(/\)' \| \
24285 . : '\(.\)' 2>/dev/null ||
c0d27fcc
MR
24286echo X"$ac_dest" |
24287 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24288 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24289 /^X\(\/\/\)$/{ s//\1/; q; }
24290 /^X\(\/\).*/{ s//\1/; q; }
24291 s/.*/./; q'`
edfaf76d
LK
24292 { if $as_mkdir_p; then
24293 mkdir -p "$ac_dir"
24294 else
24295 as_dir="$ac_dir"
24296 as_dirs=
24297 while test ! -d "$as_dir"; do
24298 as_dirs="$as_dir $as_dirs"
24299 as_dir=`(dirname "$as_dir") 2>/dev/null ||
24300$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24301 X"$as_dir" : 'X\(//\)[^/]' \| \
24302 X"$as_dir" : 'X\(//\)$' \| \
24303 X"$as_dir" : 'X\(/\)' \| \
24304 . : '\(.\)' 2>/dev/null ||
24305echo X"$as_dir" |
24306 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24307 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24308 /^X\(\/\/\)$/{ s//\1/; q; }
24309 /^X\(\/\).*/{ s//\1/; q; }
24310 s/.*/./; q'`
24311 done
24312 test ! -n "$as_dirs" || mkdir $as_dirs
24313 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
24314echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
24315 { (exit 1); exit 1; }; }; }
24316
c0d27fcc
MR
24317 ac_builddir=.
24318
24319if test "$ac_dir" != .; then
24320 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
24321 # A "../" for each directory in $ac_dir_suffix.
24322 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
24323else
24324 ac_dir_suffix= ac_top_builddir=
24325fi
24326
24327case $srcdir in
24328 .) # No --srcdir option. We are building in place.
24329 ac_srcdir=.
24330 if test -z "$ac_top_builddir"; then
24331 ac_top_srcdir=.
24332 else
24333 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
24334 fi ;;
24335 [\\/]* | ?:[\\/]* ) # Absolute path.
24336 ac_srcdir=$srcdir$ac_dir_suffix;
24337 ac_top_srcdir=$srcdir ;;
24338 *) # Relative path.
24339 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
24340 ac_top_srcdir=$ac_top_builddir$srcdir ;;
24341esac
edfaf76d
LK
24342
24343# Do not use `cd foo && pwd` to compute absolute paths, because
24344# the directories may not exist.
24345case `pwd` in
24346.) ac_abs_builddir="$ac_dir";;
24347*)
24348 case "$ac_dir" in
24349 .) ac_abs_builddir=`pwd`;;
24350 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
24351 *) ac_abs_builddir=`pwd`/"$ac_dir";;
24352 esac;;
24353esac
24354case $ac_abs_builddir in
24355.) ac_abs_top_builddir=${ac_top_builddir}.;;
24356*)
24357 case ${ac_top_builddir}. in
24358 .) ac_abs_top_builddir=$ac_abs_builddir;;
24359 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
24360 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
24361 esac;;
24362esac
24363case $ac_abs_builddir in
24364.) ac_abs_srcdir=$ac_srcdir;;
24365*)
24366 case $ac_srcdir in
24367 .) ac_abs_srcdir=$ac_abs_builddir;;
24368 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
24369 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
24370 esac;;
24371esac
24372case $ac_abs_builddir in
24373.) ac_abs_top_srcdir=$ac_top_srcdir;;
24374*)
24375 case $ac_top_srcdir in
24376 .) ac_abs_top_srcdir=$ac_abs_builddir;;
24377 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
24378 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
24379 esac;;
24380esac
ba4481b5 24381
c0d27fcc
MR
24382
24383 { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
24384echo "$as_me: executing $ac_dest commands" >&6;}
503d2be0
AS
24385 case $ac_dest in
24386 default )
ba4481b5
DL
24387
24388### Make the necessary directories, if they don't exist.
24389for dir in etc lisp ; do
24390 test -d ${dir} || mkdir ${dir}
24391done
24392
24393# Build src/Makefile from ${srcdir}/src/Makefile.c
24394# and lib-src/Makefile from ${srcdir}/lib-src/Makefile.c
24395# This must be done after src/config.h is built, since we rely on that file.
24396
24397# Now get this: Some word that is part of the ${srcdir} directory name
24398# or the ${configuration} value might, just might, happen to be an
24399# identifier like `sun4' or `i386' or something, and be predefined by
24400# the C preprocessor to some helpful value like 1, or maybe the empty
24401# string. Needless to say consequent macro substitutions are less
24402# than conducive to the makefile finding the correct directory.
24403undefs="`echo $top_srcdir $configuration $canonical |
24404sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/ *$//' \
24405 -e 's/ */ -U/g' -e 's/-U[0-9][^ ]*//g' \
24406`"
24407
24408echo creating src/epaths.h
4aa6b955 24409${MAKE-make} epaths-force
ba4481b5 24410
1c203d4c
DL
24411# As of 2000-11-19, newest development versions of GNU cpp preprocess
24412# `..' to `. .' unless invoked with -traditional
24413
d0e9bfd2 24414if test "x$GCC" = xyes && test "x$CPP_NEED_TRADITIONAL" = xyes; then
1c203d4c
DL
24415 CPPFLAGS="$CPPFLAGS -traditional"
24416fi
24417
ba4481b5
DL
24418echo creating lib-src/Makefile
24419( cd lib-src
24420 rm -f junk.c junk1.c junk2.c
24421 sed -e '/start of cpp stuff/q' \
24422 < Makefile.c > junk1.c
24423 sed -e '1,/start of cpp stuff/d'\
9a72e4c1 24424 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
ba4481b5 24425 < Makefile.c > junk.c
503d2be0 24426 $CPP $undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
ba4481b5
DL
24427 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
24428 cat junk1.c junk2.c > Makefile.new
24429 rm -f junk.c junk1.c junk2.c
24430 chmod 444 Makefile.new
24431 mv -f Makefile.new Makefile
24432)
24433
24434echo creating src/Makefile
24435( cd src
24436 rm -f junk.c junk1.c junk2.c
24437 sed -e '/start of cpp stuff/q' \
24438 < Makefile.c > junk1.c
24439 sed -e '1,/start of cpp stuff/d'\
9a72e4c1 24440 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
ba4481b5 24441 < Makefile.c > junk.c
503d2be0 24442 $CPP $undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
ba4481b5
DL
24443 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
24444 cat junk1.c junk2.c > Makefile.new
24445 rm -f junk.c junk1.c junk2.c
24446 chmod 444 Makefile.new
24447 mv -f Makefile.new Makefile
24448)
24449
503d2be0 24450if test ! -f src/.gdbinit && test -f $srcdir/src/.gdbinit; then
ba4481b5 24451 echo creating src/.gdbinit
503d2be0 24452 echo source $srcdir/src/.gdbinit > src/.gdbinit
ba4481b5
DL
24453fi
24454
24455# This is how we know whether to re-run configure in certain cases.
24456touch src/config.stamp
24457
503d2be0
AS
24458 ;;
24459 esac
24460done
c0d27fcc 24461_ACEOF
503d2be0 24462
c0d27fcc 24463cat >>$CONFIG_STATUS <<\_ACEOF
ba4481b5 24464
503d2be0 24465{ (exit 0); exit 0; }
c0d27fcc 24466_ACEOF
ba4481b5 24467chmod +x $CONFIG_STATUS
503d2be0
AS
24468ac_clean_files=$ac_clean_files_save
24469
c0d27fcc 24470
503d2be0
AS
24471# configure is writing to config.log, and then calls config.status.
24472# config.status does its own redirection, appending to config.log.
24473# Unfortunately, on DOS this fails, as config.log is still kept open
24474# by configure, so config.status won't be able to write to it; its
24475# output is simply discarded. So we exec the FD to /dev/null,
24476# effectively closing config.log, so it can be properly (re)opened and
24477# appended to by config.status. When coming back to configure, we
24478# need to make the FD available again.
24479if test "$no_create" != yes; then
24480 ac_cs_success=:
19650fd6
AS
24481 ac_config_status_args=
24482 test "$silent" = yes &&
24483 ac_config_status_args="$ac_config_status_args --quiet"
503d2be0 24484 exec 5>/dev/null
19650fd6 24485 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
503d2be0
AS
24486 exec 5>>config.log
24487 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
24488 # would make configure fail if this is the last instruction.
24489 $ac_cs_success || { (exit 1); exit 1; }
24490fi
f5f47add 24491
c0d27fcc 24492