(cua-copy-region, cua-cut-region)
[bpt/emacs.git] / configure
CommitLineData
ba4481b5 1#! /bin/sh
ba4481b5 2# Guess values for system-dependent variables and create Makefiles.
35996d22 3# Generated by GNU Autoconf 2.59.
ba4481b5 4#
35996d22 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
35996d22 22DUALCASE=1; export DUALCASE # for MKS sh
503d2be0 23
c0d27fcc 24# Support unset when possible.
35996d22 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
35996d22 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
35996d22 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.
35996d22 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.
35996d22 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
f17e308a 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 LN_S CPP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA RANLIB ac_ct_RANLIB INSTALL_INFO EGREP LIBSOUND SET_MAKE PKG_CONFIG GTK_CFLAGS GTK_LIBS ALLOCA liblockfile LIBOBJS NEED_SETGID KMEM_GROUP GETLOADAVG_LIBS version configuration canonical srcdir lispdir locallisppath lisppath x_default_search_path etcdir archlibdir docdir bitmapdir gamedir gameuser c_switch_system c_switch_machine LD_SWITCH_X_SITE LD_SWITCH_X_SITE_AUX C_SWITCH_X_SITE X_TOOLKIT_TYPE machfile opsysfile carbon_appdir LTLIBOBJS'
6bae0ccf 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 \
35996d22 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\(.*[^/]\)//*[^/][^/]*/*$' \| \
35996d22
AS
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
35996d22 807 [$ac_default_prefix]
503d2be0 808 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
35996d22 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
503d2be0
AS
862 --disable-largefile omit support for large files
863
864Optional Packages:
865 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
866 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
867 --without-gcc don't use GCC to compile Emacs if GCC is found
868 --without-pop don't support POP mail retrieval with movemail
869 --with-kerberos support Kerberos-authenticated POP
870 --with-kerberos5 support Kerberos version 5 authenticated POP
871 --with-hesiod support Hesiod to get the POP server host
2c9dccc9 872 --without-sound don't compile with sound support
488dd4c4
JD
873 --with-x-toolkit=KIT use an X toolkit
874 (KIT = yes/lucid/athena/motif/gtk/no)
503d2be0
AS
875 --with-xpm use -lXpm for displaying XPM images
876 --with-jpeg use -ljpeg for displaying JPEG images
877 --with-tiff use -ltiff for displaying TIFF images
878 --with-gif use -lungif for displaying GIF images
879 --with-png use -lpng for displaying PNG images
488dd4c4
JD
880 --with-gtk use GTK (same as --with-x-toolkit=gtk)
881 --with-pkg-config-prog Path to pkg-config to use for finding GTK
503d2be0 882 --without-toolkit-scroll-bars
cc227489
MB
883 don't use Motif or Xaw3d scroll bars
884 --without-xim don't use X11 XIM
e0f712ba 885 --without-carbon don't use Carbon GUI on Mac OS X
503d2be0
AS
886 --with-x use the X Window System
887
888Some influential environment variables:
889 CC C compiler command
890 CFLAGS C compiler flags
891 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
892 nonstandard directory <lib dir>
893 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
894 headers in a nonstandard directory <include dir>
895 CPP C preprocessor
896
897Use these variables to override the choices made by `configure' or to help
898it to find libraries and programs with nonstandard names/locations.
899
c0d27fcc 900_ACEOF
503d2be0
AS
901fi
902
903if test "$ac_init_help" = "recursive"; then
904 # If there are subdirs, report their specific --help.
905 ac_popdir=`pwd`
c0d27fcc
MR
906 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
907 test -d $ac_dir || continue
908 ac_builddir=.
909
910if test "$ac_dir" != .; then
911 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
912 # A "../" for each directory in $ac_dir_suffix.
913 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
914else
915 ac_dir_suffix= ac_top_builddir=
916fi
503d2be0 917
c0d27fcc
MR
918case $srcdir in
919 .) # No --srcdir option. We are building in place.
920 ac_srcdir=.
921 if test -z "$ac_top_builddir"; then
922 ac_top_srcdir=.
923 else
924 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
925 fi ;;
926 [\\/]* | ?:[\\/]* ) # Absolute path.
927 ac_srcdir=$srcdir$ac_dir_suffix;
928 ac_top_srcdir=$srcdir ;;
929 *) # Relative path.
930 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
931 ac_top_srcdir=$ac_top_builddir$srcdir ;;
932esac
35996d22
AS
933
934# Do not use `cd foo && pwd` to compute absolute paths, because
935# the directories may not exist.
936case `pwd` in
937.) ac_abs_builddir="$ac_dir";;
938*)
939 case "$ac_dir" in
940 .) ac_abs_builddir=`pwd`;;
941 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
942 *) ac_abs_builddir=`pwd`/"$ac_dir";;
943 esac;;
944esac
945case $ac_abs_builddir in
946.) ac_abs_top_builddir=${ac_top_builddir}.;;
947*)
948 case ${ac_top_builddir}. in
949 .) ac_abs_top_builddir=$ac_abs_builddir;;
950 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
951 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
952 esac;;
953esac
954case $ac_abs_builddir in
955.) ac_abs_srcdir=$ac_srcdir;;
956*)
957 case $ac_srcdir in
958 .) ac_abs_srcdir=$ac_abs_builddir;;
959 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
960 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
961 esac;;
962esac
963case $ac_abs_builddir in
964.) ac_abs_top_srcdir=$ac_top_srcdir;;
965*)
966 case $ac_top_srcdir in
967 .) ac_abs_top_srcdir=$ac_abs_builddir;;
968 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
969 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
970 esac;;
971esac
c0d27fcc
MR
972
973 cd $ac_dir
503d2be0 974 # Check for guested configure; otherwise get Cygnus style configure.
c0d27fcc 975 if test -f $ac_srcdir/configure.gnu; then
503d2be0 976 echo
c0d27fcc
MR
977 $SHELL $ac_srcdir/configure.gnu --help=recursive
978 elif test -f $ac_srcdir/configure; then
503d2be0 979 echo
c0d27fcc
MR
980 $SHELL $ac_srcdir/configure --help=recursive
981 elif test -f $ac_srcdir/configure.ac ||
35996d22 982 test -f $ac_srcdir/configure.in; then
503d2be0
AS
983 echo
984 $ac_configure --help
985 else
c0d27fcc 986 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
503d2be0 987 fi
551ffc27 988 cd $ac_popdir
503d2be0
AS
989 done
990fi
991
992test -n "$ac_init_help" && exit 0
993if $ac_init_version; then
c0d27fcc 994 cat <<\_ACEOF
503d2be0 995
35996d22 996Copyright (C) 2003 Free Software Foundation, Inc.
503d2be0
AS
997This configure script is free software; the Free Software Foundation
998gives unlimited permission to copy, distribute and modify it.
c0d27fcc 999_ACEOF
503d2be0
AS
1000 exit 0
1001fi
1002exec 5>config.log
c0d27fcc 1003cat >&5 <<_ACEOF
503d2be0
AS
1004This file contains any messages produced by compilers while
1005running configure, to aid debugging if configure makes a mistake.
1006
1007It was created by $as_me, which was
35996d22 1008generated by GNU Autoconf 2.59. Invocation command line was
503d2be0
AS
1009
1010 $ $0 $@
1011
c0d27fcc 1012_ACEOF
503d2be0
AS
1013{
1014cat <<_ASUNAME
c0d27fcc
MR
1015## --------- ##
1016## Platform. ##
1017## --------- ##
503d2be0
AS
1018
1019hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1020uname -m = `(uname -m) 2>/dev/null || echo unknown`
1021uname -r = `(uname -r) 2>/dev/null || echo unknown`
1022uname -s = `(uname -s) 2>/dev/null || echo unknown`
1023uname -v = `(uname -v) 2>/dev/null || echo unknown`
1024
1025/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1026/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1027
1028/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1029/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1030/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1031hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
1032/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1033/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1034/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1035
925c2f3f 1036_ASUNAME
c0d27fcc
MR
1037
1038as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1039for as_dir in $PATH
1040do
1041 IFS=$as_save_IFS
1042 test -z "$as_dir" && as_dir=.
1043 echo "PATH: $as_dir"
1044done
1045
503d2be0
AS
1046} >&5
1047
c0d27fcc
MR
1048cat >&5 <<_ACEOF
1049
1050
1051## ----------- ##
1052## Core tests. ##
1053## ----------- ##
1054
1055_ACEOF
503d2be0 1056
503d2be0
AS
1057
1058# Keep a trace of the command line.
1059# Strip out --no-create and --no-recursion so they do not pile up.
19650fd6 1060# Strip out --silent because we don't want to record it for future runs.
503d2be0 1061# Also quote any args containing shell meta-characters.
19650fd6 1062# Make two passes to allow for proper duplicate-argument suppression.
503d2be0 1063ac_configure_args=
19650fd6
AS
1064ac_configure_args0=
1065ac_configure_args1=
503d2be0 1066ac_sep=
19650fd6
AS
1067ac_must_keep_next=false
1068for ac_pass in 1 2
503d2be0 1069do
19650fd6
AS
1070 for ac_arg
1071 do
1072 case $ac_arg in
1073 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1074 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1075 | -silent | --silent | --silen | --sile | --sil)
1076 continue ;;
1077 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1078 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1079 esac
1080 case $ac_pass in
1081 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1082 2)
1083 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1084 if test $ac_must_keep_next = true; then
35996d22 1085 ac_must_keep_next=false # Got value, back to normal.
19650fd6 1086 else
35996d22
AS
1087 case $ac_arg in
1088 *=* | --config-cache | -C | -disable-* | --disable-* \
1089 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1090 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1091 | -with-* | --with-* | -without-* | --without-* | --x)
1092 case "$ac_configure_args0 " in
1093 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1094 esac
1095 ;;
1096 -* ) ac_must_keep_next=true ;;
1097 esac
19650fd6
AS
1098 fi
1099 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1100 # Get rid of the leading space.
1101 ac_sep=" "
1102 ;;
1103 esac
1104 done
503d2be0 1105done
19650fd6
AS
1106$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1107$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
503d2be0
AS
1108
1109# When interrupted or exit'd, cleanup temporary files, and complete
1110# config.log. We remove comments because anyway the quotes in there
1111# would cause problems or look ugly.
c0d27fcc
MR
1112# WARNING: Be sure not to use single quotes in there, as some shells,
1113# such as our DU 5.0 friend, will then `close' the trap.
503d2be0
AS
1114trap 'exit_status=$?
1115 # Save into config.log some information that might help in debugging.
c0d27fcc
MR
1116 {
1117 echo
6bae0ccf 1118
c0d27fcc
MR
1119 cat <<\_ASBOX
1120## ---------------- ##
1121## Cache variables. ##
1122## ---------------- ##
1123_ASBOX
1124 echo
1125 # The following way of writing the cache mishandles newlines in values,
503d2be0
AS
1126{
1127 (set) 2>&1 |
1128 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1129 *ac_space=\ *)
1130 sed -n \
35996d22
AS
1131 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1132 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
503d2be0
AS
1133 ;;
1134 *)
1135 sed -n \
35996d22 1136 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
503d2be0
AS
1137 ;;
1138 esac;
c0d27fcc
MR
1139}
1140 echo
6bae0ccf
DL
1141
1142 cat <<\_ASBOX
1143## ----------------- ##
1144## Output variables. ##
1145## ----------------- ##
1146_ASBOX
1147 echo
1148 for ac_var in $ac_subst_vars
1149 do
1150 eval ac_val=$`echo $ac_var`
1151 echo "$ac_var='"'"'$ac_val'"'"'"
1152 done | sort
1153 echo
1154
1155 if test -n "$ac_subst_files"; then
1156 cat <<\_ASBOX
1157## ------------- ##
1158## Output files. ##
1159## ------------- ##
1160_ASBOX
1161 echo
1162 for ac_var in $ac_subst_files
1163 do
1164 eval ac_val=$`echo $ac_var`
35996d22 1165 echo "$ac_var='"'"'$ac_val'"'"'"
6bae0ccf
DL
1166 done | sort
1167 echo
1168 fi
1169
c0d27fcc
MR
1170 if test -s confdefs.h; then
1171 cat <<\_ASBOX
1172## ----------- ##
1173## confdefs.h. ##
1174## ----------- ##
1175_ASBOX
1176 echo
6bae0ccf 1177 sed "/^$/d" confdefs.h | sort
c0d27fcc
MR
1178 echo
1179 fi
1180 test "$ac_signal" != 0 &&
1181 echo "$as_me: caught signal $ac_signal"
1182 echo "$as_me: exit $exit_status"
1183 } >&5
35996d22 1184 rm -f core *.core &&
c0d27fcc 1185 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
503d2be0
AS
1186 exit $exit_status
1187 ' 0
1188for ac_signal in 1 2 13 15; do
1189 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1190done
1191ac_signal=0
1192
1193# confdefs.h avoids OS command line length limits that DEFS can exceed.
1194rm -rf conftest* confdefs.h
1195# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1196echo >confdefs.h
ba4481b5 1197
c0d27fcc
MR
1198# Predefined preprocessor variables.
1199
1200cat >>confdefs.h <<_ACEOF
1201#define PACKAGE_NAME "$PACKAGE_NAME"
1202_ACEOF
1203
1204
1205cat >>confdefs.h <<_ACEOF
1206#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1207_ACEOF
1208
1209
1210cat >>confdefs.h <<_ACEOF
1211#define PACKAGE_VERSION "$PACKAGE_VERSION"
1212_ACEOF
1213
1214
1215cat >>confdefs.h <<_ACEOF
1216#define PACKAGE_STRING "$PACKAGE_STRING"
1217_ACEOF
1218
1219
1220cat >>confdefs.h <<_ACEOF
1221#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1222_ACEOF
1223
1224
503d2be0 1225# Let the site file select an alternate cache file if it wants to.
ba4481b5
DL
1226# Prefer explicitly selected file to automatically selected ones.
1227if test -z "$CONFIG_SITE"; then
1228 if test "x$prefix" != xNONE; then
1229 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1230 else
1231 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1232 fi
1233fi
1234for ac_site_file in $CONFIG_SITE; do
1235 if test -r "$ac_site_file"; then
c0d27fcc 1236 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
503d2be0 1237echo "$as_me: loading site script $ac_site_file" >&6;}
c0d27fcc 1238 sed 's/^/| /' "$ac_site_file" >&5
ba4481b5
DL
1239 . "$ac_site_file"
1240 fi
1241done
1242
1243if test -r "$cache_file"; then
503d2be0
AS
1244 # Some versions of bash will fail to source /dev/null (special
1245 # files actually), so we avoid doing that.
1246 if test -f "$cache_file"; then
c0d27fcc 1247 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
503d2be0
AS
1248echo "$as_me: loading cache $cache_file" >&6;}
1249 case $cache_file in
1250 [\\/]* | ?:[\\/]* ) . $cache_file;;
1251 *) . ./$cache_file;;
1252 esac
1253 fi
ba4481b5 1254else
c0d27fcc 1255 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
503d2be0
AS
1256echo "$as_me: creating cache $cache_file" >&6;}
1257 >$cache_file
1258fi
1259
1260# Check that the precious variables saved in the cache have kept the same
1261# value.
1262ac_cache_corrupted=false
1263for ac_var in `(set) 2>&1 |
35996d22 1264 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
503d2be0
AS
1265 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1266 eval ac_new_set=\$ac_env_${ac_var}_set
1267 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1268 eval ac_new_val="\$ac_env_${ac_var}_value"
1269 case $ac_old_set,$ac_new_set in
1270 set,)
c0d27fcc 1271 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
503d2be0
AS
1272echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1273 ac_cache_corrupted=: ;;
1274 ,set)
c0d27fcc 1275 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
503d2be0
AS
1276echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1277 ac_cache_corrupted=: ;;
1278 ,);;
1279 *)
1280 if test "x$ac_old_val" != "x$ac_new_val"; then
35996d22 1281 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
503d2be0 1282echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
35996d22 1283 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
503d2be0 1284echo "$as_me: former value: $ac_old_val" >&2;}
35996d22 1285 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
503d2be0 1286echo "$as_me: current value: $ac_new_val" >&2;}
35996d22 1287 ac_cache_corrupted=:
503d2be0
AS
1288 fi;;
1289 esac
c0d27fcc 1290 # Pass precious variables to config.status.
503d2be0
AS
1291 if test "$ac_new_set" = set; then
1292 case $ac_new_val in
1293 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
c0d27fcc
MR
1294 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1295 *) ac_arg=$ac_var=$ac_new_val ;;
1296 esac
1297 case " $ac_configure_args " in
1298 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1299 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
503d2be0
AS
1300 esac
1301 fi
1302done
1303if $ac_cache_corrupted; then
c0d27fcc 1304 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
503d2be0 1305echo "$as_me: error: changes in the environment can compromise the build" >&2;}
c0d27fcc 1306 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
503d2be0
AS
1307echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1308 { (exit 1); exit 1; }; }
ba4481b5
DL
1309fi
1310
1311ac_ext=c
ba4481b5 1312ac_cpp='$CPP $CPPFLAGS'
503d2be0
AS
1313ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1314ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1315ac_compiler_gnu=$ac_cv_c_compiler_gnu
1316
c0d27fcc
MR
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
ba4481b5 1333
6bae0ccf
DL
1334
1335 ac_config_headers="$ac_config_headers src/config.h:src/config.in"
ba4481b5 1336
c0d27fcc 1337
ba5da88a
PJ
1338test "$program_prefix" != NONE &&
1339 program_transform_name="s,^,$program_prefix,;$program_transform_name"
1340# Use a double $ so make ignores it.
1341test "$program_suffix" != NONE &&
1342 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1343# Double any \ or $. echo might interpret backslashes.
1344# By default was `s,x,x', remove it if useless.
1345cat <<\_ACEOF >conftest.sed
1346s/[\\$]/&&/g;s/;s,x,x,$//
1347_ACEOF
1348program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1349rm conftest.sed
1350
c0d27fcc 1351
ba4481b5
DL
1352lispdir='${datadir}/emacs/${version}/lisp'
1353locallisppath='${datadir}/emacs/${version}/site-lisp:'\
1354'${datadir}/emacs/site-lisp:${datadir}/emacs/${version}/leim'
1355lisppath='${locallisppath}:${lispdir}'
1356etcdir='${datadir}/emacs/${version}/etc'
1357archlibdir='${libexecdir}/emacs/${version}/${configuration}'
1358docdir='${datadir}/emacs/${version}/etc'
24b01ec4 1359gamedir='${localstatedir}/games/emacs'
98418dba
CW
1360
1361gameuser=games
1362
c0d27fcc 1363
ba4481b5
DL
1364# Check whether --with-gcc or --without-gcc was given.
1365if test "${with_gcc+set}" = set; then
1366 withval="$with_gcc"
503d2be0
AS
1367
1368fi;
ba4481b5
DL
1369
1370# Check whether --with-pop or --without-pop was given.
1371if test "${with_pop+set}" = set; then
1372 withval="$with_pop"
243cf185 1373 if test "$withval" = yes; then
c0d27fcc 1374 cat >>confdefs.h <<\_ACEOF
ba4481b5 1375#define MAIL_USE_POP 1
c0d27fcc 1376_ACEOF
ba4481b5 1377
243cf185
DL
1378else :
1379fi
3d9fec71 1380else
c0d27fcc 1381 cat >>confdefs.h <<\_ACEOF
3d9fec71 1382#define MAIL_USE_POP 1
c0d27fcc 1383_ACEOF
3d9fec71 1384
503d2be0 1385fi;
ba4481b5 1386
c0d27fcc 1387
a21616bd
KR
1388# Check whether --with-kerberos or --without-kerberos was given.
1389if test "${with_kerberos+set}" = set; then
1390 withval="$with_kerberos"
c0d27fcc 1391 cat >>confdefs.h <<\_ACEOF
a21616bd 1392#define KERBEROS 1
c0d27fcc 1393_ACEOF
a21616bd 1394
503d2be0 1395fi;
a21616bd 1396
c0d27fcc 1397
a21616bd
KR
1398# Check whether --with-kerberos5 or --without-kerberos5 was given.
1399if test "${with_kerberos5+set}" = set; then
1400 withval="$with_kerberos5"
1401 if test "${with_kerberos5+set}" = set; then
1402 if test "${with_kerberos+set}" != set; then
1403 with_kerberos=yes
c0d27fcc 1404 cat >>confdefs.h <<\_ACEOF
a21616bd 1405#define KERBEROS 1
c0d27fcc 1406_ACEOF
a21616bd
KR
1407
1408 fi
1409fi
b936fae4 1410
c0d27fcc 1411cat >>confdefs.h <<\_ACEOF
a21616bd 1412#define KERBEROS5 1
c0d27fcc 1413_ACEOF
a21616bd 1414
503d2be0 1415fi;
a21616bd 1416
ba4481b5
DL
1417# Check whether --with-hesiod or --without-hesiod was given.
1418if test "${with_hesiod+set}" = set; then
1419 withval="$with_hesiod"
b936fae4 1420
c0d27fcc 1421cat >>confdefs.h <<\_ACEOF
ba4481b5 1422#define HESIOD 1
c0d27fcc 1423_ACEOF
ba4481b5 1424
503d2be0 1425fi;
ba4481b5 1426
c0d27fcc 1427
2c9dccc9
PJ
1428# Check whether --with-sound or --without-sound was given.
1429if test "${with_sound+set}" = set; then
1430 withval="$with_sound"
1431
1432fi;
1433
c0d27fcc 1434
ba4481b5
DL
1435# Check whether --with-x-toolkit or --without-x-toolkit was given.
1436if test "${with_x_toolkit+set}" = set; then
1437 withval="$with_x_toolkit"
1438 case "${withval}" in
1439 y | ye | yes ) val=athena ;;
1440 n | no ) val=no ;;
1441 l | lu | luc | luci | lucid ) val=lucid ;;
1442 a | at | ath | athe | athen | athena ) val=athena ;;
1443 m | mo | mot | moti | motif ) val=motif ;;
488dd4c4 1444 g | gt | gtk ) val=gtk ;;
ba4481b5 1445 * )
c0d27fcc 1446{ { echo "$as_me:$LINENO: error: \`--with-x-toolkit=$withval' is invalid\;
488dd4c4 1447this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif' or \`gtk'.
503d2be0
AS
1448Currently, \`yes', \`athena' and \`lucid' are synonyms." >&5
1449echo "$as_me: 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." >&2;}
1452 { (exit 1); exit 1; }; }
ba4481b5
DL
1453 ;;
1454 esac
1455 with_x_toolkit=$val
1456
503d2be0 1457fi;
ba4481b5
DL
1458
1459# Check whether --with-xpm or --without-xpm was given.
1460if test "${with_xpm+set}" = set; then
1461 withval="$with_xpm"
503d2be0
AS
1462
1463fi;
ba4481b5
DL
1464
1465# Check whether --with-jpeg or --without-jpeg was given.
1466if test "${with_jpeg+set}" = set; then
1467 withval="$with_jpeg"
503d2be0
AS
1468
1469fi;
ba4481b5
DL
1470
1471# Check whether --with-tiff or --without-tiff was given.
1472if test "${with_tiff+set}" = set; then
1473 withval="$with_tiff"
503d2be0
AS
1474
1475fi;
ba4481b5
DL
1476
1477# Check whether --with-gif or --without-gif was given.
1478if test "${with_gif+set}" = set; then
1479 withval="$with_gif"
503d2be0
AS
1480
1481fi;
ba4481b5
DL
1482
1483# Check whether --with-png or --without-png was given.
1484if test "${with_png+set}" = set; then
1485 withval="$with_png"
503d2be0
AS
1486
1487fi;
ba4481b5 1488
488dd4c4
JD
1489# Check whether --with-gtk or --without-gtk was given.
1490if test "${with_gtk+set}" = set; then
1491 withval="$with_gtk"
1492
1493fi;
1494
1495# Check whether --with-pkg-config-prog or --without-pkg-config-prog was given.
1496if test "${with_pkg_config_prog+set}" = set; then
1497 withval="$with_pkg_config_prog"
1498
1499fi;
1500
ba4481b5
DL
1501# Check whether --with-toolkit-scroll-bars or --without-toolkit-scroll-bars was given.
1502if test "${with_toolkit_scroll_bars+set}" = set; then
1503 withval="$with_toolkit_scroll_bars"
503d2be0
AS
1504
1505fi;
ba4481b5 1506
1d36487c
GM
1507# Check whether --with-xim or --without-xim was given.
1508if test "${with_xim+set}" = set; then
1509 withval="$with_xim"
1d36487c 1510
503d2be0 1511fi;
ba4481b5 1512
e0f712ba
AC
1513# Check whether --with-carbon or --without-carbon was given.
1514if test "${with_carbon+set}" = set; then
1515 withval="$with_carbon"
1516
1517fi;
6a3a24fa
JD
1518# Check whether --enable-carbon-app or --disable-carbon-app was given.
1519if test "${enable_carbon_app+set}" = set; then
1520 enableval="$enable_carbon_app"
1521 carbon_appdir_x=${enableval}
1522fi;
e0f712ba 1523
d0098f13
JD
1524# Check whether --enable-asserts or --disable-asserts was given.
1525if test "${enable_asserts+set}" = set; then
1526 enableval="$enable_asserts"
1527 USE_XASSERTS=$enableval
1528else
1529 USE_XASSERTS=no
1530fi;
1531
19650fd6
AS
1532# Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
1533if test "${enable_maintainer_mode+set}" = set; then
1534 enableval="$enable_maintainer_mode"
1535 USE_MAINTAINER_MODE=$enableval
1536else
1537 USE_MAINTAINER_MODE=no
1538fi;
1539if test $USE_MAINTAINER_MODE = yes; then
1540 MAINT=
1541else
1542 MAINT=#
1543fi
1544
1545
ba4481b5 1546#### Make srcdir absolute, if it isn't already. It's important to
17494071 1547#### avoid running the path through pwd unnecessarily, since pwd can
ba4481b5
DL
1548#### give you automounter prefixes, which can go away. We do all this
1549#### so Emacs can find its files when run uninstalled.
17494071
GM
1550## Make sure CDPATH doesn't affect cd (in case PWD is relative).
1551unset CDPATH
ba4481b5
DL
1552case "${srcdir}" in
1553 /* ) ;;
1554 . )
1555 ## We may be able to use the $PWD environment variable to make this
1556 ## absolute. But sometimes PWD is inaccurate.
df645f7c
AS
1557 ## Note: we used to use ${PWD} at the end instead of `pwd`,
1558 ## but that tested only for a well-formed and valid PWD,
1559 ## it did not object when PWD was well-formed and valid but just wrong.
1560 if test ".${PWD}" != "." && test ".`(cd ${PWD} ; sh -c pwd)`" = ".`pwd`" ;
ba4481b5
DL
1561 then
1562 srcdir="$PWD"
1563 else
1564 srcdir="`(cd ${srcdir}; pwd)`"
1565 fi
1566 ;;
1567 * ) srcdir="`(cd ${srcdir}; pwd)`" ;;
1568esac
1569
1570#### Check if the source directory already has a configured system in it.
1571if test `pwd` != `(cd ${srcdir} && pwd)` \
1572 && test -f "${srcdir}/src/config.h" ; then
c0d27fcc 1573 { echo "$as_me:$LINENO: WARNING: The directory tree \`${srcdir}' is being used
503d2be0
AS
1574 as a build directory right now; it has been configured in its own
1575 right. To configure in another directory as well, you MUST
1576 use GNU make. If you do not have GNU make, then you must
1577 now do \`make distclean' in ${srcdir},
1578 and then run $0 again." >&5
1579echo "$as_me: WARNING: The directory tree \`${srcdir}' is being used
ba4481b5
DL
1580 as a build directory right now; it has been configured in its own
1581 right. To configure in another directory as well, you MUST
1582 use GNU make. If you do not have GNU make, then you must
1583 now do \`make distclean' in ${srcdir},
503d2be0 1584 and then run $0 again." >&2;}
ba4481b5
DL
1585fi
1586
1587#### Given the configuration name, set machfile and opsysfile to the
1588#### names of the m/*.h and s/*.h files we should use.
1589
1590### Canonicalize the configuration name.
1591
1592ac_aux_dir=
1593for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1594 if test -f $ac_dir/install-sh; then
1595 ac_aux_dir=$ac_dir
1596 ac_install_sh="$ac_aux_dir/install-sh -c"
1597 break
1598 elif test -f $ac_dir/install.sh; then
1599 ac_aux_dir=$ac_dir
1600 ac_install_sh="$ac_aux_dir/install.sh -c"
1601 break
503d2be0
AS
1602 elif test -f $ac_dir/shtool; then
1603 ac_aux_dir=$ac_dir
1604 ac_install_sh="$ac_aux_dir/shtool install -c"
1605 break
ba4481b5
DL
1606 fi
1607done
1608if test -z "$ac_aux_dir"; then
c0d27fcc 1609 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
503d2be0
AS
1610echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1611 { (exit 1); exit 1; }; }
ba4481b5 1612fi
503d2be0
AS
1613ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1614ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1615ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
ba4481b5
DL
1616
1617# Make sure we can run config.sub.
503d2be0 1618$ac_config_sub sun4 >/dev/null 2>&1 ||
c0d27fcc 1619 { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
503d2be0
AS
1620echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1621 { (exit 1); exit 1; }; }
1622
c0d27fcc 1623echo "$as_me:$LINENO: checking build system type" >&5
503d2be0
AS
1624echo $ECHO_N "checking build system type... $ECHO_C" >&6
1625if test "${ac_cv_build+set}" = set; then
1626 echo $ECHO_N "(cached) $ECHO_C" >&6
1627else
1628 ac_cv_build_alias=$build_alias
1629test -z "$ac_cv_build_alias" &&
1630 ac_cv_build_alias=`$ac_config_guess`
1631test -z "$ac_cv_build_alias" &&
c0d27fcc 1632 { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
503d2be0
AS
1633echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1634 { (exit 1); exit 1; }; }
1635ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
c0d27fcc
MR
1636 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
1637echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
503d2be0
AS
1638 { (exit 1); exit 1; }; }
1639
1640fi
c0d27fcc 1641echo "$as_me:$LINENO: result: $ac_cv_build" >&5
503d2be0
AS
1642echo "${ECHO_T}$ac_cv_build" >&6
1643build=$ac_cv_build
1644build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1645build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1646build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1647
c0d27fcc
MR
1648
1649echo "$as_me:$LINENO: checking host system type" >&5
503d2be0
AS
1650echo $ECHO_N "checking host system type... $ECHO_C" >&6
1651if test "${ac_cv_host+set}" = set; then
1652 echo $ECHO_N "(cached) $ECHO_C" >&6
1653else
1654 ac_cv_host_alias=$host_alias
1655test -z "$ac_cv_host_alias" &&
1656 ac_cv_host_alias=$ac_cv_build_alias
1657ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
c0d27fcc 1658 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
503d2be0
AS
1659echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1660 { (exit 1); exit 1; }; }
1661
1662fi
c0d27fcc 1663echo "$as_me:$LINENO: result: $ac_cv_host" >&5
503d2be0
AS
1664echo "${ECHO_T}$ac_cv_host" >&6
1665host=$ac_cv_host
1666host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1667host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1668host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
ba4481b5 1669
c0d27fcc 1670
ba4481b5 1671canonical=$host
531a3336 1672configuration=${host_alias-$host}
ba4481b5 1673
c0d27fcc 1674
22044edf 1675
ba4481b5
DL
1676### If you add support for a new configuration, add code to this
1677### switch statement to recognize your configuration name and select
1678### the appropriate operating system and machine description files.
1679
1680### You would hope that you could choose an m/*.h file pretty much
1681### based on the machine portion of the configuration name, and an s-
1682### file based on the operating system portion. However, it turns out
1683### that each m/*.h file is pretty manufacturer-specific - for
1684### example, apollo.h, hp9000s300.h, mega68k, news.h, and tad68k are
1685### all 68000 machines; mips.h, pmax.h, and news-risc are all MIPS
1686### machines. So we basically have to have a special case for each
1687### configuration name.
1688###
1689### As far as handling version numbers on operating systems is
1690### concerned, make sure things will fail in a fixable way. If
1691### /etc/MACHINES doesn't say anything about version numbers, be
1692### prepared to handle anything reasonably. If version numbers
1693### matter, be sure /etc/MACHINES says something about it.
1694###
1695### Eric Raymond says we should accept strings like "sysvr4" to mean
1696### "System V Release 4"; he writes, "The old convention encouraged
1697### confusion between `system' and `release' levels'."
1698
1699machine='' opsys='' unported=no
1700case "${canonical}" in
1701
1096bcc0
GM
1702 ## FreeBSD ports
1703 *-*-freebsd* )
1704 opsys=freebsd
1705 case "${canonical}" in
1706 alpha*-*-freebsd*) machine=alpha ;;
1707 i[3456]86-*-freebsd*) machine=intel386 ;;
1708 esac
1709 ;;
1710
ba4481b5
DL
1711 ## NetBSD ports
1712 *-*-netbsd* )
1713 opsys=netbsd
dd038e26 1714 if test -f /usr/lib/crti.o; then
f57bd967
DL
1715
1716cat >>confdefs.h <<\_ACEOF
1717#define HAVE_CRTIN
dd038e26
AS
1718_ACEOF
1719
1720 fi
1721
ba4481b5
DL
1722 case "${canonical}" in
1723 alpha*-*-netbsd*) machine=alpha ;;
1724 i[3456]86-*-netbsd*) machine=intel386 ;;
1725 m68k-*-netbsd*)
1726 # This is somewhat bogus.
1727 machine=hp9000s300 ;;
1728 powerpc-apple-netbsd*) machine=macppc ;;
1729 mips-*-netbsd*) machine=pmax ;;
2df636f4 1730 mipsel-*-netbsd*) machine=pmax ;;
97836269 1731 mipseb-*-netbsd*) machine=pmax ;;
ba4481b5 1732 ns32k-*-netbsd*) machine=ns32000 ;;
3a64eef5 1733 powerpc-*-netbsd*) machine=macppc ;;
71c9ec51 1734 sparc*-*-netbsd*) machine=sparc ;;
ba4481b5 1735 vax-*-netbsd*) machine=vax ;;
2df636f4 1736 arm-*-netbsd*) machine=arm ;;
ba4481b5
DL
1737 esac
1738 ;;
1739
1740 ## OpenBSD ports
1741 *-*-openbsd* )
1742 opsys=openbsd
1743 case "${canonical}" in
1744 alpha*-*-openbsd*) machine=alpha ;;
1745 i386-*-openbsd*) machine=intel386 ;;
1746 m68k-*-openbsd*) machine=hp9000s300 ;;
1747 mipsel-*-openbsd*) machine=pmax ;;
1748 ns32k-*-openbsd*) machine=ns32000 ;;
1749 sparc-*-openbsd*) machine=sparc ;;
1750 vax-*-openbsd*) machine=vax ;;
1751 esac
1752 ;;
1753
1754 ## Acorn RISCiX:
1755 arm-acorn-riscix1.1* )
1756 machine=acorn opsys=riscix1-1
1757 ;;
1758 arm-acorn-riscix1.2* | arm-acorn-riscix )
1759 ## This name is riscix12 instead of riscix1.2
1760 ## to avoid a file name conflict on MSDOS.
1761 machine=acorn opsys=riscix12
1762 ;;
1763
1764 ## BSDI ports
1765 *-*-bsdi* )
1766 opsys=bsdi
1767 case "${canonical}" in
1768 i[345]86-*-bsdi*) machine=intel386 ;;
1769 sparc-*-bsdi*) machine=sparc ;;
3aeecf97 1770 powerpc-*-bsdi*) machine=macppc ;;
ba4481b5
DL
1771 esac
1772 case "${canonical}" in
1773 *-*-bsd386* | *-*-bsdi1* ) opsys=bsd386 ;;
1774 *-*-bsdi2.0* ) opsys=bsdos2 ;;
1775 *-*-bsdi2* ) opsys=bsdos2-1 ;;
1776 *-*-bsdi3* ) opsys=bsdos3 ;;
1d06fc82 1777 *-*-bsdi[45]* ) opsys=bsdos4 ;;
ba4481b5
DL
1778 esac
1779 ;;
1780
1781 ## Alliant machines
1782 ## Strictly speaking, we need the version of the alliant operating
1783 ## system to choose the right machine file, but currently the
1784 ## configuration name doesn't tell us enough to choose the right
1785 ## one; we need to give alliants their own operating system name to
1786 ## do this right. When someone cares, they can help us.
1787 fx80-alliant-* )
1788 machine=alliant4 opsys=bsd4-2
1789 ;;
1790 i860-alliant-* )
1791 machine=alliant-2800 opsys=bsd4-3
1792 ;;
1793
1794 ## Alpha (DEC) machines.
1795 alpha*-dec-osf* )
1796 machine=alpha opsys=osf1
1797 # This is needed to find X11R6.1 libraries for certain tests.
1798 NON_GCC_LINK_TEST_OPTIONS=-Wl,-rpath,/usr/X11R6/lib
1799 GCC_LINK_TEST_OPTIONS=-Wl,-rpath,/usr/X11R6/lib
34979055
DL
1800 # NON_GNU_CPP is necessary on 5.0 to avoid mangling src/Makefile
1801 # due to non-traditional preprocessing with the current compiler
1802 # defaults. OSF 4 can also have that compiler version, and there
1803 # seems always to have been a usable /usr/bin/cpp.
1804 NON_GNU_CPP=/usr/bin/cpp
ca512671 1805 case "${canonical}" in
a55b799a 1806 alpha*-dec-osf[5-9]*)
bb17930d 1807 opsys=osf5-0 ;;
ca512671 1808 esac
ba4481b5
DL
1809 ;;
1810
1811 alpha*-*-linux-gnu* )
1812 machine=alpha opsys=gnu-linux
1813 ;;
1814
c4bb2108
DL
1815 arm*-*-linux-gnu* )
1816 machine=arm opsys=gnu-linux
1817 ;;
1818
ba4481b5
DL
1819 ## Altos 3068
1820 m68*-altos-sysv* )
1821 machine=altos opsys=usg5-2
1822 ;;
1823
1824 ## Amdahl UTS
1825 580-amdahl-sysv* )
1826 machine=amdahl opsys=usg5-2-2
1827 ;;
1828
1829 ## Apollo, Domain/OS
1830 m68*-apollo-* )
1831 machine=apollo opsys=bsd4-3
1832 ;;
1833
1834 ## AT&T 3b2, 3b5, 3b15, 3b20
1835 we32k-att-sysv* )
1836 machine=att3b opsys=usg5-2-2
1837 ;;
1838
1839 ## AT&T 3b1 - The Mighty Unix PC!
1840 m68*-att-sysv* )
1841 machine=7300 opsys=usg5-2-2
1842 ;;
1843
1844 ## Bull dpx20
1845 rs6000-bull-bosx* )
1846 machine=ibmrs6000 opsys=aix3-2
1847 ;;
1848
1849 ## Bull dpx2
1850 m68*-bull-sysv3* )
1851 machine=dpx2 opsys=usg5-3
1852 ;;
1853
1854 ## Bull sps7
1855 m68*-bull-sysv2* )
1856 machine=sps7 opsys=usg5-2
1857 ;;
1858
1859 ## CCI 5/32, 6/32 -- see "Tahoe".
1860
1861 ## Celerity
1862 ## I don't know what configuration name to use for this; config.sub
1863 ## doesn't seem to know anything about it. Hey, Celerity users, get
1864 ## in touch with us!
1865 celerity-celerity-bsd* )
1866 machine=celerity opsys=bsd4-2
1867 ;;
1868
1869 ## Clipper
1870 ## What operating systems does this chip run that Emacs has been
1871 ## tested on?
1872 clipper-* )
1873 machine=clipper
1874 ## We'll use the catch-all code at the bottom to guess the
1875 ## operating system.
1876 ;;
1877
df645f7c
AS
1878 ## Compaq Nonstop
1879 mips-compaq-nonstopux* )
1880 machine=nonstopux opsys=nonstopux
1881 ;;
1882
ba4481b5
DL
1883 ## Convex
1884 *-convex-bsd* | *-convex-convexos* )
1885 machine=convex opsys=bsd4-3
1886 ## Prevents spurious white space in makefiles - d.m.cooke@larc.nasa.gov
1887 NON_GNU_CPP="cc -E -P"
1888 ;;
1889
1890 ## Cubix QBx/386
1891 i[3456]86-cubix-sysv* )
1892 machine=intel386 opsys=usg5-3
1893 ;;
1894
1895 ## Cydra 5
1896 cydra*-cydrome-sysv* )
1897 machine=cydra5 opsys=usg5-3
1898 ;;
1899
1900 ## Data General AViiON Machines
1901 ## DG changed naming conventions with the release of 5.4.4.10, they
1902 ## dropped the initial 5.4 but left the intervening R. Because of the
1903 ## R this shouldn't conflict with older versions of the OS (which I
1904 ## think were named like dgux4.*). In addition, DG new AViiONs series
1905 ## uses either Motorola M88k or Intel Pentium CPUs.
1906 m88k-dg-dguxR4.* | m88k-dg-dgux4* )
1907 machine=aviion opsys=dgux4
1908 ;;
1909 m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* )
1910 ## This name is dgux5-4-3 instead of dgux5-4r3
1911 ## to avoid a file name conflict on MSDOS.
1912 machine=aviion opsys=dgux5-4-3
1913 ;;
1914 m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* )
1915 machine=aviion opsys=dgux5-4r2
1916 ;;
1917 m88k-dg-dgux* )
1918 machine=aviion opsys=dgux
1919 ;;
1920
1921 ## Data General AViiON Intel (x86) Machines
1922 ## Exists from 5.4.3 (current i586-dg-dguxR4.11)
1923 ## Ehud Karni, 1998-may-30, ehud@unix.simonwiesel.co.il
1924 i[345]86-dg-dguxR4* )
1925 machine=aviion-intel opsys=dgux4
1926 ;;
1927
1928 ## DECstations
1929 mips-dec-ultrix[0-3].* | mips-dec-ultrix4.0* | mips-dec-bsd4.2* )
1930 machine=pmax opsys=bsd4-2
1931 ;;
1932 mips-dec-ultrix4.[12]* | mips-dec-bsd* )
1933 machine=pmax opsys=bsd4-3
1934 ;;
1935 mips-dec-ultrix* )
1936 machine=pmax opsys=ultrix4-3
1937 ;;
1938 mips-dec-osf* )
1939 machine=pmax opsys=osf1
1940 ;;
1941 mips-dec-mach_bsd4.3* )
1942 machine=pmax opsys=mach-bsd4-3
1943 ;;
1944
cd890796
JD
1945 ## Motorola Delta machines
1946 m68k-motorola-sysv* | m68000-motorola-sysv* )
1947 machine=delta opsys=usg5-3
1948 if test -z "`type gnucc | grep 'not found'`"
1949 then
1950 if test -s /etc/167config
1951 then CC="gnucc -m68040"
1952 else CC="gnucc -m68881"
1953 fi
1954 else
1955 if test -z "`type gcc | grep 'not found'`"
1956 then CC=gcc
1957 else CC=cc
1958 fi
1959 fi
1960 ;;
ba4481b5
DL
1961 m88k-motorola-sysv4* )
1962 # jbotte@bnr.ca says that UNIX_System_V <hostName> 4.0 R40V4.3 m88k mc88110
1963 # needs POSIX_SIGNALS and therefore needs usg5-4-2.
1964 # I hope there are not other 4.0 versions for this machine
1965 # which really need usg5-4 instead.
1966 machine=delta88k opsys=usg5-4-2
1967 ;;
1968 m88k-motorola-sysv* | m88k-motorola-m88kbcs* )
1969 machine=delta88k opsys=usg5-3
1970 ;;
1971
1972 ## Dual machines
1973 m68*-dual-sysv* )
1974 machine=dual opsys=usg5-2
1975 ;;
1976 m68*-dual-uniplus* )
1977 machine=dual opsys=unipl5-2
1978 ;;
1979
1980 ## Elxsi 6400
1981 elxsi-elxsi-sysv* )
1982 machine=elxsi opsys=usg5-2
1983 ;;
1984
1985 ## Encore machines
1986 ns16k-encore-bsd* )
1987 machine=ns16000 opsys=umax
1988 ;;
1989
65171e3a
DL
1990 ## The GEC 63 - apparently, this port isn't really finished yet.
1991 # I'm sure we finished off the last of the machines, though. -- fx
ba4481b5
DL
1992
1993 ## Gould Power Node and NP1
1994 pn-gould-bsd4.2* )
1995 machine=gould opsys=bsd4-2
1996 ;;
1997 pn-gould-bsd4.3* )
1998 machine=gould opsys=bsd4-3
1999 ;;
2000 np1-gould-bsd* )
2001 machine=gould-np1 opsys=bsd4-3
2002 ;;
2003
2004 ## Harris Night Hawk machines running CX/UX (a 5000 looks just like a 4000
2005 ## as far as Emacs is concerned).
2006 m88k-harris-cxux* )
2007 # Build needs to be different on 7.0 and later releases
2008 case "`uname -r`" in
2009 [56].[0-9] ) machine=nh4000 opsys=cxux ;;
2010 [7].[0-9] ) machine=nh4000 opsys=cxux7 ;;
2011 esac
2012 NON_GNU_CPP="/lib/cpp"
2013 ;;
2014 ## Harris ecx or gcx running CX/UX (Series 1200, Series 3000)
2015 m68k-harris-cxux* )
2016 machine=nh3000 opsys=cxux
2017 ;;
2018 ## Harris power pc NightHawk running Power UNIX (Series 6000)
2019 powerpc-harris-powerunix )
2020 machine=nh6000 opsys=powerunix
2021 NON_GNU_CPP="cc -Xo -E -P"
2022 ;;
2023 ## SR2001/SR2201 running HI-UX/MPP
2024 hppa1.1-hitachi-hiuxmpp* )
2025 machine=sr2k opsys=hiuxmpp
2026 ;;
89a336fa
GM
2027 hppa1.1-hitachi-hiuxwe2* )
2028 machine=sr2k opsys=hiuxwe2
2029 ;;
ba4481b5
DL
2030 ## Honeywell XPS100
2031 xps*-honeywell-sysv* )
2032 machine=xps100 opsys=usg5-2
2033 ;;
2034
2035 ## HP 9000 series 200 or 300
2036 m68*-hp-bsd* )
2037 machine=hp9000s300 opsys=bsd4-3
2038 ;;
2039 ## HP/UX 7, 8, 9, and 10 are supported on these machines.
2040 m68*-hp-hpux* )
2041 case "`uname -r`" in
2042 ## Someone's system reports A.B8.05 for this.
2043 ## I wonder what other possibilities there are.
2044 *.B8.* ) machine=hp9000s300 opsys=hpux8 ;;
2045 *.08.* ) machine=hp9000s300 opsys=hpux8 ;;
2046 *.09.* ) machine=hp9000s300 opsys=hpux9 ;;
2047 *.1[0-9].* ) machine=hp9000s300 opsys=hpux9shr ;;
2048 *) machine=hp9000s300 opsys=hpux ;;
2049 esac
2050 ;;
2051
2052 ## HP 9000 series 700 and 800, running HP/UX
2053 hppa*-hp-hpux7* )
2054 machine=hp800 opsys=hpux
2055 ;;
2056 hppa*-hp-hpux8* )
2057 machine=hp800 opsys=hpux8
2058 ;;
2059 hppa*-hp-hpux9shr* )
2060 machine=hp800 opsys=hpux9shr
2061 ;;
2062 hppa*-hp-hpux9* )
2063 machine=hp800 opsys=hpux9
2064 ;;
b0e44248
RB
2065 hppa*-hp-hpux10.2* )
2066 machine=hp800 opsys=hpux10-20
2067 ;;
cc227489 2068 hppa*-hp-hpux10* )
ba4481b5
DL
2069 machine=hp800 opsys=hpux10
2070 ;;
cc227489
MB
2071 hppa*-hp-hpux1[1-9]* )
2072 machine=hp800 opsys=hpux11
2073 ;;
ba4481b5 2074
409d9577
GM
2075 hppa*-*-linux-gnu* )
2076 machine=hp800 opsys=gnu-linux
2077 ;;
2078
ba4481b5
DL
2079 ## HP 9000 series 700 and 800, running HP/UX
2080 hppa*-hp-hpux* )
2081 ## Cross-compilation? Nah!
2082 case "`uname -r`" in
2083 ## Someone's system reports A.B8.05 for this.
2084 ## I wonder what other possibilities there are.
2085 *.B8.* ) machine=hp800 opsys=hpux8 ;;
2086 *.08.* ) machine=hp800 opsys=hpux8 ;;
2087 *.09.* ) machine=hp800 opsys=hpux9 ;;
2088 *) machine=hp800 opsys=hpux10 ;;
2089 esac
2090 ;;
2091 hppa*-*-nextstep* )
2092 machine=hp800 opsys=nextstep
2093 ;;
2094
2095 ## Orion machines
2096 orion-orion-bsd* )
2097 machine=orion opsys=bsd4-2
2098 ;;
2099 clipper-orion-bsd* )
2100 machine=orion105 opsys=bsd4-2
2101 ;;
2102
2103 ## IBM machines
2104 i[3456]86-ibm-aix1.1* )
2105 machine=ibmps2-aix opsys=usg5-2-2
2106 ;;
2107 i[3456]86-ibm-aix1.[23]* | i[3456]86-ibm-aix* )
2108 machine=ibmps2-aix opsys=usg5-3
2109 ;;
2110 i370-ibm-aix*)
2111 machine=ibm370aix opsys=usg5-3
2112 ;;
55597d70 2113 s390-*-linux-gnu* )
138f0859
GM
2114 machine=ibms390 opsys=gnu-linux
2115 ;;
ba4481b5
DL
2116 rs6000-ibm-aix3.1* | powerpc-ibm-aix3.1* )
2117 machine=ibmrs6000 opsys=aix3-1
2118 ;;
2119 rs6000-ibm-aix3.2.5 | powerpc-ibm-aix3.2.5 )
2120 machine=ibmrs6000 opsys=aix3-2-5
2121 ;;
2122 rs6000-ibm-aix4.1* | powerpc-ibm-aix4.1* )
2123 machine=ibmrs6000 opsys=aix4-1
2124 ;;
2125 rs6000-ibm-aix4.2* | powerpc-ibm-aix4.2* )
2126 machine=ibmrs6000 opsys=aix4-2
2127 ;;
55597d70 2128 rs6000-ibm-aix5* | powerpc-ibm-aix5* )
d6b82250
EZ
2129 machine=ibmrs6000 opsys=aix4-2
2130 ;;
ba4481b5
DL
2131 rs6000-ibm-aix4.0* | powerpc-ibm-aix4.0* )
2132 machine=ibmrs6000 opsys=aix4
2133 ;;
2134 rs6000-ibm-aix4* | powerpc-ibm-aix4* )
2135 machine=ibmrs6000 opsys=aix4-1
2136 ;;
2137 rs6000-ibm-aix* | powerpc-ibm-aix* )
2138 machine=ibmrs6000 opsys=aix3-2
2139 ;;
2140 romp-ibm-bsd4.3* )
2141 machine=ibmrt opsys=bsd4-3
2142 ;;
2143 romp-ibm-bsd4.2* )
2144 machine=ibmrt opsys=bsd4-2
2145 ;;
2146 romp-ibm-aos4.3* )
2147 machine=ibmrt opsys=bsd4-3
2148 ;;
2149 romp-ibm-aos4.2* )
2150 machine=ibmrt opsys=bsd4-2
2151 ;;
2152 romp-ibm-aos* )
2153 machine=ibmrt opsys=bsd4-3
2154 ;;
2155 romp-ibm-bsd* )
2156 machine=ibmrt opsys=bsd4-3
2157 ;;
2158 romp-ibm-aix* )
2159 machine=ibmrt-aix opsys=usg5-2-2
2160 ;;
2161
2162 ## Integrated Solutions `Optimum V'
2163 m68*-isi-bsd4.2* )
2164 machine=isi-ov opsys=bsd4-2
2165 ;;
2166 m68*-isi-bsd4.3* )
2167 machine=isi-ov opsys=bsd4-3
2168 ;;
2169
2170 ## Intel 386 machines where we do care about the manufacturer
2171 i[3456]86-intsys-sysv* )
2172 machine=is386 opsys=usg5-2-2
2173 ;;
2174
2175 ## Prime EXL
2176 i[3456]86-prime-sysv* )
2177 machine=i386 opsys=usg5-3
2178 ;;
2179
2180 ## Sequent Symmetry running Dynix
2181 i[3456]86-sequent-bsd* )
2182 machine=symmetry opsys=bsd4-3
2183 ;;
2184
2185 ## Sequent Symmetry running ptx 4, which is a modified SVR4.
2186 i[3456]86-sequent-ptx4* | i[3456]86-sequent-sysv4* )
2187 machine=sequent-ptx opsys=ptx4
2188 NON_GNU_CPP=/lib/cpp
2189 ;;
2190
2191 ## Sequent Symmetry running DYNIX/ptx
2192 ## Use the old cpp rather than the newer ANSI one.
2193 i[3456]86-sequent-ptx* )
2194 machine=sequent-ptx opsys=ptx
2195 NON_GNU_CPP="/lib/cpp"
2196 ;;
2197
2198 ## ncr machine running svr4.3.
2199 i[3456]86-ncr-sysv4.3 )
2200 machine=ncr386 opsys=usg5-4-3
2201 ;;
2202
2203 ## Unspecified sysv on an ncr machine defaults to svr4.2.
2204 ## (Plain usg5-4 doesn't turn on POSIX signals, which we need.)
2205 i[3456]86-ncr-sysv* )
2206 machine=ncr386 opsys=usg5-4-2
2207 ;;
2208
2209 ## Intel Paragon OSF/1
2210 i860-intel-osf1* )
2211 machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp
2212 ;;
2213
2214 ## Intel 860
2215 i860-*-sysv4* )
2216 machine=i860 opsys=usg5-4
2217 NON_GNU_CC="/bin/cc" # Ie, not the one in /usr/ucb/cc.
2218 NON_GNU_CPP="/usr/ccs/lib/cpp" # cc -E tokenizes macro expansion.
2219 ;;
2220
c76e04a8
GM
2221 ## Macintosh PowerPC
2222 powerpc*-*-linux-gnu* )
2223 machine=macppc opsys=gnu-linux
2224 ;;
2225
ba4481b5
DL
2226 ## Masscomp machines
2227 m68*-masscomp-rtu* )
2228 machine=masscomp opsys=rtu
2229 ;;
2230
2231 ## Megatest machines
2232 m68*-megatest-bsd* )
2233 machine=mega68 opsys=bsd4-2
2234 ;;
2235
2236 ## Workstations sold by MIPS
2237 ## This is not necessarily all workstations using the MIPS processor -
2238 ## Irises are produced by SGI, and DECstations by DEC.
2239
2240 ## etc/MACHINES lists mips.h and mips4.h as possible machine files,
2241 ## and usg5-2-2 and bsd4-3 as possible OS files. The only guidance
2242 ## it gives for choosing between the alternatives seems to be "Use
2243 ## -machine=mips4 for RISCOS version 4; use -opsystem=bsd4-3 with
2244 ## the BSD world." I'll assume that these are instructions for
2245 ## handling two odd situations, and that every other situation
2246 ## should use mips.h and usg5-2-2, they being listed first.
2247 mips-mips-usg* )
2248 machine=mips4
2249 ## Fall through to the general code at the bottom to decide on the OS.
2250 ;;
2251 mips-mips-riscos4* )
2252 machine=mips4 opsys=bsd4-3
2253 NON_GNU_CC="cc -systype bsd43"
2254 NON_GNU_CPP="cc -systype bsd43 -E"
2255 ;;
2256 mips-mips-riscos5* )
2257 machine=mips4 opsys=riscos5
2258 NON_GNU_CC="cc -systype bsd43"
2259 NON_GNU_CPP="cc -systype bsd43 -E"
2260 ;;
2261 mips-mips-bsd* )
2262 machine=mips opsys=bsd4-3
2263 ;;
2264 mips-mips-* )
2265 machine=mips opsys=usg5-2-2
2266 ;;
2267
2268 ## NeXT
2269 m68*-next-* | m68k-*-nextstep* )
2270 machine=m68k opsys=nextstep
2271 ;;
2272
2273 ## The complete machine from National Semiconductor
2274 ns32k-ns-genix* )
2275 machine=ns32000 opsys=usg5-2
2276 ;;
2277
2278 ## NCR machines
2279 m68*-ncr-sysv2* | m68*-ncr-sysvr2* )
2280 machine=tower32 opsys=usg5-2-2
2281 ;;
2282 m68*-ncr-sysv3* | m68*-ncr-sysvr3* )
2283 machine=tower32v3 opsys=usg5-3
2284 ;;
2285
2286 ## NEC EWS4800
2287 mips-nec-sysv4*)
2288 machine=ews4800 opsys=ux4800
2289 ;;
2290
2291 ## Nixdorf Targon 31
2292 m68*-nixdorf-sysv* )
2293 machine=targon31 opsys=usg5-2-2
2294 ;;
2295
2296 ## Nu (TI or LMI)
2297 m68*-nu-sysv* )
2298 machine=nu opsys=usg5-2
2299 ;;
2300
2301 ## Plexus
2302 m68*-plexus-sysv* )
2303 machine=plexus opsys=usg5-2
2304 ;;
2305
ba4481b5
DL
2306 ## Pyramid machines
2307 ## I don't really have any idea what sort of processor the Pyramid has,
2308 ## so I'm assuming it is its own architecture.
2309 pyramid-pyramid-bsd* )
2310 machine=pyramid opsys=bsd4-2
2311 ;;
2312
2313 ## Sequent Balance
2314 ns32k-sequent-bsd4.2* )
2315 machine=sequent opsys=bsd4-2
2316 ;;
2317 ns32k-sequent-bsd4.3* )
2318 machine=sequent opsys=bsd4-3
2319 ;;
2320
2321 ## Siemens Nixdorf
2322 mips-siemens-sysv* | mips-sni-sysv*)
2323 machine=mips-siemens opsys=usg5-4
2324 NON_GNU_CC=/usr/ccs/bin/cc
2325 NON_GNU_CPP=/usr/ccs/lib/cpp
2326 ;;
2327
2328 ## Silicon Graphics machines
2329 ## Iris 2500 and Iris 2500 Turbo (aka the Iris 3030)
2330 m68*-sgi-iris3.5* )
2331 machine=irist opsys=iris3-5
2332 ;;
2333 m68*-sgi-iris3.6* | m68*-sgi-iris*)
2334 machine=irist opsys=iris3-6
2335 ;;
2336 ## Iris 4D
2337 mips-sgi-irix3* )
2338 machine=iris4d opsys=irix3-3
2339 ;;
2340 mips-sgi-irix4* )
2341 machine=iris4d opsys=irix4-0
2342 ;;
2343 mips-sgi-irix6.5 )
2344 machine=iris4d opsys=irix6-5
946173ad
DL
2345 # Without defining _LANGUAGE_C, things get masked out in the headers
2346 # so that, for instance, grepping for `free' in stdlib.h fails and
2347 # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
2348 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
d42122a3 2349 NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C"
ba4481b5
DL
2350 ;;
2351 mips-sgi-irix6* )
2352 machine=iris4d opsys=irix6-0
c4bb2108 2353 # It's not clear whether -D_LANGUAGE_C is necessary as it is for 6.5,
946173ad
DL
2354 # but presumably it does no harm.
2355 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
d42122a3 2356 # -32 probably isn't necessary in later v.6s -- anyone know which?
ba4481b5
DL
2357 NON_GCC_TEST_OPTIONS=-32
2358 ;;
2359 mips-sgi-irix5.[01]* )
2360 machine=iris4d opsys=irix5-0
2361 ;;
2362 mips-sgi-irix5* | mips-sgi-irix* )
2363 machine=iris4d opsys=irix5-2
2364 ;;
2365
2366 ## SONY machines
2367 m68*-sony-bsd4.2* )
2368 machine=news opsys=bsd4-2
2369 ;;
2370 m68*-sony-bsd4.3* )
2371 machine=news opsys=bsd4-3
2372 ;;
2373 m68*-sony-newsos3* | m68*-sony-news3*)
2374 machine=news opsys=bsd4-3
2375 ;;
2376 mips-sony-bsd* | mips-sony-newsos4* | mips-sony-news4*)
2377 machine=news-risc opsys=bsd4-3
2378 ;;
2379 mips-sony-newsos6* )
2380 machine=news-r6 opsys=newsos6
2381 ;;
2382 mips-sony-news* )
2383 machine=news-risc opsys=newsos5
2384 ;;
2385
2386 ## Stride
2387 m68*-stride-sysv* )
2388 machine=stride opsys=usg5-2
2389 ;;
2390
2391 ## Suns
2392 sparc-*-linux-gnu* | sparc64-*-linux-gnu* )
2393 machine=sparc opsys=gnu-linux
2394 ;;
2395
d054101f 2396 *-auspex-sunos* | *-sun-sunos* | *-sun-bsd* | *-sun-solaris* \
ba4481b5
DL
2397 | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* | powerpc*-*-solaris2* \
2398 | rs6000-*-solaris2*)
2399 case "${canonical}" in
2400 m68*-sunos1* ) machine=sun1 ;;
2401 m68*-sunos2* ) machine=sun2 ;;
2402 m68* ) machine=sun3 ;;
2403 i[3456]86-sun-sunos[34]* ) machine=sun386 ;;
2404 i[3456]86-*-* ) machine=intel386 ;;
2405 powerpcle* ) machine=powerpcle ;;
2406 powerpc* | rs6000* ) machine=ibmrs6000 ;;
2407 sparc* ) machine=sparc ;;
2408 * ) unported=yes ;;
2409 esac
2410 case "${canonical}" in
2411 ## The Sun386 didn't get past 4.0.
2412 i[3456]86-*-sunos4 ) opsys=sunos4-0 ;;
2413 *-sunos4.0* ) opsys=sunos4-0 ;;
2414 *-sunos4.1.[3-9]*noshare )
2415 ## This name is sunos413 instead of sunos4-1-3
2416 ## to avoid a file name conflict on MSDOS.
2417 opsys=sunos413
2418 NON_GNU_CPP=/usr/lib/cpp
2419 NON_GCC_TEST_OPTIONS=-Bstatic
2420 GCC_TEST_OPTIONS=-static
2421 ;;
2422 *-sunos4.1.[3-9]* | *-sunos4shr*)
2423 opsys=sunos4shr
2424 NON_GNU_CPP=/usr/lib/cpp
2425 ;;
2426 *-sunos4* | *-sunos )
2427 opsys=sunos4-1
2428 NON_GCC_TEST_OPTIONS=-Bstatic
2429 GCC_TEST_OPTIONS=-static
2430 ;;
2431 *-sunos5.3* | *-solaris2.3* )
2432 opsys=sol2-3
2433 NON_GNU_CPP=/usr/ccs/lib/cpp
2434 ;;
2435 *-sunos5.4* | *-solaris2.4* )
2436 opsys=sol2-4
2437 NON_GNU_CPP=/usr/ccs/lib/cpp
2438 RANLIB="ar -ts"
2439 ;;
2440 *-sunos5.5* | *-solaris2.5* )
2441 opsys=sol2-5
2442 NON_GNU_CPP=/usr/ccs/lib/cpp
2443 RANLIB="ar -ts"
2444 ;;
8e967cf7
MR
2445 *-sunos5.6* | *-solaris2.6* )
2446 opsys=sol2-6
2447 NON_GNU_CPP=/usr/ccs/lib/cpp
2448 RANLIB="ar -ts"
2449 ;;
ba4481b5 2450 *-sunos5* | *-solaris* )
9e71690e 2451 opsys=sol2-6
ba4481b5
DL
2452 NON_GNU_CPP=/usr/ccs/lib/cpp
2453 ;;
2454 * ) opsys=bsd4-2 ;;
2455 esac
2456 ## Watch out for a compiler that we know will not work.
2457 case "${canonical}" in
2458 *-solaris* | *-sunos5* )
2459 if [ "x$CC" = x/usr/ucb/cc ]; then
2460 ## /usr/ucb/cc doesn't work;
2461 ## we should find some other compiler that does work.
2462 unset CC
2463 fi
2464 ;;
2465 *) ;;
2466 esac
2467 ;;
2468 sparc-*-nextstep* )
2469 machine=sparc opsys=nextstep
2470 ;;
2471
2472 ## Tadpole 68k
2473 m68*-tadpole-sysv* )
2474 machine=tad68k opsys=usg5-3
2475 ;;
2476
2477 ## Tahoe machines
2478 tahoe-tahoe-bsd4.2* )
2479 machine=tahoe opsys=bsd4-2
2480 ;;
2481 tahoe-tahoe-bsd4.3* )
2482 machine=tahoe opsys=bsd4-3
2483 ;;
2484
2485 ## Tandem Integrity S2
2486 mips-tandem-sysv* )
2487 machine=tandem-s2 opsys=usg5-3
2488 ;;
2489
2490 ## Tektronix XD88
2491 m88k-tektronix-sysv3* )
2492 machine=tekxd88 opsys=usg5-3
2493 ;;
2494
2495 ## Tektronix 16000 box (6130?)
2496 ns16k-tektronix-bsd* )
2497 machine=ns16000 opsys=bsd4-2
2498 ;;
2499 ## Tektronix 4300
2500 ## src/m/tek4300.h hints that this is a m68k machine.
2501 m68*-tektronix-bsd* )
2502 machine=tek4300 opsys=bsd4-3
2503 ;;
2504
2505 ## Titan P2 or P3
2506 ## We seem to have lost the machine-description file titan.h!
2507 titan-titan-sysv* )
2508 machine=titan opsys=usg5-3
2509 ;;
2510
2511 ## Ustation E30 (SS5E)
2512 m68*-unisys-uniplus* )
2513 machine=ustation opsystem=unipl5-2
2514 ;;
2515
2516 ## Vaxen.
2517 vax-dec-* )
2518 machine=vax
2519 case "${canonical}" in
2520 *-bsd4.1* ) opsys=bsd4-1 ;;
2521 *-bsd4.2* | *-ultrix[0-3].* | *-ultrix4.0* ) opsys=bsd4-2 ;;
2522 *-bsd4.3* | *-ultrix* ) opsys=bsd4-3 ;;
2523 *-sysv[01]* | *-sysvr[01]* ) opsys=usg5-0 ;;
2524 *-sysv2* | *-sysvr2* ) opsys=usg5-2 ;;
2525 *-vms* ) opsys=vms ;;
2526 * ) unported=yes
2527 esac
2528 ;;
2529
2530 ## Whitechapel MG1
2531 ns16k-whitechapel-* )
2532 machine=mg1
2533 ## We don't know what sort of OS runs on these; we'll let the
2534 ## operating system guessing code below try.
2535 ;;
2536
2537 ## Wicat
2538 m68*-wicat-sysv* )
2539 machine=wicat opsys=usg5-2
2540 ;;
2541
f4988be7
GM
2542 ## IA-64
2543 ia64*-*-linux* )
2544 machine=ia64 opsys=gnu-linux
2545 ;;
2546
ba4481b5
DL
2547 ## Intel 386 machines where we don't care about the manufacturer
2548 i[3456]86-*-* )
2549 machine=intel386
2550 case "${canonical}" in
c60ee5e7 2551 *-cygwin ) opsys=cygwin ;;
9f817ea4 2552 *-lynxos* ) opsys=lynxos ;;
ba4481b5
DL
2553 *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
2554 *-isc2.2* ) opsys=isc2-2 ;;
2555 *-isc4.0* ) opsys=isc4-0 ;;
2556 *-isc4.* ) opsys=isc4-1
2557 GCC_TEST_OPTIONS=-posix
2558 NON_GCC_TEST_OPTIONS=-Xp
2559 ;;
2560 *-isc* ) opsys=isc3-0 ;;
2561 *-esix5* ) opsys=esix5r4; NON_GNU_CPP=/usr/lib/cpp ;;
2562 *-esix* ) opsys=esix ;;
2563 *-xenix* ) opsys=xenix ;;
2564 *-linux-gnu* ) opsys=gnu-linux ;;
2565 *-sco3.2v4* ) opsys=sco4 ; NON_GNU_CPP=/lib/cpp ;;
503d2be0 2566 *-sco3.2v5* ) opsys=sco5
ba4481b5
DL
2567 NON_GNU_CPP=/lib/cpp
2568 # Prevent -belf from being passed to $CPP.
2569 # /lib/cpp does not accept it.
2570 OVERRIDE_CPPFLAGS=" "
2571 ;;
2572 *-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
55597d70
DL
2573 *-sysv5uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
2574 *-sysv5OpenUNIX* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
ba4481b5 2575 *-386bsd* ) opsys=386bsd ;;
ba4481b5
DL
2576 *-nextstep* ) opsys=nextstep ;;
2577 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
2578 esac
2579 ;;
2580
2581 ## m68k Linux-based GNU system
2582 m68k-*-linux-gnu* )
2583 machine=m68k opsys=gnu-linux
2584 ;;
2585
2586 ## Mips Linux-based GNU system
cd958eb3 2587 mips-*-linux-gnu* | mipsel-*-linux-gnu* )
ba4481b5
DL
2588 machine=mips opsys=gnu-linux
2589 ;;
2590
2591 ## UXP/DS
2592 sparc-fujitsu-sysv4* )
2593 machine=sparc opsys=uxpds
2594 NON_GNU_CPP=/usr/ccs/lib/cpp
2595 RANLIB="ar -ts"
2596 ;;
2597
2598 ## UXP/V
2599 f301-fujitsu-uxpv4.1)
2600 machine=f301 opsys=uxpv
2601 ;;
2602
e0f712ba
AC
2603 ## Darwin / Mac OS X
2604 powerpc-apple-darwin* )
2605 machine=powermac opsys=darwin
2606 # Define CPP as follows to make autoconf work correctly.
2a75d75d 2607 CPP="${CC-cc} -E -no-cpp-precomp"
c14dc0ed
AS
2608 # Use fink packages if available.
2609 if test -d /sw/include && test -d /sw/lib; then
2610 GCC_TEST_OPTIONS="-I/sw/include -L/sw/lib"
2611 CPP="${CPP} ${GCC_TEST_OPTIONS}"
2612 NON_GCC_TEST_OPTIONS=${GCC_TEST_OPTIONS}
2613 fi
e0f712ba
AC
2614 ;;
2615
598a2813
AS
2616 ## AMD x86-64 Linux-based GNU system
2617 x86_64-*-linux-gnu* )
24b01ec4 2618 machine=amdx86-64 opsys=gnu-linux
598a2813
AS
2619 ;;
2620
ba4481b5
DL
2621 * )
2622 unported=yes
2623 ;;
2624esac
2625
2626### If the code above didn't choose an operating system, just choose
2627### an operating system based on the configuration name. You really
2628### only want to use this when you have no idea what the right
2629### operating system is; if you know what operating systems a machine
2630### runs, it's cleaner to make it explicit in the case statement
2631### above.
2632if test x"${opsys}" = x; then
2633 case "${canonical}" in
2634 *-gnu* ) opsys=gnu ;;
2635 *-bsd4.[01] ) opsys=bsd4-1 ;;
2636 *-bsd4.2 ) opsys=bsd4-2 ;;
2637 *-bsd4.3 ) opsys=bsd4-3 ;;
2638 *-sysv0 | *-sysvr0 ) opsys=usg5-0 ;;
2639 *-sysv2 | *-sysvr2 ) opsys=usg5-2 ;;
2640 *-sysv2.2 | *-sysvr2.2 ) opsys=usg5-2-2 ;;
2641 *-sysv3* | *-sysvr3* ) opsys=usg5-3 ;;
2642 *-sysv4.2uw* ) opsys=unixware ;;
55597d70
DL
2643 *-sysv5uw* ) opsys=unixware ;;
2644 *-sysv5OpenUNIX* ) opsys=unixware ;;
ba4481b5
DL
2645 *-sysv4.1* | *-sysvr4.1* )
2646 NON_GNU_CPP=/usr/lib/cpp
2647 opsys=usg5-4 ;;
2648 *-sysv4.[2-9]* | *-sysvr4.[2-9]* )
2649 if [ x$NON_GNU_CPP = x ]; then
2650 if [ -f /usr/ccs/lib/cpp ]; then
2651 NON_GNU_CPP=/usr/ccs/lib/cpp
2652 else
2653 NON_GNU_CPP=/lib/cpp
2654 fi
2655 fi
2656 opsys=usg5-4-2 ;;
2657 *-sysv4* | *-sysvr4* ) opsys=usg5-4 ;;
2658 * )
2659 unported=yes
2660 ;;
2661 esac
2662fi
2663
c0d27fcc 2664
22044edf 2665
ba4481b5 2666if test $unported = yes; then
c0d27fcc 2667 { { echo "$as_me:$LINENO: error: Emacs hasn't been ported to \`${canonical}' systems.
503d2be0
AS
2668Check \`etc/MACHINES' for recognized configuration names." >&5
2669echo "$as_me: error: Emacs hasn't been ported to \`${canonical}' systems.
2670Check \`etc/MACHINES' for recognized configuration names." >&2;}
2671 { (exit 1); exit 1; }; }
ba4481b5
DL
2672fi
2673
2674machfile="m/${machine}.h"
2675opsysfile="s/${opsys}.h"
2676
c0d27fcc 2677
ba4481b5
DL
2678#### Choose a compiler.
2679test -n "$CC" && cc_specified=yes
2680
2681# Save the value of CFLAGS that the user specified.
2682SPECIFIED_CFLAGS="$CFLAGS"
2683
2684case ${with_gcc} in
2685 "yes" ) CC="gcc" GCC=yes ;;
2686 "no" ) : ${CC=cc} ;;
503d2be0
AS
2687 * )
2688esac
2689ac_ext=c
2690ac_cpp='$CPP $CPPFLAGS'
2691ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2692ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2693ac_compiler_gnu=$ac_cv_c_compiler_gnu
2694if test -n "$ac_tool_prefix"; then
2695 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2696set dummy ${ac_tool_prefix}gcc; ac_word=$2
c0d27fcc 2697echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2698echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2699if test "${ac_cv_prog_CC+set}" = set; then
2700 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
2701else
2702 if test -n "$CC"; then
2703 ac_cv_prog_CC="$CC" # Let the user override the test.
2704else
c0d27fcc
MR
2705as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2706for as_dir in $PATH
2707do
2708 IFS=$as_save_IFS
2709 test -z "$as_dir" && as_dir=.
2710 for ac_exec_ext in '' $ac_executable_extensions; do
2711 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2712 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2713 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2714 break 2
2715 fi
2716done
503d2be0
AS
2717done
2718
ba4481b5
DL
2719fi
2720fi
503d2be0 2721CC=$ac_cv_prog_CC
ba4481b5 2722if test -n "$CC"; then
c0d27fcc 2723 echo "$as_me:$LINENO: result: $CC" >&5
503d2be0
AS
2724echo "${ECHO_T}$CC" >&6
2725else
c0d27fcc 2726 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
2727echo "${ECHO_T}no" >&6
2728fi
2729
2730fi
2731if test -z "$ac_cv_prog_CC"; then
2732 ac_ct_CC=$CC
2733 # Extract the first word of "gcc", so it can be a program name with args.
2734set dummy gcc; ac_word=$2
c0d27fcc 2735echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2736echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2737if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2738 echo $ECHO_N "(cached) $ECHO_C" >&6
2739else
2740 if test -n "$ac_ct_CC"; then
2741 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2742else
c0d27fcc
MR
2743as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2744for as_dir in $PATH
2745do
2746 IFS=$as_save_IFS
2747 test -z "$as_dir" && as_dir=.
2748 for ac_exec_ext in '' $ac_executable_extensions; do
2749 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2750 ac_cv_prog_ac_ct_CC="gcc"
2751 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2752 break 2
2753 fi
2754done
503d2be0
AS
2755done
2756
2757fi
2758fi
2759ac_ct_CC=$ac_cv_prog_ac_ct_CC
2760if test -n "$ac_ct_CC"; then
c0d27fcc 2761 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
503d2be0 2762echo "${ECHO_T}$ac_ct_CC" >&6
ba4481b5 2763else
c0d27fcc 2764 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
2765echo "${ECHO_T}no" >&6
2766fi
2767
2768 CC=$ac_ct_CC
2769else
2770 CC="$ac_cv_prog_CC"
ba4481b5
DL
2771fi
2772
2773if test -z "$CC"; then
503d2be0
AS
2774 if test -n "$ac_tool_prefix"; then
2775 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2776set dummy ${ac_tool_prefix}cc; ac_word=$2
c0d27fcc 2777echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2778echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2779if test "${ac_cv_prog_CC+set}" = set; then
2780 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
2781else
2782 if test -n "$CC"; then
2783 ac_cv_prog_CC="$CC" # Let the user override the test.
2784else
c0d27fcc
MR
2785as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2786for as_dir in $PATH
2787do
2788 IFS=$as_save_IFS
2789 test -z "$as_dir" && as_dir=.
2790 for ac_exec_ext in '' $ac_executable_extensions; do
2791 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2792 ac_cv_prog_CC="${ac_tool_prefix}cc"
2793 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2794 break 2
2795 fi
2796done
503d2be0
AS
2797done
2798
2799fi
2800fi
2801CC=$ac_cv_prog_CC
2802if test -n "$CC"; then
c0d27fcc 2803 echo "$as_me:$LINENO: result: $CC" >&5
503d2be0
AS
2804echo "${ECHO_T}$CC" >&6
2805else
c0d27fcc 2806 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
2807echo "${ECHO_T}no" >&6
2808fi
2809
2810fi
2811if test -z "$ac_cv_prog_CC"; then
2812 ac_ct_CC=$CC
2813 # Extract the first word of "cc", so it can be a program name with args.
2814set dummy cc; ac_word=$2
c0d27fcc 2815echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2816echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2817if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2818 echo $ECHO_N "(cached) $ECHO_C" >&6
2819else
2820 if test -n "$ac_ct_CC"; then
2821 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2822else
c0d27fcc
MR
2823as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2824for as_dir in $PATH
2825do
2826 IFS=$as_save_IFS
2827 test -z "$as_dir" && as_dir=.
2828 for ac_exec_ext in '' $ac_executable_extensions; do
2829 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2830 ac_cv_prog_ac_ct_CC="cc"
2831 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2832 break 2
2833 fi
2834done
503d2be0
AS
2835done
2836
2837fi
2838fi
2839ac_ct_CC=$ac_cv_prog_ac_ct_CC
2840if test -n "$ac_ct_CC"; then
c0d27fcc 2841 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
503d2be0
AS
2842echo "${ECHO_T}$ac_ct_CC" >&6
2843else
c0d27fcc 2844 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
2845echo "${ECHO_T}no" >&6
2846fi
2847
2848 CC=$ac_ct_CC
2849else
2850 CC="$ac_cv_prog_CC"
2851fi
2852
2853fi
2854if test -z "$CC"; then
2855 # Extract the first word of "cc", so it can be a program name with args.
2856set dummy cc; ac_word=$2
c0d27fcc 2857echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2858echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2859if test "${ac_cv_prog_CC+set}" = set; then
2860 echo $ECHO_N "(cached) $ECHO_C" >&6
2861else
2862 if test -n "$CC"; then
2863 ac_cv_prog_CC="$CC" # Let the user override the test.
2864else
2865 ac_prog_rejected=no
c0d27fcc
MR
2866as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2867for as_dir in $PATH
2868do
2869 IFS=$as_save_IFS
2870 test -z "$as_dir" && as_dir=.
2871 for ac_exec_ext in '' $ac_executable_extensions; do
2872 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2873 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2874 ac_prog_rejected=yes
2875 continue
2876 fi
2877 ac_cv_prog_CC="cc"
2878 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2879 break 2
2880 fi
2881done
503d2be0
AS
2882done
2883
ba4481b5
DL
2884if test $ac_prog_rejected = yes; then
2885 # We found a bogon in the path, so make sure we never use it.
2886 set dummy $ac_cv_prog_CC
2887 shift
503d2be0 2888 if test $# != 0; then
ba4481b5
DL
2889 # We chose a different compiler from the bogus one.
2890 # However, it has the same basename, so the bogon will be chosen
2891 # first if we set CC to just the basename; use the full file name.
2892 shift
6bae0ccf 2893 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
ba4481b5
DL
2894 fi
2895fi
2896fi
2897fi
503d2be0 2898CC=$ac_cv_prog_CC
ba4481b5 2899if test -n "$CC"; then
c0d27fcc 2900 echo "$as_me:$LINENO: result: $CC" >&5
503d2be0 2901echo "${ECHO_T}$CC" >&6
ba4481b5 2902else
c0d27fcc 2903 echo "$as_me:$LINENO: result: no" >&5
503d2be0 2904echo "${ECHO_T}no" >&6
ba4481b5
DL
2905fi
2906
503d2be0
AS
2907fi
2908if test -z "$CC"; then
2909 if test -n "$ac_tool_prefix"; then
2910 for ac_prog in cl
2911 do
2912 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2913set dummy $ac_tool_prefix$ac_prog; ac_word=$2
c0d27fcc 2914echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2915echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2916if test "${ac_cv_prog_CC+set}" = set; then
2917 echo $ECHO_N "(cached) $ECHO_C" >&6
c4bb2108
DL
2918else
2919 if test -n "$CC"; then
2920 ac_cv_prog_CC="$CC" # Let the user override the test.
2921else
c0d27fcc
MR
2922as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2923for as_dir in $PATH
2924do
2925 IFS=$as_save_IFS
2926 test -z "$as_dir" && as_dir=.
2927 for ac_exec_ext in '' $ac_executable_extensions; do
2928 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2929 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2930 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2931 break 2
2932 fi
2933done
503d2be0
AS
2934done
2935
c4bb2108
DL
2936fi
2937fi
503d2be0 2938CC=$ac_cv_prog_CC
c4bb2108 2939if test -n "$CC"; then
c0d27fcc 2940 echo "$as_me:$LINENO: result: $CC" >&5
503d2be0 2941echo "${ECHO_T}$CC" >&6
c4bb2108 2942else
c0d27fcc 2943 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
2944echo "${ECHO_T}no" >&6
2945fi
2946
2947 test -n "$CC" && break
2948 done
2949fi
2950if test -z "$CC"; then
2951 ac_ct_CC=$CC
2952 for ac_prog in cl
2953do
2954 # Extract the first word of "$ac_prog", so it can be a program name with args.
2955set dummy $ac_prog; ac_word=$2
c0d27fcc 2956echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
2957echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2958if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2959 echo $ECHO_N "(cached) $ECHO_C" >&6
2960else
2961 if test -n "$ac_ct_CC"; then
2962 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2963else
c0d27fcc
MR
2964as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2965for as_dir in $PATH
2966do
2967 IFS=$as_save_IFS
2968 test -z "$as_dir" && as_dir=.
2969 for ac_exec_ext in '' $ac_executable_extensions; do
2970 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2971 ac_cv_prog_ac_ct_CC="$ac_prog"
2972 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2973 break 2
2974 fi
2975done
503d2be0
AS
2976done
2977
c4bb2108 2978fi
503d2be0
AS
2979fi
2980ac_ct_CC=$ac_cv_prog_ac_ct_CC
2981if test -n "$ac_ct_CC"; then
c0d27fcc 2982 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
503d2be0
AS
2983echo "${ECHO_T}$ac_ct_CC" >&6
2984else
c0d27fcc 2985 echo "$as_me:$LINENO: result: no" >&5
503d2be0 2986echo "${ECHO_T}no" >&6
ba4481b5
DL
2987fi
2988
503d2be0
AS
2989 test -n "$ac_ct_CC" && break
2990done
ba4481b5 2991
503d2be0
AS
2992 CC=$ac_ct_CC
2993fi
2994
2995fi
ba4481b5 2996
c0d27fcc 2997
19650fd6
AS
2998test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2999See \`config.log' for more details." >&5
3000echo "$as_me: error: no acceptable C compiler found in \$PATH
3001See \`config.log' for more details." >&2;}
503d2be0 3002 { (exit 1); exit 1; }; }
c4bb2108 3003
503d2be0 3004# Provide some information about the compiler.
c0d27fcc 3005echo "$as_me:$LINENO:" \
503d2be0
AS
3006 "checking for C compiler version" >&5
3007ac_compiler=`set X $ac_compile; echo $2`
c0d27fcc 3008{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
503d2be0
AS
3009 (eval $ac_compiler --version </dev/null >&5) 2>&5
3010 ac_status=$?
c0d27fcc 3011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3012 (exit $ac_status); }
c0d27fcc 3013{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
503d2be0
AS
3014 (eval $ac_compiler -v </dev/null >&5) 2>&5
3015 ac_status=$?
c0d27fcc 3016 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3017 (exit $ac_status); }
c0d27fcc 3018{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
503d2be0
AS
3019 (eval $ac_compiler -V </dev/null >&5) 2>&5
3020 ac_status=$?
c0d27fcc 3021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3022 (exit $ac_status); }
3023
3024cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3025/* confdefs.h. */
3026_ACEOF
3027cat confdefs.h >>conftest.$ac_ext
3028cat >>conftest.$ac_ext <<_ACEOF
3029/* end confdefs.h. */
c4bb2108 3030
503d2be0
AS
3031int
3032main ()
3033{
3034
3035 ;
3036 return 0;
3037}
3038_ACEOF
3039ac_clean_files_save=$ac_clean_files
19650fd6 3040ac_clean_files="$ac_clean_files a.out a.exe b.out"
503d2be0
AS
3041# Try to create an executable without -o first, disregard a.out.
3042# It will help us diagnose broken compilers, and finding out an intuition
3043# of exeext.
35996d22
AS
3044echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
3045echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
503d2be0 3046ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
c0d27fcc 3047if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
503d2be0
AS
3048 (eval $ac_link_default) 2>&5
3049 ac_status=$?
c0d27fcc 3050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3051 (exit $ac_status); }; then
3052 # Find the output, starting from the most likely. This scheme is
3053# not robust to junk in `.', hence go to wildcards (a.*) only as a last
3054# resort.
c0d27fcc
MR
3055
3056# Be careful to initialize this variable, since it used to be cached.
3057# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
3058ac_cv_exeext=
19650fd6
AS
3059# b.out is created by i960 compilers.
3060for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
3061do
6bae0ccf 3062 test -f "$ac_file" || continue
503d2be0 3063 case $ac_file in
19650fd6 3064 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
35996d22 3065 ;;
19650fd6 3066 conftest.$ac_ext )
35996d22
AS
3067 # This is the source file.
3068 ;;
19650fd6 3069 [ab].out )
35996d22
AS
3070 # We found the default executable, but exeext='' is most
3071 # certainly right.
3072 break;;
19650fd6 3073 *.* )
35996d22
AS
3074 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3075 # FIXME: I believe we export ac_cv_exeext for Libtool,
3076 # but it would be cool to find out if it's true. Does anybody
3077 # maintain Libtool? --akim.
3078 export ac_cv_exeext
3079 break;;
19650fd6 3080 * )
35996d22 3081 break;;
503d2be0
AS
3082 esac
3083done
3084else
3085 echo "$as_me: failed program was:" >&5
19650fd6
AS
3086sed 's/^/| /' conftest.$ac_ext >&5
3087
6bae0ccf 3088{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
19650fd6 3089See \`config.log' for more details." >&5
6bae0ccf 3090echo "$as_me: error: C compiler cannot create executables
19650fd6 3091See \`config.log' for more details." >&2;}
503d2be0
AS
3092 { (exit 77); exit 77; }; }
3093fi
3094
3095ac_exeext=$ac_cv_exeext
c0d27fcc 3096echo "$as_me:$LINENO: result: $ac_file" >&5
503d2be0
AS
3097echo "${ECHO_T}$ac_file" >&6
3098
3099# Check the compiler produces executables we can run. If not, either
3100# the compiler is broken, or we cross compile.
c0d27fcc 3101echo "$as_me:$LINENO: checking whether the C compiler works" >&5
503d2be0
AS
3102echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
3103# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
3104# If not cross compiling, check that we can run a simple program.
3105if test "$cross_compiling" != yes; then
3106 if { ac_try='./$ac_file'
c0d27fcc 3107 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3108 (eval $ac_try) 2>&5
3109 ac_status=$?
c0d27fcc 3110 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3111 (exit $ac_status); }; }; then
3112 cross_compiling=no
ba4481b5 3113 else
503d2be0
AS
3114 if test "$cross_compiling" = maybe; then
3115 cross_compiling=yes
3116 else
c0d27fcc 3117 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
19650fd6
AS
3118If you meant to cross compile, use \`--host'.
3119See \`config.log' for more details." >&5
503d2be0 3120echo "$as_me: error: cannot run C compiled programs.
19650fd6
AS
3121If you meant to cross compile, use \`--host'.
3122See \`config.log' for more details." >&2;}
503d2be0
AS
3123 { (exit 1); exit 1; }; }
3124 fi
ba4481b5 3125 fi
503d2be0 3126fi
c0d27fcc 3127echo "$as_me:$LINENO: result: yes" >&5
503d2be0
AS
3128echo "${ECHO_T}yes" >&6
3129
19650fd6 3130rm -f a.out a.exe conftest$ac_cv_exeext b.out
503d2be0
AS
3131ac_clean_files=$ac_clean_files_save
3132# Check the compiler produces executables we can run. If not, either
3133# the compiler is broken, or we cross compile.
c0d27fcc 3134echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
503d2be0 3135echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
c0d27fcc 3136echo "$as_me:$LINENO: result: $cross_compiling" >&5
503d2be0
AS
3137echo "${ECHO_T}$cross_compiling" >&6
3138
c0d27fcc
MR
3139echo "$as_me:$LINENO: checking for suffix of executables" >&5
3140echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
3141if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
3142 (eval $ac_link) 2>&5
3143 ac_status=$?
c0d27fcc 3144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3145 (exit $ac_status); }; then
3146 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3147# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3148# work properly (i.e., refer to `conftest.exe'), while it won't with
3149# `rm'.
6bae0ccf
DL
3150for ac_file in conftest.exe conftest conftest.*; do
3151 test -f "$ac_file" || continue
503d2be0 3152 case $ac_file in
6bae0ccf 3153 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
503d2be0 3154 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
35996d22
AS
3155 export ac_cv_exeext
3156 break;;
503d2be0
AS
3157 * ) break;;
3158 esac
3159done
ba4481b5 3160else
19650fd6
AS
3161 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
3162See \`config.log' for more details." >&5
3163echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
3164See \`config.log' for more details." >&2;}
503d2be0 3165 { (exit 1); exit 1; }; }
ba4481b5 3166fi
ba4481b5 3167
503d2be0 3168rm -f conftest$ac_cv_exeext
c0d27fcc 3169echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
503d2be0 3170echo "${ECHO_T}$ac_cv_exeext" >&6
ba4481b5 3171
503d2be0
AS
3172rm -f conftest.$ac_ext
3173EXEEXT=$ac_cv_exeext
3174ac_exeext=$EXEEXT
c0d27fcc
MR
3175echo "$as_me:$LINENO: checking for suffix of object files" >&5
3176echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
503d2be0
AS
3177if test "${ac_cv_objext+set}" = set; then
3178 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3179else
503d2be0 3180 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3181/* confdefs.h. */
3182_ACEOF
3183cat confdefs.h >>conftest.$ac_ext
3184cat >>conftest.$ac_ext <<_ACEOF
3185/* end confdefs.h. */
ba4481b5 3186
503d2be0
AS
3187int
3188main ()
3189{
ba4481b5 3190
503d2be0
AS
3191 ;
3192 return 0;
3193}
3194_ACEOF
3195rm -f conftest.o conftest.obj
c0d27fcc 3196if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
503d2be0
AS
3197 (eval $ac_compile) 2>&5
3198 ac_status=$?
c0d27fcc 3199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3200 (exit $ac_status); }; then
3201 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
3202 case $ac_file in
6bae0ccf 3203 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
503d2be0
AS
3204 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3205 break;;
3206 esac
3207done
c4bb2108 3208else
503d2be0 3209 echo "$as_me: failed program was:" >&5
19650fd6
AS
3210sed 's/^/| /' conftest.$ac_ext >&5
3211
3212{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
3213See \`config.log' for more details." >&5
3214echo "$as_me: error: cannot compute suffix of object files: cannot compile
3215See \`config.log' for more details." >&2;}
503d2be0 3216 { (exit 1); exit 1; }; }
c4bb2108
DL
3217fi
3218
503d2be0
AS
3219rm -f conftest.$ac_cv_objext conftest.$ac_ext
3220fi
c0d27fcc 3221echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
503d2be0
AS
3222echo "${ECHO_T}$ac_cv_objext" >&6
3223OBJEXT=$ac_cv_objext
3224ac_objext=$OBJEXT
c0d27fcc 3225echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
503d2be0
AS
3226echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
3227if test "${ac_cv_c_compiler_gnu+set}" = set; then
3228 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3229else
503d2be0 3230 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3231/* confdefs.h. */
3232_ACEOF
3233cat confdefs.h >>conftest.$ac_ext
3234cat >>conftest.$ac_ext <<_ACEOF
3235/* end confdefs.h. */
503d2be0
AS
3236
3237int
3238main ()
3239{
3240#ifndef __GNUC__
3241 choke me
3242#endif
3243
3244 ;
3245 return 0;
3246}
3247_ACEOF
3248rm -f conftest.$ac_objext
c0d27fcc 3249if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 3250 (eval $ac_compile) 2>conftest.er1
503d2be0 3251 ac_status=$?
35996d22
AS
3252 grep -v '^ *+' conftest.er1 >conftest.err
3253 rm -f conftest.er1
3254 cat conftest.err >&5
c0d27fcc 3255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3256 (exit $ac_status); } &&
551ffc27
ST
3257 { ac_try='test -z "$ac_c_werror_flag"
3258 || test ! -s conftest.err'
35996d22
AS
3259 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3260 (eval $ac_try) 2>&5
3261 ac_status=$?
3262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3263 (exit $ac_status); }; } &&
3264 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 3265 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3266 (eval $ac_try) 2>&5
3267 ac_status=$?
c0d27fcc 3268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3269 (exit $ac_status); }; }; then
3270 ac_compiler_gnu=yes
3271else
3272 echo "$as_me: failed program was:" >&5
19650fd6
AS
3273sed 's/^/| /' conftest.$ac_ext >&5
3274
503d2be0
AS
3275ac_compiler_gnu=no
3276fi
35996d22 3277rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
3278ac_cv_c_compiler_gnu=$ac_compiler_gnu
3279
3280fi
c0d27fcc 3281echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
503d2be0
AS
3282echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
3283GCC=`test $ac_compiler_gnu = yes && echo yes`
3284ac_test_CFLAGS=${CFLAGS+set}
3285ac_save_CFLAGS=$CFLAGS
3286CFLAGS="-g"
c0d27fcc 3287echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
503d2be0
AS
3288echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
3289if test "${ac_cv_prog_cc_g+set}" = set; then
3290 echo $ECHO_N "(cached) $ECHO_C" >&6
3291else
3292 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3293/* confdefs.h. */
3294_ACEOF
3295cat confdefs.h >>conftest.$ac_ext
3296cat >>conftest.$ac_ext <<_ACEOF
3297/* end confdefs.h. */
503d2be0
AS
3298
3299int
3300main ()
3301{
3302
3303 ;
3304 return 0;
3305}
3306_ACEOF
3307rm -f conftest.$ac_objext
c0d27fcc 3308if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 3309 (eval $ac_compile) 2>conftest.er1
503d2be0 3310 ac_status=$?
35996d22
AS
3311 grep -v '^ *+' conftest.er1 >conftest.err
3312 rm -f conftest.er1
3313 cat conftest.err >&5
c0d27fcc 3314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3315 (exit $ac_status); } &&
551ffc27
ST
3316 { ac_try='test -z "$ac_c_werror_flag"
3317 || test ! -s conftest.err'
35996d22
AS
3318 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3319 (eval $ac_try) 2>&5
3320 ac_status=$?
3321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3322 (exit $ac_status); }; } &&
3323 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 3324 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3325 (eval $ac_try) 2>&5
3326 ac_status=$?
c0d27fcc 3327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3328 (exit $ac_status); }; }; then
ba4481b5
DL
3329 ac_cv_prog_cc_g=yes
3330else
503d2be0 3331 echo "$as_me: failed program was:" >&5
19650fd6
AS
3332sed 's/^/| /' conftest.$ac_ext >&5
3333
503d2be0 3334ac_cv_prog_cc_g=no
ba4481b5 3335fi
35996d22 3336rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 3337fi
c0d27fcc 3338echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
503d2be0 3339echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
c4bb2108 3340if test "$ac_test_CFLAGS" = set; then
503d2be0 3341 CFLAGS=$ac_save_CFLAGS
c4bb2108
DL
3342elif test $ac_cv_prog_cc_g = yes; then
3343 if test "$GCC" = yes; then
ba4481b5
DL
3344 CFLAGS="-g -O2"
3345 else
c4bb2108 3346 CFLAGS="-g"
ba4481b5 3347 fi
22afa6e8 3348else
c4bb2108
DL
3349 if test "$GCC" = yes; then
3350 CFLAGS="-O2"
3351 else
3352 CFLAGS=
3353 fi
ba4481b5 3354fi
6bae0ccf
DL
3355echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
3356echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
3357if test "${ac_cv_prog_cc_stdc+set}" = set; then
3358 echo $ECHO_N "(cached) $ECHO_C" >&6
3359else
3360 ac_cv_prog_cc_stdc=no
3361ac_save_CC=$CC
3362cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3363/* confdefs.h. */
3364_ACEOF
3365cat confdefs.h >>conftest.$ac_ext
3366cat >>conftest.$ac_ext <<_ACEOF
3367/* end confdefs.h. */
6bae0ccf
DL
3368#include <stdarg.h>
3369#include <stdio.h>
3370#include <sys/types.h>
3371#include <sys/stat.h>
3372/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3373struct buf { int x; };
3374FILE * (*rcsopen) (struct buf *, struct stat *, int);
3375static char *e (p, i)
3376 char **p;
3377 int i;
3378{
3379 return p[i];
3380}
3381static char *f (char * (*g) (char **, int), char **p, ...)
3382{
3383 char *s;
3384 va_list v;
3385 va_start (v,p);
3386 s = g (p, va_arg (v,int));
3387 va_end (v);
3388 return s;
3389}
35996d22
AS
3390
3391/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3392 function prototypes and stuff, but not '\xHH' hex character constants.
3393 These don't provoke an error unfortunately, instead are silently treated
3394 as 'x'. The following induces an error, until -std1 is added to get
3395 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3396 array size at least. It's necessary to write '\x00'==0 to get something
3397 that's true only with -std1. */
3398int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3399
6bae0ccf
DL
3400int test (int i, double x);
3401struct s1 {int (*f) (int a);};
3402struct s2 {int (*f) (double a);};
3403int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3404int argc;
3405char **argv;
3406int
3407main ()
3408{
3409return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3410 ;
3411 return 0;
3412}
3413_ACEOF
3414# Don't try gcc -ansi; that turns off useful extensions and
3415# breaks some systems' header files.
3416# AIX -qlanglvl=ansi
3417# Ultrix and OSF/1 -std1
3418# HP-UX 10.20 and later -Ae
3419# HP-UX older versions -Aa -D_HPUX_SOURCE
3420# SVR4 -Xc -D__EXTENSIONS__
3421for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3422do
3423 CC="$ac_save_CC $ac_arg"
3424 rm -f conftest.$ac_objext
3425if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 3426 (eval $ac_compile) 2>conftest.er1
6bae0ccf 3427 ac_status=$?
35996d22
AS
3428 grep -v '^ *+' conftest.er1 >conftest.err
3429 rm -f conftest.er1
3430 cat conftest.err >&5
6bae0ccf
DL
3431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3432 (exit $ac_status); } &&
551ffc27
ST
3433 { ac_try='test -z "$ac_c_werror_flag"
3434 || test ! -s conftest.err'
35996d22
AS
3435 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3436 (eval $ac_try) 2>&5
3437 ac_status=$?
3438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3439 (exit $ac_status); }; } &&
3440 { ac_try='test -s conftest.$ac_objext'
6bae0ccf
DL
3441 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3442 (eval $ac_try) 2>&5
3443 ac_status=$?
3444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3445 (exit $ac_status); }; }; then
3446 ac_cv_prog_cc_stdc=$ac_arg
3447break
3448else
3449 echo "$as_me: failed program was:" >&5
19650fd6
AS
3450sed 's/^/| /' conftest.$ac_ext >&5
3451
6bae0ccf 3452fi
35996d22 3453rm -f conftest.err conftest.$ac_objext
6bae0ccf
DL
3454done
3455rm -f conftest.$ac_ext conftest.$ac_objext
3456CC=$ac_save_CC
3457
3458fi
3459
3460case "x$ac_cv_prog_cc_stdc" in
3461 x|xno)
3462 echo "$as_me:$LINENO: result: none needed" >&5
3463echo "${ECHO_T}none needed" >&6 ;;
3464 *)
3465 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
3466echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
3467 CC="$CC $ac_cv_prog_cc_stdc" ;;
3468esac
3469
503d2be0
AS
3470# Some people use a C++ compiler to compile C. Since we use `exit',
3471# in C++ we need to declare it. In case someone uses the same compiler
3472# for both compiling C and C++ we need to have the C++ compiler decide
3473# the declaration of exit, since it's the most demanding environment.
3474cat >conftest.$ac_ext <<_ACEOF
3475#ifndef __cplusplus
3476 choke me
3477#endif
3478_ACEOF
3479rm -f conftest.$ac_objext
c0d27fcc 3480if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 3481 (eval $ac_compile) 2>conftest.er1
503d2be0 3482 ac_status=$?
35996d22
AS
3483 grep -v '^ *+' conftest.er1 >conftest.err
3484 rm -f conftest.er1
3485 cat conftest.err >&5
c0d27fcc 3486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3487 (exit $ac_status); } &&
551ffc27
ST
3488 { ac_try='test -z "$ac_c_werror_flag"
3489 || test ! -s conftest.err'
35996d22
AS
3490 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3491 (eval $ac_try) 2>&5
3492 ac_status=$?
3493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3494 (exit $ac_status); }; } &&
3495 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 3496 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3497 (eval $ac_try) 2>&5
3498 ac_status=$?
c0d27fcc 3499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3500 (exit $ac_status); }; }; then
3501 for ac_declaration in \
35996d22 3502 '' \
503d2be0
AS
3503 'extern "C" void std::exit (int) throw (); using std::exit;' \
3504 'extern "C" void std::exit (int); using std::exit;' \
3505 'extern "C" void exit (int) throw ();' \
3506 'extern "C" void exit (int);' \
cffcede7 3507 'void exit (int);'
503d2be0
AS
3508do
3509 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3510/* confdefs.h. */
3511_ACEOF
3512cat confdefs.h >>conftest.$ac_ext
3513cat >>conftest.$ac_ext <<_ACEOF
3514/* end confdefs.h. */
57669b57 3515$ac_declaration
35996d22 3516#include <stdlib.h>
503d2be0
AS
3517int
3518main ()
3519{
3520exit (42);
3521 ;
3522 return 0;
3523}
3524_ACEOF
3525rm -f conftest.$ac_objext
c0d27fcc 3526if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 3527 (eval $ac_compile) 2>conftest.er1
503d2be0 3528 ac_status=$?
35996d22
AS
3529 grep -v '^ *+' conftest.er1 >conftest.err
3530 rm -f conftest.er1
3531 cat conftest.err >&5
c0d27fcc 3532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3533 (exit $ac_status); } &&
551ffc27
ST
3534 { ac_try='test -z "$ac_c_werror_flag"
3535 || test ! -s conftest.err'
35996d22
AS
3536 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3537 (eval $ac_try) 2>&5
3538 ac_status=$?
3539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3540 (exit $ac_status); }; } &&
3541 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 3542 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3543 (eval $ac_try) 2>&5
3544 ac_status=$?
c0d27fcc 3545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3546 (exit $ac_status); }; }; then
3547 :
3548else
3549 echo "$as_me: failed program was:" >&5
19650fd6
AS
3550sed 's/^/| /' conftest.$ac_ext >&5
3551
503d2be0
AS
3552continue
3553fi
35996d22 3554rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 3555 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3556/* confdefs.h. */
3557_ACEOF
3558cat confdefs.h >>conftest.$ac_ext
3559cat >>conftest.$ac_ext <<_ACEOF
3560/* end confdefs.h. */
503d2be0
AS
3561$ac_declaration
3562int
3563main ()
3564{
3565exit (42);
3566 ;
3567 return 0;
3568}
3569_ACEOF
3570rm -f conftest.$ac_objext
c0d27fcc 3571if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 3572 (eval $ac_compile) 2>conftest.er1
503d2be0 3573 ac_status=$?
35996d22
AS
3574 grep -v '^ *+' conftest.er1 >conftest.err
3575 rm -f conftest.er1
3576 cat conftest.err >&5
c0d27fcc 3577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3578 (exit $ac_status); } &&
551ffc27
ST
3579 { ac_try='test -z "$ac_c_werror_flag"
3580 || test ! -s conftest.err'
35996d22
AS
3581 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3582 (eval $ac_try) 2>&5
3583 ac_status=$?
3584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3585 (exit $ac_status); }; } &&
3586 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 3587 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
3588 (eval $ac_try) 2>&5
3589 ac_status=$?
c0d27fcc 3590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3591 (exit $ac_status); }; }; then
3592 break
3593else
3594 echo "$as_me: failed program was:" >&5
19650fd6
AS
3595sed 's/^/| /' conftest.$ac_ext >&5
3596
503d2be0 3597fi
35996d22 3598rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
3599done
3600rm -f conftest*
3601if test -n "$ac_declaration"; then
3602 echo '#ifdef __cplusplus' >>confdefs.h
3603 echo $ac_declaration >>confdefs.h
3604 echo '#endif' >>confdefs.h
3605fi
ba4481b5 3606
503d2be0
AS
3607else
3608 echo "$as_me: failed program was:" >&5
19650fd6
AS
3609sed 's/^/| /' conftest.$ac_ext >&5
3610
503d2be0 3611fi
35996d22 3612rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
3613ac_ext=c
3614ac_cpp='$CPP $CPPFLAGS'
3615ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3616ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3617ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5 3618
c0d27fcc 3619
ba4481b5
DL
3620# On Suns, sometimes $CPP names a directory.
3621if test -n "$CPP" && test -d "$CPP"; then
3622 CPP=
3623fi
3624
3625#### Some systems specify a CPP to use unless we are using GCC.
3626#### Now that we know whether we are using GCC, we can decide whether
3627#### to use that one.
3628if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x
3629then
3630 CPP="$NON_GNU_CPP"
3631fi
3632
3633#### Some systems specify a CC to use unless we are using GCC.
3634#### Now that we know whether we are using GCC, we can decide whether
3635#### to use that one.
3636if test "x$NON_GNU_CC" != x && test x$GCC != xyes &&
3637 test x$cc_specified != xyes
3638then
3639 CC="$NON_GNU_CC"
3640fi
3641
3642if test x$GCC = xyes && test "x$GCC_TEST_OPTIONS" != x
3643then
3644 CC="$CC $GCC_TEST_OPTIONS"
3645fi
3646
3647if test x$GCC = x && test "x$NON_GCC_TEST_OPTIONS" != x
3648then
3649 CC="$CC $NON_GCC_TEST_OPTIONS"
3650fi
3651
6a3a24fa 3652#### Some other nice autoconf tests.
ba4481b5 3653
c0d27fcc 3654echo "$as_me:$LINENO: checking whether ln -s works" >&5
503d2be0
AS
3655echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3656LN_S=$as_ln_s
3657if test "$LN_S" = "ln -s"; then
c0d27fcc 3658 echo "$as_me:$LINENO: result: yes" >&5
503d2be0 3659echo "${ECHO_T}yes" >&6
ba4481b5 3660else
c0d27fcc 3661 echo "$as_me:$LINENO: result: no, using $LN_S" >&5
503d2be0 3662echo "${ECHO_T}no, using $LN_S" >&6
ba4481b5
DL
3663fi
3664
503d2be0
AS
3665ac_ext=c
3666ac_cpp='$CPP $CPPFLAGS'
3667ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3668ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3669ac_compiler_gnu=$ac_cv_c_compiler_gnu
c0d27fcc 3670echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
503d2be0 3671echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
ba4481b5
DL
3672# On Suns, sometimes $CPP names a directory.
3673if test -n "$CPP" && test -d "$CPP"; then
3674 CPP=
3675fi
3676if test -z "$CPP"; then
503d2be0
AS
3677 if test "${ac_cv_prog_CPP+set}" = set; then
3678 echo $ECHO_N "(cached) $ECHO_C" >&6
3679else
3680 # Double quotes because CPP needs to be expanded
3681 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3682 do
3683 ac_preproc_ok=false
3684for ac_c_preproc_warn_flag in '' yes
3685do
3686 # Use a header file that comes with gcc, so configuring glibc
3687 # with a fresh cross-compiler works.
19650fd6
AS
3688 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3689 # <limits.h> exists even on freestanding compilers.
ba4481b5 3690 # On the NeXT, cc -E runs the code through the compiler's parser,
503d2be0
AS
3691 # not just through cpp. "Syntax error" is here to catch this case.
3692 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3693/* confdefs.h. */
3694_ACEOF
3695cat confdefs.h >>conftest.$ac_ext
3696cat >>conftest.$ac_ext <<_ACEOF
3697/* end confdefs.h. */
3698#ifdef __STDC__
3699# include <limits.h>
3700#else
3701# include <assert.h>
3702#endif
35996d22 3703 Syntax error
503d2be0 3704_ACEOF
c0d27fcc 3705if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
3706 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3707 ac_status=$?
6bae0ccf 3708 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
3709 rm -f conftest.er1
3710 cat conftest.err >&5
c0d27fcc 3711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3712 (exit $ac_status); } >/dev/null; then
3713 if test -s conftest.err; then
3714 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 3715 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
3716 else
3717 ac_cpp_err=
3718 fi
3719else
3720 ac_cpp_err=yes
3721fi
3722if test -z "$ac_cpp_err"; then
ba4481b5
DL
3723 :
3724else
503d2be0 3725 echo "$as_me: failed program was:" >&5
19650fd6
AS
3726sed 's/^/| /' conftest.$ac_ext >&5
3727
503d2be0
AS
3728 # Broken: fails on valid input.
3729continue
3730fi
3731rm -f conftest.err conftest.$ac_ext
3732
3733 # OK, works on sane cases. Now check whether non-existent headers
3734 # can be detected and how.
3735 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3736/* confdefs.h. */
3737_ACEOF
3738cat confdefs.h >>conftest.$ac_ext
3739cat >>conftest.$ac_ext <<_ACEOF
3740/* end confdefs.h. */
503d2be0
AS
3741#include <ac_nonexistent.h>
3742_ACEOF
c0d27fcc 3743if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
3744 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3745 ac_status=$?
6bae0ccf 3746 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
3747 rm -f conftest.er1
3748 cat conftest.err >&5
c0d27fcc 3749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3750 (exit $ac_status); } >/dev/null; then
3751 if test -s conftest.err; then
3752 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 3753 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
3754 else
3755 ac_cpp_err=
3756 fi
3757else
3758 ac_cpp_err=yes
3759fi
3760if test -z "$ac_cpp_err"; then
3761 # Broken: success on invalid input.
3762continue
c4bb2108 3763else
503d2be0 3764 echo "$as_me: failed program was:" >&5
19650fd6
AS
3765sed 's/^/| /' conftest.$ac_ext >&5
3766
503d2be0
AS
3767 # Passes both tests.
3768ac_preproc_ok=:
3769break
3770fi
3771rm -f conftest.err conftest.$ac_ext
3772
3773done
3774# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3775rm -f conftest.err conftest.$ac_ext
3776if $ac_preproc_ok; then
3777 break
3778fi
3779
3780 done
3781 ac_cv_prog_CPP=$CPP
3782
3783fi
3784 CPP=$ac_cv_prog_CPP
3785else
3786 ac_cv_prog_CPP=$CPP
3787fi
c0d27fcc 3788echo "$as_me:$LINENO: result: $CPP" >&5
503d2be0
AS
3789echo "${ECHO_T}$CPP" >&6
3790ac_preproc_ok=false
3791for ac_c_preproc_warn_flag in '' yes
3792do
3793 # Use a header file that comes with gcc, so configuring glibc
3794 # with a fresh cross-compiler works.
19650fd6
AS
3795 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3796 # <limits.h> exists even on freestanding compilers.
503d2be0
AS
3797 # On the NeXT, cc -E runs the code through the compiler's parser,
3798 # not just through cpp. "Syntax error" is here to catch this case.
3799 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3800/* confdefs.h. */
3801_ACEOF
3802cat confdefs.h >>conftest.$ac_ext
3803cat >>conftest.$ac_ext <<_ACEOF
3804/* end confdefs.h. */
3805#ifdef __STDC__
3806# include <limits.h>
3807#else
3808# include <assert.h>
3809#endif
35996d22 3810 Syntax error
503d2be0 3811_ACEOF
c0d27fcc 3812if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
3813 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3814 ac_status=$?
6bae0ccf 3815 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
3816 rm -f conftest.er1
3817 cat conftest.err >&5
c0d27fcc 3818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3819 (exit $ac_status); } >/dev/null; then
3820 if test -s conftest.err; then
3821 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 3822 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
3823 else
3824 ac_cpp_err=
3825 fi
3826else
3827 ac_cpp_err=yes
3828fi
3829if test -z "$ac_cpp_err"; then
ba4481b5
DL
3830 :
3831else
503d2be0 3832 echo "$as_me: failed program was:" >&5
19650fd6
AS
3833sed 's/^/| /' conftest.$ac_ext >&5
3834
503d2be0
AS
3835 # Broken: fails on valid input.
3836continue
3837fi
3838rm -f conftest.err conftest.$ac_ext
3839
3840 # OK, works on sane cases. Now check whether non-existent headers
3841 # can be detected and how.
3842 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3843/* confdefs.h. */
3844_ACEOF
3845cat confdefs.h >>conftest.$ac_ext
3846cat >>conftest.$ac_ext <<_ACEOF
3847/* end confdefs.h. */
503d2be0
AS
3848#include <ac_nonexistent.h>
3849_ACEOF
c0d27fcc 3850if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
3851 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3852 ac_status=$?
6bae0ccf 3853 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
3854 rm -f conftest.er1
3855 cat conftest.err >&5
c0d27fcc 3856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3857 (exit $ac_status); } >/dev/null; then
3858 if test -s conftest.err; then
3859 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 3860 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
3861 else
3862 ac_cpp_err=
3863 fi
3864else
3865 ac_cpp_err=yes
c4bb2108 3866fi
503d2be0
AS
3867if test -z "$ac_cpp_err"; then
3868 # Broken: success on invalid input.
3869continue
3870else
3871 echo "$as_me: failed program was:" >&5
19650fd6
AS
3872sed 's/^/| /' conftest.$ac_ext >&5
3873
503d2be0
AS
3874 # Passes both tests.
3875ac_preproc_ok=:
3876break
ba4481b5 3877fi
503d2be0
AS
3878rm -f conftest.err conftest.$ac_ext
3879
3880done
3881# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3882rm -f conftest.err conftest.$ac_ext
3883if $ac_preproc_ok; then
3884 :
ba4481b5 3885else
19650fd6
AS
3886 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3887See \`config.log' for more details." >&5
3888echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3889See \`config.log' for more details." >&2;}
503d2be0 3890 { (exit 1); exit 1; }; }
ba4481b5 3891fi
503d2be0
AS
3892
3893ac_ext=c
3894ac_cpp='$CPP $CPPFLAGS'
3895ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3896ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3897ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5
DL
3898
3899# Find a good install program. We prefer a C program (faster),
3900# so one script is as good as another. But avoid the broken or
3901# incompatible versions:
3902# SysV /etc/install, /usr/sbin/install
3903# SunOS /usr/etc/install
3904# IRIX /sbin/install
3905# AIX /bin/install
503d2be0 3906# AmigaOS /C/install, which installs bootblocks on floppy discs
c4bb2108 3907# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
ba4481b5
DL
3908# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3909# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
35996d22 3910# OS/2's system install, which has a completely different semantic
ba4481b5 3911# ./install, which can be erroneously created by make from ./install.sh.
c0d27fcc
MR
3912echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3913echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
ba4481b5 3914if test -z "$INSTALL"; then
503d2be0
AS
3915if test "${ac_cv_path_install+set}" = set; then
3916 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3917else
c0d27fcc
MR
3918 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3919for as_dir in $PATH
3920do
3921 IFS=$as_save_IFS
3922 test -z "$as_dir" && as_dir=.
3923 # Account for people who put trailing slashes in PATH elements.
3924case $as_dir/ in
3925 ./ | .// | /cC/* | \
3926 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
35996d22 3927 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
c0d27fcc
MR
3928 /usr/ucb/* ) ;;
3929 *)
3930 # OSF1 and SCO ODT 3.0 have their own names for install.
3931 # Don't use installbsd from OSF since it installs stuff as root
3932 # by default.
3933 for ac_prog in ginstall scoinst install; do
3934 for ac_exec_ext in '' $ac_executable_extensions; do
35996d22
AS
3935 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3936 if test $ac_prog = install &&
3937 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3938 # AIX install. It has an incompatible calling convention.
3939 :
3940 elif test $ac_prog = install &&
3941 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3942 # program-specific install script used by HP pwplus--don't use.
3943 :
3944 else
3945 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3946 break 3
3947 fi
3948 fi
ba4481b5 3949 done
c0d27fcc
MR
3950 done
3951 ;;
3952esac
3953done
3954
ba4481b5
DL
3955
3956fi
3957 if test "${ac_cv_path_install+set}" = set; then
503d2be0 3958 INSTALL=$ac_cv_path_install
ba4481b5
DL
3959 else
3960 # As a last resort, use the slow shell script. We don't cache a
3961 # path for INSTALL within a source directory, because that will
3962 # break other packages using the cache if that directory is
3963 # removed, or if the path is relative.
503d2be0 3964 INSTALL=$ac_install_sh
ba4481b5
DL
3965 fi
3966fi
c0d27fcc 3967echo "$as_me:$LINENO: result: $INSTALL" >&5
503d2be0 3968echo "${ECHO_T}$INSTALL" >&6
ba4481b5
DL
3969
3970# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3971# It thinks the first close brace ends the variable substitution.
3972test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3973
503d2be0 3974test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
c4bb2108 3975
ba4481b5
DL
3976test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3977
c0d27fcc
MR
3978if test "x$RANLIB" = x; then
3979 if test -n "$ac_tool_prefix"; then
3980 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3981set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3982echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0 3983echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
c0d27fcc 3984if test "${ac_cv_prog_RANLIB+set}" = set; then
503d2be0 3985 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4
DL
3986else
3987 if test -n "$RANLIB"; then
3988 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3989else
c0d27fcc
MR
3990as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3991for as_dir in $PATH
3992do
3993 IFS=$as_save_IFS
3994 test -z "$as_dir" && as_dir=.
3995 for ac_exec_ext in '' $ac_executable_extensions; do
3996 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3997 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3998 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3999 break 2
4000 fi
4001done
503d2be0
AS
4002done
4003
7397acc4
DL
4004fi
4005fi
503d2be0 4006RANLIB=$ac_cv_prog_RANLIB
7397acc4 4007if test -n "$RANLIB"; then
c0d27fcc 4008 echo "$as_me:$LINENO: result: $RANLIB" >&5
503d2be0
AS
4009echo "${ECHO_T}$RANLIB" >&6
4010else
c0d27fcc 4011 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
4012echo "${ECHO_T}no" >&6
4013fi
4014
4015fi
4016if test -z "$ac_cv_prog_RANLIB"; then
4017 ac_ct_RANLIB=$RANLIB
4018 # Extract the first word of "ranlib", so it can be a program name with args.
4019set dummy ranlib; ac_word=$2
c0d27fcc 4020echo "$as_me:$LINENO: checking for $ac_word" >&5
503d2be0
AS
4021echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4022if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4023 echo $ECHO_N "(cached) $ECHO_C" >&6
4024else
4025 if test -n "$ac_ct_RANLIB"; then
4026 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4027else
c0d27fcc
MR
4028as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4029for as_dir in $PATH
4030do
4031 IFS=$as_save_IFS
4032 test -z "$as_dir" && as_dir=.
4033 for ac_exec_ext in '' $ac_executable_extensions; do
4034 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4035 ac_cv_prog_ac_ct_RANLIB="ranlib"
4036 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4037 break 2
4038 fi
4039done
503d2be0
AS
4040done
4041
4042 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
4043fi
4044fi
4045ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4046if test -n "$ac_ct_RANLIB"; then
c0d27fcc 4047 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
503d2be0
AS
4048echo "${ECHO_T}$ac_ct_RANLIB" >&6
4049else
c0d27fcc 4050 echo "$as_me:$LINENO: result: no" >&5
503d2be0
AS
4051echo "${ECHO_T}no" >&6
4052fi
4053
4054 RANLIB=$ac_ct_RANLIB
7397acc4 4055else
503d2be0 4056 RANLIB="$ac_cv_prog_RANLIB"
7397acc4
DL
4057fi
4058
4059fi
9e71690e
DK
4060# Extract the first word of "install-info", so it can be a program name with args.
4061set dummy install-info; ac_word=$2
4062echo "$as_me:$LINENO: checking for $ac_word" >&5
4063echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4064if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
4065 echo $ECHO_N "(cached) $ECHO_C" >&6
4066else
4067 case $INSTALL_INFO in
4068 [\\/]* | ?:[\\/]*)
4069 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
4070 ;;
4071 *)
4072 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4073for as_dir in $PATH
4074do
4075 IFS=$as_save_IFS
4076 test -z "$as_dir" && as_dir=.
4077 for ac_exec_ext in '' $ac_executable_extensions; do
4078 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4079 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
4080 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4081 break 2
4082 fi
4083done
4084done
4085
4086 ;;
4087esac
4088fi
4089INSTALL_INFO=$ac_cv_path_INSTALL_INFO
4090
4091if test -n "$INSTALL_INFO"; then
4092 echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
4093echo "${ECHO_T}$INSTALL_INFO" >&6
4094else
4095 echo "$as_me:$LINENO: result: no" >&5
4096echo "${ECHO_T}no" >&6
4097fi
4098
4099# Extract the first word of "install-info", so it can be a program name with args.
4100set dummy install-info; ac_word=$2
4101echo "$as_me:$LINENO: checking for $ac_word" >&5
4102echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4103if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
4104 echo $ECHO_N "(cached) $ECHO_C" >&6
4105else
4106 case $INSTALL_INFO in
4107 [\\/]* | ?:[\\/]*)
4108 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
4109 ;;
4110 *)
4111 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4112for as_dir in /usr/sbin
4113do
4114 IFS=$as_save_IFS
4115 test -z "$as_dir" && as_dir=.
4116 for ac_exec_ext in '' $ac_executable_extensions; do
4117 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4118 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
4119 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4120 break 2
4121 fi
4122done
4123done
4124
4125 ;;
4126esac
4127fi
4128INSTALL_INFO=$ac_cv_path_INSTALL_INFO
4129
4130if test -n "$INSTALL_INFO"; then
4131 echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
4132echo "${ECHO_T}$INSTALL_INFO" >&6
4133else
4134 echo "$as_me:$LINENO: result: no" >&5
4135echo "${ECHO_T}no" >&6
4136fi
4137
4138# Extract the first word of "install-info", so it can be a program name with args.
4139set dummy install-info; ac_word=$2
4140echo "$as_me:$LINENO: checking for $ac_word" >&5
4141echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4142if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
4143 echo $ECHO_N "(cached) $ECHO_C" >&6
4144else
4145 case $INSTALL_INFO in
4146 [\\/]* | ?:[\\/]*)
4147 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
4148 ;;
4149 *)
4150 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4151for as_dir in /sbin
4152do
4153 IFS=$as_save_IFS
4154 test -z "$as_dir" && as_dir=.
4155 for ac_exec_ext in '' $ac_executable_extensions; do
4156 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4157 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
4158 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4159 break 2
4160 fi
4161done
4162done
4163
4164 test -z "$ac_cv_path_INSTALL_INFO" && ac_cv_path_INSTALL_INFO=":"
4165 ;;
4166esac
4167fi
4168INSTALL_INFO=$ac_cv_path_INSTALL_INFO
4169
4170if test -n "$INSTALL_INFO"; then
4171 echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
4172echo "${ECHO_T}$INSTALL_INFO" >&6
4173else
4174 echo "$as_me:$LINENO: result: no" >&5
4175echo "${ECHO_T}no" >&6
4176fi
4177
ba4481b5 4178
c0d27fcc 4179
8e967cf7
MR
4180if test x$GCC = xyes && test "x$GCC_LINK_TEST_OPTIONS" != x
4181then
4182 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
4183fi
4184
4185if test x$GCC = x && test "x$NON_GCC_LINK_TEST_OPTIONS" != x
4186then
4187 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
4188fi
4189
c0d27fcc 4190
fe239f0f 4191late_LDFLAGS=$LDFLAGS
4af002d6 4192if test "$GCC" = yes; then
fe239f0f
AS
4193 LDFLAGS="$LDFLAGS -Wl,-znocombreloc"
4194else
4195 LDFLAGS="$LDFLAGS -znocombreloc"
4196fi
4197
4198echo "$as_me:$LINENO: checking For -znocombreloc" >&5
4199echo $ECHO_N "checking For -znocombreloc... $ECHO_C" >&6
4200
4201cat >conftest.$ac_ext <<_ACEOF
4202main(){return 0;}
4203_ACEOF
4204rm -f conftest.$ac_objext conftest$ac_exeext
4205if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4206 (eval $ac_link) 2>conftest.er1
4207 ac_status=$?
4208 grep -v '^ *+' conftest.er1 >conftest.err
4209 rm -f conftest.er1
4210 cat conftest.err >&5
4211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4212 (exit $ac_status); } &&
551ffc27
ST
4213 { ac_try='test -z "$ac_c_werror_flag"
4214 || test ! -s conftest.err'
fe239f0f
AS
4215 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4216 (eval $ac_try) 2>&5
4217 ac_status=$?
4218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4219 (exit $ac_status); }; } &&
4220 { ac_try='test -s conftest$ac_exeext'
4221 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4222 (eval $ac_try) 2>&5
4223 ac_status=$?
4224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4225 (exit $ac_status); }; }; then
4226 echo "$as_me:$LINENO: result: yes" >&5
4227echo "${ECHO_T}yes" >&6
4228else
4229 echo "$as_me: failed program was:" >&5
4230sed 's/^/| /' conftest.$ac_ext >&5
4231
4232LDFLAGS=$late_LDFLAGS
4233 echo "$as_me:$LINENO: result: no" >&5
4234echo "${ECHO_T}no" >&6
4235fi
4236rm -f conftest.err conftest.$ac_objext \
4237 conftest$ac_exeext conftest.$ac_ext
4238
c0d27fcc 4239
6bae0ccf
DL
4240echo "$as_me:$LINENO: checking for egrep" >&5
4241echo $ECHO_N "checking for egrep... $ECHO_C" >&6
4242if test "${ac_cv_prog_egrep+set}" = set; then
4243 echo $ECHO_N "(cached) $ECHO_C" >&6
4244else
4245 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
4246 then ac_cv_prog_egrep='grep -E'
4247 else ac_cv_prog_egrep='egrep'
4248 fi
4249fi
4250echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
4251echo "${ECHO_T}$ac_cv_prog_egrep" >&6
4252 EGREP=$ac_cv_prog_egrep
4253
4254
c0d27fcc
MR
4255
4256echo "$as_me:$LINENO: checking for AIX" >&5
503d2be0
AS
4257echo $ECHO_N "checking for AIX... $ECHO_C" >&6
4258cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4259/* confdefs.h. */
4260_ACEOF
4261cat confdefs.h >>conftest.$ac_ext
4262cat >>conftest.$ac_ext <<_ACEOF
4263/* end confdefs.h. */
ba4481b5
DL
4264#ifdef _AIX
4265 yes
4266#endif
4267
503d2be0 4268_ACEOF
ba4481b5 4269if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 4270 $EGREP "yes" >/dev/null 2>&1; then
c0d27fcc 4271 echo "$as_me:$LINENO: result: yes" >&5
503d2be0 4272echo "${ECHO_T}yes" >&6
c0d27fcc 4273cat >>confdefs.h <<\_ACEOF
ba4481b5 4274#define _ALL_SOURCE 1
c0d27fcc 4275_ACEOF
ba4481b5
DL
4276
4277else
c0d27fcc 4278 echo "$as_me:$LINENO: result: no" >&5
503d2be0 4279echo "${ECHO_T}no" >&6
ba4481b5
DL
4280fi
4281rm -f conftest*
4282
c0d27fcc
MR
4283
4284
4489ece2 4285
3b33a005
DL
4286#### Extract some information from the operating system and machine files.
4287
c0d27fcc 4288{ echo "$as_me:$LINENO: checking the machine- and system-dependent files to find out
3b33a005 4289 - which libraries the lib-src programs will want, and
503d2be0
AS
4290 - whether the GNU malloc routines are usable..." >&5
4291echo "$as_me: checking the machine- and system-dependent files to find out
3b33a005 4292 - which libraries the lib-src programs will want, and
503d2be0 4293 - whether the GNU malloc routines are usable..." >&6;}
3b33a005
DL
4294
4295### First figure out CFLAGS (which we use for running the compiler here)
4296### and REAL_CFLAGS (which we use for real compilation).
4297### The two are the same except on a few systems, where they are made
4298### different to work around various lossages. For example,
4299### GCC 2.5 on GNU/Linux needs them to be different because it treats -g
4300### as implying static linking.
4301
4302### If the CFLAGS env var is specified, we use that value
4303### instead of the default.
4304
4305### It's not important that this name contain the PID; you can't run
4306### two configures in the same directory and have anything work
4307### anyway.
4308tempcname="conftest.c"
4309
4310echo '
4311#include "'${srcdir}'/src/'${opsysfile}'"
4312#include "'${srcdir}'/src/'${machfile}'"
4313#ifndef LIBS_MACHINE
4314#define LIBS_MACHINE
4315#endif
4316#ifndef LIBS_SYSTEM
4317#define LIBS_SYSTEM
4318#endif
4319#ifndef C_SWITCH_SYSTEM
4320#define C_SWITCH_SYSTEM
4321#endif
4322#ifndef C_SWITCH_MACHINE
4323#define C_SWITCH_MACHINE
4324#endif
4325configure___ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM
4326configure___ c_switch_system=C_SWITCH_SYSTEM
4327configure___ c_switch_machine=C_SWITCH_MACHINE
4328
4329#ifndef LIB_X11_LIB
4330#define LIB_X11_LIB -lX11
4331#endif
4332
4333#ifndef LIBX11_MACHINE
4334#define LIBX11_MACHINE
4335#endif
4336
4337#ifndef LIBX11_SYSTEM
4338#define LIBX11_SYSTEM
4339#endif
4340configure___ LIBX=LIB_X11_LIB LIBX11_MACHINE LIBX11_SYSTEM
4341
4342#ifdef UNEXEC
4343configure___ unexec=UNEXEC
4344#else
4345configure___ unexec=unexec.o
4346#endif
4347
4348#ifdef SYSTEM_MALLOC
4349configure___ system_malloc=yes
4350#else
4351configure___ system_malloc=no
4352#endif
4353
ef9e4345
GM
4354#ifdef USE_MMAP_FOR_BUFFERS
4355configure___ use_mmap_for_buffers=yes
73b77ee5 4356#else
ef9e4345 4357configure___ use_mmap_for_buffers=no
73b77ee5
GM
4358#endif
4359
3b33a005
DL
4360#ifndef C_DEBUG_SWITCH
4361#define C_DEBUG_SWITCH -g
4362#endif
4363
4364#ifndef C_OPTIMIZE_SWITCH
4365#ifdef __GNUC__
4366#define C_OPTIMIZE_SWITCH -O2
4367#else
4368#define C_OPTIMIZE_SWITCH -O
4369#endif
4370#endif
4371
4372#ifndef LD_SWITCH_MACHINE
4373#define LD_SWITCH_MACHINE
4374#endif
4375
4376#ifndef LD_SWITCH_SYSTEM
4377#define LD_SWITCH_SYSTEM
4378#endif
4379
4380#ifndef LD_SWITCH_X_SITE_AUX
4381#define LD_SWITCH_X_SITE_AUX
503d2be0 4382#endif
3b33a005
DL
4383
4384configure___ ld_switch_system=LD_SWITCH_SYSTEM
4385configure___ ld_switch_machine=LD_SWITCH_MACHINE
4386
4387#ifdef THIS_IS_CONFIGURE
4388
4389/* Get the CFLAGS for tests in configure. */
4390#ifdef __GNUC__
4391configure___ CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
4392#else
4393configure___ CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
4394#endif
4395
4396#else /* not THIS_IS_CONFIGURE */
4397
4398/* Get the CFLAGS for real compilation. */
4399#ifdef __GNUC__
4400configure___ REAL_CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
4401#else
4402configure___ REAL_CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
4403#endif
4404
4405#endif /* not THIS_IS_CONFIGURE */
4406' > ${tempcname}
4407
4408# The value of CPP is a quoted variable reference, so we need to do this
4409# to get its actual value...
4410CPP=`eval "echo $CPP"`
4411eval `${CPP} -Isrc ${tempcname} \
4412 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
4413if test "x$SPECIFIED_CFLAGS" = x; then
4414 eval `${CPP} -Isrc -DTHIS_IS_CONFIGURE ${tempcname} \
4415 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
4416else
4417 REAL_CFLAGS="$CFLAGS"
4418fi
4419rm ${tempcname}
4420
4421ac_link="$ac_link $ld_switch_machine $ld_switch_system"
4422
4423### Make sure subsequent tests use flags consistent with the build flags.
4424
4425if test x"${OVERRIDE_CPPFLAGS}" != x; then
4426 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
4427else
4428 CPPFLAGS="$c_switch_system $c_switch_machine $CPPFLAGS"
4429fi
4430
6bae0ccf
DL
4431
4432
22044edf
DL
4433
4434cat >>confdefs.h <<\_ACEOF
4435#define _GNU_SOURCE 1
4436_ACEOF
4437
4438
4439
503d2be0 4440# Check whether --enable-largefile or --disable-largefile was given.
f4988be7
GM
4441if test "${enable_largefile+set}" = set; then
4442 enableval="$enable_largefile"
f4988be7 4443
503d2be0
AS
4444fi;
4445if test "$enable_largefile" != no; then
f4988be7 4446
c0d27fcc 4447 echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
503d2be0
AS
4448echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
4449if test "${ac_cv_sys_largefile_CC+set}" = set; then
4450 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4451else
f4988be7 4452 ac_cv_sys_largefile_CC=no
503d2be0
AS
4453 if test "$GCC" != yes; then
4454 ac_save_CC=$CC
4455 while :; do
4456 # IRIX 6.2 and later do not support large files by default,
4457 # so use the C compiler's -n32 option if that helps.
35996d22 4458 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4459/* confdefs.h. */
4460_ACEOF
4461cat confdefs.h >>conftest.$ac_ext
4462cat >>conftest.$ac_ext <<_ACEOF
4463/* end confdefs.h. */
f4988be7 4464#include <sys/types.h>
503d2be0
AS
4465 /* Check that off_t can represent 2**63 - 1 correctly.
4466 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4467 since some C++ compilers masquerading as C compilers
4468 incorrectly reject 9223372036854775807. */
4469#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4470 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4471 && LARGE_OFF_T % 2147483647 == 1)
4472 ? 1 : -1];
4473int
4474main ()
4475{
f4988be7 4476
503d2be0
AS
4477 ;
4478 return 0;
4479}
4480_ACEOF
4481 rm -f conftest.$ac_objext
c0d27fcc 4482if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 4483 (eval $ac_compile) 2>conftest.er1
503d2be0 4484 ac_status=$?
35996d22
AS
4485 grep -v '^ *+' conftest.er1 >conftest.err
4486 rm -f conftest.er1
4487 cat conftest.err >&5
c0d27fcc 4488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 4489 (exit $ac_status); } &&
551ffc27
ST
4490 { ac_try='test -z "$ac_c_werror_flag"
4491 || test ! -s conftest.err'
35996d22
AS
4492 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4493 (eval $ac_try) 2>&5
4494 ac_status=$?
4495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4496 (exit $ac_status); }; } &&
4497 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 4498 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
4499 (eval $ac_try) 2>&5
4500 ac_status=$?
c0d27fcc 4501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4502 (exit $ac_status); }; }; then
4503 break
b192d653 4504else
503d2be0 4505 echo "$as_me: failed program was:" >&5
19650fd6
AS
4506sed 's/^/| /' conftest.$ac_ext >&5
4507
503d2be0 4508fi
35996d22 4509rm -f conftest.err conftest.$ac_objext
503d2be0
AS
4510 CC="$CC -n32"
4511 rm -f conftest.$ac_objext
c0d27fcc 4512if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 4513 (eval $ac_compile) 2>conftest.er1
503d2be0 4514 ac_status=$?
35996d22
AS
4515 grep -v '^ *+' conftest.er1 >conftest.err
4516 rm -f conftest.er1
4517 cat conftest.err >&5
c0d27fcc 4518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 4519 (exit $ac_status); } &&
551ffc27
ST
4520 { ac_try='test -z "$ac_c_werror_flag"
4521 || test ! -s conftest.err'
35996d22
AS
4522 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4523 (eval $ac_try) 2>&5
4524 ac_status=$?
4525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4526 (exit $ac_status); }; } &&
4527 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 4528 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
4529 (eval $ac_try) 2>&5
4530 ac_status=$?
c0d27fcc 4531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4532 (exit $ac_status); }; }; then
4533 ac_cv_sys_largefile_CC=' -n32'; break
4534else
4535 echo "$as_me: failed program was:" >&5
19650fd6
AS
4536sed 's/^/| /' conftest.$ac_ext >&5
4537
503d2be0 4538fi
35996d22
AS
4539rm -f conftest.err conftest.$ac_objext
4540 break
503d2be0
AS
4541 done
4542 CC=$ac_save_CC
4543 rm -f conftest.$ac_ext
4544 fi
b192d653 4545fi
c0d27fcc 4546echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
503d2be0
AS
4547echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
4548 if test "$ac_cv_sys_largefile_CC" != no; then
4549 CC=$CC$ac_cv_sys_largefile_CC
4550 fi
b192d653 4551
c0d27fcc 4552 echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
503d2be0
AS
4553echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
4554if test "${ac_cv_sys_file_offset_bits+set}" = set; then
4555 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4556else
503d2be0 4557 while :; do
f4988be7 4558 ac_cv_sys_file_offset_bits=no
503d2be0 4559 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4560/* confdefs.h. */
4561_ACEOF
4562cat confdefs.h >>conftest.$ac_ext
4563cat >>conftest.$ac_ext <<_ACEOF
4564/* end confdefs.h. */
f4988be7 4565#include <sys/types.h>
503d2be0
AS
4566 /* Check that off_t can represent 2**63 - 1 correctly.
4567 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4568 since some C++ compilers masquerading as C compilers
4569 incorrectly reject 9223372036854775807. */
4570#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4571 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4572 && LARGE_OFF_T % 2147483647 == 1)
4573 ? 1 : -1];
4574int
4575main ()
4576{
f4988be7 4577
503d2be0
AS
4578 ;
4579 return 0;
4580}
4581_ACEOF
4582rm -f conftest.$ac_objext
c0d27fcc 4583if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 4584 (eval $ac_compile) 2>conftest.er1
503d2be0 4585 ac_status=$?
35996d22
AS
4586 grep -v '^ *+' conftest.er1 >conftest.err
4587 rm -f conftest.er1
4588 cat conftest.err >&5
c0d27fcc 4589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 4590 (exit $ac_status); } &&
551ffc27
ST
4591 { ac_try='test -z "$ac_c_werror_flag"
4592 || test ! -s conftest.err'
35996d22
AS
4593 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4594 (eval $ac_try) 2>&5
4595 ac_status=$?
4596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4597 (exit $ac_status); }; } &&
4598 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 4599 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
4600 (eval $ac_try) 2>&5
4601 ac_status=$?
c0d27fcc 4602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4603 (exit $ac_status); }; }; then
4604 break
f4988be7 4605else
503d2be0 4606 echo "$as_me: failed program was:" >&5
19650fd6
AS
4607sed 's/^/| /' conftest.$ac_ext >&5
4608
503d2be0 4609fi
35996d22 4610rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 4611 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4612/* confdefs.h. */
4613_ACEOF
4614cat confdefs.h >>conftest.$ac_ext
4615cat >>conftest.$ac_ext <<_ACEOF
4616/* end confdefs.h. */
f4988be7
GM
4617#define _FILE_OFFSET_BITS 64
4618#include <sys/types.h>
503d2be0
AS
4619 /* Check that off_t can represent 2**63 - 1 correctly.
4620 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4621 since some C++ compilers masquerading as C compilers
4622 incorrectly reject 9223372036854775807. */
4623#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4624 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4625 && LARGE_OFF_T % 2147483647 == 1)
4626 ? 1 : -1];
4627int
4628main ()
4629{
4630
4631 ;
4632 return 0;
4633}
4634_ACEOF
4635rm -f conftest.$ac_objext
c0d27fcc 4636if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 4637 (eval $ac_compile) 2>conftest.er1
503d2be0 4638 ac_status=$?
35996d22
AS
4639 grep -v '^ *+' conftest.er1 >conftest.err
4640 rm -f conftest.er1
4641 cat conftest.err >&5
c0d27fcc 4642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 4643 (exit $ac_status); } &&
551ffc27
ST
4644 { ac_try='test -z "$ac_c_werror_flag"
4645 || test ! -s conftest.err'
35996d22
AS
4646 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4647 (eval $ac_try) 2>&5
4648 ac_status=$?
4649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4650 (exit $ac_status); }; } &&
4651 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 4652 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
4653 (eval $ac_try) 2>&5
4654 ac_status=$?
c0d27fcc 4655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4656 (exit $ac_status); }; }; then
4657 ac_cv_sys_file_offset_bits=64; break
4658else
4659 echo "$as_me: failed program was:" >&5
19650fd6
AS
4660sed 's/^/| /' conftest.$ac_ext >&5
4661
503d2be0 4662fi
35996d22 4663rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
4664 break
4665done
ba4481b5 4666fi
c0d27fcc 4667echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
503d2be0
AS
4668echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
4669if test "$ac_cv_sys_file_offset_bits" != no; then
ba4481b5 4670
c0d27fcc 4671cat >>confdefs.h <<_ACEOF
f4988be7 4672#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
c0d27fcc 4673_ACEOF
f4988be7 4674
503d2be0
AS
4675fi
4676rm -f conftest*
c0d27fcc 4677 echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
503d2be0
AS
4678echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
4679if test "${ac_cv_sys_large_files+set}" = set; then
4680 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4681else
503d2be0 4682 while :; do
f4988be7 4683 ac_cv_sys_large_files=no
503d2be0 4684 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4685/* confdefs.h. */
4686_ACEOF
4687cat confdefs.h >>conftest.$ac_ext
4688cat >>conftest.$ac_ext <<_ACEOF
4689/* end confdefs.h. */
503d2be0
AS
4690#include <sys/types.h>
4691 /* Check that off_t can represent 2**63 - 1 correctly.
4692 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4693 since some C++ compilers masquerading as C compilers
4694 incorrectly reject 9223372036854775807. */
4695#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4696 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4697 && LARGE_OFF_T % 2147483647 == 1)
4698 ? 1 : -1];
4699int
4700main ()
4701{
ba4481b5 4702
503d2be0
AS
4703 ;
4704 return 0;
4705}
4706_ACEOF
4707rm -f conftest.$ac_objext
c0d27fcc 4708if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 4709 (eval $ac_compile) 2>conftest.er1
503d2be0 4710 ac_status=$?
35996d22
AS
4711 grep -v '^ *+' conftest.er1 >conftest.err
4712 rm -f conftest.er1
4713 cat conftest.err >&5
c0d27fcc 4714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 4715 (exit $ac_status); } &&
551ffc27
ST
4716 { ac_try='test -z "$ac_c_werror_flag"
4717 || test ! -s conftest.err'
35996d22
AS
4718 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4719 (eval $ac_try) 2>&5
4720 ac_status=$?
4721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4722 (exit $ac_status); }; } &&
4723 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 4724 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
4725 (eval $ac_try) 2>&5
4726 ac_status=$?
c0d27fcc 4727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4728 (exit $ac_status); }; }; then
4729 break
ba4481b5 4730else
503d2be0 4731 echo "$as_me: failed program was:" >&5
19650fd6
AS
4732sed 's/^/| /' conftest.$ac_ext >&5
4733
503d2be0 4734fi
35996d22 4735rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 4736 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4737/* confdefs.h. */
4738_ACEOF
4739cat confdefs.h >>conftest.$ac_ext
4740cat >>conftest.$ac_ext <<_ACEOF
4741/* end confdefs.h. */
f4988be7 4742#define _LARGE_FILES 1
503d2be0
AS
4743#include <sys/types.h>
4744 /* Check that off_t can represent 2**63 - 1 correctly.
4745 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4746 since some C++ compilers masquerading as C compilers
4747 incorrectly reject 9223372036854775807. */
4748#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4749 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4750 && LARGE_OFF_T % 2147483647 == 1)
4751 ? 1 : -1];
4752int
4753main ()
4754{
f4988be7 4755
503d2be0
AS
4756 ;
4757 return 0;
4758}
4759_ACEOF
4760rm -f conftest.$ac_objext
c0d27fcc 4761if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 4762 (eval $ac_compile) 2>conftest.er1
503d2be0 4763 ac_status=$?
35996d22
AS
4764 grep -v '^ *+' conftest.er1 >conftest.err
4765 rm -f conftest.er1
4766 cat conftest.err >&5
c0d27fcc 4767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 4768 (exit $ac_status); } &&
551ffc27
ST
4769 { ac_try='test -z "$ac_c_werror_flag"
4770 || test ! -s conftest.err'
35996d22
AS
4771 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4772 (eval $ac_try) 2>&5
4773 ac_status=$?
4774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4775 (exit $ac_status); }; } &&
4776 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 4777 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
4778 (eval $ac_try) 2>&5
4779 ac_status=$?
c0d27fcc 4780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
4781 (exit $ac_status); }; }; then
4782 ac_cv_sys_large_files=1; break
4783else
4784 echo "$as_me: failed program was:" >&5
19650fd6
AS
4785sed 's/^/| /' conftest.$ac_ext >&5
4786
503d2be0 4787fi
35996d22 4788rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
4789 break
4790done
ba4481b5 4791fi
c0d27fcc 4792echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
503d2be0
AS
4793echo "${ECHO_T}$ac_cv_sys_large_files" >&6
4794if test "$ac_cv_sys_large_files" != no; then
ba4481b5 4795
c0d27fcc 4796cat >>confdefs.h <<_ACEOF
f4988be7 4797#define _LARGE_FILES $ac_cv_sys_large_files
c0d27fcc 4798_ACEOF
ba4481b5 4799
503d2be0
AS
4800fi
4801rm -f conftest*
4802fi
ba4481b5 4803
c0d27fcc 4804
2c9dccc9
PJ
4805if test "${with_sound}" != "no"; then
4806 # Sound support for GNU/Linux and the free BSDs.
c0d27fcc
MR
4807 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4808echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
4809if test "${ac_cv_header_stdc+set}" = set; then
4810 echo $ECHO_N "(cached) $ECHO_C" >&6
4811else
4812 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4813/* confdefs.h. */
4814_ACEOF
4815cat confdefs.h >>conftest.$ac_ext
4816cat >>conftest.$ac_ext <<_ACEOF
4817/* end confdefs.h. */
c0d27fcc
MR
4818#include <stdlib.h>
4819#include <stdarg.h>
4820#include <string.h>
4821#include <float.h>
98418dba 4822
19650fd6
AS
4823int
4824main ()
4825{
4826
4827 ;
4828 return 0;
4829}
c0d27fcc 4830_ACEOF
19650fd6
AS
4831rm -f conftest.$ac_objext
4832if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 4833 (eval $ac_compile) 2>conftest.er1
cd958eb3 4834 ac_status=$?
35996d22
AS
4835 grep -v '^ *+' conftest.er1 >conftest.err
4836 rm -f conftest.er1
4837 cat conftest.err >&5
cd958eb3 4838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19650fd6 4839 (exit $ac_status); } &&
551ffc27
ST
4840 { ac_try='test -z "$ac_c_werror_flag"
4841 || test ! -s conftest.err'
35996d22
AS
4842 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4843 (eval $ac_try) 2>&5
4844 ac_status=$?
4845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4846 (exit $ac_status); }; } &&
4847 { ac_try='test -s conftest.$ac_objext'
19650fd6
AS
4848 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4849 (eval $ac_try) 2>&5
4850 ac_status=$?
4851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4852 (exit $ac_status); }; }; then
c0d27fcc
MR
4853 ac_cv_header_stdc=yes
4854else
4855 echo "$as_me: failed program was:" >&5
19650fd6
AS
4856sed 's/^/| /' conftest.$ac_ext >&5
4857
4858ac_cv_header_stdc=no
c0d27fcc 4859fi
35996d22 4860rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
4861
4862if test $ac_cv_header_stdc = yes; then
4863 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4864 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4865/* confdefs.h. */
4866_ACEOF
4867cat confdefs.h >>conftest.$ac_ext
4868cat >>conftest.$ac_ext <<_ACEOF
4869/* end confdefs.h. */
c0d27fcc
MR
4870#include <string.h>
4871
4872_ACEOF
4873if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 4874 $EGREP "memchr" >/dev/null 2>&1; then
c0d27fcc
MR
4875 :
4876else
4877 ac_cv_header_stdc=no
4878fi
4879rm -f conftest*
4880
4881fi
4882
4883if test $ac_cv_header_stdc = yes; then
4884 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4885 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4886/* confdefs.h. */
4887_ACEOF
4888cat confdefs.h >>conftest.$ac_ext
4889cat >>conftest.$ac_ext <<_ACEOF
4890/* end confdefs.h. */
c0d27fcc
MR
4891#include <stdlib.h>
4892
4893_ACEOF
4894if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 4895 $EGREP "free" >/dev/null 2>&1; then
c0d27fcc
MR
4896 :
4897else
4898 ac_cv_header_stdc=no
4899fi
4900rm -f conftest*
4901
4902fi
4903
4904if test $ac_cv_header_stdc = yes; then
4905 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4906 if test "$cross_compiling" = yes; then
4907 :
4908else
4909 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4910/* confdefs.h. */
4911_ACEOF
4912cat confdefs.h >>conftest.$ac_ext
4913cat >>conftest.$ac_ext <<_ACEOF
4914/* end confdefs.h. */
c0d27fcc
MR
4915#include <ctype.h>
4916#if ((' ' & 0x0FF) == 0x020)
4917# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4918# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4919#else
19650fd6 4920# define ISLOWER(c) \
35996d22
AS
4921 (('a' <= (c) && (c) <= 'i') \
4922 || ('j' <= (c) && (c) <= 'r') \
4923 || ('s' <= (c) && (c) <= 'z'))
c0d27fcc
MR
4924# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4925#endif
4926
4927#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4928int
4929main ()
4930{
4931 int i;
4932 for (i = 0; i < 256; i++)
4933 if (XOR (islower (i), ISLOWER (i))
35996d22 4934 || toupper (i) != TOUPPER (i))
c0d27fcc
MR
4935 exit(2);
4936 exit (0);
4937}
4938_ACEOF
4939rm -f conftest$ac_exeext
4940if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4941 (eval $ac_link) 2>&5
4942 ac_status=$?
4943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4944 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4945 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4946 (eval $ac_try) 2>&5
4947 ac_status=$?
4948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4949 (exit $ac_status); }; }; then
4950 :
4951else
4952 echo "$as_me: program exited with status $ac_status" >&5
4953echo "$as_me: failed program was:" >&5
19650fd6
AS
4954sed 's/^/| /' conftest.$ac_ext >&5
4955
c0d27fcc
MR
4956( exit $ac_status )
4957ac_cv_header_stdc=no
4958fi
35996d22 4959rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
4960fi
4961fi
4962fi
4963echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4964echo "${ECHO_T}$ac_cv_header_stdc" >&6
4965if test $ac_cv_header_stdc = yes; then
4966
4967cat >>confdefs.h <<\_ACEOF
4968#define STDC_HEADERS 1
4969_ACEOF
4970
4971fi
4972
4973# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
35996d22 4984 inttypes.h stdint.h unistd.h
98418dba
CW
4985do
4986as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc 4987echo "$as_me:$LINENO: checking for $ac_header" >&5
98418dba
CW
4988echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4989if eval "test \"\${$as_ac_Header+set}\" = set"; then
503d2be0 4990 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 4991else
925c2f3f 4992 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4993/* confdefs.h. */
4994_ACEOF
4995cat confdefs.h >>conftest.$ac_ext
4996cat >>conftest.$ac_ext <<_ACEOF
4997/* end confdefs.h. */
c0d27fcc
MR
4998$ac_includes_default
4999
5000#include <$ac_header>
5001_ACEOF
5002rm -f conftest.$ac_objext
5003if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 5004 (eval $ac_compile) 2>conftest.er1
c0d27fcc 5005 ac_status=$?
35996d22
AS
5006 grep -v '^ *+' conftest.er1 >conftest.err
5007 rm -f conftest.er1
5008 cat conftest.err >&5
c0d27fcc
MR
5009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5010 (exit $ac_status); } &&
551ffc27
ST
5011 { ac_try='test -z "$ac_c_werror_flag"
5012 || test ! -s conftest.err'
35996d22
AS
5013 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5014 (eval $ac_try) 2>&5
5015 ac_status=$?
5016 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5017 (exit $ac_status); }; } &&
5018 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
5019 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5020 (eval $ac_try) 2>&5
5021 ac_status=$?
5022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5023 (exit $ac_status); }; }; then
5024 eval "$as_ac_Header=yes"
5025else
5026 echo "$as_me: failed program was:" >&5
19650fd6
AS
5027sed 's/^/| /' conftest.$ac_ext >&5
5028
c0d27fcc
MR
5029eval "$as_ac_Header=no"
5030fi
35996d22 5031rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
5032fi
5033echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5034echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5035if test `eval echo '${'$as_ac_Header'}'` = yes; then
5036 cat >>confdefs.h <<_ACEOF
5037#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5038_ACEOF
5039
5040fi
5041
5042done
5043
5044
5045
5046
5047
5048for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h
5049do
5050as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5051if eval "test \"\${$as_ac_Header+set}\" = set"; then
5052 echo "$as_me:$LINENO: checking for $ac_header" >&5
5053echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5054if eval "test \"\${$as_ac_Header+set}\" = set"; then
5055 echo $ECHO_N "(cached) $ECHO_C" >&6
5056fi
5057echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5058echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5059else
5060 # Is the header compilable?
5061echo "$as_me:$LINENO: checking $ac_header usability" >&5
5062echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
5063cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5064/* confdefs.h. */
5065_ACEOF
5066cat confdefs.h >>conftest.$ac_ext
5067cat >>conftest.$ac_ext <<_ACEOF
5068/* end confdefs.h. */
c0d27fcc 5069$ac_includes_default
98418dba 5070#include <$ac_header>
503d2be0 5071_ACEOF
c0d27fcc
MR
5072rm -f conftest.$ac_objext
5073if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 5074 (eval $ac_compile) 2>conftest.er1
c0d27fcc 5075 ac_status=$?
35996d22
AS
5076 grep -v '^ *+' conftest.er1 >conftest.err
5077 rm -f conftest.er1
5078 cat conftest.err >&5
c0d27fcc
MR
5079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5080 (exit $ac_status); } &&
551ffc27
ST
5081 { ac_try='test -z "$ac_c_werror_flag"
5082 || test ! -s conftest.err'
35996d22
AS
5083 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5084 (eval $ac_try) 2>&5
5085 ac_status=$?
5086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5087 (exit $ac_status); }; } &&
5088 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
5089 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5090 (eval $ac_try) 2>&5
5091 ac_status=$?
5092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5093 (exit $ac_status); }; }; then
5094 ac_header_compiler=yes
5095else
5096 echo "$as_me: failed program was:" >&5
19650fd6
AS
5097sed 's/^/| /' conftest.$ac_ext >&5
5098
c0d27fcc
MR
5099ac_header_compiler=no
5100fi
35996d22 5101rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
5102echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5103echo "${ECHO_T}$ac_header_compiler" >&6
5104
5105# Is the header present?
5106echo "$as_me:$LINENO: checking $ac_header presence" >&5
5107echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
5108cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5109/* confdefs.h. */
5110_ACEOF
5111cat confdefs.h >>conftest.$ac_ext
5112cat >>conftest.$ac_ext <<_ACEOF
5113/* end confdefs.h. */
c0d27fcc
MR
5114#include <$ac_header>
5115_ACEOF
5116if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba 5117 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
503d2be0 5118 ac_status=$?
6bae0ccf 5119 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
5120 rm -f conftest.er1
5121 cat conftest.err >&5
c0d27fcc 5122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
5123 (exit $ac_status); } >/dev/null; then
5124 if test -s conftest.err; then
5125 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 5126 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
5127 else
5128 ac_cpp_err=
5129 fi
5130else
5131 ac_cpp_err=yes
5132fi
5133if test -z "$ac_cpp_err"; then
c0d27fcc 5134 ac_header_preproc=yes
f4988be7 5135else
503d2be0 5136 echo "$as_me: failed program was:" >&5
19650fd6
AS
5137sed 's/^/| /' conftest.$ac_ext >&5
5138
c0d27fcc 5139 ac_header_preproc=no
f4988be7 5140fi
98418dba 5141rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
5142echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5143echo "${ECHO_T}$ac_header_preproc" >&6
5144
5145# So? What about this header?
35996d22
AS
5146case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5147 yes:no: )
c0d27fcc
MR
5148 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5149echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
5150 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5151echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
5152 ac_header_preproc=yes
19650fd6 5153 ;;
35996d22 5154 no:yes:* )
c0d27fcc
MR
5155 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5156echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
5157 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5158echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5159 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5160echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5161 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5162echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 5163 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 5164echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
5165 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5166echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
5167 (
5168 cat <<\_ASBOX
35996d22
AS
5169## ------------------------------------------ ##
5170## Report this to the AC_PACKAGE_NAME lists. ##
5171## ------------------------------------------ ##
19650fd6
AS
5172_ASBOX
5173 ) |
5174 sed "s/^/$as_me: WARNING: /" >&2
5175 ;;
c0d27fcc
MR
5176esac
5177echo "$as_me:$LINENO: checking for $ac_header" >&5
5178echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5179if eval "test \"\${$as_ac_Header+set}\" = set"; then
5180 echo $ECHO_N "(cached) $ECHO_C" >&6
5181else
35996d22 5182 eval "$as_ac_Header=\$ac_header_preproc"
f4988be7 5183fi
c0d27fcc 5184echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 5185echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
5186
5187fi
98418dba 5188if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 5189 cat >>confdefs.h <<_ACEOF
98418dba 5190#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 5191_ACEOF
f4988be7
GM
5192
5193fi
c0d27fcc 5194
98418dba
CW
5195done
5196
5197 # Emulation library used on NetBSD.
c0d27fcc 5198 echo "$as_me:$LINENO: checking for _oss_ioctl in -lossaudio" >&5
98418dba
CW
5199echo $ECHO_N "checking for _oss_ioctl in -lossaudio... $ECHO_C" >&6
5200if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then
503d2be0 5201 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 5202else
98418dba
CW
5203 ac_check_lib_save_LIBS=$LIBS
5204LIBS="-lossaudio $LIBS"
5205cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5206/* confdefs.h. */
5207_ACEOF
5208cat confdefs.h >>conftest.$ac_ext
5209cat >>conftest.$ac_ext <<_ACEOF
5210/* end confdefs.h. */
98418dba
CW
5211
5212/* Override any gcc2 internal prototype to avoid an error. */
5213#ifdef __cplusplus
5214extern "C"
f4988be7 5215#endif
98418dba
CW
5216/* We use char because int might match the return type of a gcc2
5217 builtin and then its argument prototype would still apply. */
5218char _oss_ioctl ();
503d2be0
AS
5219int
5220main ()
5221{
98418dba 5222_oss_ioctl ();
503d2be0
AS
5223 ;
5224 return 0;
5225}
5226_ACEOF
98418dba 5227rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 5228if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 5229 (eval $ac_link) 2>conftest.er1
503d2be0 5230 ac_status=$?
35996d22
AS
5231 grep -v '^ *+' conftest.er1 >conftest.err
5232 rm -f conftest.er1
5233 cat conftest.err >&5
c0d27fcc 5234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5235 (exit $ac_status); } &&
551ffc27
ST
5236 { ac_try='test -z "$ac_c_werror_flag"
5237 || test ! -s conftest.err'
35996d22
AS
5238 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5239 (eval $ac_try) 2>&5
5240 ac_status=$?
5241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5242 (exit $ac_status); }; } &&
5243 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 5244 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5245 (eval $ac_try) 2>&5
5246 ac_status=$?
c0d27fcc 5247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5248 (exit $ac_status); }; }; then
98418dba 5249 ac_cv_lib_ossaudio__oss_ioctl=yes
f4988be7 5250else
503d2be0 5251 echo "$as_me: failed program was:" >&5
19650fd6
AS
5252sed 's/^/| /' conftest.$ac_ext >&5
5253
98418dba 5254ac_cv_lib_ossaudio__oss_ioctl=no
f4988be7 5255fi
35996d22
AS
5256rm -f conftest.err conftest.$ac_objext \
5257 conftest$ac_exeext conftest.$ac_ext
98418dba 5258LIBS=$ac_check_lib_save_LIBS
f4988be7 5259fi
c0d27fcc 5260echo "$as_me:$LINENO: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5
98418dba
CW
5261echo "${ECHO_T}$ac_cv_lib_ossaudio__oss_ioctl" >&6
5262if test $ac_cv_lib_ossaudio__oss_ioctl = yes; then
5263 LIBSOUND=-lossaudio
5264else
5265 LIBSOUND=
5266fi
5267
c0d27fcc 5268
f4988be7 5269fi
c0d27fcc
MR
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
22044edf
DL
5288
5289
973a76b1 5290
cffcede7 5291
551ffc27 5292
226e2359 5293
c0d27fcc 5294
f4988be7 5295
98418dba
CW
5296for ac_header in sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \
5297 linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \
25ca0bca 5298 termcap.h stdio_ext.h fcntl.h strings.h coff.h pty.h sys/mman.h \
551ffc27 5299 sys/param.h sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h \
226e2359 5300 sys/utsname.h pwd.h
98418dba
CW
5301do
5302as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
5303if eval "test \"\${$as_ac_Header+set}\" = set"; then
5304 echo "$as_me:$LINENO: checking for $ac_header" >&5
98418dba
CW
5305echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5306if eval "test \"\${$as_ac_Header+set}\" = set"; then
503d2be0 5307 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
5308fi
5309echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5310echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
f4988be7 5311else
c0d27fcc
MR
5312 # Is the header compilable?
5313echo "$as_me:$LINENO: checking $ac_header usability" >&5
5314echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
5315cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5316/* confdefs.h. */
5317_ACEOF
5318cat confdefs.h >>conftest.$ac_ext
5319cat >>conftest.$ac_ext <<_ACEOF
5320/* end confdefs.h. */
c0d27fcc
MR
5321$ac_includes_default
5322#include <$ac_header>
5323_ACEOF
5324rm -f conftest.$ac_objext
5325if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 5326 (eval $ac_compile) 2>conftest.er1
c0d27fcc 5327 ac_status=$?
35996d22
AS
5328 grep -v '^ *+' conftest.er1 >conftest.err
5329 rm -f conftest.er1
5330 cat conftest.err >&5
c0d27fcc
MR
5331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5332 (exit $ac_status); } &&
551ffc27
ST
5333 { ac_try='test -z "$ac_c_werror_flag"
5334 || test ! -s conftest.err'
35996d22
AS
5335 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5336 (eval $ac_try) 2>&5
5337 ac_status=$?
5338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5339 (exit $ac_status); }; } &&
5340 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
5341 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5342 (eval $ac_try) 2>&5
5343 ac_status=$?
5344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5345 (exit $ac_status); }; }; then
5346 ac_header_compiler=yes
5347else
5348 echo "$as_me: failed program was:" >&5
19650fd6
AS
5349sed 's/^/| /' conftest.$ac_ext >&5
5350
c0d27fcc
MR
5351ac_header_compiler=no
5352fi
35996d22 5353rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
5354echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5355echo "${ECHO_T}$ac_header_compiler" >&6
5356
5357# Is the header present?
5358echo "$as_me:$LINENO: checking $ac_header presence" >&5
5359echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
5360cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5361/* confdefs.h. */
5362_ACEOF
5363cat confdefs.h >>conftest.$ac_ext
5364cat >>conftest.$ac_ext <<_ACEOF
5365/* end confdefs.h. */
98418dba 5366#include <$ac_header>
503d2be0 5367_ACEOF
c0d27fcc 5368if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba 5369 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
503d2be0 5370 ac_status=$?
6bae0ccf 5371 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
5372 rm -f conftest.er1
5373 cat conftest.err >&5
c0d27fcc 5374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
5375 (exit $ac_status); } >/dev/null; then
5376 if test -s conftest.err; then
5377 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 5378 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
5379 else
5380 ac_cpp_err=
5381 fi
5382else
5383 ac_cpp_err=yes
5384fi
5385if test -z "$ac_cpp_err"; then
c0d27fcc 5386 ac_header_preproc=yes
34ec9ebe 5387else
503d2be0 5388 echo "$as_me: failed program was:" >&5
19650fd6
AS
5389sed 's/^/| /' conftest.$ac_ext >&5
5390
c0d27fcc 5391 ac_header_preproc=no
34ec9ebe 5392fi
98418dba 5393rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
5394echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5395echo "${ECHO_T}$ac_header_preproc" >&6
5396
5397# So? What about this header?
35996d22
AS
5398case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5399 yes:no: )
c0d27fcc
MR
5400 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5401echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
5402 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5403echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
5404 ac_header_preproc=yes
19650fd6 5405 ;;
35996d22 5406 no:yes:* )
c0d27fcc
MR
5407 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5408echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
5409 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5410echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5411 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5412echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5413 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5414echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 5415 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 5416echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
5417 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5418echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
5419 (
5420 cat <<\_ASBOX
35996d22
AS
5421## ------------------------------------------ ##
5422## Report this to the AC_PACKAGE_NAME lists. ##
5423## ------------------------------------------ ##
19650fd6
AS
5424_ASBOX
5425 ) |
5426 sed "s/^/$as_me: WARNING: /" >&2
5427 ;;
c0d27fcc
MR
5428esac
5429echo "$as_me:$LINENO: checking for $ac_header" >&5
5430echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5431if eval "test \"\${$as_ac_Header+set}\" = set"; then
5432 echo $ECHO_N "(cached) $ECHO_C" >&6
5433else
35996d22 5434 eval "$as_ac_Header=\$ac_header_preproc"
34ec9ebe 5435fi
c0d27fcc 5436echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 5437echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
5438
5439fi
98418dba 5440if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 5441 cat >>confdefs.h <<_ACEOF
98418dba 5442#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 5443_ACEOF
34ec9ebe 5444
98418dba 5445fi
c0d27fcc 5446
98418dba
CW
5447done
5448
22044edf 5449
f17e308a
JD
5450echo "$as_me:$LINENO: checking if personality LINUX32 can be set" >&5
5451echo $ECHO_N "checking if personality LINUX32 can be set... $ECHO_C" >&6
5452cat >conftest.$ac_ext <<_ACEOF
5453/* confdefs.h. */
5454_ACEOF
5455cat confdefs.h >>conftest.$ac_ext
5456cat >>conftest.$ac_ext <<_ACEOF
5457/* end confdefs.h. */
5458#include <sys/personality.h>
5459int
5460main ()
5461{
5462personality (PER_LINUX32)
5463 ;
5464 return 0;
5465}
5466_ACEOF
5467rm -f conftest.$ac_objext
5468if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5469 (eval $ac_compile) 2>conftest.er1
5470 ac_status=$?
5471 grep -v '^ *+' conftest.er1 >conftest.err
5472 rm -f conftest.er1
5473 cat conftest.err >&5
5474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5475 (exit $ac_status); } &&
551ffc27
ST
5476 { ac_try='test -z "$ac_c_werror_flag"
5477 || test ! -s conftest.err'
f17e308a
JD
5478 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5479 (eval $ac_try) 2>&5
5480 ac_status=$?
5481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5482 (exit $ac_status); }; } &&
5483 { ac_try='test -s conftest.$ac_objext'
5484 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5485 (eval $ac_try) 2>&5
5486 ac_status=$?
5487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5488 (exit $ac_status); }; }; then
5489 emacs_cv_personality_linux32=yes
5490else
5491 echo "$as_me: failed program was:" >&5
5492sed 's/^/| /' conftest.$ac_ext >&5
5493
5494emacs_cv_personality_linux32=no
5495fi
5496rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5497echo "$as_me:$LINENO: result: $emacs_cv_personality_linux32" >&5
5498echo "${ECHO_T}$emacs_cv_personality_linux32" >&6
5499
5500if test $emacs_cv_personality_linux32 = yes; then
5501
5502cat >>confdefs.h <<\_ACEOF
5503#define HAVE_PERSONALITY_LINUX32 1
5504_ACEOF
5505
5506fi
5507
5508
22044edf
DL
5509for ac_header in term.h
5510do
5511as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5512echo "$as_me:$LINENO: checking for $ac_header" >&5
5513echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5514if eval "test \"\${$as_ac_Header+set}\" = set"; then
5515 echo $ECHO_N "(cached) $ECHO_C" >&6
5516else
5517 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5518/* confdefs.h. */
5519_ACEOF
5520cat confdefs.h >>conftest.$ac_ext
5521cat >>conftest.$ac_ext <<_ACEOF
5522/* end confdefs.h. */
22044edf
DL
5523#include <$ac_header>
5524_ACEOF
5525if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5526 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5527 ac_status=$?
5528 grep -v '^ *+' conftest.er1 >conftest.err
5529 rm -f conftest.er1
5530 cat conftest.err >&5
5531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5532 (exit $ac_status); } >/dev/null; then
5533 if test -s conftest.err; then
5534 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 5535 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
22044edf
DL
5536 else
5537 ac_cpp_err=
5538 fi
5539else
5540 ac_cpp_err=yes
5541fi
5542if test -z "$ac_cpp_err"; then
5543 eval "$as_ac_Header=yes"
5544else
5545 echo "$as_me: failed program was:" >&5
19650fd6
AS
5546sed 's/^/| /' conftest.$ac_ext >&5
5547
22044edf
DL
5548 eval "$as_ac_Header=no"
5549fi
5550rm -f conftest.err conftest.$ac_ext
5551fi
5552echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5553echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5554if test `eval echo '${'$as_ac_Header'}'` = yes; then
5555 cat >>confdefs.h <<_ACEOF
5556#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5557_ACEOF
5558
5559fi
5560
5561done
5562
c0d27fcc 5563echo "$as_me:$LINENO: checking for ANSI C header files" >&5
98418dba
CW
5564echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
5565if test "${ac_cv_header_stdc+set}" = set; then
503d2be0 5566 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5567else
503d2be0 5568 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5569/* confdefs.h. */
5570_ACEOF
5571cat confdefs.h >>conftest.$ac_ext
5572cat >>conftest.$ac_ext <<_ACEOF
5573/* end confdefs.h. */
98418dba
CW
5574#include <stdlib.h>
5575#include <stdarg.h>
5576#include <string.h>
5577#include <float.h>
5578
19650fd6
AS
5579int
5580main ()
5581{
5582
5583 ;
5584 return 0;
5585}
98418dba 5586_ACEOF
19650fd6
AS
5587rm -f conftest.$ac_objext
5588if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 5589 (eval $ac_compile) 2>conftest.er1
cd958eb3 5590 ac_status=$?
35996d22
AS
5591 grep -v '^ *+' conftest.er1 >conftest.err
5592 rm -f conftest.er1
5593 cat conftest.err >&5
cd958eb3 5594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19650fd6 5595 (exit $ac_status); } &&
551ffc27
ST
5596 { ac_try='test -z "$ac_c_werror_flag"
5597 || test ! -s conftest.err'
35996d22
AS
5598 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5599 (eval $ac_try) 2>&5
5600 ac_status=$?
5601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5602 (exit $ac_status); }; } &&
5603 { ac_try='test -s conftest.$ac_objext'
19650fd6
AS
5604 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5605 (eval $ac_try) 2>&5
5606 ac_status=$?
5607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5608 (exit $ac_status); }; }; then
98418dba 5609 ac_cv_header_stdc=yes
ba4481b5 5610else
503d2be0 5611 echo "$as_me: failed program was:" >&5
19650fd6
AS
5612sed 's/^/| /' conftest.$ac_ext >&5
5613
5614ac_cv_header_stdc=no
ba4481b5 5615fi
35996d22 5616rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba
CW
5617
5618if test $ac_cv_header_stdc = yes; then
5619 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5620 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5621/* confdefs.h. */
5622_ACEOF
5623cat confdefs.h >>conftest.$ac_ext
5624cat >>conftest.$ac_ext <<_ACEOF
5625/* end confdefs.h. */
98418dba
CW
5626#include <string.h>
5627
5628_ACEOF
5629if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 5630 $EGREP "memchr" >/dev/null 2>&1; then
98418dba
CW
5631 :
5632else
5633 ac_cv_header_stdc=no
ba4481b5 5634fi
98418dba 5635rm -f conftest*
ba4481b5
DL
5636
5637fi
5638
98418dba
CW
5639if test $ac_cv_header_stdc = yes; then
5640 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5641 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5642/* confdefs.h. */
5643_ACEOF
5644cat confdefs.h >>conftest.$ac_ext
5645cat >>conftest.$ac_ext <<_ACEOF
5646/* end confdefs.h. */
98418dba
CW
5647#include <stdlib.h>
5648
5649_ACEOF
5650if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 5651 $EGREP "free" >/dev/null 2>&1; then
98418dba
CW
5652 :
5653else
5654 ac_cv_header_stdc=no
5655fi
5656rm -f conftest*
5657
5658fi
5659
5660if test $ac_cv_header_stdc = yes; then
5661 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5662 if test "$cross_compiling" = yes; then
5663 :
d42122a3 5664else
503d2be0 5665 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5666/* confdefs.h. */
5667_ACEOF
5668cat confdefs.h >>conftest.$ac_ext
5669cat >>conftest.$ac_ext <<_ACEOF
5670/* end confdefs.h. */
98418dba
CW
5671#include <ctype.h>
5672#if ((' ' & 0x0FF) == 0x020)
5673# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5674# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5675#else
19650fd6 5676# define ISLOWER(c) \
35996d22
AS
5677 (('a' <= (c) && (c) <= 'i') \
5678 || ('j' <= (c) && (c) <= 'r') \
5679 || ('s' <= (c) && (c) <= 'z'))
98418dba
CW
5680# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5681#endif
5682
5683#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
503d2be0
AS
5684int
5685main ()
5686{
98418dba
CW
5687 int i;
5688 for (i = 0; i < 256; i++)
5689 if (XOR (islower (i), ISLOWER (i))
35996d22 5690 || toupper (i) != TOUPPER (i))
98418dba
CW
5691 exit(2);
5692 exit (0);
503d2be0
AS
5693}
5694_ACEOF
98418dba 5695rm -f conftest$ac_exeext
c0d27fcc 5696if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba 5697 (eval $ac_link) 2>&5
503d2be0 5698 ac_status=$?
c0d27fcc 5699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 5700 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 5701 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5702 (eval $ac_try) 2>&5
5703 ac_status=$?
c0d27fcc 5704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5705 (exit $ac_status); }; }; then
98418dba 5706 :
d42122a3 5707else
98418dba
CW
5708 echo "$as_me: program exited with status $ac_status" >&5
5709echo "$as_me: failed program was:" >&5
19650fd6
AS
5710sed 's/^/| /' conftest.$ac_ext >&5
5711
c0d27fcc 5712( exit $ac_status )
98418dba 5713ac_cv_header_stdc=no
d42122a3 5714fi
35996d22 5715rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
d42122a3 5716fi
98418dba
CW
5717fi
5718fi
c0d27fcc 5719echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
98418dba
CW
5720echo "${ECHO_T}$ac_cv_header_stdc" >&6
5721if test $ac_cv_header_stdc = yes; then
5722
c0d27fcc 5723cat >>confdefs.h <<\_ACEOF
98418dba 5724#define STDC_HEADERS 1
c0d27fcc 5725_ACEOF
d42122a3
DL
5726
5727fi
5728
c0d27fcc 5729echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
98418dba
CW
5730echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
5731if test "${ac_cv_header_time+set}" = set; then
503d2be0 5732 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5733else
503d2be0 5734 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5735/* confdefs.h. */
5736_ACEOF
5737cat confdefs.h >>conftest.$ac_ext
5738cat >>conftest.$ac_ext <<_ACEOF
5739/* end confdefs.h. */
ba4481b5 5740#include <sys/types.h>
98418dba 5741#include <sys/time.h>
ba4481b5 5742#include <time.h>
503d2be0
AS
5743
5744int
5745main ()
5746{
98418dba
CW
5747if ((struct tm *) 0)
5748return 0;
503d2be0
AS
5749 ;
5750 return 0;
5751}
5752_ACEOF
5753rm -f conftest.$ac_objext
c0d27fcc 5754if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 5755 (eval $ac_compile) 2>conftest.er1
503d2be0 5756 ac_status=$?
35996d22
AS
5757 grep -v '^ *+' conftest.er1 >conftest.err
5758 rm -f conftest.er1
5759 cat conftest.err >&5
c0d27fcc 5760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5761 (exit $ac_status); } &&
551ffc27
ST
5762 { ac_try='test -z "$ac_c_werror_flag"
5763 || test ! -s conftest.err'
35996d22
AS
5764 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5765 (eval $ac_try) 2>&5
5766 ac_status=$?
5767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5768 (exit $ac_status); }; } &&
5769 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 5770 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5771 (eval $ac_try) 2>&5
5772 ac_status=$?
c0d27fcc 5773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5774 (exit $ac_status); }; }; then
98418dba 5775 ac_cv_header_time=yes
ba4481b5 5776else
503d2be0 5777 echo "$as_me: failed program was:" >&5
19650fd6
AS
5778sed 's/^/| /' conftest.$ac_ext >&5
5779
98418dba 5780ac_cv_header_time=no
ba4481b5 5781fi
35996d22 5782rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 5783fi
c0d27fcc 5784echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
98418dba
CW
5785echo "${ECHO_T}$ac_cv_header_time" >&6
5786if test $ac_cv_header_time = yes; then
503d2be0 5787
c0d27fcc 5788cat >>confdefs.h <<\_ACEOF
98418dba 5789#define TIME_WITH_SYS_TIME 1
c0d27fcc 5790_ACEOF
ba4481b5
DL
5791
5792fi
5793
cd958eb3
MB
5794echo "$as_me:$LINENO: checking whether sys_siglist is declared" >&5
5795echo $ECHO_N "checking whether sys_siglist is declared... $ECHO_C" >&6
5796if test "${ac_cv_have_decl_sys_siglist+set}" = set; then
503d2be0 5797 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5798else
503d2be0 5799 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5800/* confdefs.h. */
5801_ACEOF
5802cat confdefs.h >>conftest.$ac_ext
5803cat >>conftest.$ac_ext <<_ACEOF
5804/* end confdefs.h. */
cd958eb3
MB
5805$ac_includes_default
5806int
5807main ()
5808{
5809#ifndef sys_siglist
5810 char *p = (char *) sys_siglist;
98418dba 5811#endif
503d2be0 5812
cd958eb3
MB
5813 ;
5814 return 0;
5815}
5816_ACEOF
5817rm -f conftest.$ac_objext
5818if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 5819 (eval $ac_compile) 2>conftest.er1
cd958eb3 5820 ac_status=$?
35996d22
AS
5821 grep -v '^ *+' conftest.er1 >conftest.err
5822 rm -f conftest.er1
5823 cat conftest.err >&5
cd958eb3
MB
5824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5825 (exit $ac_status); } &&
551ffc27
ST
5826 { ac_try='test -z "$ac_c_werror_flag"
5827 || test ! -s conftest.err'
35996d22
AS
5828 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5829 (eval $ac_try) 2>&5
5830 ac_status=$?
5831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5832 (exit $ac_status); }; } &&
5833 { ac_try='test -s conftest.$ac_objext'
cd958eb3
MB
5834 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5835 (eval $ac_try) 2>&5
5836 ac_status=$?
5837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5838 (exit $ac_status); }; }; then
5839 ac_cv_have_decl_sys_siglist=yes
5840else
5841 echo "$as_me: failed program was:" >&5
19650fd6
AS
5842sed 's/^/| /' conftest.$ac_ext >&5
5843
cd958eb3
MB
5844ac_cv_have_decl_sys_siglist=no
5845fi
35996d22 5846rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
cd958eb3
MB
5847fi
5848echo "$as_me:$LINENO: result: $ac_cv_have_decl_sys_siglist" >&5
5849echo "${ECHO_T}$ac_cv_have_decl_sys_siglist" >&6
5850if test $ac_cv_have_decl_sys_siglist = yes; then
5851
5852cat >>confdefs.h <<_ACEOF
5853#define HAVE_DECL_SYS_SIGLIST 1
5854_ACEOF
5855
5856
5857else
5858 cat >>confdefs.h <<_ACEOF
5859#define HAVE_DECL_SYS_SIGLIST 0
5860_ACEOF
5861
5862
5863fi
5864
5865
5866if test $ac_cv_have_decl_sys_siglist != yes; then
5867 # For Tru64, at least:
5868 echo "$as_me:$LINENO: checking whether __sys_siglist is declared" >&5
5869echo $ECHO_N "checking whether __sys_siglist is declared... $ECHO_C" >&6
5870if test "${ac_cv_have_decl___sys_siglist+set}" = set; then
5871 echo $ECHO_N "(cached) $ECHO_C" >&6
5872else
5873 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5874/* confdefs.h. */
5875_ACEOF
5876cat confdefs.h >>conftest.$ac_ext
5877cat >>conftest.$ac_ext <<_ACEOF
5878/* end confdefs.h. */
cd958eb3 5879$ac_includes_default
503d2be0
AS
5880int
5881main ()
5882{
cd958eb3
MB
5883#ifndef __sys_siglist
5884 char *p = (char *) __sys_siglist;
5885#endif
5886
503d2be0
AS
5887 ;
5888 return 0;
5889}
5890_ACEOF
5891rm -f conftest.$ac_objext
c0d27fcc 5892if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 5893 (eval $ac_compile) 2>conftest.er1
503d2be0 5894 ac_status=$?
35996d22
AS
5895 grep -v '^ *+' conftest.er1 >conftest.err
5896 rm -f conftest.er1
5897 cat conftest.err >&5
c0d27fcc 5898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5899 (exit $ac_status); } &&
551ffc27
ST
5900 { ac_try='test -z "$ac_c_werror_flag"
5901 || test ! -s conftest.err'
35996d22
AS
5902 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5903 (eval $ac_try) 2>&5
5904 ac_status=$?
5905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5906 (exit $ac_status); }; } &&
5907 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 5908 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5909 (eval $ac_try) 2>&5
5910 ac_status=$?
c0d27fcc 5911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5912 (exit $ac_status); }; }; then
cd958eb3 5913 ac_cv_have_decl___sys_siglist=yes
ba4481b5 5914else
503d2be0 5915 echo "$as_me: failed program was:" >&5
19650fd6
AS
5916sed 's/^/| /' conftest.$ac_ext >&5
5917
cd958eb3 5918ac_cv_have_decl___sys_siglist=no
ba4481b5 5919fi
35996d22 5920rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 5921fi
cd958eb3
MB
5922echo "$as_me:$LINENO: result: $ac_cv_have_decl___sys_siglist" >&5
5923echo "${ECHO_T}$ac_cv_have_decl___sys_siglist" >&6
5924if test $ac_cv_have_decl___sys_siglist = yes; then
503d2be0 5925
cd958eb3
MB
5926cat >>confdefs.h <<_ACEOF
5927#define HAVE_DECL___SYS_SIGLIST 1
5928_ACEOF
5929
5930
5931else
5932 cat >>confdefs.h <<_ACEOF
5933#define HAVE_DECL___SYS_SIGLIST 0
c0d27fcc 5934_ACEOF
503d2be0 5935
cd958eb3 5936
ba4481b5
DL
5937fi
5938
cd958eb3
MB
5939
5940 if test $ac_cv_have_decl___sys_siglist = yes; then
5941
5942cat >>confdefs.h <<\_ACEOF
5943#define sys_siglist __sys_siglist
5944_ACEOF
5945
5946 fi
5947fi
c0d27fcc 5948echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
98418dba
CW
5949echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
5950if test "${ac_cv_header_sys_wait_h+set}" = set; then
503d2be0 5951 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5952else
503d2be0 5953 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5954/* confdefs.h. */
5955_ACEOF
5956cat confdefs.h >>conftest.$ac_ext
5957cat >>conftest.$ac_ext <<_ACEOF
5958/* end confdefs.h. */
98418dba
CW
5959#include <sys/types.h>
5960#include <sys/wait.h>
5961#ifndef WEXITSTATUS
5962# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
5963#endif
5964#ifndef WIFEXITED
5965# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
ba4481b5 5966#endif
503d2be0
AS
5967
5968int
5969main ()
5970{
98418dba
CW
5971 int s;
5972 wait (&s);
5973 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
503d2be0
AS
5974 ;
5975 return 0;
5976}
5977_ACEOF
98418dba 5978rm -f conftest.$ac_objext
c0d27fcc 5979if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 5980 (eval $ac_compile) 2>conftest.er1
503d2be0 5981 ac_status=$?
35996d22
AS
5982 grep -v '^ *+' conftest.er1 >conftest.err
5983 rm -f conftest.er1
5984 cat conftest.err >&5
c0d27fcc 5985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5986 (exit $ac_status); } &&
551ffc27
ST
5987 { ac_try='test -z "$ac_c_werror_flag"
5988 || test ! -s conftest.err'
35996d22
AS
5989 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5990 (eval $ac_try) 2>&5
5991 ac_status=$?
5992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5993 (exit $ac_status); }; } &&
5994 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 5995 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
5996 (eval $ac_try) 2>&5
5997 ac_status=$?
c0d27fcc 5998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 5999 (exit $ac_status); }; }; then
98418dba 6000 ac_cv_header_sys_wait_h=yes
ba4481b5 6001else
503d2be0 6002 echo "$as_me: failed program was:" >&5
19650fd6
AS
6003sed 's/^/| /' conftest.$ac_ext >&5
6004
98418dba 6005ac_cv_header_sys_wait_h=no
ba4481b5 6006fi
35996d22 6007rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 6008fi
c0d27fcc 6009echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
98418dba
CW
6010echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
6011if test $ac_cv_header_sys_wait_h = yes; then
503d2be0 6012
c0d27fcc 6013cat >>confdefs.h <<\_ACEOF
98418dba 6014#define HAVE_SYS_WAIT_H 1
c0d27fcc 6015_ACEOF
ba4481b5 6016
ba4481b5
DL
6017fi
6018
c0d27fcc
MR
6019
6020echo "$as_me:$LINENO: checking for struct utimbuf" >&5
98418dba
CW
6021echo $ECHO_N "checking for struct utimbuf... $ECHO_C" >&6
6022if test "${emacs_cv_struct_utimbuf+set}" = set; then
503d2be0 6023 echo $ECHO_N "(cached) $ECHO_C" >&6
1113b624 6024else
503d2be0 6025 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6026/* confdefs.h. */
6027_ACEOF
6028cat confdefs.h >>conftest.$ac_ext
6029cat >>conftest.$ac_ext <<_ACEOF
6030/* end confdefs.h. */
98418dba
CW
6031#ifdef TIME_WITH_SYS_TIME
6032#include <sys/time.h>
6033#include <time.h>
6034#else
6035#ifdef HAVE_SYS_TIME_H
6036#include <sys/time.h>
6037#else
1113b624 6038#include <time.h>
98418dba
CW
6039#endif
6040#endif
6041#ifdef HAVE_UTIME_H
6042#include <utime.h>
6043#endif
503d2be0
AS
6044int
6045main ()
6046{
98418dba 6047static struct utimbuf x; x.actime = x.modtime;
503d2be0
AS
6048 ;
6049 return 0;
6050}
6051_ACEOF
98418dba 6052rm -f conftest.$ac_objext
c0d27fcc 6053if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 6054 (eval $ac_compile) 2>conftest.er1
503d2be0 6055 ac_status=$?
35996d22
AS
6056 grep -v '^ *+' conftest.er1 >conftest.err
6057 rm -f conftest.er1
6058 cat conftest.err >&5
c0d27fcc 6059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6060 (exit $ac_status); } &&
551ffc27
ST
6061 { ac_try='test -z "$ac_c_werror_flag"
6062 || test ! -s conftest.err'
35996d22
AS
6063 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6064 (eval $ac_try) 2>&5
6065 ac_status=$?
6066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6067 (exit $ac_status); }; } &&
6068 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6069 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
6070 (eval $ac_try) 2>&5
6071 ac_status=$?
c0d27fcc 6072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6073 (exit $ac_status); }; }; then
98418dba 6074 emacs_cv_struct_utimbuf=yes
1113b624 6075else
503d2be0 6076 echo "$as_me: failed program was:" >&5
19650fd6
AS
6077sed 's/^/| /' conftest.$ac_ext >&5
6078
98418dba 6079emacs_cv_struct_utimbuf=no
1113b624 6080fi
35996d22 6081rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
1113b624 6082fi
c0d27fcc 6083echo "$as_me:$LINENO: result: $emacs_cv_struct_utimbuf" >&5
98418dba
CW
6084echo "${ECHO_T}$emacs_cv_struct_utimbuf" >&6
6085if test $emacs_cv_struct_utimbuf = yes; then
b936fae4 6086
c0d27fcc 6087cat >>confdefs.h <<\_ACEOF
98418dba 6088#define HAVE_STRUCT_UTIMBUF 1
c0d27fcc 6089_ACEOF
1113b624
PE
6090
6091fi
ba4481b5 6092
c0d27fcc 6093echo "$as_me:$LINENO: checking return type of signal handlers" >&5
98418dba
CW
6094echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
6095if test "${ac_cv_type_signal+set}" = set; then
503d2be0 6096 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 6097else
98418dba 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. */
7397acc4 6104#include <sys/types.h>
98418dba
CW
6105#include <signal.h>
6106#ifdef signal
6107# undef signal
6108#endif
6109#ifdef __cplusplus
6110extern "C" void (*signal (int, void (*)(int)))(int);
6111#else
6112void (*signal ()) ();
6113#endif
6114
503d2be0
AS
6115int
6116main ()
6117{
98418dba 6118int i;
503d2be0
AS
6119 ;
6120 return 0;
6121}
6122_ACEOF
98418dba 6123rm -f conftest.$ac_objext
c0d27fcc 6124if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 6125 (eval $ac_compile) 2>conftest.er1
503d2be0 6126 ac_status=$?
35996d22
AS
6127 grep -v '^ *+' conftest.er1 >conftest.err
6128 rm -f conftest.er1
6129 cat conftest.err >&5
c0d27fcc 6130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6131 (exit $ac_status); } &&
551ffc27
ST
6132 { ac_try='test -z "$ac_c_werror_flag"
6133 || test ! -s conftest.err'
35996d22
AS
6134 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6135 (eval $ac_try) 2>&5
6136 ac_status=$?
6137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6138 (exit $ac_status); }; } &&
6139 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6140 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
6141 (eval $ac_try) 2>&5
6142 ac_status=$?
c0d27fcc 6143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6144 (exit $ac_status); }; }; then
98418dba 6145 ac_cv_type_signal=void
503d2be0
AS
6146else
6147 echo "$as_me: failed program was:" >&5
19650fd6
AS
6148sed 's/^/| /' conftest.$ac_ext >&5
6149
98418dba 6150ac_cv_type_signal=int
503d2be0 6151fi
35996d22 6152rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 6153fi
c0d27fcc 6154echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
98418dba 6155echo "${ECHO_T}$ac_cv_type_signal" >&6
7397acc4 6156
c0d27fcc 6157cat >>confdefs.h <<_ACEOF
98418dba 6158#define RETSIGTYPE $ac_cv_type_signal
c0d27fcc
MR
6159_ACEOF
6160
503d2be0 6161
c0d27fcc
MR
6162
6163echo "$as_me:$LINENO: checking for speed_t" >&5
98418dba
CW
6164echo $ECHO_N "checking for speed_t... $ECHO_C" >&6
6165if test "${emacs_cv_speed_t+set}" = set; then
6166 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 6167else
98418dba 6168 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6169/* confdefs.h. */
6170_ACEOF
6171cat confdefs.h >>conftest.$ac_ext
6172cat >>conftest.$ac_ext <<_ACEOF
6173/* end confdefs.h. */
98418dba 6174#include <termios.h>
98418dba
CW
6175int
6176main ()
6177{
6178speed_t x = 1;
6179 ;
6180 return 0;
6181}
6182_ACEOF
6183rm -f conftest.$ac_objext
c0d27fcc 6184if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 6185 (eval $ac_compile) 2>conftest.er1
98418dba 6186 ac_status=$?
35996d22
AS
6187 grep -v '^ *+' conftest.er1 >conftest.err
6188 rm -f conftest.er1
6189 cat conftest.err >&5
c0d27fcc 6190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 6191 (exit $ac_status); } &&
551ffc27
ST
6192 { ac_try='test -z "$ac_c_werror_flag"
6193 || test ! -s conftest.err'
35996d22
AS
6194 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6195 (eval $ac_try) 2>&5
6196 ac_status=$?
6197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6198 (exit $ac_status); }; } &&
6199 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6200 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
6201 (eval $ac_try) 2>&5
6202 ac_status=$?
c0d27fcc 6203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
6204 (exit $ac_status); }; }; then
6205 emacs_cv_speed_t=yes
6206else
6207 echo "$as_me: failed program was:" >&5
19650fd6
AS
6208sed 's/^/| /' conftest.$ac_ext >&5
6209
98418dba
CW
6210emacs_cv_speed_t=no
6211fi
35996d22 6212rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 6213fi
c0d27fcc 6214echo "$as_me:$LINENO: result: $emacs_cv_speed_t" >&5
98418dba
CW
6215echo "${ECHO_T}$emacs_cv_speed_t" >&6
6216if test $emacs_cv_speed_t = yes; then
b936fae4 6217
c0d27fcc 6218cat >>confdefs.h <<\_ACEOF
98418dba 6219#define HAVE_SPEED_T 1
c0d27fcc 6220_ACEOF
98418dba 6221
7397acc4
DL
6222fi
6223
c0d27fcc 6224echo "$as_me:$LINENO: checking for struct timeval" >&5
98418dba
CW
6225echo $ECHO_N "checking for struct timeval... $ECHO_C" >&6
6226if test "${emacs_cv_struct_timeval+set}" = set; then
503d2be0 6227 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 6228else
503d2be0 6229 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6230/* confdefs.h. */
6231_ACEOF
6232cat confdefs.h >>conftest.$ac_ext
6233cat >>conftest.$ac_ext <<_ACEOF
6234/* end confdefs.h. */
98418dba
CW
6235#ifdef TIME_WITH_SYS_TIME
6236#include <sys/time.h>
6237#include <time.h>
6238#else
6239#ifdef HAVE_SYS_TIME_H
6240#include <sys/time.h>
6241#else
6242#include <time.h>
6243#endif
6244#endif
503d2be0
AS
6245int
6246main ()
6247{
98418dba 6248static struct timeval x; x.tv_sec = x.tv_usec;
503d2be0
AS
6249 ;
6250 return 0;
6251}
6252_ACEOF
6253rm -f conftest.$ac_objext
c0d27fcc 6254if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 6255 (eval $ac_compile) 2>conftest.er1
503d2be0 6256 ac_status=$?
35996d22
AS
6257 grep -v '^ *+' conftest.er1 >conftest.err
6258 rm -f conftest.er1
6259 cat conftest.err >&5
c0d27fcc 6260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6261 (exit $ac_status); } &&
551ffc27
ST
6262 { ac_try='test -z "$ac_c_werror_flag"
6263 || test ! -s conftest.err'
35996d22
AS
6264 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6265 (eval $ac_try) 2>&5
6266 ac_status=$?
6267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6268 (exit $ac_status); }; } &&
6269 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6270 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
6271 (eval $ac_try) 2>&5
6272 ac_status=$?
c0d27fcc 6273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6274 (exit $ac_status); }; }; then
98418dba 6275 emacs_cv_struct_timeval=yes
7397acc4 6276else
503d2be0 6277 echo "$as_me: failed program was:" >&5
19650fd6
AS
6278sed 's/^/| /' conftest.$ac_ext >&5
6279
98418dba 6280emacs_cv_struct_timeval=no
7397acc4 6281fi
35996d22 6282rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 6283fi
c0d27fcc 6284echo "$as_me:$LINENO: result: $emacs_cv_struct_timeval" >&5
98418dba
CW
6285echo "${ECHO_T}$emacs_cv_struct_timeval" >&6
6286HAVE_TIMEVAL=$emacs_cv_struct_timeval
6287if test $emacs_cv_struct_timeval = yes; then
b936fae4 6288
c0d27fcc 6289cat >>confdefs.h <<\_ACEOF
98418dba 6290#define HAVE_TIMEVAL 1
c0d27fcc 6291_ACEOF
7397acc4
DL
6292
6293fi
6294
c0d27fcc 6295echo "$as_me:$LINENO: checking for struct exception" >&5
98418dba
CW
6296echo $ECHO_N "checking for struct exception... $ECHO_C" >&6
6297if test "${emacs_cv_struct_exception+set}" = set; then
503d2be0 6298 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6299else
503d2be0 6300 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6301/* confdefs.h. */
6302_ACEOF
6303cat confdefs.h >>conftest.$ac_ext
6304cat >>conftest.$ac_ext <<_ACEOF
6305/* end confdefs.h. */
98418dba 6306#include <math.h>
503d2be0
AS
6307int
6308main ()
6309{
98418dba 6310static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1;
503d2be0
AS
6311 ;
6312 return 0;
ba4481b5 6313}
503d2be0
AS
6314_ACEOF
6315rm -f conftest.$ac_objext
c0d27fcc 6316if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 6317 (eval $ac_compile) 2>conftest.er1
503d2be0 6318 ac_status=$?
35996d22
AS
6319 grep -v '^ *+' conftest.er1 >conftest.err
6320 rm -f conftest.er1
6321 cat conftest.err >&5
c0d27fcc 6322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6323 (exit $ac_status); } &&
551ffc27
ST
6324 { ac_try='test -z "$ac_c_werror_flag"
6325 || test ! -s conftest.err'
35996d22
AS
6326 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6327 (eval $ac_try) 2>&5
6328 ac_status=$?
6329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6330 (exit $ac_status); }; } &&
6331 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6332 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
6333 (eval $ac_try) 2>&5
6334 ac_status=$?
c0d27fcc 6335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6336 (exit $ac_status); }; }; then
98418dba 6337 emacs_cv_struct_exception=yes
ba4481b5 6338else
503d2be0 6339 echo "$as_me: failed program was:" >&5
19650fd6
AS
6340sed 's/^/| /' conftest.$ac_ext >&5
6341
98418dba 6342emacs_cv_struct_exception=no
ba4481b5 6343fi
35996d22 6344rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 6345fi
c0d27fcc 6346echo "$as_me:$LINENO: result: $emacs_cv_struct_exception" >&5
98418dba
CW
6347echo "${ECHO_T}$emacs_cv_struct_exception" >&6
6348HAVE_EXCEPTION=$emacs_cv_struct_exception
6349if test $emacs_cv_struct_exception != yes; then
b936fae4 6350
c0d27fcc 6351cat >>confdefs.h <<\_ACEOF
98418dba 6352#define NO_MATHERR 1
c0d27fcc 6353_ACEOF
ba4481b5
DL
6354
6355fi
6356
7862d3a8
AS
6357
6358for ac_header in sys/socket.h
6359do
6360as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6361if eval "test \"\${$as_ac_Header+set}\" = set"; then
6362 echo "$as_me:$LINENO: checking for $ac_header" >&5
6363echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6364if eval "test \"\${$as_ac_Header+set}\" = set"; then
6365 echo $ECHO_N "(cached) $ECHO_C" >&6
6366fi
6367echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6368echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6369else
6370 # Is the header compilable?
6371echo "$as_me:$LINENO: checking $ac_header usability" >&5
6372echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
6373cat >conftest.$ac_ext <<_ACEOF
6374/* confdefs.h. */
6375_ACEOF
6376cat confdefs.h >>conftest.$ac_ext
6377cat >>conftest.$ac_ext <<_ACEOF
6378/* end confdefs.h. */
6379$ac_includes_default
6380#include <$ac_header>
6381_ACEOF
6382rm -f conftest.$ac_objext
6383if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6384 (eval $ac_compile) 2>conftest.er1
6385 ac_status=$?
6386 grep -v '^ *+' conftest.er1 >conftest.err
6387 rm -f conftest.er1
6388 cat conftest.err >&5
6389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6390 (exit $ac_status); } &&
551ffc27
ST
6391 { ac_try='test -z "$ac_c_werror_flag"
6392 || test ! -s conftest.err'
7862d3a8
AS
6393 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6394 (eval $ac_try) 2>&5
6395 ac_status=$?
6396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6397 (exit $ac_status); }; } &&
6398 { ac_try='test -s conftest.$ac_objext'
6399 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6400 (eval $ac_try) 2>&5
6401 ac_status=$?
6402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6403 (exit $ac_status); }; }; then
6404 ac_header_compiler=yes
6405else
6406 echo "$as_me: failed program was:" >&5
6407sed 's/^/| /' conftest.$ac_ext >&5
6408
6409ac_header_compiler=no
6410fi
6411rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6412echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6413echo "${ECHO_T}$ac_header_compiler" >&6
6414
6415# Is the header present?
6416echo "$as_me:$LINENO: checking $ac_header presence" >&5
6417echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
6418cat >conftest.$ac_ext <<_ACEOF
6419/* confdefs.h. */
6420_ACEOF
6421cat confdefs.h >>conftest.$ac_ext
6422cat >>conftest.$ac_ext <<_ACEOF
6423/* end confdefs.h. */
6424#include <$ac_header>
6425_ACEOF
6426if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6427 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6428 ac_status=$?
6429 grep -v '^ *+' conftest.er1 >conftest.err
6430 rm -f conftest.er1
6431 cat conftest.err >&5
6432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6433 (exit $ac_status); } >/dev/null; then
6434 if test -s conftest.err; then
6435 ac_cpp_err=$ac_c_preproc_warn_flag
6436 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6437 else
6438 ac_cpp_err=
6439 fi
6440else
6441 ac_cpp_err=yes
6442fi
6443if test -z "$ac_cpp_err"; then
6444 ac_header_preproc=yes
6445else
6446 echo "$as_me: failed program was:" >&5
6447sed 's/^/| /' conftest.$ac_ext >&5
6448
6449 ac_header_preproc=no
6450fi
6451rm -f conftest.err conftest.$ac_ext
6452echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6453echo "${ECHO_T}$ac_header_preproc" >&6
6454
6455# So? What about this header?
6456case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6457 yes:no: )
6458 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6459echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
6460 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6461echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6462 ac_header_preproc=yes
6463 ;;
6464 no:yes:* )
6465 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6466echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
6467 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
6468echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
6469 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6470echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6471 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
6472echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
6473 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6474echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
6475 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6476echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
6477 (
6478 cat <<\_ASBOX
6479## ------------------------------------------ ##
6480## Report this to the AC_PACKAGE_NAME lists. ##
6481## ------------------------------------------ ##
6482_ASBOX
6483 ) |
6484 sed "s/^/$as_me: WARNING: /" >&2
6485 ;;
6486esac
6487echo "$as_me:$LINENO: checking for $ac_header" >&5
6488echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6489if eval "test \"\${$as_ac_Header+set}\" = set"; then
6490 echo $ECHO_N "(cached) $ECHO_C" >&6
6491else
6492 eval "$as_ac_Header=\$ac_header_preproc"
6493fi
6494echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6495echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6496
6497fi
6498if test `eval echo '${'$as_ac_Header'}'` = yes; then
6499 cat >>confdefs.h <<_ACEOF
6500#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6501_ACEOF
6502
6503fi
6504
6505done
6506
6507
6508for ac_header in net/if.h
6509do
6510as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6511echo "$as_me:$LINENO: checking for $ac_header" >&5
6512echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6513if eval "test \"\${$as_ac_Header+set}\" = set"; then
6514 echo $ECHO_N "(cached) $ECHO_C" >&6
6515else
6516 cat >conftest.$ac_ext <<_ACEOF
6517/* confdefs.h. */
6518_ACEOF
6519cat confdefs.h >>conftest.$ac_ext
6520cat >>conftest.$ac_ext <<_ACEOF
6521/* end confdefs.h. */
6522$ac_includes_default
6523#if HAVE_SYS_SOCKET_H
6524#include <sys/socket.h>
6525#endif
6526
6527#include <$ac_header>
6528_ACEOF
6529rm -f conftest.$ac_objext
6530if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6531 (eval $ac_compile) 2>conftest.er1
6532 ac_status=$?
6533 grep -v '^ *+' conftest.er1 >conftest.err
6534 rm -f conftest.er1
6535 cat conftest.err >&5
6536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6537 (exit $ac_status); } &&
551ffc27
ST
6538 { ac_try='test -z "$ac_c_werror_flag"
6539 || test ! -s conftest.err'
7862d3a8
AS
6540 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6541 (eval $ac_try) 2>&5
6542 ac_status=$?
6543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6544 (exit $ac_status); }; } &&
6545 { ac_try='test -s conftest.$ac_objext'
6546 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6547 (eval $ac_try) 2>&5
6548 ac_status=$?
6549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6550 (exit $ac_status); }; }; then
6551 eval "$as_ac_Header=yes"
6552else
6553 echo "$as_me: failed program was:" >&5
6554sed 's/^/| /' conftest.$ac_ext >&5
6555
6556eval "$as_ac_Header=no"
6557fi
6558rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6559fi
6560echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6561echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6562if test `eval echo '${'$as_ac_Header'}'` = yes; then
6563 cat >>confdefs.h <<_ACEOF
6564#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6565_ACEOF
6566
6567fi
6568
6569done
6570
6571
c0d27fcc 6572echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
98418dba
CW
6573echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
6574if test "${ac_cv_struct_tm+set}" = set; then
503d2be0 6575 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 6576else
503d2be0 6577 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6578/* confdefs.h. */
6579_ACEOF
6580cat confdefs.h >>conftest.$ac_ext
6581cat >>conftest.$ac_ext <<_ACEOF
6582/* end confdefs.h. */
98418dba
CW
6583#include <sys/types.h>
6584#include <time.h>
7397acc4 6585
503d2be0
AS
6586int
6587main ()
6588{
98418dba 6589struct tm *tp; tp->tm_sec;
503d2be0
AS
6590 ;
6591 return 0;
6592}
6593_ACEOF
6594rm -f conftest.$ac_objext
c0d27fcc 6595if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 6596 (eval $ac_compile) 2>conftest.er1
503d2be0 6597 ac_status=$?
35996d22
AS
6598 grep -v '^ *+' conftest.er1 >conftest.err
6599 rm -f conftest.er1
6600 cat conftest.err >&5
c0d27fcc 6601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6602 (exit $ac_status); } &&
551ffc27
ST
6603 { ac_try='test -z "$ac_c_werror_flag"
6604 || test ! -s conftest.err'
c0d27fcc 6605 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
6606 (eval $ac_try) 2>&5
6607 ac_status=$?
c0d27fcc 6608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
35996d22
AS
6609 (exit $ac_status); }; } &&
6610 { ac_try='test -s conftest.$ac_objext'
6611 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6612 (eval $ac_try) 2>&5
6613 ac_status=$?
6614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6615 (exit $ac_status); }; }; then
6616 ac_cv_struct_tm=time.h
6617else
503d2be0 6618 echo "$as_me: failed program was:" >&5
19650fd6
AS
6619sed 's/^/| /' conftest.$ac_ext >&5
6620
98418dba 6621ac_cv_struct_tm=sys/time.h
7397acc4 6622fi
35996d22 6623rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 6624fi
c0d27fcc 6625echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
98418dba
CW
6626echo "${ECHO_T}$ac_cv_struct_tm" >&6
6627if test $ac_cv_struct_tm = sys/time.h; then
7397acc4 6628
c0d27fcc 6629cat >>confdefs.h <<\_ACEOF
98418dba 6630#define TM_IN_SYS_TIME 1
c0d27fcc 6631_ACEOF
7397acc4
DL
6632
6633fi
ba4481b5 6634
c0d27fcc 6635echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
98418dba
CW
6636echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
6637if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
503d2be0 6638 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6639else
98418dba 6640 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6641/* confdefs.h. */
6642_ACEOF
6643cat confdefs.h >>conftest.$ac_ext
6644cat >>conftest.$ac_ext <<_ACEOF
6645/* end confdefs.h. */
98418dba
CW
6646#include <sys/types.h>
6647#include <$ac_cv_struct_tm>
ba4481b5 6648
c0d27fcc 6649
98418dba
CW
6650int
6651main ()
6652{
6653static struct tm ac_aggr;
6654if (ac_aggr.tm_zone)
6655return 0;
6656 ;
6657 return 0;
6658}
6659_ACEOF
6660rm -f conftest.$ac_objext
c0d27fcc 6661if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 6662 (eval $ac_compile) 2>conftest.er1
98418dba 6663 ac_status=$?
35996d22
AS
6664 grep -v '^ *+' conftest.er1 >conftest.err
6665 rm -f conftest.er1
6666 cat conftest.err >&5
c0d27fcc 6667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 6668 (exit $ac_status); } &&
551ffc27
ST
6669 { ac_try='test -z "$ac_c_werror_flag"
6670 || test ! -s conftest.err'
35996d22
AS
6671 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6672 (eval $ac_try) 2>&5
6673 ac_status=$?
6674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6675 (exit $ac_status); }; } &&
6676 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6677 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
6678 (eval $ac_try) 2>&5
6679 ac_status=$?
c0d27fcc 6680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
6681 (exit $ac_status); }; }; then
6682 ac_cv_member_struct_tm_tm_zone=yes
ba4481b5 6683else
98418dba 6684 echo "$as_me: failed program was:" >&5
19650fd6
AS
6685sed 's/^/| /' conftest.$ac_ext >&5
6686
6bae0ccf 6687cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6688/* confdefs.h. */
6689_ACEOF
6690cat confdefs.h >>conftest.$ac_ext
6691cat >>conftest.$ac_ext <<_ACEOF
6692/* end confdefs.h. */
6bae0ccf
DL
6693#include <sys/types.h>
6694#include <$ac_cv_struct_tm>
6695
6696
6697int
6698main ()
6699{
6700static struct tm ac_aggr;
6701if (sizeof ac_aggr.tm_zone)
6702return 0;
6703 ;
6704 return 0;
6705}
6706_ACEOF
6707rm -f conftest.$ac_objext
6708if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 6709 (eval $ac_compile) 2>conftest.er1
6bae0ccf 6710 ac_status=$?
35996d22
AS
6711 grep -v '^ *+' conftest.er1 >conftest.err
6712 rm -f conftest.er1
6713 cat conftest.err >&5
6bae0ccf
DL
6714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6715 (exit $ac_status); } &&
551ffc27
ST
6716 { ac_try='test -z "$ac_c_werror_flag"
6717 || test ! -s conftest.err'
35996d22
AS
6718 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6719 (eval $ac_try) 2>&5
6720 ac_status=$?
6721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6722 (exit $ac_status); }; } &&
6723 { ac_try='test -s conftest.$ac_objext'
6bae0ccf
DL
6724 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6725 (eval $ac_try) 2>&5
6726 ac_status=$?
6727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6728 (exit $ac_status); }; }; then
6729 ac_cv_member_struct_tm_tm_zone=yes
6730else
6731 echo "$as_me: failed program was:" >&5
19650fd6
AS
6732sed 's/^/| /' conftest.$ac_ext >&5
6733
98418dba 6734ac_cv_member_struct_tm_tm_zone=no
ba4481b5 6735fi
35996d22 6736rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 6737fi
35996d22 6738rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 6739fi
c0d27fcc 6740echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
98418dba
CW
6741echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
6742if test $ac_cv_member_struct_tm_tm_zone = yes; then
503d2be0 6743
c0d27fcc 6744cat >>confdefs.h <<_ACEOF
98418dba 6745#define HAVE_STRUCT_TM_TM_ZONE 1
c0d27fcc
MR
6746_ACEOF
6747
ba4481b5 6748
98418dba 6749fi
ba4481b5 6750
98418dba 6751if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
ba4481b5 6752
c0d27fcc 6753cat >>confdefs.h <<\_ACEOF
98418dba 6754#define HAVE_TM_ZONE 1
c0d27fcc 6755_ACEOF
ba4481b5 6756
ba4481b5 6757else
c0d27fcc 6758 echo "$as_me:$LINENO: checking for tzname" >&5
98418dba
CW
6759echo $ECHO_N "checking for tzname... $ECHO_C" >&6
6760if test "${ac_cv_var_tzname+set}" = set; then
503d2be0 6761 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6762else
98418dba 6763 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6764/* confdefs.h. */
6765_ACEOF
6766cat confdefs.h >>conftest.$ac_ext
6767cat >>conftest.$ac_ext <<_ACEOF
6768/* end confdefs.h. */
98418dba
CW
6769#include <time.h>
6770#ifndef tzname /* For SGI. */
6771extern char *tzname[]; /* RS6000 and others reject char **tzname. */
6772#endif
6773
98418dba
CW
6774int
6775main ()
6776{
6777atoi(*tzname);
6778 ;
6779 return 0;
6780}
6781_ACEOF
6782rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 6783if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 6784 (eval $ac_link) 2>conftest.er1
98418dba 6785 ac_status=$?
35996d22
AS
6786 grep -v '^ *+' conftest.er1 >conftest.err
6787 rm -f conftest.er1
6788 cat conftest.err >&5
c0d27fcc 6789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 6790 (exit $ac_status); } &&
551ffc27
ST
6791 { ac_try='test -z "$ac_c_werror_flag"
6792 || test ! -s conftest.err'
35996d22
AS
6793 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6794 (eval $ac_try) 2>&5
6795 ac_status=$?
6796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6797 (exit $ac_status); }; } &&
6798 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 6799 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
6800 (eval $ac_try) 2>&5
6801 ac_status=$?
c0d27fcc 6802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
6803 (exit $ac_status); }; }; then
6804 ac_cv_var_tzname=yes
6805else
6806 echo "$as_me: failed program was:" >&5
19650fd6
AS
6807sed 's/^/| /' conftest.$ac_ext >&5
6808
98418dba 6809ac_cv_var_tzname=no
ba4481b5 6810fi
35996d22
AS
6811rm -f conftest.err conftest.$ac_objext \
6812 conftest$ac_exeext conftest.$ac_ext
98418dba 6813fi
c0d27fcc 6814echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
98418dba
CW
6815echo "${ECHO_T}$ac_cv_var_tzname" >&6
6816 if test $ac_cv_var_tzname = yes; then
ba4481b5 6817
c0d27fcc 6818cat >>confdefs.h <<\_ACEOF
98418dba 6819#define HAVE_TZNAME 1
c0d27fcc 6820_ACEOF
503d2be0 6821
98418dba
CW
6822 fi
6823fi
503d2be0 6824
c0d27fcc 6825echo "$as_me:$LINENO: checking for struct tm.tm_gmtoff" >&5
b936fae4
AS
6826echo $ECHO_N "checking for struct tm.tm_gmtoff... $ECHO_C" >&6
6827if test "${ac_cv_member_struct_tm_tm_gmtoff+set}" = set; then
98418dba
CW
6828 echo $ECHO_N "(cached) $ECHO_C" >&6
6829else
6830 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6831/* confdefs.h. */
6832_ACEOF
6833cat confdefs.h >>conftest.$ac_ext
6834cat >>conftest.$ac_ext <<_ACEOF
6835/* end confdefs.h. */
98418dba 6836#include <time.h>
b936fae4 6837
98418dba
CW
6838int
6839main ()
6840{
b936fae4
AS
6841static struct tm ac_aggr;
6842if (ac_aggr.tm_gmtoff)
6843return 0;
98418dba
CW
6844 ;
6845 return 0;
6846}
6847_ACEOF
b936fae4 6848rm -f conftest.$ac_objext
c0d27fcc 6849if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 6850 (eval $ac_compile) 2>conftest.er1
98418dba 6851 ac_status=$?
35996d22
AS
6852 grep -v '^ *+' conftest.er1 >conftest.err
6853 rm -f conftest.er1
6854 cat conftest.err >&5
c0d27fcc 6855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 6856 (exit $ac_status); } &&
551ffc27
ST
6857 { ac_try='test -z "$ac_c_werror_flag"
6858 || test ! -s conftest.err'
35996d22
AS
6859 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6860 (eval $ac_try) 2>&5
6861 ac_status=$?
6862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6863 (exit $ac_status); }; } &&
6864 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6865 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
6866 (eval $ac_try) 2>&5
6867 ac_status=$?
c0d27fcc 6868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 6869 (exit $ac_status); }; }; then
b936fae4 6870 ac_cv_member_struct_tm_tm_gmtoff=yes
98418dba
CW
6871else
6872 echo "$as_me: failed program was:" >&5
19650fd6
AS
6873sed 's/^/| /' conftest.$ac_ext >&5
6874
8799b3e4 6875cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6876/* confdefs.h. */
6877_ACEOF
6878cat confdefs.h >>conftest.$ac_ext
6879cat >>conftest.$ac_ext <<_ACEOF
6880/* end confdefs.h. */
6bae0ccf
DL
6881#include <time.h>
6882
8799b3e4
CW
6883int
6884main ()
6885{
6bae0ccf
DL
6886static struct tm ac_aggr;
6887if (sizeof ac_aggr.tm_gmtoff)
6888return 0;
8799b3e4
CW
6889 ;
6890 return 0;
6891}
6892_ACEOF
6bae0ccf 6893rm -f conftest.$ac_objext
c0d27fcc 6894if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 6895 (eval $ac_compile) 2>conftest.er1
8799b3e4 6896 ac_status=$?
35996d22
AS
6897 grep -v '^ *+' conftest.er1 >conftest.err
6898 rm -f conftest.er1
6899 cat conftest.err >&5
c0d27fcc 6900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8799b3e4 6901 (exit $ac_status); } &&
551ffc27
ST
6902 { ac_try='test -z "$ac_c_werror_flag"
6903 || test ! -s conftest.err'
35996d22
AS
6904 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6905 (eval $ac_try) 2>&5
6906 ac_status=$?
6907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6908 (exit $ac_status); }; } &&
6909 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 6910 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8799b3e4
CW
6911 (eval $ac_try) 2>&5
6912 ac_status=$?
c0d27fcc 6913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8799b3e4 6914 (exit $ac_status); }; }; then
6bae0ccf 6915 ac_cv_member_struct_tm_tm_gmtoff=yes
8799b3e4
CW
6916else
6917 echo "$as_me: failed program was:" >&5
19650fd6
AS
6918sed 's/^/| /' conftest.$ac_ext >&5
6919
6bae0ccf 6920ac_cv_member_struct_tm_tm_gmtoff=no
8799b3e4 6921fi
35996d22 6922rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 6923fi
35996d22 6924rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8799b3e4 6925fi
6bae0ccf
DL
6926echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_gmtoff" >&5
6927echo "${ECHO_T}$ac_cv_member_struct_tm_tm_gmtoff" >&6
6928if test $ac_cv_member_struct_tm_tm_gmtoff = yes; then
6929
6930cat >>confdefs.h <<\_ACEOF
6931#define HAVE_TM_GMTOFF 1
6932_ACEOF
6933
6934fi
6935
96f3a036
DL
6936echo "$as_me:$LINENO: checking for struct ifreq.ifr_flags" >&5
6937echo $ECHO_N "checking for struct ifreq.ifr_flags... $ECHO_C" >&6
6938if test "${ac_cv_member_struct_ifreq_ifr_flags+set}" = set; then
6939 echo $ECHO_N "(cached) $ECHO_C" >&6
6940else
6941 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
6942/* confdefs.h. */
6943_ACEOF
6944cat confdefs.h >>conftest.$ac_ext
6945cat >>conftest.$ac_ext <<_ACEOF
6946/* end confdefs.h. */
7862d3a8
AS
6947$ac_includes_default
6948#if HAVE_SYS_SOCKET_H
6949#include <sys/socket.h>
6950#endif
6951#if HAVE_NET_IF_H
96f3a036 6952#include <net/if.h>
7862d3a8 6953#endif
96f3a036
DL
6954
6955int
6956main ()
6957{
6958static struct ifreq ac_aggr;
6959if (ac_aggr.ifr_flags)
6960return 0;
6961 ;
6962 return 0;
6963}
6964_ACEOF
6965rm -f conftest.$ac_objext
6966if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 6967 (eval $ac_compile) 2>conftest.er1
96f3a036 6968 ac_status=$?
35996d22
AS
6969 grep -v '^ *+' conftest.er1 >conftest.err
6970 rm -f conftest.er1
6971 cat conftest.err >&5
96f3a036
DL
6972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6973 (exit $ac_status); } &&
551ffc27
ST
6974 { ac_try='test -z "$ac_c_werror_flag"
6975 || test ! -s conftest.err'
35996d22
AS
6976 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6977 (eval $ac_try) 2>&5
6978 ac_status=$?
6979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6980 (exit $ac_status); }; } &&
6981 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
6982 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6983 (eval $ac_try) 2>&5
6984 ac_status=$?
6985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6986 (exit $ac_status); }; }; then
6987 ac_cv_member_struct_ifreq_ifr_flags=yes
6988else
6989 echo "$as_me: failed program was:" >&5
6990sed 's/^/| /' conftest.$ac_ext >&5
6991
6992cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
6993/* confdefs.h. */
6994_ACEOF
6995cat confdefs.h >>conftest.$ac_ext
6996cat >>conftest.$ac_ext <<_ACEOF
6997/* end confdefs.h. */
7862d3a8
AS
6998$ac_includes_default
6999#if HAVE_SYS_SOCKET_H
7000#include <sys/socket.h>
7001#endif
7002#if HAVE_NET_IF_H
96f3a036 7003#include <net/if.h>
7862d3a8 7004#endif
96f3a036
DL
7005
7006int
7007main ()
7008{
7009static struct ifreq ac_aggr;
7010if (sizeof ac_aggr.ifr_flags)
7011return 0;
7012 ;
7013 return 0;
7014}
7015_ACEOF
7016rm -f conftest.$ac_objext
7017if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 7018 (eval $ac_compile) 2>conftest.er1
96f3a036 7019 ac_status=$?
35996d22
AS
7020 grep -v '^ *+' conftest.er1 >conftest.err
7021 rm -f conftest.er1
7022 cat conftest.err >&5
96f3a036
DL
7023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7024 (exit $ac_status); } &&
551ffc27
ST
7025 { ac_try='test -z "$ac_c_werror_flag"
7026 || test ! -s conftest.err'
35996d22
AS
7027 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7028 (eval $ac_try) 2>&5
7029 ac_status=$?
7030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7031 (exit $ac_status); }; } &&
7032 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7033 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7034 (eval $ac_try) 2>&5
7035 ac_status=$?
7036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7037 (exit $ac_status); }; }; then
7038 ac_cv_member_struct_ifreq_ifr_flags=yes
7039else
7040 echo "$as_me: failed program was:" >&5
7041sed 's/^/| /' conftest.$ac_ext >&5
7042
7043ac_cv_member_struct_ifreq_ifr_flags=no
7044fi
35996d22 7045rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 7046fi
35996d22 7047rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036
DL
7048fi
7049echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_flags" >&5
7050echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_flags" >&6
7051if test $ac_cv_member_struct_ifreq_ifr_flags = yes; then
7052
7053cat >>confdefs.h <<_ACEOF
7054#define HAVE_STRUCT_IFREQ_IFR_FLAGS 1
7055_ACEOF
7056
7057
7058fi
7059echo "$as_me:$LINENO: checking for struct ifreq.ifr_hwaddr" >&5
7060echo $ECHO_N "checking for struct ifreq.ifr_hwaddr... $ECHO_C" >&6
7061if test "${ac_cv_member_struct_ifreq_ifr_hwaddr+set}" = set; then
7062 echo $ECHO_N "(cached) $ECHO_C" >&6
7063else
7064 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7065/* confdefs.h. */
7066_ACEOF
7067cat confdefs.h >>conftest.$ac_ext
7068cat >>conftest.$ac_ext <<_ACEOF
7069/* end confdefs.h. */
7862d3a8
AS
7070$ac_includes_default
7071#if HAVE_SYS_SOCKET_H
7072#include <sys/socket.h>
7073#endif
7074#if HAVE_NET_IF_H
96f3a036 7075#include <net/if.h>
7862d3a8 7076#endif
96f3a036
DL
7077
7078int
7079main ()
7080{
7081static struct ifreq ac_aggr;
7082if (ac_aggr.ifr_hwaddr)
7083return 0;
7084 ;
7085 return 0;
7086}
7087_ACEOF
7088rm -f conftest.$ac_objext
7089if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 7090 (eval $ac_compile) 2>conftest.er1
96f3a036 7091 ac_status=$?
35996d22
AS
7092 grep -v '^ *+' conftest.er1 >conftest.err
7093 rm -f conftest.er1
7094 cat conftest.err >&5
96f3a036
DL
7095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7096 (exit $ac_status); } &&
551ffc27
ST
7097 { ac_try='test -z "$ac_c_werror_flag"
7098 || test ! -s conftest.err'
35996d22
AS
7099 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7100 (eval $ac_try) 2>&5
7101 ac_status=$?
7102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7103 (exit $ac_status); }; } &&
7104 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7105 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7106 (eval $ac_try) 2>&5
7107 ac_status=$?
7108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7109 (exit $ac_status); }; }; then
7110 ac_cv_member_struct_ifreq_ifr_hwaddr=yes
7111else
7112 echo "$as_me: failed program was:" >&5
7113sed 's/^/| /' conftest.$ac_ext >&5
7114
7115cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7116/* confdefs.h. */
7117_ACEOF
7118cat confdefs.h >>conftest.$ac_ext
7119cat >>conftest.$ac_ext <<_ACEOF
7120/* end confdefs.h. */
7862d3a8
AS
7121$ac_includes_default
7122#if HAVE_SYS_SOCKET_H
7123#include <sys/socket.h>
7124#endif
7125#if HAVE_NET_IF_H
96f3a036 7126#include <net/if.h>
7862d3a8 7127#endif
96f3a036
DL
7128
7129int
7130main ()
7131{
7132static struct ifreq ac_aggr;
7133if (sizeof ac_aggr.ifr_hwaddr)
7134return 0;
7135 ;
7136 return 0;
7137}
7138_ACEOF
7139rm -f conftest.$ac_objext
7140if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 7141 (eval $ac_compile) 2>conftest.er1
96f3a036 7142 ac_status=$?
35996d22
AS
7143 grep -v '^ *+' conftest.er1 >conftest.err
7144 rm -f conftest.er1
7145 cat conftest.err >&5
96f3a036
DL
7146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7147 (exit $ac_status); } &&
551ffc27
ST
7148 { ac_try='test -z "$ac_c_werror_flag"
7149 || test ! -s conftest.err'
35996d22
AS
7150 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7151 (eval $ac_try) 2>&5
7152 ac_status=$?
7153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7154 (exit $ac_status); }; } &&
7155 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7156 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7157 (eval $ac_try) 2>&5
7158 ac_status=$?
7159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7160 (exit $ac_status); }; }; then
7161 ac_cv_member_struct_ifreq_ifr_hwaddr=yes
7162else
7163 echo "$as_me: failed program was:" >&5
7164sed 's/^/| /' conftest.$ac_ext >&5
7165
7166ac_cv_member_struct_ifreq_ifr_hwaddr=no
7167fi
35996d22 7168rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 7169fi
35996d22 7170rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036
DL
7171fi
7172echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_hwaddr" >&5
7173echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_hwaddr" >&6
7174if test $ac_cv_member_struct_ifreq_ifr_hwaddr = yes; then
7175
7176cat >>confdefs.h <<_ACEOF
7177#define HAVE_STRUCT_IFREQ_IFR_HWADDR 1
7178_ACEOF
7179
7180
7181fi
7182echo "$as_me:$LINENO: checking for struct ifreq.ifr_netmask" >&5
7183echo $ECHO_N "checking for struct ifreq.ifr_netmask... $ECHO_C" >&6
7184if test "${ac_cv_member_struct_ifreq_ifr_netmask+set}" = set; then
7185 echo $ECHO_N "(cached) $ECHO_C" >&6
7186else
7187 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7188/* confdefs.h. */
7189_ACEOF
7190cat confdefs.h >>conftest.$ac_ext
7191cat >>conftest.$ac_ext <<_ACEOF
7192/* end confdefs.h. */
7862d3a8
AS
7193$ac_includes_default
7194#if HAVE_SYS_SOCKET_H
7195#include <sys/socket.h>
7196#endif
7197#if HAVE_NET_IF_H
96f3a036 7198#include <net/if.h>
7862d3a8 7199#endif
96f3a036
DL
7200
7201int
7202main ()
7203{
7204static struct ifreq ac_aggr;
7205if (ac_aggr.ifr_netmask)
7206return 0;
7207 ;
7208 return 0;
7209}
7210_ACEOF
7211rm -f conftest.$ac_objext
7212if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 7213 (eval $ac_compile) 2>conftest.er1
96f3a036 7214 ac_status=$?
35996d22
AS
7215 grep -v '^ *+' conftest.er1 >conftest.err
7216 rm -f conftest.er1
7217 cat conftest.err >&5
96f3a036
DL
7218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7219 (exit $ac_status); } &&
551ffc27
ST
7220 { ac_try='test -z "$ac_c_werror_flag"
7221 || test ! -s conftest.err'
35996d22
AS
7222 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7223 (eval $ac_try) 2>&5
7224 ac_status=$?
7225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7226 (exit $ac_status); }; } &&
7227 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7228 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7229 (eval $ac_try) 2>&5
7230 ac_status=$?
7231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7232 (exit $ac_status); }; }; then
7233 ac_cv_member_struct_ifreq_ifr_netmask=yes
7234else
7235 echo "$as_me: failed program was:" >&5
7236sed 's/^/| /' conftest.$ac_ext >&5
7237
7238cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7239/* confdefs.h. */
7240_ACEOF
7241cat confdefs.h >>conftest.$ac_ext
7242cat >>conftest.$ac_ext <<_ACEOF
7243/* end confdefs.h. */
7862d3a8
AS
7244$ac_includes_default
7245#if HAVE_SYS_SOCKET_H
7246#include <sys/socket.h>
7247#endif
7248#if HAVE_NET_IF_H
96f3a036 7249#include <net/if.h>
7862d3a8 7250#endif
96f3a036
DL
7251
7252int
7253main ()
7254{
7255static struct ifreq ac_aggr;
7256if (sizeof ac_aggr.ifr_netmask)
7257return 0;
7258 ;
7259 return 0;
7260}
7261_ACEOF
7262rm -f conftest.$ac_objext
7263if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 7264 (eval $ac_compile) 2>conftest.er1
96f3a036 7265 ac_status=$?
35996d22
AS
7266 grep -v '^ *+' conftest.er1 >conftest.err
7267 rm -f conftest.er1
7268 cat conftest.err >&5
96f3a036
DL
7269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7270 (exit $ac_status); } &&
551ffc27
ST
7271 { ac_try='test -z "$ac_c_werror_flag"
7272 || test ! -s conftest.err'
35996d22
AS
7273 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7274 (eval $ac_try) 2>&5
7275 ac_status=$?
7276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7277 (exit $ac_status); }; } &&
7278 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7279 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7280 (eval $ac_try) 2>&5
7281 ac_status=$?
7282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7283 (exit $ac_status); }; }; then
7284 ac_cv_member_struct_ifreq_ifr_netmask=yes
7285else
7286 echo "$as_me: failed program was:" >&5
7287sed 's/^/| /' conftest.$ac_ext >&5
7288
7289ac_cv_member_struct_ifreq_ifr_netmask=no
7290fi
35996d22 7291rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 7292fi
35996d22 7293rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036
DL
7294fi
7295echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_netmask" >&5
7296echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_netmask" >&6
7297if test $ac_cv_member_struct_ifreq_ifr_netmask = yes; then
7298
7299cat >>confdefs.h <<_ACEOF
7300#define HAVE_STRUCT_IFREQ_IFR_NETMASK 1
7301_ACEOF
7302
7303
7304fi
7305echo "$as_me:$LINENO: checking for struct ifreq.ifr_broadaddr" >&5
7306echo $ECHO_N "checking for struct ifreq.ifr_broadaddr... $ECHO_C" >&6
7307if test "${ac_cv_member_struct_ifreq_ifr_broadaddr+set}" = set; then
7308 echo $ECHO_N "(cached) $ECHO_C" >&6
7309else
7310 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7311/* confdefs.h. */
7312_ACEOF
7313cat confdefs.h >>conftest.$ac_ext
7314cat >>conftest.$ac_ext <<_ACEOF
7315/* end confdefs.h. */
7862d3a8
AS
7316$ac_includes_default
7317#if HAVE_SYS_SOCKET_H
7318#include <sys/socket.h>
7319#endif
7320#if HAVE_NET_IF_H
96f3a036 7321#include <net/if.h>
7862d3a8 7322#endif
96f3a036
DL
7323
7324int
7325main ()
7326{
7327static struct ifreq ac_aggr;
7328if (ac_aggr.ifr_broadaddr)
7329return 0;
7330 ;
7331 return 0;
7332}
7333_ACEOF
7334rm -f conftest.$ac_objext
7335if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 7336 (eval $ac_compile) 2>conftest.er1
96f3a036 7337 ac_status=$?
35996d22
AS
7338 grep -v '^ *+' conftest.er1 >conftest.err
7339 rm -f conftest.er1
7340 cat conftest.err >&5
96f3a036
DL
7341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7342 (exit $ac_status); } &&
551ffc27
ST
7343 { ac_try='test -z "$ac_c_werror_flag"
7344 || test ! -s conftest.err'
35996d22
AS
7345 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7346 (eval $ac_try) 2>&5
7347 ac_status=$?
7348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7349 (exit $ac_status); }; } &&
7350 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7351 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7352 (eval $ac_try) 2>&5
7353 ac_status=$?
7354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7355 (exit $ac_status); }; }; then
7356 ac_cv_member_struct_ifreq_ifr_broadaddr=yes
7357else
7358 echo "$as_me: failed program was:" >&5
7359sed 's/^/| /' conftest.$ac_ext >&5
7360
7361cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7362/* confdefs.h. */
7363_ACEOF
7364cat confdefs.h >>conftest.$ac_ext
7365cat >>conftest.$ac_ext <<_ACEOF
7366/* end confdefs.h. */
7862d3a8
AS
7367$ac_includes_default
7368#if HAVE_SYS_SOCKET_H
7369#include <sys/socket.h>
7370#endif
7371#if HAVE_NET_IF_H
96f3a036 7372#include <net/if.h>
7862d3a8 7373#endif
96f3a036
DL
7374
7375int
7376main ()
7377{
7378static struct ifreq ac_aggr;
7379if (sizeof ac_aggr.ifr_broadaddr)
7380return 0;
7381 ;
7382 return 0;
7383}
7384_ACEOF
7385rm -f conftest.$ac_objext
7386if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 7387 (eval $ac_compile) 2>conftest.er1
96f3a036 7388 ac_status=$?
35996d22
AS
7389 grep -v '^ *+' conftest.er1 >conftest.err
7390 rm -f conftest.er1
7391 cat conftest.err >&5
96f3a036
DL
7392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7393 (exit $ac_status); } &&
551ffc27
ST
7394 { ac_try='test -z "$ac_c_werror_flag"
7395 || test ! -s conftest.err'
35996d22
AS
7396 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7397 (eval $ac_try) 2>&5
7398 ac_status=$?
7399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7400 (exit $ac_status); }; } &&
7401 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7402 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7403 (eval $ac_try) 2>&5
7404 ac_status=$?
7405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7406 (exit $ac_status); }; }; then
7407 ac_cv_member_struct_ifreq_ifr_broadaddr=yes
7408else
7409 echo "$as_me: failed program was:" >&5
7410sed 's/^/| /' conftest.$ac_ext >&5
7411
7412ac_cv_member_struct_ifreq_ifr_broadaddr=no
7413fi
35996d22 7414rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 7415fi
35996d22 7416rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036
DL
7417fi
7418echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_broadaddr" >&5
7419echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_broadaddr" >&6
7420if test $ac_cv_member_struct_ifreq_ifr_broadaddr = yes; then
7421
7422cat >>confdefs.h <<_ACEOF
7423#define HAVE_STRUCT_IFREQ_IFR_BROADADDR 1
7424_ACEOF
7425
7426
7427fi
7428echo "$as_me:$LINENO: checking for struct ifreq.ifr_addr" >&5
7429echo $ECHO_N "checking for struct ifreq.ifr_addr... $ECHO_C" >&6
7430if test "${ac_cv_member_struct_ifreq_ifr_addr+set}" = set; then
7431 echo $ECHO_N "(cached) $ECHO_C" >&6
7432else
7433 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7434/* confdefs.h. */
7435_ACEOF
7436cat confdefs.h >>conftest.$ac_ext
7437cat >>conftest.$ac_ext <<_ACEOF
7438/* end confdefs.h. */
7862d3a8
AS
7439$ac_includes_default
7440#if HAVE_SYS_SOCKET_H
7441#include <sys/socket.h>
7442#endif
7443#if HAVE_NET_IF_H
96f3a036 7444#include <net/if.h>
7862d3a8 7445#endif
96f3a036
DL
7446
7447int
7448main ()
7449{
7450static struct ifreq ac_aggr;
7451if (ac_aggr.ifr_addr)
7452return 0;
7453 ;
7454 return 0;
7455}
7456_ACEOF
7457rm -f conftest.$ac_objext
7458if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 7459 (eval $ac_compile) 2>conftest.er1
96f3a036 7460 ac_status=$?
35996d22
AS
7461 grep -v '^ *+' conftest.er1 >conftest.err
7462 rm -f conftest.er1
7463 cat conftest.err >&5
96f3a036
DL
7464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7465 (exit $ac_status); } &&
551ffc27
ST
7466 { ac_try='test -z "$ac_c_werror_flag"
7467 || test ! -s conftest.err'
35996d22
AS
7468 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7469 (eval $ac_try) 2>&5
7470 ac_status=$?
7471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7472 (exit $ac_status); }; } &&
7473 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7474 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7475 (eval $ac_try) 2>&5
7476 ac_status=$?
7477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7478 (exit $ac_status); }; }; then
7479 ac_cv_member_struct_ifreq_ifr_addr=yes
7480else
7481 echo "$as_me: failed program was:" >&5
7482sed 's/^/| /' conftest.$ac_ext >&5
7483
7484cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7485/* confdefs.h. */
7486_ACEOF
7487cat confdefs.h >>conftest.$ac_ext
7488cat >>conftest.$ac_ext <<_ACEOF
7489/* end confdefs.h. */
7862d3a8
AS
7490$ac_includes_default
7491#if HAVE_SYS_SOCKET_H
7492#include <sys/socket.h>
7493#endif
7494#if HAVE_NET_IF_H
96f3a036 7495#include <net/if.h>
7862d3a8 7496#endif
96f3a036
DL
7497
7498int
7499main ()
7500{
7501static struct ifreq ac_aggr;
7502if (sizeof ac_aggr.ifr_addr)
7503return 0;
7504 ;
7505 return 0;
7506}
7507_ACEOF
7508rm -f conftest.$ac_objext
7509if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 7510 (eval $ac_compile) 2>conftest.er1
96f3a036 7511 ac_status=$?
35996d22
AS
7512 grep -v '^ *+' conftest.er1 >conftest.err
7513 rm -f conftest.er1
7514 cat conftest.err >&5
96f3a036
DL
7515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7516 (exit $ac_status); } &&
551ffc27
ST
7517 { ac_try='test -z "$ac_c_werror_flag"
7518 || test ! -s conftest.err'
35996d22
AS
7519 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7520 (eval $ac_try) 2>&5
7521 ac_status=$?
7522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7523 (exit $ac_status); }; } &&
7524 { ac_try='test -s conftest.$ac_objext'
96f3a036
DL
7525 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7526 (eval $ac_try) 2>&5
7527 ac_status=$?
7528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7529 (exit $ac_status); }; }; then
7530 ac_cv_member_struct_ifreq_ifr_addr=yes
7531else
7532 echo "$as_me: failed program was:" >&5
7533sed 's/^/| /' conftest.$ac_ext >&5
7534
7535ac_cv_member_struct_ifreq_ifr_addr=no
7536fi
35996d22 7537rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 7538fi
35996d22 7539rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036
DL
7540fi
7541echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_addr" >&5
7542echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_addr" >&6
7543if test $ac_cv_member_struct_ifreq_ifr_addr = yes; then
7544
7545cat >>confdefs.h <<_ACEOF
7546#define HAVE_STRUCT_IFREQ_IFR_ADDR 1
7547_ACEOF
7548
7549
7550fi
7551
8799b3e4 7552
8799b3e4 7553
c0d27fcc 7554echo "$as_me:$LINENO: checking for function prototypes" >&5
98418dba
CW
7555echo $ECHO_N "checking for function prototypes... $ECHO_C" >&6
7556if test "$ac_cv_prog_cc_stdc" != no; then
c0d27fcc 7557 echo "$as_me:$LINENO: result: yes" >&5
98418dba
CW
7558echo "${ECHO_T}yes" >&6
7559
c0d27fcc 7560cat >>confdefs.h <<\_ACEOF
98418dba 7561#define PROTOTYPES 1
c0d27fcc
MR
7562_ACEOF
7563
7564
7565cat >>confdefs.h <<\_ACEOF
7566#define __PROTOTYPES 1
7567_ACEOF
98418dba
CW
7568
7569else
c0d27fcc 7570 echo "$as_me:$LINENO: result: no" >&5
98418dba
CW
7571echo "${ECHO_T}no" >&6
7572fi
7573
c0d27fcc 7574echo "$as_me:$LINENO: checking for working volatile" >&5
98418dba
CW
7575echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
7576if test "${ac_cv_c_volatile+set}" = set; then
7577 echo $ECHO_N "(cached) $ECHO_C" >&6
7578else
7579 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7580/* confdefs.h. */
7581_ACEOF
7582cat confdefs.h >>conftest.$ac_ext
7583cat >>conftest.$ac_ext <<_ACEOF
7584/* end confdefs.h. */
98418dba 7585
98418dba
CW
7586int
7587main ()
7588{
7589
7590volatile int x;
7591int * volatile y;
7592 ;
7593 return 0;
7594}
7595_ACEOF
7596rm -f conftest.$ac_objext
c0d27fcc 7597if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 7598 (eval $ac_compile) 2>conftest.er1
98418dba 7599 ac_status=$?
35996d22
AS
7600 grep -v '^ *+' conftest.er1 >conftest.err
7601 rm -f conftest.er1
7602 cat conftest.err >&5
c0d27fcc 7603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 7604 (exit $ac_status); } &&
551ffc27
ST
7605 { ac_try='test -z "$ac_c_werror_flag"
7606 || test ! -s conftest.err'
35996d22
AS
7607 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7608 (eval $ac_try) 2>&5
7609 ac_status=$?
7610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7611 (exit $ac_status); }; } &&
7612 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 7613 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
7614 (eval $ac_try) 2>&5
7615 ac_status=$?
c0d27fcc 7616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7617 (exit $ac_status); }; }; then
7618 ac_cv_c_volatile=yes
7619else
7620 echo "$as_me: failed program was:" >&5
19650fd6
AS
7621sed 's/^/| /' conftest.$ac_ext >&5
7622
98418dba
CW
7623ac_cv_c_volatile=no
7624fi
35996d22 7625rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 7626fi
c0d27fcc 7627echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5
98418dba
CW
7628echo "${ECHO_T}$ac_cv_c_volatile" >&6
7629if test $ac_cv_c_volatile = no; then
7630
c0d27fcc 7631cat >>confdefs.h <<\_ACEOF
98418dba 7632#define volatile
c0d27fcc 7633_ACEOF
98418dba
CW
7634
7635fi
7636
c0d27fcc 7637echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
98418dba
CW
7638echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
7639if test "${ac_cv_c_const+set}" = set; then
7640 echo $ECHO_N "(cached) $ECHO_C" >&6
7641else
7642 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7643/* confdefs.h. */
7644_ACEOF
7645cat confdefs.h >>conftest.$ac_ext
7646cat >>conftest.$ac_ext <<_ACEOF
7647/* end confdefs.h. */
98418dba 7648
98418dba
CW
7649int
7650main ()
7651{
7652/* FIXME: Include the comments suggested by Paul. */
7653#ifndef __cplusplus
7654 /* Ultrix mips cc rejects this. */
7655 typedef int charset[2];
7656 const charset x;
7657 /* SunOS 4.1.1 cc rejects this. */
7658 char const *const *ccp;
7659 char **p;
7660 /* NEC SVR4.0.2 mips cc rejects this. */
7661 struct point {int x, y;};
7662 static struct point const zero = {0,0};
7663 /* AIX XL C 1.02.0.0 rejects this.
7664 It does not let you subtract one const X* pointer from another in
7665 an arm of an if-expression whose if-part is not a constant
7666 expression */
7667 const char *g = "string";
7668 ccp = &g + (g ? g-g : 0);
7669 /* HPUX 7.0 cc rejects these. */
7670 ++ccp;
7671 p = (char**) ccp;
7672 ccp = (char const *const *) p;
7673 { /* SCO 3.2v4 cc rejects this. */
7674 char *t;
7675 char const *s = 0 ? (char *) 0 : (char const *) 0;
7676
7677 *t++ = 0;
7678 }
7679 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
7680 int x[] = {25, 17};
7681 const int *foo = &x[0];
7682 ++foo;
7683 }
7684 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
7685 typedef const int *iptr;
7686 iptr p = 0;
7687 ++p;
7688 }
7689 { /* AIX XL C 1.02.0.0 rejects this saying
7690 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
7691 struct s { int j; const int *ap[3]; };
7692 struct s *b; b->j = 5;
7693 }
7694 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
7695 const int foo = 10;
7696 }
7697#endif
7698
7699 ;
7700 return 0;
7701}
7702_ACEOF
7703rm -f conftest.$ac_objext
c0d27fcc 7704if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 7705 (eval $ac_compile) 2>conftest.er1
98418dba 7706 ac_status=$?
35996d22
AS
7707 grep -v '^ *+' conftest.er1 >conftest.err
7708 rm -f conftest.er1
7709 cat conftest.err >&5
c0d27fcc 7710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 7711 (exit $ac_status); } &&
551ffc27
ST
7712 { ac_try='test -z "$ac_c_werror_flag"
7713 || test ! -s conftest.err'
35996d22
AS
7714 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7715 (eval $ac_try) 2>&5
7716 ac_status=$?
7717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7718 (exit $ac_status); }; } &&
7719 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 7720 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
7721 (eval $ac_try) 2>&5
7722 ac_status=$?
c0d27fcc 7723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7724 (exit $ac_status); }; }; then
7725 ac_cv_c_const=yes
7726else
7727 echo "$as_me: failed program was:" >&5
19650fd6
AS
7728sed 's/^/| /' conftest.$ac_ext >&5
7729
98418dba
CW
7730ac_cv_c_const=no
7731fi
35996d22 7732rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 7733fi
c0d27fcc 7734echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
98418dba
CW
7735echo "${ECHO_T}$ac_cv_c_const" >&6
7736if test $ac_cv_c_const = no; then
7737
c0d27fcc 7738cat >>confdefs.h <<\_ACEOF
98418dba 7739#define const
c0d27fcc 7740_ACEOF
98418dba
CW
7741
7742fi
7743
c0d27fcc 7744echo "$as_me:$LINENO: checking for void * support" >&5
98418dba
CW
7745echo $ECHO_N "checking for void * support... $ECHO_C" >&6
7746if test "${emacs_cv_void_star+set}" = set; then
7747 echo $ECHO_N "(cached) $ECHO_C" >&6
7748else
7749 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7750/* confdefs.h. */
7751_ACEOF
7752cat confdefs.h >>conftest.$ac_ext
7753cat >>conftest.$ac_ext <<_ACEOF
7754/* end confdefs.h. */
98418dba 7755
98418dba
CW
7756int
7757main ()
7758{
7759void * foo;
7760 ;
7761 return 0;
7762}
7763_ACEOF
7764rm -f conftest.$ac_objext
c0d27fcc 7765if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 7766 (eval $ac_compile) 2>conftest.er1
98418dba 7767 ac_status=$?
35996d22
AS
7768 grep -v '^ *+' conftest.er1 >conftest.err
7769 rm -f conftest.er1
7770 cat conftest.err >&5
c0d27fcc 7771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 7772 (exit $ac_status); } &&
551ffc27
ST
7773 { ac_try='test -z "$ac_c_werror_flag"
7774 || test ! -s conftest.err'
35996d22
AS
7775 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7776 (eval $ac_try) 2>&5
7777 ac_status=$?
7778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7779 (exit $ac_status); }; } &&
7780 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 7781 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
7782 (eval $ac_try) 2>&5
7783 ac_status=$?
c0d27fcc 7784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
7785 (exit $ac_status); }; }; then
7786 emacs_cv_void_star=yes
7787else
7788 echo "$as_me: failed program was:" >&5
19650fd6
AS
7789sed 's/^/| /' conftest.$ac_ext >&5
7790
98418dba
CW
7791emacs_cv_void_star=no
7792fi
35996d22 7793rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 7794fi
c0d27fcc 7795echo "$as_me:$LINENO: result: $emacs_cv_void_star" >&5
98418dba
CW
7796echo "${ECHO_T}$emacs_cv_void_star" >&6
7797if test $emacs_cv_void_star = yes; then
c0d27fcc 7798 cat >>confdefs.h <<\_ACEOF
98418dba 7799#define POINTER_TYPE void
c0d27fcc 7800_ACEOF
98418dba
CW
7801
7802else
c0d27fcc 7803 cat >>confdefs.h <<\_ACEOF
98418dba 7804#define POINTER_TYPE char
c0d27fcc 7805_ACEOF
98418dba
CW
7806
7807fi
7808
c0d27fcc 7809
4494a266
JD
7810
7811
cd958eb3 7812
19650fd6
AS
7813echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
7814echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
35996d22 7815set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
98418dba
CW
7816if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
7817 echo $ECHO_N "(cached) $ECHO_C" >&6
7818else
c0d27fcc 7819 cat >conftest.make <<\_ACEOF
98418dba 7820all:
19650fd6 7821 @echo 'ac_maketemp="$(MAKE)"'
c0d27fcc 7822_ACEOF
98418dba
CW
7823# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
7824eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
7825if test -n "$ac_maketemp"; then
7826 eval ac_cv_prog_make_${ac_make}_set=yes
7827else
7828 eval ac_cv_prog_make_${ac_make}_set=no
7829fi
7830rm -f conftest.make
7831fi
7832if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
c0d27fcc 7833 echo "$as_me:$LINENO: result: yes" >&5
98418dba
CW
7834echo "${ECHO_T}yes" >&6
7835 SET_MAKE=
7836else
c0d27fcc 7837 echo "$as_me:$LINENO: result: no" >&5
98418dba
CW
7838echo "${ECHO_T}no" >&6
7839 SET_MAKE="MAKE=${MAKE-make}"
7840fi
7841
c0d27fcc
MR
7842
7843echo "$as_me:$LINENO: checking for long file names" >&5
98418dba
CW
7844echo $ECHO_N "checking for long file names... $ECHO_C" >&6
7845if test "${ac_cv_sys_long_file_names+set}" = set; then
7846 echo $ECHO_N "(cached) $ECHO_C" >&6
7847else
7848 ac_cv_sys_long_file_names=yes
7849# Test for long file names in all the places we know might matter:
7850# . the current directory, where building will happen
7851# $prefix/lib where we will be installing things
7852# $exec_prefix/lib likewise
7853# eval it to expand exec_prefix.
7854# $TMPDIR if set, where it might want to write temporary files
7855# if $TMPDIR is not set:
7856# /tmp where it might want to write temporary files
7857# /var/tmp likewise
7858# /usr/tmp likewise
7859if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
7860 ac_tmpdirs=$TMPDIR
7861else
7862 ac_tmpdirs='/tmp /var/tmp /usr/tmp'
7863fi
7864for ac_dir in . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
7865 test -d $ac_dir || continue
7866 test -w $ac_dir || continue # It is less confusing to not echo anything here.
7867 ac_xdir=$ac_dir/cf$$
7868 (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
7869 ac_tf1=$ac_xdir/conftest9012345
7870 ac_tf2=$ac_xdir/conftest9012346
7871 (echo 1 >$ac_tf1) 2>/dev/null
7872 (echo 2 >$ac_tf2) 2>/dev/null
7873 ac_val=`cat $ac_tf1 2>/dev/null`
7874 if test ! -f $ac_tf1 || test "$ac_val" != 1; then
7875 ac_cv_sys_long_file_names=no
7876 rm -rf $ac_xdir 2>/dev/null
7877 break
7878 fi
7879 rm -rf $ac_xdir 2>/dev/null
7880done
7881fi
c0d27fcc 7882echo "$as_me:$LINENO: result: $ac_cv_sys_long_file_names" >&5
98418dba
CW
7883echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
7884if test $ac_cv_sys_long_file_names = yes; then
7885
c0d27fcc 7886cat >>confdefs.h <<\_ACEOF
98418dba 7887#define HAVE_LONG_FILE_NAMES 1
c0d27fcc 7888_ACEOF
98418dba
CW
7889
7890fi
7891
c0d27fcc 7892
98418dba
CW
7893#### Choose a window system.
7894
c0d27fcc 7895echo "$as_me:$LINENO: checking for X" >&5
98418dba
CW
7896echo $ECHO_N "checking for X... $ECHO_C" >&6
7897
c0d27fcc 7898
98418dba
CW
7899# Check whether --with-x or --without-x was given.
7900if test "${with_x+set}" = set; then
7901 withval="$with_x"
7902
7903fi;
7904# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
7905if test "x$with_x" = xno; then
7906 # The user explicitly disabled X.
7907 have_x=disabled
7908else
7909 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
7910 # Both variables are already set.
7911 have_x=yes
7912 else
7913 if test "${ac_cv_have_x+set}" = set; then
7914 echo $ECHO_N "(cached) $ECHO_C" >&6
7915else
7916 # One or both of the vars are not set, and there is no cached value.
7917ac_x_includes=no ac_x_libraries=no
7918rm -fr conftest.dir
7919if mkdir conftest.dir; then
7920 cd conftest.dir
7921 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
c0d27fcc 7922 cat >Imakefile <<'_ACEOF'
98418dba
CW
7923acfindx:
7924 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
c0d27fcc 7925_ACEOF
98418dba
CW
7926 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
7927 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
7928 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
7929 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
7930 for ac_extension in a so sl; do
7931 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
35996d22
AS
7932 test -f $ac_im_libdir/libX11.$ac_extension; then
7933 ac_im_usrlibdir=$ac_im_libdir; break
98418dba
CW
7934 fi
7935 done
7936 # Screen out bogus values from the imake configuration. They are
7937 # bogus both because they are the default anyway, and because
7938 # using them would break gcc on systems where it needs fixed includes.
7939 case $ac_im_incroot in
7940 /usr/include) ;;
7941 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
7942 esac
7943 case $ac_im_usrlibdir in
7944 /usr/lib | /lib) ;;
7945 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
7946 esac
7947 fi
7948 cd ..
7949 rm -fr conftest.dir
7950fi
7951
7952# Standard set of common directories for X headers.
7953# Check X11 before X11Rn because it is often a symlink to the current release.
7954ac_x_header_dirs='
7955/usr/X11/include
7956/usr/X11R6/include
7957/usr/X11R5/include
7958/usr/X11R4/include
7959
7960/usr/include/X11
7961/usr/include/X11R6
7962/usr/include/X11R5
7963/usr/include/X11R4
7964
7965/usr/local/X11/include
7966/usr/local/X11R6/include
7967/usr/local/X11R5/include
7968/usr/local/X11R4/include
7969
7970/usr/local/include/X11
7971/usr/local/include/X11R6
7972/usr/local/include/X11R5
7973/usr/local/include/X11R4
7974
7975/usr/X386/include
7976/usr/x386/include
7977/usr/XFree86/include/X11
7978
7979/usr/include
7980/usr/local/include
7981/usr/unsupported/include
7982/usr/athena/include
7983/usr/local/x11r5/include
7984/usr/lpp/Xamples/include
7985
7986/usr/openwin/include
7987/usr/openwin/share/include'
7988
7989if test "$ac_x_includes" = no; then
551ffc27 7990 # Guess where to find include files, by looking for Intrinsic.h.
98418dba
CW
7991 # First, try using that file with no special directory specified.
7992 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7993/* confdefs.h. */
7994_ACEOF
7995cat confdefs.h >>conftest.$ac_ext
7996cat >>conftest.$ac_ext <<_ACEOF
7997/* end confdefs.h. */
98418dba
CW
7998#include <X11/Intrinsic.h>
7999_ACEOF
c0d27fcc 8000if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
8001 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8002 ac_status=$?
6bae0ccf 8003 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
8004 rm -f conftest.er1
8005 cat conftest.err >&5
c0d27fcc 8006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8007 (exit $ac_status); } >/dev/null; then
8008 if test -s conftest.err; then
8009 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 8010 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
8011 else
8012 ac_cpp_err=
8013 fi
8014else
8015 ac_cpp_err=yes
8016fi
8017if test -z "$ac_cpp_err"; then
8018 # We can compile using X headers with no special include directory.
8019ac_x_includes=
8020else
8021 echo "$as_me: failed program was:" >&5
19650fd6
AS
8022sed 's/^/| /' conftest.$ac_ext >&5
8023
98418dba
CW
8024 for ac_dir in $ac_x_header_dirs; do
8025 if test -r "$ac_dir/X11/Intrinsic.h"; then
8026 ac_x_includes=$ac_dir
8027 break
8028 fi
8029done
8030fi
8031rm -f conftest.err conftest.$ac_ext
8032fi # $ac_x_includes = no
8033
8034if test "$ac_x_libraries" = no; then
8035 # Check for the libraries.
8036 # See if we find them without any special options.
8037 # Don't add to $LIBS permanently.
8038 ac_save_LIBS=$LIBS
8039 LIBS="-lXt $LIBS"
8040 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8041/* confdefs.h. */
8042_ACEOF
8043cat confdefs.h >>conftest.$ac_ext
8044cat >>conftest.$ac_ext <<_ACEOF
8045/* end confdefs.h. */
98418dba 8046#include <X11/Intrinsic.h>
98418dba
CW
8047int
8048main ()
8049{
8050XtMalloc (0)
8051 ;
8052 return 0;
8053}
8054_ACEOF
8055rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8056if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 8057 (eval $ac_link) 2>conftest.er1
98418dba 8058 ac_status=$?
35996d22
AS
8059 grep -v '^ *+' conftest.er1 >conftest.err
8060 rm -f conftest.er1
8061 cat conftest.err >&5
c0d27fcc 8062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8063 (exit $ac_status); } &&
551ffc27
ST
8064 { ac_try='test -z "$ac_c_werror_flag"
8065 || test ! -s conftest.err'
35996d22
AS
8066 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8067 (eval $ac_try) 2>&5
8068 ac_status=$?
8069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8070 (exit $ac_status); }; } &&
8071 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8072 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8073 (eval $ac_try) 2>&5
8074 ac_status=$?
c0d27fcc 8075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8076 (exit $ac_status); }; }; then
8077 LIBS=$ac_save_LIBS
8078# We can link X programs with no special library path.
8079ac_x_libraries=
8080else
8081 echo "$as_me: failed program was:" >&5
19650fd6
AS
8082sed 's/^/| /' conftest.$ac_ext >&5
8083
98418dba
CW
8084LIBS=$ac_save_LIBS
8085for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
8086do
8087 # Don't even attempt the hair of trying to link an X program!
8088 for ac_extension in a so sl; do
8089 if test -r $ac_dir/libXt.$ac_extension; then
8090 ac_x_libraries=$ac_dir
8091 break 2
8092 fi
8093 done
8094done
8095fi
35996d22
AS
8096rm -f conftest.err conftest.$ac_objext \
8097 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
8098fi # $ac_x_libraries = no
8099
8100if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
8101 # Didn't find X anywhere. Cache the known absence of X.
8102 ac_cv_have_x="have_x=no"
8103else
8104 # Record where we found X for the cache.
8105 ac_cv_have_x="have_x=yes \
35996d22 8106 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
98418dba
CW
8107fi
8108fi
8109
8110 fi
8111 eval "$ac_cv_have_x"
8112fi # $with_x != no
8113
8114if test "$have_x" != yes; then
c0d27fcc 8115 echo "$as_me:$LINENO: result: $have_x" >&5
98418dba
CW
8116echo "${ECHO_T}$have_x" >&6
8117 no_x=yes
8118else
8119 # If each of the values was on the command line, it overrides each guess.
8120 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
8121 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
8122 # Update the cache value to reflect the command line values.
8123 ac_cv_have_x="have_x=yes \
8124 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
551ffc27
ST
8125 echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
8126echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
98418dba
CW
8127fi
8128
8129if test "$no_x" = yes; then
8130 window_system=none
8131else
8132 window_system=x11
8133fi
8134
8135if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
8136 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
8137 LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"`
8138 x_default_search_path=""
8139 for x_library in `echo ${x_libraries} | sed -e "s/:/ /g"`; do
8140 x_search_path="\
8141${x_library}/X11/%L/%T/%N%C%S:\
8142${x_library}/X11/%l/%T/%N%C%S:\
8143${x_library}/X11/%T/%N%C%S:\
8144${x_library}/X11/%L/%T/%N%S:\
8145${x_library}/X11/%l/%T/%N%S:\
8146${x_library}/X11/%T/%N%S"
8147 if test x"${x_default_search_path}" = x; then
8148 x_default_search_path=${x_search_path}
8149 else
8150 x_default_search_path="${x_search_path}:${x_default_search_path}"
8151 fi
8152 done
8153fi
8154if test "${x_includes}" != NONE && test -n "${x_includes}"; then
8155 C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"`
8156fi
8157
8158if test x"${x_includes}" = x; then
8159 bitmapdir=/usr/include/X11/bitmaps
8160else
8161 # accumulate include directories that have X11 bitmap subdirectories
8162 bmd_acc="dummyval"
8163 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
8164 if test -d "${bmd}/X11/bitmaps"; then
8165 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
8166 fi
8167 if test -d "${bmd}/bitmaps"; then
8168 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
8169 fi
8170 done
8171 if test ${bmd_acc} != "dummyval"; then
8172 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
8173 fi
8174fi
8175
8176case "${window_system}" in
8177 x11 )
8178 HAVE_X_WINDOWS=yes
8179 HAVE_X11=yes
8180 case "${with_x_toolkit}" in
8181 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
8182 motif ) USE_X_TOOLKIT=MOTIF ;;
488dd4c4
JD
8183 gtk ) with_gtk=yes
8184 USE_X_TOOLKIT=none ;;
98418dba
CW
8185 no ) USE_X_TOOLKIT=none ;;
8186 * ) USE_X_TOOLKIT=maybe ;;
8187 esac
8188 ;;
8189 none )
8190 HAVE_X_WINDOWS=no
8191 HAVE_X11=no
8192 USE_X_TOOLKIT=none
8193 ;;
8194esac
8195
8196### If we're using X11, we should use the X menu package.
8197HAVE_MENUS=no
8198case ${HAVE_X11} in
8199 yes ) HAVE_MENUS=yes ;;
8200esac
8201
8202if test "${opsys}" = "hpux9"; then
8203 case "${x_libraries}" in
8204 *X11R4* )
8205 opsysfile="s/hpux9-x11r4.h"
8206 ;;
8207 esac
8208fi
8209
8210if test "${opsys}" = "hpux9shr"; then
8211 case "${x_libraries}" in
8212 *X11R4* )
8213 opsysfile="s/hpux9shxr4.h"
8214 ;;
8215 esac
8216fi
8217
8218### Compute the unexec source name from the object name.
8219UNEXEC_SRC="`echo ${unexec} | sed 's/\.o/.c/'`"
8220
8221# Do the opsystem or machine files prohibit the use of the GNU malloc?
8222# Assume not, until told otherwise.
8223GNU_MALLOC=yes
8224doug_lea_malloc=yes
c0d27fcc 8225echo "$as_me:$LINENO: checking for malloc_get_state" >&5
98418dba
CW
8226echo $ECHO_N "checking for malloc_get_state... $ECHO_C" >&6
8227if test "${ac_cv_func_malloc_get_state+set}" = set; then
8228 echo $ECHO_N "(cached) $ECHO_C" >&6
8229else
8230 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8231/* confdefs.h. */
8232_ACEOF
8233cat confdefs.h >>conftest.$ac_ext
8234cat >>conftest.$ac_ext <<_ACEOF
8235/* end confdefs.h. */
35996d22
AS
8236/* Define malloc_get_state to an innocuous variant, in case <limits.h> declares malloc_get_state.
8237 For example, HP-UX 11i <limits.h> declares gettimeofday. */
8238#define malloc_get_state innocuous_malloc_get_state
8239
98418dba 8240/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
8241 which can conflict with char malloc_get_state (); below.
8242 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8243 <limits.h> exists even on freestanding compilers. */
35996d22 8244
19650fd6
AS
8245#ifdef __STDC__
8246# include <limits.h>
8247#else
8248# include <assert.h>
8249#endif
35996d22
AS
8250
8251#undef malloc_get_state
8252
98418dba
CW
8253/* Override any gcc2 internal prototype to avoid an error. */
8254#ifdef __cplusplus
8255extern "C"
19650fd6 8256{
98418dba
CW
8257#endif
8258/* We use char because int might match the return type of a gcc2
8259 builtin and then its argument prototype would still apply. */
8260char malloc_get_state ();
98418dba
CW
8261/* The GNU C library defines this for functions which it implements
8262 to always fail with ENOSYS. Some functions are actually named
8263 something starting with __ and the normal name is an alias. */
8264#if defined (__stub_malloc_get_state) || defined (__stub___malloc_get_state)
8265choke me
8266#else
19650fd6
AS
8267char (*f) () = malloc_get_state;
8268#endif
8269#ifdef __cplusplus
8270}
98418dba
CW
8271#endif
8272
19650fd6
AS
8273int
8274main ()
8275{
8276return f != malloc_get_state;
98418dba
CW
8277 ;
8278 return 0;
8279}
8280_ACEOF
8281rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8282if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 8283 (eval $ac_link) 2>conftest.er1
98418dba 8284 ac_status=$?
35996d22
AS
8285 grep -v '^ *+' conftest.er1 >conftest.err
8286 rm -f conftest.er1
8287 cat conftest.err >&5
c0d27fcc 8288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8289 (exit $ac_status); } &&
551ffc27
ST
8290 { ac_try='test -z "$ac_c_werror_flag"
8291 || test ! -s conftest.err'
35996d22
AS
8292 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8293 (eval $ac_try) 2>&5
8294 ac_status=$?
8295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8296 (exit $ac_status); }; } &&
8297 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8298 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8299 (eval $ac_try) 2>&5
8300 ac_status=$?
c0d27fcc 8301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8302 (exit $ac_status); }; }; then
8303 ac_cv_func_malloc_get_state=yes
8304else
8305 echo "$as_me: failed program was:" >&5
19650fd6
AS
8306sed 's/^/| /' conftest.$ac_ext >&5
8307
98418dba
CW
8308ac_cv_func_malloc_get_state=no
8309fi
35996d22
AS
8310rm -f conftest.err conftest.$ac_objext \
8311 conftest$ac_exeext conftest.$ac_ext
98418dba 8312fi
c0d27fcc 8313echo "$as_me:$LINENO: result: $ac_cv_func_malloc_get_state" >&5
98418dba
CW
8314echo "${ECHO_T}$ac_cv_func_malloc_get_state" >&6
8315if test $ac_cv_func_malloc_get_state = yes; then
8316 :
8317else
8318 doug_lea_malloc=no
8319fi
8320
c0d27fcc 8321echo "$as_me:$LINENO: checking for malloc_set_state" >&5
98418dba
CW
8322echo $ECHO_N "checking for malloc_set_state... $ECHO_C" >&6
8323if test "${ac_cv_func_malloc_set_state+set}" = set; then
8324 echo $ECHO_N "(cached) $ECHO_C" >&6
8325else
8326 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8327/* confdefs.h. */
8328_ACEOF
8329cat confdefs.h >>conftest.$ac_ext
8330cat >>conftest.$ac_ext <<_ACEOF
8331/* end confdefs.h. */
35996d22
AS
8332/* Define malloc_set_state to an innocuous variant, in case <limits.h> declares malloc_set_state.
8333 For example, HP-UX 11i <limits.h> declares gettimeofday. */
8334#define malloc_set_state innocuous_malloc_set_state
8335
98418dba 8336/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
8337 which can conflict with char malloc_set_state (); below.
8338 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8339 <limits.h> exists even on freestanding compilers. */
35996d22 8340
19650fd6
AS
8341#ifdef __STDC__
8342# include <limits.h>
8343#else
8344# include <assert.h>
8345#endif
35996d22
AS
8346
8347#undef malloc_set_state
8348
98418dba
CW
8349/* Override any gcc2 internal prototype to avoid an error. */
8350#ifdef __cplusplus
8351extern "C"
19650fd6 8352{
98418dba
CW
8353#endif
8354/* We use char because int might match the return type of a gcc2
8355 builtin and then its argument prototype would still apply. */
8356char malloc_set_state ();
98418dba
CW
8357/* The GNU C library defines this for functions which it implements
8358 to always fail with ENOSYS. Some functions are actually named
8359 something starting with __ and the normal name is an alias. */
8360#if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
8361choke me
8362#else
19650fd6
AS
8363char (*f) () = malloc_set_state;
8364#endif
8365#ifdef __cplusplus
8366}
98418dba
CW
8367#endif
8368
19650fd6
AS
8369int
8370main ()
8371{
8372return f != malloc_set_state;
98418dba
CW
8373 ;
8374 return 0;
8375}
8376_ACEOF
8377rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8378if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 8379 (eval $ac_link) 2>conftest.er1
98418dba 8380 ac_status=$?
35996d22
AS
8381 grep -v '^ *+' conftest.er1 >conftest.err
8382 rm -f conftest.er1
8383 cat conftest.err >&5
c0d27fcc 8384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8385 (exit $ac_status); } &&
551ffc27
ST
8386 { ac_try='test -z "$ac_c_werror_flag"
8387 || test ! -s conftest.err'
35996d22
AS
8388 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8389 (eval $ac_try) 2>&5
8390 ac_status=$?
8391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8392 (exit $ac_status); }; } &&
8393 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8394 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8395 (eval $ac_try) 2>&5
8396 ac_status=$?
c0d27fcc 8397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8398 (exit $ac_status); }; }; then
8399 ac_cv_func_malloc_set_state=yes
8400else
8401 echo "$as_me: failed program was:" >&5
19650fd6
AS
8402sed 's/^/| /' conftest.$ac_ext >&5
8403
98418dba
CW
8404ac_cv_func_malloc_set_state=no
8405fi
35996d22
AS
8406rm -f conftest.err conftest.$ac_objext \
8407 conftest$ac_exeext conftest.$ac_ext
98418dba 8408fi
c0d27fcc 8409echo "$as_me:$LINENO: result: $ac_cv_func_malloc_set_state" >&5
98418dba
CW
8410echo "${ECHO_T}$ac_cv_func_malloc_set_state" >&6
8411if test $ac_cv_func_malloc_set_state = yes; then
8412 :
8413else
8414 doug_lea_malloc=no
8415fi
8416
c0d27fcc 8417echo "$as_me:$LINENO: checking whether __after_morecore_hook exists" >&5
98418dba
CW
8418echo $ECHO_N "checking whether __after_morecore_hook exists... $ECHO_C" >&6
8419if test "${emacs_cv_var___after_morecore_hook+set}" = set; then
8420 echo $ECHO_N "(cached) $ECHO_C" >&6
8421else
8422 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8423/* confdefs.h. */
8424_ACEOF
8425cat confdefs.h >>conftest.$ac_ext
8426cat >>conftest.$ac_ext <<_ACEOF
8427/* end confdefs.h. */
98418dba 8428extern void (* __after_morecore_hook)();
98418dba
CW
8429int
8430main ()
8431{
8432__after_morecore_hook = 0
8433 ;
8434 return 0;
8435}
8436_ACEOF
8437rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8438if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 8439 (eval $ac_link) 2>conftest.er1
98418dba 8440 ac_status=$?
35996d22
AS
8441 grep -v '^ *+' conftest.er1 >conftest.err
8442 rm -f conftest.er1
8443 cat conftest.err >&5
c0d27fcc 8444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8445 (exit $ac_status); } &&
551ffc27
ST
8446 { ac_try='test -z "$ac_c_werror_flag"
8447 || test ! -s conftest.err'
35996d22
AS
8448 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8449 (eval $ac_try) 2>&5
8450 ac_status=$?
8451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8452 (exit $ac_status); }; } &&
8453 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8454 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8455 (eval $ac_try) 2>&5
8456 ac_status=$?
c0d27fcc 8457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8458 (exit $ac_status); }; }; then
8459 emacs_cv_var___after_morecore_hook=yes
8460else
8461 echo "$as_me: failed program was:" >&5
19650fd6
AS
8462sed 's/^/| /' conftest.$ac_ext >&5
8463
98418dba
CW
8464emacs_cv_var___after_morecore_hook=no
8465fi
35996d22
AS
8466rm -f conftest.err conftest.$ac_objext \
8467 conftest$ac_exeext conftest.$ac_ext
98418dba 8468fi
c0d27fcc 8469echo "$as_me:$LINENO: result: $emacs_cv_var___after_morecore_hook" >&5
98418dba
CW
8470echo "${ECHO_T}$emacs_cv_var___after_morecore_hook" >&6
8471if test $emacs_cv_var___after_morecore_hook = no; then
8472 doug_lea_malloc=no
8473fi
8474if test "${system_malloc}" = "yes"; then
8475 GNU_MALLOC=no
8476 GNU_MALLOC_reason="
8477 (The GNU allocators don't work with this system configuration.)"
8478fi
8479if test "$doug_lea_malloc" = "yes" ; then
8480 if test "$GNU_MALLOC" = yes ; then
8481 GNU_MALLOC_reason="
8482 (Using Doug Lea's new malloc from the GNU C Library.)"
8483 fi
b936fae4 8484
c0d27fcc 8485cat >>confdefs.h <<\_ACEOF
98418dba 8486#define DOUG_LEA_MALLOC 1
c0d27fcc 8487_ACEOF
98418dba
CW
8488
8489fi
8490
8491if test x"${REL_ALLOC}" = x; then
8492 REL_ALLOC=${GNU_MALLOC}
8493fi
8494
8495
c0d27fcc
MR
8496
8497
8498for ac_header in stdlib.h unistd.h
98418dba
CW
8499do
8500as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
8501if eval "test \"\${$as_ac_Header+set}\" = set"; then
8502 echo "$as_me:$LINENO: checking for $ac_header" >&5
98418dba
CW
8503echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8504if eval "test \"\${$as_ac_Header+set}\" = set"; then
8505 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
8506fi
8507echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8508echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 8509else
c0d27fcc
MR
8510 # Is the header compilable?
8511echo "$as_me:$LINENO: checking $ac_header usability" >&5
8512echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8513cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8514/* confdefs.h. */
8515_ACEOF
8516cat confdefs.h >>conftest.$ac_ext
8517cat >>conftest.$ac_ext <<_ACEOF
8518/* end confdefs.h. */
98418dba
CW
8519$ac_includes_default
8520#include <$ac_header>
8521_ACEOF
8522rm -f conftest.$ac_objext
c0d27fcc 8523if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 8524 (eval $ac_compile) 2>conftest.er1
98418dba 8525 ac_status=$?
35996d22
AS
8526 grep -v '^ *+' conftest.er1 >conftest.err
8527 rm -f conftest.er1
8528 cat conftest.err >&5
c0d27fcc 8529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8530 (exit $ac_status); } &&
551ffc27
ST
8531 { ac_try='test -z "$ac_c_werror_flag"
8532 || test ! -s conftest.err'
35996d22
AS
8533 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8534 (eval $ac_try) 2>&5
8535 ac_status=$?
8536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8537 (exit $ac_status); }; } &&
8538 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 8539 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8540 (eval $ac_try) 2>&5
8541 ac_status=$?
c0d27fcc 8542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8543 (exit $ac_status); }; }; then
c0d27fcc 8544 ac_header_compiler=yes
98418dba
CW
8545else
8546 echo "$as_me: failed program was:" >&5
19650fd6
AS
8547sed 's/^/| /' conftest.$ac_ext >&5
8548
c0d27fcc 8549ac_header_compiler=no
98418dba 8550fi
35996d22 8551rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
8552echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8553echo "${ECHO_T}$ac_header_compiler" >&6
98418dba 8554
c0d27fcc
MR
8555# Is the header present?
8556echo "$as_me:$LINENO: checking $ac_header presence" >&5
8557echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8558cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8559/* confdefs.h. */
8560_ACEOF
8561cat confdefs.h >>conftest.$ac_ext
8562cat >>conftest.$ac_ext <<_ACEOF
8563/* end confdefs.h. */
98418dba
CW
8564#include <$ac_header>
8565_ACEOF
c0d27fcc 8566if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
8567 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8568 ac_status=$?
6bae0ccf 8569 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
8570 rm -f conftest.er1
8571 cat conftest.err >&5
c0d27fcc 8572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8573 (exit $ac_status); } >/dev/null; then
8574 if test -s conftest.err; then
8575 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 8576 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
8577 else
8578 ac_cpp_err=
8579 fi
8580else
8581 ac_cpp_err=yes
8582fi
8583if test -z "$ac_cpp_err"; then
c0d27fcc 8584 ac_header_preproc=yes
98418dba
CW
8585else
8586 echo "$as_me: failed program was:" >&5
19650fd6
AS
8587sed 's/^/| /' conftest.$ac_ext >&5
8588
c0d27fcc 8589 ac_header_preproc=no
98418dba
CW
8590fi
8591rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
8592echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8593echo "${ECHO_T}$ac_header_preproc" >&6
8594
8595# So? What about this header?
35996d22
AS
8596case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8597 yes:no: )
c0d27fcc
MR
8598 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8599echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
8600 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8601echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8602 ac_header_preproc=yes
19650fd6 8603 ;;
35996d22 8604 no:yes:* )
c0d27fcc
MR
8605 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8606echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
8607 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
8608echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
8609 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8610echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8611 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
8612echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 8613 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 8614echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
8615 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8616echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
8617 (
8618 cat <<\_ASBOX
35996d22
AS
8619## ------------------------------------------ ##
8620## Report this to the AC_PACKAGE_NAME lists. ##
8621## ------------------------------------------ ##
19650fd6
AS
8622_ASBOX
8623 ) |
8624 sed "s/^/$as_me: WARNING: /" >&2
8625 ;;
c0d27fcc
MR
8626esac
8627echo "$as_me:$LINENO: checking for $ac_header" >&5
8628echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8629if eval "test \"\${$as_ac_Header+set}\" = set"; then
8630 echo $ECHO_N "(cached) $ECHO_C" >&6
8631else
35996d22 8632 eval "$as_ac_Header=\$ac_header_preproc"
98418dba 8633fi
c0d27fcc 8634echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 8635echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
8636
8637fi
98418dba 8638if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 8639 cat >>confdefs.h <<_ACEOF
98418dba 8640#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 8641_ACEOF
98418dba
CW
8642
8643fi
c0d27fcc 8644
98418dba
CW
8645done
8646
c0d27fcc 8647
98418dba
CW
8648for ac_func in getpagesize
8649do
8650as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 8651echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
8652echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8653if eval "test \"\${$as_ac_var+set}\" = set"; then
8654 echo $ECHO_N "(cached) $ECHO_C" >&6
8655else
8656 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8657/* confdefs.h. */
8658_ACEOF
8659cat confdefs.h >>conftest.$ac_ext
8660cat >>conftest.$ac_ext <<_ACEOF
8661/* end confdefs.h. */
35996d22
AS
8662/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
8663 For example, HP-UX 11i <limits.h> declares gettimeofday. */
8664#define $ac_func innocuous_$ac_func
8665
98418dba 8666/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
8667 which can conflict with char $ac_func (); below.
8668 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8669 <limits.h> exists even on freestanding compilers. */
35996d22 8670
19650fd6
AS
8671#ifdef __STDC__
8672# include <limits.h>
8673#else
8674# include <assert.h>
8675#endif
35996d22
AS
8676
8677#undef $ac_func
8678
98418dba
CW
8679/* Override any gcc2 internal prototype to avoid an error. */
8680#ifdef __cplusplus
8681extern "C"
19650fd6 8682{
98418dba
CW
8683#endif
8684/* We use char because int might match the return type of a gcc2
8685 builtin and then its argument prototype would still apply. */
8686char $ac_func ();
98418dba
CW
8687/* The GNU C library defines this for functions which it implements
8688 to always fail with ENOSYS. Some functions are actually named
8689 something starting with __ and the normal name is an alias. */
8690#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8691choke me
8692#else
19650fd6
AS
8693char (*f) () = $ac_func;
8694#endif
8695#ifdef __cplusplus
8696}
98418dba
CW
8697#endif
8698
19650fd6
AS
8699int
8700main ()
8701{
8702return f != $ac_func;
98418dba
CW
8703 ;
8704 return 0;
8705}
8706_ACEOF
8707rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8708if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 8709 (eval $ac_link) 2>conftest.er1
98418dba 8710 ac_status=$?
35996d22
AS
8711 grep -v '^ *+' conftest.er1 >conftest.err
8712 rm -f conftest.er1
8713 cat conftest.err >&5
c0d27fcc 8714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8715 (exit $ac_status); } &&
551ffc27
ST
8716 { ac_try='test -z "$ac_c_werror_flag"
8717 || test ! -s conftest.err'
35996d22
AS
8718 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8719 (eval $ac_try) 2>&5
8720 ac_status=$?
8721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8722 (exit $ac_status); }; } &&
8723 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8724 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8725 (eval $ac_try) 2>&5
8726 ac_status=$?
c0d27fcc 8727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8728 (exit $ac_status); }; }; then
8729 eval "$as_ac_var=yes"
8730else
8731 echo "$as_me: failed program was:" >&5
19650fd6
AS
8732sed 's/^/| /' conftest.$ac_ext >&5
8733
98418dba
CW
8734eval "$as_ac_var=no"
8735fi
35996d22
AS
8736rm -f conftest.err conftest.$ac_objext \
8737 conftest$ac_exeext conftest.$ac_ext
98418dba 8738fi
c0d27fcc 8739echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
8740echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8741if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 8742 cat >>confdefs.h <<_ACEOF
98418dba 8743#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 8744_ACEOF
98418dba
CW
8745
8746fi
8747done
8748
c0d27fcc 8749echo "$as_me:$LINENO: checking for working mmap" >&5
98418dba
CW
8750echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
8751if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
8752 echo $ECHO_N "(cached) $ECHO_C" >&6
8753else
8754 if test "$cross_compiling" = yes; then
8755 ac_cv_func_mmap_fixed_mapped=no
8756else
8757 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8758/* confdefs.h. */
8759_ACEOF
8760cat confdefs.h >>conftest.$ac_ext
8761cat >>conftest.$ac_ext <<_ACEOF
8762/* end confdefs.h. */
98418dba 8763$ac_includes_default
c0d27fcc
MR
8764/* malloc might have been renamed as rpl_malloc. */
8765#undef malloc
8766
98418dba
CW
8767/* Thanks to Mike Haertel and Jim Avera for this test.
8768 Here is a matrix of mmap possibilities:
8769 mmap private not fixed
8770 mmap private fixed at somewhere currently unmapped
8771 mmap private fixed at somewhere already mapped
8772 mmap shared not fixed
8773 mmap shared fixed at somewhere currently unmapped
8774 mmap shared fixed at somewhere already mapped
8775 For private mappings, we should verify that changes cannot be read()
8776 back from the file, nor mmap's back from the file at a different
8777 address. (There have been systems where private was not correctly
8778 implemented like the infamous i386 svr4.0, and systems where the
8779 VM page cache was not coherent with the file system buffer cache
8780 like early versions of FreeBSD and possibly contemporary NetBSD.)
8781 For shared mappings, we should conversely verify that changes get
c0d27fcc 8782 propagated back to all the places they're supposed to be.
98418dba
CW
8783
8784 Grep wants private fixed already mapped.
8785 The main things grep needs to know about mmap are:
8786 * does it exist and is it safe to write into the mmap'd area
8787 * how to use it (BSD variants) */
8788
8789#include <fcntl.h>
8790#include <sys/mman.h>
8791
8792#if !STDC_HEADERS && !HAVE_STDLIB_H
8793char *malloc ();
8794#endif
8795
8796/* This mess was copied from the GNU getpagesize.h. */
8797#if !HAVE_GETPAGESIZE
8798/* Assume that all systems that can run configure have sys/param.h. */
8799# if !HAVE_SYS_PARAM_H
8800# define HAVE_SYS_PARAM_H 1
8801# endif
8802
8803# ifdef _SC_PAGESIZE
8804# define getpagesize() sysconf(_SC_PAGESIZE)
8805# else /* no _SC_PAGESIZE */
8806# if HAVE_SYS_PARAM_H
8807# include <sys/param.h>
8808# ifdef EXEC_PAGESIZE
8809# define getpagesize() EXEC_PAGESIZE
8810# else /* no EXEC_PAGESIZE */
8811# ifdef NBPG
8812# define getpagesize() NBPG * CLSIZE
8813# ifndef CLSIZE
8814# define CLSIZE 1
8815# endif /* no CLSIZE */
8816# else /* no NBPG */
8817# ifdef NBPC
8818# define getpagesize() NBPC
8819# else /* no NBPC */
8820# ifdef PAGESIZE
8821# define getpagesize() PAGESIZE
8822# endif /* PAGESIZE */
8823# endif /* no NBPC */
8824# endif /* no NBPG */
8825# endif /* no EXEC_PAGESIZE */
8826# else /* no HAVE_SYS_PARAM_H */
8827# define getpagesize() 8192 /* punt totally */
8828# endif /* no HAVE_SYS_PARAM_H */
8829# endif /* no _SC_PAGESIZE */
8830
8831#endif /* no HAVE_GETPAGESIZE */
8832
8833int
8834main ()
8835{
8836 char *data, *data2, *data3;
8837 int i, pagesize;
8838 int fd;
8839
8840 pagesize = getpagesize ();
8841
8842 /* First, make a file with some known garbage in it. */
8843 data = (char *) malloc (pagesize);
8844 if (!data)
8845 exit (1);
8846 for (i = 0; i < pagesize; ++i)
8847 *(data + i) = rand ();
8848 umask (0);
8849 fd = creat ("conftest.mmap", 0600);
8850 if (fd < 0)
8851 exit (1);
8852 if (write (fd, data, pagesize) != pagesize)
8853 exit (1);
8854 close (fd);
8855
8856 /* Next, try to mmap the file at a fixed address which already has
8857 something else allocated at it. If we can, also make sure that
8858 we see the same garbage. */
8859 fd = open ("conftest.mmap", O_RDWR);
8860 if (fd < 0)
8861 exit (1);
8862 data2 = (char *) malloc (2 * pagesize);
8863 if (!data2)
8864 exit (1);
35996d22 8865 data2 += (pagesize - ((long) data2 & (pagesize - 1))) & (pagesize - 1);
98418dba 8866 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
35996d22 8867 MAP_PRIVATE | MAP_FIXED, fd, 0L))
98418dba
CW
8868 exit (1);
8869 for (i = 0; i < pagesize; ++i)
8870 if (*(data + i) != *(data2 + i))
8871 exit (1);
8872
8873 /* Finally, make sure that changes to the mapped area do not
8874 percolate back to the file as seen by read(). (This is a bug on
8875 some variants of i386 svr4.0.) */
8876 for (i = 0; i < pagesize; ++i)
8877 *(data2 + i) = *(data2 + i) + 1;
8878 data3 = (char *) malloc (pagesize);
8879 if (!data3)
8880 exit (1);
8881 if (read (fd, data3, pagesize) != pagesize)
8882 exit (1);
8883 for (i = 0; i < pagesize; ++i)
8884 if (*(data + i) != *(data3 + i))
8885 exit (1);
8886 close (fd);
8887 exit (0);
8888}
8889_ACEOF
8890rm -f conftest$ac_exeext
c0d27fcc 8891if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
98418dba
CW
8892 (eval $ac_link) 2>&5
8893 ac_status=$?
c0d27fcc 8894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8895 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 8896 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8897 (eval $ac_try) 2>&5
8898 ac_status=$?
c0d27fcc 8899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8900 (exit $ac_status); }; }; then
8901 ac_cv_func_mmap_fixed_mapped=yes
8902else
8903 echo "$as_me: program exited with status $ac_status" >&5
8904echo "$as_me: failed program was:" >&5
19650fd6
AS
8905sed 's/^/| /' conftest.$ac_ext >&5
8906
c0d27fcc 8907( exit $ac_status )
98418dba
CW
8908ac_cv_func_mmap_fixed_mapped=no
8909fi
35996d22 8910rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
98418dba
CW
8911fi
8912fi
c0d27fcc 8913echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
98418dba
CW
8914echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
8915if test $ac_cv_func_mmap_fixed_mapped = yes; then
8916
c0d27fcc 8917cat >>confdefs.h <<\_ACEOF
98418dba 8918#define HAVE_MMAP 1
c0d27fcc 8919_ACEOF
98418dba
CW
8920
8921fi
8922rm -f conftest.mmap
8923
8924if test $use_mmap_for_buffers = yes; then
8925 REL_ALLOC=no
8926fi
8927
8928LIBS="$libsrc_libs $LIBS"
8929
c0d27fcc
MR
8930
8931echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
98418dba
CW
8932echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
8933if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
8934 echo $ECHO_N "(cached) $ECHO_C" >&6
8935else
8936 ac_check_lib_save_LIBS=$LIBS
8937LIBS="-ldnet $LIBS"
8938cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8939/* confdefs.h. */
8940_ACEOF
8941cat confdefs.h >>conftest.$ac_ext
8942cat >>conftest.$ac_ext <<_ACEOF
8943/* end confdefs.h. */
98418dba
CW
8944
8945/* Override any gcc2 internal prototype to avoid an error. */
8946#ifdef __cplusplus
8947extern "C"
8948#endif
8949/* We use char because int might match the return type of a gcc2
8950 builtin and then its argument prototype would still apply. */
8951char dnet_ntoa ();
98418dba
CW
8952int
8953main ()
8954{
8955dnet_ntoa ();
8956 ;
8957 return 0;
8958}
8959_ACEOF
8960rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 8961if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 8962 (eval $ac_link) 2>conftest.er1
98418dba 8963 ac_status=$?
35996d22
AS
8964 grep -v '^ *+' conftest.er1 >conftest.err
8965 rm -f conftest.er1
8966 cat conftest.err >&5
c0d27fcc 8967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 8968 (exit $ac_status); } &&
551ffc27
ST
8969 { ac_try='test -z "$ac_c_werror_flag"
8970 || test ! -s conftest.err'
35996d22
AS
8971 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8972 (eval $ac_try) 2>&5
8973 ac_status=$?
8974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8975 (exit $ac_status); }; } &&
8976 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 8977 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
8978 (eval $ac_try) 2>&5
8979 ac_status=$?
c0d27fcc 8980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
8981 (exit $ac_status); }; }; then
8982 ac_cv_lib_dnet_dnet_ntoa=yes
8983else
8984 echo "$as_me: failed program was:" >&5
19650fd6
AS
8985sed 's/^/| /' conftest.$ac_ext >&5
8986
98418dba
CW
8987ac_cv_lib_dnet_dnet_ntoa=no
8988fi
35996d22
AS
8989rm -f conftest.err conftest.$ac_objext \
8990 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
8991LIBS=$ac_check_lib_save_LIBS
8992fi
c0d27fcc 8993echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
98418dba
CW
8994echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
8995if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
c0d27fcc 8996 cat >>confdefs.h <<_ACEOF
98418dba 8997#define HAVE_LIBDNET 1
c0d27fcc 8998_ACEOF
98418dba
CW
8999
9000 LIBS="-ldnet $LIBS"
9001
9002fi
9003
c0d27fcc
MR
9004
9005echo "$as_me:$LINENO: checking for main in -lXbsd" >&5
98418dba
CW
9006echo $ECHO_N "checking for main in -lXbsd... $ECHO_C" >&6
9007if test "${ac_cv_lib_Xbsd_main+set}" = set; then
9008 echo $ECHO_N "(cached) $ECHO_C" >&6
9009else
9010 ac_check_lib_save_LIBS=$LIBS
9011LIBS="-lXbsd $LIBS"
9012cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9013/* confdefs.h. */
9014_ACEOF
9015cat confdefs.h >>conftest.$ac_ext
9016cat >>conftest.$ac_ext <<_ACEOF
9017/* end confdefs.h. */
98418dba 9018
c0d27fcc 9019
98418dba
CW
9020int
9021main ()
9022{
9023main ();
9024 ;
9025 return 0;
9026}
9027_ACEOF
9028rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9029if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 9030 (eval $ac_link) 2>conftest.er1
98418dba 9031 ac_status=$?
35996d22
AS
9032 grep -v '^ *+' conftest.er1 >conftest.err
9033 rm -f conftest.er1
9034 cat conftest.err >&5
c0d27fcc 9035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9036 (exit $ac_status); } &&
551ffc27
ST
9037 { ac_try='test -z "$ac_c_werror_flag"
9038 || test ! -s conftest.err'
35996d22
AS
9039 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9040 (eval $ac_try) 2>&5
9041 ac_status=$?
9042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9043 (exit $ac_status); }; } &&
9044 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9045 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9046 (eval $ac_try) 2>&5
9047 ac_status=$?
c0d27fcc 9048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9049 (exit $ac_status); }; }; then
9050 ac_cv_lib_Xbsd_main=yes
9051else
9052 echo "$as_me: failed program was:" >&5
19650fd6
AS
9053sed 's/^/| /' conftest.$ac_ext >&5
9054
98418dba
CW
9055ac_cv_lib_Xbsd_main=no
9056fi
35996d22
AS
9057rm -f conftest.err conftest.$ac_objext \
9058 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9059LIBS=$ac_check_lib_save_LIBS
9060fi
c0d27fcc 9061echo "$as_me:$LINENO: result: $ac_cv_lib_Xbsd_main" >&5
98418dba
CW
9062echo "${ECHO_T}$ac_cv_lib_Xbsd_main" >&6
9063if test $ac_cv_lib_Xbsd_main = yes; then
9064 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
9065fi
9066
c0d27fcc
MR
9067
9068
9069echo "$as_me:$LINENO: checking for cma_open in -lpthreads" >&5
98418dba
CW
9070echo $ECHO_N "checking for cma_open in -lpthreads... $ECHO_C" >&6
9071if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then
9072 echo $ECHO_N "(cached) $ECHO_C" >&6
9073else
9074 ac_check_lib_save_LIBS=$LIBS
9075LIBS="-lpthreads $LIBS"
9076cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9077/* confdefs.h. */
9078_ACEOF
9079cat confdefs.h >>conftest.$ac_ext
9080cat >>conftest.$ac_ext <<_ACEOF
9081/* end confdefs.h. */
98418dba
CW
9082
9083/* Override any gcc2 internal prototype to avoid an error. */
9084#ifdef __cplusplus
9085extern "C"
9086#endif
9087/* We use char because int might match the return type of a gcc2
9088 builtin and then its argument prototype would still apply. */
9089char cma_open ();
98418dba
CW
9090int
9091main ()
9092{
9093cma_open ();
9094 ;
9095 return 0;
9096}
9097_ACEOF
9098rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9099if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 9100 (eval $ac_link) 2>conftest.er1
98418dba 9101 ac_status=$?
35996d22
AS
9102 grep -v '^ *+' conftest.er1 >conftest.err
9103 rm -f conftest.er1
9104 cat conftest.err >&5
c0d27fcc 9105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9106 (exit $ac_status); } &&
551ffc27
ST
9107 { ac_try='test -z "$ac_c_werror_flag"
9108 || test ! -s conftest.err'
35996d22
AS
9109 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9110 (eval $ac_try) 2>&5
9111 ac_status=$?
9112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9113 (exit $ac_status); }; } &&
9114 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9115 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9116 (eval $ac_try) 2>&5
9117 ac_status=$?
c0d27fcc 9118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9119 (exit $ac_status); }; }; then
9120 ac_cv_lib_pthreads_cma_open=yes
9121else
9122 echo "$as_me: failed program was:" >&5
19650fd6
AS
9123sed 's/^/| /' conftest.$ac_ext >&5
9124
98418dba
CW
9125ac_cv_lib_pthreads_cma_open=no
9126fi
35996d22
AS
9127rm -f conftest.err conftest.$ac_objext \
9128 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9129LIBS=$ac_check_lib_save_LIBS
9130fi
c0d27fcc 9131echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_cma_open" >&5
98418dba
CW
9132echo "${ECHO_T}$ac_cv_lib_pthreads_cma_open" >&6
9133if test $ac_cv_lib_pthreads_cma_open = yes; then
c0d27fcc 9134 cat >>confdefs.h <<_ACEOF
98418dba 9135#define HAVE_LIBPTHREADS 1
c0d27fcc 9136_ACEOF
98418dba
CW
9137
9138 LIBS="-lpthreads $LIBS"
9139
9140fi
9141
c0d27fcc
MR
9142
9143echo "$as_me:$LINENO: checking for XFree86 in /usr/X386" >&5
98418dba
CW
9144echo $ECHO_N "checking for XFree86 in /usr/X386... $ECHO_C" >&6
9145if test -d /usr/X386/include; then
9146 HAVE_XFREE386=yes
9147 : ${C_SWITCH_X_SITE="-I/usr/X386/include"}
9148else
9149 HAVE_XFREE386=no
9150fi
c0d27fcc 9151echo "$as_me:$LINENO: result: $HAVE_XFREE386" >&5
98418dba
CW
9152echo "${ECHO_T}$HAVE_XFREE386" >&6
9153
55597d70
DL
9154
9155case ${host_os} in
9156aix*)
9157 echo "$as_me:$LINENO: checking for -bbigtoc option" >&5
9158echo $ECHO_N "checking for -bbigtoc option... $ECHO_C" >&6
9159if test "${gdb_cv_bigtoc+set}" = set; then
9160 echo $ECHO_N "(cached) $ECHO_C" >&6
9161else
9162
9163 case $GCC in
9164 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
9165 *) gdb_cv_bigtoc=-bbigtoc ;;
9166 esac
9167
9168 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
9169 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9170/* confdefs.h. */
9171_ACEOF
9172cat confdefs.h >>conftest.$ac_ext
9173cat >>conftest.$ac_ext <<_ACEOF
9174/* end confdefs.h. */
55597d70
DL
9175
9176int
9177main ()
9178{
9179int i;
9180 ;
9181 return 0;
9182}
9183_ACEOF
9184rm -f conftest.$ac_objext conftest$ac_exeext
9185if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 9186 (eval $ac_link) 2>conftest.er1
55597d70 9187 ac_status=$?
35996d22
AS
9188 grep -v '^ *+' conftest.er1 >conftest.err
9189 rm -f conftest.er1
9190 cat conftest.err >&5
55597d70
DL
9191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9192 (exit $ac_status); } &&
551ffc27
ST
9193 { ac_try='test -z "$ac_c_werror_flag"
9194 || test ! -s conftest.err'
35996d22
AS
9195 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9196 (eval $ac_try) 2>&5
9197 ac_status=$?
9198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9199 (exit $ac_status); }; } &&
9200 { ac_try='test -s conftest$ac_exeext'
55597d70
DL
9201 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9202 (eval $ac_try) 2>&5
9203 ac_status=$?
9204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9205 (exit $ac_status); }; }; then
9206 :
9207else
9208 echo "$as_me: failed program was:" >&5
19650fd6
AS
9209sed 's/^/| /' conftest.$ac_ext >&5
9210
55597d70
DL
9211gdb_cv_bigtoc=
9212fi
35996d22
AS
9213rm -f conftest.err conftest.$ac_objext \
9214 conftest$ac_exeext conftest.$ac_ext
55597d70
DL
9215
9216fi
9217echo "$as_me:$LINENO: result: $gdb_cv_bigtoc" >&5
9218echo "${ECHO_T}$gdb_cv_bigtoc" >&6
9219 ;;
9220esac
9221
ae1a998c
RS
9222# Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets
9223# used for the tests that follow. We set them back to REAL_CFLAGS and
9224# REAL_CPPFLAGS later on.
98418dba
CW
9225
9226REAL_CPPFLAGS="$CPPFLAGS"
9227
9228if test "${HAVE_X11}" = "yes"; then
9229 DEFS="$C_SWITCH_X_SITE $DEFS"
9230 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
9231 LIBS="$LIBX $LIBS"
9232 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
9233 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
9234
9235 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
9236 # This is handled by LD_SWITCH_X_SITE_AUX during the real build,
9237 # but it's more convenient here to set LD_RUN_PATH
9238 # since this also works on hosts that don't understand LD_SWITCH_X_SITE_AUX.
9239 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
9240 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
9241 export LD_RUN_PATH
9242 fi
9243
9244 if test "${opsys}" = "gnu-linux"; then
c0d27fcc 9245 echo "$as_me:$LINENO: checking whether X on GNU/Linux needs -b to link" >&5
98418dba
CW
9246echo $ECHO_N "checking whether X on GNU/Linux needs -b to link... $ECHO_C" >&6
9247 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9248/* confdefs.h. */
9249_ACEOF
9250cat confdefs.h >>conftest.$ac_ext
9251cat >>conftest.$ac_ext <<_ACEOF
9252/* end confdefs.h. */
98418dba 9253
98418dba
CW
9254int
9255main ()
9256{
9257XOpenDisplay ("foo");
9258 ;
9259 return 0;
9260}
9261_ACEOF
9262rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9263if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 9264 (eval $ac_link) 2>conftest.er1
98418dba 9265 ac_status=$?
35996d22
AS
9266 grep -v '^ *+' conftest.er1 >conftest.err
9267 rm -f conftest.er1
9268 cat conftest.err >&5
c0d27fcc 9269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9270 (exit $ac_status); } &&
551ffc27
ST
9271 { ac_try='test -z "$ac_c_werror_flag"
9272 || test ! -s conftest.err'
c0d27fcc 9273 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9274 (eval $ac_try) 2>&5
9275 ac_status=$?
c0d27fcc 9276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
35996d22
AS
9277 (exit $ac_status); }; } &&
9278 { ac_try='test -s conftest$ac_exeext'
9279 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9280 (eval $ac_try) 2>&5
9281 ac_status=$?
9282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9283 (exit $ac_status); }; }; then
9284 xlinux_first_failure=no
98418dba
CW
9285else
9286 echo "$as_me: failed program was:" >&5
19650fd6
AS
9287sed 's/^/| /' conftest.$ac_ext >&5
9288
98418dba
CW
9289xlinux_first_failure=yes
9290fi
35996d22
AS
9291rm -f conftest.err conftest.$ac_objext \
9292 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9293 if test "${xlinux_first_failure}" = "yes"; then
9294 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
9295 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
9296 OLD_CPPFLAGS="$CPPFLAGS"
9297 OLD_LIBS="$LIBS"
9298 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
9299 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
9300 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
9301 LIBS="$LIBS -b i486-linuxaout"
9302 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9303/* confdefs.h. */
9304_ACEOF
9305cat confdefs.h >>conftest.$ac_ext
9306cat >>conftest.$ac_ext <<_ACEOF
9307/* end confdefs.h. */
98418dba 9308
98418dba
CW
9309int
9310main ()
9311{
9312XOpenDisplay ("foo");
9313 ;
9314 return 0;
9315}
9316_ACEOF
9317rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9318if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 9319 (eval $ac_link) 2>conftest.er1
98418dba 9320 ac_status=$?
35996d22
AS
9321 grep -v '^ *+' conftest.er1 >conftest.err
9322 rm -f conftest.er1
9323 cat conftest.err >&5
c0d27fcc 9324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9325 (exit $ac_status); } &&
551ffc27
ST
9326 { ac_try='test -z "$ac_c_werror_flag"
9327 || test ! -s conftest.err'
35996d22
AS
9328 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9329 (eval $ac_try) 2>&5
9330 ac_status=$?
9331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9332 (exit $ac_status); }; } &&
9333 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9334 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9335 (eval $ac_try) 2>&5
9336 ac_status=$?
c0d27fcc 9337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9338 (exit $ac_status); }; }; then
9339 xlinux_second_failure=no
9340else
9341 echo "$as_me: failed program was:" >&5
19650fd6
AS
9342sed 's/^/| /' conftest.$ac_ext >&5
9343
98418dba
CW
9344xlinux_second_failure=yes
9345fi
35996d22
AS
9346rm -f conftest.err conftest.$ac_objext \
9347 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9348 if test "${xlinux_second_failure}" = "yes"; then
9349 # If we get the same failure with -b, there is no use adding -b.
9350 # So take it out. This plays safe.
9351 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
9352 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
9353 CPPFLAGS="$OLD_CPPFLAGS"
9354 LIBS="$OLD_LIBS"
c0d27fcc 9355 echo "$as_me:$LINENO: result: no" >&5
98418dba
CW
9356echo "${ECHO_T}no" >&6
9357 else
c0d27fcc 9358 echo "$as_me:$LINENO: result: yes" >&5
98418dba
CW
9359echo "${ECHO_T}yes" >&6
9360 fi
9361 else
c0d27fcc 9362 echo "$as_me:$LINENO: result: no" >&5
98418dba
CW
9363echo "${ECHO_T}no" >&6
9364 fi
9365 fi
9366
9367 # Reportedly, some broken Solaris systems have XKBlib.h but are missing
9368 # header files included from there.
c0d27fcc 9369 echo "$as_me:$LINENO: checking for Xkb" >&5
98418dba
CW
9370echo $ECHO_N "checking for Xkb... $ECHO_C" >&6
9371 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9372/* confdefs.h. */
9373_ACEOF
9374cat confdefs.h >>conftest.$ac_ext
9375cat >>conftest.$ac_ext <<_ACEOF
9376/* end confdefs.h. */
98418dba
CW
9377#include <X11/Xlib.h>
9378#include <X11/XKBlib.h>
98418dba
CW
9379int
9380main ()
9381{
9382XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);
9383 ;
9384 return 0;
9385}
9386_ACEOF
9387rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9388if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 9389 (eval $ac_link) 2>conftest.er1
98418dba 9390 ac_status=$?
35996d22
AS
9391 grep -v '^ *+' conftest.er1 >conftest.err
9392 rm -f conftest.er1
9393 cat conftest.err >&5
c0d27fcc 9394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9395 (exit $ac_status); } &&
551ffc27
ST
9396 { ac_try='test -z "$ac_c_werror_flag"
9397 || test ! -s conftest.err'
35996d22
AS
9398 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9399 (eval $ac_try) 2>&5
9400 ac_status=$?
9401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9402 (exit $ac_status); }; } &&
9403 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9404 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9405 (eval $ac_try) 2>&5
9406 ac_status=$?
c0d27fcc 9407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9408 (exit $ac_status); }; }; then
9409 emacs_xkb=yes
9410else
9411 echo "$as_me: failed program was:" >&5
19650fd6
AS
9412sed 's/^/| /' conftest.$ac_ext >&5
9413
98418dba
CW
9414emacs_xkb=no
9415fi
35996d22
AS
9416rm -f conftest.err conftest.$ac_objext \
9417 conftest$ac_exeext conftest.$ac_ext
c0d27fcc 9418 echo "$as_me:$LINENO: result: $emacs_xkb" >&5
98418dba
CW
9419echo "${ECHO_T}$emacs_xkb" >&6
9420 if test $emacs_xkb = yes; then
b936fae4 9421
c0d27fcc 9422cat >>confdefs.h <<\_ACEOF
98418dba 9423#define HAVE_XKBGETKEYBOARD 1
c0d27fcc 9424_ACEOF
98418dba
CW
9425
9426 fi
9427
c0d27fcc
MR
9428
9429
9430
9431
98418dba
CW
9432for ac_func in XrmSetDatabase XScreenResourceString \
9433XScreenNumberOfScreen XSetWMProtocols
9434do
9435as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 9436echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
9437echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9438if eval "test \"\${$as_ac_var+set}\" = set"; then
9439 echo $ECHO_N "(cached) $ECHO_C" >&6
9440else
9441 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9442/* confdefs.h. */
9443_ACEOF
9444cat confdefs.h >>conftest.$ac_ext
9445cat >>conftest.$ac_ext <<_ACEOF
9446/* end confdefs.h. */
35996d22
AS
9447/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9448 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9449#define $ac_func innocuous_$ac_func
9450
98418dba 9451/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
9452 which can conflict with char $ac_func (); below.
9453 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9454 <limits.h> exists even on freestanding compilers. */
35996d22 9455
19650fd6
AS
9456#ifdef __STDC__
9457# include <limits.h>
9458#else
9459# include <assert.h>
9460#endif
35996d22
AS
9461
9462#undef $ac_func
9463
98418dba
CW
9464/* Override any gcc2 internal prototype to avoid an error. */
9465#ifdef __cplusplus
9466extern "C"
19650fd6 9467{
98418dba
CW
9468#endif
9469/* We use char because int might match the return type of a gcc2
9470 builtin and then its argument prototype would still apply. */
9471char $ac_func ();
98418dba
CW
9472/* The GNU C library defines this for functions which it implements
9473 to always fail with ENOSYS. Some functions are actually named
9474 something starting with __ and the normal name is an alias. */
9475#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9476choke me
9477#else
19650fd6
AS
9478char (*f) () = $ac_func;
9479#endif
9480#ifdef __cplusplus
9481}
98418dba
CW
9482#endif
9483
19650fd6
AS
9484int
9485main ()
9486{
9487return f != $ac_func;
98418dba
CW
9488 ;
9489 return 0;
9490}
9491_ACEOF
9492rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9493if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 9494 (eval $ac_link) 2>conftest.er1
98418dba 9495 ac_status=$?
35996d22
AS
9496 grep -v '^ *+' conftest.er1 >conftest.err
9497 rm -f conftest.er1
9498 cat conftest.err >&5
c0d27fcc 9499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9500 (exit $ac_status); } &&
551ffc27
ST
9501 { ac_try='test -z "$ac_c_werror_flag"
9502 || test ! -s conftest.err'
35996d22
AS
9503 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9504 (eval $ac_try) 2>&5
9505 ac_status=$?
9506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9507 (exit $ac_status); }; } &&
9508 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9509 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9510 (eval $ac_try) 2>&5
9511 ac_status=$?
c0d27fcc 9512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9513 (exit $ac_status); }; }; then
9514 eval "$as_ac_var=yes"
9515else
9516 echo "$as_me: failed program was:" >&5
19650fd6
AS
9517sed 's/^/| /' conftest.$ac_ext >&5
9518
98418dba
CW
9519eval "$as_ac_var=no"
9520fi
35996d22
AS
9521rm -f conftest.err conftest.$ac_objext \
9522 conftest$ac_exeext conftest.$ac_ext
98418dba 9523fi
c0d27fcc 9524echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
9525echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9526if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 9527 cat >>confdefs.h <<_ACEOF
98418dba 9528#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 9529_ACEOF
98418dba
CW
9530
9531fi
9532done
9533
9534fi
9535
9536if test "${window_system}" = "x11"; then
c0d27fcc 9537 echo "$as_me:$LINENO: checking X11 version 6" >&5
98418dba
CW
9538echo $ECHO_N "checking X11 version 6... $ECHO_C" >&6
9539 if test "${emacs_cv_x11_version_6+set}" = set; then
9540 echo $ECHO_N "(cached) $ECHO_C" >&6
9541else
9542 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9543/* confdefs.h. */
9544_ACEOF
9545cat confdefs.h >>conftest.$ac_ext
9546cat >>conftest.$ac_ext <<_ACEOF
9547/* end confdefs.h. */
98418dba 9548#include <X11/Xlib.h>
98418dba
CW
9549int
9550main ()
9551{
9552#if XlibSpecificationRelease < 6
9553fail;
9554#endif
9555
9556 ;
9557 return 0;
9558}
9559_ACEOF
9560rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9561if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 9562 (eval $ac_link) 2>conftest.er1
98418dba 9563 ac_status=$?
35996d22
AS
9564 grep -v '^ *+' conftest.er1 >conftest.err
9565 rm -f conftest.er1
9566 cat conftest.err >&5
c0d27fcc 9567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9568 (exit $ac_status); } &&
551ffc27
ST
9569 { ac_try='test -z "$ac_c_werror_flag"
9570 || test ! -s conftest.err'
35996d22
AS
9571 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9572 (eval $ac_try) 2>&5
9573 ac_status=$?
9574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9575 (exit $ac_status); }; } &&
9576 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9577 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9578 (eval $ac_try) 2>&5
9579 ac_status=$?
c0d27fcc 9580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9581 (exit $ac_status); }; }; then
9582 emacs_cv_x11_version_6=yes
9583else
9584 echo "$as_me: failed program was:" >&5
19650fd6
AS
9585sed 's/^/| /' conftest.$ac_ext >&5
9586
98418dba
CW
9587emacs_cv_x11_version_6=no
9588fi
35996d22
AS
9589rm -f conftest.err conftest.$ac_objext \
9590 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9591fi
9592
9593 if test $emacs_cv_x11_version_6 = yes; then
c0d27fcc 9594 echo "$as_me:$LINENO: result: 6 or newer" >&5
98418dba 9595echo "${ECHO_T}6 or newer" >&6
b936fae4 9596
c0d27fcc 9597cat >>confdefs.h <<\_ACEOF
98418dba 9598#define HAVE_X11R6 1
c0d27fcc 9599_ACEOF
98418dba
CW
9600
9601 else
c0d27fcc 9602 echo "$as_me:$LINENO: result: before 6" >&5
98418dba
CW
9603echo "${ECHO_T}before 6" >&6
9604 fi
9605fi
9606
9607if test "${window_system}" = "x11"; then
c0d27fcc 9608 echo "$as_me:$LINENO: checking X11 version 5" >&5
98418dba
CW
9609echo $ECHO_N "checking X11 version 5... $ECHO_C" >&6
9610 if test "${emacs_cv_x11_version_5+set}" = set; then
9611 echo $ECHO_N "(cached) $ECHO_C" >&6
9612else
9613 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9614/* confdefs.h. */
9615_ACEOF
9616cat confdefs.h >>conftest.$ac_ext
9617cat >>conftest.$ac_ext <<_ACEOF
9618/* end confdefs.h. */
98418dba 9619#include <X11/Xlib.h>
98418dba
CW
9620int
9621main ()
9622{
9623#if XlibSpecificationRelease < 5
9624fail;
9625#endif
9626
9627 ;
9628 return 0;
9629}
9630_ACEOF
9631rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 9632if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 9633 (eval $ac_link) 2>conftest.er1
98418dba 9634 ac_status=$?
35996d22
AS
9635 grep -v '^ *+' conftest.er1 >conftest.err
9636 rm -f conftest.er1
9637 cat conftest.err >&5
c0d27fcc 9638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9639 (exit $ac_status); } &&
551ffc27
ST
9640 { ac_try='test -z "$ac_c_werror_flag"
9641 || test ! -s conftest.err'
35996d22
AS
9642 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9643 (eval $ac_try) 2>&5
9644 ac_status=$?
9645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9646 (exit $ac_status); }; } &&
9647 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 9648 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
9649 (eval $ac_try) 2>&5
9650 ac_status=$?
c0d27fcc 9651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9652 (exit $ac_status); }; }; then
9653 emacs_cv_x11_version_5=yes
9654else
9655 echo "$as_me: failed program was:" >&5
19650fd6
AS
9656sed 's/^/| /' conftest.$ac_ext >&5
9657
98418dba
CW
9658emacs_cv_x11_version_5=no
9659fi
35996d22
AS
9660rm -f conftest.err conftest.$ac_objext \
9661 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9662fi
9663
9664 if test $emacs_cv_x11_version_5 = yes; then
c0d27fcc 9665 echo "$as_me:$LINENO: result: 5 or newer" >&5
98418dba
CW
9666echo "${ECHO_T}5 or newer" >&6
9667 HAVE_X11R5=yes
b936fae4 9668
c0d27fcc 9669cat >>confdefs.h <<\_ACEOF
98418dba 9670#define HAVE_X11R5 1
c0d27fcc 9671_ACEOF
98418dba
CW
9672
9673 else
9674 HAVE_X11R5=no
c0d27fcc 9675 echo "$as_me:$LINENO: result: before 5" >&5
98418dba
CW
9676echo "${ECHO_T}before 5" >&6
9677 fi
9678fi
9679
488dd4c4
JD
9680
9681
9682HAVE_GTK=no
9683if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "gtk"; then
cd890796 9684 if test "$USE_X_TOOLKIT" != "none" && test "$USE_X_TOOLKIT" != "maybe"; then
488dd4c4
JD
9685 { { echo "$as_me:$LINENO: error: Conflicting options, --with-gtk is incompatible with --with-x-toolkit=${with_x_toolkit}" >&5
9686echo "$as_me: error: Conflicting options, --with-gtk is incompatible with --with-x-toolkit=${with_x_toolkit}" >&2;}
9687 { (exit 1); exit 1; }; };
9688 fi
9689 GLIB_REQUIRED=2.0.1
e512ece1 9690 GTK_REQUIRED=2.0.1
488dd4c4
JD
9691 GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
9692
9693 if test "X${with_pkg_config_prog}" != X; then
9694 PKG_CONFIG="${with_pkg_config_prog}"
9695 fi
9696
9697 succeeded=no
9698
9699 if test -z "$PKG_CONFIG"; then
9700 # Extract the first word of "pkg-config", so it can be a program name with args.
9701set dummy pkg-config; ac_word=$2
9702echo "$as_me:$LINENO: checking for $ac_word" >&5
9703echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9704if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
9705 echo $ECHO_N "(cached) $ECHO_C" >&6
9706else
9707 case $PKG_CONFIG in
9708 [\\/]* | ?:[\\/]*)
9709 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9710 ;;
9711 *)
9712 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9713for as_dir in $PATH
9714do
9715 IFS=$as_save_IFS
9716 test -z "$as_dir" && as_dir=.
9717 for ac_exec_ext in '' $ac_executable_extensions; do
9718 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9719 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9720 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9721 break 2
9722 fi
9723done
9724done
9725
9726 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
9727 ;;
9728esac
9729fi
9730PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9731
9732if test -n "$PKG_CONFIG"; then
9733 echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
9734echo "${ECHO_T}$PKG_CONFIG" >&6
9735else
9736 echo "$as_me:$LINENO: result: no" >&5
9737echo "${ECHO_T}no" >&6
9738fi
9739
9740 fi
9741
9742 if test "$PKG_CONFIG" = "no" ; then
9743 echo "*** The pkg-config script could not be found. Make sure it is"
9744 echo "*** in your path, or give the full path to pkg-config with"
9745 echo "*** the PKG_CONFIG environment variable or --with-pkg-config-prog."
9746 echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
9747 else
9748 PKG_CONFIG_MIN_VERSION=0.9.0
9749 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
9750 echo "$as_me:$LINENO: checking for $GTK_MODULES" >&5
9751echo $ECHO_N "checking for $GTK_MODULES... $ECHO_C" >&6
9752
9753 if $PKG_CONFIG --exists "$GTK_MODULES" ; then
9754 echo "$as_me:$LINENO: result: yes" >&5
9755echo "${ECHO_T}yes" >&6
9756 succeeded=yes
9757
9758 echo "$as_me:$LINENO: checking GTK_CFLAGS" >&5
9759echo $ECHO_N "checking GTK_CFLAGS... $ECHO_C" >&6
9760 GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES"`
9761 echo "$as_me:$LINENO: result: $GTK_CFLAGS" >&5
9762echo "${ECHO_T}$GTK_CFLAGS" >&6
9763
9764 echo "$as_me:$LINENO: checking GTK_LIBS" >&5
9765echo $ECHO_N "checking GTK_LIBS... $ECHO_C" >&6
9766 GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES"`
9767 echo "$as_me:$LINENO: result: $GTK_LIBS" >&5
9768echo "${ECHO_T}$GTK_LIBS" >&6
9769 else
9770 GTK_CFLAGS=""
9771 GTK_LIBS=""
9772 ## If we have a custom action on failure, don't print errors, but
9773 ## do set a variable so people can do so.
9774 GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"`
9775 echo $GTK_PKG_ERRORS
9776 fi
9777
9778
9779
9780 else
9781 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
9782 echo "*** See http://www.freedesktop.org/software/pkgconfig"
9783 fi
9784 fi
9785
9786 if test $succeeded = yes; then
9787 :
9788 else
9789 { { 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
9790echo "$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;}
9791 { (exit 1); exit 1; }; }
9792 fi
9793
9794
9795
9796 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS"
57669b57
JD
9797 CFLAGS="$CFLAGS $GTK_CFLAGS"
9798 LIBS="$GTK_LIBS $LIBS"
488dd4c4
JD
9799 HAVE_GTK=yes
9800
9801cat >>confdefs.h <<\_ACEOF
9802#define HAVE_GTK 1
9803_ACEOF
9804
9805 USE_X_TOOLKIT=none
9806
d0a80c21
JD
9807 if test "$with_toolkit_scroll_bars" != no; then
9808 with_toolkit_scroll_bars=yes
9809 fi
57669b57
JD
9810
9811 HAVE_GTK_MULTIDISPLAY=no
9812
9813for ac_func in gdk_display_open
9814do
9815as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9816echo "$as_me:$LINENO: checking for $ac_func" >&5
9817echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9818if eval "test \"\${$as_ac_var+set}\" = set"; then
9819 echo $ECHO_N "(cached) $ECHO_C" >&6
9820else
9821 cat >conftest.$ac_ext <<_ACEOF
57669b57
JD
9822/* confdefs.h. */
9823_ACEOF
9824cat confdefs.h >>conftest.$ac_ext
9825cat >>conftest.$ac_ext <<_ACEOF
9826/* end confdefs.h. */
35996d22
AS
9827/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9828 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9829#define $ac_func innocuous_$ac_func
9830
57669b57
JD
9831/* System header to define __stub macros and hopefully few prototypes,
9832 which can conflict with char $ac_func (); below.
9833 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9834 <limits.h> exists even on freestanding compilers. */
35996d22 9835
57669b57
JD
9836#ifdef __STDC__
9837# include <limits.h>
9838#else
9839# include <assert.h>
9840#endif
35996d22
AS
9841
9842#undef $ac_func
9843
57669b57
JD
9844/* Override any gcc2 internal prototype to avoid an error. */
9845#ifdef __cplusplus
9846extern "C"
9847{
9848#endif
9849/* We use char because int might match the return type of a gcc2
9850 builtin and then its argument prototype would still apply. */
9851char $ac_func ();
9852/* The GNU C library defines this for functions which it implements
9853 to always fail with ENOSYS. Some functions are actually named
9854 something starting with __ and the normal name is an alias. */
9855#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9856choke me
9857#else
9858char (*f) () = $ac_func;
9859#endif
9860#ifdef __cplusplus
9861}
9862#endif
9863
9864int
9865main ()
9866{
9867return f != $ac_func;
9868 ;
9869 return 0;
9870}
9871_ACEOF
9872rm -f conftest.$ac_objext conftest$ac_exeext
9873if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 9874 (eval $ac_link) 2>conftest.er1
57669b57 9875 ac_status=$?
35996d22
AS
9876 grep -v '^ *+' conftest.er1 >conftest.err
9877 rm -f conftest.er1
9878 cat conftest.err >&5
57669b57
JD
9879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9880 (exit $ac_status); } &&
551ffc27
ST
9881 { ac_try='test -z "$ac_c_werror_flag"
9882 || test ! -s conftest.err'
35996d22
AS
9883 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9884 (eval $ac_try) 2>&5
9885 ac_status=$?
9886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9887 (exit $ac_status); }; } &&
9888 { ac_try='test -s conftest$ac_exeext'
57669b57
JD
9889 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9890 (eval $ac_try) 2>&5
9891 ac_status=$?
9892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9893 (exit $ac_status); }; }; then
9894 eval "$as_ac_var=yes"
9895else
9896 echo "$as_me: failed program was:" >&5
9897sed 's/^/| /' conftest.$ac_ext >&5
9898
9899eval "$as_ac_var=no"
9900fi
35996d22
AS
9901rm -f conftest.err conftest.$ac_objext \
9902 conftest$ac_exeext conftest.$ac_ext
57669b57
JD
9903fi
9904echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
9905echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9906if test `eval echo '${'$as_ac_var'}'` = yes; then
9907 cat >>confdefs.h <<_ACEOF
9908#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9909_ACEOF
9910 HAVE_GTK_MULTIDISPLAY=yes
9911fi
9912done
9913
9914 if test "${HAVE_GTK_MULTIDISPLAY}" = "yes"; then
9915
9916cat >>confdefs.h <<\_ACEOF
9917#define HAVE_GTK_MULTIDISPLAY 1
572a3cc2
JD
9918_ACEOF
9919
9920 fi
9921 HAVE_GTK_FILE_SELECTION=no
9922
9923for ac_func in gtk_file_selection_new
9924do
9925as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9926echo "$as_me:$LINENO: checking for $ac_func" >&5
9927echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9928if eval "test \"\${$as_ac_var+set}\" = set"; then
9929 echo $ECHO_N "(cached) $ECHO_C" >&6
9930else
9931 cat >conftest.$ac_ext <<_ACEOF
9932/* confdefs.h. */
9933_ACEOF
9934cat confdefs.h >>conftest.$ac_ext
9935cat >>conftest.$ac_ext <<_ACEOF
9936/* end confdefs.h. */
9937/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9938 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9939#define $ac_func innocuous_$ac_func
9940
9941/* System header to define __stub macros and hopefully few prototypes,
9942 which can conflict with char $ac_func (); below.
9943 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9944 <limits.h> exists even on freestanding compilers. */
9945
9946#ifdef __STDC__
9947# include <limits.h>
9948#else
9949# include <assert.h>
9950#endif
9951
9952#undef $ac_func
9953
9954/* Override any gcc2 internal prototype to avoid an error. */
9955#ifdef __cplusplus
9956extern "C"
9957{
9958#endif
9959/* We use char because int might match the return type of a gcc2
9960 builtin and then its argument prototype would still apply. */
9961char $ac_func ();
9962/* The GNU C library defines this for functions which it implements
9963 to always fail with ENOSYS. Some functions are actually named
9964 something starting with __ and the normal name is an alias. */
9965#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9966choke me
9967#else
9968char (*f) () = $ac_func;
9969#endif
9970#ifdef __cplusplus
9971}
9972#endif
9973
9974int
9975main ()
9976{
9977return f != $ac_func;
9978 ;
9979 return 0;
9980}
9981_ACEOF
9982rm -f conftest.$ac_objext conftest$ac_exeext
9983if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9984 (eval $ac_link) 2>conftest.er1
9985 ac_status=$?
9986 grep -v '^ *+' conftest.er1 >conftest.err
9987 rm -f conftest.er1
9988 cat conftest.err >&5
9989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9990 (exit $ac_status); } &&
9991 { ac_try='test -z "$ac_c_werror_flag"
9992 || test ! -s conftest.err'
9993 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9994 (eval $ac_try) 2>&5
9995 ac_status=$?
9996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9997 (exit $ac_status); }; } &&
9998 { ac_try='test -s conftest$ac_exeext'
9999 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10000 (eval $ac_try) 2>&5
10001 ac_status=$?
10002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10003 (exit $ac_status); }; }; then
10004 eval "$as_ac_var=yes"
10005else
10006 echo "$as_me: failed program was:" >&5
10007sed 's/^/| /' conftest.$ac_ext >&5
10008
10009eval "$as_ac_var=no"
10010fi
10011rm -f conftest.err conftest.$ac_objext \
10012 conftest$ac_exeext conftest.$ac_ext
10013fi
10014echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10015echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10016if test `eval echo '${'$as_ac_var'}'` = yes; then
10017 cat >>confdefs.h <<_ACEOF
10018#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10019_ACEOF
10020 HAVE_GTK_FILE_SELECTION=yes
10021fi
10022done
10023
10024
10025 HAVE_GTK_FILE_CHOOSER=no
10026
10027for ac_func in gtk_file_chooser_dialog_new
10028do
10029as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10030echo "$as_me:$LINENO: checking for $ac_func" >&5
10031echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10032if eval "test \"\${$as_ac_var+set}\" = set"; then
10033 echo $ECHO_N "(cached) $ECHO_C" >&6
10034else
10035 cat >conftest.$ac_ext <<_ACEOF
10036/* confdefs.h. */
10037_ACEOF
10038cat confdefs.h >>conftest.$ac_ext
10039cat >>conftest.$ac_ext <<_ACEOF
10040/* end confdefs.h. */
10041/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10042 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10043#define $ac_func innocuous_$ac_func
10044
10045/* System header to define __stub macros and hopefully few prototypes,
10046 which can conflict with char $ac_func (); below.
10047 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10048 <limits.h> exists even on freestanding compilers. */
10049
10050#ifdef __STDC__
10051# include <limits.h>
10052#else
10053# include <assert.h>
10054#endif
10055
10056#undef $ac_func
10057
10058/* Override any gcc2 internal prototype to avoid an error. */
10059#ifdef __cplusplus
10060extern "C"
10061{
10062#endif
10063/* We use char because int might match the return type of a gcc2
10064 builtin and then its argument prototype would still apply. */
10065char $ac_func ();
10066/* The GNU C library defines this for functions which it implements
10067 to always fail with ENOSYS. Some functions are actually named
10068 something starting with __ and the normal name is an alias. */
10069#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10070choke me
10071#else
10072char (*f) () = $ac_func;
10073#endif
10074#ifdef __cplusplus
10075}
10076#endif
10077
10078int
10079main ()
10080{
10081return f != $ac_func;
10082 ;
10083 return 0;
10084}
10085_ACEOF
10086rm -f conftest.$ac_objext conftest$ac_exeext
10087if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10088 (eval $ac_link) 2>conftest.er1
10089 ac_status=$?
10090 grep -v '^ *+' conftest.er1 >conftest.err
10091 rm -f conftest.er1
10092 cat conftest.err >&5
10093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10094 (exit $ac_status); } &&
10095 { ac_try='test -z "$ac_c_werror_flag"
10096 || test ! -s conftest.err'
10097 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10098 (eval $ac_try) 2>&5
10099 ac_status=$?
10100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10101 (exit $ac_status); }; } &&
10102 { ac_try='test -s conftest$ac_exeext'
10103 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10104 (eval $ac_try) 2>&5
10105 ac_status=$?
10106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10107 (exit $ac_status); }; }; then
10108 eval "$as_ac_var=yes"
10109else
10110 echo "$as_me: failed program was:" >&5
10111sed 's/^/| /' conftest.$ac_ext >&5
10112
10113eval "$as_ac_var=no"
10114fi
10115rm -f conftest.err conftest.$ac_objext \
10116 conftest$ac_exeext conftest.$ac_ext
10117fi
10118echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10119echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10120if test `eval echo '${'$as_ac_var'}'` = yes; then
10121 cat >>confdefs.h <<_ACEOF
10122#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10123_ACEOF
10124 HAVE_GTK_FILE_CHOOSER=yes
10125fi
10126done
10127
10128
10129 if test "$HAVE_GTK_FILE_SELECTION" = yes \
10130 && test "$HAVE_GTK_FILE_CHOOSER" = yes; then
10131
10132cat >>confdefs.h <<\_ACEOF
10133#define HAVE_GTK_FILE_BOTH 1
57669b57
JD
10134_ACEOF
10135
b8bdffbe
JD
10136 fi
10137
10138 if test "$HAVE_GTK_FILE_CHOOSER" = yes; then
10139 HAVE_GTK_AND_PTHREAD=no
10140
10141for ac_header in pthread.h
10142do
10143as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10144if eval "test \"\${$as_ac_Header+set}\" = set"; then
10145 echo "$as_me:$LINENO: checking for $ac_header" >&5
10146echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10147if eval "test \"\${$as_ac_Header+set}\" = set"; then
10148 echo $ECHO_N "(cached) $ECHO_C" >&6
10149fi
10150echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10151echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10152else
10153 # Is the header compilable?
10154echo "$as_me:$LINENO: checking $ac_header usability" >&5
10155echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
10156cat >conftest.$ac_ext <<_ACEOF
10157/* confdefs.h. */
10158_ACEOF
10159cat confdefs.h >>conftest.$ac_ext
10160cat >>conftest.$ac_ext <<_ACEOF
10161/* end confdefs.h. */
10162$ac_includes_default
10163#include <$ac_header>
10164_ACEOF
10165rm -f conftest.$ac_objext
10166if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10167 (eval $ac_compile) 2>conftest.er1
10168 ac_status=$?
10169 grep -v '^ *+' conftest.er1 >conftest.err
10170 rm -f conftest.er1
10171 cat conftest.err >&5
10172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10173 (exit $ac_status); } &&
10174 { ac_try='test -z "$ac_c_werror_flag"
10175 || test ! -s conftest.err'
10176 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10177 (eval $ac_try) 2>&5
10178 ac_status=$?
10179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10180 (exit $ac_status); }; } &&
10181 { ac_try='test -s conftest.$ac_objext'
10182 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10183 (eval $ac_try) 2>&5
10184 ac_status=$?
10185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10186 (exit $ac_status); }; }; then
10187 ac_header_compiler=yes
10188else
10189 echo "$as_me: failed program was:" >&5
10190sed 's/^/| /' conftest.$ac_ext >&5
10191
10192ac_header_compiler=no
10193fi
10194rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10195echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10196echo "${ECHO_T}$ac_header_compiler" >&6
10197
10198# Is the header present?
10199echo "$as_me:$LINENO: checking $ac_header presence" >&5
10200echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
10201cat >conftest.$ac_ext <<_ACEOF
10202/* confdefs.h. */
10203_ACEOF
10204cat confdefs.h >>conftest.$ac_ext
10205cat >>conftest.$ac_ext <<_ACEOF
10206/* end confdefs.h. */
10207#include <$ac_header>
10208_ACEOF
10209if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10210 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10211 ac_status=$?
10212 grep -v '^ *+' conftest.er1 >conftest.err
10213 rm -f conftest.er1
10214 cat conftest.err >&5
10215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10216 (exit $ac_status); } >/dev/null; then
10217 if test -s conftest.err; then
10218 ac_cpp_err=$ac_c_preproc_warn_flag
10219 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10220 else
10221 ac_cpp_err=
10222 fi
10223else
10224 ac_cpp_err=yes
10225fi
10226if test -z "$ac_cpp_err"; then
10227 ac_header_preproc=yes
10228else
10229 echo "$as_me: failed program was:" >&5
10230sed 's/^/| /' conftest.$ac_ext >&5
10231
10232 ac_header_preproc=no
10233fi
10234rm -f conftest.err conftest.$ac_ext
10235echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10236echo "${ECHO_T}$ac_header_preproc" >&6
10237
10238# So? What about this header?
10239case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10240 yes:no: )
10241 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10242echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10243 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10244echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10245 ac_header_preproc=yes
10246 ;;
10247 no:yes:* )
10248 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10249echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10250 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
10251echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
10252 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10253echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10254 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
10255echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
10256 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10257echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10258 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10259echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10260 (
10261 cat <<\_ASBOX
10262## ------------------------------------------ ##
10263## Report this to the AC_PACKAGE_NAME lists. ##
10264## ------------------------------------------ ##
10265_ASBOX
10266 ) |
10267 sed "s/^/$as_me: WARNING: /" >&2
10268 ;;
10269esac
10270echo "$as_me:$LINENO: checking for $ac_header" >&5
10271echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10272if eval "test \"\${$as_ac_Header+set}\" = set"; then
10273 echo $ECHO_N "(cached) $ECHO_C" >&6
10274else
10275 eval "$as_ac_Header=\$ac_header_preproc"
10276fi
10277echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10278echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10279
10280fi
10281if test `eval echo '${'$as_ac_Header'}'` = yes; then
10282 cat >>confdefs.h <<_ACEOF
10283#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10284_ACEOF
10285
10286fi
10287
10288done
10289
10290 if test "$ac_cv_header_pthread_h"; then
10291 echo "$as_me:$LINENO: checking for pthread_self in -lpthread" >&5
10292echo $ECHO_N "checking for pthread_self in -lpthread... $ECHO_C" >&6
10293if test "${ac_cv_lib_pthread_pthread_self+set}" = set; then
10294 echo $ECHO_N "(cached) $ECHO_C" >&6
10295else
10296 ac_check_lib_save_LIBS=$LIBS
10297LIBS="-lpthread $LIBS"
10298cat >conftest.$ac_ext <<_ACEOF
10299/* confdefs.h. */
10300_ACEOF
10301cat confdefs.h >>conftest.$ac_ext
10302cat >>conftest.$ac_ext <<_ACEOF
10303/* end confdefs.h. */
10304
10305/* Override any gcc2 internal prototype to avoid an error. */
10306#ifdef __cplusplus
10307extern "C"
10308#endif
10309/* We use char because int might match the return type of a gcc2
10310 builtin and then its argument prototype would still apply. */
10311char pthread_self ();
10312int
10313main ()
10314{
10315pthread_self ();
10316 ;
10317 return 0;
10318}
10319_ACEOF
10320rm -f conftest.$ac_objext conftest$ac_exeext
10321if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10322 (eval $ac_link) 2>conftest.er1
10323 ac_status=$?
10324 grep -v '^ *+' conftest.er1 >conftest.err
10325 rm -f conftest.er1
10326 cat conftest.err >&5
10327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10328 (exit $ac_status); } &&
10329 { ac_try='test -z "$ac_c_werror_flag"
10330 || test ! -s conftest.err'
10331 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10332 (eval $ac_try) 2>&5
10333 ac_status=$?
10334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10335 (exit $ac_status); }; } &&
10336 { ac_try='test -s conftest$ac_exeext'
10337 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10338 (eval $ac_try) 2>&5
10339 ac_status=$?
10340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10341 (exit $ac_status); }; }; then
10342 ac_cv_lib_pthread_pthread_self=yes
10343else
10344 echo "$as_me: failed program was:" >&5
10345sed 's/^/| /' conftest.$ac_ext >&5
10346
10347ac_cv_lib_pthread_pthread_self=no
10348fi
10349rm -f conftest.err conftest.$ac_objext \
10350 conftest$ac_exeext conftest.$ac_ext
10351LIBS=$ac_check_lib_save_LIBS
10352fi
10353echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_self" >&5
10354echo "${ECHO_T}$ac_cv_lib_pthread_pthread_self" >&6
10355if test $ac_cv_lib_pthread_pthread_self = yes; then
10356 HAVE_GTK_AND_PTHREAD=yes
10357fi
10358
10359 fi
10360 if test "$HAVE_GTK_AND_PTHREAD" = yes; then
10361 GTK_LIBS="$GTK_LIBS -lpthread"
10362
10363cat >>confdefs.h <<\_ACEOF
10364#define HAVE_GTK_AND_PTHREAD 1
10365_ACEOF
10366
10367 fi
57669b57 10368 fi
488dd4c4
JD
10369fi
10370
98418dba
CW
10371if test x"${USE_X_TOOLKIT}" = xmaybe; then
10372 if test x"${HAVE_X11R5}" = xyes; then
c0d27fcc 10373 echo "$as_me:$LINENO: checking X11 version 5 with Xaw" >&5
98418dba
CW
10374echo $ECHO_N "checking X11 version 5 with Xaw... $ECHO_C" >&6
10375 if test "${emacs_cv_x11_version_5_with_xaw+set}" = set; then
10376 echo $ECHO_N "(cached) $ECHO_C" >&6
10377else
10378 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10379/* confdefs.h. */
10380_ACEOF
10381cat confdefs.h >>conftest.$ac_ext
10382cat >>conftest.$ac_ext <<_ACEOF
10383/* end confdefs.h. */
98418dba
CW
10384
10385#include <X11/Intrinsic.h>
10386#include <X11/Xaw/Simple.h>
98418dba
CW
10387int
10388main ()
10389{
10390
10391 ;
10392 return 0;
10393}
10394_ACEOF
10395rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10396if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 10397 (eval $ac_link) 2>conftest.er1
98418dba 10398 ac_status=$?
35996d22
AS
10399 grep -v '^ *+' conftest.er1 >conftest.err
10400 rm -f conftest.er1
10401 cat conftest.err >&5
c0d27fcc 10402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10403 (exit $ac_status); } &&
551ffc27
ST
10404 { ac_try='test -z "$ac_c_werror_flag"
10405 || test ! -s conftest.err'
35996d22
AS
10406 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10407 (eval $ac_try) 2>&5
10408 ac_status=$?
10409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10410 (exit $ac_status); }; } &&
10411 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10412 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
10413 (eval $ac_try) 2>&5
10414 ac_status=$?
c0d27fcc 10415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10416 (exit $ac_status); }; }; then
10417 emacs_cv_x11_version_5_with_xaw=yes
10418else
10419 echo "$as_me: failed program was:" >&5
19650fd6
AS
10420sed 's/^/| /' conftest.$ac_ext >&5
10421
98418dba
CW
10422emacs_cv_x11_version_5_with_xaw=no
10423fi
35996d22
AS
10424rm -f conftest.err conftest.$ac_objext \
10425 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10426fi
10427
10428 if test $emacs_cv_x11_version_5_with_xaw = yes; then
c0d27fcc 10429 echo "$as_me:$LINENO: result: 5 or newer, with Xaw; use toolkit by default" >&5
98418dba
CW
10430echo "${ECHO_T}5 or newer, with Xaw; use toolkit by default" >&6
10431 USE_X_TOOLKIT=LUCID
10432 else
c0d27fcc 10433 echo "$as_me:$LINENO: result: before 5 or no Xaw; do not use toolkit by default" >&5
98418dba
CW
10434echo "${ECHO_T}before 5 or no Xaw; do not use toolkit by default" >&6
10435 USE_X_TOOLKIT=none
10436 fi
10437 else
10438 USE_X_TOOLKIT=none
10439 fi
10440fi
10441
10442X_TOOLKIT_TYPE=$USE_X_TOOLKIT
10443
10444if test "${USE_X_TOOLKIT}" != "none"; then
c0d27fcc 10445 echo "$as_me:$LINENO: checking X11 toolkit version" >&5
98418dba
CW
10446echo $ECHO_N "checking X11 toolkit version... $ECHO_C" >&6
10447 if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then
10448 echo $ECHO_N "(cached) $ECHO_C" >&6
10449else
10450 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10451/* confdefs.h. */
10452_ACEOF
10453cat confdefs.h >>conftest.$ac_ext
10454cat >>conftest.$ac_ext <<_ACEOF
10455/* end confdefs.h. */
98418dba 10456#include <X11/Intrinsic.h>
98418dba
CW
10457int
10458main ()
10459{
10460#if XtSpecificationRelease < 6
10461fail;
10462#endif
10463
10464 ;
10465 return 0;
10466}
10467_ACEOF
10468rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10469if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 10470 (eval $ac_link) 2>conftest.er1
98418dba 10471 ac_status=$?
35996d22
AS
10472 grep -v '^ *+' conftest.er1 >conftest.err
10473 rm -f conftest.er1
10474 cat conftest.err >&5
c0d27fcc 10475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10476 (exit $ac_status); } &&
551ffc27
ST
10477 { ac_try='test -z "$ac_c_werror_flag"
10478 || test ! -s conftest.err'
35996d22
AS
10479 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10480 (eval $ac_try) 2>&5
10481 ac_status=$?
10482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10483 (exit $ac_status); }; } &&
10484 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10485 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
10486 (eval $ac_try) 2>&5
10487 ac_status=$?
c0d27fcc 10488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10489 (exit $ac_status); }; }; then
10490 emacs_cv_x11_toolkit_version_6=yes
10491else
10492 echo "$as_me: failed program was:" >&5
19650fd6
AS
10493sed 's/^/| /' conftest.$ac_ext >&5
10494
98418dba
CW
10495emacs_cv_x11_toolkit_version_6=no
10496fi
35996d22
AS
10497rm -f conftest.err conftest.$ac_objext \
10498 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10499fi
10500
10501 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
10502 if test $emacs_cv_x11_toolkit_version_6 = yes; then
c0d27fcc 10503 echo "$as_me:$LINENO: result: 6 or newer" >&5
98418dba 10504echo "${ECHO_T}6 or newer" >&6
b936fae4 10505
c0d27fcc 10506cat >>confdefs.h <<\_ACEOF
98418dba 10507#define HAVE_X11XTR6 1
c0d27fcc 10508_ACEOF
98418dba
CW
10509
10510 else
c0d27fcc 10511 echo "$as_me:$LINENO: result: before 6" >&5
98418dba
CW
10512echo "${ECHO_T}before 6" >&6
10513 fi
10514
10515 OLDLIBS="$LIBS"
10516 if test x$HAVE_X11XTR6 = xyes; then
10517 LIBS="-lXt -lSM -lICE $LIBS"
10518 else
10519 LIBS="-lXt $LIBS"
10520 fi
10521
c0d27fcc 10522echo "$as_me:$LINENO: checking for XmuConvertStandardSelection in -lXmu" >&5
98418dba
CW
10523echo $ECHO_N "checking for XmuConvertStandardSelection in -lXmu... $ECHO_C" >&6
10524if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then
10525 echo $ECHO_N "(cached) $ECHO_C" >&6
10526else
10527 ac_check_lib_save_LIBS=$LIBS
10528LIBS="-lXmu $LIBS"
10529cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10530/* confdefs.h. */
10531_ACEOF
10532cat confdefs.h >>conftest.$ac_ext
10533cat >>conftest.$ac_ext <<_ACEOF
10534/* end confdefs.h. */
98418dba
CW
10535
10536/* Override any gcc2 internal prototype to avoid an error. */
10537#ifdef __cplusplus
10538extern "C"
10539#endif
10540/* We use char because int might match the return type of a gcc2
10541 builtin and then its argument prototype would still apply. */
10542char XmuConvertStandardSelection ();
98418dba
CW
10543int
10544main ()
10545{
10546XmuConvertStandardSelection ();
10547 ;
10548 return 0;
10549}
10550_ACEOF
10551rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10552if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 10553 (eval $ac_link) 2>conftest.er1
98418dba 10554 ac_status=$?
35996d22
AS
10555 grep -v '^ *+' conftest.er1 >conftest.err
10556 rm -f conftest.er1
10557 cat conftest.err >&5
c0d27fcc 10558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10559 (exit $ac_status); } &&
551ffc27
ST
10560 { ac_try='test -z "$ac_c_werror_flag"
10561 || test ! -s conftest.err'
35996d22
AS
10562 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10563 (eval $ac_try) 2>&5
10564 ac_status=$?
10565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10566 (exit $ac_status); }; } &&
10567 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10568 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
10569 (eval $ac_try) 2>&5
10570 ac_status=$?
c0d27fcc 10571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10572 (exit $ac_status); }; }; then
10573 ac_cv_lib_Xmu_XmuConvertStandardSelection=yes
10574else
10575 echo "$as_me: failed program was:" >&5
19650fd6
AS
10576sed 's/^/| /' conftest.$ac_ext >&5
10577
98418dba
CW
10578ac_cv_lib_Xmu_XmuConvertStandardSelection=no
10579fi
35996d22
AS
10580rm -f conftest.err conftest.$ac_objext \
10581 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10582LIBS=$ac_check_lib_save_LIBS
10583fi
c0d27fcc 10584echo "$as_me:$LINENO: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5
98418dba
CW
10585echo "${ECHO_T}$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6
10586if test $ac_cv_lib_Xmu_XmuConvertStandardSelection = yes; then
c0d27fcc 10587 cat >>confdefs.h <<_ACEOF
98418dba 10588#define HAVE_LIBXMU 1
c0d27fcc 10589_ACEOF
98418dba
CW
10590
10591 LIBS="-lXmu $LIBS"
10592
10593fi
10594
10595 test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
10596fi
10597
10598# On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D.
10599if test "${HAVE_X11}" = "yes"; then
10600 if test "${USE_X_TOOLKIT}" != "none"; then
10601
c0d27fcc 10602echo "$as_me:$LINENO: checking for XShapeQueryExtension in -lXext" >&5
98418dba
CW
10603echo $ECHO_N "checking for XShapeQueryExtension in -lXext... $ECHO_C" >&6
10604if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then
10605 echo $ECHO_N "(cached) $ECHO_C" >&6
10606else
10607 ac_check_lib_save_LIBS=$LIBS
10608LIBS="-lXext $LIBS"
10609cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10610/* confdefs.h. */
10611_ACEOF
10612cat confdefs.h >>conftest.$ac_ext
10613cat >>conftest.$ac_ext <<_ACEOF
10614/* end confdefs.h. */
98418dba
CW
10615
10616/* Override any gcc2 internal prototype to avoid an error. */
10617#ifdef __cplusplus
10618extern "C"
10619#endif
10620/* We use char because int might match the return type of a gcc2
10621 builtin and then its argument prototype would still apply. */
10622char XShapeQueryExtension ();
98418dba
CW
10623int
10624main ()
10625{
10626XShapeQueryExtension ();
10627 ;
10628 return 0;
10629}
10630_ACEOF
10631rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10632if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 10633 (eval $ac_link) 2>conftest.er1
98418dba 10634 ac_status=$?
35996d22
AS
10635 grep -v '^ *+' conftest.er1 >conftest.err
10636 rm -f conftest.er1
10637 cat conftest.err >&5
c0d27fcc 10638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10639 (exit $ac_status); } &&
551ffc27
ST
10640 { ac_try='test -z "$ac_c_werror_flag"
10641 || test ! -s conftest.err'
35996d22
AS
10642 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10643 (eval $ac_try) 2>&5
10644 ac_status=$?
10645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10646 (exit $ac_status); }; } &&
10647 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10648 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
10649 (eval $ac_try) 2>&5
10650 ac_status=$?
c0d27fcc 10651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10652 (exit $ac_status); }; }; then
10653 ac_cv_lib_Xext_XShapeQueryExtension=yes
10654else
10655 echo "$as_me: failed program was:" >&5
19650fd6
AS
10656sed 's/^/| /' conftest.$ac_ext >&5
10657
98418dba
CW
10658ac_cv_lib_Xext_XShapeQueryExtension=no
10659fi
35996d22
AS
10660rm -f conftest.err conftest.$ac_objext \
10661 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10662LIBS=$ac_check_lib_save_LIBS
10663fi
c0d27fcc 10664echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
98418dba
CW
10665echo "${ECHO_T}$ac_cv_lib_Xext_XShapeQueryExtension" >&6
10666if test $ac_cv_lib_Xext_XShapeQueryExtension = yes; then
c0d27fcc 10667 cat >>confdefs.h <<_ACEOF
98418dba 10668#define HAVE_LIBXEXT 1
c0d27fcc 10669_ACEOF
98418dba
CW
10670
10671 LIBS="-lXext $LIBS"
10672
10673fi
10674
10675 fi
10676fi
10677
10678if test "${USE_X_TOOLKIT}" = "MOTIF"; then
c0d27fcc 10679 echo "$as_me:$LINENO: checking for Motif version 2.1" >&5
98418dba
CW
10680echo $ECHO_N "checking for Motif version 2.1... $ECHO_C" >&6
10681if test "${emacs_cv_motif_version_2_1+set}" = set; then
10682 echo $ECHO_N "(cached) $ECHO_C" >&6
10683else
10684 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10685/* confdefs.h. */
10686_ACEOF
10687cat confdefs.h >>conftest.$ac_ext
10688cat >>conftest.$ac_ext <<_ACEOF
10689/* end confdefs.h. */
98418dba 10690#include <Xm/Xm.h>
98418dba
CW
10691int
10692main ()
10693{
10694#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
10695int x = 5;
10696#else
10697Motif version prior to 2.1.
10698#endif
10699 ;
10700 return 0;
10701}
10702_ACEOF
10703rm -f conftest.$ac_objext
c0d27fcc 10704if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 10705 (eval $ac_compile) 2>conftest.er1
98418dba 10706 ac_status=$?
35996d22
AS
10707 grep -v '^ *+' conftest.er1 >conftest.err
10708 rm -f conftest.er1
10709 cat conftest.err >&5
c0d27fcc 10710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10711 (exit $ac_status); } &&
551ffc27
ST
10712 { ac_try='test -z "$ac_c_werror_flag"
10713 || test ! -s conftest.err'
35996d22
AS
10714 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10715 (eval $ac_try) 2>&5
10716 ac_status=$?
10717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10718 (exit $ac_status); }; } &&
10719 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 10720 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
10721 (eval $ac_try) 2>&5
10722 ac_status=$?
c0d27fcc 10723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10724 (exit $ac_status); }; }; then
10725 emacs_cv_motif_version_2_1=yes
10726else
10727 echo "$as_me: failed program was:" >&5
19650fd6
AS
10728sed 's/^/| /' conftest.$ac_ext >&5
10729
98418dba
CW
10730emacs_cv_motif_version_2_1=no
10731fi
35996d22 10732rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 10733fi
c0d27fcc 10734echo "$as_me:$LINENO: result: $emacs_cv_motif_version_2_1" >&5
98418dba
CW
10735echo "${ECHO_T}$emacs_cv_motif_version_2_1" >&6
10736 HAVE_MOTIF_2_1=$emacs_cv_motif_version_2_1
10737 if test $emacs_cv_motif_version_2_1 = yes; then
10738 HAVE_LIBXP=no
b936fae4 10739
c0d27fcc 10740cat >>confdefs.h <<\_ACEOF
98418dba 10741#define HAVE_MOTIF_2_1 1
c0d27fcc 10742_ACEOF
98418dba 10743
c0d27fcc 10744 echo "$as_me:$LINENO: checking for XpCreateContext in -lXp" >&5
98418dba
CW
10745echo $ECHO_N "checking for XpCreateContext in -lXp... $ECHO_C" >&6
10746if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then
10747 echo $ECHO_N "(cached) $ECHO_C" >&6
10748else
10749 ac_check_lib_save_LIBS=$LIBS
10750LIBS="-lXp $LIBS"
10751cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10752/* confdefs.h. */
10753_ACEOF
10754cat confdefs.h >>conftest.$ac_ext
10755cat >>conftest.$ac_ext <<_ACEOF
10756/* end confdefs.h. */
98418dba
CW
10757
10758/* Override any gcc2 internal prototype to avoid an error. */
10759#ifdef __cplusplus
10760extern "C"
10761#endif
10762/* We use char because int might match the return type of a gcc2
10763 builtin and then its argument prototype would still apply. */
10764char XpCreateContext ();
98418dba
CW
10765int
10766main ()
10767{
10768XpCreateContext ();
10769 ;
10770 return 0;
10771}
10772_ACEOF
10773rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10774if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 10775 (eval $ac_link) 2>conftest.er1
98418dba 10776 ac_status=$?
35996d22
AS
10777 grep -v '^ *+' conftest.er1 >conftest.err
10778 rm -f conftest.er1
10779 cat conftest.err >&5
c0d27fcc 10780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10781 (exit $ac_status); } &&
551ffc27
ST
10782 { ac_try='test -z "$ac_c_werror_flag"
10783 || test ! -s conftest.err'
35996d22
AS
10784 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10785 (eval $ac_try) 2>&5
10786 ac_status=$?
10787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10788 (exit $ac_status); }; } &&
10789 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10790 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
10791 (eval $ac_try) 2>&5
10792 ac_status=$?
c0d27fcc 10793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10794 (exit $ac_status); }; }; then
10795 ac_cv_lib_Xp_XpCreateContext=yes
10796else
10797 echo "$as_me: failed program was:" >&5
19650fd6
AS
10798sed 's/^/| /' conftest.$ac_ext >&5
10799
98418dba
CW
10800ac_cv_lib_Xp_XpCreateContext=no
10801fi
35996d22
AS
10802rm -f conftest.err conftest.$ac_objext \
10803 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10804LIBS=$ac_check_lib_save_LIBS
10805fi
c0d27fcc 10806echo "$as_me:$LINENO: result: $ac_cv_lib_Xp_XpCreateContext" >&5
98418dba
CW
10807echo "${ECHO_T}$ac_cv_lib_Xp_XpCreateContext" >&6
10808if test $ac_cv_lib_Xp_XpCreateContext = yes; then
10809 HAVE_LIBXP=yes
10810fi
503d2be0 10811
98418dba 10812 if test ${HAVE_LIBXP} = yes; then
b936fae4 10813
c0d27fcc 10814cat >>confdefs.h <<\_ACEOF
98418dba 10815#define HAVE_LIBXP 1
c0d27fcc 10816_ACEOF
503d2be0 10817
98418dba 10818 fi
4693dbc9
SM
10819 else
10820 echo "$as_me:$LINENO: checking for LessTif where some systems put it" >&5
10821echo $ECHO_N "checking for LessTif where some systems put it... $ECHO_C" >&6
10822if test "${emacs_cv_lesstif+set}" = set; then
10823 echo $ECHO_N "(cached) $ECHO_C" >&6
10824else
10825 # We put this in CFLAGS temporarily to precede other -I options
10826 # that might be in CFLAGS temporarily.
10827 # We put this in CPPFLAGS where it precedes the other -I options.
10828 OLD_CPPFLAGS=$CPPFLAGS
10829 OLD_CFLAGS=$CFLAGS
10830 CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS"
10831 CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS"
10832 cat >conftest.$ac_ext <<_ACEOF
10833/* confdefs.h. */
10834_ACEOF
10835cat confdefs.h >>conftest.$ac_ext
10836cat >>conftest.$ac_ext <<_ACEOF
10837/* end confdefs.h. */
10838#include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h>
10839int
10840main ()
10841{
10842int x = 5;
10843 ;
10844 return 0;
10845}
10846_ACEOF
10847rm -f conftest.$ac_objext
10848if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10849 (eval $ac_compile) 2>conftest.er1
10850 ac_status=$?
10851 grep -v '^ *+' conftest.er1 >conftest.err
10852 rm -f conftest.er1
10853 cat conftest.err >&5
10854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10855 (exit $ac_status); } &&
10856 { ac_try='test -z "$ac_c_werror_flag"
10857 || test ! -s conftest.err'
10858 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10859 (eval $ac_try) 2>&5
10860 ac_status=$?
10861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10862 (exit $ac_status); }; } &&
10863 { ac_try='test -s conftest.$ac_objext'
10864 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10865 (eval $ac_try) 2>&5
10866 ac_status=$?
10867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10868 (exit $ac_status); }; }; then
10869 emacs_cv_lesstif=yes
10870else
10871 echo "$as_me: failed program was:" >&5
10872sed 's/^/| /' conftest.$ac_ext >&5
10873
10874emacs_cv_lesstif=no
10875fi
10876rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10877fi
10878echo "$as_me:$LINENO: result: $emacs_cv_lesstif" >&5
10879echo "${ECHO_T}$emacs_cv_lesstif" >&6
10880 if test $emacs_cv_lesstif = yes; then
10881 # Make sure this -I option remains in CPPFLAGS after it is set
10882 # back to REAL_CPPFLAGS.
10883 # There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not
10884 # have those other -I options anyway. Ultimately, having this
10885 # directory ultimately in CPPFLAGS will be enough.
10886 REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS"
10887 LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS"
10888 else
10889 CFLAGS=$OLD_CFLAGS
10890 CPPFLAGS=$OLD_CPPFLAGS
10891 fi
98418dba
CW
10892 fi
10893fi
10894
10895### Is -lXaw3d available?
10896HAVE_XAW3D=no
10897if test "${HAVE_X11}" = "yes"; then
10898 if test "${USE_X_TOOLKIT}" != "none"; then
22044edf 10899 echo "$as_me:$LINENO: checking for X11/Xaw3d/Scrollbar.h" >&5
98418dba
CW
10900echo $ECHO_N "checking for X11/Xaw3d/Scrollbar.h... $ECHO_C" >&6
10901if test "${ac_cv_header_X11_Xaw3d_Scrollbar_h+set}" = set; then
10902 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba 10903else
22044edf 10904 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10905/* confdefs.h. */
10906_ACEOF
10907cat confdefs.h >>conftest.$ac_ext
10908cat >>conftest.$ac_ext <<_ACEOF
10909/* end confdefs.h. */
98418dba 10910#include <X11/Xaw3d/Scrollbar.h>
503d2be0 10911_ACEOF
c0d27fcc 10912if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
10913 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10914 ac_status=$?
6bae0ccf 10915 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
10916 rm -f conftest.er1
10917 cat conftest.err >&5
c0d27fcc 10918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
10919 (exit $ac_status); } >/dev/null; then
10920 if test -s conftest.err; then
10921 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 10922 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
10923 else
10924 ac_cpp_err=
10925 fi
10926else
10927 ac_cpp_err=yes
10928fi
10929if test -z "$ac_cpp_err"; then
22044edf 10930 ac_cv_header_X11_Xaw3d_Scrollbar_h=yes
ba4481b5 10931else
503d2be0 10932 echo "$as_me: failed program was:" >&5
19650fd6
AS
10933sed 's/^/| /' conftest.$ac_ext >&5
10934
22044edf 10935 ac_cv_header_X11_Xaw3d_Scrollbar_h=no
ba4481b5 10936fi
503d2be0 10937rm -f conftest.err conftest.$ac_ext
98418dba 10938fi
c0d27fcc 10939echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xaw3d_Scrollbar_h" >&5
98418dba 10940echo "${ECHO_T}$ac_cv_header_X11_Xaw3d_Scrollbar_h" >&6
98418dba 10941if test $ac_cv_header_X11_Xaw3d_Scrollbar_h = yes; then
c0d27fcc 10942 echo "$as_me:$LINENO: checking for XawScrollbarSetThumb in -lXaw3d" >&5
98418dba
CW
10943echo $ECHO_N "checking for XawScrollbarSetThumb in -lXaw3d... $ECHO_C" >&6
10944if test "${ac_cv_lib_Xaw3d_XawScrollbarSetThumb+set}" = set; then
10945 echo $ECHO_N "(cached) $ECHO_C" >&6
10946else
10947 ac_check_lib_save_LIBS=$LIBS
10948LIBS="-lXaw3d $LIBS"
10949cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10950/* confdefs.h. */
10951_ACEOF
10952cat confdefs.h >>conftest.$ac_ext
10953cat >>conftest.$ac_ext <<_ACEOF
10954/* end confdefs.h. */
98418dba
CW
10955
10956/* Override any gcc2 internal prototype to avoid an error. */
10957#ifdef __cplusplus
10958extern "C"
10959#endif
10960/* We use char because int might match the return type of a gcc2
10961 builtin and then its argument prototype would still apply. */
10962char XawScrollbarSetThumb ();
503d2be0
AS
10963int
10964main ()
10965{
98418dba 10966XawScrollbarSetThumb ();
503d2be0
AS
10967 ;
10968 return 0;
10969}
10970_ACEOF
10971rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 10972if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 10973 (eval $ac_link) 2>conftest.er1
503d2be0 10974 ac_status=$?
35996d22
AS
10975 grep -v '^ *+' conftest.er1 >conftest.err
10976 rm -f conftest.er1
10977 cat conftest.err >&5
c0d27fcc 10978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 10979 (exit $ac_status); } &&
551ffc27
ST
10980 { ac_try='test -z "$ac_c_werror_flag"
10981 || test ! -s conftest.err'
35996d22
AS
10982 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10983 (eval $ac_try) 2>&5
10984 ac_status=$?
10985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10986 (exit $ac_status); }; } &&
10987 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 10988 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
10989 (eval $ac_try) 2>&5
10990 ac_status=$?
c0d27fcc 10991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 10992 (exit $ac_status); }; }; then
98418dba 10993 ac_cv_lib_Xaw3d_XawScrollbarSetThumb=yes
ba4481b5 10994else
503d2be0 10995 echo "$as_me: failed program was:" >&5
19650fd6
AS
10996sed 's/^/| /' conftest.$ac_ext >&5
10997
98418dba 10998ac_cv_lib_Xaw3d_XawScrollbarSetThumb=no
ba4481b5 10999fi
35996d22
AS
11000rm -f conftest.err conftest.$ac_objext \
11001 conftest$ac_exeext conftest.$ac_ext
98418dba 11002LIBS=$ac_check_lib_save_LIBS
ba4481b5 11003fi
c0d27fcc 11004echo "$as_me:$LINENO: result: $ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&5
98418dba
CW
11005echo "${ECHO_T}$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&6
11006if test $ac_cv_lib_Xaw3d_XawScrollbarSetThumb = yes; then
11007 HAVE_XAW3D=yes
ba4481b5 11008fi
503d2be0 11009
ba4481b5
DL
11010fi
11011
c0d27fcc 11012
98418dba 11013 if test "${HAVE_XAW3D}" = "yes"; then
b936fae4 11014
c0d27fcc 11015cat >>confdefs.h <<\_ACEOF
98418dba 11016#define HAVE_XAW3D 1
c0d27fcc 11017_ACEOF
98418dba 11018
ba4481b5 11019 fi
98418dba 11020 fi
ba4481b5
DL
11021fi
11022
c0d27fcc
MR
11023
11024
98418dba
CW
11025USE_TOOLKIT_SCROLL_BARS=no
11026if test "${with_toolkit_scroll_bars}" != "no"; then
11027 if test "${USE_X_TOOLKIT}" != "none"; then
11028 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
c0d27fcc 11029 cat >>confdefs.h <<\_ACEOF
98418dba 11030#define USE_TOOLKIT_SCROLL_BARS 1
c0d27fcc 11031_ACEOF
98418dba
CW
11032
11033 HAVE_XAW3D=no
11034 USE_TOOLKIT_SCROLL_BARS=yes
11035 elif test "${HAVE_XAW3D}" = "yes"; then
c0d27fcc 11036 cat >>confdefs.h <<\_ACEOF
98418dba 11037#define USE_TOOLKIT_SCROLL_BARS 1
c0d27fcc 11038_ACEOF
98418dba
CW
11039
11040 USE_TOOLKIT_SCROLL_BARS=yes
ba4481b5 11041 fi
488dd4c4
JD
11042 elif test "${HAVE_GTK}" = "yes"; then
11043 cat >>confdefs.h <<\_ACEOF
11044#define USE_TOOLKIT_SCROLL_BARS 1
11045_ACEOF
11046
11047 USE_TOOLKIT_SCROLL_BARS=yes
ba4481b5
DL
11048 fi
11049fi
11050
abd39b57 11051cat >conftest.$ac_ext <<_ACEOF
abd39b57
AC
11052/* confdefs.h. */
11053_ACEOF
11054cat confdefs.h >>conftest.$ac_ext
11055cat >>conftest.$ac_ext <<_ACEOF
11056/* end confdefs.h. */
11057
11058 #include <X11/Xlib.h>
11059 #include <X11/Xresource.h>
11060int
11061main ()
11062{
11063XIMProc callback;
11064 ;
11065 return 0;
11066}
11067_ACEOF
11068rm -f conftest.$ac_objext
11069if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 11070 (eval $ac_compile) 2>conftest.er1
abd39b57 11071 ac_status=$?
35996d22
AS
11072 grep -v '^ *+' conftest.er1 >conftest.err
11073 rm -f conftest.er1
11074 cat conftest.err >&5
abd39b57
AC
11075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11076 (exit $ac_status); } &&
551ffc27
ST
11077 { ac_try='test -z "$ac_c_werror_flag"
11078 || test ! -s conftest.err'
35996d22
AS
11079 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11080 (eval $ac_try) 2>&5
11081 ac_status=$?
11082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11083 (exit $ac_status); }; } &&
11084 { ac_try='test -s conftest.$ac_objext'
abd39b57
AC
11085 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11086 (eval $ac_try) 2>&5
11087 ac_status=$?
11088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11089 (exit $ac_status); }; }; then
11090 HAVE_XIM=yes
11091
11092cat >>confdefs.h <<\_ACEOF
11093#define HAVE_XIM 1
11094_ACEOF
11095
11096else
11097 echo "$as_me: failed program was:" >&5
11098sed 's/^/| /' conftest.$ac_ext >&5
11099
11100HAVE_XIM=no
11101fi
35996d22 11102rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
abd39b57 11103
c0d27fcc 11104
98418dba 11105if test "${with_xim}" != "no"; then
b936fae4 11106
c0d27fcc 11107cat >>confdefs.h <<\_ACEOF
98418dba 11108#define USE_XIM 1
c0d27fcc 11109_ACEOF
98418dba 11110
793fa0d7 11111fi
abd39b57
AC
11112
11113
11114if test "${HAVE_XIM}" != "no"; then
849d80cf
DL
11115 late_CFLAGS=$CFLAGS
11116 if test "$GCC" = yes; then
11117 CFLAGS="$CFLAGS --pedantic-errors"
11118 fi
cffcede7 11119 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11120/* confdefs.h. */
11121_ACEOF
11122cat confdefs.h >>conftest.$ac_ext
11123cat >>conftest.$ac_ext <<_ACEOF
11124/* end confdefs.h. */
cffcede7
JD
11125
11126#include <X11/Xlib.h>
11127#include <X11/Xresource.h>
11128int
11129main ()
11130{
11131Display *display;
11132XrmDatabase db;
11133char *res_name;
11134char *res_class;
11135XIMProc callback;
11136XPointer *client_data;
849d80cf
DL
11137#ifndef __GNUC__
11138/* If we're not using GCC, it's probably not XFree86, and this is
11139 probably right, but we can't use something like --pedantic-errors. */
11140extern Bool XRegisterIMInstantiateCallback(Display*, XrmDatabase, char*,
11141 char*, XIMProc, XPointer*);
11142#endif
cffcede7
JD
11143(void)XRegisterIMInstantiateCallback(display, db, res_name, res_class, callback,
11144 client_data);
11145 ;
11146 return 0;
11147}
11148_ACEOF
11149rm -f conftest.$ac_objext
11150if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 11151 (eval $ac_compile) 2>conftest.er1
cffcede7 11152 ac_status=$?
35996d22
AS
11153 grep -v '^ *+' conftest.er1 >conftest.err
11154 rm -f conftest.er1
11155 cat conftest.err >&5
cffcede7
JD
11156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11157 (exit $ac_status); } &&
551ffc27
ST
11158 { ac_try='test -z "$ac_c_werror_flag"
11159 || test ! -s conftest.err'
35996d22
AS
11160 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11161 (eval $ac_try) 2>&5
11162 ac_status=$?
11163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11164 (exit $ac_status); }; } &&
11165 { ac_try='test -s conftest.$ac_objext'
cffcede7
JD
11166 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11167 (eval $ac_try) 2>&5
11168 ac_status=$?
11169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11170 (exit $ac_status); }; }; then
11171 emacs_cv_arg6_star=yes
11172else
11173 echo "$as_me: failed program was:" >&5
19650fd6
AS
11174sed 's/^/| /' conftest.$ac_ext >&5
11175
cffcede7 11176fi
35996d22 11177rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
cffcede7
JD
11178
11179 if test "$emacs_cv_arg6_star" = yes; then
f57bd967 11180 cat >>confdefs.h <<\_ACEOF
cffcede7
JD
11181#define XRegisterIMInstantiateCallback_arg6 XPointer*
11182_ACEOF
11183
11184 else
f57bd967 11185 cat >>confdefs.h <<\_ACEOF
cffcede7
JD
11186#define XRegisterIMInstantiateCallback_arg6 XPointer
11187_ACEOF
11188
11189 fi
849d80cf 11190 CFLAGS=$late_CFLAGS
98418dba
CW
11191fi
11192
11193### Use -lXpm if available, unless `--with-xpm=no'.
11194HAVE_XPM=no
11195if test "${HAVE_X11}" = "yes"; then
11196 if test "${with_xpm}" != "no"; then
c0d27fcc
MR
11197 if test "${ac_cv_header_X11_xpm_h+set}" = set; then
11198 echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
98418dba
CW
11199echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6
11200if test "${ac_cv_header_X11_xpm_h+set}" = set; then
11201 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
11202fi
11203echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
11204echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6
98418dba 11205else
c0d27fcc
MR
11206 # Is the header compilable?
11207echo "$as_me:$LINENO: checking X11/xpm.h usability" >&5
11208echo $ECHO_N "checking X11/xpm.h usability... $ECHO_C" >&6
11209cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11210/* confdefs.h. */
11211_ACEOF
11212cat confdefs.h >>conftest.$ac_ext
11213cat >>conftest.$ac_ext <<_ACEOF
11214/* end confdefs.h. */
c0d27fcc
MR
11215$ac_includes_default
11216#include <X11/xpm.h>
11217_ACEOF
11218rm -f conftest.$ac_objext
11219if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 11220 (eval $ac_compile) 2>conftest.er1
c0d27fcc 11221 ac_status=$?
35996d22
AS
11222 grep -v '^ *+' conftest.er1 >conftest.err
11223 rm -f conftest.er1
11224 cat conftest.err >&5
c0d27fcc
MR
11225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11226 (exit $ac_status); } &&
551ffc27
ST
11227 { ac_try='test -z "$ac_c_werror_flag"
11228 || test ! -s conftest.err'
35996d22
AS
11229 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11230 (eval $ac_try) 2>&5
11231 ac_status=$?
11232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11233 (exit $ac_status); }; } &&
11234 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
11235 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11236 (eval $ac_try) 2>&5
11237 ac_status=$?
11238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11239 (exit $ac_status); }; }; then
11240 ac_header_compiler=yes
11241else
11242 echo "$as_me: failed program was:" >&5
19650fd6
AS
11243sed 's/^/| /' conftest.$ac_ext >&5
11244
c0d27fcc
MR
11245ac_header_compiler=no
11246fi
35996d22 11247rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
11248echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11249echo "${ECHO_T}$ac_header_compiler" >&6
11250
11251# Is the header present?
11252echo "$as_me:$LINENO: checking X11/xpm.h presence" >&5
11253echo $ECHO_N "checking X11/xpm.h presence... $ECHO_C" >&6
11254cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11255/* confdefs.h. */
11256_ACEOF
11257cat confdefs.h >>conftest.$ac_ext
11258cat >>conftest.$ac_ext <<_ACEOF
11259/* end confdefs.h. */
98418dba
CW
11260#include <X11/xpm.h>
11261_ACEOF
c0d27fcc 11262if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
11263 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11264 ac_status=$?
6bae0ccf 11265 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
11266 rm -f conftest.er1
11267 cat conftest.err >&5
c0d27fcc 11268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
11269 (exit $ac_status); } >/dev/null; then
11270 if test -s conftest.err; then
11271 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 11272 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
11273 else
11274 ac_cpp_err=
11275 fi
11276else
11277 ac_cpp_err=yes
11278fi
11279if test -z "$ac_cpp_err"; then
c0d27fcc 11280 ac_header_preproc=yes
98418dba
CW
11281else
11282 echo "$as_me: failed program was:" >&5
19650fd6
AS
11283sed 's/^/| /' conftest.$ac_ext >&5
11284
c0d27fcc 11285 ac_header_preproc=no
98418dba
CW
11286fi
11287rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
11288echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11289echo "${ECHO_T}$ac_header_preproc" >&6
11290
11291# So? What about this header?
35996d22
AS
11292case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11293 yes:no: )
c0d27fcc
MR
11294 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: accepted by the compiler, rejected by the preprocessor!" >&5
11295echo "$as_me: WARNING: X11/xpm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
11296 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: proceeding with the compiler's result" >&5
11297echo "$as_me: WARNING: X11/xpm.h: proceeding with the compiler's result" >&2;}
11298 ac_header_preproc=yes
19650fd6 11299 ;;
35996d22 11300 no:yes:* )
c0d27fcc
MR
11301 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: present but cannot be compiled" >&5
11302echo "$as_me: WARNING: X11/xpm.h: present but cannot be compiled" >&2;}
35996d22
AS
11303 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: check for missing prerequisite headers?" >&5
11304echo "$as_me: WARNING: X11/xpm.h: check for missing prerequisite headers?" >&2;}
11305 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: see the Autoconf documentation" >&5
11306echo "$as_me: WARNING: X11/xpm.h: see the Autoconf documentation" >&2;}
11307 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: section \"Present But Cannot Be Compiled\"" >&5
11308echo "$as_me: WARNING: X11/xpm.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 11309 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&5
19650fd6 11310echo "$as_me: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&2;}
35996d22
AS
11311 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: in the future, the compiler will take precedence" >&5
11312echo "$as_me: WARNING: X11/xpm.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
11313 (
11314 cat <<\_ASBOX
35996d22
AS
11315## ------------------------------------------ ##
11316## Report this to the AC_PACKAGE_NAME lists. ##
11317## ------------------------------------------ ##
19650fd6
AS
11318_ASBOX
11319 ) |
11320 sed "s/^/$as_me: WARNING: /" >&2
11321 ;;
c0d27fcc
MR
11322esac
11323echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
11324echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6
11325if test "${ac_cv_header_X11_xpm_h+set}" = set; then
11326 echo $ECHO_N "(cached) $ECHO_C" >&6
11327else
11328 ac_cv_header_X11_xpm_h=$ac_header_preproc
ba4481b5 11329fi
c0d27fcc 11330echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
98418dba 11331echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6
c0d27fcc
MR
11332
11333fi
98418dba 11334if test $ac_cv_header_X11_xpm_h = yes; then
c0d27fcc 11335 echo "$as_me:$LINENO: checking for XpmReadFileToPixmap in -lXpm" >&5
98418dba
CW
11336echo $ECHO_N "checking for XpmReadFileToPixmap in -lXpm... $ECHO_C" >&6
11337if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then
503d2be0 11338 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 11339else
98418dba
CW
11340 ac_check_lib_save_LIBS=$LIBS
11341LIBS="-lXpm -lX11 $LIBS"
11342cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11343/* confdefs.h. */
11344_ACEOF
11345cat confdefs.h >>conftest.$ac_ext
11346cat >>conftest.$ac_ext <<_ACEOF
11347/* end confdefs.h. */
98418dba 11348
ba4481b5 11349/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
11350#ifdef __cplusplus
11351extern "C"
11352#endif
ba4481b5 11353/* We use char because int might match the return type of a gcc2
503d2be0 11354 builtin and then its argument prototype would still apply. */
98418dba 11355char XpmReadFileToPixmap ();
503d2be0
AS
11356int
11357main ()
11358{
98418dba 11359XpmReadFileToPixmap ();
503d2be0
AS
11360 ;
11361 return 0;
11362}
11363_ACEOF
11364rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 11365if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 11366 (eval $ac_link) 2>conftest.er1
503d2be0 11367 ac_status=$?
35996d22
AS
11368 grep -v '^ *+' conftest.er1 >conftest.err
11369 rm -f conftest.er1
11370 cat conftest.err >&5
c0d27fcc 11371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 11372 (exit $ac_status); } &&
551ffc27
ST
11373 { ac_try='test -z "$ac_c_werror_flag"
11374 || test ! -s conftest.err'
35996d22
AS
11375 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11376 (eval $ac_try) 2>&5
11377 ac_status=$?
11378 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11379 (exit $ac_status); }; } &&
11380 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 11381 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
11382 (eval $ac_try) 2>&5
11383 ac_status=$?
c0d27fcc 11384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 11385 (exit $ac_status); }; }; then
98418dba 11386 ac_cv_lib_Xpm_XpmReadFileToPixmap=yes
503d2be0
AS
11387else
11388 echo "$as_me: failed program was:" >&5
19650fd6
AS
11389sed 's/^/| /' conftest.$ac_ext >&5
11390
98418dba 11391ac_cv_lib_Xpm_XpmReadFileToPixmap=no
503d2be0 11392fi
35996d22
AS
11393rm -f conftest.err conftest.$ac_objext \
11394 conftest$ac_exeext conftest.$ac_ext
98418dba 11395LIBS=$ac_check_lib_save_LIBS
503d2be0 11396fi
c0d27fcc 11397echo "$as_me:$LINENO: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5
98418dba
CW
11398echo "${ECHO_T}$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6
11399if test $ac_cv_lib_Xpm_XpmReadFileToPixmap = yes; then
11400 HAVE_XPM=yes
ba4481b5
DL
11401fi
11402
98418dba
CW
11403fi
11404
c0d27fcc 11405
98418dba 11406 if test "${HAVE_XPM}" = "yes"; then
c0d27fcc 11407 echo "$as_me:$LINENO: checking for XpmReturnAllocPixels preprocessor define" >&5
98418dba
CW
11408echo $ECHO_N "checking for XpmReturnAllocPixels preprocessor define... $ECHO_C" >&6
11409 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11410/* confdefs.h. */
11411_ACEOF
11412cat confdefs.h >>conftest.$ac_ext
11413cat >>conftest.$ac_ext <<_ACEOF
11414/* end confdefs.h. */
98418dba
CW
11415#include "X11/xpm.h"
11416#ifndef XpmReturnAllocPixels
11417no_return_alloc_pixels
503d2be0 11418#endif
ba4481b5 11419
98418dba
CW
11420_ACEOF
11421if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 11422 $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then
98418dba
CW
11423 HAVE_XPM=no
11424else
11425 HAVE_XPM=yes
11426fi
11427rm -f conftest*
ba4481b5 11428
c0d27fcc 11429
98418dba 11430 if test "${HAVE_XPM}" = "yes"; then
c0d27fcc 11431 echo "$as_me:$LINENO: result: yes" >&5
98418dba
CW
11432echo "${ECHO_T}yes" >&6
11433 else
c0d27fcc 11434 echo "$as_me:$LINENO: result: no" >&5
98418dba
CW
11435echo "${ECHO_T}no" >&6
11436 fi
11437 fi
11438 fi
11439
11440 if test "${HAVE_XPM}" = "yes"; then
b936fae4 11441
c0d27fcc 11442cat >>confdefs.h <<\_ACEOF
98418dba 11443#define HAVE_XPM 1
c0d27fcc 11444_ACEOF
98418dba
CW
11445
11446 fi
11447fi
11448
11449### Use -ljpeg if available, unless `--with-jpeg=no'.
11450HAVE_JPEG=no
11451if test "${HAVE_X11}" = "yes"; then
11452 if test "${with_jpeg}" != "no"; then
c0d27fcc
MR
11453 if test "${ac_cv_header_jerror_h+set}" = set; then
11454 echo "$as_me:$LINENO: checking for jerror.h" >&5
98418dba
CW
11455echo $ECHO_N "checking for jerror.h... $ECHO_C" >&6
11456if test "${ac_cv_header_jerror_h+set}" = set; then
11457 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
11458fi
11459echo "$as_me:$LINENO: result: $ac_cv_header_jerror_h" >&5
11460echo "${ECHO_T}$ac_cv_header_jerror_h" >&6
503d2be0 11461else
c0d27fcc
MR
11462 # Is the header compilable?
11463echo "$as_me:$LINENO: checking jerror.h usability" >&5
11464echo $ECHO_N "checking jerror.h usability... $ECHO_C" >&6
11465cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11466/* confdefs.h. */
11467_ACEOF
11468cat confdefs.h >>conftest.$ac_ext
11469cat >>conftest.$ac_ext <<_ACEOF
11470/* end confdefs.h. */
c0d27fcc
MR
11471$ac_includes_default
11472#include <jerror.h>
11473_ACEOF
11474rm -f conftest.$ac_objext
11475if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 11476 (eval $ac_compile) 2>conftest.er1
c0d27fcc 11477 ac_status=$?
35996d22
AS
11478 grep -v '^ *+' conftest.er1 >conftest.err
11479 rm -f conftest.er1
11480 cat conftest.err >&5
c0d27fcc
MR
11481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11482 (exit $ac_status); } &&
551ffc27
ST
11483 { ac_try='test -z "$ac_c_werror_flag"
11484 || test ! -s conftest.err'
35996d22
AS
11485 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11486 (eval $ac_try) 2>&5
11487 ac_status=$?
11488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11489 (exit $ac_status); }; } &&
11490 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
11491 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11492 (eval $ac_try) 2>&5
11493 ac_status=$?
11494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11495 (exit $ac_status); }; }; then
11496 ac_header_compiler=yes
11497else
11498 echo "$as_me: failed program was:" >&5
19650fd6
AS
11499sed 's/^/| /' conftest.$ac_ext >&5
11500
c0d27fcc
MR
11501ac_header_compiler=no
11502fi
35996d22 11503rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
11504echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11505echo "${ECHO_T}$ac_header_compiler" >&6
11506
11507# Is the header present?
11508echo "$as_me:$LINENO: checking jerror.h presence" >&5
11509echo $ECHO_N "checking jerror.h presence... $ECHO_C" >&6
11510cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11511/* confdefs.h. */
11512_ACEOF
11513cat confdefs.h >>conftest.$ac_ext
11514cat >>conftest.$ac_ext <<_ACEOF
11515/* end confdefs.h. */
98418dba
CW
11516#include <jerror.h>
11517_ACEOF
c0d27fcc 11518if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
11519 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11520 ac_status=$?
6bae0ccf 11521 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
11522 rm -f conftest.er1
11523 cat conftest.err >&5
c0d27fcc 11524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
11525 (exit $ac_status); } >/dev/null; then
11526 if test -s conftest.err; then
11527 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 11528 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
11529 else
11530 ac_cpp_err=
11531 fi
11532else
11533 ac_cpp_err=yes
503d2be0 11534fi
98418dba 11535if test -z "$ac_cpp_err"; then
c0d27fcc 11536 ac_header_preproc=yes
ba4481b5 11537else
98418dba 11538 echo "$as_me: failed program was:" >&5
19650fd6
AS
11539sed 's/^/| /' conftest.$ac_ext >&5
11540
c0d27fcc 11541 ac_header_preproc=no
98418dba
CW
11542fi
11543rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
11544echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11545echo "${ECHO_T}$ac_header_preproc" >&6
11546
11547# So? What about this header?
35996d22
AS
11548case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11549 yes:no: )
c0d27fcc
MR
11550 { echo "$as_me:$LINENO: WARNING: jerror.h: accepted by the compiler, rejected by the preprocessor!" >&5
11551echo "$as_me: WARNING: jerror.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
11552 { echo "$as_me:$LINENO: WARNING: jerror.h: proceeding with the compiler's result" >&5
11553echo "$as_me: WARNING: jerror.h: proceeding with the compiler's result" >&2;}
11554 ac_header_preproc=yes
19650fd6 11555 ;;
35996d22 11556 no:yes:* )
c0d27fcc
MR
11557 { echo "$as_me:$LINENO: WARNING: jerror.h: present but cannot be compiled" >&5
11558echo "$as_me: WARNING: jerror.h: present but cannot be compiled" >&2;}
35996d22
AS
11559 { echo "$as_me:$LINENO: WARNING: jerror.h: check for missing prerequisite headers?" >&5
11560echo "$as_me: WARNING: jerror.h: check for missing prerequisite headers?" >&2;}
11561 { echo "$as_me:$LINENO: WARNING: jerror.h: see the Autoconf documentation" >&5
11562echo "$as_me: WARNING: jerror.h: see the Autoconf documentation" >&2;}
11563 { echo "$as_me:$LINENO: WARNING: jerror.h: section \"Present But Cannot Be Compiled\"" >&5
11564echo "$as_me: WARNING: jerror.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 11565 { echo "$as_me:$LINENO: WARNING: jerror.h: proceeding with the preprocessor's result" >&5
19650fd6 11566echo "$as_me: WARNING: jerror.h: proceeding with the preprocessor's result" >&2;}
35996d22
AS
11567 { echo "$as_me:$LINENO: WARNING: jerror.h: in the future, the compiler will take precedence" >&5
11568echo "$as_me: WARNING: jerror.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
11569 (
11570 cat <<\_ASBOX
35996d22
AS
11571## ------------------------------------------ ##
11572## Report this to the AC_PACKAGE_NAME lists. ##
11573## ------------------------------------------ ##
19650fd6
AS
11574_ASBOX
11575 ) |
11576 sed "s/^/$as_me: WARNING: /" >&2
11577 ;;
c0d27fcc
MR
11578esac
11579echo "$as_me:$LINENO: checking for jerror.h" >&5
11580echo $ECHO_N "checking for jerror.h... $ECHO_C" >&6
11581if test "${ac_cv_header_jerror_h+set}" = set; then
11582 echo $ECHO_N "(cached) $ECHO_C" >&6
11583else
11584 ac_cv_header_jerror_h=$ac_header_preproc
ba4481b5 11585fi
c0d27fcc 11586echo "$as_me:$LINENO: result: $ac_cv_header_jerror_h" >&5
98418dba 11587echo "${ECHO_T}$ac_cv_header_jerror_h" >&6
c0d27fcc
MR
11588
11589fi
98418dba 11590if test $ac_cv_header_jerror_h = yes; then
c0d27fcc 11591 echo "$as_me:$LINENO: checking for jpeg_destroy_compress in -ljpeg" >&5
98418dba
CW
11592echo $ECHO_N "checking for jpeg_destroy_compress in -ljpeg... $ECHO_C" >&6
11593if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then
503d2be0 11594 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 11595else
98418dba
CW
11596 ac_check_lib_save_LIBS=$LIBS
11597LIBS="-ljpeg $LIBS"
11598cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11599/* confdefs.h. */
11600_ACEOF
11601cat confdefs.h >>conftest.$ac_ext
11602cat >>conftest.$ac_ext <<_ACEOF
11603/* end confdefs.h. */
98418dba
CW
11604
11605/* Override any gcc2 internal prototype to avoid an error. */
11606#ifdef __cplusplus
11607extern "C"
11608#endif
11609/* We use char because int might match the return type of a gcc2
11610 builtin and then its argument prototype would still apply. */
11611char jpeg_destroy_compress ();
503d2be0
AS
11612int
11613main ()
11614{
98418dba 11615jpeg_destroy_compress ();
503d2be0
AS
11616 ;
11617 return 0;
11618}
11619_ACEOF
11620rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 11621if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 11622 (eval $ac_link) 2>conftest.er1
503d2be0 11623 ac_status=$?
35996d22
AS
11624 grep -v '^ *+' conftest.er1 >conftest.err
11625 rm -f conftest.er1
11626 cat conftest.err >&5
c0d27fcc 11627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 11628 (exit $ac_status); } &&
551ffc27
ST
11629 { ac_try='test -z "$ac_c_werror_flag"
11630 || test ! -s conftest.err'
35996d22
AS
11631 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11632 (eval $ac_try) 2>&5
11633 ac_status=$?
11634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11635 (exit $ac_status); }; } &&
11636 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 11637 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
11638 (eval $ac_try) 2>&5
11639 ac_status=$?
c0d27fcc 11640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 11641 (exit $ac_status); }; }; then
98418dba 11642 ac_cv_lib_jpeg_jpeg_destroy_compress=yes
ba4481b5 11643else
503d2be0 11644 echo "$as_me: failed program was:" >&5
19650fd6
AS
11645sed 's/^/| /' conftest.$ac_ext >&5
11646
98418dba 11647ac_cv_lib_jpeg_jpeg_destroy_compress=no
ba4481b5 11648fi
35996d22
AS
11649rm -f conftest.err conftest.$ac_objext \
11650 conftest$ac_exeext conftest.$ac_ext
98418dba 11651LIBS=$ac_check_lib_save_LIBS
ba4481b5 11652fi
c0d27fcc 11653echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5
98418dba
CW
11654echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6
11655if test $ac_cv_lib_jpeg_jpeg_destroy_compress = yes; then
11656 HAVE_JPEG=yes
ba4481b5 11657fi
98418dba 11658
ba4481b5 11659fi
98418dba 11660
c0d27fcc 11661
ba4481b5 11662 fi
ba4481b5 11663
c0d27fcc 11664
98418dba 11665 if test "${HAVE_JPEG}" = "yes"; then
c0d27fcc 11666 cat >>confdefs.h <<\_ACEOF
98418dba 11667#define HAVE_JPEG 1
c0d27fcc 11668_ACEOF
98418dba
CW
11669
11670 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11671/* confdefs.h. */
11672_ACEOF
11673cat confdefs.h >>conftest.$ac_ext
11674cat >>conftest.$ac_ext <<_ACEOF
11675/* end confdefs.h. */
22044edf 11676#include <jpeglib.h>
98418dba
CW
11677 version=JPEG_LIB_VERSION
11678
11679_ACEOF
11680if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 11681 $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then
c0d27fcc 11682 cat >>confdefs.h <<\_ACEOF
98418dba 11683#define HAVE_JPEG 1
c0d27fcc 11684_ACEOF
ba4481b5 11685
98418dba 11686else
c0d27fcc 11687 { echo "$as_me:$LINENO: WARNING: libjpeg found, but not version 6b or later" >&5
98418dba
CW
11688echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;}
11689 HAVE_JPEG=no
ba4481b5 11690fi
98418dba 11691rm -f conftest*
ba4481b5 11692
98418dba
CW
11693 fi
11694fi
503d2be0 11695
98418dba
CW
11696### Use -lpng if available, unless `--with-png=no'.
11697HAVE_PNG=no
11698if test "${HAVE_X11}" = "yes"; then
11699 if test "${with_png}" != "no"; then
f57bd967
DL
11700 # Debian unstable as of July 2003 has multiple libpngs, and puts png.h
11701 # in /usr/include/libpng.
11702
11703
11704for ac_header in png.h libpng/png.h
11705do
11706as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11707if eval "test \"\${$as_ac_Header+set}\" = set"; then
11708 echo "$as_me:$LINENO: checking for $ac_header" >&5
11709echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11710if eval "test \"\${$as_ac_Header+set}\" = set"; then
503d2be0 11711 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 11712fi
f57bd967
DL
11713echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
11714echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
503d2be0 11715else
c0d27fcc 11716 # Is the header compilable?
f57bd967
DL
11717echo "$as_me:$LINENO: checking $ac_header usability" >&5
11718echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
c0d27fcc 11719cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11720/* confdefs.h. */
11721_ACEOF
11722cat confdefs.h >>conftest.$ac_ext
11723cat >>conftest.$ac_ext <<_ACEOF
11724/* end confdefs.h. */
c0d27fcc 11725$ac_includes_default
f57bd967 11726#include <$ac_header>
c0d27fcc
MR
11727_ACEOF
11728rm -f conftest.$ac_objext
11729if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 11730 (eval $ac_compile) 2>conftest.er1
c0d27fcc 11731 ac_status=$?
35996d22
AS
11732 grep -v '^ *+' conftest.er1 >conftest.err
11733 rm -f conftest.er1
11734 cat conftest.err >&5
c0d27fcc
MR
11735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11736 (exit $ac_status); } &&
551ffc27
ST
11737 { ac_try='test -z "$ac_c_werror_flag"
11738 || test ! -s conftest.err'
35996d22
AS
11739 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11740 (eval $ac_try) 2>&5
11741 ac_status=$?
11742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11743 (exit $ac_status); }; } &&
11744 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
11745 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11746 (eval $ac_try) 2>&5
11747 ac_status=$?
11748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11749 (exit $ac_status); }; }; then
11750 ac_header_compiler=yes
11751else
11752 echo "$as_me: failed program was:" >&5
19650fd6
AS
11753sed 's/^/| /' conftest.$ac_ext >&5
11754
c0d27fcc
MR
11755ac_header_compiler=no
11756fi
35996d22 11757rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
11758echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11759echo "${ECHO_T}$ac_header_compiler" >&6
11760
11761# Is the header present?
f57bd967
DL
11762echo "$as_me:$LINENO: checking $ac_header presence" >&5
11763echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
c0d27fcc 11764cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11765/* confdefs.h. */
11766_ACEOF
11767cat confdefs.h >>conftest.$ac_ext
11768cat >>conftest.$ac_ext <<_ACEOF
11769/* end confdefs.h. */
f57bd967 11770#include <$ac_header>
503d2be0 11771_ACEOF
c0d27fcc 11772if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
11773 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11774 ac_status=$?
6bae0ccf 11775 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
11776 rm -f conftest.er1
11777 cat conftest.err >&5
c0d27fcc 11778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
11779 (exit $ac_status); } >/dev/null; then
11780 if test -s conftest.err; then
11781 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 11782 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
11783 else
11784 ac_cpp_err=
11785 fi
11786else
11787 ac_cpp_err=yes
11788fi
11789if test -z "$ac_cpp_err"; then
c0d27fcc 11790 ac_header_preproc=yes
503d2be0
AS
11791else
11792 echo "$as_me: failed program was:" >&5
19650fd6
AS
11793sed 's/^/| /' conftest.$ac_ext >&5
11794
c0d27fcc 11795 ac_header_preproc=no
ba4481b5 11796fi
503d2be0 11797rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
11798echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11799echo "${ECHO_T}$ac_header_preproc" >&6
11800
11801# So? What about this header?
35996d22
AS
11802case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11803 yes:no: )
f57bd967
DL
11804 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11805echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
11806 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
11807echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
11808 ac_header_preproc=yes
19650fd6 11809 ;;
35996d22 11810 no:yes:* )
f57bd967
DL
11811 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
11812echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
11813 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
11814echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
11815 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
11816echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
11817 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
11818echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
f57bd967 11819 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 11820echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
11821 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
11822echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
11823 (
11824 cat <<\_ASBOX
35996d22
AS
11825## ------------------------------------------ ##
11826## Report this to the AC_PACKAGE_NAME lists. ##
11827## ------------------------------------------ ##
19650fd6
AS
11828_ASBOX
11829 ) |
11830 sed "s/^/$as_me: WARNING: /" >&2
11831 ;;
c0d27fcc 11832esac
f57bd967
DL
11833echo "$as_me:$LINENO: checking for $ac_header" >&5
11834echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11835if eval "test \"\${$as_ac_Header+set}\" = set"; then
c0d27fcc
MR
11836 echo $ECHO_N "(cached) $ECHO_C" >&6
11837else
35996d22 11838 eval "$as_ac_Header=\$ac_header_preproc"
f57bd967
DL
11839fi
11840echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
11841echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11842
ba4481b5 11843fi
f57bd967
DL
11844if test `eval echo '${'$as_ac_Header'}'` = yes; then
11845 cat >>confdefs.h <<_ACEOF
11846#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11847_ACEOF
c0d27fcc
MR
11848
11849fi
f57bd967
DL
11850
11851done
11852
11853 if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then
11854 echo "$as_me:$LINENO: checking for png_get_channels in -lpng" >&5
98418dba
CW
11855echo $ECHO_N "checking for png_get_channels in -lpng... $ECHO_C" >&6
11856if test "${ac_cv_lib_png_png_get_channels+set}" = set; then
503d2be0 11857 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 11858else
98418dba
CW
11859 ac_check_lib_save_LIBS=$LIBS
11860LIBS="-lpng -lz -lm $LIBS"
11861cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11862/* confdefs.h. */
11863_ACEOF
11864cat confdefs.h >>conftest.$ac_ext
11865cat >>conftest.$ac_ext <<_ACEOF
11866/* end confdefs.h. */
98418dba 11867
ba4481b5 11868/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
11869#ifdef __cplusplus
11870extern "C"
11871#endif
ba4481b5 11872/* We use char because int might match the return type of a gcc2
503d2be0 11873 builtin and then its argument prototype would still apply. */
98418dba 11874char png_get_channels ();
503d2be0
AS
11875int
11876main ()
11877{
98418dba 11878png_get_channels ();
503d2be0
AS
11879 ;
11880 return 0;
11881}
11882_ACEOF
11883rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 11884if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 11885 (eval $ac_link) 2>conftest.er1
503d2be0 11886 ac_status=$?
35996d22
AS
11887 grep -v '^ *+' conftest.er1 >conftest.err
11888 rm -f conftest.er1
11889 cat conftest.err >&5
c0d27fcc 11890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 11891 (exit $ac_status); } &&
551ffc27
ST
11892 { ac_try='test -z "$ac_c_werror_flag"
11893 || test ! -s conftest.err'
35996d22
AS
11894 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11895 (eval $ac_try) 2>&5
11896 ac_status=$?
11897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11898 (exit $ac_status); }; } &&
11899 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 11900 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
11901 (eval $ac_try) 2>&5
11902 ac_status=$?
c0d27fcc 11903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 11904 (exit $ac_status); }; }; then
98418dba 11905 ac_cv_lib_png_png_get_channels=yes
73b77ee5 11906else
98418dba 11907 echo "$as_me: failed program was:" >&5
19650fd6
AS
11908sed 's/^/| /' conftest.$ac_ext >&5
11909
98418dba 11910ac_cv_lib_png_png_get_channels=no
73b77ee5 11911fi
35996d22
AS
11912rm -f conftest.err conftest.$ac_objext \
11913 conftest$ac_exeext conftest.$ac_ext
98418dba 11914LIBS=$ac_check_lib_save_LIBS
73b77ee5 11915fi
c0d27fcc 11916echo "$as_me:$LINENO: result: $ac_cv_lib_png_png_get_channels" >&5
98418dba
CW
11917echo "${ECHO_T}$ac_cv_lib_png_png_get_channels" >&6
11918if test $ac_cv_lib_png_png_get_channels = yes; then
11919 HAVE_PNG=yes
73b77ee5 11920fi
503d2be0 11921
f57bd967 11922 fi
98418dba
CW
11923 fi
11924
11925 if test "${HAVE_PNG}" = "yes"; then
b936fae4 11926
c0d27fcc 11927cat >>confdefs.h <<\_ACEOF
98418dba 11928#define HAVE_PNG 1
c0d27fcc 11929_ACEOF
73b77ee5 11930
98418dba 11931 fi
73b77ee5
GM
11932fi
11933
98418dba
CW
11934### Use -ltiff if available, unless `--with-tiff=no'.
11935HAVE_TIFF=no
11936if test "${HAVE_X11}" = "yes"; then
11937 if test "${with_tiff}" != "no"; then
c0d27fcc
MR
11938 if test "${ac_cv_header_tiffio_h+set}" = set; then
11939 echo "$as_me:$LINENO: checking for tiffio.h" >&5
98418dba
CW
11940echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6
11941if test "${ac_cv_header_tiffio_h+set}" = set; then
11942 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
11943fi
11944echo "$as_me:$LINENO: result: $ac_cv_header_tiffio_h" >&5
11945echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6
98418dba 11946else
c0d27fcc
MR
11947 # Is the header compilable?
11948echo "$as_me:$LINENO: checking tiffio.h usability" >&5
11949echo $ECHO_N "checking tiffio.h usability... $ECHO_C" >&6
11950cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11951/* confdefs.h. */
11952_ACEOF
11953cat confdefs.h >>conftest.$ac_ext
11954cat >>conftest.$ac_ext <<_ACEOF
11955/* end confdefs.h. */
c0d27fcc
MR
11956$ac_includes_default
11957#include <tiffio.h>
11958_ACEOF
11959rm -f conftest.$ac_objext
11960if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 11961 (eval $ac_compile) 2>conftest.er1
c0d27fcc 11962 ac_status=$?
35996d22
AS
11963 grep -v '^ *+' conftest.er1 >conftest.err
11964 rm -f conftest.er1
11965 cat conftest.err >&5
c0d27fcc
MR
11966 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11967 (exit $ac_status); } &&
551ffc27
ST
11968 { ac_try='test -z "$ac_c_werror_flag"
11969 || test ! -s conftest.err'
35996d22
AS
11970 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11971 (eval $ac_try) 2>&5
11972 ac_status=$?
11973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11974 (exit $ac_status); }; } &&
11975 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
11976 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11977 (eval $ac_try) 2>&5
11978 ac_status=$?
11979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11980 (exit $ac_status); }; }; then
11981 ac_header_compiler=yes
11982else
11983 echo "$as_me: failed program was:" >&5
19650fd6
AS
11984sed 's/^/| /' conftest.$ac_ext >&5
11985
c0d27fcc
MR
11986ac_header_compiler=no
11987fi
35996d22 11988rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
11989echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11990echo "${ECHO_T}$ac_header_compiler" >&6
11991
11992# Is the header present?
11993echo "$as_me:$LINENO: checking tiffio.h presence" >&5
11994echo $ECHO_N "checking tiffio.h presence... $ECHO_C" >&6
11995cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11996/* confdefs.h. */
11997_ACEOF
11998cat confdefs.h >>conftest.$ac_ext
11999cat >>conftest.$ac_ext <<_ACEOF
12000/* end confdefs.h. */
98418dba
CW
12001#include <tiffio.h>
12002_ACEOF
c0d27fcc 12003if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
12004 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12005 ac_status=$?
6bae0ccf 12006 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
12007 rm -f conftest.er1
12008 cat conftest.err >&5
c0d27fcc 12009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
12010 (exit $ac_status); } >/dev/null; then
12011 if test -s conftest.err; then
12012 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 12013 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
12014 else
12015 ac_cpp_err=
12016 fi
12017else
12018 ac_cpp_err=yes
12019fi
12020if test -z "$ac_cpp_err"; then
c0d27fcc 12021 ac_header_preproc=yes
98418dba
CW
12022else
12023 echo "$as_me: failed program was:" >&5
19650fd6
AS
12024sed 's/^/| /' conftest.$ac_ext >&5
12025
c0d27fcc 12026 ac_header_preproc=no
98418dba
CW
12027fi
12028rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
12029echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12030echo "${ECHO_T}$ac_header_preproc" >&6
12031
12032# So? What about this header?
35996d22
AS
12033case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12034 yes:no: )
c0d27fcc
MR
12035 { echo "$as_me:$LINENO: WARNING: tiffio.h: accepted by the compiler, rejected by the preprocessor!" >&5
12036echo "$as_me: WARNING: tiffio.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
12037 { echo "$as_me:$LINENO: WARNING: tiffio.h: proceeding with the compiler's result" >&5
12038echo "$as_me: WARNING: tiffio.h: proceeding with the compiler's result" >&2;}
12039 ac_header_preproc=yes
19650fd6 12040 ;;
35996d22 12041 no:yes:* )
c0d27fcc
MR
12042 { echo "$as_me:$LINENO: WARNING: tiffio.h: present but cannot be compiled" >&5
12043echo "$as_me: WARNING: tiffio.h: present but cannot be compiled" >&2;}
35996d22
AS
12044 { echo "$as_me:$LINENO: WARNING: tiffio.h: check for missing prerequisite headers?" >&5
12045echo "$as_me: WARNING: tiffio.h: check for missing prerequisite headers?" >&2;}
12046 { echo "$as_me:$LINENO: WARNING: tiffio.h: see the Autoconf documentation" >&5
12047echo "$as_me: WARNING: tiffio.h: see the Autoconf documentation" >&2;}
12048 { echo "$as_me:$LINENO: WARNING: tiffio.h: section \"Present But Cannot Be Compiled\"" >&5
12049echo "$as_me: WARNING: tiffio.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 12050 { echo "$as_me:$LINENO: WARNING: tiffio.h: proceeding with the preprocessor's result" >&5
19650fd6 12051echo "$as_me: WARNING: tiffio.h: proceeding with the preprocessor's result" >&2;}
35996d22
AS
12052 { echo "$as_me:$LINENO: WARNING: tiffio.h: in the future, the compiler will take precedence" >&5
12053echo "$as_me: WARNING: tiffio.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
12054 (
12055 cat <<\_ASBOX
35996d22
AS
12056## ------------------------------------------ ##
12057## Report this to the AC_PACKAGE_NAME lists. ##
12058## ------------------------------------------ ##
19650fd6
AS
12059_ASBOX
12060 ) |
12061 sed "s/^/$as_me: WARNING: /" >&2
12062 ;;
c0d27fcc
MR
12063esac
12064echo "$as_me:$LINENO: checking for tiffio.h" >&5
12065echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6
12066if test "${ac_cv_header_tiffio_h+set}" = set; then
12067 echo $ECHO_N "(cached) $ECHO_C" >&6
12068else
12069 ac_cv_header_tiffio_h=$ac_header_preproc
98418dba 12070fi
c0d27fcc 12071echo "$as_me:$LINENO: result: $ac_cv_header_tiffio_h" >&5
98418dba 12072echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6
c0d27fcc
MR
12073
12074fi
98418dba
CW
12075if test $ac_cv_header_tiffio_h = yes; then
12076 tifflibs="-lz -lm"
12077 # At least one tiff package requires the jpeg library.
12078 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
c0d27fcc 12079 echo "$as_me:$LINENO: checking for TIFFGetVersion in -ltiff" >&5
98418dba
CW
12080echo $ECHO_N "checking for TIFFGetVersion in -ltiff... $ECHO_C" >&6
12081if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then
503d2be0 12082 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 12083else
503d2be0 12084 ac_check_lib_save_LIBS=$LIBS
98418dba 12085LIBS="-ltiff $tifflibs $LIBS"
503d2be0 12086cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12087/* confdefs.h. */
12088_ACEOF
12089cat confdefs.h >>conftest.$ac_ext
12090cat >>conftest.$ac_ext <<_ACEOF
12091/* end confdefs.h. */
503d2be0 12092
73b77ee5 12093/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
12094#ifdef __cplusplus
12095extern "C"
12096#endif
73b77ee5 12097/* We use char because int might match the return type of a gcc2
503d2be0 12098 builtin and then its argument prototype would still apply. */
98418dba 12099char TIFFGetVersion ();
503d2be0
AS
12100int
12101main ()
12102{
98418dba 12103TIFFGetVersion ();
503d2be0
AS
12104 ;
12105 return 0;
12106}
12107_ACEOF
12108rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 12109if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 12110 (eval $ac_link) 2>conftest.er1
503d2be0 12111 ac_status=$?
35996d22
AS
12112 grep -v '^ *+' conftest.er1 >conftest.err
12113 rm -f conftest.er1
12114 cat conftest.err >&5
c0d27fcc 12115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12116 (exit $ac_status); } &&
551ffc27
ST
12117 { ac_try='test -z "$ac_c_werror_flag"
12118 || test ! -s conftest.err'
35996d22
AS
12119 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12120 (eval $ac_try) 2>&5
12121 ac_status=$?
12122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12123 (exit $ac_status); }; } &&
12124 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 12125 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
12126 (eval $ac_try) 2>&5
12127 ac_status=$?
c0d27fcc 12128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12129 (exit $ac_status); }; }; then
98418dba 12130 ac_cv_lib_tiff_TIFFGetVersion=yes
503d2be0
AS
12131else
12132 echo "$as_me: failed program was:" >&5
19650fd6
AS
12133sed 's/^/| /' conftest.$ac_ext >&5
12134
98418dba 12135ac_cv_lib_tiff_TIFFGetVersion=no
503d2be0 12136fi
35996d22
AS
12137rm -f conftest.err conftest.$ac_objext \
12138 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
12139LIBS=$ac_check_lib_save_LIBS
12140fi
c0d27fcc 12141echo "$as_me:$LINENO: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5
98418dba
CW
12142echo "${ECHO_T}$ac_cv_lib_tiff_TIFFGetVersion" >&6
12143if test $ac_cv_lib_tiff_TIFFGetVersion = yes; then
12144 HAVE_TIFF=yes
12145fi
12146
12147fi
73b77ee5 12148
c0d27fcc 12149
98418dba
CW
12150 fi
12151
12152 if test "${HAVE_TIFF}" = "yes"; then
b936fae4 12153
c0d27fcc 12154cat >>confdefs.h <<\_ACEOF
98418dba 12155#define HAVE_TIFF 1
c0d27fcc 12156_ACEOF
98418dba
CW
12157
12158 fi
73b77ee5
GM
12159fi
12160
98418dba
CW
12161### Use -lgif if available, unless `--with-gif=no'.
12162HAVE_GIF=no
12163if test "${HAVE_X11}" = "yes"; then
12164 if test "${with_gif}" != "no"; then
c0d27fcc
MR
12165 if test "${ac_cv_header_gif_lib_h+set}" = set; then
12166 echo "$as_me:$LINENO: checking for gif_lib.h" >&5
98418dba
CW
12167echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6
12168if test "${ac_cv_header_gif_lib_h+set}" = set; then
12169 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
12170fi
12171echo "$as_me:$LINENO: result: $ac_cv_header_gif_lib_h" >&5
12172echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6
98418dba 12173else
c0d27fcc
MR
12174 # Is the header compilable?
12175echo "$as_me:$LINENO: checking gif_lib.h usability" >&5
12176echo $ECHO_N "checking gif_lib.h usability... $ECHO_C" >&6
12177cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12178/* confdefs.h. */
12179_ACEOF
12180cat confdefs.h >>conftest.$ac_ext
12181cat >>conftest.$ac_ext <<_ACEOF
12182/* end confdefs.h. */
c0d27fcc
MR
12183$ac_includes_default
12184#include <gif_lib.h>
12185_ACEOF
12186rm -f conftest.$ac_objext
12187if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 12188 (eval $ac_compile) 2>conftest.er1
c0d27fcc 12189 ac_status=$?
35996d22
AS
12190 grep -v '^ *+' conftest.er1 >conftest.err
12191 rm -f conftest.er1
12192 cat conftest.err >&5
c0d27fcc
MR
12193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12194 (exit $ac_status); } &&
551ffc27
ST
12195 { ac_try='test -z "$ac_c_werror_flag"
12196 || test ! -s conftest.err'
35996d22
AS
12197 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12198 (eval $ac_try) 2>&5
12199 ac_status=$?
12200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12201 (exit $ac_status); }; } &&
12202 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
12203 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12204 (eval $ac_try) 2>&5
12205 ac_status=$?
12206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12207 (exit $ac_status); }; }; then
12208 ac_header_compiler=yes
12209else
12210 echo "$as_me: failed program was:" >&5
19650fd6
AS
12211sed 's/^/| /' conftest.$ac_ext >&5
12212
c0d27fcc
MR
12213ac_header_compiler=no
12214fi
35996d22 12215rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
12216echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12217echo "${ECHO_T}$ac_header_compiler" >&6
12218
12219# Is the header present?
12220echo "$as_me:$LINENO: checking gif_lib.h presence" >&5
12221echo $ECHO_N "checking gif_lib.h presence... $ECHO_C" >&6
12222cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12223/* confdefs.h. */
12224_ACEOF
12225cat confdefs.h >>conftest.$ac_ext
12226cat >>conftest.$ac_ext <<_ACEOF
12227/* end confdefs.h. */
98418dba
CW
12228#include <gif_lib.h>
12229_ACEOF
c0d27fcc 12230if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
12231 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12232 ac_status=$?
6bae0ccf 12233 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
12234 rm -f conftest.er1
12235 cat conftest.err >&5
c0d27fcc 12236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
12237 (exit $ac_status); } >/dev/null; then
12238 if test -s conftest.err; then
12239 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 12240 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
12241 else
12242 ac_cpp_err=
12243 fi
12244else
12245 ac_cpp_err=yes
12246fi
12247if test -z "$ac_cpp_err"; then
c0d27fcc 12248 ac_header_preproc=yes
98418dba
CW
12249else
12250 echo "$as_me: failed program was:" >&5
19650fd6
AS
12251sed 's/^/| /' conftest.$ac_ext >&5
12252
c0d27fcc 12253 ac_header_preproc=no
98418dba
CW
12254fi
12255rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
12256echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12257echo "${ECHO_T}$ac_header_preproc" >&6
12258
12259# So? What about this header?
35996d22
AS
12260case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12261 yes:no: )
c0d27fcc
MR
12262 { echo "$as_me:$LINENO: WARNING: gif_lib.h: accepted by the compiler, rejected by the preprocessor!" >&5
12263echo "$as_me: WARNING: gif_lib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
12264 { echo "$as_me:$LINENO: WARNING: gif_lib.h: proceeding with the compiler's result" >&5
12265echo "$as_me: WARNING: gif_lib.h: proceeding with the compiler's result" >&2;}
12266 ac_header_preproc=yes
19650fd6 12267 ;;
35996d22 12268 no:yes:* )
c0d27fcc
MR
12269 { echo "$as_me:$LINENO: WARNING: gif_lib.h: present but cannot be compiled" >&5
12270echo "$as_me: WARNING: gif_lib.h: present but cannot be compiled" >&2;}
35996d22
AS
12271 { echo "$as_me:$LINENO: WARNING: gif_lib.h: check for missing prerequisite headers?" >&5
12272echo "$as_me: WARNING: gif_lib.h: check for missing prerequisite headers?" >&2;}
12273 { echo "$as_me:$LINENO: WARNING: gif_lib.h: see the Autoconf documentation" >&5
12274echo "$as_me: WARNING: gif_lib.h: see the Autoconf documentation" >&2;}
12275 { echo "$as_me:$LINENO: WARNING: gif_lib.h: section \"Present But Cannot Be Compiled\"" >&5
12276echo "$as_me: WARNING: gif_lib.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 12277 { echo "$as_me:$LINENO: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&5
19650fd6 12278echo "$as_me: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&2;}
35996d22
AS
12279 { echo "$as_me:$LINENO: WARNING: gif_lib.h: in the future, the compiler will take precedence" >&5
12280echo "$as_me: WARNING: gif_lib.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
12281 (
12282 cat <<\_ASBOX
35996d22
AS
12283## ------------------------------------------ ##
12284## Report this to the AC_PACKAGE_NAME lists. ##
12285## ------------------------------------------ ##
19650fd6
AS
12286_ASBOX
12287 ) |
12288 sed "s/^/$as_me: WARNING: /" >&2
12289 ;;
c0d27fcc
MR
12290esac
12291echo "$as_me:$LINENO: checking for gif_lib.h" >&5
12292echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6
12293if test "${ac_cv_header_gif_lib_h+set}" = set; then
12294 echo $ECHO_N "(cached) $ECHO_C" >&6
12295else
12296 ac_cv_header_gif_lib_h=$ac_header_preproc
98418dba 12297fi
c0d27fcc 12298echo "$as_me:$LINENO: result: $ac_cv_header_gif_lib_h" >&5
98418dba 12299echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6
c0d27fcc
MR
12300
12301fi
98418dba
CW
12302if test $ac_cv_header_gif_lib_h = yes; then
12303 # EGifPutExtensionLast only exists from version libungif-4.1.0b1.
12304# Earlier versions can crash Emacs.
c0d27fcc 12305 echo "$as_me:$LINENO: checking for EGifPutExtensionLast in -lungif" >&5
98418dba
CW
12306echo $ECHO_N "checking for EGifPutExtensionLast in -lungif... $ECHO_C" >&6
12307if test "${ac_cv_lib_ungif_EGifPutExtensionLast+set}" = set; then
503d2be0 12308 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 12309else
503d2be0 12310 ac_check_lib_save_LIBS=$LIBS
98418dba 12311LIBS="-lungif $LIBS"
503d2be0 12312cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12313/* confdefs.h. */
12314_ACEOF
12315cat confdefs.h >>conftest.$ac_ext
12316cat >>conftest.$ac_ext <<_ACEOF
12317/* end confdefs.h. */
73b77ee5 12318
98418dba
CW
12319/* Override any gcc2 internal prototype to avoid an error. */
12320#ifdef __cplusplus
12321extern "C"
12322#endif
12323/* We use char because int might match the return type of a gcc2
12324 builtin and then its argument prototype would still apply. */
12325char EGifPutExtensionLast ();
503d2be0
AS
12326int
12327main ()
12328{
98418dba 12329EGifPutExtensionLast ();
503d2be0
AS
12330 ;
12331 return 0;
12332}
12333_ACEOF
12334rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 12335if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 12336 (eval $ac_link) 2>conftest.er1
503d2be0 12337 ac_status=$?
35996d22
AS
12338 grep -v '^ *+' conftest.er1 >conftest.err
12339 rm -f conftest.er1
12340 cat conftest.err >&5
c0d27fcc 12341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 12342 (exit $ac_status); } &&
551ffc27
ST
12343 { ac_try='test -z "$ac_c_werror_flag"
12344 || test ! -s conftest.err'
c0d27fcc 12345 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
12346 (eval $ac_try) 2>&5
12347 ac_status=$?
c0d27fcc 12348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
35996d22
AS
12349 (exit $ac_status); }; } &&
12350 { ac_try='test -s conftest$ac_exeext'
12351 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12352 (eval $ac_try) 2>&5
12353 ac_status=$?
12354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12355 (exit $ac_status); }; }; then
12356 ac_cv_lib_ungif_EGifPutExtensionLast=yes
12357else
98418dba 12358 echo "$as_me: failed program was:" >&5
19650fd6
AS
12359sed 's/^/| /' conftest.$ac_ext >&5
12360
98418dba
CW
12361ac_cv_lib_ungif_EGifPutExtensionLast=no
12362fi
35996d22
AS
12363rm -f conftest.err conftest.$ac_objext \
12364 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12365LIBS=$ac_check_lib_save_LIBS
12366fi
c0d27fcc 12367echo "$as_me:$LINENO: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5
98418dba
CW
12368echo "${ECHO_T}$ac_cv_lib_ungif_EGifPutExtensionLast" >&6
12369if test $ac_cv_lib_ungif_EGifPutExtensionLast = yes; then
12370 HAVE_GIF=yes
12371fi
12372
12373fi
12374
c0d27fcc 12375
98418dba
CW
12376 fi
12377
12378 if test "${HAVE_GIF}" = "yes"; then
b936fae4 12379
c0d27fcc 12380cat >>confdefs.h <<\_ACEOF
98418dba 12381#define HAVE_GIF 1
c0d27fcc 12382_ACEOF
98418dba
CW
12383
12384 fi
12385fi
12386
c0d27fcc
MR
12387### Use Mac OS X Carbon API to implement GUI.
12388HAVE_CARBON=no
12389if test "${with_carbon}" != "no"; then
12390 if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
12391 echo "$as_me:$LINENO: checking for Carbon/Carbon.h" >&5
12392echo $ECHO_N "checking for Carbon/Carbon.h... $ECHO_C" >&6
12393if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
12394 echo $ECHO_N "(cached) $ECHO_C" >&6
12395fi
12396echo "$as_me:$LINENO: result: $ac_cv_header_Carbon_Carbon_h" >&5
12397echo "${ECHO_T}$ac_cv_header_Carbon_Carbon_h" >&6
12398else
12399 # Is the header compilable?
12400echo "$as_me:$LINENO: checking Carbon/Carbon.h usability" >&5
12401echo $ECHO_N "checking Carbon/Carbon.h usability... $ECHO_C" >&6
12402cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12403/* confdefs.h. */
12404_ACEOF
12405cat confdefs.h >>conftest.$ac_ext
12406cat >>conftest.$ac_ext <<_ACEOF
12407/* end confdefs.h. */
c0d27fcc
MR
12408$ac_includes_default
12409#include <Carbon/Carbon.h>
12410_ACEOF
12411rm -f conftest.$ac_objext
12412if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 12413 (eval $ac_compile) 2>conftest.er1
c0d27fcc 12414 ac_status=$?
35996d22
AS
12415 grep -v '^ *+' conftest.er1 >conftest.err
12416 rm -f conftest.er1
12417 cat conftest.err >&5
c0d27fcc
MR
12418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12419 (exit $ac_status); } &&
551ffc27
ST
12420 { ac_try='test -z "$ac_c_werror_flag"
12421 || test ! -s conftest.err'
35996d22
AS
12422 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12423 (eval $ac_try) 2>&5
12424 ac_status=$?
12425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12426 (exit $ac_status); }; } &&
12427 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
12428 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12429 (eval $ac_try) 2>&5
12430 ac_status=$?
12431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12432 (exit $ac_status); }; }; then
12433 ac_header_compiler=yes
12434else
12435 echo "$as_me: failed program was:" >&5
19650fd6
AS
12436sed 's/^/| /' conftest.$ac_ext >&5
12437
c0d27fcc
MR
12438ac_header_compiler=no
12439fi
35996d22 12440rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
12441echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12442echo "${ECHO_T}$ac_header_compiler" >&6
12443
12444# Is the header present?
12445echo "$as_me:$LINENO: checking Carbon/Carbon.h presence" >&5
12446echo $ECHO_N "checking Carbon/Carbon.h presence... $ECHO_C" >&6
12447cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12448/* confdefs.h. */
12449_ACEOF
12450cat confdefs.h >>conftest.$ac_ext
12451cat >>conftest.$ac_ext <<_ACEOF
12452/* end confdefs.h. */
e0f712ba
AC
12453#include <Carbon/Carbon.h>
12454_ACEOF
c0d27fcc 12455if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
e0f712ba
AC
12456 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12457 ac_status=$?
6bae0ccf 12458 grep -v '^ *+' conftest.er1 >conftest.err
e0f712ba
AC
12459 rm -f conftest.er1
12460 cat conftest.err >&5
c0d27fcc 12461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
e0f712ba
AC
12462 (exit $ac_status); } >/dev/null; then
12463 if test -s conftest.err; then
12464 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 12465 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
e0f712ba
AC
12466 else
12467 ac_cpp_err=
12468 fi
12469else
12470 ac_cpp_err=yes
12471fi
12472if test -z "$ac_cpp_err"; then
c0d27fcc 12473 ac_header_preproc=yes
e0f712ba
AC
12474else
12475 echo "$as_me: failed program was:" >&5
19650fd6
AS
12476sed 's/^/| /' conftest.$ac_ext >&5
12477
c0d27fcc 12478 ac_header_preproc=no
e0f712ba
AC
12479fi
12480rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
12481echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12482echo "${ECHO_T}$ac_header_preproc" >&6
12483
12484# So? What about this header?
35996d22
AS
12485case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12486 yes:no: )
c0d27fcc
MR
12487 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: accepted by the compiler, rejected by the preprocessor!" >&5
12488echo "$as_me: WARNING: Carbon/Carbon.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
12489 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: proceeding with the compiler's result" >&5
12490echo "$as_me: WARNING: Carbon/Carbon.h: proceeding with the compiler's result" >&2;}
12491 ac_header_preproc=yes
19650fd6 12492 ;;
35996d22 12493 no:yes:* )
c0d27fcc
MR
12494 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: present but cannot be compiled" >&5
12495echo "$as_me: WARNING: Carbon/Carbon.h: present but cannot be compiled" >&2;}
35996d22
AS
12496 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: check for missing prerequisite headers?" >&5
12497echo "$as_me: WARNING: Carbon/Carbon.h: check for missing prerequisite headers?" >&2;}
12498 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: see the Autoconf documentation" >&5
12499echo "$as_me: WARNING: Carbon/Carbon.h: see the Autoconf documentation" >&2;}
12500 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: section \"Present But Cannot Be Compiled\"" >&5
12501echo "$as_me: WARNING: Carbon/Carbon.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 12502 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: proceeding with the preprocessor's result" >&5
19650fd6 12503echo "$as_me: WARNING: Carbon/Carbon.h: proceeding with the preprocessor's result" >&2;}
35996d22
AS
12504 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: in the future, the compiler will take precedence" >&5
12505echo "$as_me: WARNING: Carbon/Carbon.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
12506 (
12507 cat <<\_ASBOX
35996d22
AS
12508## ------------------------------------------ ##
12509## Report this to the AC_PACKAGE_NAME lists. ##
12510## ------------------------------------------ ##
19650fd6
AS
12511_ASBOX
12512 ) |
12513 sed "s/^/$as_me: WARNING: /" >&2
12514 ;;
c0d27fcc
MR
12515esac
12516echo "$as_me:$LINENO: checking for Carbon/Carbon.h" >&5
12517echo $ECHO_N "checking for Carbon/Carbon.h... $ECHO_C" >&6
12518if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
12519 echo $ECHO_N "(cached) $ECHO_C" >&6
12520else
12521 ac_cv_header_Carbon_Carbon_h=$ac_header_preproc
e0f712ba 12522fi
c0d27fcc 12523echo "$as_me:$LINENO: result: $ac_cv_header_Carbon_Carbon_h" >&5
e0f712ba 12524echo "${ECHO_T}$ac_cv_header_Carbon_Carbon_h" >&6
c0d27fcc
MR
12525
12526fi
e0f712ba
AC
12527if test $ac_cv_header_Carbon_Carbon_h = yes; then
12528 HAVE_CARBON=yes
12529fi
12530
c0d27fcc 12531
e0f712ba
AC
12532fi
12533
cef11da2
ST
12534if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
12535 echo "$as_me:$LINENO: checking for malloc/malloc.h" >&5
12536echo $ECHO_N "checking for malloc/malloc.h... $ECHO_C" >&6
12537if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
12538 echo $ECHO_N "(cached) $ECHO_C" >&6
12539fi
12540echo "$as_me:$LINENO: result: $ac_cv_header_malloc_malloc_h" >&5
12541echo "${ECHO_T}$ac_cv_header_malloc_malloc_h" >&6
12542else
12543 # Is the header compilable?
12544echo "$as_me:$LINENO: checking malloc/malloc.h usability" >&5
12545echo $ECHO_N "checking malloc/malloc.h usability... $ECHO_C" >&6
12546cat >conftest.$ac_ext <<_ACEOF
12547/* confdefs.h. */
12548_ACEOF
12549cat confdefs.h >>conftest.$ac_ext
12550cat >>conftest.$ac_ext <<_ACEOF
12551/* end confdefs.h. */
12552$ac_includes_default
12553#include <malloc/malloc.h>
12554_ACEOF
12555rm -f conftest.$ac_objext
12556if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12557 (eval $ac_compile) 2>conftest.er1
12558 ac_status=$?
12559 grep -v '^ *+' conftest.er1 >conftest.err
12560 rm -f conftest.er1
12561 cat conftest.err >&5
12562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12563 (exit $ac_status); } &&
551ffc27
ST
12564 { ac_try='test -z "$ac_c_werror_flag"
12565 || test ! -s conftest.err'
cef11da2
ST
12566 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12567 (eval $ac_try) 2>&5
12568 ac_status=$?
12569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12570 (exit $ac_status); }; } &&
12571 { ac_try='test -s conftest.$ac_objext'
12572 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12573 (eval $ac_try) 2>&5
12574 ac_status=$?
12575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12576 (exit $ac_status); }; }; then
12577 ac_header_compiler=yes
12578else
12579 echo "$as_me: failed program was:" >&5
12580sed 's/^/| /' conftest.$ac_ext >&5
12581
12582ac_header_compiler=no
12583fi
12584rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12585echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12586echo "${ECHO_T}$ac_header_compiler" >&6
12587
12588# Is the header present?
12589echo "$as_me:$LINENO: checking malloc/malloc.h presence" >&5
12590echo $ECHO_N "checking malloc/malloc.h presence... $ECHO_C" >&6
12591cat >conftest.$ac_ext <<_ACEOF
12592/* confdefs.h. */
12593_ACEOF
12594cat confdefs.h >>conftest.$ac_ext
12595cat >>conftest.$ac_ext <<_ACEOF
12596/* end confdefs.h. */
12597#include <malloc/malloc.h>
12598_ACEOF
12599if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
12600 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12601 ac_status=$?
12602 grep -v '^ *+' conftest.er1 >conftest.err
12603 rm -f conftest.er1
12604 cat conftest.err >&5
12605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12606 (exit $ac_status); } >/dev/null; then
12607 if test -s conftest.err; then
12608 ac_cpp_err=$ac_c_preproc_warn_flag
12609 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
12610 else
12611 ac_cpp_err=
12612 fi
12613else
12614 ac_cpp_err=yes
12615fi
12616if test -z "$ac_cpp_err"; then
12617 ac_header_preproc=yes
12618else
12619 echo "$as_me: failed program was:" >&5
12620sed 's/^/| /' conftest.$ac_ext >&5
12621
12622 ac_header_preproc=no
12623fi
12624rm -f conftest.err conftest.$ac_ext
12625echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12626echo "${ECHO_T}$ac_header_preproc" >&6
12627
12628# So? What about this header?
12629case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12630 yes:no: )
12631 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: accepted by the compiler, rejected by the preprocessor!" >&5
12632echo "$as_me: WARNING: malloc/malloc.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
12633 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: proceeding with the compiler's result" >&5
12634echo "$as_me: WARNING: malloc/malloc.h: proceeding with the compiler's result" >&2;}
12635 ac_header_preproc=yes
12636 ;;
12637 no:yes:* )
12638 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: present but cannot be compiled" >&5
12639echo "$as_me: WARNING: malloc/malloc.h: present but cannot be compiled" >&2;}
12640 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: check for missing prerequisite headers?" >&5
12641echo "$as_me: WARNING: malloc/malloc.h: check for missing prerequisite headers?" >&2;}
12642 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: see the Autoconf documentation" >&5
12643echo "$as_me: WARNING: malloc/malloc.h: see the Autoconf documentation" >&2;}
12644 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: section \"Present But Cannot Be Compiled\"" >&5
12645echo "$as_me: WARNING: malloc/malloc.h: section \"Present But Cannot Be Compiled\"" >&2;}
12646 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: proceeding with the preprocessor's result" >&5
12647echo "$as_me: WARNING: malloc/malloc.h: proceeding with the preprocessor's result" >&2;}
12648 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: in the future, the compiler will take precedence" >&5
12649echo "$as_me: WARNING: malloc/malloc.h: in the future, the compiler will take precedence" >&2;}
12650 (
12651 cat <<\_ASBOX
12652## ------------------------------------------ ##
12653## Report this to the AC_PACKAGE_NAME lists. ##
12654## ------------------------------------------ ##
12655_ASBOX
12656 ) |
12657 sed "s/^/$as_me: WARNING: /" >&2
12658 ;;
12659esac
12660echo "$as_me:$LINENO: checking for malloc/malloc.h" >&5
12661echo $ECHO_N "checking for malloc/malloc.h... $ECHO_C" >&6
12662if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
12663 echo $ECHO_N "(cached) $ECHO_C" >&6
12664else
12665 ac_cv_header_malloc_malloc_h=$ac_header_preproc
12666fi
12667echo "$as_me:$LINENO: result: $ac_cv_header_malloc_malloc_h" >&5
12668echo "${ECHO_T}$ac_cv_header_malloc_malloc_h" >&6
12669
12670fi
12671if test $ac_cv_header_malloc_malloc_h = yes; then
12672
12673cat >>confdefs.h <<\_ACEOF
12674#define HAVE_MALLOC_MALLOC_H 1
12675_ACEOF
12676
12677fi
12678
12679
12680
e0f712ba 12681if test "${HAVE_CARBON}" = "yes"; then
e3ba1015 12682
c0d27fcc 12683cat >>confdefs.h <<\_ACEOF
e0f712ba 12684#define HAVE_CARBON 1
c0d27fcc 12685_ACEOF
e0f712ba 12686
6a3a24fa
JD
12687 window_system=mac
12688 ## Specify the install directory
12689 carbon_appdir=
12690 if test "${carbon_appdir_x}" != ""; then
12691 case ${carbon_appdir_x} in
12692 y | ye | yes) carbon_appdir=/Applications ;;
12693 * ) carbon_appdir=${carbon_appdir_x} ;;
12694 esac
12695 fi
8f417b3b
AS
12696 # We also have mouse menus.
12697 HAVE_MENUS=yes
e0f712ba
AC
12698fi
12699
98418dba
CW
12700### Use session management (-lSM -lICE) if available
12701HAVE_X_SM=no
12702if test "${HAVE_X11}" = "yes"; then
c0d27fcc
MR
12703 if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
12704 echo "$as_me:$LINENO: checking for X11/SM/SMlib.h" >&5
98418dba
CW
12705echo $ECHO_N "checking for X11/SM/SMlib.h... $ECHO_C" >&6
12706if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
12707 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
12708fi
12709echo "$as_me:$LINENO: result: $ac_cv_header_X11_SM_SMlib_h" >&5
12710echo "${ECHO_T}$ac_cv_header_X11_SM_SMlib_h" >&6
503d2be0 12711else
c0d27fcc
MR
12712 # Is the header compilable?
12713echo "$as_me:$LINENO: checking X11/SM/SMlib.h usability" >&5
12714echo $ECHO_N "checking X11/SM/SMlib.h usability... $ECHO_C" >&6
12715cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12716/* confdefs.h. */
12717_ACEOF
12718cat confdefs.h >>conftest.$ac_ext
12719cat >>conftest.$ac_ext <<_ACEOF
12720/* end confdefs.h. */
c0d27fcc
MR
12721$ac_includes_default
12722#include <X11/SM/SMlib.h>
12723_ACEOF
12724rm -f conftest.$ac_objext
12725if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 12726 (eval $ac_compile) 2>conftest.er1
c0d27fcc 12727 ac_status=$?
35996d22
AS
12728 grep -v '^ *+' conftest.er1 >conftest.err
12729 rm -f conftest.er1
12730 cat conftest.err >&5
c0d27fcc
MR
12731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12732 (exit $ac_status); } &&
551ffc27
ST
12733 { ac_try='test -z "$ac_c_werror_flag"
12734 || test ! -s conftest.err'
35996d22
AS
12735 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12736 (eval $ac_try) 2>&5
12737 ac_status=$?
12738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12739 (exit $ac_status); }; } &&
12740 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
12741 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12742 (eval $ac_try) 2>&5
12743 ac_status=$?
12744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12745 (exit $ac_status); }; }; then
12746 ac_header_compiler=yes
12747else
12748 echo "$as_me: failed program was:" >&5
19650fd6
AS
12749sed 's/^/| /' conftest.$ac_ext >&5
12750
c0d27fcc
MR
12751ac_header_compiler=no
12752fi
35996d22 12753rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
12754echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12755echo "${ECHO_T}$ac_header_compiler" >&6
12756
12757# Is the header present?
12758echo "$as_me:$LINENO: checking X11/SM/SMlib.h presence" >&5
12759echo $ECHO_N "checking X11/SM/SMlib.h presence... $ECHO_C" >&6
12760cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12761/* confdefs.h. */
12762_ACEOF
12763cat confdefs.h >>conftest.$ac_ext
12764cat >>conftest.$ac_ext <<_ACEOF
12765/* end confdefs.h. */
98418dba
CW
12766#include <X11/SM/SMlib.h>
12767_ACEOF
c0d27fcc 12768if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
12769 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12770 ac_status=$?
6bae0ccf 12771 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
12772 rm -f conftest.er1
12773 cat conftest.err >&5
c0d27fcc 12774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
12775 (exit $ac_status); } >/dev/null; then
12776 if test -s conftest.err; then
12777 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 12778 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
12779 else
12780 ac_cpp_err=
12781 fi
12782else
12783 ac_cpp_err=yes
503d2be0 12784fi
98418dba 12785if test -z "$ac_cpp_err"; then
c0d27fcc 12786 ac_header_preproc=yes
98418dba
CW
12787else
12788 echo "$as_me: failed program was:" >&5
19650fd6
AS
12789sed 's/^/| /' conftest.$ac_ext >&5
12790
c0d27fcc 12791 ac_header_preproc=no
98418dba
CW
12792fi
12793rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
12794echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12795echo "${ECHO_T}$ac_header_preproc" >&6
12796
12797# So? What about this header?
35996d22
AS
12798case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12799 yes:no: )
c0d27fcc
MR
12800 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
12801echo "$as_me: WARNING: X11/SM/SMlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
12802 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: proceeding with the compiler's result" >&5
12803echo "$as_me: WARNING: X11/SM/SMlib.h: proceeding with the compiler's result" >&2;}
12804 ac_header_preproc=yes
19650fd6 12805 ;;
35996d22 12806 no:yes:* )
c0d27fcc
MR
12807 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: present but cannot be compiled" >&5
12808echo "$as_me: WARNING: X11/SM/SMlib.h: present but cannot be compiled" >&2;}
35996d22
AS
12809 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: check for missing prerequisite headers?" >&5
12810echo "$as_me: WARNING: X11/SM/SMlib.h: check for missing prerequisite headers?" >&2;}
12811 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: see the Autoconf documentation" >&5
12812echo "$as_me: WARNING: X11/SM/SMlib.h: see the Autoconf documentation" >&2;}
12813 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: section \"Present But Cannot Be Compiled\"" >&5
12814echo "$as_me: WARNING: X11/SM/SMlib.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 12815 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&5
19650fd6 12816echo "$as_me: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&2;}
35996d22
AS
12817 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: in the future, the compiler will take precedence" >&5
12818echo "$as_me: WARNING: X11/SM/SMlib.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
12819 (
12820 cat <<\_ASBOX
35996d22
AS
12821## ------------------------------------------ ##
12822## Report this to the AC_PACKAGE_NAME lists. ##
12823## ------------------------------------------ ##
19650fd6
AS
12824_ASBOX
12825 ) |
12826 sed "s/^/$as_me: WARNING: /" >&2
12827 ;;
c0d27fcc
MR
12828esac
12829echo "$as_me:$LINENO: checking for X11/SM/SMlib.h" >&5
12830echo $ECHO_N "checking for X11/SM/SMlib.h... $ECHO_C" >&6
12831if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
12832 echo $ECHO_N "(cached) $ECHO_C" >&6
12833else
12834 ac_cv_header_X11_SM_SMlib_h=$ac_header_preproc
73b77ee5 12835fi
c0d27fcc 12836echo "$as_me:$LINENO: result: $ac_cv_header_X11_SM_SMlib_h" >&5
98418dba 12837echo "${ECHO_T}$ac_cv_header_X11_SM_SMlib_h" >&6
c0d27fcc
MR
12838
12839fi
98418dba 12840if test $ac_cv_header_X11_SM_SMlib_h = yes; then
c0d27fcc 12841 echo "$as_me:$LINENO: checking for SmcOpenConnection in -lSM" >&5
98418dba
CW
12842echo $ECHO_N "checking for SmcOpenConnection in -lSM... $ECHO_C" >&6
12843if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then
503d2be0 12844 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 12845else
503d2be0 12846 ac_check_lib_save_LIBS=$LIBS
1660500f 12847LIBS="-lSM -lICE $LIBS"
503d2be0 12848cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12849/* confdefs.h. */
12850_ACEOF
12851cat confdefs.h >>conftest.$ac_ext
12852cat >>conftest.$ac_ext <<_ACEOF
12853/* end confdefs.h. */
503d2be0 12854
73b77ee5 12855/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
12856#ifdef __cplusplus
12857extern "C"
12858#endif
73b77ee5 12859/* We use char because int might match the return type of a gcc2
503d2be0 12860 builtin and then its argument prototype would still apply. */
98418dba 12861char SmcOpenConnection ();
503d2be0
AS
12862int
12863main ()
12864{
98418dba 12865SmcOpenConnection ();
503d2be0
AS
12866 ;
12867 return 0;
12868}
12869_ACEOF
12870rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 12871if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 12872 (eval $ac_link) 2>conftest.er1
503d2be0 12873 ac_status=$?
35996d22
AS
12874 grep -v '^ *+' conftest.er1 >conftest.err
12875 rm -f conftest.er1
12876 cat conftest.err >&5
c0d27fcc 12877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12878 (exit $ac_status); } &&
551ffc27
ST
12879 { ac_try='test -z "$ac_c_werror_flag"
12880 || test ! -s conftest.err'
35996d22
AS
12881 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12882 (eval $ac_try) 2>&5
12883 ac_status=$?
12884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12885 (exit $ac_status); }; } &&
12886 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 12887 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
12888 (eval $ac_try) 2>&5
12889 ac_status=$?
c0d27fcc 12890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12891 (exit $ac_status); }; }; then
98418dba 12892 ac_cv_lib_SM_SmcOpenConnection=yes
503d2be0
AS
12893else
12894 echo "$as_me: failed program was:" >&5
19650fd6
AS
12895sed 's/^/| /' conftest.$ac_ext >&5
12896
98418dba 12897ac_cv_lib_SM_SmcOpenConnection=no
503d2be0 12898fi
35996d22
AS
12899rm -f conftest.err conftest.$ac_objext \
12900 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
12901LIBS=$ac_check_lib_save_LIBS
12902fi
c0d27fcc 12903echo "$as_me:$LINENO: result: $ac_cv_lib_SM_SmcOpenConnection" >&5
98418dba
CW
12904echo "${ECHO_T}$ac_cv_lib_SM_SmcOpenConnection" >&6
12905if test $ac_cv_lib_SM_SmcOpenConnection = yes; then
12906 HAVE_X_SM=yes
73b77ee5
GM
12907fi
12908
73b77ee5 12909fi
73b77ee5 12910
c0d27fcc
MR
12911
12912
98418dba 12913 if test "${HAVE_X_SM}" = "yes"; then
b936fae4 12914
c0d27fcc 12915cat >>confdefs.h <<\_ACEOF
98418dba 12916#define HAVE_X_SM 1
c0d27fcc 12917_ACEOF
73b77ee5 12918
98418dba
CW
12919 case "$LIBS" in
12920 *-lSM*) ;;
12921 *) LIBS="-lSM -lICE $LIBS" ;;
12922 esac
73b77ee5 12923 fi
98418dba 12924fi
73b77ee5 12925
98418dba 12926# If netdb.h doesn't declare h_errno, we must declare it by hand.
c0d27fcc 12927echo "$as_me:$LINENO: checking whether netdb declares h_errno" >&5
98418dba
CW
12928echo $ECHO_N "checking whether netdb declares h_errno... $ECHO_C" >&6
12929if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then
12930 echo $ECHO_N "(cached) $ECHO_C" >&6
12931else
12932 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12933/* confdefs.h. */
12934_ACEOF
12935cat confdefs.h >>conftest.$ac_ext
12936cat >>conftest.$ac_ext <<_ACEOF
12937/* end confdefs.h. */
98418dba 12938#include <netdb.h>
503d2be0
AS
12939int
12940main ()
12941{
98418dba 12942return h_errno;
503d2be0
AS
12943 ;
12944 return 0;
12945}
12946_ACEOF
12947rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 12948if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 12949 (eval $ac_link) 2>conftest.er1
503d2be0 12950 ac_status=$?
35996d22
AS
12951 grep -v '^ *+' conftest.er1 >conftest.err
12952 rm -f conftest.er1
12953 cat conftest.err >&5
c0d27fcc 12954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12955 (exit $ac_status); } &&
551ffc27
ST
12956 { ac_try='test -z "$ac_c_werror_flag"
12957 || test ! -s conftest.err'
35996d22
AS
12958 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12959 (eval $ac_try) 2>&5
12960 ac_status=$?
12961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12962 (exit $ac_status); }; } &&
12963 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 12964 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
12965 (eval $ac_try) 2>&5
12966 ac_status=$?
c0d27fcc 12967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 12968 (exit $ac_status); }; }; then
98418dba 12969 emacs_cv_netdb_declares_h_errno=yes
73b77ee5 12970else
503d2be0 12971 echo "$as_me: failed program was:" >&5
19650fd6
AS
12972sed 's/^/| /' conftest.$ac_ext >&5
12973
98418dba 12974emacs_cv_netdb_declares_h_errno=no
73b77ee5 12975fi
35996d22
AS
12976rm -f conftest.err conftest.$ac_objext \
12977 conftest$ac_exeext conftest.$ac_ext
98418dba 12978fi
c0d27fcc 12979echo "$as_me:$LINENO: result: $emacs_cv_netdb_declares_h_errno" >&5
98418dba
CW
12980echo "${ECHO_T}$emacs_cv_netdb_declares_h_errno" >&6
12981if test $emacs_cv_netdb_declares_h_errno = yes; then
b936fae4 12982
c0d27fcc 12983cat >>confdefs.h <<\_ACEOF
98418dba 12984#define HAVE_H_ERRNO 1
c0d27fcc 12985_ACEOF
73b77ee5 12986
98418dba
CW
12987fi
12988
12989# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
12990# for constant arguments. Useless!
c0d27fcc 12991echo "$as_me:$LINENO: checking for working alloca.h" >&5
98418dba
CW
12992echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
12993if test "${ac_cv_working_alloca_h+set}" = set; then
12994 echo $ECHO_N "(cached) $ECHO_C" >&6
12995else
12996 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12997/* confdefs.h. */
12998_ACEOF
12999cat confdefs.h >>conftest.$ac_ext
13000cat >>conftest.$ac_ext <<_ACEOF
13001/* end confdefs.h. */
98418dba 13002#include <alloca.h>
503d2be0
AS
13003int
13004main ()
13005{
98418dba 13006char *p = (char *) alloca (2 * sizeof (int));
503d2be0
AS
13007 ;
13008 return 0;
13009}
13010_ACEOF
13011rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13012if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 13013 (eval $ac_link) 2>conftest.er1
503d2be0 13014 ac_status=$?
35996d22
AS
13015 grep -v '^ *+' conftest.er1 >conftest.err
13016 rm -f conftest.er1
13017 cat conftest.err >&5
c0d27fcc 13018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13019 (exit $ac_status); } &&
551ffc27
ST
13020 { ac_try='test -z "$ac_c_werror_flag"
13021 || test ! -s conftest.err'
35996d22
AS
13022 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13023 (eval $ac_try) 2>&5
13024 ac_status=$?
13025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13026 (exit $ac_status); }; } &&
13027 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13028 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13029 (eval $ac_try) 2>&5
13030 ac_status=$?
c0d27fcc 13031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13032 (exit $ac_status); }; }; then
98418dba 13033 ac_cv_working_alloca_h=yes
73b77ee5 13034else
503d2be0 13035 echo "$as_me: failed program was:" >&5
19650fd6
AS
13036sed 's/^/| /' conftest.$ac_ext >&5
13037
98418dba 13038ac_cv_working_alloca_h=no
73b77ee5 13039fi
35996d22
AS
13040rm -f conftest.err conftest.$ac_objext \
13041 conftest$ac_exeext conftest.$ac_ext
98418dba 13042fi
c0d27fcc 13043echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
98418dba
CW
13044echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
13045if test $ac_cv_working_alloca_h = yes; then
73b77ee5 13046
c0d27fcc 13047cat >>confdefs.h <<\_ACEOF
98418dba 13048#define HAVE_ALLOCA_H 1
c0d27fcc 13049_ACEOF
98418dba
CW
13050
13051fi
13052
c0d27fcc 13053echo "$as_me:$LINENO: checking for alloca" >&5
98418dba
CW
13054echo $ECHO_N "checking for alloca... $ECHO_C" >&6
13055if test "${ac_cv_func_alloca_works+set}" = set; then
13056 echo $ECHO_N "(cached) $ECHO_C" >&6
13057else
503d2be0 13058 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13059/* confdefs.h. */
13060_ACEOF
13061cat confdefs.h >>conftest.$ac_ext
13062cat >>conftest.$ac_ext <<_ACEOF
13063/* end confdefs.h. */
98418dba
CW
13064#ifdef __GNUC__
13065# define alloca __builtin_alloca
13066#else
13067# ifdef _MSC_VER
13068# include <malloc.h>
13069# define alloca _alloca
13070# else
13071# if HAVE_ALLOCA_H
13072# include <alloca.h>
13073# else
13074# ifdef _AIX
13075 #pragma alloca
13076# else
13077# ifndef alloca /* predefined by HP cc +Olibcalls */
13078char *alloca ();
13079# endif
13080# endif
13081# endif
13082# endif
13083#endif
13084
503d2be0
AS
13085int
13086main ()
13087{
98418dba 13088char *p = (char *) alloca (1);
503d2be0
AS
13089 ;
13090 return 0;
13091}
13092_ACEOF
13093rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13094if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 13095 (eval $ac_link) 2>conftest.er1
503d2be0 13096 ac_status=$?
35996d22
AS
13097 grep -v '^ *+' conftest.er1 >conftest.err
13098 rm -f conftest.er1
13099 cat conftest.err >&5
c0d27fcc 13100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13101 (exit $ac_status); } &&
551ffc27
ST
13102 { ac_try='test -z "$ac_c_werror_flag"
13103 || test ! -s conftest.err'
35996d22
AS
13104 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13105 (eval $ac_try) 2>&5
13106 ac_status=$?
13107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13108 (exit $ac_status); }; } &&
13109 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13110 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13111 (eval $ac_try) 2>&5
13112 ac_status=$?
c0d27fcc 13113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13114 (exit $ac_status); }; }; then
98418dba 13115 ac_cv_func_alloca_works=yes
ac95a621 13116else
503d2be0 13117 echo "$as_me: failed program was:" >&5
19650fd6
AS
13118sed 's/^/| /' conftest.$ac_ext >&5
13119
98418dba 13120ac_cv_func_alloca_works=no
ac95a621 13121fi
35996d22
AS
13122rm -f conftest.err conftest.$ac_objext \
13123 conftest$ac_exeext conftest.$ac_ext
98418dba 13124fi
c0d27fcc 13125echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
98418dba 13126echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
ac95a621 13127
98418dba
CW
13128if test $ac_cv_func_alloca_works = yes; then
13129
c0d27fcc 13130cat >>confdefs.h <<\_ACEOF
98418dba 13131#define HAVE_ALLOCA 1
c0d27fcc 13132_ACEOF
98418dba
CW
13133
13134else
13135 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
13136# that cause trouble. Some versions do not even contain alloca or
13137# contain a buggy version. If you still want to use their alloca,
13138# use ar to extract alloca.o from them instead of compiling alloca.c.
13139
13140ALLOCA=alloca.$ac_objext
13141
c0d27fcc 13142cat >>confdefs.h <<\_ACEOF
98418dba 13143#define C_ALLOCA 1
c0d27fcc 13144_ACEOF
98418dba 13145
c0d27fcc
MR
13146
13147echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
98418dba
CW
13148echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
13149if test "${ac_cv_os_cray+set}" = set; then
13150 echo $ECHO_N "(cached) $ECHO_C" >&6
13151else
13152 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13153/* confdefs.h. */
13154_ACEOF
13155cat confdefs.h >>conftest.$ac_ext
13156cat >>conftest.$ac_ext <<_ACEOF
13157/* end confdefs.h. */
98418dba
CW
13158#if defined(CRAY) && ! defined(CRAY2)
13159webecray
13160#else
13161wenotbecray
13162#endif
13163
13164_ACEOF
13165if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 13166 $EGREP "webecray" >/dev/null 2>&1; then
98418dba
CW
13167 ac_cv_os_cray=yes
13168else
13169 ac_cv_os_cray=no
13170fi
13171rm -f conftest*
ac95a621 13172
98418dba 13173fi
c0d27fcc 13174echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
98418dba
CW
13175echo "${ECHO_T}$ac_cv_os_cray" >&6
13176if test $ac_cv_os_cray = yes; then
13177 for ac_func in _getb67 GETB67 getb67; do
13178 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 13179echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
13180echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13181if eval "test \"\${$as_ac_var+set}\" = set"; then
13182 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 13183else
503d2be0 13184 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13185/* confdefs.h. */
13186_ACEOF
13187cat confdefs.h >>conftest.$ac_ext
13188cat >>conftest.$ac_ext <<_ACEOF
13189/* end confdefs.h. */
35996d22
AS
13190/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
13191 For example, HP-UX 11i <limits.h> declares gettimeofday. */
13192#define $ac_func innocuous_$ac_func
13193
73b77ee5 13194/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
13195 which can conflict with char $ac_func (); below.
13196 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13197 <limits.h> exists even on freestanding compilers. */
35996d22 13198
19650fd6
AS
13199#ifdef __STDC__
13200# include <limits.h>
13201#else
13202# include <assert.h>
13203#endif
35996d22
AS
13204
13205#undef $ac_func
13206
73b77ee5 13207/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
13208#ifdef __cplusplus
13209extern "C"
19650fd6 13210{
503d2be0 13211#endif
73b77ee5 13212/* We use char because int might match the return type of a gcc2
503d2be0
AS
13213 builtin and then its argument prototype would still apply. */
13214char $ac_func ();
73b77ee5
GM
13215/* The GNU C library defines this for functions which it implements
13216 to always fail with ENOSYS. Some functions are actually named
13217 something starting with __ and the normal name is an alias. */
13218#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13219choke me
13220#else
19650fd6
AS
13221char (*f) () = $ac_func;
13222#endif
13223#ifdef __cplusplus
13224}
73b77ee5
GM
13225#endif
13226
19650fd6
AS
13227int
13228main ()
13229{
13230return f != $ac_func;
503d2be0
AS
13231 ;
13232 return 0;
13233}
13234_ACEOF
13235rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13236if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 13237 (eval $ac_link) 2>conftest.er1
503d2be0 13238 ac_status=$?
35996d22
AS
13239 grep -v '^ *+' conftest.er1 >conftest.err
13240 rm -f conftest.er1
13241 cat conftest.err >&5
c0d27fcc 13242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13243 (exit $ac_status); } &&
551ffc27
ST
13244 { ac_try='test -z "$ac_c_werror_flag"
13245 || test ! -s conftest.err'
35996d22
AS
13246 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13247 (eval $ac_try) 2>&5
13248 ac_status=$?
13249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13250 (exit $ac_status); }; } &&
13251 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13252 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13253 (eval $ac_try) 2>&5
13254 ac_status=$?
c0d27fcc 13255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
13256 (exit $ac_status); }; }; then
13257 eval "$as_ac_var=yes"
13258else
13259 echo "$as_me: failed program was:" >&5
19650fd6
AS
13260sed 's/^/| /' conftest.$ac_ext >&5
13261
503d2be0
AS
13262eval "$as_ac_var=no"
13263fi
35996d22
AS
13264rm -f conftest.err conftest.$ac_objext \
13265 conftest$ac_exeext conftest.$ac_ext
503d2be0 13266fi
c0d27fcc 13267echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
13268echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13269if test `eval echo '${'$as_ac_var'}'` = yes; then
73b77ee5 13270
c0d27fcc 13271cat >>confdefs.h <<_ACEOF
98418dba 13272#define CRAY_STACKSEG_END $ac_func
c0d27fcc 13273_ACEOF
98418dba
CW
13274
13275 break
73b77ee5 13276fi
73b77ee5 13277
98418dba 13278 done
73b77ee5
GM
13279fi
13280
c0d27fcc 13281echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
98418dba
CW
13282echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
13283if test "${ac_cv_c_stack_direction+set}" = set; then
503d2be0 13284 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
13285else
13286 if test "$cross_compiling" = yes; then
13287 ac_cv_c_stack_direction=0
73b77ee5 13288else
503d2be0 13289 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13290/* confdefs.h. */
13291_ACEOF
13292cat confdefs.h >>conftest.$ac_ext
13293cat >>conftest.$ac_ext <<_ACEOF
13294/* end confdefs.h. */
503d2be0 13295int
98418dba 13296find_stack_direction ()
503d2be0 13297{
98418dba
CW
13298 static char *addr = 0;
13299 auto char dummy;
13300 if (addr == 0)
13301 {
13302 addr = &dummy;
13303 return find_stack_direction ();
13304 }
73b77ee5 13305 else
98418dba
CW
13306 return (&dummy > addr) ? 1 : -1;
13307}
ba4481b5 13308
503d2be0
AS
13309int
13310main ()
13311{
98418dba 13312 exit (find_stack_direction () < 0);
503d2be0
AS
13313}
13314_ACEOF
98418dba 13315rm -f conftest$ac_exeext
c0d27fcc 13316if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
13317 (eval $ac_link) 2>&5
13318 ac_status=$?
c0d27fcc 13319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 13320 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 13321 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13322 (eval $ac_try) 2>&5
13323 ac_status=$?
c0d27fcc 13324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13325 (exit $ac_status); }; }; then
98418dba 13326 ac_cv_c_stack_direction=1
ba4481b5 13327else
98418dba
CW
13328 echo "$as_me: program exited with status $ac_status" >&5
13329echo "$as_me: failed program was:" >&5
19650fd6
AS
13330sed 's/^/| /' conftest.$ac_ext >&5
13331
c0d27fcc 13332( exit $ac_status )
98418dba 13333ac_cv_c_stack_direction=-1
ba4481b5 13334fi
35996d22 13335rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 13336fi
98418dba 13337fi
c0d27fcc 13338echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
98418dba
CW
13339echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
13340
c0d27fcc 13341cat >>confdefs.h <<_ACEOF
98418dba 13342#define STACK_DIRECTION $ac_cv_c_stack_direction
c0d27fcc
MR
13343_ACEOF
13344
ba4481b5 13345
ba4481b5
DL
13346fi
13347
c0d27fcc 13348
98418dba
CW
13349# fmod, logb, and frexp are found in -lm on most systems.
13350# On HPUX 9.01, -lm does not contain logb, so check for sqrt.
13351
c0d27fcc 13352echo "$as_me:$LINENO: checking for sqrt in -lm" >&5
98418dba
CW
13353echo $ECHO_N "checking for sqrt in -lm... $ECHO_C" >&6
13354if test "${ac_cv_lib_m_sqrt+set}" = set; then
503d2be0 13355 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13356else
98418dba
CW
13357 ac_check_lib_save_LIBS=$LIBS
13358LIBS="-lm $LIBS"
13359cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13360/* confdefs.h. */
13361_ACEOF
13362cat confdefs.h >>conftest.$ac_ext
13363cat >>conftest.$ac_ext <<_ACEOF
13364/* end confdefs.h. */
ba4481b5 13365
98418dba
CW
13366/* Override any gcc2 internal prototype to avoid an error. */
13367#ifdef __cplusplus
13368extern "C"
13369#endif
13370/* We use char because int might match the return type of a gcc2
13371 builtin and then its argument prototype would still apply. */
13372char sqrt ();
503d2be0
AS
13373int
13374main ()
13375{
98418dba 13376sqrt ();
503d2be0
AS
13377 ;
13378 return 0;
13379}
13380_ACEOF
13381rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13382if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 13383 (eval $ac_link) 2>conftest.er1
503d2be0 13384 ac_status=$?
35996d22
AS
13385 grep -v '^ *+' conftest.er1 >conftest.err
13386 rm -f conftest.er1
13387 cat conftest.err >&5
c0d27fcc 13388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13389 (exit $ac_status); } &&
551ffc27
ST
13390 { ac_try='test -z "$ac_c_werror_flag"
13391 || test ! -s conftest.err'
35996d22
AS
13392 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13393 (eval $ac_try) 2>&5
13394 ac_status=$?
13395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13396 (exit $ac_status); }; } &&
13397 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13398 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13399 (eval $ac_try) 2>&5
13400 ac_status=$?
c0d27fcc 13401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13402 (exit $ac_status); }; }; then
98418dba 13403 ac_cv_lib_m_sqrt=yes
ba4481b5 13404else
503d2be0 13405 echo "$as_me: failed program was:" >&5
19650fd6
AS
13406sed 's/^/| /' conftest.$ac_ext >&5
13407
98418dba 13408ac_cv_lib_m_sqrt=no
ba4481b5 13409fi
35996d22
AS
13410rm -f conftest.err conftest.$ac_objext \
13411 conftest$ac_exeext conftest.$ac_ext
98418dba 13412LIBS=$ac_check_lib_save_LIBS
ba4481b5 13413fi
c0d27fcc 13414echo "$as_me:$LINENO: result: $ac_cv_lib_m_sqrt" >&5
98418dba
CW
13415echo "${ECHO_T}$ac_cv_lib_m_sqrt" >&6
13416if test $ac_cv_lib_m_sqrt = yes; then
c0d27fcc 13417 cat >>confdefs.h <<_ACEOF
98418dba 13418#define HAVE_LIBM 1
c0d27fcc 13419_ACEOF
98418dba
CW
13420
13421 LIBS="-lm $LIBS"
ba4481b5 13422
ba4481b5
DL
13423fi
13424
c0d27fcc 13425
55597d70
DL
13426# Check for mail-locking functions in a "mail" library. Probably this should
13427# have the same check as for liblockfile below.
98418dba 13428
c0d27fcc 13429echo "$as_me:$LINENO: checking for maillock in -lmail" >&5
98418dba
CW
13430echo $ECHO_N "checking for maillock in -lmail... $ECHO_C" >&6
13431if test "${ac_cv_lib_mail_maillock+set}" = set; then
503d2be0 13432 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13433else
98418dba
CW
13434 ac_check_lib_save_LIBS=$LIBS
13435LIBS="-lmail $LIBS"
13436cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13437/* confdefs.h. */
13438_ACEOF
13439cat confdefs.h >>conftest.$ac_ext
13440cat >>conftest.$ac_ext <<_ACEOF
13441/* end confdefs.h. */
98418dba
CW
13442
13443/* Override any gcc2 internal prototype to avoid an error. */
13444#ifdef __cplusplus
13445extern "C"
13446#endif
13447/* We use char because int might match the return type of a gcc2
13448 builtin and then its argument prototype would still apply. */
13449char maillock ();
503d2be0
AS
13450int
13451main ()
13452{
98418dba 13453maillock ();
503d2be0
AS
13454 ;
13455 return 0;
13456}
13457_ACEOF
13458rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13459if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 13460 (eval $ac_link) 2>conftest.er1
503d2be0 13461 ac_status=$?
35996d22
AS
13462 grep -v '^ *+' conftest.er1 >conftest.err
13463 rm -f conftest.er1
13464 cat conftest.err >&5
c0d27fcc 13465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13466 (exit $ac_status); } &&
551ffc27
ST
13467 { ac_try='test -z "$ac_c_werror_flag"
13468 || test ! -s conftest.err'
35996d22
AS
13469 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13470 (eval $ac_try) 2>&5
13471 ac_status=$?
13472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13473 (exit $ac_status); }; } &&
13474 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13475 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13476 (eval $ac_try) 2>&5
13477 ac_status=$?
c0d27fcc 13478 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13479 (exit $ac_status); }; }; then
98418dba 13480 ac_cv_lib_mail_maillock=yes
ba4481b5 13481else
503d2be0 13482 echo "$as_me: failed program was:" >&5
19650fd6
AS
13483sed 's/^/| /' conftest.$ac_ext >&5
13484
98418dba 13485ac_cv_lib_mail_maillock=no
ba4481b5 13486fi
35996d22
AS
13487rm -f conftest.err conftest.$ac_objext \
13488 conftest$ac_exeext conftest.$ac_ext
98418dba 13489LIBS=$ac_check_lib_save_LIBS
ba4481b5 13490fi
c0d27fcc 13491echo "$as_me:$LINENO: result: $ac_cv_lib_mail_maillock" >&5
98418dba
CW
13492echo "${ECHO_T}$ac_cv_lib_mail_maillock" >&6
13493if test $ac_cv_lib_mail_maillock = yes; then
c0d27fcc 13494 cat >>confdefs.h <<_ACEOF
98418dba 13495#define HAVE_LIBMAIL 1
c0d27fcc 13496_ACEOF
ba4481b5 13497
98418dba 13498 LIBS="-lmail $LIBS"
ba4481b5 13499
98418dba 13500fi
ba4481b5 13501
c0d27fcc
MR
13502
13503echo "$as_me:$LINENO: checking for maillock in -llockfile" >&5
98418dba
CW
13504echo $ECHO_N "checking for maillock in -llockfile... $ECHO_C" >&6
13505if test "${ac_cv_lib_lockfile_maillock+set}" = set; then
503d2be0 13506 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13507else
503d2be0 13508 ac_check_lib_save_LIBS=$LIBS
98418dba 13509LIBS="-llockfile $LIBS"
503d2be0 13510cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13511/* confdefs.h. */
13512_ACEOF
13513cat confdefs.h >>conftest.$ac_ext
13514cat >>conftest.$ac_ext <<_ACEOF
13515/* end confdefs.h. */
503d2be0 13516
ba4481b5 13517/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
13518#ifdef __cplusplus
13519extern "C"
13520#endif
ba4481b5 13521/* We use char because int might match the return type of a gcc2
503d2be0 13522 builtin and then its argument prototype would still apply. */
98418dba 13523char maillock ();
503d2be0
AS
13524int
13525main ()
13526{
98418dba 13527maillock ();
503d2be0
AS
13528 ;
13529 return 0;
13530}
13531_ACEOF
13532rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13533if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 13534 (eval $ac_link) 2>conftest.er1
503d2be0 13535 ac_status=$?
35996d22
AS
13536 grep -v '^ *+' conftest.er1 >conftest.err
13537 rm -f conftest.er1
13538 cat conftest.err >&5
c0d27fcc 13539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13540 (exit $ac_status); } &&
551ffc27
ST
13541 { ac_try='test -z "$ac_c_werror_flag"
13542 || test ! -s conftest.err'
35996d22
AS
13543 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13544 (eval $ac_try) 2>&5
13545 ac_status=$?
13546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13547 (exit $ac_status); }; } &&
13548 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13549 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13550 (eval $ac_try) 2>&5
13551 ac_status=$?
c0d27fcc 13552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13553 (exit $ac_status); }; }; then
98418dba 13554 ac_cv_lib_lockfile_maillock=yes
503d2be0
AS
13555else
13556 echo "$as_me: failed program was:" >&5
19650fd6
AS
13557sed 's/^/| /' conftest.$ac_ext >&5
13558
98418dba
CW
13559ac_cv_lib_lockfile_maillock=no
13560fi
35996d22
AS
13561rm -f conftest.err conftest.$ac_objext \
13562 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
13563LIBS=$ac_check_lib_save_LIBS
13564fi
c0d27fcc 13565echo "$as_me:$LINENO: result: $ac_cv_lib_lockfile_maillock" >&5
98418dba
CW
13566echo "${ECHO_T}$ac_cv_lib_lockfile_maillock" >&6
13567if test $ac_cv_lib_lockfile_maillock = yes; then
c0d27fcc 13568 cat >>confdefs.h <<_ACEOF
98418dba 13569#define HAVE_LIBLOCKFILE 1
c0d27fcc 13570_ACEOF
98418dba
CW
13571
13572 LIBS="-llockfile $LIBS"
13573
13574fi
13575
13576# If we have the shared liblockfile, assume we must use it for mail
13577# locking (e.g. Debian). If we couldn't link against liblockfile
13578# (no liblockfile.a installed), ensure that we don't need to.
13579if test "$ac_cv_lib_lockfile_maillock" = no; then
13580 # Extract the first word of "liblockfile.so", so it can be a program name with args.
13581set dummy liblockfile.so; ac_word=$2
c0d27fcc 13582echo "$as_me:$LINENO: checking for $ac_word" >&5
98418dba
CW
13583echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13584if test "${ac_cv_prog_liblockfile+set}" = set; then
13585 echo $ECHO_N "(cached) $ECHO_C" >&6
13586else
13587 if test -n "$liblockfile"; then
13588 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
13589else
c0d27fcc 13590as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6bae0ccf
DL
13591as_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
13592for as_dir in $as_dummy
c0d27fcc
MR
13593do
13594 IFS=$as_save_IFS
13595 test -z "$as_dir" && as_dir=.
13596 for ac_exec_ext in '' $ac_executable_extensions; do
13597 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13598 ac_cv_prog_liblockfile="yes"
13599 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13600 break 2
13601 fi
13602done
98418dba
CW
13603done
13604
13605 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
503d2be0 13606fi
503d2be0 13607fi
98418dba
CW
13608liblockfile=$ac_cv_prog_liblockfile
13609if test -n "$liblockfile"; then
c0d27fcc 13610 echo "$as_me:$LINENO: result: $liblockfile" >&5
98418dba
CW
13611echo "${ECHO_T}$liblockfile" >&6
13612else
c0d27fcc 13613 echo "$as_me:$LINENO: result: no" >&5
98418dba 13614echo "${ECHO_T}no" >&6
ba4481b5
DL
13615fi
13616
98418dba 13617 if test $ac_cv_prog_liblockfile = yes; then
c0d27fcc 13618 { { echo "$as_me:$LINENO: error: Shared liblockfile found but can't link against it.
98418dba
CW
13619This probably means that movemail could lose mail.
13620There may be a \`development' package to install containing liblockfile." >&5
13621echo "$as_me: error: Shared liblockfile found but can't link against it.
13622This probably means that movemail could lose mail.
13623There may be a \`development' package to install containing liblockfile." >&2;}
13624 { (exit 1); exit 1; }; }
98418dba 13625 else :
55597d70 13626 fi
98418dba 13627fi
503d2be0 13628
98418dba
CW
13629for ac_func in touchlock
13630do
13631as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 13632echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
13633echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13634if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 13635 echo $ECHO_N "(cached) $ECHO_C" >&6
457b792c 13636else
98418dba 13637 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13638/* confdefs.h. */
13639_ACEOF
13640cat confdefs.h >>conftest.$ac_ext
13641cat >>conftest.$ac_ext <<_ACEOF
13642/* end confdefs.h. */
35996d22
AS
13643/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
13644 For example, HP-UX 11i <limits.h> declares gettimeofday. */
13645#define $ac_func innocuous_$ac_func
13646
98418dba 13647/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
13648 which can conflict with char $ac_func (); below.
13649 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13650 <limits.h> exists even on freestanding compilers. */
35996d22 13651
19650fd6
AS
13652#ifdef __STDC__
13653# include <limits.h>
13654#else
13655# include <assert.h>
13656#endif
35996d22
AS
13657
13658#undef $ac_func
13659
457b792c 13660/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
13661#ifdef __cplusplus
13662extern "C"
19650fd6 13663{
503d2be0 13664#endif
457b792c 13665/* We use char because int might match the return type of a gcc2
503d2be0 13666 builtin and then its argument prototype would still apply. */
98418dba 13667char $ac_func ();
98418dba
CW
13668/* The GNU C library defines this for functions which it implements
13669 to always fail with ENOSYS. Some functions are actually named
13670 something starting with __ and the normal name is an alias. */
13671#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13672choke me
13673#else
19650fd6
AS
13674char (*f) () = $ac_func;
13675#endif
13676#ifdef __cplusplus
13677}
cd958eb3
MB
13678#endif
13679
19650fd6
AS
13680int
13681main ()
13682{
13683return f != $ac_func;
503d2be0
AS
13684 ;
13685 return 0;
13686}
13687_ACEOF
13688rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 13689if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 13690 (eval $ac_link) 2>conftest.er1
503d2be0 13691 ac_status=$?
35996d22
AS
13692 grep -v '^ *+' conftest.er1 >conftest.err
13693 rm -f conftest.er1
13694 cat conftest.err >&5
c0d27fcc 13695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13696 (exit $ac_status); } &&
551ffc27
ST
13697 { ac_try='test -z "$ac_c_werror_flag"
13698 || test ! -s conftest.err'
35996d22
AS
13699 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13700 (eval $ac_try) 2>&5
13701 ac_status=$?
13702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13703 (exit $ac_status); }; } &&
13704 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 13705 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
13706 (eval $ac_try) 2>&5
13707 ac_status=$?
c0d27fcc 13708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 13709 (exit $ac_status); }; }; then
98418dba 13710 eval "$as_ac_var=yes"
503d2be0
AS
13711else
13712 echo "$as_me: failed program was:" >&5
19650fd6
AS
13713sed 's/^/| /' conftest.$ac_ext >&5
13714
98418dba 13715eval "$as_ac_var=no"
503d2be0 13716fi
35996d22
AS
13717rm -f conftest.err conftest.$ac_objext \
13718 conftest$ac_exeext conftest.$ac_ext
503d2be0 13719fi
c0d27fcc 13720echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
13721echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13722if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 13723 cat >>confdefs.h <<_ACEOF
98418dba 13724#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 13725_ACEOF
457b792c 13726
457b792c 13727fi
98418dba 13728done
457b792c 13729
c0d27fcc 13730
98418dba
CW
13731for ac_header in maillock.h
13732do
13733as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
13734if eval "test \"\${$as_ac_Header+set}\" = set"; then
13735 echo "$as_me:$LINENO: checking for $ac_header" >&5
98418dba
CW
13736echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13737if eval "test \"\${$as_ac_Header+set}\" = set"; then
503d2be0 13738 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
13739fi
13740echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
13741echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
ba4481b5 13742else
c0d27fcc
MR
13743 # Is the header compilable?
13744echo "$as_me:$LINENO: checking $ac_header usability" >&5
13745echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
13746cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13747/* confdefs.h. */
13748_ACEOF
13749cat confdefs.h >>conftest.$ac_ext
13750cat >>conftest.$ac_ext <<_ACEOF
13751/* end confdefs.h. */
c0d27fcc
MR
13752$ac_includes_default
13753#include <$ac_header>
13754_ACEOF
13755rm -f conftest.$ac_objext
13756if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 13757 (eval $ac_compile) 2>conftest.er1
c0d27fcc 13758 ac_status=$?
35996d22
AS
13759 grep -v '^ *+' conftest.er1 >conftest.err
13760 rm -f conftest.er1
13761 cat conftest.err >&5
c0d27fcc
MR
13762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13763 (exit $ac_status); } &&
551ffc27
ST
13764 { ac_try='test -z "$ac_c_werror_flag"
13765 || test ! -s conftest.err'
35996d22
AS
13766 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13767 (eval $ac_try) 2>&5
13768 ac_status=$?
13769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13770 (exit $ac_status); }; } &&
13771 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
13772 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13773 (eval $ac_try) 2>&5
13774 ac_status=$?
13775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13776 (exit $ac_status); }; }; then
13777 ac_header_compiler=yes
13778else
13779 echo "$as_me: failed program was:" >&5
19650fd6
AS
13780sed 's/^/| /' conftest.$ac_ext >&5
13781
c0d27fcc
MR
13782ac_header_compiler=no
13783fi
35996d22 13784rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
13785echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13786echo "${ECHO_T}$ac_header_compiler" >&6
13787
13788# Is the header present?
13789echo "$as_me:$LINENO: checking $ac_header presence" >&5
13790echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
13791cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13792/* confdefs.h. */
13793_ACEOF
13794cat confdefs.h >>conftest.$ac_ext
13795cat >>conftest.$ac_ext <<_ACEOF
13796/* end confdefs.h. */
98418dba 13797#include <$ac_header>
503d2be0 13798_ACEOF
c0d27fcc 13799if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba 13800 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
503d2be0 13801 ac_status=$?
6bae0ccf 13802 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
13803 rm -f conftest.er1
13804 cat conftest.err >&5
c0d27fcc 13805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
13806 (exit $ac_status); } >/dev/null; then
13807 if test -s conftest.err; then
13808 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 13809 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
13810 else
13811 ac_cpp_err=
13812 fi
503d2be0 13813else
98418dba 13814 ac_cpp_err=yes
503d2be0 13815fi
98418dba 13816if test -z "$ac_cpp_err"; then
c0d27fcc 13817 ac_header_preproc=yes
98418dba
CW
13818else
13819 echo "$as_me: failed program was:" >&5
19650fd6
AS
13820sed 's/^/| /' conftest.$ac_ext >&5
13821
c0d27fcc 13822 ac_header_preproc=no
503d2be0 13823fi
98418dba 13824rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
13825echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13826echo "${ECHO_T}$ac_header_preproc" >&6
13827
13828# So? What about this header?
35996d22
AS
13829case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13830 yes:no: )
c0d27fcc
MR
13831 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
13832echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
13833 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
13834echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
13835 ac_header_preproc=yes
19650fd6 13836 ;;
35996d22 13837 no:yes:* )
c0d27fcc
MR
13838 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
13839echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
13840 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
13841echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
13842 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
13843echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
13844 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
13845echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 13846 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 13847echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
13848 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
13849echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
13850 (
13851 cat <<\_ASBOX
35996d22
AS
13852## ------------------------------------------ ##
13853## Report this to the AC_PACKAGE_NAME lists. ##
13854## ------------------------------------------ ##
19650fd6
AS
13855_ASBOX
13856 ) |
13857 sed "s/^/$as_me: WARNING: /" >&2
13858 ;;
c0d27fcc
MR
13859esac
13860echo "$as_me:$LINENO: checking for $ac_header" >&5
13861echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13862if eval "test \"\${$as_ac_Header+set}\" = set"; then
13863 echo $ECHO_N "(cached) $ECHO_C" >&6
13864else
35996d22 13865 eval "$as_ac_Header=\$ac_header_preproc"
ba4481b5 13866fi
c0d27fcc 13867echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 13868echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
13869
13870fi
98418dba 13871if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 13872 cat >>confdefs.h <<_ACEOF
98418dba 13873#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 13874_ACEOF
48d4b120 13875
ba4481b5 13876fi
c0d27fcc 13877
98418dba
CW
13878done
13879
c0d27fcc
MR
13880
13881
13882
13883
13884
13885
13886
13887
13888
13889
13890
13891
13892
13893
13894
13895
13896
13897
13898
13899
13900
13901
13902
13903
13904
13905
13906
13907
13908
13909
13910
13911
13912
13913
13914
13915
13916
13917
13918
13919
13920
13921
13922
13923
13924
13925
13926
13927
13928
13929
13930
13931
13932
13933
13934
22044edf
DL
13935
13936
c0d27fcc 13937
b0e44248
RB
13938
13939
973a76b1
DL
13940
13941
13942
cd958eb3 13943
25ca0bca 13944
ea92fc9f 13945
c0d27fcc
MR
13946
13947
98418dba 13948for ac_func in gethostname getdomainname dup2 \
ea92fc9f 13949rename closedir mkdir rmdir sysinfo getrusage \
98418dba
CW
13950random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime res_init setsid \
13951strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \
973a76b1 13952utimes setrlimit setpgid getcwd getwd shutdown getaddrinfo \
98418dba
CW
13953__fpending mblen mbrlen mbsinit strsignal setitimer ualarm index rindex \
13954sendto recvfrom getsockopt setsockopt getsockname getpeername \
b0e44248 13955gai_strerror mkstemp getline getdelim mremap memmove fsync bzero \
4489ece2 13956memset memcmp difftime memcpy mempcpy mblen mbrlen posix_memalign
98418dba
CW
13957do
13958as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 13959echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
13960echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13961if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 13962 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13963else
503d2be0 13964 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13965/* confdefs.h. */
13966_ACEOF
13967cat confdefs.h >>conftest.$ac_ext
13968cat >>conftest.$ac_ext <<_ACEOF
13969/* end confdefs.h. */
35996d22
AS
13970/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
13971 For example, HP-UX 11i <limits.h> declares gettimeofday. */
13972#define $ac_func innocuous_$ac_func
13973
98418dba 13974/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
13975 which can conflict with char $ac_func (); below.
13976 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13977 <limits.h> exists even on freestanding compilers. */
35996d22 13978
19650fd6
AS
13979#ifdef __STDC__
13980# include <limits.h>
13981#else
13982# include <assert.h>
13983#endif
35996d22
AS
13984
13985#undef $ac_func
13986
ba4481b5 13987/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
13988#ifdef __cplusplus
13989extern "C"
19650fd6 13990{
503d2be0 13991#endif
ba4481b5 13992/* We use char because int might match the return type of a gcc2
503d2be0 13993 builtin and then its argument prototype would still apply. */
98418dba 13994char $ac_func ();
98418dba
CW
13995/* The GNU C library defines this for functions which it implements
13996 to always fail with ENOSYS. Some functions are actually named
13997 something starting with __ and the normal name is an alias. */
13998#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13999choke me
14000#else
19650fd6
AS
14001char (*f) () = $ac_func;
14002#endif
14003#ifdef __cplusplus
14004}
98418dba
CW
14005#endif
14006
19650fd6
AS
14007int
14008main ()
14009{
14010return f != $ac_func;
503d2be0
AS
14011 ;
14012 return 0;
14013}
14014_ACEOF
14015rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14016if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 14017 (eval $ac_link) 2>conftest.er1
503d2be0 14018 ac_status=$?
35996d22
AS
14019 grep -v '^ *+' conftest.er1 >conftest.err
14020 rm -f conftest.er1
14021 cat conftest.err >&5
c0d27fcc 14022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14023 (exit $ac_status); } &&
551ffc27
ST
14024 { ac_try='test -z "$ac_c_werror_flag"
14025 || test ! -s conftest.err'
35996d22
AS
14026 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14027 (eval $ac_try) 2>&5
14028 ac_status=$?
14029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14030 (exit $ac_status); }; } &&
14031 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14032 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
14033 (eval $ac_try) 2>&5
14034 ac_status=$?
c0d27fcc 14035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14036 (exit $ac_status); }; }; then
98418dba 14037 eval "$as_ac_var=yes"
503d2be0
AS
14038else
14039 echo "$as_me: failed program was:" >&5
19650fd6
AS
14040sed 's/^/| /' conftest.$ac_ext >&5
14041
98418dba 14042eval "$as_ac_var=no"
503d2be0 14043fi
35996d22
AS
14044rm -f conftest.err conftest.$ac_objext \
14045 conftest$ac_exeext conftest.$ac_ext
ba4481b5 14046fi
c0d27fcc 14047echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
14048echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14049if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 14050 cat >>confdefs.h <<_ACEOF
98418dba 14051#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 14052_ACEOF
ba4481b5 14053
ba4481b5 14054fi
98418dba 14055done
ba4481b5 14056
c0d27fcc
MR
14057
14058
98418dba
CW
14059for ac_header in sys/un.h
14060do
14061as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
14062if eval "test \"\${$as_ac_Header+set}\" = set"; then
14063 echo "$as_me:$LINENO: checking for $ac_header" >&5
98418dba
CW
14064echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14065if eval "test \"\${$as_ac_Header+set}\" = set"; then
14066 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
14067fi
14068echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14069echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 14070else
c0d27fcc
MR
14071 # Is the header compilable?
14072echo "$as_me:$LINENO: checking $ac_header usability" >&5
14073echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
14074cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14075/* confdefs.h. */
14076_ACEOF
14077cat confdefs.h >>conftest.$ac_ext
14078cat >>conftest.$ac_ext <<_ACEOF
14079/* end confdefs.h. */
c0d27fcc
MR
14080$ac_includes_default
14081#include <$ac_header>
14082_ACEOF
14083rm -f conftest.$ac_objext
14084if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 14085 (eval $ac_compile) 2>conftest.er1
c0d27fcc 14086 ac_status=$?
35996d22
AS
14087 grep -v '^ *+' conftest.er1 >conftest.err
14088 rm -f conftest.er1
14089 cat conftest.err >&5
c0d27fcc
MR
14090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14091 (exit $ac_status); } &&
551ffc27
ST
14092 { ac_try='test -z "$ac_c_werror_flag"
14093 || test ! -s conftest.err'
35996d22
AS
14094 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14095 (eval $ac_try) 2>&5
14096 ac_status=$?
14097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14098 (exit $ac_status); }; } &&
14099 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
14100 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14101 (eval $ac_try) 2>&5
14102 ac_status=$?
14103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14104 (exit $ac_status); }; }; then
14105 ac_header_compiler=yes
14106else
14107 echo "$as_me: failed program was:" >&5
19650fd6
AS
14108sed 's/^/| /' conftest.$ac_ext >&5
14109
c0d27fcc
MR
14110ac_header_compiler=no
14111fi
35996d22 14112rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
14113echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14114echo "${ECHO_T}$ac_header_compiler" >&6
14115
14116# Is the header present?
14117echo "$as_me:$LINENO: checking $ac_header presence" >&5
14118echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
14119cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14120/* confdefs.h. */
14121_ACEOF
14122cat confdefs.h >>conftest.$ac_ext
14123cat >>conftest.$ac_ext <<_ACEOF
14124/* end confdefs.h. */
98418dba 14125#include <$ac_header>
503d2be0 14126_ACEOF
c0d27fcc 14127if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
14128 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14129 ac_status=$?
6bae0ccf 14130 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
14131 rm -f conftest.er1
14132 cat conftest.err >&5
c0d27fcc 14133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
14134 (exit $ac_status); } >/dev/null; then
14135 if test -s conftest.err; then
14136 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 14137 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
14138 else
14139 ac_cpp_err=
14140 fi
14141else
14142 ac_cpp_err=yes
14143fi
14144if test -z "$ac_cpp_err"; then
c0d27fcc 14145 ac_header_preproc=yes
ba4481b5 14146else
503d2be0 14147 echo "$as_me: failed program was:" >&5
19650fd6
AS
14148sed 's/^/| /' conftest.$ac_ext >&5
14149
c0d27fcc 14150 ac_header_preproc=no
ba4481b5 14151fi
503d2be0 14152rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
14153echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14154echo "${ECHO_T}$ac_header_preproc" >&6
14155
14156# So? What about this header?
35996d22
AS
14157case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14158 yes:no: )
c0d27fcc
MR
14159 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
14160echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
14161 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
14162echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
14163 ac_header_preproc=yes
19650fd6 14164 ;;
35996d22 14165 no:yes:* )
c0d27fcc
MR
14166 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
14167echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
14168 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
14169echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
14170 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
14171echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
14172 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
14173echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 14174 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 14175echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
14176 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
14177echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
14178 (
14179 cat <<\_ASBOX
35996d22
AS
14180## ------------------------------------------ ##
14181## Report this to the AC_PACKAGE_NAME lists. ##
14182## ------------------------------------------ ##
19650fd6
AS
14183_ASBOX
14184 ) |
14185 sed "s/^/$as_me: WARNING: /" >&2
14186 ;;
c0d27fcc
MR
14187esac
14188echo "$as_me:$LINENO: checking for $ac_header" >&5
14189echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14190if eval "test \"\${$as_ac_Header+set}\" = set"; then
14191 echo $ECHO_N "(cached) $ECHO_C" >&6
14192else
35996d22 14193 eval "$as_ac_Header=\$ac_header_preproc"
ba4481b5 14194fi
c0d27fcc 14195echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
925c2f3f 14196echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
14197
14198fi
925c2f3f 14199if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 14200 cat >>confdefs.h <<_ACEOF
925c2f3f 14201#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 14202_ACEOF
503d2be0 14203
925c2f3f 14204fi
c0d27fcc 14205
925c2f3f
EZ
14206done
14207
c0d27fcc
MR
14208
14209
14210
35996d22
AS
14211
14212for ac_header in stdlib.h sys/time.h unistd.h
925c2f3f
EZ
14213do
14214as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
14215if eval "test \"\${$as_ac_Header+set}\" = set"; then
14216 echo "$as_me:$LINENO: checking for $ac_header" >&5
925c2f3f
EZ
14217echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14218if eval "test \"\${$as_ac_Header+set}\" = set"; then
14219 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
14220fi
14221echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14222echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
925c2f3f 14223else
c0d27fcc
MR
14224 # Is the header compilable?
14225echo "$as_me:$LINENO: checking $ac_header usability" >&5
14226echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
14227cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14228/* confdefs.h. */
14229_ACEOF
14230cat confdefs.h >>conftest.$ac_ext
14231cat >>conftest.$ac_ext <<_ACEOF
14232/* end confdefs.h. */
c0d27fcc
MR
14233$ac_includes_default
14234#include <$ac_header>
14235_ACEOF
14236rm -f conftest.$ac_objext
14237if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 14238 (eval $ac_compile) 2>conftest.er1
c0d27fcc 14239 ac_status=$?
35996d22
AS
14240 grep -v '^ *+' conftest.er1 >conftest.err
14241 rm -f conftest.er1
14242 cat conftest.err >&5
c0d27fcc
MR
14243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14244 (exit $ac_status); } &&
551ffc27
ST
14245 { ac_try='test -z "$ac_c_werror_flag"
14246 || test ! -s conftest.err'
35996d22
AS
14247 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14248 (eval $ac_try) 2>&5
14249 ac_status=$?
14250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14251 (exit $ac_status); }; } &&
14252 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
14253 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14254 (eval $ac_try) 2>&5
14255 ac_status=$?
14256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14257 (exit $ac_status); }; }; then
14258 ac_header_compiler=yes
14259else
14260 echo "$as_me: failed program was:" >&5
19650fd6
AS
14261sed 's/^/| /' conftest.$ac_ext >&5
14262
c0d27fcc
MR
14263ac_header_compiler=no
14264fi
35996d22 14265rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
14266echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14267echo "${ECHO_T}$ac_header_compiler" >&6
14268
14269# Is the header present?
14270echo "$as_me:$LINENO: checking $ac_header presence" >&5
14271echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
14272cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14273/* confdefs.h. */
14274_ACEOF
14275cat confdefs.h >>conftest.$ac_ext
14276cat >>conftest.$ac_ext <<_ACEOF
14277/* end confdefs.h. */
98418dba 14278#include <$ac_header>
503d2be0 14279_ACEOF
c0d27fcc 14280if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
14281 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14282 ac_status=$?
6bae0ccf 14283 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
14284 rm -f conftest.er1
14285 cat conftest.err >&5
c0d27fcc 14286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
14287 (exit $ac_status); } >/dev/null; then
14288 if test -s conftest.err; then
14289 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 14290 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
14291 else
14292 ac_cpp_err=
14293 fi
14294else
14295 ac_cpp_err=yes
14296fi
14297if test -z "$ac_cpp_err"; then
c0d27fcc 14298 ac_header_preproc=yes
98418dba
CW
14299else
14300 echo "$as_me: failed program was:" >&5
19650fd6
AS
14301sed 's/^/| /' conftest.$ac_ext >&5
14302
c0d27fcc 14303 ac_header_preproc=no
98418dba
CW
14304fi
14305rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
14306echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14307echo "${ECHO_T}$ac_header_preproc" >&6
14308
14309# So? What about this header?
35996d22
AS
14310case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14311 yes:no: )
c0d27fcc
MR
14312 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
14313echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
14314 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
14315echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
14316 ac_header_preproc=yes
19650fd6 14317 ;;
35996d22 14318 no:yes:* )
c0d27fcc
MR
14319 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
14320echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
14321 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
14322echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
14323 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
14324echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
14325 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
14326echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 14327 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 14328echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
14329 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
14330echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
14331 (
14332 cat <<\_ASBOX
35996d22
AS
14333## ------------------------------------------ ##
14334## Report this to the AC_PACKAGE_NAME lists. ##
14335## ------------------------------------------ ##
19650fd6
AS
14336_ASBOX
14337 ) |
14338 sed "s/^/$as_me: WARNING: /" >&2
14339 ;;
c0d27fcc
MR
14340esac
14341echo "$as_me:$LINENO: checking for $ac_header" >&5
14342echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14343if eval "test \"\${$as_ac_Header+set}\" = set"; then
14344 echo $ECHO_N "(cached) $ECHO_C" >&6
14345else
35996d22 14346 eval "$as_ac_Header=\$ac_header_preproc"
ffe36136 14347fi
c0d27fcc 14348echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
98418dba 14349echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
14350
14351fi
98418dba 14352if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 14353 cat >>confdefs.h <<_ACEOF
98418dba 14354#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 14355_ACEOF
98418dba
CW
14356
14357fi
c0d27fcc 14358
98418dba
CW
14359done
14360
c0d27fcc 14361
98418dba
CW
14362for ac_func in alarm
14363do
14364as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 14365echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
14366echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14367if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 14368 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 14369else
98418dba 14370 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14371/* confdefs.h. */
14372_ACEOF
14373cat confdefs.h >>conftest.$ac_ext
14374cat >>conftest.$ac_ext <<_ACEOF
14375/* end confdefs.h. */
35996d22
AS
14376/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14377 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14378#define $ac_func innocuous_$ac_func
14379
98418dba 14380/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
14381 which can conflict with char $ac_func (); below.
14382 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14383 <limits.h> exists even on freestanding compilers. */
35996d22 14384
19650fd6
AS
14385#ifdef __STDC__
14386# include <limits.h>
14387#else
14388# include <assert.h>
14389#endif
35996d22
AS
14390
14391#undef $ac_func
14392
ba4481b5 14393/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
14394#ifdef __cplusplus
14395extern "C"
19650fd6 14396{
503d2be0 14397#endif
ba4481b5 14398/* We use char because int might match the return type of a gcc2
503d2be0 14399 builtin and then its argument prototype would still apply. */
98418dba 14400char $ac_func ();
98418dba
CW
14401/* The GNU C library defines this for functions which it implements
14402 to always fail with ENOSYS. Some functions are actually named
14403 something starting with __ and the normal name is an alias. */
14404#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14405choke me
14406#else
19650fd6
AS
14407char (*f) () = $ac_func;
14408#endif
14409#ifdef __cplusplus
14410}
98418dba
CW
14411#endif
14412
19650fd6
AS
14413int
14414main ()
14415{
14416return f != $ac_func;
503d2be0
AS
14417 ;
14418 return 0;
14419}
14420_ACEOF
14421rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14422if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 14423 (eval $ac_link) 2>conftest.er1
503d2be0 14424 ac_status=$?
35996d22
AS
14425 grep -v '^ *+' conftest.er1 >conftest.err
14426 rm -f conftest.er1
14427 cat conftest.err >&5
c0d27fcc 14428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14429 (exit $ac_status); } &&
551ffc27
ST
14430 { ac_try='test -z "$ac_c_werror_flag"
14431 || test ! -s conftest.err'
35996d22
AS
14432 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14433 (eval $ac_try) 2>&5
14434 ac_status=$?
14435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14436 (exit $ac_status); }; } &&
14437 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14438 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
14439 (eval $ac_try) 2>&5
14440 ac_status=$?
c0d27fcc 14441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14442 (exit $ac_status); }; }; then
98418dba 14443 eval "$as_ac_var=yes"
503d2be0
AS
14444else
14445 echo "$as_me: failed program was:" >&5
19650fd6
AS
14446sed 's/^/| /' conftest.$ac_ext >&5
14447
98418dba 14448eval "$as_ac_var=no"
503d2be0 14449fi
35996d22
AS
14450rm -f conftest.err conftest.$ac_objext \
14451 conftest$ac_exeext conftest.$ac_ext
ffe36136 14452fi
c0d27fcc 14453echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
14454echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14455if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 14456 cat >>confdefs.h <<_ACEOF
98418dba 14457#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 14458_ACEOF
ffe36136 14459
ba4481b5 14460fi
98418dba 14461done
ba4481b5 14462
c0d27fcc 14463echo "$as_me:$LINENO: checking for working mktime" >&5
98418dba
CW
14464echo $ECHO_N "checking for working mktime... $ECHO_C" >&6
14465if test "${ac_cv_func_working_mktime+set}" = set; then
14466 echo $ECHO_N "(cached) $ECHO_C" >&6
14467else
14468 if test "$cross_compiling" = yes; then
14469 ac_cv_func_working_mktime=no
14470else
14471 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14472/* confdefs.h. */
14473_ACEOF
14474cat confdefs.h >>conftest.$ac_ext
14475cat >>conftest.$ac_ext <<_ACEOF
14476/* end confdefs.h. */
98418dba
CW
14477/* Test program from Paul Eggert and Tony Leneis. */
14478#if TIME_WITH_SYS_TIME
14479# include <sys/time.h>
14480# include <time.h>
14481#else
14482# if HAVE_SYS_TIME_H
14483# include <sys/time.h>
14484# else
14485# include <time.h>
14486# endif
14487#endif
ba4481b5 14488
35996d22
AS
14489#if HAVE_STDLIB_H
14490# include <stdlib.h>
14491#endif
14492
98418dba
CW
14493#if HAVE_UNISTD_H
14494# include <unistd.h>
14495#endif
ba4481b5 14496
98418dba
CW
14497#if !HAVE_ALARM
14498# define alarm(X) /* empty */
14499#endif
df645f7c 14500
98418dba
CW
14501/* Work around redefinition to rpl_putenv by other config tests. */
14502#undef putenv
df645f7c 14503
98418dba 14504static time_t time_t_max;
35996d22 14505static time_t time_t_min;
df645f7c 14506
98418dba 14507/* Values we'll use to set the TZ environment variable. */
35996d22
AS
14508static char *tz_strings[] = {
14509 (char *) 0, "TZ=GMT0", "TZ=JST-9",
98418dba
CW
14510 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
14511};
14512#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
503d2be0 14513
98418dba
CW
14514/* Fail if mktime fails to convert a date in the spring-forward gap.
14515 Based on a problem report from Andreas Jaeger. */
14516static void
14517spring_forward_gap ()
14518{
14519 /* glibc (up to about 1998-10-07) failed this test. */
14520 struct tm tm;
14521
14522 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
14523 instead of "TZ=America/Vancouver" in order to detect the bug even
14524 on systems that don't support the Olson extension, or don't have the
14525 full zoneinfo tables installed. */
14526 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
14527
14528 tm.tm_year = 98;
14529 tm.tm_mon = 3;
14530 tm.tm_mday = 5;
14531 tm.tm_hour = 2;
14532 tm.tm_min = 0;
14533 tm.tm_sec = 0;
14534 tm.tm_isdst = -1;
14535 if (mktime (&tm) == (time_t)-1)
14536 exit (1);
14537}
14538
14539static void
35996d22 14540mktime_test1 (now)
98418dba
CW
14541 time_t now;
14542{
14543 struct tm *lt;
14544 if ((lt = localtime (&now)) && mktime (lt) != now)
14545 exit (1);
35996d22
AS
14546}
14547
14548static void
14549mktime_test (now)
14550 time_t now;
14551{
14552 mktime_test1 (now);
14553 mktime_test1 ((time_t) (time_t_max - now));
14554 mktime_test1 ((time_t) (time_t_min + now));
98418dba
CW
14555}
14556
14557static void
14558irix_6_4_bug ()
14559{
14560 /* Based on code from Ariel Faigon. */
14561 struct tm tm;
14562 tm.tm_year = 96;
14563 tm.tm_mon = 3;
14564 tm.tm_mday = 0;
14565 tm.tm_hour = 0;
14566 tm.tm_min = 0;
14567 tm.tm_sec = 0;
14568 tm.tm_isdst = -1;
14569 mktime (&tm);
14570 if (tm.tm_mon != 2 || tm.tm_mday != 31)
14571 exit (1);
14572}
14573
14574static void
14575bigtime_test (j)
14576 int j;
14577{
14578 struct tm tm;
14579 time_t now;
14580 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
14581 now = mktime (&tm);
14582 if (now != (time_t) -1)
14583 {
14584 struct tm *lt = localtime (&now);
14585 if (! (lt
14586 && lt->tm_year == tm.tm_year
14587 && lt->tm_mon == tm.tm_mon
14588 && lt->tm_mday == tm.tm_mday
14589 && lt->tm_hour == tm.tm_hour
14590 && lt->tm_min == tm.tm_min
14591 && lt->tm_sec == tm.tm_sec
14592 && lt->tm_yday == tm.tm_yday
14593 && lt->tm_wday == tm.tm_wday
14594 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
14595 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
14596 exit (1);
14597 }
14598}
14599
14600int
14601main ()
14602{
14603 time_t t, delta;
14604 int i, j;
14605
14606 /* This test makes some buggy mktime implementations loop.
14607 Give up after 60 seconds; a mktime slower than that
14608 isn't worth using anyway. */
14609 alarm (60);
14610
14611 for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2)
14612 continue;
14613 time_t_max--;
35996d22
AS
14614 if ((time_t) -1 < 0)
14615 for (time_t_min = -1; (time_t) (time_t_min * 2) < 0; time_t_min *= 2)
14616 continue;
98418dba
CW
14617 delta = time_t_max / 997; /* a suitable prime number */
14618 for (i = 0; i < N_STRINGS; i++)
14619 {
14620 if (tz_strings[i])
14621 putenv (tz_strings[i]);
503d2be0 14622
98418dba
CW
14623 for (t = 0; t <= time_t_max - delta; t += delta)
14624 mktime_test (t);
35996d22
AS
14625 mktime_test ((time_t) 1);
14626 mktime_test ((time_t) (60 * 60));
14627 mktime_test ((time_t) (60 * 60 * 24));
98418dba
CW
14628
14629 for (j = 1; 0 < j; j *= 2)
35996d22 14630 bigtime_test (j);
98418dba
CW
14631 bigtime_test (j - 1);
14632 }
14633 irix_6_4_bug ();
14634 spring_forward_gap ();
14635 exit (0);
503d2be0
AS
14636}
14637_ACEOF
98418dba 14638rm -f conftest$ac_exeext
c0d27fcc 14639if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
14640 (eval $ac_link) 2>&5
14641 ac_status=$?
c0d27fcc 14642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 14643 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 14644 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
14645 (eval $ac_try) 2>&5
14646 ac_status=$?
c0d27fcc 14647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14648 (exit $ac_status); }; }; then
98418dba 14649 ac_cv_func_working_mktime=yes
503d2be0 14650else
98418dba
CW
14651 echo "$as_me: program exited with status $ac_status" >&5
14652echo "$as_me: failed program was:" >&5
19650fd6
AS
14653sed 's/^/| /' conftest.$ac_ext >&5
14654
c0d27fcc 14655( exit $ac_status )
98418dba 14656ac_cv_func_working_mktime=no
503d2be0 14657fi
35996d22 14658rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
503d2be0 14659fi
ba4481b5 14660fi
c0d27fcc 14661echo "$as_me:$LINENO: result: $ac_cv_func_working_mktime" >&5
98418dba
CW
14662echo "${ECHO_T}$ac_cv_func_working_mktime" >&6
14663if test $ac_cv_func_working_mktime = no; then
35996d22
AS
14664 case $LIBOBJS in
14665 "mktime.$ac_objext" | \
14666 *" mktime.$ac_objext" | \
14667 "mktime.$ac_objext "* | \
14668 *" mktime.$ac_objext "* ) ;;
14669 *) LIBOBJS="$LIBOBJS mktime.$ac_objext" ;;
14670esac
14671
ba4481b5
DL
14672fi
14673
98418dba 14674if test "$ac_cv_func_working_mktime" = no; then
b936fae4 14675
c0d27fcc 14676cat >>confdefs.h <<\_ACEOF
98418dba 14677#define BROKEN_MKTIME 1
c0d27fcc 14678_ACEOF
ba4481b5 14679
ba4481b5 14680fi
503d2be0 14681
98418dba
CW
14682ac_have_func=no # yes means we've found a way to get the load average.
14683
6bae0ccf
DL
14684# Make sure getloadavg.c is where it belongs, at configure-time.
14685test -f "$srcdir/$ac_config_libobj_dir/getloadavg.c" ||
14686 { { echo "$as_me:$LINENO: error: $srcdir/$ac_config_libobj_dir/getloadavg.c is missing" >&5
14687echo "$as_me: error: $srcdir/$ac_config_libobj_dir/getloadavg.c is missing" >&2;}
14688 { (exit 1); exit 1; }; }
14689
98418dba
CW
14690ac_save_LIBS=$LIBS
14691
14692# Check for getloadavg, but be sure not to touch the cache variable.
c0d27fcc 14693(echo "$as_me:$LINENO: checking for getloadavg" >&5
98418dba
CW
14694echo $ECHO_N "checking for getloadavg... $ECHO_C" >&6
14695if test "${ac_cv_func_getloadavg+set}" = set; then
503d2be0 14696 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 14697else
503d2be0 14698 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14699/* confdefs.h. */
14700_ACEOF
14701cat confdefs.h >>conftest.$ac_ext
14702cat >>conftest.$ac_ext <<_ACEOF
14703/* end confdefs.h. */
35996d22
AS
14704/* Define getloadavg to an innocuous variant, in case <limits.h> declares getloadavg.
14705 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14706#define getloadavg innocuous_getloadavg
14707
98418dba 14708/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
14709 which can conflict with char getloadavg (); below.
14710 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14711 <limits.h> exists even on freestanding compilers. */
35996d22 14712
19650fd6
AS
14713#ifdef __STDC__
14714# include <limits.h>
14715#else
14716# include <assert.h>
14717#endif
35996d22
AS
14718
14719#undef getloadavg
14720
ba4481b5 14721/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
14722#ifdef __cplusplus
14723extern "C"
19650fd6 14724{
503d2be0 14725#endif
ba4481b5 14726/* We use char because int might match the return type of a gcc2
503d2be0 14727 builtin and then its argument prototype would still apply. */
98418dba 14728char getloadavg ();
98418dba
CW
14729/* The GNU C library defines this for functions which it implements
14730 to always fail with ENOSYS. Some functions are actually named
14731 something starting with __ and the normal name is an alias. */
14732#if defined (__stub_getloadavg) || defined (__stub___getloadavg)
14733choke me
14734#else
19650fd6
AS
14735char (*f) () = getloadavg;
14736#endif
14737#ifdef __cplusplus
14738}
cd958eb3
MB
14739#endif
14740
19650fd6
AS
14741int
14742main ()
14743{
14744return f != getloadavg;
503d2be0
AS
14745 ;
14746 return 0;
14747}
14748_ACEOF
14749rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14750if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 14751 (eval $ac_link) 2>conftest.er1
503d2be0 14752 ac_status=$?
35996d22
AS
14753 grep -v '^ *+' conftest.er1 >conftest.err
14754 rm -f conftest.er1
14755 cat conftest.err >&5
c0d27fcc 14756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14757 (exit $ac_status); } &&
551ffc27
ST
14758 { ac_try='test -z "$ac_c_werror_flag"
14759 || test ! -s conftest.err'
35996d22
AS
14760 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14761 (eval $ac_try) 2>&5
14762 ac_status=$?
14763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14764 (exit $ac_status); }; } &&
14765 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14766 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
14767 (eval $ac_try) 2>&5
14768 ac_status=$?
c0d27fcc 14769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14770 (exit $ac_status); }; }; then
98418dba 14771 ac_cv_func_getloadavg=yes
503d2be0
AS
14772else
14773 echo "$as_me: failed program was:" >&5
19650fd6
AS
14774sed 's/^/| /' conftest.$ac_ext >&5
14775
98418dba 14776ac_cv_func_getloadavg=no
503d2be0 14777fi
35996d22
AS
14778rm -f conftest.err conftest.$ac_objext \
14779 conftest$ac_exeext conftest.$ac_ext
ba4481b5 14780fi
c0d27fcc 14781echo "$as_me:$LINENO: result: $ac_cv_func_getloadavg" >&5
98418dba
CW
14782echo "${ECHO_T}$ac_cv_func_getloadavg" >&6
14783if test $ac_cv_func_getloadavg = yes; then
14784 exit 0
14785else
14786 exit 1
ba4481b5 14787fi
98418dba 14788) && ac_have_func=yes
ba4481b5 14789
98418dba 14790# On HPUX9, an unprivileged user can get load averages through this function.
503d2be0 14791
98418dba
CW
14792for ac_func in pstat_getdynamic
14793do
14794as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 14795echo "$as_me:$LINENO: checking for $ac_func" >&5
98418dba
CW
14796echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14797if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 14798 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 14799else
503d2be0 14800 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14801/* confdefs.h. */
14802_ACEOF
14803cat confdefs.h >>conftest.$ac_ext
14804cat >>conftest.$ac_ext <<_ACEOF
14805/* end confdefs.h. */
35996d22
AS
14806/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14807 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14808#define $ac_func innocuous_$ac_func
14809
98418dba 14810/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
14811 which can conflict with char $ac_func (); below.
14812 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14813 <limits.h> exists even on freestanding compilers. */
35996d22 14814
19650fd6
AS
14815#ifdef __STDC__
14816# include <limits.h>
14817#else
14818# include <assert.h>
14819#endif
35996d22
AS
14820
14821#undef $ac_func
14822
ba4481b5 14823/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
14824#ifdef __cplusplus
14825extern "C"
19650fd6 14826{
503d2be0 14827#endif
ba4481b5 14828/* We use char because int might match the return type of a gcc2
503d2be0 14829 builtin and then its argument prototype would still apply. */
98418dba 14830char $ac_func ();
98418dba
CW
14831/* The GNU C library defines this for functions which it implements
14832 to always fail with ENOSYS. Some functions are actually named
14833 something starting with __ and the normal name is an alias. */
14834#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14835choke me
14836#else
19650fd6
AS
14837char (*f) () = $ac_func;
14838#endif
14839#ifdef __cplusplus
14840}
98418dba
CW
14841#endif
14842
19650fd6
AS
14843int
14844main ()
14845{
14846return f != $ac_func;
98418dba
CW
14847 ;
14848 return 0;
14849}
f21fadcc 14850_ACEOF
98418dba 14851rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14852if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 14853 (eval $ac_link) 2>conftest.er1
f21fadcc 14854 ac_status=$?
35996d22
AS
14855 grep -v '^ *+' conftest.er1 >conftest.err
14856 rm -f conftest.er1
14857 cat conftest.err >&5
c0d27fcc 14858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 14859 (exit $ac_status); } &&
551ffc27
ST
14860 { ac_try='test -z "$ac_c_werror_flag"
14861 || test ! -s conftest.err'
35996d22
AS
14862 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14863 (eval $ac_try) 2>&5
14864 ac_status=$?
14865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14866 (exit $ac_status); }; } &&
14867 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14868 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
14869 (eval $ac_try) 2>&5
14870 ac_status=$?
c0d27fcc 14871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
14872 (exit $ac_status); }; }; then
14873 eval "$as_ac_var=yes"
f21fadcc
JD
14874else
14875 echo "$as_me: failed program was:" >&5
19650fd6
AS
14876sed 's/^/| /' conftest.$ac_ext >&5
14877
98418dba 14878eval "$as_ac_var=no"
f21fadcc 14879fi
35996d22
AS
14880rm -f conftest.err conftest.$ac_objext \
14881 conftest$ac_exeext conftest.$ac_ext
f21fadcc 14882fi
c0d27fcc 14883echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
98418dba
CW
14884echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14885if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 14886 cat >>confdefs.h <<_ACEOF
98418dba 14887#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 14888_ACEOF
98418dba
CW
14889
14890fi
14891done
14892
c0d27fcc 14893
98418dba
CW
14894# Solaris has libkstat which does not require root.
14895
c0d27fcc 14896echo "$as_me:$LINENO: checking for kstat_open in -lkstat" >&5
98418dba
CW
14897echo $ECHO_N "checking for kstat_open in -lkstat... $ECHO_C" >&6
14898if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then
f21fadcc
JD
14899 echo $ECHO_N "(cached) $ECHO_C" >&6
14900else
14901 ac_check_lib_save_LIBS=$LIBS
98418dba 14902LIBS="-lkstat $LIBS"
f21fadcc 14903cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14904/* confdefs.h. */
14905_ACEOF
14906cat confdefs.h >>conftest.$ac_ext
14907cat >>conftest.$ac_ext <<_ACEOF
14908/* end confdefs.h. */
f21fadcc
JD
14909
14910/* Override any gcc2 internal prototype to avoid an error. */
14911#ifdef __cplusplus
14912extern "C"
14913#endif
14914/* We use char because int might match the return type of a gcc2
14915 builtin and then its argument prototype would still apply. */
98418dba 14916char kstat_open ();
f21fadcc
JD
14917int
14918main ()
14919{
98418dba 14920kstat_open ();
f21fadcc
JD
14921 ;
14922 return 0;
14923}
14924_ACEOF
14925rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 14926if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 14927 (eval $ac_link) 2>conftest.er1
f21fadcc 14928 ac_status=$?
35996d22
AS
14929 grep -v '^ *+' conftest.er1 >conftest.err
14930 rm -f conftest.er1
14931 cat conftest.err >&5
c0d27fcc 14932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f21fadcc 14933 (exit $ac_status); } &&
551ffc27
ST
14934 { ac_try='test -z "$ac_c_werror_flag"
14935 || test ! -s conftest.err'
35996d22
AS
14936 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14937 (eval $ac_try) 2>&5
14938 ac_status=$?
14939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14940 (exit $ac_status); }; } &&
14941 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 14942 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
f21fadcc
JD
14943 (eval $ac_try) 2>&5
14944 ac_status=$?
c0d27fcc 14945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f21fadcc 14946 (exit $ac_status); }; }; then
98418dba 14947 ac_cv_lib_kstat_kstat_open=yes
f21fadcc
JD
14948else
14949 echo "$as_me: failed program was:" >&5
19650fd6
AS
14950sed 's/^/| /' conftest.$ac_ext >&5
14951
98418dba 14952ac_cv_lib_kstat_kstat_open=no
f21fadcc 14953fi
35996d22
AS
14954rm -f conftest.err conftest.$ac_objext \
14955 conftest$ac_exeext conftest.$ac_ext
f21fadcc
JD
14956LIBS=$ac_check_lib_save_LIBS
14957fi
c0d27fcc 14958echo "$as_me:$LINENO: result: $ac_cv_lib_kstat_kstat_open" >&5
98418dba
CW
14959echo "${ECHO_T}$ac_cv_lib_kstat_kstat_open" >&6
14960if test $ac_cv_lib_kstat_kstat_open = yes; then
c0d27fcc 14961 cat >>confdefs.h <<_ACEOF
98418dba 14962#define HAVE_LIBKSTAT 1
c0d27fcc 14963_ACEOF
f21fadcc 14964
98418dba 14965 LIBS="-lkstat $LIBS"
f21fadcc 14966
f21fadcc
JD
14967fi
14968
98418dba
CW
14969test $ac_cv_lib_kstat_kstat_open = yes && ac_have_func=yes
14970
14971# Some systems with -lutil have (and need) -lkvm as well, some do not.
14972# On Solaris, -lkvm requires nlist from -lelf, so check that first
14973# to get the right answer into the cache.
14974# For kstat on solaris, we need libelf to force the definition of SVR4 below.
14975if test $ac_have_func = no; then
c0d27fcc 14976 echo "$as_me:$LINENO: checking for elf_begin in -lelf" >&5
98418dba
CW
14977echo $ECHO_N "checking for elf_begin in -lelf... $ECHO_C" >&6
14978if test "${ac_cv_lib_elf_elf_begin+set}" = set; then
503d2be0 14979 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 14980else
98418dba
CW
14981 ac_check_lib_save_LIBS=$LIBS
14982LIBS="-lelf $LIBS"
14983cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14984/* confdefs.h. */
14985_ACEOF
14986cat confdefs.h >>conftest.$ac_ext
14987cat >>conftest.$ac_ext <<_ACEOF
14988/* end confdefs.h. */
98418dba
CW
14989
14990/* Override any gcc2 internal prototype to avoid an error. */
14991#ifdef __cplusplus
14992extern "C"
14993#endif
14994/* We use char because int might match the return type of a gcc2
14995 builtin and then its argument prototype would still apply. */
14996char elf_begin ();
503d2be0
AS
14997int
14998main ()
14999{
98418dba 15000elf_begin ();
503d2be0
AS
15001 ;
15002 return 0;
15003}
15004_ACEOF
15005rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15006if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 15007 (eval $ac_link) 2>conftest.er1
503d2be0 15008 ac_status=$?
35996d22
AS
15009 grep -v '^ *+' conftest.er1 >conftest.err
15010 rm -f conftest.er1
15011 cat conftest.err >&5
c0d27fcc 15012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15013 (exit $ac_status); } &&
551ffc27
ST
15014 { ac_try='test -z "$ac_c_werror_flag"
15015 || test ! -s conftest.err'
35996d22
AS
15016 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15017 (eval $ac_try) 2>&5
15018 ac_status=$?
15019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15020 (exit $ac_status); }; } &&
15021 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 15022 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
15023 (eval $ac_try) 2>&5
15024 ac_status=$?
c0d27fcc 15025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15026 (exit $ac_status); }; }; then
98418dba 15027 ac_cv_lib_elf_elf_begin=yes
ba4481b5 15028else
503d2be0 15029 echo "$as_me: failed program was:" >&5
19650fd6
AS
15030sed 's/^/| /' conftest.$ac_ext >&5
15031
98418dba 15032ac_cv_lib_elf_elf_begin=no
ba4481b5 15033fi
35996d22
AS
15034rm -f conftest.err conftest.$ac_objext \
15035 conftest$ac_exeext conftest.$ac_ext
98418dba 15036LIBS=$ac_check_lib_save_LIBS
ba4481b5 15037fi
c0d27fcc 15038echo "$as_me:$LINENO: result: $ac_cv_lib_elf_elf_begin" >&5
98418dba
CW
15039echo "${ECHO_T}$ac_cv_lib_elf_elf_begin" >&6
15040if test $ac_cv_lib_elf_elf_begin = yes; then
15041 LIBS="-lelf $LIBS"
ba4481b5
DL
15042fi
15043
98418dba
CW
15044fi
15045if test $ac_have_func = no; then
c0d27fcc 15046 echo "$as_me:$LINENO: checking for kvm_open in -lkvm" >&5
98418dba
CW
15047echo $ECHO_N "checking for kvm_open in -lkvm... $ECHO_C" >&6
15048if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then
503d2be0 15049 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15050else
98418dba
CW
15051 ac_check_lib_save_LIBS=$LIBS
15052LIBS="-lkvm $LIBS"
15053cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15054/* confdefs.h. */
15055_ACEOF
15056cat confdefs.h >>conftest.$ac_ext
15057cat >>conftest.$ac_ext <<_ACEOF
15058/* end confdefs.h. */
98418dba
CW
15059
15060/* Override any gcc2 internal prototype to avoid an error. */
15061#ifdef __cplusplus
15062extern "C"
15063#endif
15064/* We use char because int might match the return type of a gcc2
15065 builtin and then its argument prototype would still apply. */
15066char kvm_open ();
503d2be0
AS
15067int
15068main ()
15069{
98418dba 15070kvm_open ();
503d2be0
AS
15071 ;
15072 return 0;
15073}
15074_ACEOF
15075rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15076if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 15077 (eval $ac_link) 2>conftest.er1
503d2be0 15078 ac_status=$?
35996d22
AS
15079 grep -v '^ *+' conftest.er1 >conftest.err
15080 rm -f conftest.er1
15081 cat conftest.err >&5
c0d27fcc 15082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15083 (exit $ac_status); } &&
551ffc27
ST
15084 { ac_try='test -z "$ac_c_werror_flag"
15085 || test ! -s conftest.err'
35996d22
AS
15086 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15087 (eval $ac_try) 2>&5
15088 ac_status=$?
15089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15090 (exit $ac_status); }; } &&
15091 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 15092 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
15093 (eval $ac_try) 2>&5
15094 ac_status=$?
c0d27fcc 15095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15096 (exit $ac_status); }; }; then
98418dba 15097 ac_cv_lib_kvm_kvm_open=yes
503d2be0
AS
15098else
15099 echo "$as_me: failed program was:" >&5
19650fd6
AS
15100sed 's/^/| /' conftest.$ac_ext >&5
15101
98418dba 15102ac_cv_lib_kvm_kvm_open=no
503d2be0 15103fi
35996d22
AS
15104rm -f conftest.err conftest.$ac_objext \
15105 conftest$ac_exeext conftest.$ac_ext
98418dba 15106LIBS=$ac_check_lib_save_LIBS
503d2be0 15107fi
c0d27fcc 15108echo "$as_me:$LINENO: result: $ac_cv_lib_kvm_kvm_open" >&5
98418dba
CW
15109echo "${ECHO_T}$ac_cv_lib_kvm_kvm_open" >&6
15110if test $ac_cv_lib_kvm_kvm_open = yes; then
15111 LIBS="-lkvm $LIBS"
ba4481b5
DL
15112fi
15113
98418dba 15114 # Check for the 4.4BSD definition of getloadavg.
c0d27fcc 15115 echo "$as_me:$LINENO: checking for getloadavg in -lutil" >&5
98418dba
CW
15116echo $ECHO_N "checking for getloadavg in -lutil... $ECHO_C" >&6
15117if test "${ac_cv_lib_util_getloadavg+set}" = set; then
503d2be0 15118 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15119else
98418dba
CW
15120 ac_check_lib_save_LIBS=$LIBS
15121LIBS="-lutil $LIBS"
15122cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15123/* confdefs.h. */
15124_ACEOF
15125cat confdefs.h >>conftest.$ac_ext
15126cat >>conftest.$ac_ext <<_ACEOF
15127/* end confdefs.h. */
98418dba
CW
15128
15129/* Override any gcc2 internal prototype to avoid an error. */
15130#ifdef __cplusplus
15131extern "C"
15132#endif
15133/* We use char because int might match the return type of a gcc2
15134 builtin and then its argument prototype would still apply. */
15135char getloadavg ();
503d2be0
AS
15136int
15137main ()
15138{
98418dba 15139getloadavg ();
503d2be0
AS
15140 ;
15141 return 0;
15142}
15143_ACEOF
15144rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15145if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 15146 (eval $ac_link) 2>conftest.er1
503d2be0 15147 ac_status=$?
35996d22
AS
15148 grep -v '^ *+' conftest.er1 >conftest.err
15149 rm -f conftest.er1
15150 cat conftest.err >&5
c0d27fcc 15151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15152 (exit $ac_status); } &&
551ffc27
ST
15153 { ac_try='test -z "$ac_c_werror_flag"
15154 || test ! -s conftest.err'
c0d27fcc 15155 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
15156 (eval $ac_try) 2>&5
15157 ac_status=$?
c0d27fcc 15158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
35996d22
AS
15159 (exit $ac_status); }; } &&
15160 { ac_try='test -s conftest$ac_exeext'
15161 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15162 (eval $ac_try) 2>&5
15163 ac_status=$?
15164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15165 (exit $ac_status); }; }; then
15166 ac_cv_lib_util_getloadavg=yes
15167else
503d2be0 15168 echo "$as_me: failed program was:" >&5
19650fd6
AS
15169sed 's/^/| /' conftest.$ac_ext >&5
15170
98418dba 15171ac_cv_lib_util_getloadavg=no
ba4481b5 15172fi
35996d22
AS
15173rm -f conftest.err conftest.$ac_objext \
15174 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
15175LIBS=$ac_check_lib_save_LIBS
15176fi
c0d27fcc 15177echo "$as_me:$LINENO: result: $ac_cv_lib_util_getloadavg" >&5
98418dba
CW
15178echo "${ECHO_T}$ac_cv_lib_util_getloadavg" >&6
15179if test $ac_cv_lib_util_getloadavg = yes; then
15180 LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes
ba4481b5 15181fi
503d2be0 15182
98418dba 15183fi
ba4481b5 15184
98418dba
CW
15185if test $ac_have_func = no; then
15186 # There is a commonly available library for RS/6000 AIX.
15187 # Since it is not a standard part of AIX, it might be installed locally.
15188 ac_getloadavg_LIBS=$LIBS
15189 LIBS="-L/usr/local/lib $LIBS"
c0d27fcc 15190 echo "$as_me:$LINENO: checking for getloadavg in -lgetloadavg" >&5
98418dba
CW
15191echo $ECHO_N "checking for getloadavg in -lgetloadavg... $ECHO_C" >&6
15192if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then
503d2be0 15193 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15194else
98418dba
CW
15195 ac_check_lib_save_LIBS=$LIBS
15196LIBS="-lgetloadavg $LIBS"
15197cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15198/* confdefs.h. */
15199_ACEOF
15200cat confdefs.h >>conftest.$ac_ext
15201cat >>conftest.$ac_ext <<_ACEOF
15202/* end confdefs.h. */
ba4481b5 15203
98418dba
CW
15204/* Override any gcc2 internal prototype to avoid an error. */
15205#ifdef __cplusplus
15206extern "C"
15207#endif
15208/* We use char because int might match the return type of a gcc2
15209 builtin and then its argument prototype would still apply. */
15210char getloadavg ();
98418dba
CW
15211int
15212main ()
15213{
15214getloadavg ();
15215 ;
15216 return 0;
15217}
503d2be0 15218_ACEOF
98418dba 15219rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15220if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 15221 (eval $ac_link) 2>conftest.er1
98418dba 15222 ac_status=$?
35996d22
AS
15223 grep -v '^ *+' conftest.er1 >conftest.err
15224 rm -f conftest.er1
15225 cat conftest.err >&5
c0d27fcc 15226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 15227 (exit $ac_status); } &&
551ffc27
ST
15228 { ac_try='test -z "$ac_c_werror_flag"
15229 || test ! -s conftest.err'
35996d22
AS
15230 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15231 (eval $ac_try) 2>&5
15232 ac_status=$?
15233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15234 (exit $ac_status); }; } &&
15235 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 15236 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
98418dba
CW
15237 (eval $ac_try) 2>&5
15238 ac_status=$?
c0d27fcc 15239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
15240 (exit $ac_status); }; }; then
15241 ac_cv_lib_getloadavg_getloadavg=yes
ba4481b5 15242else
98418dba 15243 echo "$as_me: failed program was:" >&5
19650fd6
AS
15244sed 's/^/| /' conftest.$ac_ext >&5
15245
98418dba
CW
15246ac_cv_lib_getloadavg_getloadavg=no
15247fi
35996d22
AS
15248rm -f conftest.err conftest.$ac_objext \
15249 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
15250LIBS=$ac_check_lib_save_LIBS
15251fi
c0d27fcc 15252echo "$as_me:$LINENO: result: $ac_cv_lib_getloadavg_getloadavg" >&5
98418dba
CW
15253echo "${ECHO_T}$ac_cv_lib_getloadavg_getloadavg" >&6
15254if test $ac_cv_lib_getloadavg_getloadavg = yes; then
15255 LIBS="-lgetloadavg $LIBS"
15256else
15257 LIBS=$ac_getloadavg_LIBS
ba4481b5 15258fi
ba4481b5
DL
15259
15260fi
98418dba
CW
15261
15262# Make sure it is really in the library, if we think we found it,
15263# otherwise set up the replacement function.
15264
15265for ac_func in getloadavg
15266do
15267as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 15268echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
15269echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15270if eval "test \"\${$as_ac_var+set}\" = set"; then
15271 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15272else
503d2be0 15273 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15274/* confdefs.h. */
15275_ACEOF
15276cat confdefs.h >>conftest.$ac_ext
15277cat >>conftest.$ac_ext <<_ACEOF
15278/* end confdefs.h. */
35996d22
AS
15279/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15280 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15281#define $ac_func innocuous_$ac_func
15282
ba4481b5 15283/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
15284 which can conflict with char $ac_func (); below.
15285 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15286 <limits.h> exists even on freestanding compilers. */
35996d22 15287
19650fd6
AS
15288#ifdef __STDC__
15289# include <limits.h>
15290#else
15291# include <assert.h>
15292#endif
35996d22
AS
15293
15294#undef $ac_func
15295
ba4481b5 15296/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
15297#ifdef __cplusplus
15298extern "C"
19650fd6 15299{
503d2be0 15300#endif
ba4481b5 15301/* We use char because int might match the return type of a gcc2
503d2be0
AS
15302 builtin and then its argument prototype would still apply. */
15303char $ac_func ();
ba4481b5
DL
15304/* The GNU C library defines this for functions which it implements
15305 to always fail with ENOSYS. Some functions are actually named
15306 something starting with __ and the normal name is an alias. */
15307#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15308choke me
15309#else
19650fd6
AS
15310char (*f) () = $ac_func;
15311#endif
15312#ifdef __cplusplus
15313}
cd958eb3
MB
15314#endif
15315
19650fd6
AS
15316int
15317main ()
15318{
15319return f != $ac_func;
503d2be0
AS
15320 ;
15321 return 0;
15322}
15323_ACEOF
15324rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15325if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 15326 (eval $ac_link) 2>conftest.er1
503d2be0 15327 ac_status=$?
35996d22
AS
15328 grep -v '^ *+' conftest.er1 >conftest.err
15329 rm -f conftest.er1
15330 cat conftest.err >&5
c0d27fcc 15331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15332 (exit $ac_status); } &&
551ffc27
ST
15333 { ac_try='test -z "$ac_c_werror_flag"
15334 || test ! -s conftest.err'
35996d22
AS
15335 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15336 (eval $ac_try) 2>&5
15337 ac_status=$?
15338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15339 (exit $ac_status); }; } &&
15340 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 15341 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
15342 (eval $ac_try) 2>&5
15343 ac_status=$?
c0d27fcc 15344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
15345 (exit $ac_status); }; }; then
15346 eval "$as_ac_var=yes"
15347else
15348 echo "$as_me: failed program was:" >&5
19650fd6
AS
15349sed 's/^/| /' conftest.$ac_ext >&5
15350
503d2be0
AS
15351eval "$as_ac_var=no"
15352fi
35996d22
AS
15353rm -f conftest.err conftest.$ac_objext \
15354 conftest$ac_exeext conftest.$ac_ext
503d2be0 15355fi
c0d27fcc 15356echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
15357echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15358if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 15359 cat >>confdefs.h <<_ACEOF
98418dba 15360#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 15361_ACEOF
503d2be0 15362
98418dba 15363else
35996d22
AS
15364 case $LIBOBJS in
15365 "getloadavg.$ac_objext" | \
15366 *" getloadavg.$ac_objext" | \
15367 "getloadavg.$ac_objext "* | \
15368 *" getloadavg.$ac_objext "* ) ;;
15369 *) LIBOBJS="$LIBOBJS getloadavg.$ac_objext" ;;
15370esac
15371
ba4481b5 15372
c0d27fcc 15373cat >>confdefs.h <<\_ACEOF
98418dba 15374#define C_GETLOADAVG 1
c0d27fcc 15375_ACEOF
ba4481b5 15376
98418dba
CW
15377# Figure out what our getloadavg.c needs.
15378ac_have_func=no
c0d27fcc
MR
15379if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
15380 echo "$as_me:$LINENO: checking for sys/dg_sys_info.h" >&5
98418dba
CW
15381echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6
15382if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
503d2be0 15383 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
15384fi
15385echo "$as_me:$LINENO: result: $ac_cv_header_sys_dg_sys_info_h" >&5
15386echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6
ba4481b5 15387else
c0d27fcc
MR
15388 # Is the header compilable?
15389echo "$as_me:$LINENO: checking sys/dg_sys_info.h usability" >&5
15390echo $ECHO_N "checking sys/dg_sys_info.h usability... $ECHO_C" >&6
15391cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15392/* confdefs.h. */
15393_ACEOF
15394cat confdefs.h >>conftest.$ac_ext
15395cat >>conftest.$ac_ext <<_ACEOF
15396/* end confdefs.h. */
c0d27fcc
MR
15397$ac_includes_default
15398#include <sys/dg_sys_info.h>
15399_ACEOF
15400rm -f conftest.$ac_objext
15401if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 15402 (eval $ac_compile) 2>conftest.er1
c0d27fcc 15403 ac_status=$?
35996d22
AS
15404 grep -v '^ *+' conftest.er1 >conftest.err
15405 rm -f conftest.er1
15406 cat conftest.err >&5
c0d27fcc
MR
15407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15408 (exit $ac_status); } &&
551ffc27
ST
15409 { ac_try='test -z "$ac_c_werror_flag"
15410 || test ! -s conftest.err'
35996d22
AS
15411 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15412 (eval $ac_try) 2>&5
15413 ac_status=$?
15414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15415 (exit $ac_status); }; } &&
15416 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
15417 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15418 (eval $ac_try) 2>&5
15419 ac_status=$?
15420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15421 (exit $ac_status); }; }; then
15422 ac_header_compiler=yes
15423else
15424 echo "$as_me: failed program was:" >&5
19650fd6
AS
15425sed 's/^/| /' conftest.$ac_ext >&5
15426
c0d27fcc
MR
15427ac_header_compiler=no
15428fi
35996d22 15429rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
15430echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15431echo "${ECHO_T}$ac_header_compiler" >&6
15432
15433# Is the header present?
15434echo "$as_me:$LINENO: checking sys/dg_sys_info.h presence" >&5
15435echo $ECHO_N "checking sys/dg_sys_info.h presence... $ECHO_C" >&6
15436cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15437/* confdefs.h. */
15438_ACEOF
15439cat confdefs.h >>conftest.$ac_ext
15440cat >>conftest.$ac_ext <<_ACEOF
15441/* end confdefs.h. */
98418dba
CW
15442#include <sys/dg_sys_info.h>
15443_ACEOF
c0d27fcc 15444if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
15445 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15446 ac_status=$?
6bae0ccf 15447 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
15448 rm -f conftest.er1
15449 cat conftest.err >&5
c0d27fcc 15450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
15451 (exit $ac_status); } >/dev/null; then
15452 if test -s conftest.err; then
15453 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 15454 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
15455 else
15456 ac_cpp_err=
15457 fi
15458else
15459 ac_cpp_err=yes
ba4481b5 15460fi
98418dba 15461if test -z "$ac_cpp_err"; then
c0d27fcc 15462 ac_header_preproc=yes
98418dba
CW
15463else
15464 echo "$as_me: failed program was:" >&5
19650fd6
AS
15465sed 's/^/| /' conftest.$ac_ext >&5
15466
c0d27fcc 15467 ac_header_preproc=no
ba4481b5 15468fi
98418dba 15469rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
15470echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15471echo "${ECHO_T}$ac_header_preproc" >&6
15472
15473# So? What about this header?
35996d22
AS
15474case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15475 yes:no: )
c0d27fcc
MR
15476 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: accepted by the compiler, rejected by the preprocessor!" >&5
15477echo "$as_me: WARNING: sys/dg_sys_info.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
15478 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: proceeding with the compiler's result" >&5
15479echo "$as_me: WARNING: sys/dg_sys_info.h: proceeding with the compiler's result" >&2;}
15480 ac_header_preproc=yes
19650fd6 15481 ;;
35996d22 15482 no:yes:* )
c0d27fcc
MR
15483 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: present but cannot be compiled" >&5
15484echo "$as_me: WARNING: sys/dg_sys_info.h: present but cannot be compiled" >&2;}
35996d22
AS
15485 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: check for missing prerequisite headers?" >&5
15486echo "$as_me: WARNING: sys/dg_sys_info.h: check for missing prerequisite headers?" >&2;}
15487 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: see the Autoconf documentation" >&5
15488echo "$as_me: WARNING: sys/dg_sys_info.h: see the Autoconf documentation" >&2;}
15489 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: section \"Present But Cannot Be Compiled\"" >&5
15490echo "$as_me: WARNING: sys/dg_sys_info.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 15491 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&5
19650fd6 15492echo "$as_me: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&2;}
35996d22
AS
15493 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: in the future, the compiler will take precedence" >&5
15494echo "$as_me: WARNING: sys/dg_sys_info.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
15495 (
15496 cat <<\_ASBOX
35996d22
AS
15497## ------------------------------------------ ##
15498## Report this to the AC_PACKAGE_NAME lists. ##
15499## ------------------------------------------ ##
19650fd6
AS
15500_ASBOX
15501 ) |
15502 sed "s/^/$as_me: WARNING: /" >&2
15503 ;;
c0d27fcc
MR
15504esac
15505echo "$as_me:$LINENO: checking for sys/dg_sys_info.h" >&5
15506echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6
15507if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
15508 echo $ECHO_N "(cached) $ECHO_C" >&6
15509else
15510 ac_cv_header_sys_dg_sys_info_h=$ac_header_preproc
98418dba 15511fi
c0d27fcc 15512echo "$as_me:$LINENO: result: $ac_cv_header_sys_dg_sys_info_h" >&5
98418dba 15513echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6
c0d27fcc
MR
15514
15515fi
98418dba
CW
15516if test $ac_cv_header_sys_dg_sys_info_h = yes; then
15517 ac_have_func=yes
ba4481b5 15518
c0d27fcc 15519cat >>confdefs.h <<\_ACEOF
98418dba 15520#define DGUX 1
c0d27fcc
MR
15521_ACEOF
15522
503d2be0 15523
c0d27fcc 15524echo "$as_me:$LINENO: checking for dg_sys_info in -ldgc" >&5
98418dba
CW
15525echo $ECHO_N "checking for dg_sys_info in -ldgc... $ECHO_C" >&6
15526if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then
503d2be0 15527 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15528else
503d2be0 15529 ac_check_lib_save_LIBS=$LIBS
98418dba 15530LIBS="-ldgc $LIBS"
503d2be0 15531cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15532/* confdefs.h. */
15533_ACEOF
15534cat confdefs.h >>conftest.$ac_ext
15535cat >>conftest.$ac_ext <<_ACEOF
15536/* end confdefs.h. */
503d2be0 15537
ba4481b5 15538/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
15539#ifdef __cplusplus
15540extern "C"
15541#endif
ba4481b5 15542/* We use char because int might match the return type of a gcc2
503d2be0 15543 builtin and then its argument prototype would still apply. */
98418dba 15544char dg_sys_info ();
503d2be0
AS
15545int
15546main ()
15547{
98418dba 15548dg_sys_info ();
503d2be0
AS
15549 ;
15550 return 0;
15551}
15552_ACEOF
15553rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15554if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 15555 (eval $ac_link) 2>conftest.er1
503d2be0 15556 ac_status=$?
35996d22
AS
15557 grep -v '^ *+' conftest.er1 >conftest.err
15558 rm -f conftest.er1
15559 cat conftest.err >&5
c0d27fcc 15560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15561 (exit $ac_status); } &&
551ffc27
ST
15562 { ac_try='test -z "$ac_c_werror_flag"
15563 || test ! -s conftest.err'
35996d22
AS
15564 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15565 (eval $ac_try) 2>&5
15566 ac_status=$?
15567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15568 (exit $ac_status); }; } &&
15569 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 15570 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
15571 (eval $ac_try) 2>&5
15572 ac_status=$?
c0d27fcc 15573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15574 (exit $ac_status); }; }; then
98418dba 15575 ac_cv_lib_dgc_dg_sys_info=yes
503d2be0
AS
15576else
15577 echo "$as_me: failed program was:" >&5
19650fd6
AS
15578sed 's/^/| /' conftest.$ac_ext >&5
15579
98418dba 15580ac_cv_lib_dgc_dg_sys_info=no
503d2be0 15581fi
35996d22
AS
15582rm -f conftest.err conftest.$ac_objext \
15583 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
15584LIBS=$ac_check_lib_save_LIBS
15585fi
c0d27fcc 15586echo "$as_me:$LINENO: result: $ac_cv_lib_dgc_dg_sys_info" >&5
98418dba
CW
15587echo "${ECHO_T}$ac_cv_lib_dgc_dg_sys_info" >&6
15588if test $ac_cv_lib_dgc_dg_sys_info = yes; then
c0d27fcc 15589 cat >>confdefs.h <<_ACEOF
98418dba 15590#define HAVE_LIBDGC 1
c0d27fcc 15591_ACEOF
ba4481b5 15592
98418dba 15593 LIBS="-ldgc $LIBS"
ba4481b5 15594
ba4481b5
DL
15595fi
15596
98418dba 15597fi
503d2be0 15598
c0d27fcc
MR
15599
15600
15601if test "${ac_cv_header_locale_h+set}" = set; then
15602 echo "$as_me:$LINENO: checking for locale.h" >&5
98418dba
CW
15603echo $ECHO_N "checking for locale.h... $ECHO_C" >&6
15604if test "${ac_cv_header_locale_h+set}" = set; then
503d2be0 15605 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
15606fi
15607echo "$as_me:$LINENO: result: $ac_cv_header_locale_h" >&5
15608echo "${ECHO_T}$ac_cv_header_locale_h" >&6
503d2be0 15609else
c0d27fcc
MR
15610 # Is the header compilable?
15611echo "$as_me:$LINENO: checking locale.h usability" >&5
15612echo $ECHO_N "checking locale.h usability... $ECHO_C" >&6
15613cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15614/* confdefs.h. */
15615_ACEOF
15616cat confdefs.h >>conftest.$ac_ext
15617cat >>conftest.$ac_ext <<_ACEOF
15618/* end confdefs.h. */
c0d27fcc
MR
15619$ac_includes_default
15620#include <locale.h>
15621_ACEOF
15622rm -f conftest.$ac_objext
15623if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 15624 (eval $ac_compile) 2>conftest.er1
c0d27fcc 15625 ac_status=$?
35996d22
AS
15626 grep -v '^ *+' conftest.er1 >conftest.err
15627 rm -f conftest.er1
15628 cat conftest.err >&5
c0d27fcc
MR
15629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15630 (exit $ac_status); } &&
551ffc27
ST
15631 { ac_try='test -z "$ac_c_werror_flag"
15632 || test ! -s conftest.err'
35996d22
AS
15633 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15634 (eval $ac_try) 2>&5
15635 ac_status=$?
15636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15637 (exit $ac_status); }; } &&
15638 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
15639 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15640 (eval $ac_try) 2>&5
15641 ac_status=$?
15642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15643 (exit $ac_status); }; }; then
15644 ac_header_compiler=yes
15645else
15646 echo "$as_me: failed program was:" >&5
19650fd6
AS
15647sed 's/^/| /' conftest.$ac_ext >&5
15648
c0d27fcc
MR
15649ac_header_compiler=no
15650fi
35996d22 15651rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
15652echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15653echo "${ECHO_T}$ac_header_compiler" >&6
15654
15655# Is the header present?
15656echo "$as_me:$LINENO: checking locale.h presence" >&5
15657echo $ECHO_N "checking locale.h presence... $ECHO_C" >&6
15658cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15659/* confdefs.h. */
15660_ACEOF
15661cat confdefs.h >>conftest.$ac_ext
15662cat >>conftest.$ac_ext <<_ACEOF
15663/* end confdefs.h. */
98418dba 15664#include <locale.h>
503d2be0 15665_ACEOF
c0d27fcc 15666if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba 15667 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
503d2be0 15668 ac_status=$?
6bae0ccf 15669 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
15670 rm -f conftest.er1
15671 cat conftest.err >&5
c0d27fcc 15672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
15673 (exit $ac_status); } >/dev/null; then
15674 if test -s conftest.err; then
15675 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 15676 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
15677 else
15678 ac_cpp_err=
15679 fi
503d2be0 15680else
98418dba 15681 ac_cpp_err=yes
503d2be0 15682fi
98418dba 15683if test -z "$ac_cpp_err"; then
c0d27fcc 15684 ac_header_preproc=yes
98418dba
CW
15685else
15686 echo "$as_me: failed program was:" >&5
19650fd6
AS
15687sed 's/^/| /' conftest.$ac_ext >&5
15688
c0d27fcc 15689 ac_header_preproc=no
ba4481b5 15690fi
98418dba 15691rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
15692echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15693echo "${ECHO_T}$ac_header_preproc" >&6
15694
15695# So? What about this header?
35996d22
AS
15696case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15697 yes:no: )
c0d27fcc
MR
15698 { echo "$as_me:$LINENO: WARNING: locale.h: accepted by the compiler, rejected by the preprocessor!" >&5
15699echo "$as_me: WARNING: locale.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
15700 { echo "$as_me:$LINENO: WARNING: locale.h: proceeding with the compiler's result" >&5
15701echo "$as_me: WARNING: locale.h: proceeding with the compiler's result" >&2;}
15702 ac_header_preproc=yes
19650fd6 15703 ;;
35996d22 15704 no:yes:* )
c0d27fcc
MR
15705 { echo "$as_me:$LINENO: WARNING: locale.h: present but cannot be compiled" >&5
15706echo "$as_me: WARNING: locale.h: present but cannot be compiled" >&2;}
35996d22
AS
15707 { echo "$as_me:$LINENO: WARNING: locale.h: check for missing prerequisite headers?" >&5
15708echo "$as_me: WARNING: locale.h: check for missing prerequisite headers?" >&2;}
15709 { echo "$as_me:$LINENO: WARNING: locale.h: see the Autoconf documentation" >&5
15710echo "$as_me: WARNING: locale.h: see the Autoconf documentation" >&2;}
15711 { echo "$as_me:$LINENO: WARNING: locale.h: section \"Present But Cannot Be Compiled\"" >&5
15712echo "$as_me: WARNING: locale.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 15713 { echo "$as_me:$LINENO: WARNING: locale.h: proceeding with the preprocessor's result" >&5
19650fd6 15714echo "$as_me: WARNING: locale.h: proceeding with the preprocessor's result" >&2;}
35996d22
AS
15715 { echo "$as_me:$LINENO: WARNING: locale.h: in the future, the compiler will take precedence" >&5
15716echo "$as_me: WARNING: locale.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
15717 (
15718 cat <<\_ASBOX
35996d22
AS
15719## ------------------------------------------ ##
15720## Report this to the AC_PACKAGE_NAME lists. ##
15721## ------------------------------------------ ##
19650fd6
AS
15722_ASBOX
15723 ) |
15724 sed "s/^/$as_me: WARNING: /" >&2
15725 ;;
c0d27fcc
MR
15726esac
15727echo "$as_me:$LINENO: checking for locale.h" >&5
15728echo $ECHO_N "checking for locale.h... $ECHO_C" >&6
15729if test "${ac_cv_header_locale_h+set}" = set; then
15730 echo $ECHO_N "(cached) $ECHO_C" >&6
15731else
15732 ac_cv_header_locale_h=$ac_header_preproc
ba4481b5 15733fi
c0d27fcc 15734echo "$as_me:$LINENO: result: $ac_cv_header_locale_h" >&5
98418dba
CW
15735echo "${ECHO_T}$ac_cv_header_locale_h" >&6
15736
c0d27fcc
MR
15737fi
15738
15739
15740
98418dba 15741for ac_func in setlocale
ba4481b5 15742do
503d2be0 15743as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 15744echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
15745echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15746if eval "test \"\${$as_ac_var+set}\" = set"; then
15747 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15748else
503d2be0 15749 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15750/* confdefs.h. */
15751_ACEOF
15752cat confdefs.h >>conftest.$ac_ext
15753cat >>conftest.$ac_ext <<_ACEOF
15754/* end confdefs.h. */
35996d22
AS
15755/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15756 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15757#define $ac_func innocuous_$ac_func
15758
ba4481b5 15759/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
15760 which can conflict with char $ac_func (); below.
15761 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15762 <limits.h> exists even on freestanding compilers. */
35996d22 15763
19650fd6
AS
15764#ifdef __STDC__
15765# include <limits.h>
15766#else
15767# include <assert.h>
15768#endif
35996d22
AS
15769
15770#undef $ac_func
15771
ba4481b5 15772/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
15773#ifdef __cplusplus
15774extern "C"
19650fd6 15775{
503d2be0 15776#endif
ba4481b5 15777/* We use char because int might match the return type of a gcc2
503d2be0
AS
15778 builtin and then its argument prototype would still apply. */
15779char $ac_func ();
ba4481b5
DL
15780/* The GNU C library defines this for functions which it implements
15781 to always fail with ENOSYS. Some functions are actually named
15782 something starting with __ and the normal name is an alias. */
15783#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15784choke me
15785#else
19650fd6
AS
15786char (*f) () = $ac_func;
15787#endif
15788#ifdef __cplusplus
15789}
ba4481b5
DL
15790#endif
15791
19650fd6
AS
15792int
15793main ()
15794{
15795return f != $ac_func;
503d2be0
AS
15796 ;
15797 return 0;
15798}
15799_ACEOF
15800rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 15801if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 15802 (eval $ac_link) 2>conftest.er1
503d2be0 15803 ac_status=$?
35996d22
AS
15804 grep -v '^ *+' conftest.er1 >conftest.err
15805 rm -f conftest.er1
15806 cat conftest.err >&5
c0d27fcc 15807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15808 (exit $ac_status); } &&
551ffc27
ST
15809 { ac_try='test -z "$ac_c_werror_flag"
15810 || test ! -s conftest.err'
35996d22
AS
15811 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15812 (eval $ac_try) 2>&5
15813 ac_status=$?
15814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15815 (exit $ac_status); }; } &&
15816 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 15817 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
15818 (eval $ac_try) 2>&5
15819 ac_status=$?
c0d27fcc 15820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
15821 (exit $ac_status); }; }; then
15822 eval "$as_ac_var=yes"
15823else
15824 echo "$as_me: failed program was:" >&5
19650fd6
AS
15825sed 's/^/| /' conftest.$ac_ext >&5
15826
503d2be0
AS
15827eval "$as_ac_var=no"
15828fi
35996d22
AS
15829rm -f conftest.err conftest.$ac_objext \
15830 conftest$ac_exeext conftest.$ac_ext
503d2be0 15831fi
c0d27fcc 15832echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
15833echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15834if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 15835 cat >>confdefs.h <<_ACEOF
503d2be0 15836#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 15837_ACEOF
ba4481b5 15838
ba4481b5
DL
15839fi
15840done
15841
c0d27fcc 15842
98418dba
CW
15843# We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
15844# uses stabs), but it is still SVR4. We cannot check for <elf.h> because
15845# Irix 4.0.5F has the header but not the library.
15846if test $ac_have_func = no && test "$ac_cv_lib_elf_elf_begin" = yes; then
15847 ac_have_func=yes
15848
c0d27fcc 15849cat >>confdefs.h <<\_ACEOF
98418dba 15850#define SVR4 1
c0d27fcc 15851_ACEOF
98418dba
CW
15852
15853fi
15854
15855if test $ac_have_func = no; then
c0d27fcc
MR
15856 if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
15857 echo "$as_me:$LINENO: checking for inq_stats/cpustats.h" >&5
98418dba
CW
15858echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6
15859if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
503d2be0 15860 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
15861fi
15862echo "$as_me:$LINENO: result: $ac_cv_header_inq_stats_cpustats_h" >&5
15863echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6
98418dba 15864else
c0d27fcc
MR
15865 # Is the header compilable?
15866echo "$as_me:$LINENO: checking inq_stats/cpustats.h usability" >&5
15867echo $ECHO_N "checking inq_stats/cpustats.h usability... $ECHO_C" >&6
15868cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15869/* confdefs.h. */
15870_ACEOF
15871cat confdefs.h >>conftest.$ac_ext
15872cat >>conftest.$ac_ext <<_ACEOF
15873/* end confdefs.h. */
c0d27fcc
MR
15874$ac_includes_default
15875#include <inq_stats/cpustats.h>
15876_ACEOF
15877rm -f conftest.$ac_objext
15878if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 15879 (eval $ac_compile) 2>conftest.er1
c0d27fcc 15880 ac_status=$?
35996d22
AS
15881 grep -v '^ *+' conftest.er1 >conftest.err
15882 rm -f conftest.er1
15883 cat conftest.err >&5
c0d27fcc
MR
15884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15885 (exit $ac_status); } &&
551ffc27
ST
15886 { ac_try='test -z "$ac_c_werror_flag"
15887 || test ! -s conftest.err'
35996d22
AS
15888 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15889 (eval $ac_try) 2>&5
15890 ac_status=$?
15891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15892 (exit $ac_status); }; } &&
15893 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
15894 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15895 (eval $ac_try) 2>&5
15896 ac_status=$?
15897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15898 (exit $ac_status); }; }; then
15899 ac_header_compiler=yes
15900else
15901 echo "$as_me: failed program was:" >&5
19650fd6
AS
15902sed 's/^/| /' conftest.$ac_ext >&5
15903
c0d27fcc
MR
15904ac_header_compiler=no
15905fi
35996d22 15906rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
15907echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15908echo "${ECHO_T}$ac_header_compiler" >&6
15909
15910# Is the header present?
15911echo "$as_me:$LINENO: checking inq_stats/cpustats.h presence" >&5
15912echo $ECHO_N "checking inq_stats/cpustats.h presence... $ECHO_C" >&6
15913cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15914/* confdefs.h. */
15915_ACEOF
15916cat confdefs.h >>conftest.$ac_ext
15917cat >>conftest.$ac_ext <<_ACEOF
15918/* end confdefs.h. */
98418dba 15919#include <inq_stats/cpustats.h>
503d2be0 15920_ACEOF
c0d27fcc 15921if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
15922 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15923 ac_status=$?
6bae0ccf 15924 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
15925 rm -f conftest.er1
15926 cat conftest.err >&5
c0d27fcc 15927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
15928 (exit $ac_status); } >/dev/null; then
15929 if test -s conftest.err; then
15930 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 15931 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
15932 else
15933 ac_cpp_err=
15934 fi
15935else
15936 ac_cpp_err=yes
15937fi
15938if test -z "$ac_cpp_err"; then
c0d27fcc 15939 ac_header_preproc=yes
503d2be0
AS
15940else
15941 echo "$as_me: failed program was:" >&5
19650fd6
AS
15942sed 's/^/| /' conftest.$ac_ext >&5
15943
c0d27fcc 15944 ac_header_preproc=no
ba4481b5 15945fi
503d2be0 15946rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
15947echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15948echo "${ECHO_T}$ac_header_preproc" >&6
15949
15950# So? What about this header?
35996d22
AS
15951case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15952 yes:no: )
c0d27fcc
MR
15953 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&5
15954echo "$as_me: WARNING: inq_stats/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
15955 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: proceeding with the compiler's result" >&5
15956echo "$as_me: WARNING: inq_stats/cpustats.h: proceeding with the compiler's result" >&2;}
15957 ac_header_preproc=yes
19650fd6 15958 ;;
35996d22 15959 no:yes:* )
c0d27fcc
MR
15960 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: present but cannot be compiled" >&5
15961echo "$as_me: WARNING: inq_stats/cpustats.h: present but cannot be compiled" >&2;}
35996d22
AS
15962 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: check for missing prerequisite headers?" >&5
15963echo "$as_me: WARNING: inq_stats/cpustats.h: check for missing prerequisite headers?" >&2;}
15964 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: see the Autoconf documentation" >&5
15965echo "$as_me: WARNING: inq_stats/cpustats.h: see the Autoconf documentation" >&2;}
15966 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: section \"Present But Cannot Be Compiled\"" >&5
15967echo "$as_me: WARNING: inq_stats/cpustats.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 15968 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&5
19650fd6 15969echo "$as_me: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&2;}
35996d22
AS
15970 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: in the future, the compiler will take precedence" >&5
15971echo "$as_me: WARNING: inq_stats/cpustats.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
15972 (
15973 cat <<\_ASBOX
35996d22
AS
15974## ------------------------------------------ ##
15975## Report this to the AC_PACKAGE_NAME lists. ##
15976## ------------------------------------------ ##
19650fd6
AS
15977_ASBOX
15978 ) |
15979 sed "s/^/$as_me: WARNING: /" >&2
15980 ;;
c0d27fcc
MR
15981esac
15982echo "$as_me:$LINENO: checking for inq_stats/cpustats.h" >&5
15983echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6
15984if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
15985 echo $ECHO_N "(cached) $ECHO_C" >&6
15986else
15987 ac_cv_header_inq_stats_cpustats_h=$ac_header_preproc
ba4481b5 15988fi
c0d27fcc 15989echo "$as_me:$LINENO: result: $ac_cv_header_inq_stats_cpustats_h" >&5
98418dba 15990echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6
c0d27fcc
MR
15991
15992fi
98418dba
CW
15993if test $ac_cv_header_inq_stats_cpustats_h = yes; then
15994 ac_have_func=yes
ba4481b5 15995
c0d27fcc 15996cat >>confdefs.h <<\_ACEOF
98418dba 15997#define UMAX 1
c0d27fcc 15998_ACEOF
98418dba 15999
c0d27fcc
MR
16000
16001cat >>confdefs.h <<\_ACEOF
98418dba 16002#define UMAX4_3 1
c0d27fcc 16003_ACEOF
98418dba
CW
16004
16005fi
16006
c0d27fcc 16007
98418dba
CW
16008fi
16009
16010if test $ac_have_func = no; then
c0d27fcc
MR
16011 if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
16012 echo "$as_me:$LINENO: checking for sys/cpustats.h" >&5
98418dba
CW
16013echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6
16014if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
503d2be0 16015 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
16016fi
16017echo "$as_me:$LINENO: result: $ac_cv_header_sys_cpustats_h" >&5
16018echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6
503d2be0 16019else
c0d27fcc
MR
16020 # Is the header compilable?
16021echo "$as_me:$LINENO: checking sys/cpustats.h usability" >&5
16022echo $ECHO_N "checking sys/cpustats.h usability... $ECHO_C" >&6
16023cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16024/* confdefs.h. */
16025_ACEOF
16026cat confdefs.h >>conftest.$ac_ext
16027cat >>conftest.$ac_ext <<_ACEOF
16028/* end confdefs.h. */
c0d27fcc
MR
16029$ac_includes_default
16030#include <sys/cpustats.h>
16031_ACEOF
16032rm -f conftest.$ac_objext
16033if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 16034 (eval $ac_compile) 2>conftest.er1
c0d27fcc 16035 ac_status=$?
35996d22
AS
16036 grep -v '^ *+' conftest.er1 >conftest.err
16037 rm -f conftest.er1
16038 cat conftest.err >&5
c0d27fcc
MR
16039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16040 (exit $ac_status); } &&
551ffc27
ST
16041 { ac_try='test -z "$ac_c_werror_flag"
16042 || test ! -s conftest.err'
35996d22
AS
16043 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16044 (eval $ac_try) 2>&5
16045 ac_status=$?
16046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16047 (exit $ac_status); }; } &&
16048 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
16049 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16050 (eval $ac_try) 2>&5
16051 ac_status=$?
16052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16053 (exit $ac_status); }; }; then
16054 ac_header_compiler=yes
16055else
16056 echo "$as_me: failed program was:" >&5
19650fd6
AS
16057sed 's/^/| /' conftest.$ac_ext >&5
16058
c0d27fcc
MR
16059ac_header_compiler=no
16060fi
35996d22 16061rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
16062echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16063echo "${ECHO_T}$ac_header_compiler" >&6
16064
16065# Is the header present?
16066echo "$as_me:$LINENO: checking sys/cpustats.h presence" >&5
16067echo $ECHO_N "checking sys/cpustats.h presence... $ECHO_C" >&6
16068cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16069/* confdefs.h. */
16070_ACEOF
16071cat confdefs.h >>conftest.$ac_ext
16072cat >>conftest.$ac_ext <<_ACEOF
16073/* end confdefs.h. */
98418dba
CW
16074#include <sys/cpustats.h>
16075_ACEOF
c0d27fcc 16076if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
98418dba
CW
16077 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16078 ac_status=$?
6bae0ccf 16079 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
16080 rm -f conftest.er1
16081 cat conftest.err >&5
c0d27fcc 16082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
16083 (exit $ac_status); } >/dev/null; then
16084 if test -s conftest.err; then
16085 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 16086 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
98418dba
CW
16087 else
16088 ac_cpp_err=
16089 fi
16090else
16091 ac_cpp_err=yes
503d2be0 16092fi
98418dba 16093if test -z "$ac_cpp_err"; then
c0d27fcc 16094 ac_header_preproc=yes
98418dba
CW
16095else
16096 echo "$as_me: failed program was:" >&5
19650fd6
AS
16097sed 's/^/| /' conftest.$ac_ext >&5
16098
c0d27fcc 16099 ac_header_preproc=no
98418dba
CW
16100fi
16101rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
16102echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16103echo "${ECHO_T}$ac_header_preproc" >&6
16104
16105# So? What about this header?
35996d22
AS
16106case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16107 yes:no: )
c0d27fcc
MR
16108 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&5
16109echo "$as_me: WARNING: sys/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
16110 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: proceeding with the compiler's result" >&5
16111echo "$as_me: WARNING: sys/cpustats.h: proceeding with the compiler's result" >&2;}
16112 ac_header_preproc=yes
19650fd6 16113 ;;
35996d22 16114 no:yes:* )
c0d27fcc
MR
16115 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: present but cannot be compiled" >&5
16116echo "$as_me: WARNING: sys/cpustats.h: present but cannot be compiled" >&2;}
35996d22
AS
16117 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: check for missing prerequisite headers?" >&5
16118echo "$as_me: WARNING: sys/cpustats.h: check for missing prerequisite headers?" >&2;}
16119 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: see the Autoconf documentation" >&5
16120echo "$as_me: WARNING: sys/cpustats.h: see the Autoconf documentation" >&2;}
16121 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: section \"Present But Cannot Be Compiled\"" >&5
16122echo "$as_me: WARNING: sys/cpustats.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16123 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&5
19650fd6 16124echo "$as_me: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&2;}
35996d22
AS
16125 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: in the future, the compiler will take precedence" >&5
16126echo "$as_me: WARNING: sys/cpustats.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
16127 (
16128 cat <<\_ASBOX
35996d22
AS
16129## ------------------------------------------ ##
16130## Report this to the AC_PACKAGE_NAME lists. ##
16131## ------------------------------------------ ##
19650fd6
AS
16132_ASBOX
16133 ) |
16134 sed "s/^/$as_me: WARNING: /" >&2
16135 ;;
c0d27fcc
MR
16136esac
16137echo "$as_me:$LINENO: checking for sys/cpustats.h" >&5
16138echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6
16139if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
16140 echo $ECHO_N "(cached) $ECHO_C" >&6
16141else
16142 ac_cv_header_sys_cpustats_h=$ac_header_preproc
98418dba 16143fi
c0d27fcc 16144echo "$as_me:$LINENO: result: $ac_cv_header_sys_cpustats_h" >&5
98418dba 16145echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6
c0d27fcc
MR
16146
16147fi
98418dba 16148if test $ac_cv_header_sys_cpustats_h = yes; then
c0d27fcc 16149 ac_have_func=yes; cat >>confdefs.h <<\_ACEOF
98418dba 16150#define UMAX 1
c0d27fcc 16151_ACEOF
ba4481b5 16152
98418dba
CW
16153fi
16154
c0d27fcc 16155
98418dba
CW
16156fi
16157
16158if test $ac_have_func = no; then
16159
16160for ac_header in mach/mach.h
2c9dccc9
PJ
16161do
16162as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
16163if eval "test \"\${$as_ac_Header+set}\" = set"; then
16164 echo "$as_me:$LINENO: checking for $ac_header" >&5
2c9dccc9
PJ
16165echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16166if eval "test \"\${$as_ac_Header+set}\" = set"; then
16167 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
16168fi
16169echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
16170echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 16171else
c0d27fcc
MR
16172 # Is the header compilable?
16173echo "$as_me:$LINENO: checking $ac_header usability" >&5
16174echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
16175cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16176/* confdefs.h. */
16177_ACEOF
16178cat confdefs.h >>conftest.$ac_ext
16179cat >>conftest.$ac_ext <<_ACEOF
16180/* end confdefs.h. */
c0d27fcc
MR
16181$ac_includes_default
16182#include <$ac_header>
16183_ACEOF
16184rm -f conftest.$ac_objext
16185if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 16186 (eval $ac_compile) 2>conftest.er1
c0d27fcc 16187 ac_status=$?
35996d22
AS
16188 grep -v '^ *+' conftest.er1 >conftest.err
16189 rm -f conftest.er1
16190 cat conftest.err >&5
c0d27fcc
MR
16191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16192 (exit $ac_status); } &&
551ffc27
ST
16193 { ac_try='test -z "$ac_c_werror_flag"
16194 || test ! -s conftest.err'
35996d22
AS
16195 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16196 (eval $ac_try) 2>&5
16197 ac_status=$?
16198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16199 (exit $ac_status); }; } &&
16200 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
16201 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16202 (eval $ac_try) 2>&5
16203 ac_status=$?
16204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16205 (exit $ac_status); }; }; then
16206 ac_header_compiler=yes
16207else
16208 echo "$as_me: failed program was:" >&5
19650fd6
AS
16209sed 's/^/| /' conftest.$ac_ext >&5
16210
c0d27fcc
MR
16211ac_header_compiler=no
16212fi
35996d22 16213rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
16214echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16215echo "${ECHO_T}$ac_header_compiler" >&6
16216
16217# Is the header present?
16218echo "$as_me:$LINENO: checking $ac_header presence" >&5
16219echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
16220cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16221/* confdefs.h. */
16222_ACEOF
16223cat confdefs.h >>conftest.$ac_ext
16224cat >>conftest.$ac_ext <<_ACEOF
16225/* end confdefs.h. */
2c9dccc9
PJ
16226#include <$ac_header>
16227_ACEOF
c0d27fcc 16228if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2c9dccc9
PJ
16229 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16230 ac_status=$?
6bae0ccf 16231 grep -v '^ *+' conftest.er1 >conftest.err
2c9dccc9
PJ
16232 rm -f conftest.er1
16233 cat conftest.err >&5
c0d27fcc 16234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2c9dccc9
PJ
16235 (exit $ac_status); } >/dev/null; then
16236 if test -s conftest.err; then
16237 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 16238 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2c9dccc9
PJ
16239 else
16240 ac_cpp_err=
16241 fi
16242else
16243 ac_cpp_err=yes
16244fi
16245if test -z "$ac_cpp_err"; then
c0d27fcc
MR
16246 ac_header_preproc=yes
16247else
16248 echo "$as_me: failed program was:" >&5
19650fd6
AS
16249sed 's/^/| /' conftest.$ac_ext >&5
16250
c0d27fcc
MR
16251 ac_header_preproc=no
16252fi
16253rm -f conftest.err conftest.$ac_ext
16254echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16255echo "${ECHO_T}$ac_header_preproc" >&6
16256
16257# So? What about this header?
35996d22
AS
16258case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16259 yes:no: )
c0d27fcc
MR
16260 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16261echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
16262 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
16263echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
16264 ac_header_preproc=yes
19650fd6 16265 ;;
35996d22 16266 no:yes:* )
c0d27fcc
MR
16267 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16268echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
16269 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
16270echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
16271 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
16272echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
16273 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
16274echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16275 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 16276echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
16277 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
16278echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
16279 (
16280 cat <<\_ASBOX
35996d22
AS
16281## ------------------------------------------ ##
16282## Report this to the AC_PACKAGE_NAME lists. ##
16283## ------------------------------------------ ##
19650fd6
AS
16284_ASBOX
16285 ) |
16286 sed "s/^/$as_me: WARNING: /" >&2
16287 ;;
c0d27fcc
MR
16288esac
16289echo "$as_me:$LINENO: checking for $ac_header" >&5
16290echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16291if eval "test \"\${$as_ac_Header+set}\" = set"; then
16292 echo $ECHO_N "(cached) $ECHO_C" >&6
16293else
35996d22 16294 eval "$as_ac_Header=\$ac_header_preproc"
c0d27fcc
MR
16295fi
16296echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
16297echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16298
16299fi
16300if test `eval echo '${'$as_ac_Header'}'` = yes; then
16301 cat >>confdefs.h <<_ACEOF
16302#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16303_ACEOF
16304
16305fi
16306
16307done
16308
16309fi
16310
16311
16312for ac_header in nlist.h
16313do
16314as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16315if eval "test \"\${$as_ac_Header+set}\" = set"; then
16316 echo "$as_me:$LINENO: checking for $ac_header" >&5
16317echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16318if eval "test \"\${$as_ac_Header+set}\" = set"; then
16319 echo $ECHO_N "(cached) $ECHO_C" >&6
16320fi
16321echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
16322echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16323else
16324 # Is the header compilable?
16325echo "$as_me:$LINENO: checking $ac_header usability" >&5
16326echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
16327cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16328/* confdefs.h. */
16329_ACEOF
16330cat confdefs.h >>conftest.$ac_ext
16331cat >>conftest.$ac_ext <<_ACEOF
16332/* end confdefs.h. */
c0d27fcc
MR
16333$ac_includes_default
16334#include <$ac_header>
16335_ACEOF
16336rm -f conftest.$ac_objext
16337if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 16338 (eval $ac_compile) 2>conftest.er1
c0d27fcc 16339 ac_status=$?
35996d22
AS
16340 grep -v '^ *+' conftest.er1 >conftest.err
16341 rm -f conftest.er1
16342 cat conftest.err >&5
c0d27fcc
MR
16343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16344 (exit $ac_status); } &&
551ffc27
ST
16345 { ac_try='test -z "$ac_c_werror_flag"
16346 || test ! -s conftest.err'
35996d22
AS
16347 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16348 (eval $ac_try) 2>&5
16349 ac_status=$?
16350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16351 (exit $ac_status); }; } &&
16352 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
16353 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16354 (eval $ac_try) 2>&5
16355 ac_status=$?
16356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16357 (exit $ac_status); }; }; then
16358 ac_header_compiler=yes
2c9dccc9
PJ
16359else
16360 echo "$as_me: failed program was:" >&5
19650fd6
AS
16361sed 's/^/| /' conftest.$ac_ext >&5
16362
c0d27fcc 16363ac_header_compiler=no
98418dba 16364fi
35996d22 16365rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
16366echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16367echo "${ECHO_T}$ac_header_compiler" >&6
98418dba 16368
c0d27fcc
MR
16369# Is the header present?
16370echo "$as_me:$LINENO: checking $ac_header presence" >&5
16371echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
16372cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16373/* confdefs.h. */
16374_ACEOF
16375cat confdefs.h >>conftest.$ac_ext
16376cat >>conftest.$ac_ext <<_ACEOF
16377/* end confdefs.h. */
503d2be0
AS
16378#include <$ac_header>
16379_ACEOF
c0d27fcc 16380if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
16381 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16382 ac_status=$?
6bae0ccf 16383 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
16384 rm -f conftest.er1
16385 cat conftest.err >&5
c0d27fcc 16386 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
16387 (exit $ac_status); } >/dev/null; then
16388 if test -s conftest.err; then
16389 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 16390 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
16391 else
16392 ac_cpp_err=
16393 fi
16394else
16395 ac_cpp_err=yes
16396fi
16397if test -z "$ac_cpp_err"; then
c0d27fcc 16398 ac_header_preproc=yes
503d2be0
AS
16399else
16400 echo "$as_me: failed program was:" >&5
19650fd6
AS
16401sed 's/^/| /' conftest.$ac_ext >&5
16402
c0d27fcc 16403 ac_header_preproc=no
b5de8dc0 16404fi
503d2be0 16405rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
16406echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16407echo "${ECHO_T}$ac_header_preproc" >&6
16408
16409# So? What about this header?
35996d22
AS
16410case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16411 yes:no: )
c0d27fcc
MR
16412 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16413echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
16414 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
16415echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
16416 ac_header_preproc=yes
19650fd6 16417 ;;
35996d22 16418 no:yes:* )
c0d27fcc
MR
16419 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16420echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
16421 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
16422echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
16423 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
16424echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
16425 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
16426echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16427 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 16428echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
16429 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
16430echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
16431 (
16432 cat <<\_ASBOX
35996d22
AS
16433## ------------------------------------------ ##
16434## Report this to the AC_PACKAGE_NAME lists. ##
16435## ------------------------------------------ ##
19650fd6
AS
16436_ASBOX
16437 ) |
16438 sed "s/^/$as_me: WARNING: /" >&2
16439 ;;
c0d27fcc
MR
16440esac
16441echo "$as_me:$LINENO: checking for $ac_header" >&5
16442echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16443if eval "test \"\${$as_ac_Header+set}\" = set"; then
16444 echo $ECHO_N "(cached) $ECHO_C" >&6
16445else
35996d22 16446 eval "$as_ac_Header=\$ac_header_preproc"
b5de8dc0 16447fi
c0d27fcc 16448echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 16449echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
16450
16451fi
98418dba 16452if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 16453 cat >>confdefs.h <<_ACEOF
98418dba 16454#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc
MR
16455_ACEOF
16456 echo "$as_me:$LINENO: checking for struct nlist.n_un.n_name" >&5
98418dba
CW
16457echo $ECHO_N "checking for struct nlist.n_un.n_name... $ECHO_C" >&6
16458if test "${ac_cv_member_struct_nlist_n_un_n_name+set}" = set; then
503d2be0 16459 echo $ECHO_N "(cached) $ECHO_C" >&6
b5de8dc0 16460else
503d2be0 16461 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16462/* confdefs.h. */
16463_ACEOF
16464cat confdefs.h >>conftest.$ac_ext
16465cat >>conftest.$ac_ext <<_ACEOF
16466/* end confdefs.h. */
98418dba 16467#include <nlist.h>
b5de8dc0 16468
503d2be0
AS
16469int
16470main ()
16471{
98418dba
CW
16472static struct nlist ac_aggr;
16473if (ac_aggr.n_un.n_name)
16474return 0;
503d2be0
AS
16475 ;
16476 return 0;
16477}
16478_ACEOF
98418dba 16479rm -f conftest.$ac_objext
c0d27fcc 16480if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 16481 (eval $ac_compile) 2>conftest.er1
503d2be0 16482 ac_status=$?
35996d22
AS
16483 grep -v '^ *+' conftest.er1 >conftest.err
16484 rm -f conftest.er1
16485 cat conftest.err >&5
c0d27fcc 16486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16487 (exit $ac_status); } &&
551ffc27
ST
16488 { ac_try='test -z "$ac_c_werror_flag"
16489 || test ! -s conftest.err'
35996d22
AS
16490 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16491 (eval $ac_try) 2>&5
16492 ac_status=$?
16493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16494 (exit $ac_status); }; } &&
16495 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 16496 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
16497 (eval $ac_try) 2>&5
16498 ac_status=$?
c0d27fcc 16499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16500 (exit $ac_status); }; }; then
98418dba 16501 ac_cv_member_struct_nlist_n_un_n_name=yes
503d2be0
AS
16502else
16503 echo "$as_me: failed program was:" >&5
19650fd6
AS
16504sed 's/^/| /' conftest.$ac_ext >&5
16505
6bae0ccf 16506cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16507/* confdefs.h. */
16508_ACEOF
16509cat confdefs.h >>conftest.$ac_ext
16510cat >>conftest.$ac_ext <<_ACEOF
16511/* end confdefs.h. */
6bae0ccf
DL
16512#include <nlist.h>
16513
16514int
16515main ()
16516{
16517static struct nlist ac_aggr;
16518if (sizeof ac_aggr.n_un.n_name)
16519return 0;
16520 ;
16521 return 0;
16522}
16523_ACEOF
16524rm -f conftest.$ac_objext
16525if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 16526 (eval $ac_compile) 2>conftest.er1
6bae0ccf 16527 ac_status=$?
35996d22
AS
16528 grep -v '^ *+' conftest.er1 >conftest.err
16529 rm -f conftest.er1
16530 cat conftest.err >&5
6bae0ccf
DL
16531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16532 (exit $ac_status); } &&
551ffc27
ST
16533 { ac_try='test -z "$ac_c_werror_flag"
16534 || test ! -s conftest.err'
35996d22
AS
16535 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16536 (eval $ac_try) 2>&5
16537 ac_status=$?
16538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16539 (exit $ac_status); }; } &&
16540 { ac_try='test -s conftest.$ac_objext'
6bae0ccf
DL
16541 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16542 (eval $ac_try) 2>&5
16543 ac_status=$?
16544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16545 (exit $ac_status); }; }; then
16546 ac_cv_member_struct_nlist_n_un_n_name=yes
16547else
16548 echo "$as_me: failed program was:" >&5
19650fd6
AS
16549sed 's/^/| /' conftest.$ac_ext >&5
16550
98418dba 16551ac_cv_member_struct_nlist_n_un_n_name=no
503d2be0 16552fi
35996d22 16553rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b5de8dc0 16554fi
35996d22 16555rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 16556fi
c0d27fcc 16557echo "$as_me:$LINENO: result: $ac_cv_member_struct_nlist_n_un_n_name" >&5
98418dba
CW
16558echo "${ECHO_T}$ac_cv_member_struct_nlist_n_un_n_name" >&6
16559if test $ac_cv_member_struct_nlist_n_un_n_name = yes; then
b5de8dc0 16560
c0d27fcc 16561cat >>confdefs.h <<_ACEOF
98418dba 16562#define HAVE_STRUCT_NLIST_N_UN_N_NAME 1
c0d27fcc 16563_ACEOF
b5de8dc0 16564
c0d27fcc
MR
16565
16566cat >>confdefs.h <<\_ACEOF
98418dba 16567#define NLIST_NAME_UNION 1
c0d27fcc 16568_ACEOF
b5de8dc0 16569
98418dba 16570fi
b5de8dc0 16571
c0d27fcc 16572
98418dba 16573fi
c0d27fcc 16574
98418dba 16575done
b5de8dc0 16576
98418dba
CW
16577fi
16578done
b5de8dc0 16579
c0d27fcc 16580
98418dba 16581# Some definitions of getloadavg require that the program be installed setgid.
c0d27fcc 16582echo "$as_me:$LINENO: checking whether getloadavg requires setgid" >&5
98418dba
CW
16583echo $ECHO_N "checking whether getloadavg requires setgid... $ECHO_C" >&6
16584if test "${ac_cv_func_getloadavg_setgid+set}" = set; then
16585 echo $ECHO_N "(cached) $ECHO_C" >&6
16586else
16587 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16588/* confdefs.h. */
16589_ACEOF
16590cat confdefs.h >>conftest.$ac_ext
16591cat >>conftest.$ac_ext <<_ACEOF
16592/* end confdefs.h. */
6bae0ccf 16593#include "$srcdir/$ac_config_libobj_dir/getloadavg.c"
98418dba
CW
16594#ifdef LDAV_PRIVILEGED
16595Yowza Am I SETGID yet
16596#endif
16597_ACEOF
16598if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 16599 $EGREP "Yowza Am I SETGID yet" >/dev/null 2>&1; then
98418dba
CW
16600 ac_cv_func_getloadavg_setgid=yes
16601else
16602 ac_cv_func_getloadavg_setgid=no
16603fi
16604rm -f conftest*
b5de8dc0 16605
98418dba 16606fi
c0d27fcc 16607echo "$as_me:$LINENO: result: $ac_cv_func_getloadavg_setgid" >&5
98418dba
CW
16608echo "${ECHO_T}$ac_cv_func_getloadavg_setgid" >&6
16609if test $ac_cv_func_getloadavg_setgid = yes; then
16610 NEED_SETGID=true
b5de8dc0 16611
c0d27fcc 16612cat >>confdefs.h <<\_ACEOF
98418dba 16613#define GETLOADAVG_PRIVILEGED 1
c0d27fcc 16614_ACEOF
98418dba 16615
b5de8dc0 16616else
98418dba 16617 NEED_SETGID=false
b5de8dc0 16618fi
98418dba
CW
16619
16620if test $ac_cv_func_getloadavg_setgid = yes; then
c0d27fcc 16621 echo "$as_me:$LINENO: checking group of /dev/kmem" >&5
98418dba
CW
16622echo $ECHO_N "checking group of /dev/kmem... $ECHO_C" >&6
16623if test "${ac_cv_group_kmem+set}" = set; then
16624 echo $ECHO_N "(cached) $ECHO_C" >&6
16625else
16626 # On Solaris, /dev/kmem is a symlink. Get info on the real file.
16627 ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null`
16628 # If we got an error (system does not support symlinks), try without -L.
16629 test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem`
16630 ac_cv_group_kmem=`echo $ac_ls_output \
35996d22 16631 | sed -ne 's/[ ][ ]*/ /g;
98418dba
CW
16632 s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/;
16633 / /s/.* //;p;'`
16634
b5de8dc0 16635fi
c0d27fcc 16636echo "$as_me:$LINENO: result: $ac_cv_group_kmem" >&5
98418dba
CW
16637echo "${ECHO_T}$ac_cv_group_kmem" >&6
16638 KMEM_GROUP=$ac_cv_group_kmem
b5de8dc0 16639fi
98418dba
CW
16640if test "x$ac_save_LIBS" = x; then
16641 GETLOADAVG_LIBS=$LIBS
16642else
16643 GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$ac_save_LIBS!!"`
b5de8dc0 16644fi
98418dba 16645LIBS=$ac_save_LIBS
b5de8dc0 16646
c0d27fcc
MR
16647
16648
16649echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5
b936fae4
AS
16650echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
16651if test "${ac_cv_sys_largefile_source+set}" = set; then
503d2be0 16652 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 16653else
b936fae4
AS
16654 while :; do
16655 ac_cv_sys_largefile_source=no
503d2be0 16656 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16657/* confdefs.h. */
16658_ACEOF
16659cat confdefs.h >>conftest.$ac_ext
16660cat >>conftest.$ac_ext <<_ACEOF
16661/* end confdefs.h. */
b936fae4 16662#include <stdio.h>
503d2be0
AS
16663int
16664main ()
16665{
b936fae4
AS
16666return !fseeko;
16667 ;
16668 return 0;
16669}
16670_ACEOF
16671rm -f conftest.$ac_objext
c0d27fcc 16672if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 16673 (eval $ac_compile) 2>conftest.er1
b936fae4 16674 ac_status=$?
35996d22
AS
16675 grep -v '^ *+' conftest.er1 >conftest.err
16676 rm -f conftest.er1
16677 cat conftest.err >&5
c0d27fcc 16678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b936fae4 16679 (exit $ac_status); } &&
551ffc27
ST
16680 { ac_try='test -z "$ac_c_werror_flag"
16681 || test ! -s conftest.err'
35996d22
AS
16682 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16683 (eval $ac_try) 2>&5
16684 ac_status=$?
16685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16686 (exit $ac_status); }; } &&
16687 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 16688 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
b936fae4
AS
16689 (eval $ac_try) 2>&5
16690 ac_status=$?
c0d27fcc 16691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b936fae4
AS
16692 (exit $ac_status); }; }; then
16693 break
16694else
16695 echo "$as_me: failed program was:" >&5
19650fd6
AS
16696sed 's/^/| /' conftest.$ac_ext >&5
16697
b936fae4 16698fi
35996d22 16699rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b936fae4 16700 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16701/* confdefs.h. */
16702_ACEOF
16703cat confdefs.h >>conftest.$ac_ext
16704cat >>conftest.$ac_ext <<_ACEOF
16705/* end confdefs.h. */
b936fae4
AS
16706#define _LARGEFILE_SOURCE 1
16707#include <stdio.h>
b936fae4
AS
16708int
16709main ()
16710{
16711return !fseeko;
16712 ;
16713 return 0;
16714}
16715_ACEOF
16716rm -f conftest.$ac_objext
c0d27fcc 16717if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 16718 (eval $ac_compile) 2>conftest.er1
b936fae4 16719 ac_status=$?
35996d22
AS
16720 grep -v '^ *+' conftest.er1 >conftest.err
16721 rm -f conftest.er1
16722 cat conftest.err >&5
c0d27fcc 16723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b936fae4 16724 (exit $ac_status); } &&
551ffc27
ST
16725 { ac_try='test -z "$ac_c_werror_flag"
16726 || test ! -s conftest.err'
35996d22
AS
16727 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16728 (eval $ac_try) 2>&5
16729 ac_status=$?
16730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16731 (exit $ac_status); }; } &&
16732 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 16733 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
b936fae4
AS
16734 (eval $ac_try) 2>&5
16735 ac_status=$?
c0d27fcc 16736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
b936fae4
AS
16737 (exit $ac_status); }; }; then
16738 ac_cv_sys_largefile_source=1; break
16739else
16740 echo "$as_me: failed program was:" >&5
19650fd6
AS
16741sed 's/^/| /' conftest.$ac_ext >&5
16742
b936fae4 16743fi
35996d22 16744rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b936fae4
AS
16745 break
16746done
16747fi
c0d27fcc 16748echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5
b936fae4
AS
16749echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
16750if test "$ac_cv_sys_largefile_source" != no; then
16751
c0d27fcc 16752cat >>confdefs.h <<_ACEOF
b936fae4 16753#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
c0d27fcc 16754_ACEOF
b936fae4
AS
16755
16756fi
16757rm -f conftest*
4c343001 16758
b936fae4
AS
16759# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
16760# in glibc 2.1.3, but that breaks too many other things.
16761# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
c0d27fcc 16762echo "$as_me:$LINENO: checking for fseeko" >&5
b936fae4
AS
16763echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
16764if test "${ac_cv_func_fseeko+set}" = set; then
16765 echo $ECHO_N "(cached) $ECHO_C" >&6
16766else
16767 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16768/* confdefs.h. */
16769_ACEOF
16770cat confdefs.h >>conftest.$ac_ext
16771cat >>conftest.$ac_ext <<_ACEOF
16772/* end confdefs.h. */
b936fae4 16773#include <stdio.h>
b936fae4
AS
16774int
16775main ()
16776{
16777return fseeko && fseeko (stdin, 0, 0);
503d2be0
AS
16778 ;
16779 return 0;
16780}
16781_ACEOF
16782rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 16783if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 16784 (eval $ac_link) 2>conftest.er1
503d2be0 16785 ac_status=$?
35996d22
AS
16786 grep -v '^ *+' conftest.er1 >conftest.err
16787 rm -f conftest.er1
16788 cat conftest.err >&5
c0d27fcc 16789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16790 (exit $ac_status); } &&
551ffc27
ST
16791 { ac_try='test -z "$ac_c_werror_flag"
16792 || test ! -s conftest.err'
35996d22
AS
16793 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16794 (eval $ac_try) 2>&5
16795 ac_status=$?
16796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16797 (exit $ac_status); }; } &&
16798 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 16799 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
16800 (eval $ac_try) 2>&5
16801 ac_status=$?
c0d27fcc 16802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16803 (exit $ac_status); }; }; then
b936fae4 16804 ac_cv_func_fseeko=yes
503d2be0
AS
16805else
16806 echo "$as_me: failed program was:" >&5
19650fd6
AS
16807sed 's/^/| /' conftest.$ac_ext >&5
16808
b936fae4 16809ac_cv_func_fseeko=no
503d2be0 16810fi
35996d22
AS
16811rm -f conftest.err conftest.$ac_objext \
16812 conftest$ac_exeext conftest.$ac_ext
503d2be0 16813fi
c0d27fcc 16814echo "$as_me:$LINENO: result: $ac_cv_func_fseeko" >&5
b936fae4
AS
16815echo "${ECHO_T}$ac_cv_func_fseeko" >&6
16816if test $ac_cv_func_fseeko = yes; then
16817
c0d27fcc 16818cat >>confdefs.h <<\_ACEOF
b936fae4 16819#define HAVE_FSEEKO 1
c0d27fcc 16820_ACEOF
b936fae4 16821
4c343001
DL
16822fi
16823
c0d27fcc 16824
cd958eb3
MB
16825echo "$as_me:$LINENO: checking whether getpgrp requires zero arguments" >&5
16826echo $ECHO_N "checking whether getpgrp requires zero arguments... $ECHO_C" >&6
16827if test "${ac_cv_func_getpgrp_void+set}" = set; then
16828 echo $ECHO_N "(cached) $ECHO_C" >&6
16829else
16830 # Use it with a single arg.
16831cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16832/* confdefs.h. */
16833_ACEOF
16834cat confdefs.h >>conftest.$ac_ext
16835cat >>conftest.$ac_ext <<_ACEOF
16836/* end confdefs.h. */
cd958eb3
MB
16837$ac_includes_default
16838int
16839main ()
16840{
16841getpgrp (0);
16842 ;
16843 return 0;
16844}
16845_ACEOF
16846rm -f conftest.$ac_objext
16847if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 16848 (eval $ac_compile) 2>conftest.er1
cd958eb3 16849 ac_status=$?
35996d22
AS
16850 grep -v '^ *+' conftest.er1 >conftest.err
16851 rm -f conftest.er1
16852 cat conftest.err >&5
cd958eb3
MB
16853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16854 (exit $ac_status); } &&
551ffc27
ST
16855 { ac_try='test -z "$ac_c_werror_flag"
16856 || test ! -s conftest.err'
35996d22
AS
16857 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16858 (eval $ac_try) 2>&5
16859 ac_status=$?
16860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16861 (exit $ac_status); }; } &&
16862 { ac_try='test -s conftest.$ac_objext'
cd958eb3
MB
16863 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16864 (eval $ac_try) 2>&5
16865 ac_status=$?
16866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16867 (exit $ac_status); }; }; then
16868 ac_cv_func_getpgrp_void=no
16869else
16870 echo "$as_me: failed program was:" >&5
19650fd6
AS
16871sed 's/^/| /' conftest.$ac_ext >&5
16872
cd958eb3
MB
16873ac_cv_func_getpgrp_void=yes
16874fi
35996d22 16875rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
cd958eb3
MB
16876
16877fi
16878echo "$as_me:$LINENO: result: $ac_cv_func_getpgrp_void" >&5
16879echo "${ECHO_T}$ac_cv_func_getpgrp_void" >&6
16880if test $ac_cv_func_getpgrp_void = yes; then
16881
16882cat >>confdefs.h <<\_ACEOF
16883#define GETPGRP_VOID 1
16884_ACEOF
16885
16886fi
16887
16888
973a76b1
DL
16889
16890for ac_func in strftime
16891do
16892as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16893echo "$as_me:$LINENO: checking for $ac_func" >&5
16894echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16895if eval "test \"\${$as_ac_var+set}\" = set"; then
16896 echo $ECHO_N "(cached) $ECHO_C" >&6
16897else
16898 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16899/* confdefs.h. */
16900_ACEOF
16901cat confdefs.h >>conftest.$ac_ext
16902cat >>conftest.$ac_ext <<_ACEOF
16903/* end confdefs.h. */
35996d22
AS
16904/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16905 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16906#define $ac_func innocuous_$ac_func
16907
973a76b1 16908/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
16909 which can conflict with char $ac_func (); below.
16910 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16911 <limits.h> exists even on freestanding compilers. */
35996d22 16912
19650fd6
AS
16913#ifdef __STDC__
16914# include <limits.h>
16915#else
16916# include <assert.h>
16917#endif
35996d22
AS
16918
16919#undef $ac_func
16920
973a76b1
DL
16921/* Override any gcc2 internal prototype to avoid an error. */
16922#ifdef __cplusplus
16923extern "C"
19650fd6 16924{
973a76b1
DL
16925#endif
16926/* We use char because int might match the return type of a gcc2
16927 builtin and then its argument prototype would still apply. */
16928char $ac_func ();
16929/* The GNU C library defines this for functions which it implements
16930 to always fail with ENOSYS. Some functions are actually named
16931 something starting with __ and the normal name is an alias. */
16932#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16933choke me
16934#else
19650fd6
AS
16935char (*f) () = $ac_func;
16936#endif
16937#ifdef __cplusplus
16938}
973a76b1
DL
16939#endif
16940
19650fd6
AS
16941int
16942main ()
16943{
16944return f != $ac_func;
973a76b1
DL
16945 ;
16946 return 0;
16947}
16948_ACEOF
16949rm -f conftest.$ac_objext conftest$ac_exeext
16950if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 16951 (eval $ac_link) 2>conftest.er1
973a76b1 16952 ac_status=$?
35996d22
AS
16953 grep -v '^ *+' conftest.er1 >conftest.err
16954 rm -f conftest.er1
16955 cat conftest.err >&5
973a76b1
DL
16956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16957 (exit $ac_status); } &&
551ffc27
ST
16958 { ac_try='test -z "$ac_c_werror_flag"
16959 || test ! -s conftest.err'
35996d22
AS
16960 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16961 (eval $ac_try) 2>&5
16962 ac_status=$?
16963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16964 (exit $ac_status); }; } &&
16965 { ac_try='test -s conftest$ac_exeext'
973a76b1
DL
16966 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16967 (eval $ac_try) 2>&5
16968 ac_status=$?
16969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16970 (exit $ac_status); }; }; then
16971 eval "$as_ac_var=yes"
16972else
16973 echo "$as_me: failed program was:" >&5
19650fd6
AS
16974sed 's/^/| /' conftest.$ac_ext >&5
16975
973a76b1
DL
16976eval "$as_ac_var=no"
16977fi
35996d22
AS
16978rm -f conftest.err conftest.$ac_objext \
16979 conftest$ac_exeext conftest.$ac_ext
973a76b1
DL
16980fi
16981echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16982echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16983if test `eval echo '${'$as_ac_var'}'` = yes; then
16984 cat >>confdefs.h <<_ACEOF
16985#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16986_ACEOF
16987
16988else
16989 # strftime is in -lintl on SCO UNIX.
16990echo "$as_me:$LINENO: checking for strftime in -lintl" >&5
16991echo $ECHO_N "checking for strftime in -lintl... $ECHO_C" >&6
16992if test "${ac_cv_lib_intl_strftime+set}" = set; then
16993 echo $ECHO_N "(cached) $ECHO_C" >&6
16994else
16995 ac_check_lib_save_LIBS=$LIBS
16996LIBS="-lintl $LIBS"
16997cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16998/* confdefs.h. */
16999_ACEOF
17000cat confdefs.h >>conftest.$ac_ext
17001cat >>conftest.$ac_ext <<_ACEOF
17002/* end confdefs.h. */
973a76b1
DL
17003
17004/* Override any gcc2 internal prototype to avoid an error. */
17005#ifdef __cplusplus
17006extern "C"
17007#endif
17008/* We use char because int might match the return type of a gcc2
17009 builtin and then its argument prototype would still apply. */
17010char strftime ();
17011int
17012main ()
17013{
17014strftime ();
17015 ;
17016 return 0;
17017}
17018_ACEOF
17019rm -f conftest.$ac_objext conftest$ac_exeext
17020if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 17021 (eval $ac_link) 2>conftest.er1
973a76b1 17022 ac_status=$?
35996d22
AS
17023 grep -v '^ *+' conftest.er1 >conftest.err
17024 rm -f conftest.er1
17025 cat conftest.err >&5
973a76b1
DL
17026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17027 (exit $ac_status); } &&
551ffc27
ST
17028 { ac_try='test -z "$ac_c_werror_flag"
17029 || test ! -s conftest.err'
35996d22
AS
17030 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17031 (eval $ac_try) 2>&5
17032 ac_status=$?
17033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17034 (exit $ac_status); }; } &&
17035 { ac_try='test -s conftest$ac_exeext'
973a76b1
DL
17036 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17037 (eval $ac_try) 2>&5
17038 ac_status=$?
17039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17040 (exit $ac_status); }; }; then
17041 ac_cv_lib_intl_strftime=yes
17042else
17043 echo "$as_me: failed program was:" >&5
19650fd6
AS
17044sed 's/^/| /' conftest.$ac_ext >&5
17045
973a76b1
DL
17046ac_cv_lib_intl_strftime=no
17047fi
35996d22
AS
17048rm -f conftest.err conftest.$ac_objext \
17049 conftest$ac_exeext conftest.$ac_ext
973a76b1
DL
17050LIBS=$ac_check_lib_save_LIBS
17051fi
17052echo "$as_me:$LINENO: result: $ac_cv_lib_intl_strftime" >&5
17053echo "${ECHO_T}$ac_cv_lib_intl_strftime" >&6
17054if test $ac_cv_lib_intl_strftime = yes; then
17055 cat >>confdefs.h <<\_ACEOF
17056#define HAVE_STRFTIME 1
17057_ACEOF
17058
17059LIBS="-lintl $LIBS"
17060fi
17061
17062fi
17063done
17064
17065
b936fae4
AS
17066# UNIX98 PTYs.
17067
17068for ac_func in grantpt
503d2be0
AS
17069do
17070as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 17071echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
17072echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17073if eval "test \"\${$as_ac_var+set}\" = set"; then
17074 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 17075else
503d2be0 17076 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17077/* confdefs.h. */
17078_ACEOF
17079cat confdefs.h >>conftest.$ac_ext
17080cat >>conftest.$ac_ext <<_ACEOF
17081/* end confdefs.h. */
35996d22
AS
17082/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17083 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17084#define $ac_func innocuous_$ac_func
17085
503d2be0 17086/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17087 which can conflict with char $ac_func (); below.
17088 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17089 <limits.h> exists even on freestanding compilers. */
35996d22 17090
19650fd6
AS
17091#ifdef __STDC__
17092# include <limits.h>
17093#else
17094# include <assert.h>
17095#endif
35996d22
AS
17096
17097#undef $ac_func
17098
4c343001 17099/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
17100#ifdef __cplusplus
17101extern "C"
19650fd6 17102{
503d2be0 17103#endif
4c343001 17104/* We use char because int might match the return type of a gcc2
503d2be0
AS
17105 builtin and then its argument prototype would still apply. */
17106char $ac_func ();
503d2be0
AS
17107/* The GNU C library defines this for functions which it implements
17108 to always fail with ENOSYS. Some functions are actually named
17109 something starting with __ and the normal name is an alias. */
17110#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17111choke me
17112#else
19650fd6
AS
17113char (*f) () = $ac_func;
17114#endif
17115#ifdef __cplusplus
17116}
503d2be0 17117#endif
4c343001 17118
19650fd6
AS
17119int
17120main ()
17121{
17122return f != $ac_func;
503d2be0
AS
17123 ;
17124 return 0;
17125}
17126_ACEOF
17127rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17128if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 17129 (eval $ac_link) 2>conftest.er1
503d2be0 17130 ac_status=$?
35996d22
AS
17131 grep -v '^ *+' conftest.er1 >conftest.err
17132 rm -f conftest.er1
17133 cat conftest.err >&5
c0d27fcc 17134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 17135 (exit $ac_status); } &&
551ffc27
ST
17136 { ac_try='test -z "$ac_c_werror_flag"
17137 || test ! -s conftest.err'
35996d22
AS
17138 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17139 (eval $ac_try) 2>&5
17140 ac_status=$?
17141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17142 (exit $ac_status); }; } &&
17143 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17144 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
17145 (eval $ac_try) 2>&5
17146 ac_status=$?
c0d27fcc 17147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
17148 (exit $ac_status); }; }; then
17149 eval "$as_ac_var=yes"
17150else
17151 echo "$as_me: failed program was:" >&5
19650fd6
AS
17152sed 's/^/| /' conftest.$ac_ext >&5
17153
503d2be0
AS
17154eval "$as_ac_var=no"
17155fi
35996d22
AS
17156rm -f conftest.err conftest.$ac_objext \
17157 conftest$ac_exeext conftest.$ac_ext
503d2be0 17158fi
c0d27fcc 17159echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
17160echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17161if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 17162 cat >>confdefs.h <<_ACEOF
503d2be0 17163#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 17164_ACEOF
4c343001
DL
17165
17166fi
503d2be0
AS
17167done
17168
c0d27fcc 17169
b936fae4 17170# PTY-related GNU extensions.
4c343001 17171
b936fae4
AS
17172for ac_func in getpt
17173do
17174as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 17175echo "$as_me:$LINENO: checking for $ac_func" >&5
b936fae4
AS
17176echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17177if eval "test \"\${$as_ac_var+set}\" = set"; then
503d2be0 17178 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 17179else
b936fae4 17180 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17181/* confdefs.h. */
17182_ACEOF
17183cat confdefs.h >>conftest.$ac_ext
17184cat >>conftest.$ac_ext <<_ACEOF
17185/* end confdefs.h. */
35996d22
AS
17186/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17187 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17188#define $ac_func innocuous_$ac_func
17189
087121cc 17190/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17191 which can conflict with char $ac_func (); below.
17192 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17193 <limits.h> exists even on freestanding compilers. */
35996d22 17194
19650fd6
AS
17195#ifdef __STDC__
17196# include <limits.h>
17197#else
17198# include <assert.h>
17199#endif
35996d22
AS
17200
17201#undef $ac_func
17202
087121cc 17203/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
17204#ifdef __cplusplus
17205extern "C"
19650fd6 17206{
503d2be0 17207#endif
087121cc 17208/* We use char because int might match the return type of a gcc2
503d2be0
AS
17209 builtin and then its argument prototype would still apply. */
17210char $ac_func ();
087121cc
GM
17211/* The GNU C library defines this for functions which it implements
17212 to always fail with ENOSYS. Some functions are actually named
17213 something starting with __ and the normal name is an alias. */
17214#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17215choke me
17216#else
19650fd6
AS
17217char (*f) () = $ac_func;
17218#endif
17219#ifdef __cplusplus
17220}
087121cc
GM
17221#endif
17222
19650fd6
AS
17223int
17224main ()
17225{
17226return f != $ac_func;
503d2be0
AS
17227 ;
17228 return 0;
17229}
17230_ACEOF
17231rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17232if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 17233 (eval $ac_link) 2>conftest.er1
503d2be0 17234 ac_status=$?
35996d22
AS
17235 grep -v '^ *+' conftest.er1 >conftest.err
17236 rm -f conftest.er1
17237 cat conftest.err >&5
c0d27fcc 17238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 17239 (exit $ac_status); } &&
551ffc27
ST
17240 { ac_try='test -z "$ac_c_werror_flag"
17241 || test ! -s conftest.err'
35996d22
AS
17242 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17243 (eval $ac_try) 2>&5
17244 ac_status=$?
17245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17246 (exit $ac_status); }; } &&
17247 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17248 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
17249 (eval $ac_try) 2>&5
17250 ac_status=$?
c0d27fcc 17251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
17252 (exit $ac_status); }; }; then
17253 eval "$as_ac_var=yes"
17254else
17255 echo "$as_me: failed program was:" >&5
19650fd6
AS
17256sed 's/^/| /' conftest.$ac_ext >&5
17257
503d2be0
AS
17258eval "$as_ac_var=no"
17259fi
35996d22
AS
17260rm -f conftest.err conftest.$ac_objext \
17261 conftest$ac_exeext conftest.$ac_ext
503d2be0 17262fi
c0d27fcc 17263echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
17264echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17265if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 17266 cat >>confdefs.h <<_ACEOF
503d2be0 17267#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 17268_ACEOF
087121cc 17269
087121cc
GM
17270fi
17271done
17272
c0d27fcc 17273
ba4481b5
DL
17274# Check this now, so that we will NOT find the above functions in ncurses.
17275# That is because we have not set up to link ncurses in lib-src.
17276# It's better to believe a function is not available
17277# than to expect to find it in ncurses.
503d2be0 17278
c0d27fcc 17279echo "$as_me:$LINENO: checking for tparm in -lncurses" >&5
503d2be0
AS
17280echo $ECHO_N "checking for tparm in -lncurses... $ECHO_C" >&6
17281if test "${ac_cv_lib_ncurses_tparm+set}" = set; then
17282 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17283else
503d2be0 17284 ac_check_lib_save_LIBS=$LIBS
ba4481b5 17285LIBS="-lncurses $LIBS"
503d2be0 17286cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17287/* confdefs.h. */
17288_ACEOF
17289cat confdefs.h >>conftest.$ac_ext
17290cat >>conftest.$ac_ext <<_ACEOF
17291/* end confdefs.h. */
503d2be0 17292
ba4481b5 17293/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
17294#ifdef __cplusplus
17295extern "C"
17296#endif
ba4481b5 17297/* We use char because int might match the return type of a gcc2
503d2be0
AS
17298 builtin and then its argument prototype would still apply. */
17299char tparm ();
17300int
17301main ()
17302{
17303tparm ();
17304 ;
17305 return 0;
17306}
17307_ACEOF
17308rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17309if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 17310 (eval $ac_link) 2>conftest.er1
503d2be0 17311 ac_status=$?
35996d22
AS
17312 grep -v '^ *+' conftest.er1 >conftest.err
17313 rm -f conftest.er1
17314 cat conftest.err >&5
c0d27fcc 17315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 17316 (exit $ac_status); } &&
551ffc27
ST
17317 { ac_try='test -z "$ac_c_werror_flag"
17318 || test ! -s conftest.err'
35996d22
AS
17319 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17320 (eval $ac_try) 2>&5
17321 ac_status=$?
17322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17323 (exit $ac_status); }; } &&
17324 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17325 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
17326 (eval $ac_try) 2>&5
17327 ac_status=$?
c0d27fcc 17328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
17329 (exit $ac_status); }; }; then
17330 ac_cv_lib_ncurses_tparm=yes
17331else
17332 echo "$as_me: failed program was:" >&5
19650fd6
AS
17333sed 's/^/| /' conftest.$ac_ext >&5
17334
503d2be0
AS
17335ac_cv_lib_ncurses_tparm=no
17336fi
35996d22
AS
17337rm -f conftest.err conftest.$ac_objext \
17338 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
17339LIBS=$ac_check_lib_save_LIBS
17340fi
c0d27fcc 17341echo "$as_me:$LINENO: result: $ac_cv_lib_ncurses_tparm" >&5
503d2be0
AS
17342echo "${ECHO_T}$ac_cv_lib_ncurses_tparm" >&6
17343if test $ac_cv_lib_ncurses_tparm = yes; then
c0d27fcc 17344 cat >>confdefs.h <<_ACEOF
503d2be0 17345#define HAVE_LIBNCURSES 1
c0d27fcc 17346_ACEOF
ba4481b5
DL
17347
17348 LIBS="-lncurses $LIBS"
17349
ba4481b5
DL
17350fi
17351
c0d27fcc 17352
84e70f78
KR
17353# Do we need the Hesiod library to provide the support routines?
17354if test "$with_hesiod" = yes ; then
17355 # Don't set $LIBS here -- see comments above.
17356 resolv=no
c0d27fcc 17357 echo "$as_me:$LINENO: checking for res_send" >&5
84e70f78
KR
17358echo $ECHO_N "checking for res_send... $ECHO_C" >&6
17359if test "${ac_cv_func_res_send+set}" = set; then
17360 echo $ECHO_N "(cached) $ECHO_C" >&6
17361else
17362 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17363/* confdefs.h. */
17364_ACEOF
17365cat confdefs.h >>conftest.$ac_ext
17366cat >>conftest.$ac_ext <<_ACEOF
17367/* end confdefs.h. */
35996d22
AS
17368/* Define res_send to an innocuous variant, in case <limits.h> declares res_send.
17369 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17370#define res_send innocuous_res_send
17371
84e70f78 17372/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17373 which can conflict with char res_send (); below.
17374 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17375 <limits.h> exists even on freestanding compilers. */
35996d22 17376
19650fd6
AS
17377#ifdef __STDC__
17378# include <limits.h>
17379#else
17380# include <assert.h>
17381#endif
35996d22
AS
17382
17383#undef res_send
17384
84e70f78
KR
17385/* Override any gcc2 internal prototype to avoid an error. */
17386#ifdef __cplusplus
17387extern "C"
19650fd6 17388{
84e70f78
KR
17389#endif
17390/* We use char because int might match the return type of a gcc2
17391 builtin and then its argument prototype would still apply. */
17392char res_send ();
84e70f78
KR
17393/* The GNU C library defines this for functions which it implements
17394 to always fail with ENOSYS. Some functions are actually named
17395 something starting with __ and the normal name is an alias. */
17396#if defined (__stub_res_send) || defined (__stub___res_send)
17397choke me
17398#else
19650fd6
AS
17399char (*f) () = res_send;
17400#endif
17401#ifdef __cplusplus
17402}
cd958eb3
MB
17403#endif
17404
19650fd6
AS
17405int
17406main ()
17407{
17408return f != res_send;
84e70f78
KR
17409 ;
17410 return 0;
17411}
17412_ACEOF
17413rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17414if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 17415 (eval $ac_link) 2>conftest.er1
84e70f78 17416 ac_status=$?
35996d22
AS
17417 grep -v '^ *+' conftest.er1 >conftest.err
17418 rm -f conftest.er1
17419 cat conftest.err >&5
c0d27fcc 17420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78 17421 (exit $ac_status); } &&
551ffc27
ST
17422 { ac_try='test -z "$ac_c_werror_flag"
17423 || test ! -s conftest.err'
35996d22
AS
17424 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17425 (eval $ac_try) 2>&5
17426 ac_status=$?
17427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17428 (exit $ac_status); }; } &&
17429 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17430 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
17431 (eval $ac_try) 2>&5
17432 ac_status=$?
c0d27fcc 17433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
17434 (exit $ac_status); }; }; then
17435 ac_cv_func_res_send=yes
17436else
17437 echo "$as_me: failed program was:" >&5
19650fd6
AS
17438sed 's/^/| /' conftest.$ac_ext >&5
17439
84e70f78
KR
17440ac_cv_func_res_send=no
17441fi
35996d22
AS
17442rm -f conftest.err conftest.$ac_objext \
17443 conftest$ac_exeext conftest.$ac_ext
84e70f78 17444fi
c0d27fcc 17445echo "$as_me:$LINENO: result: $ac_cv_func_res_send" >&5
84e70f78
KR
17446echo "${ECHO_T}$ac_cv_func_res_send" >&6
17447if test $ac_cv_func_res_send = yes; then
17448 :
17449else
c0d27fcc 17450 echo "$as_me:$LINENO: checking for __res_send" >&5
84e70f78
KR
17451echo $ECHO_N "checking for __res_send... $ECHO_C" >&6
17452if test "${ac_cv_func___res_send+set}" = set; then
17453 echo $ECHO_N "(cached) $ECHO_C" >&6
17454else
17455 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17456/* confdefs.h. */
17457_ACEOF
17458cat confdefs.h >>conftest.$ac_ext
17459cat >>conftest.$ac_ext <<_ACEOF
17460/* end confdefs.h. */
35996d22
AS
17461/* Define __res_send to an innocuous variant, in case <limits.h> declares __res_send.
17462 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17463#define __res_send innocuous___res_send
17464
84e70f78 17465/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17466 which can conflict with char __res_send (); below.
17467 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17468 <limits.h> exists even on freestanding compilers. */
35996d22 17469
19650fd6
AS
17470#ifdef __STDC__
17471# include <limits.h>
17472#else
17473# include <assert.h>
17474#endif
35996d22
AS
17475
17476#undef __res_send
17477
84e70f78
KR
17478/* Override any gcc2 internal prototype to avoid an error. */
17479#ifdef __cplusplus
17480extern "C"
19650fd6 17481{
84e70f78
KR
17482#endif
17483/* We use char because int might match the return type of a gcc2
17484 builtin and then its argument prototype would still apply. */
17485char __res_send ();
84e70f78
KR
17486/* The GNU C library defines this for functions which it implements
17487 to always fail with ENOSYS. Some functions are actually named
17488 something starting with __ and the normal name is an alias. */
17489#if defined (__stub___res_send) || defined (__stub_____res_send)
17490choke me
17491#else
19650fd6
AS
17492char (*f) () = __res_send;
17493#endif
17494#ifdef __cplusplus
17495}
84e70f78
KR
17496#endif
17497
19650fd6
AS
17498int
17499main ()
17500{
17501return f != __res_send;
84e70f78
KR
17502 ;
17503 return 0;
17504}
17505_ACEOF
17506rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17507if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 17508 (eval $ac_link) 2>conftest.er1
84e70f78 17509 ac_status=$?
35996d22
AS
17510 grep -v '^ *+' conftest.er1 >conftest.err
17511 rm -f conftest.er1
17512 cat conftest.err >&5
c0d27fcc 17513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78 17514 (exit $ac_status); } &&
551ffc27
ST
17515 { ac_try='test -z "$ac_c_werror_flag"
17516 || test ! -s conftest.err'
35996d22
AS
17517 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17518 (eval $ac_try) 2>&5
17519 ac_status=$?
17520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17521 (exit $ac_status); }; } &&
17522 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17523 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
17524 (eval $ac_try) 2>&5
17525 ac_status=$?
c0d27fcc 17526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
17527 (exit $ac_status); }; }; then
17528 ac_cv_func___res_send=yes
17529else
17530 echo "$as_me: failed program was:" >&5
19650fd6
AS
17531sed 's/^/| /' conftest.$ac_ext >&5
17532
84e70f78
KR
17533ac_cv_func___res_send=no
17534fi
35996d22
AS
17535rm -f conftest.err conftest.$ac_objext \
17536 conftest$ac_exeext conftest.$ac_ext
84e70f78 17537fi
c0d27fcc 17538echo "$as_me:$LINENO: result: $ac_cv_func___res_send" >&5
84e70f78
KR
17539echo "${ECHO_T}$ac_cv_func___res_send" >&6
17540if test $ac_cv_func___res_send = yes; then
17541 :
17542else
c0d27fcc 17543 echo "$as_me:$LINENO: checking for res_send in -lresolv" >&5
84e70f78
KR
17544echo $ECHO_N "checking for res_send in -lresolv... $ECHO_C" >&6
17545if test "${ac_cv_lib_resolv_res_send+set}" = set; then
17546 echo $ECHO_N "(cached) $ECHO_C" >&6
17547else
17548 ac_check_lib_save_LIBS=$LIBS
17549LIBS="-lresolv $LIBS"
17550cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17551/* confdefs.h. */
17552_ACEOF
17553cat confdefs.h >>conftest.$ac_ext
17554cat >>conftest.$ac_ext <<_ACEOF
17555/* end confdefs.h. */
84e70f78
KR
17556
17557/* Override any gcc2 internal prototype to avoid an error. */
17558#ifdef __cplusplus
17559extern "C"
17560#endif
17561/* We use char because int might match the return type of a gcc2
17562 builtin and then its argument prototype would still apply. */
17563char res_send ();
17564int
17565main ()
17566{
17567res_send ();
17568 ;
17569 return 0;
17570}
17571_ACEOF
17572rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17573if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 17574 (eval $ac_link) 2>conftest.er1
84e70f78 17575 ac_status=$?
35996d22
AS
17576 grep -v '^ *+' conftest.er1 >conftest.err
17577 rm -f conftest.er1
17578 cat conftest.err >&5
c0d27fcc 17579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78 17580 (exit $ac_status); } &&
551ffc27
ST
17581 { ac_try='test -z "$ac_c_werror_flag"
17582 || test ! -s conftest.err'
35996d22
AS
17583 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17584 (eval $ac_try) 2>&5
17585 ac_status=$?
17586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17587 (exit $ac_status); }; } &&
17588 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17589 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
17590 (eval $ac_try) 2>&5
17591 ac_status=$?
c0d27fcc 17592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
17593 (exit $ac_status); }; }; then
17594 ac_cv_lib_resolv_res_send=yes
17595else
17596 echo "$as_me: failed program was:" >&5
19650fd6
AS
17597sed 's/^/| /' conftest.$ac_ext >&5
17598
84e70f78
KR
17599ac_cv_lib_resolv_res_send=no
17600fi
35996d22
AS
17601rm -f conftest.err conftest.$ac_objext \
17602 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
17603LIBS=$ac_check_lib_save_LIBS
17604fi
c0d27fcc 17605echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_send" >&5
84e70f78
KR
17606echo "${ECHO_T}$ac_cv_lib_resolv_res_send" >&6
17607if test $ac_cv_lib_resolv_res_send = yes; then
17608 resolv=yes
17609else
c0d27fcc 17610 echo "$as_me:$LINENO: checking for __res_send in -lresolv" >&5
84e70f78
KR
17611echo $ECHO_N "checking for __res_send in -lresolv... $ECHO_C" >&6
17612if test "${ac_cv_lib_resolv___res_send+set}" = set; then
17613 echo $ECHO_N "(cached) $ECHO_C" >&6
17614else
17615 ac_check_lib_save_LIBS=$LIBS
17616LIBS="-lresolv $LIBS"
17617cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17618/* confdefs.h. */
17619_ACEOF
17620cat confdefs.h >>conftest.$ac_ext
17621cat >>conftest.$ac_ext <<_ACEOF
17622/* end confdefs.h. */
84e70f78
KR
17623
17624/* Override any gcc2 internal prototype to avoid an error. */
17625#ifdef __cplusplus
17626extern "C"
17627#endif
17628/* We use char because int might match the return type of a gcc2
17629 builtin and then its argument prototype would still apply. */
17630char __res_send ();
17631int
17632main ()
17633{
17634__res_send ();
17635 ;
17636 return 0;
17637}
17638_ACEOF
17639rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17640if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 17641 (eval $ac_link) 2>conftest.er1
84e70f78 17642 ac_status=$?
35996d22
AS
17643 grep -v '^ *+' conftest.er1 >conftest.err
17644 rm -f conftest.er1
17645 cat conftest.err >&5
c0d27fcc 17646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78 17647 (exit $ac_status); } &&
551ffc27
ST
17648 { ac_try='test -z "$ac_c_werror_flag"
17649 || test ! -s conftest.err'
35996d22
AS
17650 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17651 (eval $ac_try) 2>&5
17652 ac_status=$?
17653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17654 (exit $ac_status); }; } &&
17655 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17656 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
17657 (eval $ac_try) 2>&5
17658 ac_status=$?
c0d27fcc 17659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
17660 (exit $ac_status); }; }; then
17661 ac_cv_lib_resolv___res_send=yes
17662else
17663 echo "$as_me: failed program was:" >&5
19650fd6
AS
17664sed 's/^/| /' conftest.$ac_ext >&5
17665
84e70f78
KR
17666ac_cv_lib_resolv___res_send=no
17667fi
35996d22
AS
17668rm -f conftest.err conftest.$ac_objext \
17669 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
17670LIBS=$ac_check_lib_save_LIBS
17671fi
c0d27fcc 17672echo "$as_me:$LINENO: result: $ac_cv_lib_resolv___res_send" >&5
84e70f78
KR
17673echo "${ECHO_T}$ac_cv_lib_resolv___res_send" >&6
17674if test $ac_cv_lib_resolv___res_send = yes; then
17675 resolv=yes
17676fi
17677
17678fi
17679
17680fi
17681
17682fi
17683
17684 if test "$resolv" = yes ; then
17685 RESOLVLIB=-lresolv
b936fae4 17686
c0d27fcc 17687cat >>confdefs.h <<\_ACEOF
84e70f78 17688#define HAVE_LIBRESOLV 1
c0d27fcc 17689_ACEOF
84e70f78
KR
17690
17691 else
17692 RESOLVLIB=
17693 fi
c0d27fcc 17694 echo "$as_me:$LINENO: checking for hes_getmailhost" >&5
84e70f78
KR
17695echo $ECHO_N "checking for hes_getmailhost... $ECHO_C" >&6
17696if test "${ac_cv_func_hes_getmailhost+set}" = set; then
17697 echo $ECHO_N "(cached) $ECHO_C" >&6
17698else
17699 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17700/* confdefs.h. */
17701_ACEOF
17702cat confdefs.h >>conftest.$ac_ext
17703cat >>conftest.$ac_ext <<_ACEOF
17704/* end confdefs.h. */
35996d22
AS
17705/* Define hes_getmailhost to an innocuous variant, in case <limits.h> declares hes_getmailhost.
17706 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17707#define hes_getmailhost innocuous_hes_getmailhost
17708
84e70f78 17709/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17710 which can conflict with char hes_getmailhost (); below.
17711 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17712 <limits.h> exists even on freestanding compilers. */
35996d22 17713
19650fd6
AS
17714#ifdef __STDC__
17715# include <limits.h>
17716#else
17717# include <assert.h>
17718#endif
35996d22
AS
17719
17720#undef hes_getmailhost
17721
84e70f78
KR
17722/* Override any gcc2 internal prototype to avoid an error. */
17723#ifdef __cplusplus
17724extern "C"
19650fd6 17725{
84e70f78
KR
17726#endif
17727/* We use char because int might match the return type of a gcc2
17728 builtin and then its argument prototype would still apply. */
17729char hes_getmailhost ();
84e70f78
KR
17730/* The GNU C library defines this for functions which it implements
17731 to always fail with ENOSYS. Some functions are actually named
17732 something starting with __ and the normal name is an alias. */
17733#if defined (__stub_hes_getmailhost) || defined (__stub___hes_getmailhost)
17734choke me
17735#else
19650fd6
AS
17736char (*f) () = hes_getmailhost;
17737#endif
17738#ifdef __cplusplus
17739}
cd958eb3
MB
17740#endif
17741
19650fd6
AS
17742int
17743main ()
17744{
17745return f != hes_getmailhost;
84e70f78
KR
17746 ;
17747 return 0;
17748}
17749_ACEOF
17750rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17751if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 17752 (eval $ac_link) 2>conftest.er1
84e70f78 17753 ac_status=$?
35996d22
AS
17754 grep -v '^ *+' conftest.er1 >conftest.err
17755 rm -f conftest.er1
17756 cat conftest.err >&5
c0d27fcc 17757 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78 17758 (exit $ac_status); } &&
551ffc27
ST
17759 { ac_try='test -z "$ac_c_werror_flag"
17760 || test ! -s conftest.err'
35996d22
AS
17761 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17762 (eval $ac_try) 2>&5
17763 ac_status=$?
17764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17765 (exit $ac_status); }; } &&
17766 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17767 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
17768 (eval $ac_try) 2>&5
17769 ac_status=$?
c0d27fcc 17770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
17771 (exit $ac_status); }; }; then
17772 ac_cv_func_hes_getmailhost=yes
17773else
17774 echo "$as_me: failed program was:" >&5
19650fd6
AS
17775sed 's/^/| /' conftest.$ac_ext >&5
17776
84e70f78
KR
17777ac_cv_func_hes_getmailhost=no
17778fi
35996d22
AS
17779rm -f conftest.err conftest.$ac_objext \
17780 conftest$ac_exeext conftest.$ac_ext
84e70f78 17781fi
c0d27fcc 17782echo "$as_me:$LINENO: result: $ac_cv_func_hes_getmailhost" >&5
84e70f78
KR
17783echo "${ECHO_T}$ac_cv_func_hes_getmailhost" >&6
17784if test $ac_cv_func_hes_getmailhost = yes; then
17785 :
17786else
c0d27fcc 17787 echo "$as_me:$LINENO: checking for hes_getmailhost in -lhesiod" >&5
84e70f78
KR
17788echo $ECHO_N "checking for hes_getmailhost in -lhesiod... $ECHO_C" >&6
17789if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then
17790 echo $ECHO_N "(cached) $ECHO_C" >&6
17791else
17792 ac_check_lib_save_LIBS=$LIBS
17793LIBS="-lhesiod $RESOLVLIB $LIBS"
17794cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17795/* confdefs.h. */
17796_ACEOF
17797cat confdefs.h >>conftest.$ac_ext
17798cat >>conftest.$ac_ext <<_ACEOF
17799/* end confdefs.h. */
84e70f78
KR
17800
17801/* Override any gcc2 internal prototype to avoid an error. */
17802#ifdef __cplusplus
17803extern "C"
17804#endif
17805/* We use char because int might match the return type of a gcc2
17806 builtin and then its argument prototype would still apply. */
17807char hes_getmailhost ();
17808int
17809main ()
17810{
17811hes_getmailhost ();
17812 ;
17813 return 0;
17814}
17815_ACEOF
17816rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17817if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 17818 (eval $ac_link) 2>conftest.er1
84e70f78 17819 ac_status=$?
35996d22
AS
17820 grep -v '^ *+' conftest.er1 >conftest.err
17821 rm -f conftest.er1
17822 cat conftest.err >&5
c0d27fcc 17823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78 17824 (exit $ac_status); } &&
551ffc27
ST
17825 { ac_try='test -z "$ac_c_werror_flag"
17826 || test ! -s conftest.err'
35996d22
AS
17827 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17828 (eval $ac_try) 2>&5
17829 ac_status=$?
17830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17831 (exit $ac_status); }; } &&
17832 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17833 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
84e70f78
KR
17834 (eval $ac_try) 2>&5
17835 ac_status=$?
c0d27fcc 17836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
84e70f78
KR
17837 (exit $ac_status); }; }; then
17838 ac_cv_lib_hesiod_hes_getmailhost=yes
17839else
17840 echo "$as_me: failed program was:" >&5
19650fd6
AS
17841sed 's/^/| /' conftest.$ac_ext >&5
17842
84e70f78
KR
17843ac_cv_lib_hesiod_hes_getmailhost=no
17844fi
35996d22
AS
17845rm -f conftest.err conftest.$ac_objext \
17846 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
17847LIBS=$ac_check_lib_save_LIBS
17848fi
c0d27fcc 17849echo "$as_me:$LINENO: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5
84e70f78
KR
17850echo "${ECHO_T}$ac_cv_lib_hesiod_hes_getmailhost" >&6
17851if test $ac_cv_lib_hesiod_hes_getmailhost = yes; then
b936fae4 17852
c0d27fcc 17853cat >>confdefs.h <<\_ACEOF
84e70f78 17854#define HAVE_LIBHESIOD 1
c0d27fcc 17855_ACEOF
84e70f78
KR
17856
17857else
17858 :
17859fi
17860
17861fi
17862
17863fi
17864
a21616bd
KR
17865# These tell us which Kerberos-related libraries to use.
17866if test "${with_kerberos+set}" = set; then
503d2be0 17867
c0d27fcc 17868echo "$as_me:$LINENO: checking for com_err in -lcom_err" >&5
503d2be0
AS
17869echo $ECHO_N "checking for com_err in -lcom_err... $ECHO_C" >&6
17870if test "${ac_cv_lib_com_err_com_err+set}" = set; then
17871 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 17872else
503d2be0 17873 ac_check_lib_save_LIBS=$LIBS
a21616bd 17874LIBS="-lcom_err $LIBS"
503d2be0 17875cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17876/* confdefs.h. */
17877_ACEOF
17878cat confdefs.h >>conftest.$ac_ext
17879cat >>conftest.$ac_ext <<_ACEOF
17880/* end confdefs.h. */
503d2be0 17881
a21616bd 17882/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
17883#ifdef __cplusplus
17884extern "C"
17885#endif
a21616bd 17886/* We use char because int might match the return type of a gcc2
503d2be0
AS
17887 builtin and then its argument prototype would still apply. */
17888char com_err ();
17889int
17890main ()
17891{
17892com_err ();
17893 ;
17894 return 0;
17895}
17896_ACEOF
17897rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17898if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 17899 (eval $ac_link) 2>conftest.er1
503d2be0 17900 ac_status=$?
35996d22
AS
17901 grep -v '^ *+' conftest.er1 >conftest.err
17902 rm -f conftest.er1
17903 cat conftest.err >&5
c0d27fcc 17904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 17905 (exit $ac_status); } &&
551ffc27
ST
17906 { ac_try='test -z "$ac_c_werror_flag"
17907 || test ! -s conftest.err'
35996d22
AS
17908 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17909 (eval $ac_try) 2>&5
17910 ac_status=$?
17911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17912 (exit $ac_status); }; } &&
17913 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17914 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
17915 (eval $ac_try) 2>&5
17916 ac_status=$?
c0d27fcc 17917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
17918 (exit $ac_status); }; }; then
17919 ac_cv_lib_com_err_com_err=yes
17920else
17921 echo "$as_me: failed program was:" >&5
19650fd6
AS
17922sed 's/^/| /' conftest.$ac_ext >&5
17923
503d2be0
AS
17924ac_cv_lib_com_err_com_err=no
17925fi
35996d22
AS
17926rm -f conftest.err conftest.$ac_objext \
17927 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
17928LIBS=$ac_check_lib_save_LIBS
17929fi
c0d27fcc 17930echo "$as_me:$LINENO: result: $ac_cv_lib_com_err_com_err" >&5
503d2be0
AS
17931echo "${ECHO_T}$ac_cv_lib_com_err_com_err" >&6
17932if test $ac_cv_lib_com_err_com_err = yes; then
c0d27fcc 17933 cat >>confdefs.h <<_ACEOF
503d2be0 17934#define HAVE_LIBCOM_ERR 1
c0d27fcc 17935_ACEOF
a21616bd
KR
17936
17937 LIBS="-lcom_err $LIBS"
17938
a21616bd
KR
17939fi
17940
c0d27fcc
MR
17941
17942echo "$as_me:$LINENO: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
503d2be0
AS
17943echo $ECHO_N "checking for mit_des_cbc_encrypt in -lk5crypto... $ECHO_C" >&6
17944if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then
17945 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 17946else
503d2be0 17947 ac_check_lib_save_LIBS=$LIBS
a21616bd 17948LIBS="-lk5crypto $LIBS"
503d2be0 17949cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17950/* confdefs.h. */
17951_ACEOF
17952cat confdefs.h >>conftest.$ac_ext
17953cat >>conftest.$ac_ext <<_ACEOF
17954/* end confdefs.h. */
503d2be0 17955
a21616bd 17956/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
17957#ifdef __cplusplus
17958extern "C"
17959#endif
a21616bd 17960/* We use char because int might match the return type of a gcc2
503d2be0
AS
17961 builtin and then its argument prototype would still apply. */
17962char mit_des_cbc_encrypt ();
17963int
17964main ()
17965{
17966mit_des_cbc_encrypt ();
17967 ;
17968 return 0;
17969}
17970_ACEOF
17971rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 17972if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 17973 (eval $ac_link) 2>conftest.er1
503d2be0 17974 ac_status=$?
35996d22
AS
17975 grep -v '^ *+' conftest.er1 >conftest.err
17976 rm -f conftest.er1
17977 cat conftest.err >&5
c0d27fcc 17978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 17979 (exit $ac_status); } &&
551ffc27
ST
17980 { ac_try='test -z "$ac_c_werror_flag"
17981 || test ! -s conftest.err'
35996d22
AS
17982 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17983 (eval $ac_try) 2>&5
17984 ac_status=$?
17985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17986 (exit $ac_status); }; } &&
17987 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 17988 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
17989 (eval $ac_try) 2>&5
17990 ac_status=$?
c0d27fcc 17991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
17992 (exit $ac_status); }; }; then
17993 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes
17994else
17995 echo "$as_me: failed program was:" >&5
19650fd6
AS
17996sed 's/^/| /' conftest.$ac_ext >&5
17997
503d2be0
AS
17998ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no
17999fi
35996d22
AS
18000rm -f conftest.err conftest.$ac_objext \
18001 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
18002LIBS=$ac_check_lib_save_LIBS
18003fi
c0d27fcc 18004echo "$as_me:$LINENO: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5
503d2be0
AS
18005echo "${ECHO_T}$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6
18006if test $ac_cv_lib_k5crypto_mit_des_cbc_encrypt = yes; then
c0d27fcc 18007 cat >>confdefs.h <<_ACEOF
503d2be0 18008#define HAVE_LIBK5CRYPTO 1
c0d27fcc 18009_ACEOF
a21616bd
KR
18010
18011 LIBS="-lk5crypto $LIBS"
18012
a21616bd
KR
18013fi
18014
c0d27fcc
MR
18015
18016echo "$as_me:$LINENO: checking for mit_des_cbc_encrypt in -lcrypto" >&5
503d2be0
AS
18017echo $ECHO_N "checking for mit_des_cbc_encrypt in -lcrypto... $ECHO_C" >&6
18018if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then
18019 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 18020else
503d2be0 18021 ac_check_lib_save_LIBS=$LIBS
a21616bd 18022LIBS="-lcrypto $LIBS"
503d2be0 18023cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18024/* confdefs.h. */
18025_ACEOF
18026cat confdefs.h >>conftest.$ac_ext
18027cat >>conftest.$ac_ext <<_ACEOF
18028/* end confdefs.h. */
503d2be0 18029
a21616bd 18030/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
18031#ifdef __cplusplus
18032extern "C"
18033#endif
a21616bd 18034/* We use char because int might match the return type of a gcc2
503d2be0
AS
18035 builtin and then its argument prototype would still apply. */
18036char mit_des_cbc_encrypt ();
18037int
18038main ()
18039{
18040mit_des_cbc_encrypt ();
18041 ;
18042 return 0;
18043}
18044_ACEOF
18045rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18046if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 18047 (eval $ac_link) 2>conftest.er1
503d2be0 18048 ac_status=$?
35996d22
AS
18049 grep -v '^ *+' conftest.er1 >conftest.err
18050 rm -f conftest.er1
18051 cat conftest.err >&5
c0d27fcc 18052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 18053 (exit $ac_status); } &&
551ffc27
ST
18054 { ac_try='test -z "$ac_c_werror_flag"
18055 || test ! -s conftest.err'
35996d22
AS
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); }; } &&
18061 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18062 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
18063 (eval $ac_try) 2>&5
18064 ac_status=$?
c0d27fcc 18065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18066 (exit $ac_status); }; }; then
18067 ac_cv_lib_crypto_mit_des_cbc_encrypt=yes
18068else
18069 echo "$as_me: failed program was:" >&5
19650fd6
AS
18070sed 's/^/| /' conftest.$ac_ext >&5
18071
503d2be0
AS
18072ac_cv_lib_crypto_mit_des_cbc_encrypt=no
18073fi
35996d22
AS
18074rm -f conftest.err conftest.$ac_objext \
18075 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
18076LIBS=$ac_check_lib_save_LIBS
18077fi
c0d27fcc 18078echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5
503d2be0
AS
18079echo "${ECHO_T}$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6
18080if test $ac_cv_lib_crypto_mit_des_cbc_encrypt = yes; then
c0d27fcc 18081 cat >>confdefs.h <<_ACEOF
503d2be0 18082#define HAVE_LIBCRYPTO 1
c0d27fcc 18083_ACEOF
a21616bd
KR
18084
18085 LIBS="-lcrypto $LIBS"
18086
a21616bd
KR
18087fi
18088
c0d27fcc
MR
18089
18090echo "$as_me:$LINENO: checking for krb5_init_context in -lkrb5" >&5
503d2be0
AS
18091echo $ECHO_N "checking for krb5_init_context in -lkrb5... $ECHO_C" >&6
18092if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then
18093 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 18094else
503d2be0 18095 ac_check_lib_save_LIBS=$LIBS
a21616bd 18096LIBS="-lkrb5 $LIBS"
503d2be0 18097cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18098/* confdefs.h. */
18099_ACEOF
18100cat confdefs.h >>conftest.$ac_ext
18101cat >>conftest.$ac_ext <<_ACEOF
18102/* end confdefs.h. */
a21616bd 18103
503d2be0
AS
18104/* Override any gcc2 internal prototype to avoid an error. */
18105#ifdef __cplusplus
18106extern "C"
18107#endif
18108/* We use char because int might match the return type of a gcc2
18109 builtin and then its argument prototype would still apply. */
18110char krb5_init_context ();
18111int
18112main ()
18113{
18114krb5_init_context ();
18115 ;
18116 return 0;
18117}
18118_ACEOF
18119rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18120if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 18121 (eval $ac_link) 2>conftest.er1
503d2be0 18122 ac_status=$?
35996d22
AS
18123 grep -v '^ *+' conftest.er1 >conftest.err
18124 rm -f conftest.er1
18125 cat conftest.err >&5
c0d27fcc 18126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 18127 (exit $ac_status); } &&
551ffc27
ST
18128 { ac_try='test -z "$ac_c_werror_flag"
18129 || test ! -s conftest.err'
35996d22
AS
18130 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18131 (eval $ac_try) 2>&5
18132 ac_status=$?
18133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18134 (exit $ac_status); }; } &&
18135 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18136 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
18137 (eval $ac_try) 2>&5
18138 ac_status=$?
c0d27fcc 18139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18140 (exit $ac_status); }; }; then
18141 ac_cv_lib_krb5_krb5_init_context=yes
18142else
18143 echo "$as_me: failed program was:" >&5
19650fd6
AS
18144sed 's/^/| /' conftest.$ac_ext >&5
18145
503d2be0
AS
18146ac_cv_lib_krb5_krb5_init_context=no
18147fi
35996d22
AS
18148rm -f conftest.err conftest.$ac_objext \
18149 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
18150LIBS=$ac_check_lib_save_LIBS
18151fi
c0d27fcc 18152echo "$as_me:$LINENO: result: $ac_cv_lib_krb5_krb5_init_context" >&5
503d2be0
AS
18153echo "${ECHO_T}$ac_cv_lib_krb5_krb5_init_context" >&6
18154if test $ac_cv_lib_krb5_krb5_init_context = yes; then
c0d27fcc 18155 cat >>confdefs.h <<_ACEOF
503d2be0 18156#define HAVE_LIBKRB5 1
c0d27fcc 18157_ACEOF
a21616bd
KR
18158
18159 LIBS="-lkrb5 $LIBS"
18160
a21616bd
KR
18161fi
18162
18163 if test "${with_kerberos5+set}" != set; then
503d2be0 18164
c0d27fcc 18165echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes425" >&5
503d2be0
AS
18166echo $ECHO_N "checking for des_cbc_encrypt in -ldes425... $ECHO_C" >&6
18167if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then
18168 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 18169else
503d2be0 18170 ac_check_lib_save_LIBS=$LIBS
a21616bd 18171LIBS="-ldes425 $LIBS"
503d2be0 18172cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18173/* confdefs.h. */
18174_ACEOF
18175cat confdefs.h >>conftest.$ac_ext
18176cat >>conftest.$ac_ext <<_ACEOF
18177/* end confdefs.h. */
503d2be0 18178
a21616bd 18179/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
18180#ifdef __cplusplus
18181extern "C"
18182#endif
a21616bd 18183/* We use char because int might match the return type of a gcc2
503d2be0
AS
18184 builtin and then its argument prototype would still apply. */
18185char des_cbc_encrypt ();
18186int
18187main ()
18188{
18189des_cbc_encrypt ();
18190 ;
18191 return 0;
18192}
18193_ACEOF
18194rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18195if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 18196 (eval $ac_link) 2>conftest.er1
503d2be0 18197 ac_status=$?
35996d22
AS
18198 grep -v '^ *+' conftest.er1 >conftest.err
18199 rm -f conftest.er1
18200 cat conftest.err >&5
c0d27fcc 18201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 18202 (exit $ac_status); } &&
551ffc27
ST
18203 { ac_try='test -z "$ac_c_werror_flag"
18204 || test ! -s conftest.err'
35996d22
AS
18205 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18206 (eval $ac_try) 2>&5
18207 ac_status=$?
18208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18209 (exit $ac_status); }; } &&
18210 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18211 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
18212 (eval $ac_try) 2>&5
18213 ac_status=$?
c0d27fcc 18214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18215 (exit $ac_status); }; }; then
18216 ac_cv_lib_des425_des_cbc_encrypt=yes
18217else
18218 echo "$as_me: failed program was:" >&5
19650fd6
AS
18219sed 's/^/| /' conftest.$ac_ext >&5
18220
503d2be0
AS
18221ac_cv_lib_des425_des_cbc_encrypt=no
18222fi
35996d22
AS
18223rm -f conftest.err conftest.$ac_objext \
18224 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
18225LIBS=$ac_check_lib_save_LIBS
18226fi
c0d27fcc 18227echo "$as_me:$LINENO: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
503d2be0
AS
18228echo "${ECHO_T}$ac_cv_lib_des425_des_cbc_encrypt" >&6
18229if test $ac_cv_lib_des425_des_cbc_encrypt = yes; then
c0d27fcc 18230 cat >>confdefs.h <<_ACEOF
503d2be0 18231#define HAVE_LIBDES425 1
c0d27fcc 18232_ACEOF
a21616bd
KR
18233
18234 LIBS="-ldes425 $LIBS"
18235
18236else
503d2be0 18237
c0d27fcc 18238echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes" >&5
503d2be0
AS
18239echo $ECHO_N "checking for des_cbc_encrypt in -ldes... $ECHO_C" >&6
18240if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then
18241 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 18242else
503d2be0 18243 ac_check_lib_save_LIBS=$LIBS
a21616bd 18244LIBS="-ldes $LIBS"
503d2be0 18245cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18246/* confdefs.h. */
18247_ACEOF
18248cat confdefs.h >>conftest.$ac_ext
18249cat >>conftest.$ac_ext <<_ACEOF
18250/* end confdefs.h. */
503d2be0 18251
a21616bd 18252/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
18253#ifdef __cplusplus
18254extern "C"
18255#endif
a21616bd 18256/* We use char because int might match the return type of a gcc2
503d2be0
AS
18257 builtin and then its argument prototype would still apply. */
18258char des_cbc_encrypt ();
18259int
18260main ()
18261{
18262des_cbc_encrypt ();
18263 ;
18264 return 0;
18265}
18266_ACEOF
18267rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18268if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 18269 (eval $ac_link) 2>conftest.er1
503d2be0 18270 ac_status=$?
35996d22
AS
18271 grep -v '^ *+' conftest.er1 >conftest.err
18272 rm -f conftest.er1
18273 cat conftest.err >&5
c0d27fcc 18274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 18275 (exit $ac_status); } &&
551ffc27
ST
18276 { ac_try='test -z "$ac_c_werror_flag"
18277 || test ! -s conftest.err'
35996d22
AS
18278 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18279 (eval $ac_try) 2>&5
18280 ac_status=$?
18281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18282 (exit $ac_status); }; } &&
18283 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18284 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
18285 (eval $ac_try) 2>&5
18286 ac_status=$?
c0d27fcc 18287 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18288 (exit $ac_status); }; }; then
18289 ac_cv_lib_des_des_cbc_encrypt=yes
18290else
18291 echo "$as_me: failed program was:" >&5
19650fd6
AS
18292sed 's/^/| /' conftest.$ac_ext >&5
18293
503d2be0
AS
18294ac_cv_lib_des_des_cbc_encrypt=no
18295fi
35996d22
AS
18296rm -f conftest.err conftest.$ac_objext \
18297 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
18298LIBS=$ac_check_lib_save_LIBS
18299fi
c0d27fcc 18300echo "$as_me:$LINENO: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
503d2be0
AS
18301echo "${ECHO_T}$ac_cv_lib_des_des_cbc_encrypt" >&6
18302if test $ac_cv_lib_des_des_cbc_encrypt = yes; then
c0d27fcc 18303 cat >>confdefs.h <<_ACEOF
503d2be0 18304#define HAVE_LIBDES 1
c0d27fcc 18305_ACEOF
a21616bd
KR
18306
18307 LIBS="-ldes $LIBS"
18308
a21616bd
KR
18309fi
18310
18311fi
18312
c0d27fcc
MR
18313
18314echo "$as_me:$LINENO: checking for krb_get_cred in -lkrb4" >&5
503d2be0
AS
18315echo $ECHO_N "checking for krb_get_cred in -lkrb4... $ECHO_C" >&6
18316if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then
18317 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 18318else
503d2be0 18319 ac_check_lib_save_LIBS=$LIBS
a21616bd 18320LIBS="-lkrb4 $LIBS"
503d2be0 18321cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18322/* confdefs.h. */
18323_ACEOF
18324cat confdefs.h >>conftest.$ac_ext
18325cat >>conftest.$ac_ext <<_ACEOF
18326/* end confdefs.h. */
503d2be0 18327
a21616bd 18328/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
18329#ifdef __cplusplus
18330extern "C"
18331#endif
a21616bd 18332/* We use char because int might match the return type of a gcc2
503d2be0
AS
18333 builtin and then its argument prototype would still apply. */
18334char krb_get_cred ();
18335int
18336main ()
18337{
18338krb_get_cred ();
18339 ;
18340 return 0;
18341}
18342_ACEOF
18343rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18344if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 18345 (eval $ac_link) 2>conftest.er1
503d2be0 18346 ac_status=$?
35996d22
AS
18347 grep -v '^ *+' conftest.er1 >conftest.err
18348 rm -f conftest.er1
18349 cat conftest.err >&5
c0d27fcc 18350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 18351 (exit $ac_status); } &&
551ffc27
ST
18352 { ac_try='test -z "$ac_c_werror_flag"
18353 || test ! -s conftest.err'
35996d22
AS
18354 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18355 (eval $ac_try) 2>&5
18356 ac_status=$?
18357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18358 (exit $ac_status); }; } &&
18359 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18360 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
18361 (eval $ac_try) 2>&5
18362 ac_status=$?
c0d27fcc 18363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18364 (exit $ac_status); }; }; then
18365 ac_cv_lib_krb4_krb_get_cred=yes
18366else
18367 echo "$as_me: failed program was:" >&5
19650fd6
AS
18368sed 's/^/| /' conftest.$ac_ext >&5
18369
503d2be0
AS
18370ac_cv_lib_krb4_krb_get_cred=no
18371fi
35996d22
AS
18372rm -f conftest.err conftest.$ac_objext \
18373 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
18374LIBS=$ac_check_lib_save_LIBS
18375fi
c0d27fcc 18376echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_krb_get_cred" >&5
503d2be0
AS
18377echo "${ECHO_T}$ac_cv_lib_krb4_krb_get_cred" >&6
18378if test $ac_cv_lib_krb4_krb_get_cred = yes; then
c0d27fcc 18379 cat >>confdefs.h <<_ACEOF
503d2be0 18380#define HAVE_LIBKRB4 1
c0d27fcc 18381_ACEOF
a21616bd
KR
18382
18383 LIBS="-lkrb4 $LIBS"
18384
18385else
503d2be0 18386
c0d27fcc 18387echo "$as_me:$LINENO: checking for krb_get_cred in -lkrb" >&5
503d2be0
AS
18388echo $ECHO_N "checking for krb_get_cred in -lkrb... $ECHO_C" >&6
18389if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then
18390 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 18391else
503d2be0 18392 ac_check_lib_save_LIBS=$LIBS
a21616bd 18393LIBS="-lkrb $LIBS"
503d2be0 18394cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18395/* confdefs.h. */
18396_ACEOF
18397cat confdefs.h >>conftest.$ac_ext
18398cat >>conftest.$ac_ext <<_ACEOF
18399/* end confdefs.h. */
503d2be0 18400
a21616bd 18401/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
18402#ifdef __cplusplus
18403extern "C"
18404#endif
a21616bd 18405/* We use char because int might match the return type of a gcc2
503d2be0
AS
18406 builtin and then its argument prototype would still apply. */
18407char krb_get_cred ();
18408int
18409main ()
18410{
18411krb_get_cred ();
18412 ;
18413 return 0;
18414}
18415_ACEOF
18416rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 18417if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 18418 (eval $ac_link) 2>conftest.er1
503d2be0 18419 ac_status=$?
35996d22
AS
18420 grep -v '^ *+' conftest.er1 >conftest.err
18421 rm -f conftest.er1
18422 cat conftest.err >&5
c0d27fcc 18423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 18424 (exit $ac_status); } &&
551ffc27
ST
18425 { ac_try='test -z "$ac_c_werror_flag"
18426 || test ! -s conftest.err'
35996d22
AS
18427 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18428 (eval $ac_try) 2>&5
18429 ac_status=$?
18430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18431 (exit $ac_status); }; } &&
18432 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 18433 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
18434 (eval $ac_try) 2>&5
18435 ac_status=$?
c0d27fcc 18436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18437 (exit $ac_status); }; }; then
18438 ac_cv_lib_krb_krb_get_cred=yes
18439else
18440 echo "$as_me: failed program was:" >&5
19650fd6
AS
18441sed 's/^/| /' conftest.$ac_ext >&5
18442
503d2be0
AS
18443ac_cv_lib_krb_krb_get_cred=no
18444fi
35996d22
AS
18445rm -f conftest.err conftest.$ac_objext \
18446 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
18447LIBS=$ac_check_lib_save_LIBS
18448fi
c0d27fcc 18449echo "$as_me:$LINENO: result: $ac_cv_lib_krb_krb_get_cred" >&5
503d2be0
AS
18450echo "${ECHO_T}$ac_cv_lib_krb_krb_get_cred" >&6
18451if test $ac_cv_lib_krb_krb_get_cred = yes; then
c0d27fcc 18452 cat >>confdefs.h <<_ACEOF
503d2be0 18453#define HAVE_LIBKRB 1
c0d27fcc 18454_ACEOF
a21616bd
KR
18455
18456 LIBS="-lkrb $LIBS"
18457
a21616bd
KR
18458fi
18459
18460fi
18461
18462 fi
18463
18464 if test "${with_kerberos5+set}" = set; then
503d2be0
AS
18465
18466for ac_header in krb5.h
a21616bd 18467do
503d2be0 18468as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
18469if eval "test \"\${$as_ac_Header+set}\" = set"; then
18470 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
18471echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18472if eval "test \"\${$as_ac_Header+set}\" = set"; then
18473 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
18474fi
18475echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18476echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 18477else
c0d27fcc
MR
18478 # Is the header compilable?
18479echo "$as_me:$LINENO: checking $ac_header usability" >&5
18480echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
18481cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18482/* confdefs.h. */
18483_ACEOF
18484cat confdefs.h >>conftest.$ac_ext
18485cat >>conftest.$ac_ext <<_ACEOF
18486/* end confdefs.h. */
c0d27fcc
MR
18487$ac_includes_default
18488#include <$ac_header>
18489_ACEOF
18490rm -f conftest.$ac_objext
18491if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 18492 (eval $ac_compile) 2>conftest.er1
c0d27fcc 18493 ac_status=$?
35996d22
AS
18494 grep -v '^ *+' conftest.er1 >conftest.err
18495 rm -f conftest.er1
18496 cat conftest.err >&5
c0d27fcc
MR
18497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18498 (exit $ac_status); } &&
551ffc27
ST
18499 { ac_try='test -z "$ac_c_werror_flag"
18500 || test ! -s conftest.err'
35996d22
AS
18501 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18502 (eval $ac_try) 2>&5
18503 ac_status=$?
18504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18505 (exit $ac_status); }; } &&
18506 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
18507 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18508 (eval $ac_try) 2>&5
18509 ac_status=$?
18510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18511 (exit $ac_status); }; }; then
18512 ac_header_compiler=yes
18513else
18514 echo "$as_me: failed program was:" >&5
19650fd6
AS
18515sed 's/^/| /' conftest.$ac_ext >&5
18516
c0d27fcc
MR
18517ac_header_compiler=no
18518fi
35996d22 18519rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
18520echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18521echo "${ECHO_T}$ac_header_compiler" >&6
18522
18523# Is the header present?
18524echo "$as_me:$LINENO: checking $ac_header presence" >&5
18525echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
18526cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18527/* confdefs.h. */
18528_ACEOF
18529cat confdefs.h >>conftest.$ac_ext
18530cat >>conftest.$ac_ext <<_ACEOF
18531/* end confdefs.h. */
503d2be0
AS
18532#include <$ac_header>
18533_ACEOF
c0d27fcc 18534if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
18535 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18536 ac_status=$?
6bae0ccf 18537 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
18538 rm -f conftest.er1
18539 cat conftest.err >&5
c0d27fcc 18540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18541 (exit $ac_status); } >/dev/null; then
18542 if test -s conftest.err; then
18543 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 18544 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
18545 else
18546 ac_cpp_err=
18547 fi
18548else
18549 ac_cpp_err=yes
18550fi
18551if test -z "$ac_cpp_err"; then
c0d27fcc 18552 ac_header_preproc=yes
503d2be0
AS
18553else
18554 echo "$as_me: failed program was:" >&5
19650fd6
AS
18555sed 's/^/| /' conftest.$ac_ext >&5
18556
c0d27fcc 18557 ac_header_preproc=no
a21616bd 18558fi
503d2be0 18559rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
18560echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18561echo "${ECHO_T}$ac_header_preproc" >&6
18562
18563# So? What about this header?
35996d22
AS
18564case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18565 yes:no: )
c0d27fcc
MR
18566 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18567echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
18568 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18569echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18570 ac_header_preproc=yes
19650fd6 18571 ;;
35996d22 18572 no:yes:* )
c0d27fcc
MR
18573 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18574echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
18575 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
18576echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
18577 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18578echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18579 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
18580echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 18581 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 18582echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
18583 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18584echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
18585 (
18586 cat <<\_ASBOX
35996d22
AS
18587## ------------------------------------------ ##
18588## Report this to the AC_PACKAGE_NAME lists. ##
18589## ------------------------------------------ ##
19650fd6
AS
18590_ASBOX
18591 ) |
18592 sed "s/^/$as_me: WARNING: /" >&2
18593 ;;
c0d27fcc
MR
18594esac
18595echo "$as_me:$LINENO: checking for $ac_header" >&5
18596echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18597if eval "test \"\${$as_ac_Header+set}\" = set"; then
18598 echo $ECHO_N "(cached) $ECHO_C" >&6
18599else
35996d22 18600 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 18601fi
c0d27fcc 18602echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 18603echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
18604
18605fi
503d2be0 18606if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 18607 cat >>confdefs.h <<_ACEOF
503d2be0 18608#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 18609_ACEOF
503d2be0 18610
a21616bd 18611fi
c0d27fcc 18612
a21616bd
KR
18613done
18614
18615 else
503d2be0
AS
18616
18617for ac_header in des.h
a21616bd 18618do
503d2be0 18619as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
18620if eval "test \"\${$as_ac_Header+set}\" = set"; then
18621 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
18622echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18623if eval "test \"\${$as_ac_Header+set}\" = set"; then
18624 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
18625fi
18626echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18627echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 18628else
c0d27fcc
MR
18629 # Is the header compilable?
18630echo "$as_me:$LINENO: checking $ac_header usability" >&5
18631echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
18632cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18633/* confdefs.h. */
18634_ACEOF
18635cat confdefs.h >>conftest.$ac_ext
18636cat >>conftest.$ac_ext <<_ACEOF
18637/* end confdefs.h. */
c0d27fcc
MR
18638$ac_includes_default
18639#include <$ac_header>
18640_ACEOF
18641rm -f conftest.$ac_objext
18642if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 18643 (eval $ac_compile) 2>conftest.er1
c0d27fcc 18644 ac_status=$?
35996d22
AS
18645 grep -v '^ *+' conftest.er1 >conftest.err
18646 rm -f conftest.er1
18647 cat conftest.err >&5
c0d27fcc
MR
18648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18649 (exit $ac_status); } &&
551ffc27
ST
18650 { ac_try='test -z "$ac_c_werror_flag"
18651 || test ! -s conftest.err'
35996d22
AS
18652 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18653 (eval $ac_try) 2>&5
18654 ac_status=$?
18655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18656 (exit $ac_status); }; } &&
18657 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
18658 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18659 (eval $ac_try) 2>&5
18660 ac_status=$?
18661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18662 (exit $ac_status); }; }; then
18663 ac_header_compiler=yes
18664else
18665 echo "$as_me: failed program was:" >&5
19650fd6
AS
18666sed 's/^/| /' conftest.$ac_ext >&5
18667
c0d27fcc
MR
18668ac_header_compiler=no
18669fi
35996d22 18670rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
18671echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18672echo "${ECHO_T}$ac_header_compiler" >&6
18673
18674# Is the header present?
18675echo "$as_me:$LINENO: checking $ac_header presence" >&5
18676echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
18677cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18678/* confdefs.h. */
18679_ACEOF
18680cat confdefs.h >>conftest.$ac_ext
18681cat >>conftest.$ac_ext <<_ACEOF
18682/* end confdefs.h. */
503d2be0
AS
18683#include <$ac_header>
18684_ACEOF
c0d27fcc 18685if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
18686 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18687 ac_status=$?
6bae0ccf 18688 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
18689 rm -f conftest.er1
18690 cat conftest.err >&5
c0d27fcc 18691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18692 (exit $ac_status); } >/dev/null; then
18693 if test -s conftest.err; then
18694 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 18695 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
18696 else
18697 ac_cpp_err=
18698 fi
18699else
18700 ac_cpp_err=yes
18701fi
18702if test -z "$ac_cpp_err"; then
c0d27fcc 18703 ac_header_preproc=yes
503d2be0
AS
18704else
18705 echo "$as_me: failed program was:" >&5
19650fd6
AS
18706sed 's/^/| /' conftest.$ac_ext >&5
18707
c0d27fcc 18708 ac_header_preproc=no
a21616bd 18709fi
503d2be0 18710rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
18711echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18712echo "${ECHO_T}$ac_header_preproc" >&6
18713
18714# So? What about this header?
35996d22
AS
18715case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18716 yes:no: )
c0d27fcc
MR
18717 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18718echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
18719 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18720echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18721 ac_header_preproc=yes
19650fd6 18722 ;;
35996d22 18723 no:yes:* )
c0d27fcc
MR
18724 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18725echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
18726 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
18727echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
18728 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18729echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18730 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
18731echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 18732 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 18733echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
18734 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18735echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
18736 (
18737 cat <<\_ASBOX
35996d22
AS
18738## ------------------------------------------ ##
18739## Report this to the AC_PACKAGE_NAME lists. ##
18740## ------------------------------------------ ##
19650fd6
AS
18741_ASBOX
18742 ) |
18743 sed "s/^/$as_me: WARNING: /" >&2
18744 ;;
c0d27fcc
MR
18745esac
18746echo "$as_me:$LINENO: checking for $ac_header" >&5
18747echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18748if eval "test \"\${$as_ac_Header+set}\" = set"; then
18749 echo $ECHO_N "(cached) $ECHO_C" >&6
18750else
35996d22 18751 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 18752fi
c0d27fcc 18753echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 18754echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
18755
18756fi
503d2be0 18757if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 18758 cat >>confdefs.h <<_ACEOF
503d2be0 18759#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 18760_ACEOF
503d2be0 18761
a21616bd 18762else
503d2be0
AS
18763
18764for ac_header in kerberosIV/des.h
a21616bd 18765do
503d2be0 18766as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
18767if eval "test \"\${$as_ac_Header+set}\" = set"; then
18768 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
18769echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18770if eval "test \"\${$as_ac_Header+set}\" = set"; then
18771 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
18772fi
18773echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18774echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 18775else
c0d27fcc
MR
18776 # Is the header compilable?
18777echo "$as_me:$LINENO: checking $ac_header usability" >&5
18778echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
18779cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18780/* confdefs.h. */
18781_ACEOF
18782cat confdefs.h >>conftest.$ac_ext
18783cat >>conftest.$ac_ext <<_ACEOF
18784/* end confdefs.h. */
c0d27fcc
MR
18785$ac_includes_default
18786#include <$ac_header>
18787_ACEOF
18788rm -f conftest.$ac_objext
18789if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 18790 (eval $ac_compile) 2>conftest.er1
c0d27fcc 18791 ac_status=$?
35996d22
AS
18792 grep -v '^ *+' conftest.er1 >conftest.err
18793 rm -f conftest.er1
18794 cat conftest.err >&5
c0d27fcc
MR
18795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18796 (exit $ac_status); } &&
551ffc27
ST
18797 { ac_try='test -z "$ac_c_werror_flag"
18798 || test ! -s conftest.err'
35996d22
AS
18799 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18800 (eval $ac_try) 2>&5
18801 ac_status=$?
18802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18803 (exit $ac_status); }; } &&
18804 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
18805 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18806 (eval $ac_try) 2>&5
18807 ac_status=$?
18808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18809 (exit $ac_status); }; }; then
18810 ac_header_compiler=yes
18811else
18812 echo "$as_me: failed program was:" >&5
19650fd6
AS
18813sed 's/^/| /' conftest.$ac_ext >&5
18814
c0d27fcc
MR
18815ac_header_compiler=no
18816fi
35996d22 18817rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
18818echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18819echo "${ECHO_T}$ac_header_compiler" >&6
18820
18821# Is the header present?
18822echo "$as_me:$LINENO: checking $ac_header presence" >&5
18823echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
18824cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18825/* confdefs.h. */
18826_ACEOF
18827cat confdefs.h >>conftest.$ac_ext
18828cat >>conftest.$ac_ext <<_ACEOF
18829/* end confdefs.h. */
503d2be0
AS
18830#include <$ac_header>
18831_ACEOF
c0d27fcc 18832if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
18833 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18834 ac_status=$?
6bae0ccf 18835 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
18836 rm -f conftest.er1
18837 cat conftest.err >&5
c0d27fcc 18838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18839 (exit $ac_status); } >/dev/null; then
18840 if test -s conftest.err; then
18841 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 18842 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
18843 else
18844 ac_cpp_err=
18845 fi
18846else
18847 ac_cpp_err=yes
18848fi
18849if test -z "$ac_cpp_err"; then
c0d27fcc 18850 ac_header_preproc=yes
503d2be0
AS
18851else
18852 echo "$as_me: failed program was:" >&5
19650fd6
AS
18853sed 's/^/| /' conftest.$ac_ext >&5
18854
c0d27fcc 18855 ac_header_preproc=no
a21616bd 18856fi
503d2be0 18857rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
18858echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18859echo "${ECHO_T}$ac_header_preproc" >&6
18860
18861# So? What about this header?
35996d22
AS
18862case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18863 yes:no: )
c0d27fcc
MR
18864 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18865echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
18866 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18867echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18868 ac_header_preproc=yes
19650fd6 18869 ;;
35996d22 18870 no:yes:* )
c0d27fcc
MR
18871 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18872echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
18873 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
18874echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
18875 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18876echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18877 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
18878echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 18879 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 18880echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
18881 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18882echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
18883 (
18884 cat <<\_ASBOX
35996d22
AS
18885## ------------------------------------------ ##
18886## Report this to the AC_PACKAGE_NAME lists. ##
18887## ------------------------------------------ ##
19650fd6
AS
18888_ASBOX
18889 ) |
18890 sed "s/^/$as_me: WARNING: /" >&2
18891 ;;
c0d27fcc
MR
18892esac
18893echo "$as_me:$LINENO: checking for $ac_header" >&5
18894echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18895if eval "test \"\${$as_ac_Header+set}\" = set"; then
18896 echo $ECHO_N "(cached) $ECHO_C" >&6
18897else
35996d22 18898 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 18899fi
c0d27fcc 18900echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 18901echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
18902
18903fi
503d2be0 18904if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 18905 cat >>confdefs.h <<_ACEOF
503d2be0 18906#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 18907_ACEOF
503d2be0 18908
a21616bd 18909else
503d2be0
AS
18910
18911for ac_header in kerberos/des.h
a21616bd 18912do
503d2be0 18913as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
18914if eval "test \"\${$as_ac_Header+set}\" = set"; then
18915 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
18916echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18917if eval "test \"\${$as_ac_Header+set}\" = set"; then
18918 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
18919fi
18920echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18921echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 18922else
c0d27fcc
MR
18923 # Is the header compilable?
18924echo "$as_me:$LINENO: checking $ac_header usability" >&5
18925echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
18926cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18927/* confdefs.h. */
18928_ACEOF
18929cat confdefs.h >>conftest.$ac_ext
18930cat >>conftest.$ac_ext <<_ACEOF
18931/* end confdefs.h. */
c0d27fcc
MR
18932$ac_includes_default
18933#include <$ac_header>
18934_ACEOF
18935rm -f conftest.$ac_objext
18936if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 18937 (eval $ac_compile) 2>conftest.er1
c0d27fcc 18938 ac_status=$?
35996d22
AS
18939 grep -v '^ *+' conftest.er1 >conftest.err
18940 rm -f conftest.er1
18941 cat conftest.err >&5
c0d27fcc
MR
18942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18943 (exit $ac_status); } &&
551ffc27
ST
18944 { ac_try='test -z "$ac_c_werror_flag"
18945 || test ! -s conftest.err'
35996d22
AS
18946 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18947 (eval $ac_try) 2>&5
18948 ac_status=$?
18949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18950 (exit $ac_status); }; } &&
18951 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
18952 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18953 (eval $ac_try) 2>&5
18954 ac_status=$?
18955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18956 (exit $ac_status); }; }; then
18957 ac_header_compiler=yes
18958else
18959 echo "$as_me: failed program was:" >&5
19650fd6
AS
18960sed 's/^/| /' conftest.$ac_ext >&5
18961
c0d27fcc
MR
18962ac_header_compiler=no
18963fi
35996d22 18964rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
18965echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18966echo "${ECHO_T}$ac_header_compiler" >&6
18967
18968# Is the header present?
18969echo "$as_me:$LINENO: checking $ac_header presence" >&5
18970echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
18971cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18972/* confdefs.h. */
18973_ACEOF
18974cat confdefs.h >>conftest.$ac_ext
18975cat >>conftest.$ac_ext <<_ACEOF
18976/* end confdefs.h. */
503d2be0
AS
18977#include <$ac_header>
18978_ACEOF
c0d27fcc 18979if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
18980 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18981 ac_status=$?
6bae0ccf 18982 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
18983 rm -f conftest.er1
18984 cat conftest.err >&5
c0d27fcc 18985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
18986 (exit $ac_status); } >/dev/null; then
18987 if test -s conftest.err; then
18988 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 18989 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
18990 else
18991 ac_cpp_err=
18992 fi
18993else
18994 ac_cpp_err=yes
18995fi
18996if test -z "$ac_cpp_err"; then
c0d27fcc 18997 ac_header_preproc=yes
503d2be0
AS
18998else
18999 echo "$as_me: failed program was:" >&5
19650fd6
AS
19000sed 's/^/| /' conftest.$ac_ext >&5
19001
c0d27fcc 19002 ac_header_preproc=no
a21616bd 19003fi
503d2be0 19004rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
19005echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19006echo "${ECHO_T}$ac_header_preproc" >&6
19007
19008# So? What about this header?
35996d22
AS
19009case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19010 yes:no: )
c0d27fcc
MR
19011 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19012echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
19013 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
19014echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
19015 ac_header_preproc=yes
19650fd6 19016 ;;
35996d22 19017 no:yes:* )
c0d27fcc
MR
19018 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19019echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
19020 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
19021echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
19022 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19023echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19024 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
19025echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 19026 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 19027echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
19028 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
19029echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
19030 (
19031 cat <<\_ASBOX
35996d22
AS
19032## ------------------------------------------ ##
19033## Report this to the AC_PACKAGE_NAME lists. ##
19034## ------------------------------------------ ##
19650fd6
AS
19035_ASBOX
19036 ) |
19037 sed "s/^/$as_me: WARNING: /" >&2
19038 ;;
c0d27fcc
MR
19039esac
19040echo "$as_me:$LINENO: checking for $ac_header" >&5
19041echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19042if eval "test \"\${$as_ac_Header+set}\" = set"; then
19043 echo $ECHO_N "(cached) $ECHO_C" >&6
19044else
35996d22 19045 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 19046fi
c0d27fcc 19047echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 19048echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
19049
19050fi
503d2be0 19051if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 19052 cat >>confdefs.h <<_ACEOF
503d2be0 19053#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 19054_ACEOF
a21616bd
KR
19055
19056fi
c0d27fcc 19057
a21616bd
KR
19058done
19059
98418dba 19060fi
c0d27fcc 19061
925c2f3f
EZ
19062done
19063
98418dba 19064fi
c0d27fcc 19065
925c2f3f 19066done
98418dba 19067
c0d27fcc 19068
925c2f3f
EZ
19069for ac_header in krb.h
19070do
19071as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
19072if eval "test \"\${$as_ac_Header+set}\" = set"; then
19073 echo "$as_me:$LINENO: checking for $ac_header" >&5
925c2f3f
EZ
19074echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19075if eval "test \"\${$as_ac_Header+set}\" = set"; then
19076 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
19077fi
19078echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
19079echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19080else
19081 # Is the header compilable?
19082echo "$as_me:$LINENO: checking $ac_header usability" >&5
19083echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
19084cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19085/* confdefs.h. */
19086_ACEOF
19087cat confdefs.h >>conftest.$ac_ext
19088cat >>conftest.$ac_ext <<_ACEOF
19089/* end confdefs.h. */
c0d27fcc
MR
19090$ac_includes_default
19091#include <$ac_header>
19092_ACEOF
19093rm -f conftest.$ac_objext
19094if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 19095 (eval $ac_compile) 2>conftest.er1
c0d27fcc 19096 ac_status=$?
35996d22
AS
19097 grep -v '^ *+' conftest.er1 >conftest.err
19098 rm -f conftest.er1
19099 cat conftest.err >&5
c0d27fcc
MR
19100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19101 (exit $ac_status); } &&
551ffc27
ST
19102 { ac_try='test -z "$ac_c_werror_flag"
19103 || test ! -s conftest.err'
35996d22
AS
19104 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19105 (eval $ac_try) 2>&5
19106 ac_status=$?
19107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19108 (exit $ac_status); }; } &&
19109 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
19110 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19111 (eval $ac_try) 2>&5
19112 ac_status=$?
19113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19114 (exit $ac_status); }; }; then
19115 ac_header_compiler=yes
925c2f3f 19116else
c0d27fcc 19117 echo "$as_me: failed program was:" >&5
19650fd6
AS
19118sed 's/^/| /' conftest.$ac_ext >&5
19119
c0d27fcc
MR
19120ac_header_compiler=no
19121fi
35996d22 19122rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
19123echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19124echo "${ECHO_T}$ac_header_compiler" >&6
19125
19126# Is the header present?
19127echo "$as_me:$LINENO: checking $ac_header presence" >&5
19128echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
19129cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19130/* confdefs.h. */
19131_ACEOF
19132cat confdefs.h >>conftest.$ac_ext
19133cat >>conftest.$ac_ext <<_ACEOF
19134/* end confdefs.h. */
503d2be0
AS
19135#include <$ac_header>
19136_ACEOF
c0d27fcc 19137if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
19138 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19139 ac_status=$?
6bae0ccf 19140 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
19141 rm -f conftest.er1
19142 cat conftest.err >&5
c0d27fcc 19143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19144 (exit $ac_status); } >/dev/null; then
19145 if test -s conftest.err; then
19146 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 19147 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
19148 else
19149 ac_cpp_err=
19150 fi
19151else
19152 ac_cpp_err=yes
19153fi
19154if test -z "$ac_cpp_err"; then
c0d27fcc 19155 ac_header_preproc=yes
503d2be0
AS
19156else
19157 echo "$as_me: failed program was:" >&5
19650fd6
AS
19158sed 's/^/| /' conftest.$ac_ext >&5
19159
c0d27fcc 19160 ac_header_preproc=no
a21616bd 19161fi
503d2be0 19162rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
19163echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19164echo "${ECHO_T}$ac_header_preproc" >&6
19165
19166# So? What about this header?
35996d22
AS
19167case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19168 yes:no: )
c0d27fcc
MR
19169 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19170echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
19171 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
19172echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
19173 ac_header_preproc=yes
19650fd6 19174 ;;
35996d22 19175 no:yes:* )
c0d27fcc
MR
19176 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19177echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
19178 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
19179echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
19180 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19181echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19182 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
19183echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 19184 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 19185echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
19186 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
19187echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
19188 (
19189 cat <<\_ASBOX
35996d22
AS
19190## ------------------------------------------ ##
19191## Report this to the AC_PACKAGE_NAME lists. ##
19192## ------------------------------------------ ##
19650fd6
AS
19193_ASBOX
19194 ) |
19195 sed "s/^/$as_me: WARNING: /" >&2
19196 ;;
c0d27fcc
MR
19197esac
19198echo "$as_me:$LINENO: checking for $ac_header" >&5
19199echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19200if eval "test \"\${$as_ac_Header+set}\" = set"; then
19201 echo $ECHO_N "(cached) $ECHO_C" >&6
19202else
35996d22 19203 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 19204fi
c0d27fcc 19205echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 19206echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
19207
19208fi
503d2be0 19209if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 19210 cat >>confdefs.h <<_ACEOF
503d2be0 19211#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 19212_ACEOF
503d2be0 19213
a21616bd 19214else
503d2be0
AS
19215
19216for ac_header in kerberosIV/krb.h
a21616bd 19217do
503d2be0 19218as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
19219if eval "test \"\${$as_ac_Header+set}\" = set"; then
19220 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
19221echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19222if eval "test \"\${$as_ac_Header+set}\" = set"; then
19223 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
19224fi
19225echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
19226echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 19227else
c0d27fcc
MR
19228 # Is the header compilable?
19229echo "$as_me:$LINENO: checking $ac_header usability" >&5
19230echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
19231cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19232/* confdefs.h. */
19233_ACEOF
19234cat confdefs.h >>conftest.$ac_ext
19235cat >>conftest.$ac_ext <<_ACEOF
19236/* end confdefs.h. */
c0d27fcc
MR
19237$ac_includes_default
19238#include <$ac_header>
19239_ACEOF
19240rm -f conftest.$ac_objext
19241if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 19242 (eval $ac_compile) 2>conftest.er1
c0d27fcc 19243 ac_status=$?
35996d22
AS
19244 grep -v '^ *+' conftest.er1 >conftest.err
19245 rm -f conftest.er1
19246 cat conftest.err >&5
c0d27fcc
MR
19247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19248 (exit $ac_status); } &&
551ffc27
ST
19249 { ac_try='test -z "$ac_c_werror_flag"
19250 || test ! -s conftest.err'
35996d22
AS
19251 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19252 (eval $ac_try) 2>&5
19253 ac_status=$?
19254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19255 (exit $ac_status); }; } &&
19256 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
19257 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19258 (eval $ac_try) 2>&5
19259 ac_status=$?
19260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19261 (exit $ac_status); }; }; then
19262 ac_header_compiler=yes
19263else
19264 echo "$as_me: failed program was:" >&5
19650fd6
AS
19265sed 's/^/| /' conftest.$ac_ext >&5
19266
c0d27fcc
MR
19267ac_header_compiler=no
19268fi
35996d22 19269rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
19270echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19271echo "${ECHO_T}$ac_header_compiler" >&6
19272
19273# Is the header present?
19274echo "$as_me:$LINENO: checking $ac_header presence" >&5
19275echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
19276cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19277/* confdefs.h. */
19278_ACEOF
19279cat confdefs.h >>conftest.$ac_ext
19280cat >>conftest.$ac_ext <<_ACEOF
19281/* end confdefs.h. */
503d2be0
AS
19282#include <$ac_header>
19283_ACEOF
c0d27fcc 19284if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
19285 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19286 ac_status=$?
6bae0ccf 19287 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
19288 rm -f conftest.er1
19289 cat conftest.err >&5
c0d27fcc 19290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19291 (exit $ac_status); } >/dev/null; then
19292 if test -s conftest.err; then
19293 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 19294 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
19295 else
19296 ac_cpp_err=
19297 fi
19298else
19299 ac_cpp_err=yes
19300fi
19301if test -z "$ac_cpp_err"; then
c0d27fcc 19302 ac_header_preproc=yes
503d2be0
AS
19303else
19304 echo "$as_me: failed program was:" >&5
19650fd6
AS
19305sed 's/^/| /' conftest.$ac_ext >&5
19306
c0d27fcc 19307 ac_header_preproc=no
a21616bd 19308fi
503d2be0 19309rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
19310echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19311echo "${ECHO_T}$ac_header_preproc" >&6
19312
19313# So? What about this header?
35996d22
AS
19314case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19315 yes:no: )
c0d27fcc
MR
19316 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19317echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
19318 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
19319echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
19320 ac_header_preproc=yes
19650fd6 19321 ;;
35996d22 19322 no:yes:* )
c0d27fcc
MR
19323 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19324echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
19325 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
19326echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
19327 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19328echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19329 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
19330echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 19331 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 19332echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
19333 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
19334echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
19335 (
19336 cat <<\_ASBOX
35996d22
AS
19337## ------------------------------------------ ##
19338## Report this to the AC_PACKAGE_NAME lists. ##
19339## ------------------------------------------ ##
19650fd6
AS
19340_ASBOX
19341 ) |
19342 sed "s/^/$as_me: WARNING: /" >&2
19343 ;;
c0d27fcc
MR
19344esac
19345echo "$as_me:$LINENO: checking for $ac_header" >&5
19346echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19347if eval "test \"\${$as_ac_Header+set}\" = set"; then
19348 echo $ECHO_N "(cached) $ECHO_C" >&6
19349else
35996d22 19350 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 19351fi
c0d27fcc 19352echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 19353echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
19354
19355fi
503d2be0 19356if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 19357 cat >>confdefs.h <<_ACEOF
503d2be0 19358#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 19359_ACEOF
503d2be0 19360
a21616bd 19361else
503d2be0
AS
19362
19363for ac_header in kerberos/krb.h
a21616bd 19364do
503d2be0 19365as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
19366if eval "test \"\${$as_ac_Header+set}\" = set"; then
19367 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
19368echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19369if eval "test \"\${$as_ac_Header+set}\" = set"; then
19370 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
19371fi
19372echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
19373echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 19374else
c0d27fcc
MR
19375 # Is the header compilable?
19376echo "$as_me:$LINENO: checking $ac_header usability" >&5
19377echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
19378cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19379/* confdefs.h. */
19380_ACEOF
19381cat confdefs.h >>conftest.$ac_ext
19382cat >>conftest.$ac_ext <<_ACEOF
19383/* end confdefs.h. */
c0d27fcc
MR
19384$ac_includes_default
19385#include <$ac_header>
19386_ACEOF
19387rm -f conftest.$ac_objext
19388if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 19389 (eval $ac_compile) 2>conftest.er1
c0d27fcc 19390 ac_status=$?
35996d22
AS
19391 grep -v '^ *+' conftest.er1 >conftest.err
19392 rm -f conftest.er1
19393 cat conftest.err >&5
c0d27fcc
MR
19394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19395 (exit $ac_status); } &&
551ffc27
ST
19396 { ac_try='test -z "$ac_c_werror_flag"
19397 || test ! -s conftest.err'
35996d22
AS
19398 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19399 (eval $ac_try) 2>&5
19400 ac_status=$?
19401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19402 (exit $ac_status); }; } &&
19403 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
19404 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19405 (eval $ac_try) 2>&5
19406 ac_status=$?
19407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19408 (exit $ac_status); }; }; then
19409 ac_header_compiler=yes
19410else
19411 echo "$as_me: failed program was:" >&5
19650fd6
AS
19412sed 's/^/| /' conftest.$ac_ext >&5
19413
c0d27fcc
MR
19414ac_header_compiler=no
19415fi
35996d22 19416rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
19417echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19418echo "${ECHO_T}$ac_header_compiler" >&6
19419
19420# Is the header present?
19421echo "$as_me:$LINENO: checking $ac_header presence" >&5
19422echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
19423cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19424/* confdefs.h. */
19425_ACEOF
19426cat confdefs.h >>conftest.$ac_ext
19427cat >>conftest.$ac_ext <<_ACEOF
19428/* end confdefs.h. */
503d2be0
AS
19429#include <$ac_header>
19430_ACEOF
c0d27fcc 19431if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
19432 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19433 ac_status=$?
6bae0ccf 19434 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
19435 rm -f conftest.er1
19436 cat conftest.err >&5
c0d27fcc 19437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19438 (exit $ac_status); } >/dev/null; then
19439 if test -s conftest.err; then
19440 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 19441 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
19442 else
19443 ac_cpp_err=
19444 fi
19445else
19446 ac_cpp_err=yes
19447fi
19448if test -z "$ac_cpp_err"; then
c0d27fcc 19449 ac_header_preproc=yes
503d2be0
AS
19450else
19451 echo "$as_me: failed program was:" >&5
19650fd6
AS
19452sed 's/^/| /' conftest.$ac_ext >&5
19453
c0d27fcc 19454 ac_header_preproc=no
a21616bd 19455fi
503d2be0 19456rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
19457echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19458echo "${ECHO_T}$ac_header_preproc" >&6
35996d22
AS
19459
19460# So? What about this header?
19461case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19462 yes:no: )
19463 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19464echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
19465 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
19466echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
19467 ac_header_preproc=yes
19650fd6 19468 ;;
35996d22 19469 no:yes:* )
c0d27fcc
MR
19470 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19471echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
19472 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
19473echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
19474 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19475echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19476 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
19477echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 19478 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 19479echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
19480 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
19481echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
19482 (
19483 cat <<\_ASBOX
35996d22
AS
19484## ------------------------------------------ ##
19485## Report this to the AC_PACKAGE_NAME lists. ##
19486## ------------------------------------------ ##
19650fd6
AS
19487_ASBOX
19488 ) |
19489 sed "s/^/$as_me: WARNING: /" >&2
19490 ;;
c0d27fcc
MR
19491esac
19492echo "$as_me:$LINENO: checking for $ac_header" >&5
19493echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19494if eval "test \"\${$as_ac_Header+set}\" = set"; then
19495 echo $ECHO_N "(cached) $ECHO_C" >&6
19496else
35996d22 19497 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 19498fi
c0d27fcc 19499echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 19500echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
19501
19502fi
503d2be0 19503if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 19504 cat >>confdefs.h <<_ACEOF
503d2be0 19505#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 19506_ACEOF
503d2be0 19507
a21616bd 19508fi
c0d27fcc 19509
a21616bd
KR
19510done
19511
19512fi
c0d27fcc 19513
a21616bd
KR
19514done
19515
19516fi
c0d27fcc 19517
a21616bd
KR
19518done
19519
19520 fi
503d2be0
AS
19521
19522for ac_header in com_err.h
a21616bd 19523do
503d2be0 19524as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
19525if eval "test \"\${$as_ac_Header+set}\" = set"; then
19526 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
19527echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19528if eval "test \"\${$as_ac_Header+set}\" = set"; then
19529 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
19530fi
19531echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
19532echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 19533else
c0d27fcc
MR
19534 # Is the header compilable?
19535echo "$as_me:$LINENO: checking $ac_header usability" >&5
19536echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
19537cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19538/* confdefs.h. */
19539_ACEOF
19540cat confdefs.h >>conftest.$ac_ext
19541cat >>conftest.$ac_ext <<_ACEOF
19542/* end confdefs.h. */
c0d27fcc
MR
19543$ac_includes_default
19544#include <$ac_header>
19545_ACEOF
19546rm -f conftest.$ac_objext
19547if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 19548 (eval $ac_compile) 2>conftest.er1
c0d27fcc 19549 ac_status=$?
35996d22
AS
19550 grep -v '^ *+' conftest.er1 >conftest.err
19551 rm -f conftest.er1
19552 cat conftest.err >&5
c0d27fcc
MR
19553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19554 (exit $ac_status); } &&
551ffc27
ST
19555 { ac_try='test -z "$ac_c_werror_flag"
19556 || test ! -s conftest.err'
35996d22
AS
19557 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19558 (eval $ac_try) 2>&5
19559 ac_status=$?
19560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19561 (exit $ac_status); }; } &&
19562 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
19563 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19564 (eval $ac_try) 2>&5
19565 ac_status=$?
19566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19567 (exit $ac_status); }; }; then
19568 ac_header_compiler=yes
19569else
19570 echo "$as_me: failed program was:" >&5
19650fd6
AS
19571sed 's/^/| /' conftest.$ac_ext >&5
19572
c0d27fcc
MR
19573ac_header_compiler=no
19574fi
35996d22 19575rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
19576echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19577echo "${ECHO_T}$ac_header_compiler" >&6
19578
19579# Is the header present?
19580echo "$as_me:$LINENO: checking $ac_header presence" >&5
19581echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
19582cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19583/* confdefs.h. */
19584_ACEOF
19585cat confdefs.h >>conftest.$ac_ext
19586cat >>conftest.$ac_ext <<_ACEOF
19587/* end confdefs.h. */
503d2be0
AS
19588#include <$ac_header>
19589_ACEOF
c0d27fcc 19590if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
19591 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19592 ac_status=$?
6bae0ccf 19593 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
19594 rm -f conftest.er1
19595 cat conftest.err >&5
c0d27fcc 19596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19597 (exit $ac_status); } >/dev/null; then
19598 if test -s conftest.err; then
19599 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 19600 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
19601 else
19602 ac_cpp_err=
19603 fi
19604else
19605 ac_cpp_err=yes
19606fi
19607if test -z "$ac_cpp_err"; then
c0d27fcc 19608 ac_header_preproc=yes
503d2be0
AS
19609else
19610 echo "$as_me: failed program was:" >&5
19650fd6
AS
19611sed 's/^/| /' conftest.$ac_ext >&5
19612
c0d27fcc 19613 ac_header_preproc=no
a21616bd 19614fi
503d2be0 19615rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
19616echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19617echo "${ECHO_T}$ac_header_preproc" >&6
19618
19619# So? What about this header?
35996d22
AS
19620case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19621 yes:no: )
c0d27fcc
MR
19622 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19623echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
19624 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
19625echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
19626 ac_header_preproc=yes
19650fd6 19627 ;;
35996d22 19628 no:yes:* )
c0d27fcc
MR
19629 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19630echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
19631 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
19632echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
19633 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19634echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19635 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
19636echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 19637 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 19638echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
19639 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
19640echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
19641 (
19642 cat <<\_ASBOX
35996d22
AS
19643## ------------------------------------------ ##
19644## Report this to the AC_PACKAGE_NAME lists. ##
19645## ------------------------------------------ ##
19650fd6
AS
19646_ASBOX
19647 ) |
19648 sed "s/^/$as_me: WARNING: /" >&2
19649 ;;
c0d27fcc
MR
19650esac
19651echo "$as_me:$LINENO: checking for $ac_header" >&5
19652echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19653if eval "test \"\${$as_ac_Header+set}\" = set"; then
19654 echo $ECHO_N "(cached) $ECHO_C" >&6
19655else
35996d22 19656 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 19657fi
c0d27fcc 19658echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 19659echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
19660
19661fi
503d2be0 19662if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 19663 cat >>confdefs.h <<_ACEOF
503d2be0 19664#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 19665_ACEOF
503d2be0 19666
a21616bd 19667fi
c0d27fcc 19668
a21616bd
KR
19669done
19670
19671fi
19672
ba4481b5
DL
19673# Solaris requires -lintl if you want strerror (which calls dgettext)
19674# to return localized messages.
503d2be0 19675
c0d27fcc 19676echo "$as_me:$LINENO: checking for dgettext in -lintl" >&5
503d2be0
AS
19677echo $ECHO_N "checking for dgettext in -lintl... $ECHO_C" >&6
19678if test "${ac_cv_lib_intl_dgettext+set}" = set; then
19679 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 19680else
503d2be0 19681 ac_check_lib_save_LIBS=$LIBS
ba4481b5 19682LIBS="-lintl $LIBS"
503d2be0 19683cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19684/* confdefs.h. */
19685_ACEOF
19686cat confdefs.h >>conftest.$ac_ext
19687cat >>conftest.$ac_ext <<_ACEOF
19688/* end confdefs.h. */
503d2be0 19689
ba4481b5 19690/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
19691#ifdef __cplusplus
19692extern "C"
19693#endif
ba4481b5 19694/* We use char because int might match the return type of a gcc2
503d2be0
AS
19695 builtin and then its argument prototype would still apply. */
19696char dgettext ();
19697int
19698main ()
19699{
19700dgettext ();
19701 ;
19702 return 0;
19703}
19704_ACEOF
19705rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 19706if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 19707 (eval $ac_link) 2>conftest.er1
503d2be0 19708 ac_status=$?
35996d22
AS
19709 grep -v '^ *+' conftest.er1 >conftest.err
19710 rm -f conftest.er1
19711 cat conftest.err >&5
c0d27fcc 19712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 19713 (exit $ac_status); } &&
551ffc27
ST
19714 { ac_try='test -z "$ac_c_werror_flag"
19715 || test ! -s conftest.err'
35996d22
AS
19716 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19717 (eval $ac_try) 2>&5
19718 ac_status=$?
19719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19720 (exit $ac_status); }; } &&
19721 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 19722 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
19723 (eval $ac_try) 2>&5
19724 ac_status=$?
c0d27fcc 19725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19726 (exit $ac_status); }; }; then
19727 ac_cv_lib_intl_dgettext=yes
19728else
19729 echo "$as_me: failed program was:" >&5
19650fd6
AS
19730sed 's/^/| /' conftest.$ac_ext >&5
19731
503d2be0
AS
19732ac_cv_lib_intl_dgettext=no
19733fi
35996d22
AS
19734rm -f conftest.err conftest.$ac_objext \
19735 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
19736LIBS=$ac_check_lib_save_LIBS
19737fi
c0d27fcc 19738echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dgettext" >&5
503d2be0
AS
19739echo "${ECHO_T}$ac_cv_lib_intl_dgettext" >&6
19740if test $ac_cv_lib_intl_dgettext = yes; then
c0d27fcc 19741 cat >>confdefs.h <<_ACEOF
503d2be0 19742#define HAVE_LIBINTL 1
c0d27fcc 19743_ACEOF
ba4481b5
DL
19744
19745 LIBS="-lintl $LIBS"
19746
ba4481b5
DL
19747fi
19748
c0d27fcc
MR
19749
19750echo "$as_me:$LINENO: checking whether localtime caches TZ" >&5
503d2be0
AS
19751echo $ECHO_N "checking whether localtime caches TZ... $ECHO_C" >&6
19752if test "${emacs_cv_localtime_cache+set}" = set; then
19753 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
19754else
19755 if test x$ac_cv_func_tzset = xyes; then
19756if test "$cross_compiling" = yes; then
19757 # If we have tzset, assume the worst when cross-compiling.
19758emacs_cv_localtime_cache=yes
19759else
503d2be0 19760 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19761/* confdefs.h. */
19762_ACEOF
19763cat confdefs.h >>conftest.$ac_ext
19764cat >>conftest.$ac_ext <<_ACEOF
19765/* end confdefs.h. */
ba4481b5 19766#include <time.h>
ba4481b5
DL
19767extern char **environ;
19768unset_TZ ()
19769{
19770 char **from, **to;
19771 for (to = from = environ; (*to = *from); from++)
19772 if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
19773 to++;
19774}
19775char TZ_GMT0[] = "TZ=GMT0";
19776char TZ_PST8[] = "TZ=PST8";
19777main()
19778{
19779 time_t now = time ((time_t *) 0);
19780 int hour_GMT0, hour_unset;
19781 if (putenv (TZ_GMT0) != 0)
19782 exit (1);
19783 hour_GMT0 = localtime (&now)->tm_hour;
19784 unset_TZ ();
19785 hour_unset = localtime (&now)->tm_hour;
19786 if (putenv (TZ_PST8) != 0)
19787 exit (1);
19788 if (localtime (&now)->tm_hour == hour_GMT0)
19789 exit (1);
19790 unset_TZ ();
19791 if (localtime (&now)->tm_hour != hour_unset)
19792 exit (1);
19793 exit (0);
19794}
503d2be0
AS
19795_ACEOF
19796rm -f conftest$ac_exeext
c0d27fcc 19797if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
19798 (eval $ac_link) 2>&5
19799 ac_status=$?
c0d27fcc 19800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 19801 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 19802 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
19803 (eval $ac_try) 2>&5
19804 ac_status=$?
c0d27fcc 19805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 19806 (exit $ac_status); }; }; then
ba4481b5
DL
19807 emacs_cv_localtime_cache=no
19808else
503d2be0
AS
19809 echo "$as_me: program exited with status $ac_status" >&5
19810echo "$as_me: failed program was:" >&5
19650fd6
AS
19811sed 's/^/| /' conftest.$ac_ext >&5
19812
c0d27fcc 19813( exit $ac_status )
503d2be0 19814emacs_cv_localtime_cache=yes
ba4481b5 19815fi
35996d22 19816rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 19817fi
ba4481b5
DL
19818else
19819 # If we lack tzset, report that localtime does not cache TZ,
19820 # since we can't invalidate the cache if we don't have tzset.
19821 emacs_cv_localtime_cache=no
19822fi
19823fi
c0d27fcc 19824echo "$as_me:$LINENO: result: $emacs_cv_localtime_cache" >&5
503d2be0 19825echo "${ECHO_T}$emacs_cv_localtime_cache" >&6
ba4481b5 19826if test $emacs_cv_localtime_cache = yes; then
b936fae4 19827
c0d27fcc 19828cat >>confdefs.h <<\_ACEOF
ba4481b5 19829#define LOCALTIME_CACHE 1
c0d27fcc 19830_ACEOF
ba4481b5
DL
19831
19832fi
19833
19834if test "x$HAVE_TIMEVAL" = xyes; then
503d2be0
AS
19835
19836for ac_func in gettimeofday
48d4b120 19837do
503d2be0 19838as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 19839echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
19840echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
19841if eval "test \"\${$as_ac_var+set}\" = set"; then
19842 echo $ECHO_N "(cached) $ECHO_C" >&6
48d4b120 19843else
503d2be0 19844 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19845/* confdefs.h. */
19846_ACEOF
19847cat confdefs.h >>conftest.$ac_ext
19848cat >>conftest.$ac_ext <<_ACEOF
19849/* end confdefs.h. */
35996d22
AS
19850/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19851 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19852#define $ac_func innocuous_$ac_func
19853
48d4b120 19854/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
19855 which can conflict with char $ac_func (); below.
19856 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19857 <limits.h> exists even on freestanding compilers. */
35996d22 19858
19650fd6
AS
19859#ifdef __STDC__
19860# include <limits.h>
19861#else
19862# include <assert.h>
19863#endif
35996d22
AS
19864
19865#undef $ac_func
19866
48d4b120 19867/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
19868#ifdef __cplusplus
19869extern "C"
19650fd6 19870{
503d2be0 19871#endif
48d4b120 19872/* We use char because int might match the return type of a gcc2
503d2be0
AS
19873 builtin and then its argument prototype would still apply. */
19874char $ac_func ();
48d4b120
DL
19875/* The GNU C library defines this for functions which it implements
19876 to always fail with ENOSYS. Some functions are actually named
19877 something starting with __ and the normal name is an alias. */
19878#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
19879choke me
19880#else
19650fd6
AS
19881char (*f) () = $ac_func;
19882#endif
19883#ifdef __cplusplus
19884}
cd958eb3
MB
19885#endif
19886
19650fd6
AS
19887int
19888main ()
19889{
19890return f != $ac_func;
503d2be0
AS
19891 ;
19892 return 0;
19893}
19894_ACEOF
19895rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 19896if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 19897 (eval $ac_link) 2>conftest.er1
503d2be0 19898 ac_status=$?
35996d22
AS
19899 grep -v '^ *+' conftest.er1 >conftest.err
19900 rm -f conftest.er1
19901 cat conftest.err >&5
c0d27fcc 19902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 19903 (exit $ac_status); } &&
551ffc27
ST
19904 { ac_try='test -z "$ac_c_werror_flag"
19905 || test ! -s conftest.err'
35996d22
AS
19906 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19907 (eval $ac_try) 2>&5
19908 ac_status=$?
19909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19910 (exit $ac_status); }; } &&
19911 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 19912 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
19913 (eval $ac_try) 2>&5
19914 ac_status=$?
c0d27fcc 19915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
19916 (exit $ac_status); }; }; then
19917 eval "$as_ac_var=yes"
19918else
19919 echo "$as_me: failed program was:" >&5
19650fd6
AS
19920sed 's/^/| /' conftest.$ac_ext >&5
19921
503d2be0
AS
19922eval "$as_ac_var=no"
19923fi
35996d22
AS
19924rm -f conftest.err conftest.$ac_objext \
19925 conftest$ac_exeext conftest.$ac_ext
503d2be0 19926fi
c0d27fcc 19927echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
19928echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
19929if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 19930 cat >>confdefs.h <<_ACEOF
503d2be0 19931#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 19932_ACEOF
48d4b120 19933
48d4b120
DL
19934fi
19935done
19936
b936fae4 19937 if test $ac_cv_func_gettimeofday = yes; then
c0d27fcc 19938 echo "$as_me:$LINENO: checking whether gettimeofday can accept two arguments" >&5
503d2be0
AS
19939echo $ECHO_N "checking whether gettimeofday can accept two arguments... $ECHO_C" >&6
19940if test "${emacs_cv_gettimeofday_two_arguments+set}" = set; then
19941 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 19942else
503d2be0 19943 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19944/* confdefs.h. */
19945_ACEOF
19946cat confdefs.h >>conftest.$ac_ext
19947cat >>conftest.$ac_ext <<_ACEOF
19948/* end confdefs.h. */
ba4481b5 19949
a3f08d9e
DL
19950#ifdef TIME_WITH_SYS_TIME
19951#include <sys/time.h>
19952#include <time.h>
19953#else
19954#ifdef HAVE_SYS_TIME_H
19955#include <sys/time.h>
19956#else
19957#include <time.h>
19958#endif
19959#endif
503d2be0
AS
19960int
19961main ()
19962{
a3f08d9e 19963struct timeval time;
b936fae4 19964 gettimeofday (&time, 0);
503d2be0
AS
19965 ;
19966 return 0;
19967}
19968_ACEOF
19969rm -f conftest.$ac_objext
c0d27fcc 19970if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 19971 (eval $ac_compile) 2>conftest.er1
503d2be0 19972 ac_status=$?
35996d22
AS
19973 grep -v '^ *+' conftest.er1 >conftest.err
19974 rm -f conftest.er1
19975 cat conftest.err >&5
c0d27fcc 19976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 19977 (exit $ac_status); } &&
551ffc27
ST
19978 { ac_try='test -z "$ac_c_werror_flag"
19979 || test ! -s conftest.err'
35996d22
AS
19980 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19981 (eval $ac_try) 2>&5
19982 ac_status=$?
19983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19984 (exit $ac_status); }; } &&
19985 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 19986 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
19987 (eval $ac_try) 2>&5
19988 ac_status=$?
c0d27fcc 19989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 19990 (exit $ac_status); }; }; then
ba4481b5
DL
19991 emacs_cv_gettimeofday_two_arguments=yes
19992else
503d2be0 19993 echo "$as_me: failed program was:" >&5
19650fd6
AS
19994sed 's/^/| /' conftest.$ac_ext >&5
19995
503d2be0 19996emacs_cv_gettimeofday_two_arguments=no
ba4481b5 19997fi
35996d22 19998rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 19999fi
c0d27fcc 20000echo "$as_me:$LINENO: result: $emacs_cv_gettimeofday_two_arguments" >&5
503d2be0 20001echo "${ECHO_T}$emacs_cv_gettimeofday_two_arguments" >&6
b936fae4
AS
20002 if test $emacs_cv_gettimeofday_two_arguments = no; then
20003
c0d27fcc 20004cat >>confdefs.h <<\_ACEOF
ba4481b5 20005#define GETTIMEOFDAY_ONE_ARGUMENT 1
c0d27fcc 20006_ACEOF
ba4481b5 20007
b936fae4 20008 fi
ba4481b5
DL
20009 fi
20010fi
20011
973a76b1
DL
20012# This defines (or not) HAVE_TZNAME and HAVE_TM_ZONE.
20013echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
20014echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
20015if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
20016 echo $ECHO_N "(cached) $ECHO_C" >&6
20017else
20018 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20019/* confdefs.h. */
20020_ACEOF
20021cat confdefs.h >>conftest.$ac_ext
20022cat >>conftest.$ac_ext <<_ACEOF
20023/* end confdefs.h. */
973a76b1
DL
20024#include <sys/types.h>
20025#include <$ac_cv_struct_tm>
20026
20027
20028int
20029main ()
20030{
20031static struct tm ac_aggr;
20032if (ac_aggr.tm_zone)
20033return 0;
20034 ;
20035 return 0;
20036}
20037_ACEOF
20038rm -f conftest.$ac_objext
20039if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 20040 (eval $ac_compile) 2>conftest.er1
973a76b1 20041 ac_status=$?
35996d22
AS
20042 grep -v '^ *+' conftest.er1 >conftest.err
20043 rm -f conftest.er1
20044 cat conftest.err >&5
973a76b1
DL
20045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20046 (exit $ac_status); } &&
551ffc27
ST
20047 { ac_try='test -z "$ac_c_werror_flag"
20048 || test ! -s conftest.err'
35996d22
AS
20049 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20050 (eval $ac_try) 2>&5
20051 ac_status=$?
20052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20053 (exit $ac_status); }; } &&
20054 { ac_try='test -s conftest.$ac_objext'
973a76b1
DL
20055 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20056 (eval $ac_try) 2>&5
20057 ac_status=$?
20058 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20059 (exit $ac_status); }; }; then
20060 ac_cv_member_struct_tm_tm_zone=yes
20061else
20062 echo "$as_me: failed program was:" >&5
19650fd6
AS
20063sed 's/^/| /' conftest.$ac_ext >&5
20064
973a76b1 20065cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20066/* confdefs.h. */
20067_ACEOF
20068cat confdefs.h >>conftest.$ac_ext
20069cat >>conftest.$ac_ext <<_ACEOF
20070/* end confdefs.h. */
973a76b1
DL
20071#include <sys/types.h>
20072#include <$ac_cv_struct_tm>
20073
20074
20075int
20076main ()
20077{
20078static struct tm ac_aggr;
20079if (sizeof ac_aggr.tm_zone)
20080return 0;
20081 ;
20082 return 0;
20083}
20084_ACEOF
20085rm -f conftest.$ac_objext
20086if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 20087 (eval $ac_compile) 2>conftest.er1
973a76b1 20088 ac_status=$?
35996d22
AS
20089 grep -v '^ *+' conftest.er1 >conftest.err
20090 rm -f conftest.er1
20091 cat conftest.err >&5
973a76b1
DL
20092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20093 (exit $ac_status); } &&
551ffc27
ST
20094 { ac_try='test -z "$ac_c_werror_flag"
20095 || test ! -s conftest.err'
35996d22
AS
20096 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20097 (eval $ac_try) 2>&5
20098 ac_status=$?
20099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20100 (exit $ac_status); }; } &&
20101 { ac_try='test -s conftest.$ac_objext'
973a76b1
DL
20102 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20103 (eval $ac_try) 2>&5
20104 ac_status=$?
20105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20106 (exit $ac_status); }; }; then
20107 ac_cv_member_struct_tm_tm_zone=yes
20108else
20109 echo "$as_me: failed program was:" >&5
19650fd6
AS
20110sed 's/^/| /' conftest.$ac_ext >&5
20111
973a76b1
DL
20112ac_cv_member_struct_tm_tm_zone=no
20113fi
35996d22 20114rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
973a76b1 20115fi
35996d22 20116rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
973a76b1
DL
20117fi
20118echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
20119echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
20120if test $ac_cv_member_struct_tm_tm_zone = yes; then
20121
20122cat >>confdefs.h <<_ACEOF
20123#define HAVE_STRUCT_TM_TM_ZONE 1
20124_ACEOF
20125
20126
20127fi
20128
20129if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
20130
20131cat >>confdefs.h <<\_ACEOF
20132#define HAVE_TM_ZONE 1
20133_ACEOF
20134
20135else
20136 echo "$as_me:$LINENO: checking for tzname" >&5
20137echo $ECHO_N "checking for tzname... $ECHO_C" >&6
20138if test "${ac_cv_var_tzname+set}" = set; then
20139 echo $ECHO_N "(cached) $ECHO_C" >&6
20140else
20141 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20142/* confdefs.h. */
20143_ACEOF
20144cat confdefs.h >>conftest.$ac_ext
20145cat >>conftest.$ac_ext <<_ACEOF
20146/* end confdefs.h. */
973a76b1
DL
20147#include <time.h>
20148#ifndef tzname /* For SGI. */
20149extern char *tzname[]; /* RS6000 and others reject char **tzname. */
20150#endif
20151
20152int
20153main ()
20154{
20155atoi(*tzname);
20156 ;
20157 return 0;
20158}
20159_ACEOF
20160rm -f conftest.$ac_objext conftest$ac_exeext
20161if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 20162 (eval $ac_link) 2>conftest.er1
973a76b1 20163 ac_status=$?
35996d22
AS
20164 grep -v '^ *+' conftest.er1 >conftest.err
20165 rm -f conftest.er1
20166 cat conftest.err >&5
973a76b1
DL
20167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20168 (exit $ac_status); } &&
551ffc27
ST
20169 { ac_try='test -z "$ac_c_werror_flag"
20170 || test ! -s conftest.err'
35996d22
AS
20171 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20172 (eval $ac_try) 2>&5
20173 ac_status=$?
20174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20175 (exit $ac_status); }; } &&
20176 { ac_try='test -s conftest$ac_exeext'
973a76b1
DL
20177 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20178 (eval $ac_try) 2>&5
20179 ac_status=$?
20180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20181 (exit $ac_status); }; }; then
20182 ac_cv_var_tzname=yes
20183else
20184 echo "$as_me: failed program was:" >&5
19650fd6
AS
20185sed 's/^/| /' conftest.$ac_ext >&5
20186
973a76b1
DL
20187ac_cv_var_tzname=no
20188fi
35996d22
AS
20189rm -f conftest.err conftest.$ac_objext \
20190 conftest$ac_exeext conftest.$ac_ext
973a76b1
DL
20191fi
20192echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
20193echo "${ECHO_T}$ac_cv_var_tzname" >&6
20194 if test $ac_cv_var_tzname = yes; then
20195
20196cat >>confdefs.h <<\_ACEOF
20197#define HAVE_TZNAME 1
20198_ACEOF
20199
20200 fi
20201fi
20202
20203
48d4b120 20204if test "$ac_cv_func_gettimeofday" = yes; then
c0d27fcc 20205 echo "$as_me:$LINENO: checking for struct timezone" >&5
503d2be0
AS
20206echo $ECHO_N "checking for struct timezone... $ECHO_C" >&6
20207if test "${emacs_cv_struct_timezone+set}" = set; then
20208 echo $ECHO_N "(cached) $ECHO_C" >&6
48d4b120 20209else
503d2be0 20210 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20211/* confdefs.h. */
20212_ACEOF
20213cat confdefs.h >>conftest.$ac_ext
20214cat >>conftest.$ac_ext <<_ACEOF
20215/* end confdefs.h. */
48d4b120 20216#include <sys/time.h>
503d2be0
AS
20217int
20218main ()
20219{
48d4b120 20220struct timezone tz;
503d2be0
AS
20221 ;
20222 return 0;
20223}
20224_ACEOF
20225rm -f conftest.$ac_objext
c0d27fcc 20226if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 20227 (eval $ac_compile) 2>conftest.er1
503d2be0 20228 ac_status=$?
35996d22
AS
20229 grep -v '^ *+' conftest.er1 >conftest.err
20230 rm -f conftest.er1
20231 cat conftest.err >&5
c0d27fcc 20232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 20233 (exit $ac_status); } &&
551ffc27
ST
20234 { ac_try='test -z "$ac_c_werror_flag"
20235 || test ! -s conftest.err'
35996d22
AS
20236 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20237 (eval $ac_try) 2>&5
20238 ac_status=$?
20239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20240 (exit $ac_status); }; } &&
20241 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 20242 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
20243 (eval $ac_try) 2>&5
20244 ac_status=$?
c0d27fcc 20245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 20246 (exit $ac_status); }; }; then
48d4b120
DL
20247 if test "$cross_compiling" = yes; then
20248 emacs_cv_struct_timezone=yes
20249else
503d2be0 20250 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20251/* confdefs.h. */
20252_ACEOF
20253cat confdefs.h >>conftest.$ac_ext
20254cat >>conftest.$ac_ext <<_ACEOF
20255/* end confdefs.h. */
48d4b120
DL
20256
20257#ifdef TIME_WITH_SYS_TIME
20258#include <sys/time.h>
20259#include <time.h>
20260#else
20261#ifdef HAVE_SYS_TIME_H
20262#include <sys/time.h>
20263#else
20264#include <time.h>
20265#endif
20266#endif
20267main () {
20268 struct timeval time;
20269 struct timezone dummy;
20270 exit (gettimeofday (&time, &dummy));
20271}
503d2be0
AS
20272_ACEOF
20273rm -f conftest$ac_exeext
c0d27fcc 20274if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
20275 (eval $ac_link) 2>&5
20276 ac_status=$?
c0d27fcc 20277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 20278 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 20279 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
20280 (eval $ac_try) 2>&5
20281 ac_status=$?
c0d27fcc 20282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 20283 (exit $ac_status); }; }; then
48d4b120
DL
20284 emacs_cv_struct_timezone=yes
20285else
503d2be0
AS
20286 echo "$as_me: program exited with status $ac_status" >&5
20287echo "$as_me: failed program was:" >&5
19650fd6
AS
20288sed 's/^/| /' conftest.$ac_ext >&5
20289
c0d27fcc 20290( exit $ac_status )
503d2be0 20291emacs_cv_struct_timezone=no
48d4b120 20292fi
35996d22 20293rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
48d4b120 20294fi
48d4b120 20295else
503d2be0 20296 echo "$as_me: failed program was:" >&5
19650fd6
AS
20297sed 's/^/| /' conftest.$ac_ext >&5
20298
503d2be0 20299emacs_cv_struct_timezone=no
48d4b120 20300fi
35996d22 20301rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
48d4b120 20302fi
c0d27fcc 20303echo "$as_me:$LINENO: result: $emacs_cv_struct_timezone" >&5
503d2be0 20304echo "${ECHO_T}$emacs_cv_struct_timezone" >&6
48d4b120
DL
20305fi
20306
ba4481b5 20307ok_so_far=yes
c0d27fcc 20308echo "$as_me:$LINENO: checking for socket" >&5
503d2be0
AS
20309echo $ECHO_N "checking for socket... $ECHO_C" >&6
20310if test "${ac_cv_func_socket+set}" = set; then
20311 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 20312else
503d2be0 20313 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20314/* confdefs.h. */
20315_ACEOF
20316cat confdefs.h >>conftest.$ac_ext
20317cat >>conftest.$ac_ext <<_ACEOF
20318/* end confdefs.h. */
35996d22
AS
20319/* Define socket to an innocuous variant, in case <limits.h> declares socket.
20320 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20321#define socket innocuous_socket
20322
ba4481b5 20323/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
20324 which can conflict with char socket (); below.
20325 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20326 <limits.h> exists even on freestanding compilers. */
35996d22 20327
19650fd6
AS
20328#ifdef __STDC__
20329# include <limits.h>
20330#else
20331# include <assert.h>
20332#endif
35996d22
AS
20333
20334#undef socket
20335
ba4481b5 20336/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
20337#ifdef __cplusplus
20338extern "C"
19650fd6 20339{
503d2be0 20340#endif
ba4481b5 20341/* We use char because int might match the return type of a gcc2
503d2be0
AS
20342 builtin and then its argument prototype would still apply. */
20343char socket ();
ba4481b5
DL
20344/* The GNU C library defines this for functions which it implements
20345 to always fail with ENOSYS. Some functions are actually named
20346 something starting with __ and the normal name is an alias. */
20347#if defined (__stub_socket) || defined (__stub___socket)
20348choke me
20349#else
19650fd6
AS
20350char (*f) () = socket;
20351#endif
20352#ifdef __cplusplus
20353}
cd958eb3
MB
20354#endif
20355
19650fd6
AS
20356int
20357main ()
20358{
20359return f != socket;
503d2be0
AS
20360 ;
20361 return 0;
20362}
20363_ACEOF
20364rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 20365if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 20366 (eval $ac_link) 2>conftest.er1
503d2be0 20367 ac_status=$?
35996d22
AS
20368 grep -v '^ *+' conftest.er1 >conftest.err
20369 rm -f conftest.er1
20370 cat conftest.err >&5
c0d27fcc 20371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 20372 (exit $ac_status); } &&
551ffc27
ST
20373 { ac_try='test -z "$ac_c_werror_flag"
20374 || test ! -s conftest.err'
35996d22
AS
20375 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20376 (eval $ac_try) 2>&5
20377 ac_status=$?
20378 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20379 (exit $ac_status); }; } &&
20380 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 20381 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
20382 (eval $ac_try) 2>&5
20383 ac_status=$?
c0d27fcc 20384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
20385 (exit $ac_status); }; }; then
20386 ac_cv_func_socket=yes
20387else
20388 echo "$as_me: failed program was:" >&5
19650fd6
AS
20389sed 's/^/| /' conftest.$ac_ext >&5
20390
503d2be0
AS
20391ac_cv_func_socket=no
20392fi
35996d22
AS
20393rm -f conftest.err conftest.$ac_objext \
20394 conftest$ac_exeext conftest.$ac_ext
503d2be0 20395fi
c0d27fcc 20396echo "$as_me:$LINENO: result: $ac_cv_func_socket" >&5
503d2be0
AS
20397echo "${ECHO_T}$ac_cv_func_socket" >&6
20398if test $ac_cv_func_socket = yes; then
ba4481b5
DL
20399 :
20400else
503d2be0 20401 ok_so_far=no
ba4481b5
DL
20402fi
20403
20404if test $ok_so_far = yes; then
c0d27fcc
MR
20405 if test "${ac_cv_header_netinet_in_h+set}" = set; then
20406 echo "$as_me:$LINENO: checking for netinet/in.h" >&5
503d2be0
AS
20407echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6
20408if test "${ac_cv_header_netinet_in_h+set}" = set; then
20409 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
20410fi
20411echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5
20412echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6
98418dba 20413else
c0d27fcc
MR
20414 # Is the header compilable?
20415echo "$as_me:$LINENO: checking netinet/in.h usability" >&5
20416echo $ECHO_N "checking netinet/in.h usability... $ECHO_C" >&6
20417cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20418/* confdefs.h. */
20419_ACEOF
20420cat confdefs.h >>conftest.$ac_ext
20421cat >>conftest.$ac_ext <<_ACEOF
20422/* end confdefs.h. */
c0d27fcc
MR
20423$ac_includes_default
20424#include <netinet/in.h>
20425_ACEOF
20426rm -f conftest.$ac_objext
20427if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 20428 (eval $ac_compile) 2>conftest.er1
c0d27fcc 20429 ac_status=$?
35996d22
AS
20430 grep -v '^ *+' conftest.er1 >conftest.err
20431 rm -f conftest.er1
20432 cat conftest.err >&5
c0d27fcc
MR
20433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20434 (exit $ac_status); } &&
551ffc27
ST
20435 { ac_try='test -z "$ac_c_werror_flag"
20436 || test ! -s conftest.err'
35996d22
AS
20437 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20438 (eval $ac_try) 2>&5
20439 ac_status=$?
20440 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20441 (exit $ac_status); }; } &&
20442 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
20443 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20444 (eval $ac_try) 2>&5
20445 ac_status=$?
20446 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20447 (exit $ac_status); }; }; then
20448 ac_header_compiler=yes
20449else
20450 echo "$as_me: failed program was:" >&5
19650fd6
AS
20451sed 's/^/| /' conftest.$ac_ext >&5
20452
c0d27fcc
MR
20453ac_header_compiler=no
20454fi
35996d22 20455rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
20456echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20457echo "${ECHO_T}$ac_header_compiler" >&6
20458
20459# Is the header present?
20460echo "$as_me:$LINENO: checking netinet/in.h presence" >&5
20461echo $ECHO_N "checking netinet/in.h presence... $ECHO_C" >&6
20462cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20463/* confdefs.h. */
20464_ACEOF
20465cat confdefs.h >>conftest.$ac_ext
20466cat >>conftest.$ac_ext <<_ACEOF
20467/* end confdefs.h. */
ba4481b5 20468#include <netinet/in.h>
503d2be0 20469_ACEOF
c0d27fcc 20470if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
20471 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20472 ac_status=$?
6bae0ccf 20473 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
20474 rm -f conftest.er1
20475 cat conftest.err >&5
c0d27fcc 20476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
20477 (exit $ac_status); } >/dev/null; then
20478 if test -s conftest.err; then
20479 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 20480 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
20481 else
20482 ac_cpp_err=
20483 fi
20484else
20485 ac_cpp_err=yes
20486fi
20487if test -z "$ac_cpp_err"; then
c0d27fcc 20488 ac_header_preproc=yes
ba4481b5 20489else
503d2be0 20490 echo "$as_me: failed program was:" >&5
19650fd6
AS
20491sed 's/^/| /' conftest.$ac_ext >&5
20492
c0d27fcc 20493 ac_header_preproc=no
ba4481b5 20494fi
503d2be0 20495rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
20496echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20497echo "${ECHO_T}$ac_header_preproc" >&6
20498
20499# So? What about this header?
35996d22
AS
20500case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20501 yes:no: )
c0d27fcc
MR
20502 { echo "$as_me:$LINENO: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&5
20503echo "$as_me: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
20504 { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the compiler's result" >&5
20505echo "$as_me: WARNING: netinet/in.h: proceeding with the compiler's result" >&2;}
20506 ac_header_preproc=yes
19650fd6 20507 ;;
35996d22 20508 no:yes:* )
c0d27fcc
MR
20509 { echo "$as_me:$LINENO: WARNING: netinet/in.h: present but cannot be compiled" >&5
20510echo "$as_me: WARNING: netinet/in.h: present but cannot be compiled" >&2;}
35996d22
AS
20511 { echo "$as_me:$LINENO: WARNING: netinet/in.h: check for missing prerequisite headers?" >&5
20512echo "$as_me: WARNING: netinet/in.h: check for missing prerequisite headers?" >&2;}
20513 { echo "$as_me:$LINENO: WARNING: netinet/in.h: see the Autoconf documentation" >&5
20514echo "$as_me: WARNING: netinet/in.h: see the Autoconf documentation" >&2;}
20515 { echo "$as_me:$LINENO: WARNING: netinet/in.h: section \"Present But Cannot Be Compiled\"" >&5
20516echo "$as_me: WARNING: netinet/in.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 20517 { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&5
19650fd6 20518echo "$as_me: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&2;}
35996d22
AS
20519 { echo "$as_me:$LINENO: WARNING: netinet/in.h: in the future, the compiler will take precedence" >&5
20520echo "$as_me: WARNING: netinet/in.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
20521 (
20522 cat <<\_ASBOX
35996d22
AS
20523## ------------------------------------------ ##
20524## Report this to the AC_PACKAGE_NAME lists. ##
20525## ------------------------------------------ ##
19650fd6
AS
20526_ASBOX
20527 ) |
20528 sed "s/^/$as_me: WARNING: /" >&2
20529 ;;
c0d27fcc
MR
20530esac
20531echo "$as_me:$LINENO: checking for netinet/in.h" >&5
20532echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6
20533if test "${ac_cv_header_netinet_in_h+set}" = set; then
20534 echo $ECHO_N "(cached) $ECHO_C" >&6
20535else
20536 ac_cv_header_netinet_in_h=$ac_header_preproc
ba4481b5 20537fi
c0d27fcc 20538echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5
503d2be0 20539echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6
c0d27fcc
MR
20540
20541fi
503d2be0 20542if test $ac_cv_header_netinet_in_h = yes; then
ba4481b5
DL
20543 :
20544else
503d2be0 20545 ok_so_far=no
ba4481b5
DL
20546fi
20547
c0d27fcc 20548
ba4481b5
DL
20549fi
20550if test $ok_so_far = yes; then
c0d27fcc
MR
20551 if test "${ac_cv_header_arpa_inet_h+set}" = set; then
20552 echo "$as_me:$LINENO: checking for arpa/inet.h" >&5
503d2be0
AS
20553echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6
20554if test "${ac_cv_header_arpa_inet_h+set}" = set; then
20555 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
20556fi
20557echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5
20558echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6
98418dba 20559else
c0d27fcc
MR
20560 # Is the header compilable?
20561echo "$as_me:$LINENO: checking arpa/inet.h usability" >&5
20562echo $ECHO_N "checking arpa/inet.h usability... $ECHO_C" >&6
20563cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20564/* confdefs.h. */
20565_ACEOF
20566cat confdefs.h >>conftest.$ac_ext
20567cat >>conftest.$ac_ext <<_ACEOF
20568/* end confdefs.h. */
c0d27fcc
MR
20569$ac_includes_default
20570#include <arpa/inet.h>
20571_ACEOF
20572rm -f conftest.$ac_objext
20573if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 20574 (eval $ac_compile) 2>conftest.er1
c0d27fcc 20575 ac_status=$?
35996d22
AS
20576 grep -v '^ *+' conftest.er1 >conftest.err
20577 rm -f conftest.er1
20578 cat conftest.err >&5
c0d27fcc
MR
20579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20580 (exit $ac_status); } &&
551ffc27
ST
20581 { ac_try='test -z "$ac_c_werror_flag"
20582 || test ! -s conftest.err'
35996d22
AS
20583 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20584 (eval $ac_try) 2>&5
20585 ac_status=$?
20586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20587 (exit $ac_status); }; } &&
20588 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
20589 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20590 (eval $ac_try) 2>&5
20591 ac_status=$?
20592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20593 (exit $ac_status); }; }; then
20594 ac_header_compiler=yes
20595else
20596 echo "$as_me: failed program was:" >&5
19650fd6
AS
20597sed 's/^/| /' conftest.$ac_ext >&5
20598
c0d27fcc
MR
20599ac_header_compiler=no
20600fi
35996d22 20601rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
20602echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20603echo "${ECHO_T}$ac_header_compiler" >&6
20604
20605# Is the header present?
20606echo "$as_me:$LINENO: checking arpa/inet.h presence" >&5
20607echo $ECHO_N "checking arpa/inet.h presence... $ECHO_C" >&6
20608cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20609/* confdefs.h. */
20610_ACEOF
20611cat confdefs.h >>conftest.$ac_ext
20612cat >>conftest.$ac_ext <<_ACEOF
20613/* end confdefs.h. */
ba4481b5 20614#include <arpa/inet.h>
503d2be0 20615_ACEOF
c0d27fcc 20616if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
20617 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20618 ac_status=$?
6bae0ccf 20619 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
20620 rm -f conftest.er1
20621 cat conftest.err >&5
c0d27fcc 20622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
20623 (exit $ac_status); } >/dev/null; then
20624 if test -s conftest.err; then
20625 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 20626 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
20627 else
20628 ac_cpp_err=
20629 fi
20630else
20631 ac_cpp_err=yes
20632fi
20633if test -z "$ac_cpp_err"; then
c0d27fcc 20634 ac_header_preproc=yes
ba4481b5 20635else
503d2be0 20636 echo "$as_me: failed program was:" >&5
19650fd6
AS
20637sed 's/^/| /' conftest.$ac_ext >&5
20638
c0d27fcc 20639 ac_header_preproc=no
ba4481b5 20640fi
503d2be0 20641rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
20642echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20643echo "${ECHO_T}$ac_header_preproc" >&6
20644
20645# So? What about this header?
35996d22
AS
20646case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20647 yes:no: )
c0d27fcc
MR
20648 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&5
20649echo "$as_me: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
20650 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the compiler's result" >&5
20651echo "$as_me: WARNING: arpa/inet.h: proceeding with the compiler's result" >&2;}
20652 ac_header_preproc=yes
19650fd6 20653 ;;
35996d22 20654 no:yes:* )
c0d27fcc
MR
20655 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: present but cannot be compiled" >&5
20656echo "$as_me: WARNING: arpa/inet.h: present but cannot be compiled" >&2;}
35996d22
AS
20657 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: check for missing prerequisite headers?" >&5
20658echo "$as_me: WARNING: arpa/inet.h: check for missing prerequisite headers?" >&2;}
20659 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: see the Autoconf documentation" >&5
20660echo "$as_me: WARNING: arpa/inet.h: see the Autoconf documentation" >&2;}
20661 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: section \"Present But Cannot Be Compiled\"" >&5
20662echo "$as_me: WARNING: arpa/inet.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 20663 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&5
19650fd6 20664echo "$as_me: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&2;}
35996d22
AS
20665 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: in the future, the compiler will take precedence" >&5
20666echo "$as_me: WARNING: arpa/inet.h: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
20667 (
20668 cat <<\_ASBOX
35996d22
AS
20669## ------------------------------------------ ##
20670## Report this to the AC_PACKAGE_NAME lists. ##
20671## ------------------------------------------ ##
19650fd6
AS
20672_ASBOX
20673 ) |
20674 sed "s/^/$as_me: WARNING: /" >&2
20675 ;;
c0d27fcc
MR
20676esac
20677echo "$as_me:$LINENO: checking for arpa/inet.h" >&5
20678echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6
20679if test "${ac_cv_header_arpa_inet_h+set}" = set; then
20680 echo $ECHO_N "(cached) $ECHO_C" >&6
20681else
20682 ac_cv_header_arpa_inet_h=$ac_header_preproc
ba4481b5 20683fi
c0d27fcc 20684echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5
503d2be0 20685echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6
c0d27fcc
MR
20686
20687fi
503d2be0 20688if test $ac_cv_header_arpa_inet_h = yes; then
ba4481b5
DL
20689 :
20690else
503d2be0 20691 ok_so_far=no
ba4481b5
DL
20692fi
20693
c0d27fcc 20694
ba4481b5
DL
20695fi
20696if test $ok_so_far = yes; then
b936fae4 20697
c0d27fcc 20698cat >>confdefs.h <<\_ACEOF
ba4481b5 20699#define HAVE_INET_SOCKETS 1
c0d27fcc 20700_ACEOF
ba4481b5
DL
20701
20702fi
20703
2d2b6695 20704
7862d3a8 20705for ac_header in sys/ioctl.h
2d2b6695
KS
20706do
20707as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20708if eval "test \"\${$as_ac_Header+set}\" = set"; then
20709 echo "$as_me:$LINENO: checking for $ac_header" >&5
20710echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20711if eval "test \"\${$as_ac_Header+set}\" = set"; then
20712 echo $ECHO_N "(cached) $ECHO_C" >&6
20713fi
20714echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
20715echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20716else
20717 # Is the header compilable?
20718echo "$as_me:$LINENO: checking $ac_header usability" >&5
20719echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
20720cat >conftest.$ac_ext <<_ACEOF
2d2b6695
KS
20721/* confdefs.h. */
20722_ACEOF
20723cat confdefs.h >>conftest.$ac_ext
20724cat >>conftest.$ac_ext <<_ACEOF
20725/* end confdefs.h. */
20726$ac_includes_default
20727#include <$ac_header>
20728_ACEOF
20729rm -f conftest.$ac_objext
20730if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 20731 (eval $ac_compile) 2>conftest.er1
2d2b6695 20732 ac_status=$?
35996d22
AS
20733 grep -v '^ *+' conftest.er1 >conftest.err
20734 rm -f conftest.er1
20735 cat conftest.err >&5
2d2b6695
KS
20736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20737 (exit $ac_status); } &&
551ffc27
ST
20738 { ac_try='test -z "$ac_c_werror_flag"
20739 || test ! -s conftest.err'
35996d22
AS
20740 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20741 (eval $ac_try) 2>&5
20742 ac_status=$?
20743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20744 (exit $ac_status); }; } &&
20745 { ac_try='test -s conftest.$ac_objext'
2d2b6695
KS
20746 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20747 (eval $ac_try) 2>&5
20748 ac_status=$?
20749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20750 (exit $ac_status); }; }; then
20751 ac_header_compiler=yes
20752else
20753 echo "$as_me: failed program was:" >&5
20754sed 's/^/| /' conftest.$ac_ext >&5
20755
20756ac_header_compiler=no
20757fi
35996d22 20758rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2d2b6695
KS
20759echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20760echo "${ECHO_T}$ac_header_compiler" >&6
20761
20762# Is the header present?
20763echo "$as_me:$LINENO: checking $ac_header presence" >&5
20764echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
20765cat >conftest.$ac_ext <<_ACEOF
2d2b6695
KS
20766/* confdefs.h. */
20767_ACEOF
20768cat confdefs.h >>conftest.$ac_ext
20769cat >>conftest.$ac_ext <<_ACEOF
20770/* end confdefs.h. */
20771#include <$ac_header>
20772_ACEOF
20773if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
20774 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20775 ac_status=$?
20776 grep -v '^ *+' conftest.er1 >conftest.err
20777 rm -f conftest.er1
20778 cat conftest.err >&5
20779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20780 (exit $ac_status); } >/dev/null; then
20781 if test -s conftest.err; then
20782 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 20783 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2d2b6695
KS
20784 else
20785 ac_cpp_err=
20786 fi
20787else
20788 ac_cpp_err=yes
20789fi
20790if test -z "$ac_cpp_err"; then
20791 ac_header_preproc=yes
20792else
20793 echo "$as_me: failed program was:" >&5
20794sed 's/^/| /' conftest.$ac_ext >&5
20795
20796 ac_header_preproc=no
20797fi
20798rm -f conftest.err conftest.$ac_ext
20799echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20800echo "${ECHO_T}$ac_header_preproc" >&6
20801
20802# So? What about this header?
35996d22
AS
20803case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20804 yes:no: )
2d2b6695
KS
20805 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
20806echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
20807 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
20808echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
20809 ac_header_preproc=yes
2d2b6695 20810 ;;
35996d22 20811 no:yes:* )
2d2b6695
KS
20812 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
20813echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
20814 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
20815echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
20816 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
20817echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
20818 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
20819echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
2d2b6695
KS
20820 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
20821echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
20822 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
20823echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
2d2b6695
KS
20824 (
20825 cat <<\_ASBOX
35996d22
AS
20826## ------------------------------------------ ##
20827## Report this to the AC_PACKAGE_NAME lists. ##
20828## ------------------------------------------ ##
2d2b6695
KS
20829_ASBOX
20830 ) |
20831 sed "s/^/$as_me: WARNING: /" >&2
20832 ;;
20833esac
20834echo "$as_me:$LINENO: checking for $ac_header" >&5
20835echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20836if eval "test \"\${$as_ac_Header+set}\" = set"; then
20837 echo $ECHO_N "(cached) $ECHO_C" >&6
20838else
35996d22 20839 eval "$as_ac_Header=\$ac_header_preproc"
2d2b6695
KS
20840fi
20841echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
20842echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20843
20844fi
20845if test `eval echo '${'$as_ac_Header'}'` = yes; then
20846 cat >>confdefs.h <<_ACEOF
20847#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20848_ACEOF
20849
20850fi
20851
20852done
20853
20854
ba4481b5 20855if test -f /usr/lpp/X11/bin/smt.exp; then
b936fae4 20856
c0d27fcc 20857cat >>confdefs.h <<\_ACEOF
ba4481b5 20858#define HAVE_AIX_SMT_EXP 1
c0d27fcc 20859_ACEOF
ba4481b5
DL
20860
20861fi
20862
c0d27fcc 20863echo "$as_me:$LINENO: checking whether system supports dynamic ptys" >&5
503d2be0 20864echo $ECHO_N "checking whether system supports dynamic ptys... $ECHO_C" >&6
3d9fec71 20865if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then
c0d27fcc 20866 echo "$as_me:$LINENO: result: yes" >&5
503d2be0 20867echo "${ECHO_T}yes" >&6
b936fae4 20868
c0d27fcc 20869cat >>confdefs.h <<\_ACEOF
3d9fec71 20870#define HAVE_DEV_PTMX 1
c0d27fcc 20871_ACEOF
3d9fec71
DL
20872
20873else
c0d27fcc 20874 echo "$as_me:$LINENO: result: no" >&5
503d2be0 20875echo "${ECHO_T}no" >&6
3d9fec71
DL
20876fi
20877
c0d27fcc 20878echo "$as_me:$LINENO: checking for pid_t" >&5
503d2be0
AS
20879echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
20880if test "${ac_cv_type_pid_t+set}" = set; then
20881 echo $ECHO_N "(cached) $ECHO_C" >&6
647847ea 20882else
503d2be0 20883 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20884/* confdefs.h. */
20885_ACEOF
20886cat confdefs.h >>conftest.$ac_ext
20887cat >>conftest.$ac_ext <<_ACEOF
20888/* end confdefs.h. */
503d2be0
AS
20889$ac_includes_default
20890int
20891main ()
20892{
20893if ((pid_t *) 0)
20894 return 0;
20895if (sizeof (pid_t))
20896 return 0;
20897 ;
20898 return 0;
20899}
20900_ACEOF
20901rm -f conftest.$ac_objext
c0d27fcc 20902if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 20903 (eval $ac_compile) 2>conftest.er1
503d2be0 20904 ac_status=$?
35996d22
AS
20905 grep -v '^ *+' conftest.er1 >conftest.err
20906 rm -f conftest.er1
20907 cat conftest.err >&5
c0d27fcc 20908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 20909 (exit $ac_status); } &&
551ffc27
ST
20910 { ac_try='test -z "$ac_c_werror_flag"
20911 || test ! -s conftest.err'
35996d22
AS
20912 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20913 (eval $ac_try) 2>&5
20914 ac_status=$?
20915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20916 (exit $ac_status); }; } &&
20917 { ac_try='test -s conftest.$ac_objext'
c0d27fcc 20918 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
20919 (eval $ac_try) 2>&5
20920 ac_status=$?
c0d27fcc 20921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 20922 (exit $ac_status); }; }; then
647847ea
DL
20923 ac_cv_type_pid_t=yes
20924else
503d2be0 20925 echo "$as_me: failed program was:" >&5
19650fd6
AS
20926sed 's/^/| /' conftest.$ac_ext >&5
20927
503d2be0 20928ac_cv_type_pid_t=no
647847ea 20929fi
35996d22 20930rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
647847ea 20931fi
c0d27fcc 20932echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
503d2be0
AS
20933echo "${ECHO_T}$ac_cv_type_pid_t" >&6
20934if test $ac_cv_type_pid_t = yes; then
20935 :
20936else
20937
c0d27fcc 20938cat >>confdefs.h <<_ACEOF
647847ea 20939#define pid_t int
c0d27fcc 20940_ACEOF
647847ea
DL
20941
20942fi
20943
c0d27fcc
MR
20944
20945
503d2be0
AS
20946for ac_header in unistd.h vfork.h
20947do
20948as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
c0d27fcc
MR
20949if eval "test \"\${$as_ac_Header+set}\" = set"; then
20950 echo "$as_me:$LINENO: checking for $ac_header" >&5
503d2be0
AS
20951echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20952if eval "test \"\${$as_ac_Header+set}\" = set"; then
20953 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc
MR
20954fi
20955echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
20956echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
98418dba 20957else
c0d27fcc
MR
20958 # Is the header compilable?
20959echo "$as_me:$LINENO: checking $ac_header usability" >&5
20960echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
20961cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20962/* confdefs.h. */
20963_ACEOF
20964cat confdefs.h >>conftest.$ac_ext
20965cat >>conftest.$ac_ext <<_ACEOF
20966/* end confdefs.h. */
c0d27fcc
MR
20967$ac_includes_default
20968#include <$ac_header>
20969_ACEOF
20970rm -f conftest.$ac_objext
20971if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 20972 (eval $ac_compile) 2>conftest.er1
c0d27fcc 20973 ac_status=$?
35996d22
AS
20974 grep -v '^ *+' conftest.er1 >conftest.err
20975 rm -f conftest.er1
20976 cat conftest.err >&5
c0d27fcc
MR
20977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20978 (exit $ac_status); } &&
551ffc27
ST
20979 { ac_try='test -z "$ac_c_werror_flag"
20980 || test ! -s conftest.err'
35996d22
AS
20981 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20982 (eval $ac_try) 2>&5
20983 ac_status=$?
20984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20985 (exit $ac_status); }; } &&
20986 { ac_try='test -s conftest.$ac_objext'
c0d27fcc
MR
20987 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20988 (eval $ac_try) 2>&5
20989 ac_status=$?
20990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20991 (exit $ac_status); }; }; then
20992 ac_header_compiler=yes
20993else
20994 echo "$as_me: failed program was:" >&5
19650fd6
AS
20995sed 's/^/| /' conftest.$ac_ext >&5
20996
c0d27fcc
MR
20997ac_header_compiler=no
20998fi
35996d22 20999rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
21000echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21001echo "${ECHO_T}$ac_header_compiler" >&6
21002
21003# Is the header present?
21004echo "$as_me:$LINENO: checking $ac_header presence" >&5
21005echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
21006cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21007/* confdefs.h. */
21008_ACEOF
21009cat confdefs.h >>conftest.$ac_ext
21010cat >>conftest.$ac_ext <<_ACEOF
21011/* end confdefs.h. */
503d2be0
AS
21012#include <$ac_header>
21013_ACEOF
c0d27fcc 21014if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
503d2be0
AS
21015 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21016 ac_status=$?
6bae0ccf 21017 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21018 rm -f conftest.er1
21019 cat conftest.err >&5
c0d27fcc 21020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
21021 (exit $ac_status); } >/dev/null; then
21022 if test -s conftest.err; then
21023 ac_cpp_err=$ac_c_preproc_warn_flag
35996d22 21024 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
503d2be0
AS
21025 else
21026 ac_cpp_err=
21027 fi
647847ea 21028else
503d2be0
AS
21029 ac_cpp_err=yes
21030fi
21031if test -z "$ac_cpp_err"; then
c0d27fcc 21032 ac_header_preproc=yes
647847ea 21033else
503d2be0 21034 echo "$as_me: failed program was:" >&5
19650fd6
AS
21035sed 's/^/| /' conftest.$ac_ext >&5
21036
c0d27fcc 21037 ac_header_preproc=no
647847ea 21038fi
503d2be0 21039rm -f conftest.err conftest.$ac_ext
c0d27fcc
MR
21040echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21041echo "${ECHO_T}$ac_header_preproc" >&6
21042
21043# So? What about this header?
35996d22
AS
21044case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21045 yes:no: )
c0d27fcc
MR
21046 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21047echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35996d22
AS
21048 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21049echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21050 ac_header_preproc=yes
19650fd6 21051 ;;
35996d22 21052 no:yes:* )
c0d27fcc
MR
21053 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21054echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35996d22
AS
21055 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21056echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21057 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21058echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21059 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21060echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21061 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21062echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35996d22
AS
21063 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21064echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19650fd6
AS
21065 (
21066 cat <<\_ASBOX
35996d22
AS
21067## ------------------------------------------ ##
21068## Report this to the AC_PACKAGE_NAME lists. ##
21069## ------------------------------------------ ##
19650fd6
AS
21070_ASBOX
21071 ) |
21072 sed "s/^/$as_me: WARNING: /" >&2
21073 ;;
c0d27fcc
MR
21074esac
21075echo "$as_me:$LINENO: checking for $ac_header" >&5
21076echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21077if eval "test \"\${$as_ac_Header+set}\" = set"; then
21078 echo $ECHO_N "(cached) $ECHO_C" >&6
21079else
35996d22 21080 eval "$as_ac_Header=\$ac_header_preproc"
647847ea 21081fi
c0d27fcc 21082echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
503d2be0 21083echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
c0d27fcc
MR
21084
21085fi
503d2be0 21086if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21087 cat >>confdefs.h <<_ACEOF
503d2be0 21088#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21089_ACEOF
647847ea 21090
73b77ee5 21091fi
c0d27fcc 21092
503d2be0 21093done
73b77ee5 21094
c0d27fcc
MR
21095
21096
503d2be0
AS
21097for ac_func in fork vfork
21098do
21099as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
c0d27fcc 21100echo "$as_me:$LINENO: checking for $ac_func" >&5
503d2be0
AS
21101echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
21102if eval "test \"\${$as_ac_var+set}\" = set"; then
21103 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 21104else
503d2be0 21105 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21106/* confdefs.h. */
21107_ACEOF
21108cat confdefs.h >>conftest.$ac_ext
21109cat >>conftest.$ac_ext <<_ACEOF
21110/* end confdefs.h. */
35996d22
AS
21111/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21112 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21113#define $ac_func innocuous_$ac_func
21114
fa0b693c 21115/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
21116 which can conflict with char $ac_func (); below.
21117 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
21118 <limits.h> exists even on freestanding compilers. */
35996d22 21119
19650fd6
AS
21120#ifdef __STDC__
21121# include <limits.h>
21122#else
21123# include <assert.h>
21124#endif
35996d22
AS
21125
21126#undef $ac_func
21127
fa0b693c 21128/* Override any gcc2 internal prototype to avoid an error. */
503d2be0
AS
21129#ifdef __cplusplus
21130extern "C"
19650fd6 21131{
503d2be0 21132#endif
fa0b693c 21133/* We use char because int might match the return type of a gcc2
503d2be0
AS
21134 builtin and then its argument prototype would still apply. */
21135char $ac_func ();
fa0b693c
GM
21136/* The GNU C library defines this for functions which it implements
21137 to always fail with ENOSYS. Some functions are actually named
21138 something starting with __ and the normal name is an alias. */
503d2be0 21139#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
fa0b693c
GM
21140choke me
21141#else
19650fd6
AS
21142char (*f) () = $ac_func;
21143#endif
21144#ifdef __cplusplus
21145}
fa0b693c
GM
21146#endif
21147
19650fd6
AS
21148int
21149main ()
21150{
21151return f != $ac_func;
503d2be0
AS
21152 ;
21153 return 0;
21154}
21155_ACEOF
21156rm -f conftest.$ac_objext conftest$ac_exeext
c0d27fcc 21157if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 21158 (eval $ac_link) 2>conftest.er1
503d2be0 21159 ac_status=$?
35996d22
AS
21160 grep -v '^ *+' conftest.er1 >conftest.err
21161 rm -f conftest.er1
21162 cat conftest.err >&5
c0d27fcc 21163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21164 (exit $ac_status); } &&
551ffc27
ST
21165 { ac_try='test -z "$ac_c_werror_flag"
21166 || test ! -s conftest.err'
35996d22
AS
21167 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21168 (eval $ac_try) 2>&5
21169 ac_status=$?
21170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21171 (exit $ac_status); }; } &&
21172 { ac_try='test -s conftest$ac_exeext'
c0d27fcc 21173 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
21174 (eval $ac_try) 2>&5
21175 ac_status=$?
c0d27fcc 21176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
21177 (exit $ac_status); }; }; then
21178 eval "$as_ac_var=yes"
21179else
21180 echo "$as_me: failed program was:" >&5
19650fd6
AS
21181sed 's/^/| /' conftest.$ac_ext >&5
21182
503d2be0
AS
21183eval "$as_ac_var=no"
21184fi
35996d22
AS
21185rm -f conftest.err conftest.$ac_objext \
21186 conftest$ac_exeext conftest.$ac_ext
503d2be0 21187fi
c0d27fcc 21188echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
503d2be0
AS
21189echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
21190if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 21191 cat >>confdefs.h <<_ACEOF
503d2be0 21192#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 21193_ACEOF
503d2be0 21194
fa0b693c 21195fi
503d2be0 21196done
fa0b693c 21197
503d2be0 21198if test "x$ac_cv_func_fork" = xyes; then
c0d27fcc 21199 echo "$as_me:$LINENO: checking for working fork" >&5
503d2be0
AS
21200echo $ECHO_N "checking for working fork... $ECHO_C" >&6
21201if test "${ac_cv_func_fork_works+set}" = set; then
21202 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 21203else
503d2be0
AS
21204 if test "$cross_compiling" = yes; then
21205 ac_cv_func_fork_works=cross
21206else
21207 cat >conftest.$ac_ext <<_ACEOF
c0d27fcc 21208/* By Ruediger Kuhlmann. */
503d2be0
AS
21209 #include <sys/types.h>
21210 #if HAVE_UNISTD_H
21211 # include <unistd.h>
21212 #endif
21213 /* Some systems only have a dummy stub for fork() */
21214 int main ()
21215 {
35996d22
AS
21216 if (fork() < 0)
21217 exit (1);
21218 exit (0);
503d2be0
AS
21219 }
21220_ACEOF
21221rm -f conftest$ac_exeext
c0d27fcc 21222if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
21223 (eval $ac_link) 2>&5
21224 ac_status=$?
c0d27fcc 21225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21226 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 21227 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
21228 (eval $ac_try) 2>&5
21229 ac_status=$?
c0d27fcc 21230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
21231 (exit $ac_status); }; }; then
21232 ac_cv_func_fork_works=yes
21233else
21234 echo "$as_me: program exited with status $ac_status" >&5
21235echo "$as_me: failed program was:" >&5
19650fd6
AS
21236sed 's/^/| /' conftest.$ac_ext >&5
21237
c0d27fcc 21238( exit $ac_status )
503d2be0
AS
21239ac_cv_func_fork_works=no
21240fi
35996d22 21241rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
21242fi
21243fi
c0d27fcc 21244echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
503d2be0
AS
21245echo "${ECHO_T}$ac_cv_func_fork_works" >&6
21246
6bae0ccf
DL
21247else
21248 ac_cv_func_fork_works=$ac_cv_func_fork
503d2be0
AS
21249fi
21250if test "x$ac_cv_func_fork_works" = xcross; then
21251 case $host in
21252 *-*-amigaos* | *-*-msdosdjgpp*)
21253 # Override, as these systems have only a dummy fork() stub
21254 ac_cv_func_fork_works=no
21255 ;;
21256 *)
21257 ac_cv_func_fork_works=yes
21258 ;;
21259 esac
c0d27fcc
MR
21260 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
21261echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
fa0b693c 21262fi
73b77ee5 21263ac_cv_func_vfork_works=$ac_cv_func_vfork
503d2be0 21264if test "x$ac_cv_func_vfork" = xyes; then
c0d27fcc 21265 echo "$as_me:$LINENO: checking for working vfork" >&5
503d2be0
AS
21266echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
21267if test "${ac_cv_func_vfork_works+set}" = set; then
21268 echo $ECHO_N "(cached) $ECHO_C" >&6
21269else
21270 if test "$cross_compiling" = yes; then
21271 ac_cv_func_vfork_works=cross
fa0b693c 21272else
503d2be0 21273 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21274/* confdefs.h. */
21275_ACEOF
21276cat confdefs.h >>conftest.$ac_ext
21277cat >>conftest.$ac_ext <<_ACEOF
21278/* end confdefs.h. */
73b77ee5
GM
21279/* Thanks to Paul Eggert for this test. */
21280#include <stdio.h>
19650fd6 21281#include <stdlib.h>
fa0b693c 21282#include <sys/types.h>
73b77ee5 21283#include <sys/stat.h>
19650fd6 21284#include <sys/wait.h>
503d2be0
AS
21285#if HAVE_UNISTD_H
21286# include <unistd.h>
73b77ee5 21287#endif
503d2be0
AS
21288#if HAVE_VFORK_H
21289# include <vfork.h>
73b77ee5
GM
21290#endif
21291/* On some sparc systems, changes by the child to local and incoming
503d2be0
AS
21292 argument registers are propagated back to the parent. The compiler
21293 is told about this with #include <vfork.h>, but some compilers
21294 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
21295 static variable whose address is put into a register that is
21296 clobbered by the vfork. */
19650fd6 21297static void
fa0b693c 21298#ifdef __cplusplus
73b77ee5 21299sparc_address_test (int arg)
503d2be0 21300# else
73b77ee5 21301sparc_address_test (arg) int arg;
fa0b693c 21302#endif
fa0b693c 21303{
73b77ee5
GM
21304 static pid_t child;
21305 if (!child) {
21306 child = vfork ();
21307 if (child < 0) {
21308 perror ("vfork");
21309 _exit(2);
21310 }
21311 if (!child) {
21312 arg = getpid();
21313 write(-1, "", 0);
21314 _exit (arg);
21315 }
21316 }
21317}
503d2be0
AS
21318
21319int
21320main ()
21321{
73b77ee5
GM
21322 pid_t parent = getpid ();
21323 pid_t child;
fa0b693c 21324
19650fd6 21325 sparc_address_test (0);
fa0b693c 21326
73b77ee5 21327 child = vfork ();
fa0b693c 21328
73b77ee5 21329 if (child == 0) {
503d2be0
AS
21330 /* Here is another test for sparc vfork register problems. This
21331 test uses lots of local variables, at least as many local
21332 variables as main has allocated so far including compiler
21333 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
21334 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
21335 reuse the register of parent for one of the local variables,
21336 since it will think that parent can't possibly be used any more
21337 in this routine. Assigning to the local variable will thus
21338 munge parent in the parent process. */
73b77ee5
GM
21339 pid_t
21340 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
21341 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
21342 /* Convince the compiler that p..p7 are live; otherwise, it might
21343 use the same hardware register for all 8 local variables. */
21344 if (p != p1 || p != p2 || p != p3 || p != p4
21345 || p != p5 || p != p6 || p != p7)
21346 _exit(1);
fa0b693c 21347
503d2be0
AS
21348 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
21349 from child file descriptors. If the child closes a descriptor
21350 before it execs or exits, this munges the parent's descriptor
21351 as well. Test for this by closing stdout in the child. */
73b77ee5
GM
21352 _exit(close(fileno(stdout)) != 0);
21353 } else {
21354 int status;
21355 struct stat st;
21356
21357 while (wait(&status) != child)
21358 ;
21359 exit(
21360 /* Was there some problem with vforking? */
21361 child < 0
21362
21363 /* Did the child fail? (This shouldn't happen.) */
21364 || status
21365
21366 /* Did the vfork/compiler bug occur? */
21367 || parent != getpid()
fa0b693c 21368
73b77ee5
GM
21369 /* Did the file descriptor bug occur? */
21370 || fstat(fileno(stdout), &st) != 0
21371 );
21372 }
21373}
503d2be0
AS
21374_ACEOF
21375rm -f conftest$ac_exeext
c0d27fcc 21376if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
503d2be0
AS
21377 (eval $ac_link) 2>&5
21378 ac_status=$?
c0d27fcc 21379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21380 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
c0d27fcc 21381 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
21382 (eval $ac_try) 2>&5
21383 ac_status=$?
c0d27fcc 21384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21385 (exit $ac_status); }; }; then
73b77ee5 21386 ac_cv_func_vfork_works=yes
fa0b693c 21387else
503d2be0
AS
21388 echo "$as_me: program exited with status $ac_status" >&5
21389echo "$as_me: failed program was:" >&5
19650fd6
AS
21390sed 's/^/| /' conftest.$ac_ext >&5
21391
c0d27fcc 21392( exit $ac_status )
503d2be0
AS
21393ac_cv_func_vfork_works=no
21394fi
35996d22 21395rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fa0b693c 21396fi
fa0b693c 21397fi
c0d27fcc 21398echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
503d2be0 21399echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
fa0b693c 21400
503d2be0
AS
21401fi;
21402if test "x$ac_cv_func_fork_works" = xcross; then
35996d22 21403 ac_cv_func_vfork_works=$ac_cv_func_vfork
c0d27fcc
MR
21404 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
21405echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
fa0b693c
GM
21406fi
21407
503d2be0
AS
21408if test "x$ac_cv_func_vfork_works" = xyes; then
21409
c0d27fcc 21410cat >>confdefs.h <<\_ACEOF
503d2be0 21411#define HAVE_WORKING_VFORK 1
c0d27fcc 21412_ACEOF
503d2be0
AS
21413
21414else
21415
c0d27fcc 21416cat >>confdefs.h <<\_ACEOF
73b77ee5 21417#define vfork fork
c0d27fcc 21418_ACEOF
fa0b693c
GM
21419
21420fi
503d2be0
AS
21421if test "x$ac_cv_func_fork_works" = xyes; then
21422
c0d27fcc 21423cat >>confdefs.h <<\_ACEOF
503d2be0 21424#define HAVE_WORKING_FORK 1
c0d27fcc 21425_ACEOF
fa0b693c 21426
503d2be0 21427fi
647847ea 21428
c0d27fcc 21429
6a3a24fa
JD
21430echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5
21431echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
21432if test "${emacs_cv_langinfo_codeset+set}" = set; then
21433 echo $ECHO_N "(cached) $ECHO_C" >&6
21434else
21435 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21436/* confdefs.h. */
21437_ACEOF
21438cat confdefs.h >>conftest.$ac_ext
21439cat >>conftest.$ac_ext <<_ACEOF
21440/* end confdefs.h. */
6a3a24fa
JD
21441#include <langinfo.h>
21442int
21443main ()
21444{
21445char* cs = nl_langinfo(CODESET);
21446 ;
21447 return 0;
21448}
21449_ACEOF
21450rm -f conftest.$ac_objext conftest$ac_exeext
21451if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35996d22 21452 (eval $ac_link) 2>conftest.er1
6a3a24fa 21453 ac_status=$?
35996d22
AS
21454 grep -v '^ *+' conftest.er1 >conftest.err
21455 rm -f conftest.er1
21456 cat conftest.err >&5
6a3a24fa
JD
21457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21458 (exit $ac_status); } &&
551ffc27
ST
21459 { ac_try='test -z "$ac_c_werror_flag"
21460 || test ! -s conftest.err'
35996d22
AS
21461 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21462 (eval $ac_try) 2>&5
21463 ac_status=$?
21464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21465 (exit $ac_status); }; } &&
21466 { ac_try='test -s conftest$ac_exeext'
6a3a24fa
JD
21467 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21468 (eval $ac_try) 2>&5
21469 ac_status=$?
21470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21471 (exit $ac_status); }; }; then
21472 emacs_cv_langinfo_codeset=yes
21473else
21474 echo "$as_me: failed program was:" >&5
19650fd6
AS
21475sed 's/^/| /' conftest.$ac_ext >&5
21476
6a3a24fa
JD
21477emacs_cv_langinfo_codeset=no
21478fi
35996d22
AS
21479rm -f conftest.err conftest.$ac_objext \
21480 conftest$ac_exeext conftest.$ac_ext
6a3a24fa
JD
21481
21482fi
21483echo "$as_me:$LINENO: result: $emacs_cv_langinfo_codeset" >&5
21484echo "${ECHO_T}$emacs_cv_langinfo_codeset" >&6
21485if test $emacs_cv_langinfo_codeset = yes; then
21486
21487cat >>confdefs.h <<\_ACEOF
21488#define HAVE_LANGINFO_CODESET 1
21489_ACEOF
21490
21491fi
21492
c0d27fcc 21493echo "$as_me:$LINENO: checking for size_t" >&5
503d2be0
AS
21494echo $ECHO_N "checking for size_t... $ECHO_C" >&6
21495if test "${ac_cv_type_size_t+set}" = set; then
21496 echo $ECHO_N "(cached) $ECHO_C" >&6
8730a8da 21497else
503d2be0 21498 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21499/* confdefs.h. */
21500_ACEOF
21501cat confdefs.h >>conftest.$ac_ext
21502cat >>conftest.$ac_ext <<_ACEOF
21503/* end confdefs.h. */
503d2be0
AS
21504$ac_includes_default
21505int
21506main ()
21507{
21508if ((size_t *) 0)
21509 return 0;
21510if (sizeof (size_t))
21511 return 0;
21512 ;
21513 return 0;
21514}
21515_ACEOF
21516rm -f conftest.$ac_objext
c0d27fcc 21517if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 21518 (eval $ac_compile) 2>conftest.er1
503d2be0 21519 ac_status=$?
35996d22
AS
21520 grep -v '^ *+' conftest.er1 >conftest.err
21521 rm -f conftest.er1
21522 cat conftest.err >&5
c0d27fcc 21523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21524 (exit $ac_status); } &&
551ffc27
ST
21525 { ac_try='test -z "$ac_c_werror_flag"
21526 || test ! -s conftest.err'
35996d22
AS
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 21533 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
503d2be0
AS
21534 (eval $ac_try) 2>&5
21535 ac_status=$?
c0d27fcc 21536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21537 (exit $ac_status); }; }; then
8730a8da
DL
21538 ac_cv_type_size_t=yes
21539else
503d2be0 21540 echo "$as_me: failed program was:" >&5
19650fd6
AS
21541sed 's/^/| /' conftest.$ac_ext >&5
21542
503d2be0 21543ac_cv_type_size_t=no
8730a8da 21544fi
35996d22 21545rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8730a8da 21546fi
c0d27fcc 21547echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
503d2be0
AS
21548echo "${ECHO_T}$ac_cv_type_size_t" >&6
21549if test $ac_cv_type_size_t = yes; then
503d2be0 21550
c0d27fcc
MR
21551cat >>confdefs.h <<_ACEOF
21552#define HAVE_SIZE_T 1
21553_ACEOF
21554
8730a8da
DL
21555
21556fi
21557
c0d27fcc 21558
973a76b1
DL
21559echo "$as_me:$LINENO: checking for mbstate_t" >&5
21560echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6
21561if test "${ac_cv_type_mbstate_t+set}" = set; then
21562 echo $ECHO_N "(cached) $ECHO_C" >&6
21563else
21564 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21565/* confdefs.h. */
21566_ACEOF
21567cat confdefs.h >>conftest.$ac_ext
21568cat >>conftest.$ac_ext <<_ACEOF
21569/* end confdefs.h. */
973a76b1
DL
21570$ac_includes_default
21571# include <wchar.h>
21572int
21573main ()
21574{
21575mbstate_t x; return sizeof x;
21576 ;
21577 return 0;
21578}
21579_ACEOF
21580rm -f conftest.$ac_objext
21581if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 21582 (eval $ac_compile) 2>conftest.er1
973a76b1 21583 ac_status=$?
35996d22
AS
21584 grep -v '^ *+' conftest.er1 >conftest.err
21585 rm -f conftest.er1
21586 cat conftest.err >&5
973a76b1
DL
21587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21588 (exit $ac_status); } &&
551ffc27
ST
21589 { ac_try='test -z "$ac_c_werror_flag"
21590 || test ! -s conftest.err'
35996d22
AS
21591 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21592 (eval $ac_try) 2>&5
21593 ac_status=$?
21594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21595 (exit $ac_status); }; } &&
21596 { ac_try='test -s conftest.$ac_objext'
973a76b1
DL
21597 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21598 (eval $ac_try) 2>&5
21599 ac_status=$?
21600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21601 (exit $ac_status); }; }; then
21602 ac_cv_type_mbstate_t=yes
21603else
21604 echo "$as_me: failed program was:" >&5
19650fd6
AS
21605sed 's/^/| /' conftest.$ac_ext >&5
21606
973a76b1
DL
21607ac_cv_type_mbstate_t=no
21608fi
35996d22 21609rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
973a76b1
DL
21610fi
21611echo "$as_me:$LINENO: result: $ac_cv_type_mbstate_t" >&5
21612echo "${ECHO_T}$ac_cv_type_mbstate_t" >&6
21613 if test $ac_cv_type_mbstate_t = yes; then
21614
21615cat >>confdefs.h <<\_ACEOF
21616#define HAVE_MBSTATE_T 1
21617_ACEOF
21618
21619 else
21620
21621cat >>confdefs.h <<\_ACEOF
21622#define mbstate_t int
21623_ACEOF
21624
21625 fi
21626
22044edf
DL
21627echo "$as_me:$LINENO: checking for C restrict keyword" >&5
21628echo $ECHO_N "checking for C restrict keyword... $ECHO_C" >&6
21629if test "${emacs_cv_c_restrict+set}" = set; then
21630 echo $ECHO_N "(cached) $ECHO_C" >&6
21631else
21632 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21633/* confdefs.h. */
21634_ACEOF
21635cat confdefs.h >>conftest.$ac_ext
21636cat >>conftest.$ac_ext <<_ACEOF
21637/* end confdefs.h. */
22044edf
DL
21638void fred (int *restrict x);
21639int
21640main ()
21641{
b936fae4 21642
22044edf
DL
21643 ;
21644 return 0;
21645}
c0d27fcc 21646_ACEOF
22044edf
DL
21647rm -f conftest.$ac_objext
21648if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 21649 (eval $ac_compile) 2>conftest.er1
22044edf 21650 ac_status=$?
35996d22
AS
21651 grep -v '^ *+' conftest.er1 >conftest.err
21652 rm -f conftest.er1
21653 cat conftest.err >&5
22044edf
DL
21654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21655 (exit $ac_status); } &&
551ffc27
ST
21656 { ac_try='test -z "$ac_c_werror_flag"
21657 || test ! -s conftest.err'
35996d22
AS
21658 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21659 (eval $ac_try) 2>&5
21660 ac_status=$?
21661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21662 (exit $ac_status); }; } &&
21663 { ac_try='test -s conftest.$ac_objext'
22044edf
DL
21664 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21665 (eval $ac_try) 2>&5
21666 ac_status=$?
21667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21668 (exit $ac_status); }; }; then
21669 emacs_cv_c_restrict=yes
21670else
21671 echo "$as_me: failed program was:" >&5
19650fd6
AS
21672sed 's/^/| /' conftest.$ac_ext >&5
21673
22044edf 21674cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21675/* confdefs.h. */
21676_ACEOF
21677cat confdefs.h >>conftest.$ac_ext
21678cat >>conftest.$ac_ext <<_ACEOF
21679/* end confdefs.h. */
22044edf
DL
21680void fred (int *__restrict x);
21681int
21682main ()
21683{
c0d27fcc 21684
22044edf
DL
21685 ;
21686 return 0;
21687}
c0d27fcc 21688_ACEOF
22044edf
DL
21689rm -f conftest.$ac_objext
21690if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 21691 (eval $ac_compile) 2>conftest.er1
22044edf 21692 ac_status=$?
35996d22
AS
21693 grep -v '^ *+' conftest.er1 >conftest.err
21694 rm -f conftest.er1
21695 cat conftest.err >&5
22044edf
DL
21696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21697 (exit $ac_status); } &&
551ffc27
ST
21698 { ac_try='test -z "$ac_c_werror_flag"
21699 || test ! -s conftest.err'
35996d22
AS
21700 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21701 (eval $ac_try) 2>&5
21702 ac_status=$?
21703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21704 (exit $ac_status); }; } &&
21705 { ac_try='test -s conftest.$ac_objext'
22044edf
DL
21706 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21707 (eval $ac_try) 2>&5
21708 ac_status=$?
21709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21710 (exit $ac_status); }; }; then
21711 emacs_cv_c_restrict=__restrict
21712else
21713 echo "$as_me: failed program was:" >&5
19650fd6
AS
21714sed 's/^/| /' conftest.$ac_ext >&5
21715
22044edf 21716emacs_cv_c_restrict=no
ba4481b5 21717fi
35996d22 21718rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 21719fi
35996d22 21720rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 21721fi
22044edf
DL
21722echo "$as_me:$LINENO: result: $emacs_cv_c_restrict" >&5
21723echo "${ECHO_T}$emacs_cv_c_restrict" >&6
21724case "$emacs_cv_c_restrict" in
21725 yes) emacs_restrict=restrict;;
21726 no) emacs_restrict="";;
21727 *) emacs_restrict="$emacs_cv_c_restrict";;
21728esac
21729if test "$emacs_restrict" != __restrict; then
b936fae4 21730
22044edf
DL
21731cat >>confdefs.h <<_ACEOF
21732#define __restrict $emacs_restrict
c0d27fcc 21733_ACEOF
ba4481b5
DL
21734
21735fi
ba4481b5 21736
22044edf
DL
21737echo "$as_me:$LINENO: checking for C restricted array declarations" >&5
21738echo $ECHO_N "checking for C restricted array declarations... $ECHO_C" >&6
21739if test "${emacs_cv_c_restrict_arr+set}" = set; then
21740 echo $ECHO_N "(cached) $ECHO_C" >&6
21741else
21742 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21743/* confdefs.h. */
21744_ACEOF
21745cat confdefs.h >>conftest.$ac_ext
21746cat >>conftest.$ac_ext <<_ACEOF
21747/* end confdefs.h. */
22044edf
DL
21748void fred (int x[__restrict]);
21749int
21750main ()
21751{
b936fae4 21752
22044edf
DL
21753 ;
21754 return 0;
21755}
c0d27fcc 21756_ACEOF
22044edf
DL
21757rm -f conftest.$ac_objext
21758if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35996d22 21759 (eval $ac_compile) 2>conftest.er1
22044edf 21760 ac_status=$?
35996d22
AS
21761 grep -v '^ *+' conftest.er1 >conftest.err
21762 rm -f conftest.er1
21763 cat conftest.err >&5
22044edf
DL
21764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21765 (exit $ac_status); } &&
551ffc27
ST
21766 { ac_try='test -z "$ac_c_werror_flag"
21767 || test ! -s conftest.err'
35996d22
AS
21768 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21769 (eval $ac_try) 2>&5
21770 ac_status=$?
21771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21772 (exit $ac_status); }; } &&
21773 { ac_try='test -s conftest.$ac_objext'
22044edf
DL
21774 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21775 (eval $ac_try) 2>&5
21776 ac_status=$?
21777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21778 (exit $ac_status); }; }; then
21779 emacs_cv_c_restrict_arr=yes
21780else
21781 echo "$as_me: failed program was:" >&5
19650fd6
AS
21782sed 's/^/| /' conftest.$ac_ext >&5
21783
22044edf 21784emacs_cv_c_restrict_arr=no
ba4481b5 21785fi
35996d22 21786rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
22044edf
DL
21787fi
21788echo "$as_me:$LINENO: result: $emacs_cv_c_restrict_arr" >&5
21789echo "${ECHO_T}$emacs_cv_c_restrict_arr" >&6
21790if test "$emacs_cv_c_restrict_arr" = yes; then
b936fae4 21791
c0d27fcc 21792cat >>confdefs.h <<\_ACEOF
22044edf 21793#define __restrict_arr __restrict
c0d27fcc 21794_ACEOF
ba4481b5 21795
ba4481b5
DL
21796fi
21797
c0d27fcc 21798
c0d27fcc 21799
22044edf
DL
21800# Set up the CFLAGS for real compilation, so we can substitute it.
21801CFLAGS="$REAL_CFLAGS"
21802CPPFLAGS="$REAL_CPPFLAGS"
21803
21804#### Find out which version of Emacs this is.
21805version=`grep 'defconst[ ]*emacs-version' ${srcdir}/lisp/version.el \
21806 | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`
21807if test x"${version}" = x; then
21808 { { echo "$as_me:$LINENO: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." >&5
21809echo "$as_me: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." >&2;}
21810 { (exit 1); exit 1; }; }
21811fi
21812
21813### Specify what sort of things we'll be editing into Makefile and config.h.
21814### Use configuration here uncanonicalized to avoid exceeding size limits.
21815
21816
21817
21818
21819
21820
21821
21822
21823
21824
21825
21826
21827
21828
21829
21830
21831
21832
21833
21834
21835
21836
21837
21838
21839
21840
21841
21842
21843
21844
21845
21846
6a3a24fa 21847
22044edf
DL
21848
21849
21850cat >>confdefs.h <<_ACEOF
21851#define EMACS_CONFIGURATION "${canonical}"
21852_ACEOF
21853
21854
21855cat >>confdefs.h <<_ACEOF
21856#define EMACS_CONFIG_OPTIONS "${ac_configure_args}"
21857_ACEOF
21858
21859
21860cat >>confdefs.h <<_ACEOF
21861#define config_machfile "${machfile}"
21862_ACEOF
21863
21864
21865cat >>confdefs.h <<_ACEOF
21866#define config_opsysfile "${opsysfile}"
21867_ACEOF
21868
21869
21870cat >>confdefs.h <<_ACEOF
21871#define LD_SWITCH_X_SITE ${LD_SWITCH_X_SITE}
21872_ACEOF
21873
21874
21875cat >>confdefs.h <<_ACEOF
21876#define LD_SWITCH_X_SITE_AUX ${LD_SWITCH_X_SITE_AUX}
21877_ACEOF
21878
21879
21880cat >>confdefs.h <<_ACEOF
21881#define C_SWITCH_X_SITE ${C_SWITCH_X_SITE}
21882_ACEOF
21883
21884
21885cat >>confdefs.h <<_ACEOF
21886#define UNEXEC_SRC ${UNEXEC_SRC}
21887_ACEOF
21888
21889
21890if test "${HAVE_X_WINDOWS}" = "yes" ; then
21891
21892cat >>confdefs.h <<\_ACEOF
21893#define HAVE_X_WINDOWS 1
21894_ACEOF
21895
21896fi
21897if test "${USE_X_TOOLKIT}" != "none" ; then
21898
21899cat >>confdefs.h <<\_ACEOF
21900#define USE_X_TOOLKIT 1
21901_ACEOF
21902
21903fi
21904if test "${HAVE_X11}" = "yes" ; then
21905
21906cat >>confdefs.h <<\_ACEOF
21907#define HAVE_X11 1
21908_ACEOF
21909
21910fi
21911if test "${HAVE_XFREE386}" = "yes" ; then
21912
21913cat >>confdefs.h <<\_ACEOF
21914#define HAVE_XFREE386 1
21915_ACEOF
21916
21917fi
21918if test "${HAVE_MENUS}" = "yes" ; then
21919
21920cat >>confdefs.h <<\_ACEOF
21921#define HAVE_MENUS 1
21922_ACEOF
21923
21924fi
21925if test "${GNU_MALLOC}" = "yes" ; then
21926
21927cat >>confdefs.h <<\_ACEOF
21928#define GNU_MALLOC 1
21929_ACEOF
21930
21931fi
21932if test "${REL_ALLOC}" = "yes" ; then
21933
21934cat >>confdefs.h <<\_ACEOF
21935#define REL_ALLOC 1
21936_ACEOF
21937
21938fi
21939
21940
21941
c0d27fcc
MR
21942
21943
ba4481b5 21944#### Report on what we decided to do.
488dd4c4
JD
21945#### Report GTK as a toolkit, even if it doesn't use Xt.
21946#### It makes printing result more understandable as using GTK sets
21947#### toolkit_scroll_bars to yes by default.
21948if test "${HAVE_GTK}" = "yes"; then
21949 USE_X_TOOLKIT=GTK
21950fi
21951
ba4481b5
DL
21952echo "
21953Configured for \`${canonical}'.
21954
21955 Where should the build process find the source code? ${srcdir}
21956 What operating system and machine description files should Emacs use?
21957 \`${opsysfile}' and \`${machfile}'
21958 What compiler should emacs be built with? ${CC} ${CFLAGS}
21959 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
73b77ee5 21960 Should Emacs use a relocating allocator for buffers? ${REL_ALLOC}
ef9e4345 21961 Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers
ba4481b5 21962 What window system should Emacs use? ${window_system}
8e967cf7 21963 What toolkit should Emacs use? ${USE_X_TOOLKIT}"
ba4481b5
DL
21964
21965if test -n "${x_includes}"; then
21966echo " Where do we find X Windows header files? ${x_includes}"
21967else
21968echo " Where do we find X Windows header files? Standard dirs"
21969fi
21970if test -n "${x_libraries}"; then
21971echo " Where do we find X Windows libraries? ${x_libraries}"
21972else
21973echo " Where do we find X Windows libraries? Standard dirs"
21974fi
21975
21976echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}"
21977echo " Does Emacs use -lXpm? ${HAVE_XPM}"
21978echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
21979echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
21980echo " Does Emacs use -lungif? ${HAVE_GIF}"
21981echo " Does Emacs use -lpng? ${HAVE_PNG}"
21982echo " Does Emacs use X toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}"
21983echo
21984
d0098f13
JD
21985if test $USE_XASSERTS = yes; then
21986 echo " Compiling with asserts turned on."
d0098f13
JD
21987 CPPFLAGS="$CPPFLAGS -DXASSERTS=1"
21988 echo
21989fi
05cf15c6 21990
05cf15c6 21991
05cf15c6 21992
ba4481b5
DL
21993# Remove any trailing slashes in these variables.
21994test "${prefix}" != NONE &&
21995 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
21996test "${exec_prefix}" != NONE &&
21997 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
21998
d0e9bfd2
GM
21999## Check if the C preprocessor will convert `..' to `. .'. If so, set
22000## CPP_NEED_TRADITIONAL to `yes' so that the code to generate Makefile
22001## from Makefile.c can correctly provide the arg `-traditional' to the
22002## C preprocessor.
22003
503d2be0 22004cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22005/* confdefs.h. */
22006_ACEOF
22007cat confdefs.h >>conftest.$ac_ext
22008cat >>conftest.$ac_ext <<_ACEOF
22009/* end confdefs.h. */
d0e9bfd2 22010yes..yes
503d2be0 22011_ACEOF
d0e9bfd2 22012if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 22013 $EGREP "yes..yes" >/dev/null 2>&1; then
d0e9bfd2
GM
22014 CPP_NEED_TRADITIONAL=no
22015else
d0e9bfd2
GM
22016 CPP_NEED_TRADITIONAL=yes
22017fi
22018rm -f conftest*
22019
c0d27fcc 22020
6bae0ccf
DL
22021 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"
22022 ac_config_commands="$ac_config_commands default"
503d2be0 22023cat >confcache <<\_ACEOF
ba4481b5
DL
22024# This file is a shell script that caches the results of configure
22025# tests run on this system so they can be shared between configure
503d2be0
AS
22026# scripts and configure runs, see configure's option --config-cache.
22027# It is not useful on other systems. If it contains results you don't
22028# want to keep, you may remove or edit it.
ba4481b5 22029#
503d2be0
AS
22030# config.status only pays attention to the cache file if you give it
22031# the --recheck option to rerun configure.
ba4481b5 22032#
6bae0ccf 22033# `ac_cv_env_foo' variables (set or unset) will be overridden when
503d2be0
AS
22034# loading this file, other *unset* `ac_cv_foo' will be assigned the
22035# following values.
22036
22037_ACEOF
22038
ba4481b5
DL
22039# The following way of writing the cache mishandles newlines in values,
22040# but we know of no workaround that is simple, portable, and efficient.
22041# So, don't put newlines in cache variables' values.
22042# Ultrix sh set writes to stderr and can't be redirected directly,
22043# and sets the high bit in the cache file unless we assign to the vars.
503d2be0
AS
22044{
22045 (set) 2>&1 |
22046 case `(ac_space=' '; set | grep ac_space) 2>&1` in
22047 *ac_space=\ *)
22048 # `set' does not quote correctly, so add quotes (double-quote
22049 # substitution turns \\\\ into \\, and sed turns \\ into \).
22050 sed -n \
35996d22
AS
22051 "s/'/'\\\\''/g;
22052 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
503d2be0
AS
22053 ;;
22054 *)
22055 # `set' quotes correctly as required by POSIX, so do not add quotes.
22056 sed -n \
35996d22 22057 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
503d2be0
AS
22058 ;;
22059 esac;
22060} |
22061 sed '
22062 t clear
22063 : clear
22064 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
22065 t end
22066 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
22067 : end' >>confcache
19650fd6 22068if diff $cache_file confcache >/dev/null 2>&1; then :; else
ba4481b5 22069 if test -w $cache_file; then
503d2be0
AS
22070 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
22071 cat confcache >$cache_file
ba4481b5
DL
22072 else
22073 echo "not updating unwritable cache $cache_file"
22074 fi
22075fi
22076rm -f confcache
22077
ba4481b5
DL
22078test "x$prefix" = xNONE && prefix=$ac_default_prefix
22079# Let make expand exec_prefix.
22080test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
22081
503d2be0
AS
22082# VPATH may cause trouble with some makes, so we remove $(srcdir),
22083# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
22084# trailing colons and then remove the whole line if VPATH becomes empty
22085# (actually we leave an empty line to preserve line numbers).
ba4481b5 22086if test "x$srcdir" = x.; then
35996d22 22087 ac_vpsub='/^[ ]*VPATH[ ]*=/{
503d2be0
AS
22088s/:*\$(srcdir):*/:/;
22089s/:*\${srcdir}:*/:/;
22090s/:*@srcdir@:*/:/;
35996d22 22091s/^\([^=]*=[ ]*\):*/\1/;
503d2be0 22092s/:*$//;
35996d22 22093s/^[^=]*=[ ]*$//;
503d2be0 22094}'
ba4481b5
DL
22095fi
22096
ba4481b5
DL
22097DEFS=-DHAVE_CONFIG_H
22098
6bae0ccf
DL
22099ac_libobjs=
22100ac_ltlibobjs=
22101for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
22102 # 1. Remove the extension, and $U if already installed.
22103 ac_i=`echo "$ac_i" |
35996d22 22104 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
6bae0ccf
DL
22105 # 2. Add them.
22106 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
22107 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
22108done
22109LIBOBJS=$ac_libobjs
22110
22111LTLIBOBJS=$ac_ltlibobjs
22112
22113
c0d27fcc 22114
ba4481b5 22115: ${CONFIG_STATUS=./config.status}
503d2be0
AS
22116ac_clean_files_save=$ac_clean_files
22117ac_clean_files="$ac_clean_files $CONFIG_STATUS"
c0d27fcc 22118{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
503d2be0
AS
22119echo "$as_me: creating $CONFIG_STATUS" >&6;}
22120cat >$CONFIG_STATUS <<_ACEOF
22121#! $SHELL
c0d27fcc 22122# Generated by $as_me.
ba4481b5 22123# Run this file to recreate the current configuration.
ba4481b5 22124# Compiler output produced by configure, useful for debugging
503d2be0 22125# configure, is in config.log if it exists.
ba4481b5 22126
503d2be0 22127debug=false
19650fd6
AS
22128ac_cs_recheck=false
22129ac_cs_silent=false
503d2be0 22130SHELL=\${CONFIG_SHELL-$SHELL}
503d2be0
AS
22131_ACEOF
22132
22133cat >>$CONFIG_STATUS <<\_ACEOF
c0d27fcc
MR
22134## --------------------- ##
22135## M4sh Initialization. ##
22136## --------------------- ##
22137
503d2be0
AS
22138# Be Bourne compatible
22139if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
22140 emulate sh
22141 NULLCMD=:
6bae0ccf
DL
22142 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
22143 # is contrary to our usage. Disable this feature.
22144 alias -g '${1+"$@"}'='"$@"'
503d2be0
AS
22145elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
22146 set -o posix
22147fi
35996d22 22148DUALCASE=1; export DUALCASE # for MKS sh
503d2be0 22149
c0d27fcc 22150# Support unset when possible.
35996d22 22151if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
c0d27fcc
MR
22152 as_unset=unset
22153else
22154 as_unset=false
22155fi
22156
6bae0ccf
DL
22157
22158# Work around bugs in pre-3.0 UWIN ksh.
22159$as_unset ENV MAIL MAILPATH
22160PS1='$ '
22161PS2='> '
22162PS4='+ '
22163
22164# NLS nuisances.
19650fd6
AS
22165for as_var in \
22166 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
22167 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
22168 LC_TELEPHONE LC_TIME
6bae0ccf 22169do
35996d22 22170 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
6bae0ccf
DL
22171 eval $as_var=C; export $as_var
22172 else
22173 $as_unset $as_var
22174 fi
22175done
22176
22177# Required to use basename.
22178if expr a : '\(a\)' >/dev/null 2>&1; then
22179 as_expr=expr
22180else
22181 as_expr=false
22182fi
22183
22184if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
22185 as_basename=basename
22186else
22187 as_basename=false
22188fi
c0d27fcc
MR
22189
22190
503d2be0 22191# Name of the executable.
6bae0ccf 22192as_me=`$as_basename "$0" ||
c0d27fcc
MR
22193$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
22194 X"$0" : 'X\(//\)$' \| \
22195 X"$0" : 'X\(/\)$' \| \
22196 . : '\(.\)' 2>/dev/null ||
22197echo X/"$0" |
22198 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
22199 /^X\/\(\/\/\)$/{ s//\1/; q; }
22200 /^X\/\(\/\).*/{ s//\1/; q; }
22201 s/.*/./; q'`
22202
6bae0ccf 22203
c0d27fcc
MR
22204# PATH needs CR, and LINENO needs CR and PATH.
22205# Avoid depending upon Character Ranges.
22206as_cr_letters='abcdefghijklmnopqrstuvwxyz'
22207as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
22208as_cr_Letters=$as_cr_letters$as_cr_LETTERS
22209as_cr_digits='0123456789'
22210as_cr_alnum=$as_cr_Letters$as_cr_digits
22211
22212# The user is always right.
22213if test "${PATH_SEPARATOR+set}" != set; then
19650fd6
AS
22214 echo "#! /bin/sh" >conf$$.sh
22215 echo "exit 0" >>conf$$.sh
22216 chmod +x conf$$.sh
22217 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
c0d27fcc
MR
22218 PATH_SEPARATOR=';'
22219 else
22220 PATH_SEPARATOR=:
22221 fi
19650fd6 22222 rm -f conf$$.sh
c0d27fcc
MR
22223fi
22224
22225
22226 as_lineno_1=$LINENO
22227 as_lineno_2=$LINENO
22228 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
22229 test "x$as_lineno_1" != "x$as_lineno_2" &&
22230 test "x$as_lineno_3" = "x$as_lineno_2" || {
22231 # Find who we are. Look in the path if we contain no path at all
22232 # relative or not.
22233 case $0 in
22234 *[\\/]* ) as_myself=$0 ;;
22235 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22236for as_dir in $PATH
22237do
22238 IFS=$as_save_IFS
22239 test -z "$as_dir" && as_dir=.
22240 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
22241done
22242
22243 ;;
22244 esac
22245 # We did not find ourselves, most probably we were run as `sh COMMAND'
22246 # in which case we are not to be found in the path.
22247 if test "x$as_myself" = x; then
22248 as_myself=$0
22249 fi
22250 if test ! -f "$as_myself"; then
22251 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
22252echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
22253 { (exit 1); exit 1; }; }
22254 fi
22255 case $CONFIG_SHELL in
22256 '')
22257 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22258for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
22259do
22260 IFS=$as_save_IFS
22261 test -z "$as_dir" && as_dir=.
22262 for as_base in sh bash ksh sh5; do
22263 case $as_dir in
22264 /*)
22265 if ("$as_dir/$as_base" -c '
22266 as_lineno_1=$LINENO
22267 as_lineno_2=$LINENO
22268 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
22269 test "x$as_lineno_1" != "x$as_lineno_2" &&
22270 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
6bae0ccf
DL
22271 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
22272 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
c0d27fcc
MR
22273 CONFIG_SHELL=$as_dir/$as_base
22274 export CONFIG_SHELL
22275 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
22276 fi;;
22277 esac
22278 done
22279done
22280;;
22281 esac
22282
22283 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
22284 # uniformly replaced by the line number. The first 'sed' inserts a
22285 # line-number line before each line; the second 'sed' does the real
22286 # work. The second script uses 'N' to pair each line-number line
22287 # with the numbered line, and appends trailing '-' during
22288 # substitution so that $LINENO is not a special case at line end.
22289 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
22290 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
22291 sed '=' <$as_myself |
22292 sed '
22293 N
22294 s,$,-,
22295 : loop
22296 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
22297 t loop
22298 s,-$,,
22299 s,^['$as_cr_digits']*\n,,
22300 ' >$as_me.lineno &&
22301 chmod +x $as_me.lineno ||
22302 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
22303echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
22304 { (exit 1); exit 1; }; }
22305
22306 # Don't try to exec as it changes $[0], causing all sort of problems
22307 # (the dirname of $[0] is not the place where we might find the
22308 # original and so on. Autoconf is especially sensible to this).
22309 . ./$as_me.lineno
22310 # Exit status is that of the last command.
22311 exit
22312}
22313
22314
22315case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
22316 *c*,-n*) ECHO_N= ECHO_C='
22317' ECHO_T=' ' ;;
22318 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
22319 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
22320esac
503d2be0
AS
22321
22322if expr a : '\(a\)' >/dev/null 2>&1; then
22323 as_expr=expr
22324else
22325 as_expr=false
22326fi
22327
22328rm -f conf$$ conf$$.exe conf$$.file
22329echo >conf$$.file
22330if ln -s conf$$.file conf$$ 2>/dev/null; then
22331 # We could just check for DJGPP; but this test a) works b) is more generic
22332 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
22333 if test -f conf$$.exe; then
22334 # Don't use ln at all; we don't have any links
22335 as_ln_s='cp -p'
22336 else
22337 as_ln_s='ln -s'
22338 fi
22339elif ln conf$$.file conf$$ 2>/dev/null; then
22340 as_ln_s=ln
22341else
22342 as_ln_s='cp -p'
22343fi
22344rm -f conf$$ conf$$.exe conf$$.file
22345
6bae0ccf
DL
22346if mkdir -p . 2>/dev/null; then
22347 as_mkdir_p=:
22348else
35996d22 22349 test -d ./-p && rmdir ./-p
6bae0ccf
DL
22350 as_mkdir_p=false
22351fi
22352
503d2be0
AS
22353as_executable_p="test -f"
22354
c0d27fcc 22355# Sed expression to map a string onto a valid CPP name.
35996d22 22356as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
c0d27fcc
MR
22357
22358# Sed expression to map a string onto a valid variable name.
35996d22 22359as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
503d2be0 22360
503d2be0
AS
22361
22362# IFS
22363# We need space, tab and new line, in precisely that order.
22364as_nl='
22365'
22366IFS=" $as_nl"
22367
22368# CDPATH.
6bae0ccf 22369$as_unset CDPATH
503d2be0
AS
22370
22371exec 6>&1
22372
c0d27fcc
MR
22373# Open the log real soon, to keep \$[0] and so on meaningful, and to
22374# report actual input values of CONFIG_FILES etc. instead of their
22375# values after options handling. Logging --version etc. is OK.
22376exec 5>>config.log
22377{
22378 echo
22379 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
22380## Running $as_me. ##
22381_ASBOX
22382} >&5
22383cat >&5 <<_CSEOF
22384
22385This file was extended by $as_me, which was
35996d22 22386generated by GNU Autoconf 2.59. Invocation command line was
c0d27fcc
MR
22387
22388 CONFIG_FILES = $CONFIG_FILES
22389 CONFIG_HEADERS = $CONFIG_HEADERS
22390 CONFIG_LINKS = $CONFIG_LINKS
22391 CONFIG_COMMANDS = $CONFIG_COMMANDS
22392 $ $0 $@
22393
22394_CSEOF
22395echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
22396echo >&5
503d2be0
AS
22397_ACEOF
22398
22399# Files that config.status was made for.
22400if test -n "$ac_config_files"; then
22401 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
22402fi
22403
22404if test -n "$ac_config_headers"; then
22405 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
22406fi
22407
22408if test -n "$ac_config_links"; then
22409 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
22410fi
22411
22412if test -n "$ac_config_commands"; then
22413 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
22414fi
22415
c0d27fcc 22416cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
22417
22418ac_cs_usage="\
22419\`$as_me' instantiates files from templates according to the
22420current configuration.
22421
22422Usage: $0 [OPTIONS] [FILE]...
22423
22424 -h, --help print this help, then exit
22425 -V, --version print version number, then exit
19650fd6 22426 -q, --quiet do not print progress messages
503d2be0
AS
22427 -d, --debug don't remove temporary files
22428 --recheck update $as_me by reconfiguring in the same conditions
22429 --file=FILE[:TEMPLATE]
35996d22 22430 instantiate the configuration file FILE
503d2be0 22431 --header=FILE[:TEMPLATE]
35996d22 22432 instantiate the configuration header FILE
503d2be0
AS
22433
22434Configuration files:
22435$config_files
22436
22437Configuration headers:
22438$config_headers
22439
22440Configuration commands:
22441$config_commands
22442
22443Report bugs to <bug-autoconf@gnu.org>."
c0d27fcc 22444_ACEOF
503d2be0 22445
c0d27fcc 22446cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
22447ac_cs_version="\\
22448config.status
35996d22 22449configured by $0, generated by GNU Autoconf 2.59,
503d2be0
AS
22450 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
22451
35996d22 22452Copyright (C) 2003 Free Software Foundation, Inc.
503d2be0
AS
22453This config.status script is free software; the Free Software Foundation
22454gives unlimited permission to copy, distribute and modify it."
22455srcdir=$srcdir
22456INSTALL="$INSTALL"
c0d27fcc 22457_ACEOF
503d2be0 22458
c0d27fcc 22459cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
22460# If no file are specified by the user, then we need to provide default
22461# value. By we need to know if files were specified by the user.
22462ac_need_defaults=:
22463while test $# != 0
ba4481b5 22464do
503d2be0
AS
22465 case $1 in
22466 --*=*)
22467 ac_option=`expr "x$1" : 'x\([^=]*\)='`
22468 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
6bae0ccf
DL
22469 ac_shift=:
22470 ;;
22471 -*)
22472 ac_option=$1
22473 ac_optarg=$2
22474 ac_shift=shift
503d2be0 22475 ;;
503d2be0
AS
22476 *) # This is not an option, so the user has probably given explicit
22477 # arguments.
6bae0ccf 22478 ac_option=$1
503d2be0
AS
22479 ac_need_defaults=false;;
22480 esac
22481
6bae0ccf 22482 case $ac_option in
503d2be0 22483 # Handling of the options.
c0d27fcc 22484_ACEOF
f57bd967 22485cat >>$CONFIG_STATUS <<\_ACEOF
19650fd6
AS
22486 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
22487 ac_cs_recheck=: ;;
503d2be0
AS
22488 --version | --vers* | -V )
22489 echo "$ac_cs_version"; exit 0 ;;
22490 --he | --h)
22491 # Conflict between --help and --header
c0d27fcc 22492 { { echo "$as_me:$LINENO: error: ambiguous option: $1
503d2be0
AS
22493Try \`$0 --help' for more information." >&5
22494echo "$as_me: error: ambiguous option: $1
22495Try \`$0 --help' for more information." >&2;}
22496 { (exit 1); exit 1; }; };;
22497 --help | --hel | -h )
22498 echo "$ac_cs_usage"; exit 0 ;;
22499 --debug | --d* | -d )
22500 debug=: ;;
22501 --file | --fil | --fi | --f )
6bae0ccf
DL
22502 $ac_shift
22503 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
503d2be0
AS
22504 ac_need_defaults=false;;
22505 --header | --heade | --head | --hea )
6bae0ccf
DL
22506 $ac_shift
22507 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
503d2be0 22508 ac_need_defaults=false;;
19650fd6
AS
22509 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
22510 | -silent | --silent | --silen | --sile | --sil | --si | --s)
22511 ac_cs_silent=: ;;
503d2be0
AS
22512
22513 # This is an error.
c0d27fcc 22514 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
503d2be0
AS
22515Try \`$0 --help' for more information." >&5
22516echo "$as_me: error: unrecognized option: $1
22517Try \`$0 --help' for more information." >&2;}
22518 { (exit 1); exit 1; }; } ;;
22519
22520 *) ac_config_targets="$ac_config_targets $1" ;;
22521
ba4481b5 22522 esac
503d2be0 22523 shift
ba4481b5
DL
22524done
22525
19650fd6
AS
22526ac_configure_extra_args=
22527
22528if $ac_cs_silent; then
22529 exec 6>/dev/null
22530 ac_configure_extra_args="$ac_configure_extra_args --silent"
22531fi
22532
22533_ACEOF
22534cat >>$CONFIG_STATUS <<_ACEOF
22535if \$ac_cs_recheck; then
22536 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
22537 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
22538fi
22539
503d2be0 22540_ACEOF
ba4481b5 22541
c0d27fcc 22542cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
22543#
22544# INIT-COMMANDS section.
22545#
ba4481b5 22546
503d2be0
AS
22547GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPP_NEED_TRADITIONAL="$CPP_NEED_TRADITIONAL" CPPFLAGS="$CPPFLAGS"
22548
c0d27fcc
MR
22549_ACEOF
22550
503d2be0 22551
c0d27fcc
MR
22552
22553cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
22554for ac_config_target in $ac_config_targets
22555do
22556 case "$ac_config_target" in
22557 # Handling of arguments.
22558 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
22559 "lib-src/Makefile.c" ) CONFIG_FILES="$CONFIG_FILES lib-src/Makefile.c:lib-src/Makefile.in" ;;
22560 "oldXMenu/Makefile" ) CONFIG_FILES="$CONFIG_FILES oldXMenu/Makefile" ;;
22561 "man/Makefile" ) CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
22562 "lwlib/Makefile" ) CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;;
22563 "src/Makefile.c" ) CONFIG_FILES="$CONFIG_FILES src/Makefile.c:src/Makefile.in" ;;
22564 "lisp/Makefile" ) CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;;
23b24859 22565 "lispref/Makefile" ) CONFIG_FILES="$CONFIG_FILES lispref/Makefile" ;;
981626b7 22566 "lispintro/Makefile" ) CONFIG_FILES="$CONFIG_FILES lispintro/Makefile" ;;
503d2be0
AS
22567 "leim/Makefile" ) CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;;
22568 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
22569 "src/config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:src/config.in" ;;
c0d27fcc 22570 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
503d2be0
AS
22571echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
22572 { (exit 1); exit 1; }; };;
22573 esac
ba4481b5 22574done
503d2be0
AS
22575
22576# If the user did not use the arguments to specify the items to instantiate,
22577# then the envvar interface is used. Set only those that are not.
22578# We use the long form for the default assignment because of an extremely
22579# bizarre bug on SunOS 4.1.3.
22580if $ac_need_defaults; then
22581 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
22582 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
22583 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
ba4481b5 22584fi
503d2be0 22585
19650fd6
AS
22586# Have a temporary directory for convenience. Make it in the build tree
22587# simply because there is no reason to put it here, and in addition,
22588# creating and moving files from /tmp can sometimes cause problems.
503d2be0
AS
22589# Create a temporary directory, and hook for its removal unless debugging.
22590$debug ||
22591{
22592 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
22593 trap '{ (exit 1); exit 1; }' 1 2 13 15
22594}
22595
22596# Create a (secure) tmp directory for tmp files.
19650fd6 22597
503d2be0 22598{
19650fd6 22599 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
503d2be0
AS
22600 test -n "$tmp" && test -d "$tmp"
22601} ||
22602{
19650fd6 22603 tmp=./confstat$$-$RANDOM
503d2be0
AS
22604 (umask 077 && mkdir $tmp)
22605} ||
22606{
19650fd6 22607 echo "$me: cannot create a temporary directory in ." >&2
503d2be0
AS
22608 { (exit 1); exit 1; }
22609}
22610
c0d27fcc 22611_ACEOF
503d2be0 22612
c0d27fcc 22613cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
22614
22615#
22616# CONFIG_FILES section.
22617#
22618
22619# No need to generate the scripts if there are no CONFIG_FILES.
22620# This happens for instance when ./config.status config.h
22621if test -n "\$CONFIG_FILES"; then
22622 # Protect against being on the right side of a sed subst in config.status.
22623 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
22624 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
22625s,@SHELL@,$SHELL,;t t
c0d27fcc
MR
22626s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
22627s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
22628s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
22629s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
22630s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
22631s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
503d2be0
AS
22632s,@exec_prefix@,$exec_prefix,;t t
22633s,@prefix@,$prefix,;t t
22634s,@program_transform_name@,$program_transform_name,;t t
22635s,@bindir@,$bindir,;t t
22636s,@sbindir@,$sbindir,;t t
22637s,@libexecdir@,$libexecdir,;t t
22638s,@datadir@,$datadir,;t t
22639s,@sysconfdir@,$sysconfdir,;t t
22640s,@sharedstatedir@,$sharedstatedir,;t t
22641s,@localstatedir@,$localstatedir,;t t
22642s,@libdir@,$libdir,;t t
22643s,@includedir@,$includedir,;t t
22644s,@oldincludedir@,$oldincludedir,;t t
22645s,@infodir@,$infodir,;t t
22646s,@mandir@,$mandir,;t t
503d2be0
AS
22647s,@build_alias@,$build_alias,;t t
22648s,@host_alias@,$host_alias,;t t
22649s,@target_alias@,$target_alias,;t t
c0d27fcc 22650s,@DEFS@,$DEFS,;t t
503d2be0
AS
22651s,@ECHO_C@,$ECHO_C,;t t
22652s,@ECHO_N@,$ECHO_N,;t t
22653s,@ECHO_T@,$ECHO_T,;t t
503d2be0 22654s,@LIBS@,$LIBS,;t t
19650fd6 22655s,@MAINT@,$MAINT,;t t
503d2be0
AS
22656s,@build@,$build,;t t
22657s,@build_cpu@,$build_cpu,;t t
22658s,@build_vendor@,$build_vendor,;t t
22659s,@build_os@,$build_os,;t t
22660s,@host@,$host,;t t
22661s,@host_cpu@,$host_cpu,;t t
22662s,@host_vendor@,$host_vendor,;t t
22663s,@host_os@,$host_os,;t t
22664s,@CC@,$CC,;t t
22665s,@CFLAGS@,$CFLAGS,;t t
22666s,@LDFLAGS@,$LDFLAGS,;t t
22667s,@CPPFLAGS@,$CPPFLAGS,;t t
22668s,@ac_ct_CC@,$ac_ct_CC,;t t
22669s,@EXEEXT@,$EXEEXT,;t t
22670s,@OBJEXT@,$OBJEXT,;t t
22671s,@LN_S@,$LN_S,;t t
22672s,@CPP@,$CPP,;t t
22673s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
22674s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
22675s,@INSTALL_DATA@,$INSTALL_DATA,;t t
503d2be0
AS
22676s,@RANLIB@,$RANLIB,;t t
22677s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
9e71690e 22678s,@INSTALL_INFO@,$INSTALL_INFO,;t t
6bae0ccf 22679s,@EGREP@,$EGREP,;t t
503d2be0
AS
22680s,@LIBSOUND@,$LIBSOUND,;t t
22681s,@SET_MAKE@,$SET_MAKE,;t t
488dd4c4
JD
22682s,@PKG_CONFIG@,$PKG_CONFIG,;t t
22683s,@GTK_CFLAGS@,$GTK_CFLAGS,;t t
22684s,@GTK_LIBS@,$GTK_LIBS,;t t
503d2be0
AS
22685s,@ALLOCA@,$ALLOCA,;t t
22686s,@liblockfile@,$liblockfile,;t t
22687s,@LIBOBJS@,$LIBOBJS,;t t
22688s,@NEED_SETGID@,$NEED_SETGID,;t t
22689s,@KMEM_GROUP@,$KMEM_GROUP,;t t
22690s,@GETLOADAVG_LIBS@,$GETLOADAVG_LIBS,;t t
22691s,@version@,$version,;t t
22692s,@configuration@,$configuration,;t t
22693s,@canonical@,$canonical,;t t
22694s,@srcdir@,$srcdir,;t t
22695s,@lispdir@,$lispdir,;t t
22696s,@locallisppath@,$locallisppath,;t t
22697s,@lisppath@,$lisppath,;t t
22698s,@x_default_search_path@,$x_default_search_path,;t t
22699s,@etcdir@,$etcdir,;t t
22700s,@archlibdir@,$archlibdir,;t t
22701s,@docdir@,$docdir,;t t
22702s,@bitmapdir@,$bitmapdir,;t t
98418dba
CW
22703s,@gamedir@,$gamedir,;t t
22704s,@gameuser@,$gameuser,;t t
503d2be0
AS
22705s,@c_switch_system@,$c_switch_system,;t t
22706s,@c_switch_machine@,$c_switch_machine,;t t
22707s,@LD_SWITCH_X_SITE@,$LD_SWITCH_X_SITE,;t t
22708s,@LD_SWITCH_X_SITE_AUX@,$LD_SWITCH_X_SITE_AUX,;t t
22709s,@C_SWITCH_X_SITE@,$C_SWITCH_X_SITE,;t t
22710s,@X_TOOLKIT_TYPE@,$X_TOOLKIT_TYPE,;t t
22711s,@machfile@,$machfile,;t t
22712s,@opsysfile@,$opsysfile,;t t
6a3a24fa 22713s,@carbon_appdir@,$carbon_appdir,;t t
6bae0ccf 22714s,@LTLIBOBJS@,$LTLIBOBJS,;t t
503d2be0
AS
22715CEOF
22716
c0d27fcc 22717_ACEOF
ba4481b5 22718
c0d27fcc 22719 cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
22720 # Split the substitutions into bite-sized pieces for seds with
22721 # small command number limits, like on Digital OSF/1 and HP-UX.
22722 ac_max_sed_lines=48
22723 ac_sed_frag=1 # Number of current file.
22724 ac_beg=1 # First line for current file.
22725 ac_end=$ac_max_sed_lines # Line after last line for current file.
22726 ac_more_lines=:
22727 ac_sed_cmds=
22728 while $ac_more_lines; do
22729 if test $ac_beg -gt 1; then
22730 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
22731 else
22732 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
22733 fi
22734 if test ! -s $tmp/subs.frag; then
22735 ac_more_lines=false
22736 else
22737 # The purpose of the label and of the branching condition is to
22738 # speed up the sed processing (if there are no `@' at all, there
22739 # is no need to browse any of the substitutions).
22740 # These are the two extra sed commands mentioned above.
22741 (echo ':t
22742 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
22743 if test -z "$ac_sed_cmds"; then
35996d22 22744 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
503d2be0 22745 else
35996d22 22746 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
503d2be0
AS
22747 fi
22748 ac_sed_frag=`expr $ac_sed_frag + 1`
22749 ac_beg=$ac_end
22750 ac_end=`expr $ac_end + $ac_max_sed_lines`
22751 fi
22752 done
22753 if test -z "$ac_sed_cmds"; then
22754 ac_sed_cmds=cat
22755 fi
22756fi # test -n "$CONFIG_FILES"
ba4481b5 22757
c0d27fcc
MR
22758_ACEOF
22759cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0 22760for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
ba4481b5 22761 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
503d2be0
AS
22762 case $ac_file in
22763 - | *:- | *:-:* ) # input from stdin
35996d22
AS
22764 cat >$tmp/stdin
22765 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22766 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
503d2be0 22767 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
35996d22 22768 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
503d2be0 22769 * ) ac_file_in=$ac_file.in ;;
ba4481b5
DL
22770 esac
22771
503d2be0 22772 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
c0d27fcc
MR
22773 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
22774$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
35996d22
AS
22775 X"$ac_file" : 'X\(//\)[^/]' \| \
22776 X"$ac_file" : 'X\(//\)$' \| \
22777 X"$ac_file" : 'X\(/\)' \| \
22778 . : '\(.\)' 2>/dev/null ||
503d2be0
AS
22779echo X"$ac_file" |
22780 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22781 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22782 /^X\(\/\/\)$/{ s//\1/; q; }
22783 /^X\(\/\).*/{ s//\1/; q; }
22784 s/.*/./; q'`
6bae0ccf
DL
22785 { if $as_mkdir_p; then
22786 mkdir -p "$ac_dir"
22787 else
22788 as_dir="$ac_dir"
22789 as_dirs=
22790 while test ! -d "$as_dir"; do
22791 as_dirs="$as_dir $as_dirs"
22792 as_dir=`(dirname "$as_dir") 2>/dev/null ||
22793$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
35996d22
AS
22794 X"$as_dir" : 'X\(//\)[^/]' \| \
22795 X"$as_dir" : 'X\(//\)$' \| \
22796 X"$as_dir" : 'X\(/\)' \| \
22797 . : '\(.\)' 2>/dev/null ||
6bae0ccf
DL
22798echo X"$as_dir" |
22799 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22800 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22801 /^X\(\/\/\)$/{ s//\1/; q; }
22802 /^X\(\/\).*/{ s//\1/; q; }
22803 s/.*/./; q'`
22804 done
22805 test ! -n "$as_dirs" || mkdir $as_dirs
22806 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
22807echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
22808 { (exit 1); exit 1; }; }; }
503d2be0 22809
c0d27fcc 22810 ac_builddir=.
98418dba 22811
c0d27fcc
MR
22812if test "$ac_dir" != .; then
22813 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
22814 # A "../" for each directory in $ac_dir_suffix.
22815 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
22816else
22817 ac_dir_suffix= ac_top_builddir=
22818fi
22819
22820case $srcdir in
22821 .) # No --srcdir option. We are building in place.
22822 ac_srcdir=.
22823 if test -z "$ac_top_builddir"; then
22824 ac_top_srcdir=.
22825 else
22826 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
22827 fi ;;
22828 [\\/]* | ?:[\\/]* ) # Absolute path.
22829 ac_srcdir=$srcdir$ac_dir_suffix;
22830 ac_top_srcdir=$srcdir ;;
ba4481b5 22831 *) # Relative path.
c0d27fcc
MR
22832 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
22833 ac_top_srcdir=$ac_top_builddir$srcdir ;;
22834esac
35996d22
AS
22835
22836# Do not use `cd foo && pwd` to compute absolute paths, because
22837# the directories may not exist.
22838case `pwd` in
22839.) ac_abs_builddir="$ac_dir";;
22840*)
22841 case "$ac_dir" in
22842 .) ac_abs_builddir=`pwd`;;
22843 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
22844 *) ac_abs_builddir=`pwd`/"$ac_dir";;
22845 esac;;
22846esac
22847case $ac_abs_builddir in
22848.) ac_abs_top_builddir=${ac_top_builddir}.;;
22849*)
22850 case ${ac_top_builddir}. in
22851 .) ac_abs_top_builddir=$ac_abs_builddir;;
22852 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
22853 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
22854 esac;;
22855esac
22856case $ac_abs_builddir in
22857.) ac_abs_srcdir=$ac_srcdir;;
22858*)
22859 case $ac_srcdir in
22860 .) ac_abs_srcdir=$ac_abs_builddir;;
22861 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
22862 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
22863 esac;;
22864esac
22865case $ac_abs_builddir in
22866.) ac_abs_top_srcdir=$ac_top_srcdir;;
22867*)
22868 case $ac_top_srcdir in
22869 .) ac_abs_top_srcdir=$ac_abs_builddir;;
22870 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
22871 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
22872 esac;;
22873esac
c0d27fcc 22874
ba4481b5 22875
503d2be0
AS
22876 case $INSTALL in
22877 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
c0d27fcc 22878 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
ba4481b5
DL
22879 esac
22880
551ffc27
ST
22881 if test x"$ac_file" != x-; then
22882 { echo "$as_me:$LINENO: creating $ac_file" >&5
22883echo "$as_me: creating $ac_file" >&6;}
22884 rm -f "$ac_file"
22885 fi
503d2be0
AS
22886 # Let's still pretend it is `configure' which instantiates (i.e., don't
22887 # use $as_me), people would be surprised to read:
c0d27fcc
MR
22888 # /* config.h. Generated by config.status. */
22889 if test x"$ac_file" = x-; then
22890 configure_input=
22891 else
22892 configure_input="$ac_file. "
22893 fi
22894 configure_input=$configure_input"Generated from `echo $ac_file_in |
35996d22 22895 sed 's,.*/,,'` by configure."
503d2be0
AS
22896
22897 # First look for the input files in the build tree, otherwise in the
22898 # src tree.
22899 ac_file_inputs=`IFS=:
22900 for f in $ac_file_in; do
22901 case $f in
22902 -) echo $tmp/stdin ;;
22903 [\\/$]*)
35996d22
AS
22904 # Absolute (can't be DOS-style, as IFS=:)
22905 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
503d2be0
AS
22906echo "$as_me: error: cannot find input file: $f" >&2;}
22907 { (exit 1); exit 1; }; }
35996d22 22908 echo "$f";;
503d2be0 22909 *) # Relative
35996d22
AS
22910 if test -f "$f"; then
22911 # Build tree
22912 echo "$f"
22913 elif test -f "$srcdir/$f"; then
22914 # Source tree
22915 echo "$srcdir/$f"
22916 else
22917 # /dev/null tree
22918 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
503d2be0
AS
22919echo "$as_me: error: cannot find input file: $f" >&2;}
22920 { (exit 1); exit 1; }; }
35996d22 22921 fi;;
503d2be0
AS
22922 esac
22923 done` || { (exit 1); exit 1; }
c0d27fcc
MR
22924_ACEOF
22925cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
22926 sed "$ac_vpsub
22927$extrasub
c0d27fcc
MR
22928_ACEOF
22929cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
22930:t
22931/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
22932s,@configure_input@,$configure_input,;t t
22933s,@srcdir@,$ac_srcdir,;t t
c0d27fcc 22934s,@abs_srcdir@,$ac_abs_srcdir,;t t
503d2be0 22935s,@top_srcdir@,$ac_top_srcdir,;t t
c0d27fcc
MR
22936s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
22937s,@builddir@,$ac_builddir,;t t
22938s,@abs_builddir@,$ac_abs_builddir,;t t
22939s,@top_builddir@,$ac_top_builddir,;t t
22940s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
503d2be0
AS
22941s,@INSTALL@,$ac_INSTALL,;t t
22942" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
22943 rm -f $tmp/stdin
22944 if test x"$ac_file" != x-; then
22945 mv $tmp/out $ac_file
22946 else
22947 cat $tmp/out
22948 rm -f $tmp/out
22949 fi
22950
22951done
c0d27fcc
MR
22952_ACEOF
22953cat >>$CONFIG_STATUS <<\_ACEOF
ba4481b5 22954
503d2be0
AS
22955#
22956# CONFIG_HEADER section.
22957#
ba4481b5
DL
22958
22959# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
22960# NAME is the cpp macro being defined and VALUE is the value it is being given.
22961#
22962# ac_d sets the value in "#define NAME VALUE" lines.
35996d22
AS
22963ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
22964ac_dB='[ ].*$,\1#\2'
503d2be0
AS
22965ac_dC=' '
22966ac_dD=',;t'
22967# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
35996d22 22968ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
503d2be0 22969ac_uB='$,\1#\2define\3'
ba4481b5 22970ac_uC=' '
503d2be0 22971ac_uD=',;t'
ba4481b5 22972
503d2be0 22973for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
ba4481b5 22974 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
503d2be0
AS
22975 case $ac_file in
22976 - | *:- | *:-:* ) # input from stdin
35996d22
AS
22977 cat >$tmp/stdin
22978 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22979 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
503d2be0 22980 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
35996d22 22981 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
503d2be0 22982 * ) ac_file_in=$ac_file.in ;;
ba4481b5
DL
22983 esac
22984
c0d27fcc 22985 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
503d2be0
AS
22986echo "$as_me: creating $ac_file" >&6;}
22987
22988 # First look for the input files in the build tree, otherwise in the
22989 # src tree.
22990 ac_file_inputs=`IFS=:
22991 for f in $ac_file_in; do
22992 case $f in
22993 -) echo $tmp/stdin ;;
22994 [\\/$]*)
35996d22
AS
22995 # Absolute (can't be DOS-style, as IFS=:)
22996 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
503d2be0
AS
22997echo "$as_me: error: cannot find input file: $f" >&2;}
22998 { (exit 1); exit 1; }; }
35996d22
AS
22999 # Do quote $f, to prevent DOS paths from being IFS'd.
23000 echo "$f";;
503d2be0 23001 *) # Relative
35996d22
AS
23002 if test -f "$f"; then
23003 # Build tree
23004 echo "$f"
23005 elif test -f "$srcdir/$f"; then
23006 # Source tree
23007 echo "$srcdir/$f"
23008 else
23009 # /dev/null tree
23010 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
503d2be0
AS
23011echo "$as_me: error: cannot find input file: $f" >&2;}
23012 { (exit 1); exit 1; }; }
35996d22 23013 fi;;
503d2be0
AS
23014 esac
23015 done` || { (exit 1); exit 1; }
23016 # Remove the trailing spaces.
35996d22 23017 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
503d2be0 23018
c0d27fcc 23019_ACEOF
503d2be0
AS
23020
23021# Transform confdefs.h into two sed scripts, `conftest.defines' and
23022# `conftest.undefs', that substitutes the proper values into
23023# config.h.in to produce config.h. The first handles `#define'
23024# templates, and the second `#undef' templates.
23025# And first: Protect against being on the right side of a sed subst in
23026# config.status. Protect against being in an unquoted here document
23027# in config.status.
23028rm -f conftest.defines conftest.undefs
23029# Using a here document instead of a string reduces the quoting nightmare.
23030# Putting comments in sed scripts is not portable.
23031#
23032# `end' is used to avoid that the second main sed command (meant for
23033# 0-ary CPP macros) applies to n-ary macro definitions.
23034# See the Autoconf documentation for `clear'.
c0d27fcc 23035cat >confdef2sed.sed <<\_ACEOF
503d2be0
AS
23036s/[\\&,]/\\&/g
23037s,[\\$`],\\&,g
23038t clear
23039: clear
35996d22 23040s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
503d2be0 23041t end
35996d22 23042s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
503d2be0 23043: end
c0d27fcc 23044_ACEOF
503d2be0
AS
23045# If some macros were called several times there might be several times
23046# the same #defines, which is useless. Nevertheless, we may not want to
23047# sort them, since we want the *last* AC-DEFINE to be honored.
23048uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
23049sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
23050rm -f confdef2sed.sed
ba4481b5
DL
23051
23052# This sed command replaces #undef with comments. This is necessary, for
23053# example, in the case of _POSIX_SOURCE, which is predefined and required
23054# on some systems where configure will not decide to define it.
c0d27fcc 23055cat >>conftest.undefs <<\_ACEOF
35996d22 23056s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
c0d27fcc 23057_ACEOF
ba4481b5 23058
503d2be0
AS
23059# Break up conftest.defines because some shells have a limit on the size
23060# of here documents, and old seds have small limits too (100 cmds).
23061echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
35996d22 23062echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
503d2be0
AS
23063echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
23064echo ' :' >>$CONFIG_STATUS
23065rm -f conftest.tail
23066while grep . conftest.defines >/dev/null
23067do
23068 # Write a limited-size here document to $tmp/defines.sed.
23069 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
23070 # Speed up: don't consider the non `#define' lines.
35996d22 23071 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
503d2be0
AS
23072 # Work around the forget-to-reset-the-flag bug.
23073 echo 't clr' >>$CONFIG_STATUS
23074 echo ': clr' >>$CONFIG_STATUS
23075 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
23076 echo 'CEOF
23077 sed -f $tmp/defines.sed $tmp/in >$tmp/out
23078 rm -f $tmp/in
23079 mv $tmp/out $tmp/in
23080' >>$CONFIG_STATUS
23081 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
23082 rm -f conftest.defines
23083 mv conftest.tail conftest.defines
23084done
23085rm -f conftest.defines
6bae0ccf 23086echo ' fi # grep' >>$CONFIG_STATUS
503d2be0 23087echo >>$CONFIG_STATUS
ba4481b5 23088
503d2be0
AS
23089# Break up conftest.undefs because some shells have a limit on the size
23090# of here documents, and old seds have small limits too (100 cmds).
23091echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
ba4481b5 23092rm -f conftest.tail
503d2be0 23093while grep . conftest.undefs >/dev/null
ba4481b5 23094do
503d2be0
AS
23095 # Write a limited-size here document to $tmp/undefs.sed.
23096 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
23097 # Speed up: don't consider the non `#undef'
35996d22 23098 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
503d2be0
AS
23099 # Work around the forget-to-reset-the-flag bug.
23100 echo 't clr' >>$CONFIG_STATUS
23101 echo ': clr' >>$CONFIG_STATUS
23102 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
ba4481b5 23103 echo 'CEOF
503d2be0
AS
23104 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
23105 rm -f $tmp/in
23106 mv $tmp/out $tmp/in
23107' >>$CONFIG_STATUS
23108 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
23109 rm -f conftest.undefs
23110 mv conftest.tail conftest.undefs
ba4481b5 23111done
503d2be0
AS
23112rm -f conftest.undefs
23113
c0d27fcc 23114cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
23115 # Let's still pretend it is `configure' which instantiates (i.e., don't
23116 # use $as_me), people would be surprised to read:
c0d27fcc 23117 # /* config.h. Generated by config.status. */
503d2be0 23118 if test x"$ac_file" = x-; then
c0d27fcc 23119 echo "/* Generated by configure. */" >$tmp/config.h
ba4481b5 23120 else
c0d27fcc 23121 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
503d2be0
AS
23122 fi
23123 cat $tmp/in >>$tmp/config.h
23124 rm -f $tmp/in
23125 if test x"$ac_file" != x-; then
19650fd6 23126 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
c0d27fcc 23127 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
503d2be0
AS
23128echo "$as_me: $ac_file is unchanged" >&6;}
23129 else
c0d27fcc
MR
23130 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
23131$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
35996d22
AS
23132 X"$ac_file" : 'X\(//\)[^/]' \| \
23133 X"$ac_file" : 'X\(//\)$' \| \
23134 X"$ac_file" : 'X\(/\)' \| \
23135 . : '\(.\)' 2>/dev/null ||
503d2be0
AS
23136echo X"$ac_file" |
23137 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23138 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23139 /^X\(\/\/\)$/{ s//\1/; q; }
23140 /^X\(\/\).*/{ s//\1/; q; }
23141 s/.*/./; q'`
6bae0ccf
DL
23142 { if $as_mkdir_p; then
23143 mkdir -p "$ac_dir"
23144 else
23145 as_dir="$ac_dir"
23146 as_dirs=
23147 while test ! -d "$as_dir"; do
23148 as_dirs="$as_dir $as_dirs"
23149 as_dir=`(dirname "$as_dir") 2>/dev/null ||
23150$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
35996d22
AS
23151 X"$as_dir" : 'X\(//\)[^/]' \| \
23152 X"$as_dir" : 'X\(//\)$' \| \
23153 X"$as_dir" : 'X\(/\)' \| \
23154 . : '\(.\)' 2>/dev/null ||
6bae0ccf
DL
23155echo X"$as_dir" |
23156 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23157 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23158 /^X\(\/\/\)$/{ s//\1/; q; }
23159 /^X\(\/\).*/{ s//\1/; q; }
23160 s/.*/./; q'`
23161 done
23162 test ! -n "$as_dirs" || mkdir $as_dirs
23163 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
23164echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
23165 { (exit 1); exit 1; }; }; }
503d2be0 23166
503d2be0
AS
23167 rm -f $ac_file
23168 mv $tmp/config.h $ac_file
ba4481b5 23169 fi
503d2be0
AS
23170 else
23171 cat $tmp/config.h
23172 rm -f $tmp/config.h
ba4481b5 23173 fi
503d2be0 23174done
c0d27fcc
MR
23175_ACEOF
23176cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
23177
23178#
23179# CONFIG_COMMANDS section.
23180#
23181for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
23182 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
23183 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
c0d27fcc
MR
23184 ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
23185$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
35996d22
AS
23186 X"$ac_dest" : 'X\(//\)[^/]' \| \
23187 X"$ac_dest" : 'X\(//\)$' \| \
23188 X"$ac_dest" : 'X\(/\)' \| \
23189 . : '\(.\)' 2>/dev/null ||
c0d27fcc
MR
23190echo X"$ac_dest" |
23191 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23192 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23193 /^X\(\/\/\)$/{ s//\1/; q; }
23194 /^X\(\/\).*/{ s//\1/; q; }
23195 s/.*/./; q'`
35996d22
AS
23196 { if $as_mkdir_p; then
23197 mkdir -p "$ac_dir"
23198 else
23199 as_dir="$ac_dir"
23200 as_dirs=
23201 while test ! -d "$as_dir"; do
23202 as_dirs="$as_dir $as_dirs"
23203 as_dir=`(dirname "$as_dir") 2>/dev/null ||
23204$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23205 X"$as_dir" : 'X\(//\)[^/]' \| \
23206 X"$as_dir" : 'X\(//\)$' \| \
23207 X"$as_dir" : 'X\(/\)' \| \
23208 . : '\(.\)' 2>/dev/null ||
23209echo X"$as_dir" |
23210 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23211 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23212 /^X\(\/\/\)$/{ s//\1/; q; }
23213 /^X\(\/\).*/{ s//\1/; q; }
23214 s/.*/./; q'`
23215 done
23216 test ! -n "$as_dirs" || mkdir $as_dirs
23217 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
23218echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
23219 { (exit 1); exit 1; }; }; }
23220
c0d27fcc
MR
23221 ac_builddir=.
23222
23223if test "$ac_dir" != .; then
23224 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
23225 # A "../" for each directory in $ac_dir_suffix.
23226 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
23227else
23228 ac_dir_suffix= ac_top_builddir=
23229fi
23230
23231case $srcdir in
23232 .) # No --srcdir option. We are building in place.
23233 ac_srcdir=.
23234 if test -z "$ac_top_builddir"; then
23235 ac_top_srcdir=.
23236 else
23237 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
23238 fi ;;
23239 [\\/]* | ?:[\\/]* ) # Absolute path.
23240 ac_srcdir=$srcdir$ac_dir_suffix;
23241 ac_top_srcdir=$srcdir ;;
23242 *) # Relative path.
23243 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
23244 ac_top_srcdir=$ac_top_builddir$srcdir ;;
23245esac
35996d22
AS
23246
23247# Do not use `cd foo && pwd` to compute absolute paths, because
23248# the directories may not exist.
23249case `pwd` in
23250.) ac_abs_builddir="$ac_dir";;
23251*)
23252 case "$ac_dir" in
23253 .) ac_abs_builddir=`pwd`;;
23254 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
23255 *) ac_abs_builddir=`pwd`/"$ac_dir";;
23256 esac;;
23257esac
23258case $ac_abs_builddir in
23259.) ac_abs_top_builddir=${ac_top_builddir}.;;
23260*)
23261 case ${ac_top_builddir}. in
23262 .) ac_abs_top_builddir=$ac_abs_builddir;;
23263 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
23264 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
23265 esac;;
23266esac
23267case $ac_abs_builddir in
23268.) ac_abs_srcdir=$ac_srcdir;;
23269*)
23270 case $ac_srcdir in
23271 .) ac_abs_srcdir=$ac_abs_builddir;;
23272 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
23273 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
23274 esac;;
23275esac
23276case $ac_abs_builddir in
23277.) ac_abs_top_srcdir=$ac_top_srcdir;;
23278*)
23279 case $ac_top_srcdir in
23280 .) ac_abs_top_srcdir=$ac_abs_builddir;;
23281 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
23282 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
23283 esac;;
23284esac
ba4481b5 23285
c0d27fcc
MR
23286
23287 { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
23288echo "$as_me: executing $ac_dest commands" >&6;}
503d2be0
AS
23289 case $ac_dest in
23290 default )
ba4481b5
DL
23291
23292### Make the necessary directories, if they don't exist.
23293for dir in etc lisp ; do
23294 test -d ${dir} || mkdir ${dir}
23295done
23296
23297# Build src/Makefile from ${srcdir}/src/Makefile.c
23298# and lib-src/Makefile from ${srcdir}/lib-src/Makefile.c
23299# This must be done after src/config.h is built, since we rely on that file.
23300
23301# Now get this: Some word that is part of the ${srcdir} directory name
23302# or the ${configuration} value might, just might, happen to be an
23303# identifier like `sun4' or `i386' or something, and be predefined by
23304# the C preprocessor to some helpful value like 1, or maybe the empty
23305# string. Needless to say consequent macro substitutions are less
23306# than conducive to the makefile finding the correct directory.
23307undefs="`echo $top_srcdir $configuration $canonical |
23308sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/ *$//' \
23309 -e 's/ */ -U/g' -e 's/-U[0-9][^ ]*//g' \
23310`"
23311
23312echo creating src/epaths.h
4aa6b955 23313${MAKE-make} epaths-force
ba4481b5 23314
1c203d4c
DL
23315# As of 2000-11-19, newest development versions of GNU cpp preprocess
23316# `..' to `. .' unless invoked with -traditional
23317
d0e9bfd2 23318if test "x$GCC" = xyes && test "x$CPP_NEED_TRADITIONAL" = xyes; then
1c203d4c
DL
23319 CPPFLAGS="$CPPFLAGS -traditional"
23320fi
23321
ba4481b5
DL
23322echo creating lib-src/Makefile
23323( cd lib-src
23324 rm -f junk.c junk1.c junk2.c
23325 sed -e '/start of cpp stuff/q' \
23326 < Makefile.c > junk1.c
23327 sed -e '1,/start of cpp stuff/d'\
9a72e4c1 23328 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
ba4481b5 23329 < Makefile.c > junk.c
503d2be0 23330 $CPP $undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
ba4481b5
DL
23331 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
23332 cat junk1.c junk2.c > Makefile.new
23333 rm -f junk.c junk1.c junk2.c
23334 chmod 444 Makefile.new
23335 mv -f Makefile.new Makefile
23336)
23337
23338echo creating src/Makefile
23339( cd src
23340 rm -f junk.c junk1.c junk2.c
23341 sed -e '/start of cpp stuff/q' \
23342 < Makefile.c > junk1.c
23343 sed -e '1,/start of cpp stuff/d'\
9a72e4c1 23344 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
ba4481b5 23345 < Makefile.c > junk.c
503d2be0 23346 $CPP $undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
ba4481b5
DL
23347 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
23348 cat junk1.c junk2.c > Makefile.new
23349 rm -f junk.c junk1.c junk2.c
23350 chmod 444 Makefile.new
23351 mv -f Makefile.new Makefile
23352)
23353
503d2be0 23354if test ! -f src/.gdbinit && test -f $srcdir/src/.gdbinit; then
ba4481b5 23355 echo creating src/.gdbinit
503d2be0 23356 echo source $srcdir/src/.gdbinit > src/.gdbinit
ba4481b5
DL
23357fi
23358
23359# This is how we know whether to re-run configure in certain cases.
23360touch src/config.stamp
23361
503d2be0
AS
23362 ;;
23363 esac
23364done
c0d27fcc 23365_ACEOF
503d2be0 23366
c0d27fcc 23367cat >>$CONFIG_STATUS <<\_ACEOF
ba4481b5 23368
503d2be0 23369{ (exit 0); exit 0; }
c0d27fcc 23370_ACEOF
ba4481b5 23371chmod +x $CONFIG_STATUS
503d2be0
AS
23372ac_clean_files=$ac_clean_files_save
23373
c0d27fcc 23374
503d2be0
AS
23375# configure is writing to config.log, and then calls config.status.
23376# config.status does its own redirection, appending to config.log.
23377# Unfortunately, on DOS this fails, as config.log is still kept open
23378# by configure, so config.status won't be able to write to it; its
23379# output is simply discarded. So we exec the FD to /dev/null,
23380# effectively closing config.log, so it can be properly (re)opened and
23381# appended to by config.status. When coming back to configure, we
23382# need to make the FD available again.
23383if test "$no_create" != yes; then
23384 ac_cs_success=:
19650fd6
AS
23385 ac_config_status_args=
23386 test "$silent" = yes &&
23387 ac_config_status_args="$ac_config_status_args --quiet"
503d2be0 23388 exec 5>/dev/null
19650fd6 23389 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
503d2be0
AS
23390 exec 5>>config.log
23391 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
23392 # would make configure fail if this is the last instruction.
23393 $ac_cs_success || { (exit 1); exit 1; }
23394fi
f5f47add 23395
c0d27fcc 23396